microcoreos 0.4.5__tar.gz → 0.4.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 (223) hide show
  1. {microcoreos-0.4.5 → microcoreos-0.4.6}/AI_CONTEXT.md +93 -93
  2. {microcoreos-0.4.5 → microcoreos-0.4.6}/PKG-INFO +20 -1
  3. {microcoreos-0.4.5 → microcoreos-0.4.6}/README.md +19 -0
  4. {microcoreos-0.4.5 → microcoreos-0.4.6}/ROADMAP.md +63 -12
  5. {microcoreos-0.4.5 → microcoreos-0.4.6}/ROADMAP_DONE.md +6 -0
  6. {microcoreos-0.4.5 → microcoreos-0.4.6}/domains/system/plugins/system_metrics_plugin.py +4 -1
  7. {microcoreos-0.4.5 → microcoreos-0.4.6}/domains/system/plugins/system_traces_plugin.py +41 -2
  8. {microcoreos-0.4.5 → microcoreos-0.4.6}/domains/system/plugins/system_traces_stream_plugin.py +28 -1
  9. {microcoreos-0.4.5 → microcoreos-0.4.6}/microcoreos/catalog.py +11 -3
  10. {microcoreos-0.4.5 → microcoreos-0.4.6}/microcoreos/cli.py +6 -2
  11. {microcoreos-0.4.5 → microcoreos-0.4.6}/microcoreos/container.py +28 -8
  12. microcoreos-0.4.6/microcoreos/external_extras.py +571 -0
  13. {microcoreos-0.4.5 → microcoreos-0.4.6}/microcoreos/project_agents.md +16 -0
  14. {microcoreos-0.4.5 → microcoreos-0.4.6}/microcoreos/project_readme.md +35 -0
  15. {microcoreos-0.4.5 → microcoreos-0.4.6}/microcoreos_dev/lint/checkers/naming.py +6 -1
  16. {microcoreos-0.4.5 → microcoreos-0.4.6}/pyproject.toml +2 -2
  17. {microcoreos-0.4.5 → microcoreos-0.4.6}/tests/core/test_core_purity.py +1 -1
  18. {microcoreos-0.4.5 → microcoreos-0.4.6}/tests/core/test_tool_proxy.py +38 -0
  19. {microcoreos-0.4.5 → microcoreos-0.4.6}/tests/linters/test_discovery_naming_linter.py +8 -0
  20. microcoreos-0.4.6/tests/system/test_external_extras.py +276 -0
  21. {microcoreos-0.4.5 → microcoreos-0.4.6}/tests/system/test_system_traces_plugin.py +35 -0
  22. {microcoreos-0.4.5 → microcoreos-0.4.6}/tools/system/registry_tool.py +1 -1
  23. {microcoreos-0.4.5 → microcoreos-0.4.6}/uv.lock +2 -2
  24. {microcoreos-0.4.5 → microcoreos-0.4.6}/.agent/skills/microcoreos-architecture/SKILL.md +0 -0
  25. {microcoreos-0.4.5 → microcoreos-0.4.6}/.agent/skills/microcoreos-architecture/agent.md +0 -0
  26. {microcoreos-0.4.5 → microcoreos-0.4.6}/.agent/workflows/feature-plan.md +0 -0
  27. {microcoreos-0.4.5 → microcoreos-0.4.6}/.agent/workflows/multi-domain-plan.md +0 -0
  28. {microcoreos-0.4.5 → microcoreos-0.4.6}/.agent/workflows/new-domain.md +0 -0
  29. {microcoreos-0.4.5 → microcoreos-0.4.6}/.agent/workflows/new-tool.md +0 -0
  30. {microcoreos-0.4.5 → microcoreos-0.4.6}/.agent/workflows/solo-build.md +0 -0
  31. {microcoreos-0.4.5 → microcoreos-0.4.6}/.claude/settings.local.json +0 -0
  32. {microcoreos-0.4.5 → microcoreos-0.4.6}/.dockerignore +0 -0
  33. {microcoreos-0.4.5 → microcoreos-0.4.6}/.env.example +0 -0
  34. {microcoreos-0.4.5 → microcoreos-0.4.6}/.github/workflows/ci.yml +0 -0
  35. {microcoreos-0.4.5 → microcoreos-0.4.6}/.github/workflows/release.yml +0 -0
  36. {microcoreos-0.4.5 → microcoreos-0.4.6}/.gitignore +0 -0
  37. {microcoreos-0.4.5 → microcoreos-0.4.6}/.mutmut-cache +0 -0
  38. {microcoreos-0.4.5 → microcoreos-0.4.6}/.python-version +0 -0
  39. {microcoreos-0.4.5 → microcoreos-0.4.6}/AGENTS.md +0 -0
  40. {microcoreos-0.4.5 → microcoreos-0.4.6}/Dockerfile +0 -0
  41. {microcoreos-0.4.5 → microcoreos-0.4.6}/INSTRUCTIONS_FOR_AI.md +0 -0
  42. {microcoreos-0.4.5 → microcoreos-0.4.6}/LICENSE +0 -0
  43. {microcoreos-0.4.5 → microcoreos-0.4.6}/cli.py +0 -0
  44. {microcoreos-0.4.5 → microcoreos-0.4.6}/conftest.py +0 -0
  45. {microcoreos-0.4.5 → microcoreos-0.4.6}/dev_infra/cache_probe.py +0 -0
  46. {microcoreos-0.4.5 → microcoreos-0.4.6}/dev_infra/docker-compose.yml +0 -0
  47. {microcoreos-0.4.5 → microcoreos-0.4.6}/docs/CLI.md +0 -0
  48. {microcoreos-0.4.5 → microcoreos-0.4.6}/docs/CORE_INFRASTRUCTURE.md +0 -0
  49. {microcoreos-0.4.5 → microcoreos-0.4.6}/docs/ELASTIC_DEPLOYMENT.md +0 -0
  50. {microcoreos-0.4.5 → microcoreos-0.4.6}/docs/EVENT_BUS.md +0 -0
  51. {microcoreos-0.4.5 → microcoreos-0.4.6}/docs/HTTP_SERVER.md +0 -0
  52. {microcoreos-0.4.5 → microcoreos-0.4.6}/docs/INDEX.md +0 -0
  53. {microcoreos-0.4.5 → microcoreos-0.4.6}/docs/OBSERVABILITY.md +0 -0
  54. {microcoreos-0.4.5 → microcoreos-0.4.6}/docs/OBSERVABILITY_API.md +0 -0
  55. {microcoreos-0.4.5 → microcoreos-0.4.6}/docs/PARALLEL_DEVELOPMENT.md +0 -0
  56. {microcoreos-0.4.5 → microcoreos-0.4.6}/docs/translations/es/README.md +0 -0
  57. {microcoreos-0.4.5 → microcoreos-0.4.6}/domains/devtools/plugins/system_lint_plugin.py +0 -0
  58. {microcoreos-0.4.5 → microcoreos-0.4.6}/domains/system/plugins/event_delivery_monitor_plugin.py +0 -0
  59. {microcoreos-0.4.5 → microcoreos-0.4.6}/domains/system/plugins/event_schemas_plugin.py +0 -0
  60. {microcoreos-0.4.5 → microcoreos-0.4.6}/domains/system/plugins/system_events_plugin.py +0 -0
  61. {microcoreos-0.4.5 → microcoreos-0.4.6}/domains/system/plugins/system_events_stream_plugin.py +0 -0
  62. {microcoreos-0.4.5 → microcoreos-0.4.6}/domains/system/plugins/system_logs_stream_plugin.py +0 -0
  63. {microcoreos-0.4.5 → microcoreos-0.4.6}/domains/system/plugins/system_status_plugin.py +0 -0
  64. {microcoreos-0.4.5 → microcoreos-0.4.6}/domains/system/plugins/tool_health_plugin.py +0 -0
  65. {microcoreos-0.4.5 → microcoreos-0.4.6}/extras/available_domains/chaos/plugins/blocking_boot_plugin.py +0 -0
  66. {microcoreos-0.4.5 → microcoreos-0.4.6}/extras/available_domains/chaos/plugins/chaos_control_plugin.py +0 -0
  67. {microcoreos-0.4.5 → microcoreos-0.4.6}/extras/available_domains/chaos/plugins/failing_plugin.py +0 -0
  68. {microcoreos-0.4.5 → microcoreos-0.4.6}/extras/available_domains/chaos/plugins/stress_plugin.py +0 -0
  69. {microcoreos-0.4.5 → microcoreos-0.4.6}/extras/available_domains/ping/plugins/ping_plugin.py +0 -0
  70. {microcoreos-0.4.5 → microcoreos-0.4.6}/extras/available_domains/scheduler/migrations/001_scheduler_one_shots.sql +0 -0
  71. {microcoreos-0.4.5 → microcoreos-0.4.6}/extras/available_domains/scheduler/models/scheduler_one_shot.py +0 -0
  72. {microcoreos-0.4.5 → microcoreos-0.4.6}/extras/available_domains/scheduler/plugins/durable_one_shots_plugin.py +0 -0
  73. {microcoreos-0.4.5 → microcoreos-0.4.6}/extras/available_domains/users/migrations/001_create_users.sql +0 -0
  74. {microcoreos-0.4.5 → microcoreos-0.4.6}/extras/available_domains/users/models/user.py +0 -0
  75. {microcoreos-0.4.5 → microcoreos-0.4.6}/extras/available_domains/users/plugins/create_user_plugin.py +0 -0
  76. {microcoreos-0.4.5 → microcoreos-0.4.6}/extras/available_domains/users/plugins/delete_user_plugin.py +0 -0
  77. {microcoreos-0.4.5 → microcoreos-0.4.6}/extras/available_domains/users/plugins/get_me_plugin.py +0 -0
  78. {microcoreos-0.4.5 → microcoreos-0.4.6}/extras/available_domains/users/plugins/get_user_by_id_plugin.py +0 -0
  79. {microcoreos-0.4.5 → microcoreos-0.4.6}/extras/available_domains/users/plugins/get_users_plugin.py +0 -0
  80. {microcoreos-0.4.5 → microcoreos-0.4.6}/extras/available_domains/users/plugins/login_plugin.py +0 -0
  81. {microcoreos-0.4.5 → microcoreos-0.4.6}/extras/available_domains/users/plugins/logout_plugin.py +0 -0
  82. {microcoreos-0.4.5 → microcoreos-0.4.6}/extras/available_domains/users/plugins/update_user_plugin.py +0 -0
  83. {microcoreos-0.4.5 → microcoreos-0.4.6}/extras/available_domains/users/plugins/welcome_service_plugin.py +0 -0
  84. {microcoreos-0.4.5 → microcoreos-0.4.6}/extras/available_tools/auth/auth_tool.py +0 -0
  85. {microcoreos-0.4.5 → microcoreos-0.4.6}/extras/available_tools/auth/tests/auth_tool_test.py +0 -0
  86. {microcoreos-0.4.5 → microcoreos-0.4.6}/extras/available_tools/chaos/chaos_tool.py +0 -0
  87. {microcoreos-0.4.5 → microcoreos-0.4.6}/extras/available_tools/kafka/kafka_driver.py +0 -0
  88. {microcoreos-0.4.5 → microcoreos-0.4.6}/extras/available_tools/postgresql/postgresql_tool.py +0 -0
  89. {microcoreos-0.4.5 → microcoreos-0.4.6}/extras/available_tools/postgresql/tests/postgresql_describe_schema_test.py +0 -0
  90. {microcoreos-0.4.5 → microcoreos-0.4.6}/extras/available_tools/postgresql/tests/postgresql_tool_test.py +0 -0
  91. {microcoreos-0.4.5 → microcoreos-0.4.6}/extras/available_tools/rabbitmq/rabbitmq_driver.py +0 -0
  92. {microcoreos-0.4.5 → microcoreos-0.4.6}/extras/available_tools/redis_state/redis_state_tool.py +0 -0
  93. {microcoreos-0.4.5 → microcoreos-0.4.6}/extras/available_tools/s3/__init__.py +0 -0
  94. {microcoreos-0.4.5 → microcoreos-0.4.6}/extras/available_tools/s3/s3_tool.py +0 -0
  95. {microcoreos-0.4.5 → microcoreos-0.4.6}/extras/available_tools/s3/tests/s3_tool_test.py +0 -0
  96. {microcoreos-0.4.5 → microcoreos-0.4.6}/extras/available_tools/scheduler/scheduler_tool.py +0 -0
  97. {microcoreos-0.4.5 → microcoreos-0.4.6}/extras/available_tools/scheduler/tests/scheduler_singleton_test.py +0 -0
  98. {microcoreos-0.4.5 → microcoreos-0.4.6}/extras/available_tools/scheduler/tests/scheduler_tool_test.py +0 -0
  99. {microcoreos-0.4.5 → microcoreos-0.4.6}/hatch_build.py +0 -0
  100. {microcoreos-0.4.5 → microcoreos-0.4.6}/main.py +0 -0
  101. {microcoreos-0.4.5 → microcoreos-0.4.6}/microcoreos/__init__.py +0 -0
  102. {microcoreos-0.4.5 → microcoreos-0.4.6}/microcoreos/base_plugin.py +0 -0
  103. {microcoreos-0.4.5 → microcoreos-0.4.6}/microcoreos/base_tool.py +0 -0
  104. {microcoreos-0.4.5 → microcoreos-0.4.6}/microcoreos/context.py +0 -0
  105. {microcoreos-0.4.5 → microcoreos-0.4.6}/microcoreos/kernel.py +0 -0
  106. {microcoreos-0.4.5 → microcoreos-0.4.6}/microcoreos/project.py +0 -0
  107. {microcoreos-0.4.5 → microcoreos-0.4.6}/microcoreos/registry.py +0 -0
  108. {microcoreos-0.4.5 → microcoreos-0.4.6}/microcoreos/scaffold.py +0 -0
  109. {microcoreos-0.4.5 → microcoreos-0.4.6}/microcoreos/upgrade.py +0 -0
  110. {microcoreos-0.4.5 → microcoreos-0.4.6}/microcoreos_dev/__init__.py +0 -0
  111. {microcoreos-0.4.5 → microcoreos-0.4.6}/microcoreos_dev/cli.py +0 -0
  112. {microcoreos-0.4.5 → microcoreos-0.4.6}/microcoreos_dev/fuzzer.py +0 -0
  113. {microcoreos-0.4.5 → microcoreos-0.4.6}/microcoreos_dev/lint/__init__.py +0 -0
  114. {microcoreos-0.4.5 → microcoreos-0.4.6}/microcoreos_dev/lint/checkers/__init__.py +0 -0
  115. {microcoreos-0.4.5 → microcoreos-0.4.6}/microcoreos_dev/lint/checkers/divergence.py +0 -0
  116. {microcoreos-0.4.5 → microcoreos-0.4.6}/microcoreos_dev/lint/checkers/doc_drift.py +0 -0
  117. {microcoreos-0.4.5 → microcoreos-0.4.6}/microcoreos_dev/lint/checkers/events.py +0 -0
  118. {microcoreos-0.4.5 → microcoreos-0.4.6}/microcoreos_dev/lint/checkers/isolation.py +0 -0
  119. {microcoreos-0.4.5 → microcoreos-0.4.6}/microcoreos_dev/lint/checkers/routes.py +0 -0
  120. {microcoreos-0.4.5 → microcoreos-0.4.6}/microcoreos_dev/lint/checkers/tables.py +0 -0
  121. {microcoreos-0.4.5 → microcoreos-0.4.6}/microcoreos_dev/lint/report.py +0 -0
  122. {microcoreos-0.4.5 → microcoreos-0.4.6}/microcoreos_dev/lint/runner.py +0 -0
  123. {microcoreos-0.4.5 → microcoreos-0.4.6}/microcoreos_dev/lint/schema.py +0 -0
  124. {microcoreos-0.4.5 → microcoreos-0.4.6}/microcoreos_dev/pipeline.py +0 -0
  125. {microcoreos-0.4.5 → microcoreos-0.4.6}/microcoreos_dev/plan/__init__.py +0 -0
  126. {microcoreos-0.4.5 → microcoreos-0.4.6}/microcoreos_dev/plan/rules.py +0 -0
  127. {microcoreos-0.4.5 → microcoreos-0.4.6}/microcoreos_dev/plan/scan.py +0 -0
  128. {microcoreos-0.4.5 → microcoreos-0.4.6}/microcoreos_dev/plan/schema.py +0 -0
  129. {microcoreos-0.4.5 → microcoreos-0.4.6}/microcoreos_dev/plan/sync.py +0 -0
  130. {microcoreos-0.4.5 → microcoreos-0.4.6}/microcoreos_dev/probe.py +0 -0
  131. {microcoreos-0.4.5 → microcoreos-0.4.6}/plans/README.md +0 -0
  132. {microcoreos-0.4.5 → microcoreos-0.4.6}/plans/active_plan.md +0 -0
  133. {microcoreos-0.4.5 → microcoreos-0.4.6}/plans/active_plan.yaml +0 -0
  134. {microcoreos-0.4.5 → microcoreos-0.4.6}/tests/core/test_core.py +0 -0
  135. {microcoreos-0.4.5 → microcoreos-0.4.6}/tests/core/test_kernel.py +0 -0
  136. {microcoreos-0.4.5 → microcoreos-0.4.6}/tests/core/test_no_retry.py +0 -0
  137. {microcoreos-0.4.5 → microcoreos-0.4.6}/tests/core/test_plugin_di_fixtures.py +0 -0
  138. {microcoreos-0.4.5 → microcoreos-0.4.6}/tests/core/test_registry_collisions.py +0 -0
  139. {microcoreos-0.4.5 → microcoreos-0.4.6}/tests/dev/corpus/README.md +0 -0
  140. {microcoreos-0.4.5 → microcoreos-0.4.6}/tests/dev/corpus/qwen_twitter_plan.yaml +0 -0
  141. {microcoreos-0.4.5 → microcoreos-0.4.6}/tests/dev/test_lint_runner.py +0 -0
  142. {microcoreos-0.4.5 → microcoreos-0.4.6}/tests/dev/test_pipeline.py +0 -0
  143. {microcoreos-0.4.5 → microcoreos-0.4.6}/tests/dev/test_plan_validator.py +0 -0
  144. {microcoreos-0.4.5 → microcoreos-0.4.6}/tests/domains/ping/test_ping_plugin.py +0 -0
  145. {microcoreos-0.4.5 → microcoreos-0.4.6}/tests/domains/users/test_create_user_plugin.py +0 -0
  146. {microcoreos-0.4.5 → microcoreos-0.4.6}/tests/domains/users/test_delete_user_plugin.py +0 -0
  147. {microcoreos-0.4.5 → microcoreos-0.4.6}/tests/domains/users/test_get_me_plugin.py +0 -0
  148. {microcoreos-0.4.5 → microcoreos-0.4.6}/tests/domains/users/test_get_user_by_id_plugin.py +0 -0
  149. {microcoreos-0.4.5 → microcoreos-0.4.6}/tests/domains/users/test_get_users_plugin.py +0 -0
  150. {microcoreos-0.4.5 → microcoreos-0.4.6}/tests/domains/users/test_login_plugin.py +0 -0
  151. {microcoreos-0.4.5 → microcoreos-0.4.6}/tests/domains/users/test_logout_plugin.py +0 -0
  152. {microcoreos-0.4.5 → microcoreos-0.4.6}/tests/domains/users/test_update_user_plugin.py +0 -0
  153. {microcoreos-0.4.5 → microcoreos-0.4.6}/tests/domains/users/test_welcome_service_plugin.py +0 -0
  154. {microcoreos-0.4.5 → microcoreos-0.4.6}/tests/helpers/active_db.py +0 -0
  155. {microcoreos-0.4.5 → microcoreos-0.4.6}/tests/helpers/async_wait.py +0 -0
  156. {microcoreos-0.4.5 → microcoreos-0.4.6}/tests/helpers/mock_db.py +0 -0
  157. {microcoreos-0.4.5 → microcoreos-0.4.6}/tests/helpers/trace_chains.py +0 -0
  158. {microcoreos-0.4.5 → microcoreos-0.4.6}/tests/linters/test_domain_isolation_linter.py +0 -0
  159. {microcoreos-0.4.5 → microcoreos-0.4.6}/tests/linters/test_event_contract_linter.py +0 -0
  160. {microcoreos-0.4.5 → microcoreos-0.4.6}/tests/linters/test_field_divergence_linter.py +0 -0
  161. {microcoreos-0.4.5 → microcoreos-0.4.6}/tests/linters/test_route_collision_linter.py +0 -0
  162. {microcoreos-0.4.5 → microcoreos-0.4.6}/tests/linters/test_system_lint_plugin.py +0 -0
  163. {microcoreos-0.4.5 → microcoreos-0.4.6}/tests/linters/test_table_ownership_linter.py +0 -0
  164. {microcoreos-0.4.5 → microcoreos-0.4.6}/tests/linters/test_tool_doc_drift_linter.py +0 -0
  165. {microcoreos-0.4.5 → microcoreos-0.4.6}/tests/system/test_catalog.py +0 -0
  166. {microcoreos-0.4.5 → microcoreos-0.4.6}/tests/system/test_chaos_control.py +0 -0
  167. {microcoreos-0.4.5 → microcoreos-0.4.6}/tests/system/test_chaos_tool.py +0 -0
  168. {microcoreos-0.4.5 → microcoreos-0.4.6}/tests/system/test_cli.py +0 -0
  169. {microcoreos-0.4.5 → microcoreos-0.4.6}/tests/system/test_durable_one_shots.py +0 -0
  170. {microcoreos-0.4.5 → microcoreos-0.4.6}/tests/system/test_event_schemas_plugin.py +0 -0
  171. {microcoreos-0.4.5 → microcoreos-0.4.6}/tests/system/test_scaffold.py +0 -0
  172. {microcoreos-0.4.5 → microcoreos-0.4.6}/tests/system/test_system_events_stats.py +0 -0
  173. {microcoreos-0.4.5 → microcoreos-0.4.6}/tests/system/test_trace_chain_helper.py +0 -0
  174. {microcoreos-0.4.5 → microcoreos-0.4.6}/tests/system/test_upgrade.py +0 -0
  175. {microcoreos-0.4.5 → microcoreos-0.4.6}/tests/tools/config/test_config_tool.py +0 -0
  176. {microcoreos-0.4.5 → microcoreos-0.4.6}/tests/tools/context/test_context_tool.py +0 -0
  177. {microcoreos-0.4.5 → microcoreos-0.4.6}/tests/tools/context/test_tool_signatures.py +0 -0
  178. {microcoreos-0.4.5 → microcoreos-0.4.6}/tests/tools/db/test_db_parity.py +0 -0
  179. {microcoreos-0.4.5 → microcoreos-0.4.6}/tests/tools/event_bus/test_event_bus_broker_parity.py +0 -0
  180. {microcoreos-0.4.5 → microcoreos-0.4.6}/tests/tools/event_bus/test_event_bus_groups.py +0 -0
  181. {microcoreos-0.4.5 → microcoreos-0.4.6}/tests/tools/event_bus/test_event_bus_kafka_parity.py +0 -0
  182. {microcoreos-0.4.5 → microcoreos-0.4.6}/tests/tools/event_bus/test_event_bus_rabbitmq_parity.py +0 -0
  183. {microcoreos-0.4.5 → microcoreos-0.4.6}/tests/tools/event_bus/test_event_bus_tool.py +0 -0
  184. {microcoreos-0.4.5 → microcoreos-0.4.6}/tests/tools/event_bus/test_redis_streams_driver.py +0 -0
  185. {microcoreos-0.4.5 → microcoreos-0.4.6}/tests/tools/http_server/test_http_params_hardening.py +0 -0
  186. {microcoreos-0.4.5 → microcoreos-0.4.6}/tests/tools/http_server/test_http_pipeline.py +0 -0
  187. {microcoreos-0.4.5 → microcoreos-0.4.6}/tests/tools/http_server/test_http_server_tool.py +0 -0
  188. {microcoreos-0.4.5 → microcoreos-0.4.6}/tests/tools/http_server/test_security_hardening.py +0 -0
  189. {microcoreos-0.4.5 → microcoreos-0.4.6}/tests/tools/http_server/test_trusted_proxies_and_ws_origin.py +0 -0
  190. {microcoreos-0.4.5 → microcoreos-0.4.6}/tests/tools/logger/test_logger_tool.py +0 -0
  191. {microcoreos-0.4.5 → microcoreos-0.4.6}/tests/tools/registry/test_registry_tool.py +0 -0
  192. {microcoreos-0.4.5 → microcoreos-0.4.6}/tests/tools/s3/test_s3_parity.py +0 -0
  193. {microcoreos-0.4.5 → microcoreos-0.4.6}/tests/tools/sqlite/test_sqlite_concurrency.py +0 -0
  194. {microcoreos-0.4.5 → microcoreos-0.4.6}/tests/tools/sqlite/test_sqlite_describe_schema.py +0 -0
  195. {microcoreos-0.4.5 → microcoreos-0.4.6}/tests/tools/sqlite/test_sqlite_driver.py +0 -0
  196. {microcoreos-0.4.5 → microcoreos-0.4.6}/tests/tools/sqlite/test_sqlite_migrations.py +0 -0
  197. {microcoreos-0.4.5 → microcoreos-0.4.6}/tests/tools/sqlite/test_sqlite_tool.py +0 -0
  198. {microcoreos-0.4.5 → microcoreos-0.4.6}/tests/tools/state/test_state_parity.py +0 -0
  199. {microcoreos-0.4.5 → microcoreos-0.4.6}/tests/tools/state/test_state_tool.py +0 -0
  200. {microcoreos-0.4.5 → microcoreos-0.4.6}/tests/tools/telemetry/test_telemetry_tool.py +0 -0
  201. {microcoreos-0.4.5 → microcoreos-0.4.6}/tests/tools/test_tool_setup_cleanup.py +0 -0
  202. {microcoreos-0.4.5 → microcoreos-0.4.6}/tools/config/config_tool.py +0 -0
  203. {microcoreos-0.4.5 → microcoreos-0.4.6}/tools/context/authoring_guide.md +0 -0
  204. {microcoreos-0.4.5 → microcoreos-0.4.6}/tools/context/context_tool.py +0 -0
  205. {microcoreos-0.4.5 → microcoreos-0.4.6}/tools/context/renderers.py +0 -0
  206. {microcoreos-0.4.5 → microcoreos-0.4.6}/tools/context/scanners.py +0 -0
  207. {microcoreos-0.4.5 → microcoreos-0.4.6}/tools/event_bus/drivers.py +0 -0
  208. {microcoreos-0.4.5 → microcoreos-0.4.6}/tools/event_bus/envelope.py +0 -0
  209. {microcoreos-0.4.5 → microcoreos-0.4.6}/tools/event_bus/event_bus_tool.py +0 -0
  210. {microcoreos-0.4.5 → microcoreos-0.4.6}/tools/event_bus/redis_streams_driver.py +0 -0
  211. {microcoreos-0.4.5 → microcoreos-0.4.6}/tools/event_bus/sqlite_driver.py +0 -0
  212. {microcoreos-0.4.5 → microcoreos-0.4.6}/tools/http_server/context.py +0 -0
  213. {microcoreos-0.4.5 → microcoreos-0.4.6}/tools/http_server/http_server_tool.py +0 -0
  214. {microcoreos-0.4.5 → microcoreos-0.4.6}/tools/http_server/pipeline.py +0 -0
  215. {microcoreos-0.4.5 → microcoreos-0.4.6}/tools/http_server/types.py +0 -0
  216. {microcoreos-0.4.5 → microcoreos-0.4.6}/tools/logger/logger_tool.py +0 -0
  217. {microcoreos-0.4.5 → microcoreos-0.4.6}/tools/sqlite/errors.py +0 -0
  218. {microcoreos-0.4.5 → microcoreos-0.4.6}/tools/sqlite/migrations.py +0 -0
  219. {microcoreos-0.4.5 → microcoreos-0.4.6}/tools/sqlite/sqlite_tool.py +0 -0
  220. {microcoreos-0.4.5 → microcoreos-0.4.6}/tools/sqlite/transaction.py +0 -0
  221. {microcoreos-0.4.5 → microcoreos-0.4.6}/tools/state/state_tool.py +0 -0
  222. {microcoreos-0.4.5 → microcoreos-0.4.6}/tools/telemetry/__init__.py +0 -0
  223. {microcoreos-0.4.5 → microcoreos-0.4.6}/tools/telemetry/telemetry_tool.py +0 -0
@@ -15,6 +15,95 @@ For plugin development guides, critical rules, and syntax examples, see [AGENTS.
15
15
  ## 🛠️ Available Tools
16
16
  Check method signatures before implementation.
17
17
 
18
+ ### 🔧 Tool: `config` (Status: ✅)
19
+
20
+ **Public Signatures:**
21
+ ```python
22
+ def get(key: str, default: Optional[str] = None, required: bool = False) -> Optional[str]
23
+ def require(*keys: str) -> None
24
+ ```
25
+
26
+ ```text
27
+ Configuration Tool (config):
28
+ - PURPOSE: Validated access to environment variables for plugins.
29
+ Tools read their own env vars with os.getenv() — this tool is for plugins.
30
+ - CAPABILITIES:
31
+ - get(key, default=None, required=False) -> str | None:
32
+ Returns the value of the environment variable.
33
+ If required=True and the variable is not set, raises EnvironmentError.
34
+ - require(*keys) -> None:
35
+ Validates that all specified variables are set.
36
+ Call in on_boot() to fail early with a clear error message.
37
+ Example: self.config.require("STRIPE_KEY", "SENDGRID_KEY")
38
+ ```
39
+
40
+ ### 🔧 Tool: `event_bus` (Status: ✅)
41
+
42
+ **Public Signatures:**
43
+ ```python
44
+ def add_failure_listener(cb)
45
+ def add_listener(cb)
46
+ def get_subscribers() -> dict
47
+ def get_trace_history() -> List[tools.event_bus.envelope.TraceNode]
48
+ async def publish(event_name: str, data: dict, **kwargs)
49
+ async def request(event_name: str, data: dict, timeout: float = 5)
50
+ async def subscribe(event_name: str, callback: Callable, group: Optional[str] = None, retries: int = 0, backoff: float = 0.5, broadcast: bool = False)
51
+ async def unsubscribe(event_name: str, callback: Callable)
52
+ ```
53
+
54
+ ```text
55
+ Universal Event Bus (event_bus):
56
+ - publish(event_name, data, **kwargs): Broadcast an event.
57
+ - subscribe(event_name, callback, group=None, retries=0, backoff=0.5, broadcast=False):
58
+ Listen for events. group=None derives a STABLE group from the callback identity:
59
+ replicas of the same plugin consume each event exactly once across the fleet,
60
+ while distinct plugins each get their own copy. Use group="pool" for explicit
61
+ worker pools, broadcast=True ONLY for instance-local concerns (every replica
62
+ receives a copy — e.g. local cache invalidation).
63
+ - request(event_name, data, timeout=5): Async RPC (returns dict).
64
+ - unsubscribe(event_name, callback): Stop listening.
65
+ - get_trace_history() -> List[TraceNode]: Last 500 event records.
66
+ - get_subscribers() -> dict: Current subscriber map.
67
+ - add_listener(callback): Sink for all events (record: dict).
68
+ - add_failure_listener(callback): Sink for errors (record: dict).
69
+
70
+ CRITICAL: Subscribing callbacks receive the event envelope as their single
71
+ argument — read event.payload. Leave the parameter untyped (no annotation,
72
+ no import needed): async def on_event(self, event): print(event.payload)
73
+
74
+ RETRIES & IDEMPOTENCY:
75
+ - If 'retries' > 0, the handler will be re-executed on failure with exponential backoff.
76
+ - Ensure handlers are idempotent as they may run multiple times.
77
+
78
+ DEAD-LETTER QUEUE (DLQ):
79
+ - Final failures are published to '_dlq.<original_event>'.
80
+ - Payload includes 'original' envelope, 'subscriber', 'error', and 'attempts'.
81
+ - Loop protection: '_dlq.*' and '_reply.*' events are never dead-lettered.
82
+ - Toggle via EVENT_BUS_DLQ_ENABLED (default: true).
83
+
84
+ UNIVERSAL CAPABILITIES (kwargs):
85
+ - key: String. Strict ordering PER KEY. Without a key, do NOT assume
86
+ cross-event ordering: it varies by transport (total in-process,
87
+ partition-dependent on Kafka).
88
+ - priority: Integer (1-10). Importance (RabbitMQ).
89
+ - delay: Integer (seconds). Delivery schedule. Crash-safe only when
90
+ the active transport claims delay=native (see ACTIVE TRANSPORT).
91
+ - ttl: Float (seconds). Message expiration hint. Counted from PUBLISH
92
+ time and therefore INCLUDES any delay (delay=60 + ttl=30 expires
93
+ before it can ever be delivered).
94
+ - correlation_id: String. Cross-reference for RPC.
95
+
96
+ RESILIENCE:
97
+ - A subscriber that reaches 5 consecutive FINAL failures for a specific event is auto-unsubscribed.
98
+ - Each auto-unsubscribe publishes 'system.subscriber.dropped'
99
+ (payload: event, subscriber, error, consecutive_failures) so the drop
100
+ is observable — subscribe to it for alerting/monitoring.
101
+
102
+ ACTIVE TRANSPORT: InProcessDriver — capability claims: {'delay': 'in_bus', 'retries': 'in_bus', 'dlq': 'in_bus'}
103
+ ("native" = the broker implements it, crash-safe; "in_bus" = software
104
+ fallback in this process' memory).
105
+ ```
106
+
18
107
  ### 🔧 Tool: `http` (Status: ✅)
19
108
 
20
109
  **Public Signatures:**
@@ -94,28 +183,6 @@ HTTP Server Tool (http):
94
183
  instances are NOT serializable — always call .model_dump() before returning.
95
184
  ```
96
185
 
97
- ### 🔧 Tool: `config` (Status: ✅)
98
-
99
- **Public Signatures:**
100
- ```python
101
- def get(key: str, default: Optional[str] = None, required: bool = False) -> Optional[str]
102
- def require(*keys: str) -> None
103
- ```
104
-
105
- ```text
106
- Configuration Tool (config):
107
- - PURPOSE: Validated access to environment variables for plugins.
108
- Tools read their own env vars with os.getenv() — this tool is for plugins.
109
- - CAPABILITIES:
110
- - get(key, default=None, required=False) -> str | None:
111
- Returns the value of the environment variable.
112
- If required=True and the variable is not set, raises EnvironmentError.
113
- - require(*keys) -> None:
114
- Validates that all specified variables are set.
115
- Call in on_boot() to fail early with a clear error message.
116
- Example: self.config.require("STRIPE_KEY", "SENDGRID_KEY")
117
- ```
118
-
119
186
  ### 🔧 Tool: `telemetry` (Status: ✅)
120
187
 
121
188
  **Public Signatures:**
@@ -158,73 +225,6 @@ Telemetry Tool (telemetry):
158
225
  uv add opentelemetry-sdk opentelemetry-exporter-otlp
159
226
  ```
160
227
 
161
- ### 🔧 Tool: `event_bus` (Status: ✅)
162
-
163
- **Public Signatures:**
164
- ```python
165
- def add_failure_listener(cb)
166
- def add_listener(cb)
167
- def get_subscribers() -> dict
168
- def get_trace_history() -> List[tools.event_bus.envelope.TraceNode]
169
- async def publish(event_name: str, data: dict, **kwargs)
170
- async def request(event_name: str, data: dict, timeout: float = 5)
171
- async def subscribe(event_name: str, callback: Callable, group: Optional[str] = None, retries: int = 0, backoff: float = 0.5, broadcast: bool = False)
172
- async def unsubscribe(event_name: str, callback: Callable)
173
- ```
174
-
175
- ```text
176
- Universal Event Bus (event_bus):
177
- - publish(event_name, data, **kwargs): Broadcast an event.
178
- - subscribe(event_name, callback, group=None, retries=0, backoff=0.5, broadcast=False):
179
- Listen for events. group=None derives a STABLE group from the callback identity:
180
- replicas of the same plugin consume each event exactly once across the fleet,
181
- while distinct plugins each get their own copy. Use group="pool" for explicit
182
- worker pools, broadcast=True ONLY for instance-local concerns (every replica
183
- receives a copy — e.g. local cache invalidation).
184
- - request(event_name, data, timeout=5): Async RPC (returns dict).
185
- - unsubscribe(event_name, callback): Stop listening.
186
- - get_trace_history() -> List[TraceNode]: Last 500 event records.
187
- - get_subscribers() -> dict: Current subscriber map.
188
- - add_listener(callback): Sink for all events (record: dict).
189
- - add_failure_listener(callback): Sink for errors (record: dict).
190
-
191
- CRITICAL: Subscribing callbacks receive the event envelope as their single
192
- argument — read event.payload. Leave the parameter untyped (no annotation,
193
- no import needed): async def on_event(self, event): print(event.payload)
194
-
195
- RETRIES & IDEMPOTENCY:
196
- - If 'retries' > 0, the handler will be re-executed on failure with exponential backoff.
197
- - Ensure handlers are idempotent as they may run multiple times.
198
-
199
- DEAD-LETTER QUEUE (DLQ):
200
- - Final failures are published to '_dlq.<original_event>'.
201
- - Payload includes 'original' envelope, 'subscriber', 'error', and 'attempts'.
202
- - Loop protection: '_dlq.*' and '_reply.*' events are never dead-lettered.
203
- - Toggle via EVENT_BUS_DLQ_ENABLED (default: true).
204
-
205
- UNIVERSAL CAPABILITIES (kwargs):
206
- - key: String. Strict ordering PER KEY. Without a key, do NOT assume
207
- cross-event ordering: it varies by transport (total in-process,
208
- partition-dependent on Kafka).
209
- - priority: Integer (1-10). Importance (RabbitMQ).
210
- - delay: Integer (seconds). Delivery schedule. Crash-safe only when
211
- the active transport claims delay=native (see ACTIVE TRANSPORT).
212
- - ttl: Float (seconds). Message expiration hint. Counted from PUBLISH
213
- time and therefore INCLUDES any delay (delay=60 + ttl=30 expires
214
- before it can ever be delivered).
215
- - correlation_id: String. Cross-reference for RPC.
216
-
217
- RESILIENCE:
218
- - A subscriber that reaches 5 consecutive FINAL failures for a specific event is auto-unsubscribed.
219
- - Each auto-unsubscribe publishes 'system.subscriber.dropped'
220
- (payload: event, subscriber, error, consecutive_failures) so the drop
221
- is observable — subscribe to it for alerting/monitoring.
222
-
223
- ACTIVE TRANSPORT: InProcessDriver — capability claims: {'delay': 'in_bus', 'retries': 'in_bus', 'dlq': 'in_bus'}
224
- ("native" = the broker implements it, crash-safe; "in_bus" = software
225
- fallback in this process' memory).
226
- ```
227
-
228
228
  ### 🔧 Tool: `context_manager` (Status: ✅)
229
229
  ```text
230
230
  Context Manager Tool (context_manager):
@@ -333,7 +333,7 @@ Systems Registry Tool (registry):
333
333
  A tool that silently stopped responding may still show "OK".
334
334
  - get_domain_metadata() -> dict: Detailed analysis of models and schemas.
335
335
  - get_metrics() -> list[dict]: Last 1000 tool call records.
336
- Each record: {tool, method, duration_ms, success, timestamp}.
336
+ Each record: {caller, event_id, tool, method, duration_ms, success, error, timestamp}.
337
337
  Use to build /system/metrics or feed into an observability sink.
338
338
  - add_metrics_sink(callback): Register a sink for real-time metric records.
339
339
  Signature: callback(record: dict).
@@ -421,13 +421,13 @@ Async SQLite Persistence Tool (sqlite):
421
421
  - `GET /system/events/schemas`
422
422
  - **res**: EventSchemasData(schemas: dict)
423
423
  - `GET /system/metrics`
424
- - **res**: list[MetricRecord(tool: str, method: str, duration_ms: float, success: bool, timestamp: float)]
424
+ - **res**: list[MetricRecord(caller: str, event_id: Optional[str], tool: str, method: str, duration_ms: float, success: bool, error: Optional[str], timestamp: float)]
425
425
  - `GET /system/status`
426
426
  - **res**: SystemStatusData(tools: list[ToolStatus(name: str, status: str, message: Optional[str])], plugins: list[PluginStatus(name: str, domain: Optional[str], status: str, error: Optional[str], tools: list[str])])
427
427
  - `GET /system/traces/flat`
428
- - **res**: list[TraceFlatNode(id: str, parent_id: Optional[str], event: str, emitter: str, subscribers: list[str], payload_keys: list[str], timestamp: float, key: Optional[str], priority: Optional[int], delay: Optional[int])]
428
+ - **res**: list[TraceFlatNode(id: str, parent_id: Optional[str], event: str, emitter: str, subscribers: list[str], payload_keys: list[str], timestamp: float, key: Optional[str], priority: Optional[int], delay: Optional[int], tool_calls: list[TraceToolCall])]
429
429
  - `GET /system/traces/tree`
430
- - **res**: list[TraceNode(id: str, parent_id: Optional[str], event: str, emitter: str, subscribers: list[str], payload_keys: list[str], timestamp: float, key: Optional[str], priority: Optional[int], delay: Optional[int], children: list['TraceNode'])]
430
+ - **res**: list[TraceNode(id: str, parent_id: Optional[str], event: str, emitter: str, subscribers: list[str], payload_keys: list[str], timestamp: float, key: Optional[str], priority: Optional[int], delay: Optional[int], tool_calls: list[TraceToolCall], children: list['TraceNode'])]
431
431
  - `SSE /system/events/stream`
432
432
  - `SSE /system/logs/stream`
433
433
  - `SSE /system/metrics/stream`
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.5
2
2
  Name: microcoreos
3
- Version: 0.4.5
3
+ Version: 0.4.6
4
4
  Summary: Atomic Microkernel Architecture optimized for AI-Driven Development
5
5
  License: MIT
6
6
  License-File: LICENSE
@@ -117,6 +117,25 @@ uv run microcoreos add auth
117
117
  `uv run microcoreos add` with no argument lists them too. Each one writes its
118
118
  own `.env` keys and never overwrites a value you already set.
119
119
 
120
+ External extras use a separate two-step flow. Install from a local directory or
121
+ Git URL first; this stages the declared source without activating it or changing
122
+ dependencies. Then enable it from the project root:
123
+
124
+ ```bash
125
+ uv run microcoreos extra install https://github.com/acme/microcoreos-mail.git --ref v1.2.0
126
+ uv run microcoreos extra enable mail
127
+ uv run microcoreos extra list
128
+ ```
129
+
130
+ The repository must contain a `microcoreos-extra.toml` manifest. It declares a
131
+ `name`, optional `python_dependencies`, optional `[environment]` defaults, and
132
+ one or more `[[components]]` entries with `kind` (`tool`, `domain`, or `driver`),
133
+ relative `source`, and active `target`. Install copies components into
134
+ `extras/installed/<name>/` and records the resolved Git commit. Enable adds
135
+ dependencies with `uv` unless `--no-install` is passed, appends missing `.env`
136
+ defaults, and copies components to the Kernel's active directories. The staged
137
+ source remains intact; existing active destinations are never overwritten.
138
+
120
139
  Use that rather than `uv add 'microcoreos[auth]'`. The extra is only the **dependency** — installing it alone leaves the source in `extras/`, where nothing discovers it, and the boot looks perfectly fine with the feature simply absent. `microcoreos add` does all three parts: the dependency, the source, and the `.env` keys.
121
140
 
122
141
  ### Development & AI Pipeline Commands
@@ -76,6 +76,25 @@ uv run microcoreos add auth
76
76
  `uv run microcoreos add` with no argument lists them too. Each one writes its
77
77
  own `.env` keys and never overwrites a value you already set.
78
78
 
79
+ External extras use a separate two-step flow. Install from a local directory or
80
+ Git URL first; this stages the declared source without activating it or changing
81
+ dependencies. Then enable it from the project root:
82
+
83
+ ```bash
84
+ uv run microcoreos extra install https://github.com/acme/microcoreos-mail.git --ref v1.2.0
85
+ uv run microcoreos extra enable mail
86
+ uv run microcoreos extra list
87
+ ```
88
+
89
+ The repository must contain a `microcoreos-extra.toml` manifest. It declares a
90
+ `name`, optional `python_dependencies`, optional `[environment]` defaults, and
91
+ one or more `[[components]]` entries with `kind` (`tool`, `domain`, or `driver`),
92
+ relative `source`, and active `target`. Install copies components into
93
+ `extras/installed/<name>/` and records the resolved Git commit. Enable adds
94
+ dependencies with `uv` unless `--no-install` is passed, appends missing `.env`
95
+ defaults, and copies components to the Kernel's active directories. The staged
96
+ source remains intact; existing active destinations are never overwritten.
97
+
79
98
  Use that rather than `uv add 'microcoreos[auth]'`. The extra is only the **dependency** — installing it alone leaves the source in `extras/`, where nothing discovers it, and the boot looks perfectly fine with the feature simply absent. `microcoreos add` does all three parts: the dependency, the source, and the `.env` keys.
80
99
 
81
100
  ### Development & AI Pipeline Commands
@@ -13,10 +13,10 @@
13
13
 
14
14
  | Area | Status / next work |
15
15
  |---|---|
16
- | Core lifecycle | Issue 49 shipped (see ROADMAP_DONE.md) |
17
- | Harness/devtools | Optional event types 47; unified check report 53, import gap 46 & signatures 50 shipped (see ROADMAP_DONE.md); remaining scopes 14/37/38 |
18
- | HTTP tool | Issues 48 & 51 shipped (see ROADMAP_DONE.md) |
19
- | Distribution | Packaged tools 44, demo 43, test distribution 42 (partial), marketplace 40 (deferred) |
16
+ | Core lifecycle | Issues 49 & 56 shipped (see ROADMAP_DONE.md) |
17
+ | Harness/devtools | Automatic checklist verification 57; optional event types 47; unified check report 53, import gap 46 & signatures 50 shipped (see ROADMAP_DONE.md); remaining scopes 14/37/38 |
18
+ | HTTP tool | Issues 48 & 51 shipped (see ROADMAP_DONE.md); validation and exception data minimization proposed in 55 |
19
+ | Distribution | Packaged tools 44, demo 43, test distribution 42 (partial), marketplace 40 (partial: external extras shipped in PR #14) |
20
20
  | Event infrastructure | TLS/auth 45; ACL 16 and runtime contracts 23 still unimplemented; Context isolation & explicit emitter 54 |
21
21
  | Integrity | Outbox 28 requires a confirmed transport handoff first |
22
22
  | Exploratory | Starlette 10, event locality 24, driver optimizations 36, payload encryption 52 |
@@ -60,6 +60,28 @@ remain explicitly unverifiable. This is independent of Issue 23's runtime guard.
60
60
 
61
61
  ---
62
62
 
63
+ **Issue 56 — ✅ Unified causal observability: `caller`, `event_id` and `error` on tool metrics & trace nodes (shipped; see [ROADMAP_DONE.md](ROADMAP_DONE.md))**
64
+
65
+ ---
66
+
67
+ **Issue 57 — 🟡 Automatic checklist verification & interrupted-wave recovery (`plan sync` / `status`)**
68
+
69
+ Today `plans/active_plan.md` is generated with unchecked `- [ ]` boxes and relies on the coordinator agent manually editing the markdown file as tasks finish. If an agent session runs out of tokens or the machine loses power mid-wave (after several write-only executors have already written their files on disk), `active_plan.md` remains stale and does not reflect what was actually completed or left half-written.
70
+
71
+ **Design & scope:**
72
+
73
+ 1. **Deterministic on-disk & test verification in `plan sync` / `status`:**
74
+ - **Phase 0 tasks (`migrations`, `models`, `tools`, `microcoreos migrate`)**: automatically mark `- [x]` when the declared files exist on disk, declared tables are present in the live schema, and `AI_CONTEXT.md` is fresher than the migrations.
75
+ - **Phase 2 feature tasks (`file` + `test`)**:
76
+ - Neither file exists → `- [ ]` (Pending).
77
+ - Only one file exists, or `probe` / `pytest` fails on the pair → `- [ ]` flagged as `INCOMPLETE / BROKEN (delete and respawn executor)`. Because plugins are disposable black-box blocks written from a frozen prefix (`AI_CONTEXT.md` + `plans/active_plan.yaml`), interrupted or broken blocks are never patched line-by-line; they are deleted and regenerated from scratch.
78
+ - Both files exist, pass `plan probe` against the active plan contract, and pass their unit test → automatically mark `- [x]`.
79
+ - **Phase 3 flow tasks (`e2e_test`, `sad_path_test`, `idempotency_test`)**: automatically mark `- [x]` when the declared test exists and passes `pytest`.
80
+ 2. **Pre-wave clean for modified features:**
81
+ - When a plan modifies an existing feature whose file already exists on disk from an earlier plan, pre-wave sync treats unverified targets as disposable replacements (overwritten from scratch by the write-only executor rather than read and patched, preserving the byte-identical prompt cache prefix across the wave).
82
+
83
+ ---
84
+
63
85
  **Issue 37 — 🟡 Remaining scopes only (scope 2 shipped)**
64
86
 
65
87
  Within-domain field-constraint comparison and reasoned waivers are complete;
@@ -505,13 +527,41 @@ longer exists.
505
527
 
506
528
  ---
507
529
 
530
+ **Issue 55 — 🟡 HTTP validation and exception data minimization (proposed)**
531
+
532
+ Issue 11 standardized the 422 envelope; it did not address sensitive data.
533
+ `HttpServerTool.setup()` currently returns `RequestValidationError.errors()`
534
+ including rejected `input` and potentially `ctx` and custom messages. Returning
535
+ input to the client that submitted it is not by itself proof of a vulnerability,
536
+ although responses may also reach logs, intermediaries or monitoring systems.
537
+ `pipeline.py` and the WebSocket handler also print unhandled exception text,
538
+ which can contain secrets or personal data from dependencies.
539
+
540
+ Define and test a safe 422 contract that preserves useful field locations and
541
+ controlled validation messages without echoing input, arbitrary validator text
542
+ or context. Consider dynamic dictionary keys in locations as potentially
543
+ sensitive too. Maintain the standard envelope; document compatibility and
544
+ migration for clients relying on existing `error`/`details` fields. Separately
545
+ choose a diagnostic policy for HTTP and WebSocket exceptions that avoids raw
546
+ secret-bearing messages while retaining useful correlation and operational
547
+ visibility; do not assume an internal log sink is safe by default.
548
+
549
+ Acceptance: HTTP tests with password/token inputs and custom validator errors,
550
+ including nested and dynamic keys, show no secrets in response or logs; tests
551
+ cover HTTP and WebSocket exception paths, preserve intended status codes and
552
+ safe validation information, and exercise existing clients/contracts. Review
553
+ scaffolded copies and documentation. Do not claim this eliminates leaks from
554
+ application plugins, external middleware or all logging sinks.
555
+
556
+ ---
557
+
508
558
  **Issue 10 — 🔬 Migrate HttpServerTool from FastAPI to pure Starlette (exploratory)**
509
559
 
510
560
  FastAPI is already a thin wrapper over Starlette. Most imports in `http_server_tool.py` are Starlette classes re-exported by FastAPI (`Request`, `WebSocket`, `JSONResponse`, `StreamingResponse`, `StaticFiles`, `CORSMiddleware`, `run_in_threadpool`). What is exclusively FastAPI is minimal: the app object, `Depends()` for GET query params, `response_model`/`tags` in `add_api_route`, and the auto-generated docs at `/docs`.
511
561
 
512
562
  ---
513
563
 
514
- **Issue 40 — 🟡 Drop-in marketplace for tools and domains (deferred until one exists)**
564
+ **Issue 40 — 🟡 Drop-in marketplace for tools and domains (PARTIALLY DELIVERED — PR #14)**
515
565
 
516
566
  WordPress plugins land in `wp-content/plugins/`, VS Code extensions in the
517
567
  user's extensions dir — both are "drop a directory in, it is discovered". The
@@ -540,13 +590,14 @@ answer is already executable: `tests/tools/db/test_db_parity.py`,
540
590
  A tool published as `db` must pass the db parity suite. Written for Issue 22,
541
591
  reusable as-is.
542
592
 
543
- **Already delivered:** `microcoreos add` installs the bundled extras through
544
- `microcoreos/catalog.py`; this is not a third-party marketplace client.
545
- **Still missing:** a third-party catalog/manifest (name, version, author,
546
- contract and env settings) and a trust story, since
547
- drop-in code runs at boot with full access — the security history of WordPress
548
- plugins is the cautionary tale. Worth deciding before third parties publish,
549
- not before.
593
+ **Already delivered:**
594
+ - `microcoreos add` installs the bundled extras through `microcoreos/catalog.py`.
595
+ - `microcoreos extra install <source> [--ref REF]`, `microcoreos extra enable <name> [--no-install]`, and `microcoreos extra list` (`microcoreos/external_extras.py`) install external local/Git extras via `microcoreos-extra.toml` in two explicit steps: staging components inactive under `extras/installed/<name>/` (with URL credential redaction, symlink/traversal checks, and commit pinning) before copying to `tools/`, `domains/`, or `tools/event_bus/` without overwriting existing paths or `.env` values.
596
+
597
+ **Still missing / follow-up improvements:**
598
+ - Lifecycle management commands: `extra remove`/`disable` and `extra update`.
599
+ - Resolve the `container.py` silent `tool.name` collision prerequisite above (folder collisions are blocked by `extra enable`, but two distinct folders declaring the same `BaseTool.name` still overwrite silently at boot).
600
+ - Optional third-party catalog index, publisher metadata/signatures, and running parity/check gates automatically post-enable.
550
601
 
551
602
  ---
552
603
 
@@ -917,3 +917,9 @@ mid-handler another replica reclaims via XAUTOCLAIM (idle >
917
917
  an error finding rather than silently reporting empty findings.
918
918
  - Runtime endpoint `GET /system/lint` now includes `discovery_naming_violations` in `SystemLintData`.
919
919
  - Tests: `tests/dev/test_lint_runner.py`, `tests/dev/test_pipeline.py`.
920
+
921
+ **Issue 56 — ✅ Unified causal observability: `caller`, `event_id` and `error` on tool metrics & trace nodes**
922
+ - Shipped. `Container._emit_metric()` and `ToolProxy` now record `caller` (`current_identity_var.get()`), `event_id` (`current_event_id_var.get()`), and `error` (`type(exc).__name__` on failure, `None` on success) on every tool call record in stdlib-only core.
923
+ - `SystemMetricsPlugin` (`GET /system/metrics` and `/system/metrics/stream`) exposes `caller`, `event_id`, and `error` on every `MetricRecord` — covering both plugins that emit events and plugins that do not (e.g. pure HTTP reads where `event_id` carries the HTTP `request_id`, or boot/background calls where `event_id` is `None`).
924
+ - `SystemTracesPlugin` (`GET /system/traces/tree`, `GET /system/traces/flat`) and `SystemTracesStreamPlugin` (`GET /system/traces/stream`) inject `registry` and attach matching `tool_calls` (`TraceToolCall`) to each causal event node.
925
+ - Tests: `tests/core/test_tool_proxy.py`, `tests/system/test_system_traces_plugin.py`.
@@ -8,10 +8,13 @@ from microcoreos import BasePlugin
8
8
  # ── Modelos ───────────────────────────────────────────────────────────────────
9
9
 
10
10
  class MetricRecord(BaseModel):
11
+ caller: str = "system"
12
+ event_id: Optional[str] = None
11
13
  tool: str
12
14
  method: str
13
15
  duration_ms: float
14
16
  success: bool
17
+ error: Optional[str] = None
15
18
  timestamp: float
16
19
 
17
20
  class SystemMetricsResponse(BaseModel):
@@ -28,7 +31,7 @@ class SystemMetricsPlugin(BasePlugin):
28
31
  1. GET /system/metrics — last 1000 records (snapshot).
29
32
  2. GET /system/metrics/stream — SSE stream, one record per tool call.
30
33
 
31
- Each record: {tool, method, duration_ms, success, timestamp}
34
+ Each record: {caller, event_id, tool, method, duration_ms, success, error, timestamp}
32
35
  duration_ms uses time.perf_counter() — microsecond precision.
33
36
  """
34
37
 
@@ -3,6 +3,16 @@ from pydantic import BaseModel
3
3
  from microcoreos import BasePlugin
4
4
 
5
5
 
6
+ class TraceToolCall(BaseModel):
7
+ caller: str = "system"
8
+ tool: str
9
+ method: str
10
+ duration_ms: float
11
+ success: bool
12
+ error: Optional[str] = None
13
+ timestamp: float
14
+
15
+
6
16
  class TraceNode(BaseModel):
7
17
  id: str
8
18
  parent_id: Optional[str] = None
@@ -14,6 +24,7 @@ class TraceNode(BaseModel):
14
24
  key: Optional[str] = None
15
25
  priority: Optional[int] = None
16
26
  delay: Optional[int] = None
27
+ tool_calls: list[TraceToolCall] = []
17
28
  children: list["TraceNode"] = []
18
29
 
19
30
  TraceNode.model_rebuild()
@@ -34,6 +45,7 @@ class TraceFlatNode(BaseModel):
34
45
  key: Optional[str] = None
35
46
  priority: Optional[int] = None
36
47
  delay: Optional[int] = None
48
+ tool_calls: list[TraceToolCall] = []
37
49
 
38
50
  class SystemTracesFlatResponse(BaseModel):
39
51
  success: bool
@@ -46,9 +58,10 @@ class SystemTracesPlugin(BasePlugin):
46
58
  Exposes the event bus trace log in hierarchical and flat formats.
47
59
  """
48
60
 
49
- def __init__(self, http, event_bus):
61
+ def __init__(self, http, event_bus, registry=None):
50
62
  self.http = http
51
63
  self.event_bus = event_bus
64
+ self.registry = registry
52
65
 
53
66
  async def on_boot(self):
54
67
  self.http.add_endpoint(
@@ -81,13 +94,39 @@ class SystemTracesPlugin(BasePlugin):
81
94
  "timestamp": float(env.timestamp.timestamp()),
82
95
  "key": env.key,
83
96
  "priority": env.priority,
84
- "delay": env.delay
97
+ "delay": env.delay,
98
+ "tool_calls": [],
85
99
  }
86
100
  else:
87
101
  if r.subscribers:
88
102
  for sub in r.subscribers:
89
103
  if sub not in merged[eid]["subscribers"]:
90
104
  merged[eid]["subscribers"].append(sub)
105
+
106
+ if self.registry is not None:
107
+ by_event: dict[str, list[dict]] = {}
108
+ for m in self.registry.get_metrics():
109
+ ev_id = m.get("event_id")
110
+ if not ev_id:
111
+ continue
112
+ by_event.setdefault(ev_id, []).append({
113
+ "caller": m.get("caller", "system"),
114
+ "tool": m["tool"],
115
+ "method": m["method"],
116
+ "duration_ms": m["duration_ms"],
117
+ "success": m["success"],
118
+ "error": m.get("error"),
119
+ "timestamp": m["timestamp"],
120
+ })
121
+ for eid, node in merged.items():
122
+ calls = []
123
+ parent_id = node.get("parent_id")
124
+ if parent_id and parent_id not in merged and parent_id in by_event:
125
+ calls.extend(by_event[parent_id])
126
+ if eid in by_event:
127
+ calls.extend(by_event[eid])
128
+ node["tool_calls"] = calls
129
+
91
130
  return list(merged.values())
92
131
 
93
132
  async def get_flat(self, data: dict, context=None):
@@ -31,9 +31,10 @@ class SystemTracesStreamPlugin(BasePlugin):
31
31
  If parent not found, treat as a new root.
32
32
  """
33
33
 
34
- def __init__(self, http, event_bus):
34
+ def __init__(self, http, event_bus, registry=None):
35
35
  self.http = http
36
36
  self.event_bus = event_bus
37
+ self.registry = registry
37
38
  self._queues: set = set()
38
39
 
39
40
  async def on_boot(self):
@@ -61,12 +62,38 @@ class SystemTracesStreamPlugin(BasePlugin):
61
62
  "subscribers": list(r.subscribers) if r.subscribers else [],
62
63
  "payload_keys": list(env.payload.keys()),
63
64
  "timestamp": float(env.timestamp.timestamp()),
65
+ "tool_calls": [],
64
66
  }
65
67
  else:
66
68
  if r.subscribers:
67
69
  for sub in r.subscribers:
68
70
  if sub not in merged[eid]["subscribers"]:
69
71
  merged[eid]["subscribers"].append(sub)
72
+
73
+ if self.registry is not None:
74
+ by_event: dict[str, list[dict]] = {}
75
+ for m in self.registry.get_metrics():
76
+ ev_id = m.get("event_id")
77
+ if not ev_id:
78
+ continue
79
+ by_event.setdefault(ev_id, []).append({
80
+ "caller": m.get("caller", "system"),
81
+ "tool": m["tool"],
82
+ "method": m["method"],
83
+ "duration_ms": m["duration_ms"],
84
+ "success": m["success"],
85
+ "error": m.get("error"),
86
+ "timestamp": m["timestamp"],
87
+ })
88
+ for eid, node in merged.items():
89
+ calls = []
90
+ parent_id = node.get("parent_id")
91
+ if parent_id and parent_id not in merged and parent_id in by_event:
92
+ calls.extend(by_event[parent_id])
93
+ if eid in by_event:
94
+ calls.extend(by_event[eid])
95
+ node["tool_calls"] = calls
96
+
70
97
  return list(merged.values())
71
98
 
72
99
  def _on_event(self, record: dict):
@@ -203,7 +203,15 @@ def _env_state(existing: str, var: str) -> str:
203
203
  return "absent"
204
204
 
205
205
 
206
- def _append_env(root: str, name: str, entries) -> None:
206
+ def _dotenv_value(value: str) -> str:
207
+ """Quote values that dotenv would otherwise truncate or interpolate."""
208
+ if value and value.strip() == value and not any(char in value for char in "#'\\$"):
209
+ return value
210
+ escaped = value.replace("\\", "\\\\").replace("'", "\\'")
211
+ return f"'{escaped}'"
212
+
213
+
214
+ def _append_env(root: str, name: str, entries, command: str = "add") -> None:
207
215
  """
208
216
  Append the extra's settings to .env, once.
209
217
 
@@ -236,9 +244,9 @@ def _append_env(root: str, name: str, entries) -> None:
236
244
  print(" ✓ .env already has these settings — unchanged.")
237
245
  return
238
246
 
239
- block = [""] + _env_section_header(name.upper(), f"microcoreos add {name}") + [""]
247
+ block = [""] + _env_section_header(name.upper(), f"microcoreos {command} {name}") + [""]
240
248
  for var, value, comment in missing:
241
- block.append(f"{var}={value}" + (f" # {comment}" if comment else ""))
249
+ block.append(f"{var}={_dotenv_value(str(value))}" + (f" # {comment}" if comment else ""))
242
250
 
243
251
  with open(path, "a", encoding="utf-8") as f:
244
252
  f.write("\n".join(block) + "\n")
@@ -26,6 +26,7 @@ import asyncio
26
26
 
27
27
  from microcoreos.kernel import Kernel
28
28
  from microcoreos.catalog import add
29
+ from microcoreos.external_extras import command as extra_command
29
30
  from microcoreos.scaffold import new
30
31
  from microcoreos.upgrade import upgrade
31
32
 
@@ -40,7 +41,10 @@ USAGE = """MicroCoreOS
40
41
 
41
42
  Usage:
42
43
  microcoreos new <path> [--force] [--no-ai-kit] Materialize a new project
43
- microcoreos add <extra> [--no-install] Install an extra completely
44
+ microcoreos add <extra> [--no-install] Activate a bundled extra
45
+ microcoreos extra install <source> [--ref REF] Install an external extra, inactive
46
+ microcoreos extra enable <name> [--no-install] Activate an installed external extra
47
+ microcoreos extra list List installed external extras
44
48
  microcoreos upgrade [--apply] Report/apply upstream changes
45
49
  microcoreos [run] [--boot-tool <tool_name>] Boot the Kernel in this directory
46
50
  microcoreos dev Boot with auto-reload on .py changes
@@ -185,7 +189,7 @@ def _pipeline(name: str):
185
189
 
186
190
 
187
191
  COMMANDS = {
188
- "new": new, "add": add, "upgrade": upgrade, "run": run, "dev": dev,
192
+ "new": new, "add": add, "extra": extra_command, "upgrade": upgrade, "run": run, "dev": dev,
189
193
  **{name: _pipeline(name) for name in PIPELINE_COMMANDS},
190
194
  }
191
195