hestiaos 0.1.0__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 (247) hide show
  1. hestiaos-0.1.0/LICENSE +21 -0
  2. hestiaos-0.1.0/PKG-INFO +138 -0
  3. hestiaos-0.1.0/README.md +117 -0
  4. hestiaos-0.1.0/pyproject.toml +40 -0
  5. hestiaos-0.1.0/setup.cfg +4 -0
  6. hestiaos-0.1.0/setup.py +7 -0
  7. hestiaos-0.1.0/src/hestiaos/__init__.py +51 -0
  8. hestiaos-0.1.0/src/hestiaos/cli.py +134 -0
  9. hestiaos-0.1.0/src/hestiaos/client.py +394 -0
  10. hestiaos-0.1.0/src/hestiaos/contract_guard.py +133 -0
  11. hestiaos-0.1.0/src/hestiaos/errors.py +61 -0
  12. hestiaos-0.1.0/src/hestiaos/models.py +103 -0
  13. hestiaos-0.1.0/src/hestiaos/py.typed +0 -0
  14. hestiaos-0.1.0/src/hestiaos/transport.py +98 -0
  15. hestiaos-0.1.0/src/hestiaos/version.py +5 -0
  16. hestiaos-0.1.0/src/hestiaos.egg-info/PKG-INFO +138 -0
  17. hestiaos-0.1.0/src/hestiaos.egg-info/SOURCES.txt +245 -0
  18. hestiaos-0.1.0/src/hestiaos.egg-info/dependency_links.txt +1 -0
  19. hestiaos-0.1.0/src/hestiaos.egg-info/entry_points.txt +2 -0
  20. hestiaos-0.1.0/src/hestiaos.egg-info/requires.txt +2 -0
  21. hestiaos-0.1.0/src/hestiaos.egg-info/top_level.txt +1 -0
  22. hestiaos-0.1.0/tests/test_advanced_context.py +109 -0
  23. hestiaos-0.1.0/tests/test_advanced_integration.py +109 -0
  24. hestiaos-0.1.0/tests/test_agent_fix.py +0 -0
  25. hestiaos-0.1.0/tests/test_agent_response_flow.py +60 -0
  26. hestiaos-0.1.0/tests/test_alerting.py +110 -0
  27. hestiaos-0.1.0/tests/test_antigravity_obsolescence_integration.py +589 -0
  28. hestiaos-0.1.0/tests/test_api_end_to_end.py +180 -0
  29. hestiaos-0.1.0/tests/test_api_sse_compliance.py +55 -0
  30. hestiaos-0.1.0/tests/test_api_v1_contract.py +555 -0
  31. hestiaos-0.1.0/tests/test_arbitration_g2.py +362 -0
  32. hestiaos-0.1.0/tests/test_architectural_invariants.py +56 -0
  33. hestiaos-0.1.0/tests/test_artifact_api.py +644 -0
  34. hestiaos-0.1.0/tests/test_artifact_replay.py +451 -0
  35. hestiaos-0.1.0/tests/test_artifact_stabilization.py +644 -0
  36. hestiaos-0.1.0/tests/test_artifact_system.py +464 -0
  37. hestiaos-0.1.0/tests/test_artifact_transformation.py +633 -0
  38. hestiaos-0.1.0/tests/test_ast_fix_engine.py +250 -0
  39. hestiaos-0.1.0/tests/test_auto_fix.py +32 -0
  40. hestiaos-0.1.0/tests/test_auto_fix_policy.py +364 -0
  41. hestiaos-0.1.0/tests/test_backend_abstraction.py +258 -0
  42. hestiaos-0.1.0/tests/test_backend_endpoints.py +264 -0
  43. hestiaos-0.1.0/tests/test_behavioral_context.py +135 -0
  44. hestiaos-0.1.0/tests/test_bifrost_mcp_integration.py +53 -0
  45. hestiaos-0.1.0/tests/test_bootstrap.py +69 -0
  46. hestiaos-0.1.0/tests/test_budget_coupling.py +184 -0
  47. hestiaos-0.1.0/tests/test_cache_key_fix.py +202 -0
  48. hestiaos-0.1.0/tests/test_canary_routing.py +150 -0
  49. hestiaos-0.1.0/tests/test_cancellation.py +63 -0
  50. hestiaos-0.1.0/tests/test_causal_attribution_g3.py +81 -0
  51. hestiaos-0.1.0/tests/test_causal_governance_g3.py +86 -0
  52. hestiaos-0.1.0/tests/test_causal_integrity.py +82 -0
  53. hestiaos-0.1.0/tests/test_causal_sensitivity_g3.py +133 -0
  54. hestiaos-0.1.0/tests/test_ce_bootstrap_script.py +172 -0
  55. hestiaos-0.1.0/tests/test_ce_integration.py +424 -0
  56. hestiaos-0.1.0/tests/test_cli.py +230 -0
  57. hestiaos-0.1.0/tests/test_cli_v1.py +101 -0
  58. hestiaos-0.1.0/tests/test_complete_system.py +254 -0
  59. hestiaos-0.1.0/tests/test_configuration_manager.py +418 -0
  60. hestiaos-0.1.0/tests/test_consciousness_security_integration.py +116 -0
  61. hestiaos-0.1.0/tests/test_context_injection.py +68 -0
  62. hestiaos-0.1.0/tests/test_contract_immutability.py +530 -0
  63. hestiaos-0.1.0/tests/test_credential_resolver.py +328 -0
  64. hestiaos-0.1.0/tests/test_credential_vault.py +431 -0
  65. hestiaos-0.1.0/tests/test_crt_drift_compliance.py +667 -0
  66. hestiaos-0.1.0/tests/test_crt_drift_fixtures.py +218 -0
  67. hestiaos-0.1.0/tests/test_crt_drift_injection.py +1210 -0
  68. hestiaos-0.1.0/tests/test_crt_serialization.py +331 -0
  69. hestiaos-0.1.0/tests/test_crypto_adapter.py +352 -0
  70. hestiaos-0.1.0/tests/test_curiosity_scorer.py +36 -0
  71. hestiaos-0.1.0/tests/test_curiosity_workflow.py +74 -0
  72. hestiaos-0.1.0/tests/test_data_protection.py +446 -0
  73. hestiaos-0.1.0/tests/test_decision_engine.py +462 -0
  74. hestiaos-0.1.0/tests/test_deterministic_budgeting.py +167 -0
  75. hestiaos-0.1.0/tests/test_drift_engine.py +413 -0
  76. hestiaos-0.1.0/tests/test_drift_monitor.py +170 -0
  77. hestiaos-0.1.0/tests/test_drift_policy.py +207 -0
  78. hestiaos-0.1.0/tests/test_dsgk_enforcement.py +1987 -0
  79. hestiaos-0.1.0/tests/test_dual_gate_protocol.py +666 -0
  80. hestiaos-0.1.0/tests/test_e2e.py +67 -0
  81. hestiaos-0.1.0/tests/test_embedding_integration.py +336 -0
  82. hestiaos-0.1.0/tests/test_embedding_rag_foundation.py +660 -0
  83. hestiaos-0.1.0/tests/test_encryption_system.py +245 -0
  84. hestiaos-0.1.0/tests/test_end_to_end_fix_accuracy_workflow.py +408 -0
  85. hestiaos-0.1.0/tests/test_end_to_end_flow.py +203 -0
  86. hestiaos-0.1.0/tests/test_end_to_end_validation.py +213 -0
  87. hestiaos-0.1.0/tests/test_enhanced_security_v4.py +79 -0
  88. hestiaos-0.1.0/tests/test_enterprise_export.py +68 -0
  89. hestiaos-0.1.0/tests/test_event_bus_contract.py +218 -0
  90. hestiaos-0.1.0/tests/test_execution_context.py +72 -0
  91. hestiaos-0.1.0/tests/test_failover_integration.py +85 -0
  92. hestiaos-0.1.0/tests/test_fallback_results.py +269 -0
  93. hestiaos-0.1.0/tests/test_file_state_cache_invalidation.py +356 -0
  94. hestiaos-0.1.0/tests/test_final_fix.py +197 -0
  95. hestiaos-0.1.0/tests/test_final_system_validation.py +220 -0
  96. hestiaos-0.1.0/tests/test_fix_accuracy_measurement.py +261 -0
  97. hestiaos-0.1.0/tests/test_fix_verification.py +163 -0
  98. hestiaos-0.1.0/tests/test_fixed_routing.py +217 -0
  99. hestiaos-0.1.0/tests/test_full_pipeline.py +168 -0
  100. hestiaos-0.1.0/tests/test_gateway_routing.py +175 -0
  101. hestiaos-0.1.0/tests/test_german_reasoning.py +242 -0
  102. hestiaos-0.1.0/tests/test_ghost_writer.py +84 -0
  103. hestiaos-0.1.0/tests/test_ghostwriter_fix.py +172 -0
  104. hestiaos-0.1.0/tests/test_governance_bridge.py +454 -0
  105. hestiaos-0.1.0/tests/test_governance_hardening.py +350 -0
  106. hestiaos-0.1.0/tests/test_governed_reasoning.py +268 -0
  107. hestiaos-0.1.0/tests/test_hardware_identity.py +67 -0
  108. hestiaos-0.1.0/tests/test_hardware_security.py +110 -0
  109. hestiaos-0.1.0/tests/test_hsp_cache.py +523 -0
  110. hestiaos-0.1.0/tests/test_ibm_agent_integration.py +50 -0
  111. hestiaos-0.1.0/tests/test_integration.py +35 -0
  112. hestiaos-0.1.0/tests/test_intelligence_integration.py +104 -0
  113. hestiaos-0.1.0/tests/test_invariant_canon.py +775 -0
  114. hestiaos-0.1.0/tests/test_invariant_consumers.py +241 -0
  115. hestiaos-0.1.0/tests/test_ir_models.py +625 -0
  116. hestiaos-0.1.0/tests/test_ir_semantic_kernel.py +915 -0
  117. hestiaos-0.1.0/tests/test_kpi_metrics.py +166 -0
  118. hestiaos-0.1.0/tests/test_kpi_simple.py +222 -0
  119. hestiaos-0.1.0/tests/test_load_balancing.py +54 -0
  120. hestiaos-0.1.0/tests/test_matrix_gateway.py +59 -0
  121. hestiaos-0.1.0/tests/test_mcp_memory.py +74 -0
  122. hestiaos-0.1.0/tests/test_mem0_embedding_v1.py +43 -0
  123. hestiaos-0.1.0/tests/test_memory_client.py +68 -0
  124. hestiaos-0.1.0/tests/test_memory_ranking.py +361 -0
  125. hestiaos-0.1.0/tests/test_memory_sync.py +63 -0
  126. hestiaos-0.1.0/tests/test_middleware_v2_integration.py +269 -0
  127. hestiaos-0.1.0/tests/test_mobile_access.py +196 -0
  128. hestiaos-0.1.0/tests/test_mode_boundaries.py +94 -0
  129. hestiaos-0.1.0/tests/test_model_authority_snapshot_swap.py +121 -0
  130. hestiaos-0.1.0/tests/test_multi_tenant_rbac.py +48 -0
  131. hestiaos-0.1.0/tests/test_n8n_webhook_bridge.py +538 -0
  132. hestiaos-0.1.0/tests/test_nc_api_direct.py +83 -0
  133. hestiaos-0.1.0/tests/test_nc_chat_v2.py +23 -0
  134. hestiaos-0.1.0/tests/test_nc_connection.py +43 -0
  135. hestiaos-0.1.0/tests/test_nc_v4.py +28 -0
  136. hestiaos-0.1.0/tests/test_nextcloud_poller.py +120 -0
  137. hestiaos-0.1.0/tests/test_nextcloud_talk_plugin.py +73 -0
  138. hestiaos-0.1.0/tests/test_nextcloud_talk_plugin_updated.py +140 -0
  139. hestiaos-0.1.0/tests/test_nextcloud_talk_response_guarantee.py +214 -0
  140. hestiaos-0.1.0/tests/test_now.py +93 -0
  141. hestiaos-0.1.0/tests/test_observability_phase_e.py +784 -0
  142. hestiaos-0.1.0/tests/test_ocs_api.py +93 -0
  143. hestiaos-0.1.0/tests/test_orchestrator_execution_adapter.py +629 -0
  144. hestiaos-0.1.0/tests/test_outbound.py +233 -0
  145. hestiaos-0.1.0/tests/test_outbound_post.py +284 -0
  146. hestiaos-0.1.0/tests/test_output_sanitization.py +174 -0
  147. hestiaos-0.1.0/tests/test_output_sanitization_final.py +137 -0
  148. hestiaos-0.1.0/tests/test_pathway_optimizer.py +40 -0
  149. hestiaos-0.1.0/tests/test_performance_simple.py +195 -0
  150. hestiaos-0.1.0/tests/test_phase0_g0_integration.py +675 -0
  151. hestiaos-0.1.0/tests/test_phase10_skills.py +1352 -0
  152. hestiaos-0.1.0/tests/test_phase12_self_stabilizing_kernel.py +315 -0
  153. hestiaos-0.1.0/tests/test_phase1_5_reality_injection.py +421 -0
  154. hestiaos-0.1.0/tests/test_phase2_consciousness.py +1 -0
  155. hestiaos-0.1.0/tests/test_phase7_in_process_swarming.py +320 -0
  156. hestiaos-0.1.0/tests/test_phase8_agent_integration.py +229 -0
  157. hestiaos-0.1.0/tests/test_phase9_validation_suite.py +528 -0
  158. hestiaos-0.1.0/tests/test_plugin_loader.py +29 -0
  159. hestiaos-0.1.0/tests/test_plugin_manager_permanent.py +85 -0
  160. hestiaos-0.1.0/tests/test_plugin_reload.py +144 -0
  161. hestiaos-0.1.0/tests/test_plugin_validation.py +0 -0
  162. hestiaos-0.1.0/tests/test_pm_integration_v2.py +102 -0
  163. hestiaos-0.1.0/tests/test_postgres_persistence.py +384 -0
  164. hestiaos-0.1.0/tests/test_postgres_persistence_sqlite.py +420 -0
  165. hestiaos-0.1.0/tests/test_predictive_drift.py +337 -0
  166. hestiaos-0.1.0/tests/test_privacy_controls.py +698 -0
  167. hestiaos-0.1.0/tests/test_production_integration.py +20 -0
  168. hestiaos-0.1.0/tests/test_query_engine.py +359 -0
  169. hestiaos-0.1.0/tests/test_ralph_loop.py +33 -0
  170. hestiaos-0.1.0/tests/test_ralph_orchestrator.py +387 -0
  171. hestiaos-0.1.0/tests/test_rbac_api_guards_v5.py +81 -0
  172. hestiaos-0.1.0/tests/test_rbac_enforcement.py +639 -0
  173. hestiaos-0.1.0/tests/test_rbac_permissions.py +332 -0
  174. hestiaos-0.1.0/tests/test_rbac_roles.py +243 -0
  175. hestiaos-0.1.0/tests/test_real_hestiaos_tool_orchestration.py +325 -0
  176. hestiaos-0.1.0/tests/test_real_wave_v1.py +61 -0
  177. hestiaos-0.1.0/tests/test_real_world_fix_engine.py +300 -0
  178. hestiaos-0.1.0/tests/test_real_world_tool_orchestration.py +468 -0
  179. hestiaos-0.1.0/tests/test_roo_integration.py +169 -0
  180. hestiaos-0.1.0/tests/test_routing_decisions.py +267 -0
  181. hestiaos-0.1.0/tests/test_routing_determinism.py +580 -0
  182. hestiaos-0.1.0/tests/test_routing_diag.py +24 -0
  183. hestiaos-0.1.0/tests/test_routing_duplication.py +135 -0
  184. hestiaos-0.1.0/tests/test_routing_intelligence_health_model.py +488 -0
  185. hestiaos-0.1.0/tests/test_routing_intelligence_metrics.py +335 -0
  186. hestiaos-0.1.0/tests/test_routing_intelligence_policy.py +481 -0
  187. hestiaos-0.1.0/tests/test_routing_intelligence_scoring.py +385 -0
  188. hestiaos-0.1.0/tests/test_routing_robustness.py +77 -0
  189. hestiaos-0.1.0/tests/test_sandbox.py +50 -0
  190. hestiaos-0.1.0/tests/test_science_edition.py +130 -0
  191. hestiaos-0.1.0/tests/test_science_edition_final.py +76 -0
  192. hestiaos-0.1.0/tests/test_science_phase2.py +72 -0
  193. hestiaos-0.1.0/tests/test_sdk_client.py +397 -0
  194. hestiaos-0.1.0/tests/test_security.py +61 -0
  195. hestiaos-0.1.0/tests/test_security_vault.py +54 -0
  196. hestiaos-0.1.0/tests/test_semantic_intent.py +431 -0
  197. hestiaos-0.1.0/tests/test_send_fix.py +165 -0
  198. hestiaos-0.1.0/tests/test_service_accounts.py +470 -0
  199. hestiaos-0.1.0/tests/test_service_accounts_api.py +423 -0
  200. hestiaos-0.1.0/tests/test_service_accounts_integration.py +425 -0
  201. hestiaos-0.1.0/tests/test_system_arbitration.py +181 -0
  202. hestiaos-0.1.0/tests/test_system_startup.py +76 -0
  203. hestiaos-0.1.0/tests/test_system_stress.py +140 -0
  204. hestiaos-0.1.0/tests/test_temporal_navigation.py +587 -0
  205. hestiaos-0.1.0/tests/test_temporal_vibe.py +363 -0
  206. hestiaos-0.1.0/tests/test_tenant_isolation.py +118 -0
  207. hestiaos-0.1.0/tests/test_tenant_manager.py +381 -0
  208. hestiaos-0.1.0/tests/test_three_tier_memory_system.py +399 -0
  209. hestiaos-0.1.0/tests/test_token_budgeting.py +43 -0
  210. hestiaos-0.1.0/tests/test_tombstoning.py +280 -0
  211. hestiaos-0.1.0/tests/test_tombstoning_simple.py +94 -0
  212. hestiaos-0.1.0/tests/test_tool_capability.py +43 -0
  213. hestiaos-0.1.0/tests/test_tool_orchestration_aggregation.py +233 -0
  214. hestiaos-0.1.0/tests/test_tool_orchestration_policy.py +254 -0
  215. hestiaos-0.1.0/tests/test_tool_result_budgeting.py +329 -0
  216. hestiaos-0.1.0/tests/test_tool_routing.py +398 -0
  217. hestiaos-0.1.0/tests/test_triple_agent.py +67 -0
  218. hestiaos-0.1.0/tests/test_ultron_protocol.py +65 -0
  219. hestiaos-0.1.0/tests/test_v1_evolutionary_system.py +462 -0
  220. hestiaos-0.1.0/tests/test_v1_integration.py +223 -0
  221. hestiaos-0.1.0/tests/test_v8_hardening.py +81 -0
  222. hestiaos-0.1.0/tests/test_v9_observability.py +126 -0
  223. hestiaos-0.1.0/tests/test_vector_sync.py +92 -0
  224. hestiaos-0.1.0/tests/test_vllm_direct.py +175 -0
  225. hestiaos-0.1.0/tests/test_vllm_integration.py +215 -0
  226. hestiaos-0.1.0/tests/test_vllm_tool_calling.py +183 -0
  227. hestiaos-0.1.0/tests/test_wave.py +20 -0
  228. hestiaos-0.1.0/tests/test_wave_encryption.py +58 -0
  229. hestiaos-0.1.0/tests/test_wave_engine_v1.py +62 -0
  230. hestiaos-0.1.0/tests/test_wave_store.py +120 -0
  231. hestiaos-0.1.0/tests/test_wave_store_db.py +308 -0
  232. hestiaos-0.1.0/tests/test_wave_sync_logic.py +80 -0
  233. hestiaos-0.1.0/tests/test_waves_api.py +813 -0
  234. hestiaos-0.1.0/tests/test_waves_api_simple.py +170 -0
  235. hestiaos-0.1.0/tests/test_workflow_dsl_context.py +167 -0
  236. hestiaos-0.1.0/tests/test_workflow_dsl_execution_controller.py +329 -0
  237. hestiaos-0.1.0/tests/test_workflow_dsl_executor.py +311 -0
  238. hestiaos-0.1.0/tests/test_workflow_dsl_expressions.py +182 -0
  239. hestiaos-0.1.0/tests/test_workflow_dsl_graph.py +144 -0
  240. hestiaos-0.1.0/tests/test_workflow_dsl_models.py +274 -0
  241. hestiaos-0.1.0/tests/test_workflow_dsl_registry.py +144 -0
  242. hestiaos-0.1.0/tests/test_workflow_dsl_run_state_machine.py +198 -0
  243. hestiaos-0.1.0/tests/test_workflow_dsl_run_store.py +361 -0
  244. hestiaos-0.1.0/tests/test_workflow_dsl_step_tracker.py +269 -0
  245. hestiaos-0.1.0/tests/test_workflow_dsl_triggers.py +216 -0
  246. hestiaos-0.1.0/tests/test_writer_memory.py +222 -0
  247. hestiaos-0.1.0/tests/test_ws.py +20 -0
hestiaos-0.1.0/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 HestiaOS Contributors
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -0,0 +1,138 @@
1
+ Metadata-Version: 2.4
2
+ Name: hestiaos
3
+ Version: 0.1.0
4
+ Summary: HestiaOS SDK — Domain Interface for the HestiaOS platform
5
+ Author: HestiaOS Team
6
+ License-Expression: MIT
7
+ Project-URL: Homepage, https://hestiaos.local
8
+ Project-URL: Source, https://gitlab.com/hestiaos/hestiaos
9
+ Classifier: Development Status :: 3 - Alpha
10
+ Classifier: Intended Audience :: Developers
11
+ Classifier: Programming Language :: Python :: 3
12
+ Classifier: Programming Language :: Python :: 3.11
13
+ Classifier: Programming Language :: Python :: 3.12
14
+ Classifier: Typing :: Typed
15
+ Requires-Python: >=3.11
16
+ Description-Content-Type: text/markdown
17
+ License-File: LICENSE
18
+ Requires-Dist: httpx>=0.27.0
19
+ Requires-Dist: typer>=0.12.0
20
+ Dynamic: license-file
21
+
22
+ # 🏠 HestiaOS SDK
23
+
24
+ **Python SDK for the HestiaOS platform** — deterministic governance, multi-agent orchestration, and local-first AI execution.
25
+
26
+ [![PyPI version](https://img.shields.io/pypi/v/hestiaos)](https://pypi.org/project/hestiaos/)
27
+ [![Python Versions](https://img.shields.io/pypi/pyversions/hestiaos)](https://pypi.org/project/hestiaos/)
28
+ [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](LICENSE)
29
+
30
+ ---
31
+
32
+ ## Installation
33
+
34
+ ```bash
35
+ pip install hestiaos
36
+ ```
37
+
38
+ Requires Python 3.11+.
39
+
40
+ ---
41
+
42
+ ## Quickstart
43
+
44
+ ### Python Client
45
+
46
+ ```python
47
+ from hestiaos import Client
48
+
49
+ client = Client(base_url="http://localhost:8000")
50
+
51
+ # Run a command through the governance pipeline
52
+ result = client.run("create a report")
53
+ print(result.result) # "processed: create a report"
54
+ print(result.trace_id) # "abc-123-def"
55
+ print(result.mode) # "ALLOW"
56
+
57
+ # Check system health
58
+ status = client.system.status()
59
+ print(status.status) # "healthy"
60
+
61
+ # Retrieve a governance trace
62
+ trace = client.governance.trace("abc-123-def")
63
+ ```
64
+
65
+ ### CLI
66
+
67
+ ```bash
68
+ # Run a command
69
+ hestiaos run "create a report"
70
+
71
+ # Check server health
72
+ hestiaos health
73
+
74
+ # Retrieve a trace
75
+ hestiaos trace abc-123-def
76
+
77
+ # JSON output (pipe to jq)
78
+ hestiaos run "hello" --json | jq
79
+
80
+ # Custom server URL
81
+ hestiaos --base-url http://localhost:8000 health
82
+ ```
83
+
84
+ ---
85
+
86
+ ## CLI Reference
87
+
88
+ | Command | Description |
89
+ |---------|-------------|
90
+ | `hestiaos run <text>` | Execute a command through the governance pipeline |
91
+ | `hestiaos trace <id>` | Retrieve a governance trace by ID |
92
+ | `hestiaos health` | Check server health status |
93
+
94
+ | Global Option | Description |
95
+ |---------------|-------------|
96
+ | `--base-url, -u` | API base URL (default: `http://localhost:8000`) |
97
+ | `--api-key, -k` | API key for authentication |
98
+ | `--json, -j` | Output as raw JSON |
99
+
100
+ ---
101
+
102
+ ## API
103
+
104
+ ### `Client(base_url, api_key=None)`
105
+
106
+ | Method | Returns | Description |
107
+ |--------|---------|-------------|
108
+ | `client.run(input_text)` | `RunResponse` | Execute through governance pipeline |
109
+ | `client.governance.trace(trace_id)` | `dict \| None` | Retrieve governance trace |
110
+ | `client.governance.explain(command_type, command_input)` | `dict` | Explain a governance decision |
111
+ | `client.system.status()` | `SystemStatus` | Server health status |
112
+
113
+ ### Models
114
+
115
+ - **`RunResponse`**: `result`, `trace_id`, `output`, `mode`, `budget`, `latency_ms`
116
+ - **`TraceResponse`**: `trace_id`, `decision`, `violations`, `latency_ms`
117
+ - **`HealthResponse`**: `status`, `version`, `uptime_seconds`
118
+ - **`GovernanceBlock`**: Raised when governance blocks execution
119
+
120
+ ---
121
+
122
+ ## Development
123
+
124
+ ```bash
125
+ # Clone and install
126
+ git clone <repo-url> && cd hestiaos
127
+ python -m venv venv && source venv/bin/activate
128
+ pip install -e .
129
+
130
+ # Run tests
131
+ pytest tests/test_sdk_client.py tests/test_cli.py -v
132
+ ```
133
+
134
+ ---
135
+
136
+ ## License
137
+
138
+ MIT — see [LICENSE](LICENSE).
@@ -0,0 +1,117 @@
1
+ # 🏠 HestiaOS SDK
2
+
3
+ **Python SDK for the HestiaOS platform** — deterministic governance, multi-agent orchestration, and local-first AI execution.
4
+
5
+ [![PyPI version](https://img.shields.io/pypi/v/hestiaos)](https://pypi.org/project/hestiaos/)
6
+ [![Python Versions](https://img.shields.io/pypi/pyversions/hestiaos)](https://pypi.org/project/hestiaos/)
7
+ [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](LICENSE)
8
+
9
+ ---
10
+
11
+ ## Installation
12
+
13
+ ```bash
14
+ pip install hestiaos
15
+ ```
16
+
17
+ Requires Python 3.11+.
18
+
19
+ ---
20
+
21
+ ## Quickstart
22
+
23
+ ### Python Client
24
+
25
+ ```python
26
+ from hestiaos import Client
27
+
28
+ client = Client(base_url="http://localhost:8000")
29
+
30
+ # Run a command through the governance pipeline
31
+ result = client.run("create a report")
32
+ print(result.result) # "processed: create a report"
33
+ print(result.trace_id) # "abc-123-def"
34
+ print(result.mode) # "ALLOW"
35
+
36
+ # Check system health
37
+ status = client.system.status()
38
+ print(status.status) # "healthy"
39
+
40
+ # Retrieve a governance trace
41
+ trace = client.governance.trace("abc-123-def")
42
+ ```
43
+
44
+ ### CLI
45
+
46
+ ```bash
47
+ # Run a command
48
+ hestiaos run "create a report"
49
+
50
+ # Check server health
51
+ hestiaos health
52
+
53
+ # Retrieve a trace
54
+ hestiaos trace abc-123-def
55
+
56
+ # JSON output (pipe to jq)
57
+ hestiaos run "hello" --json | jq
58
+
59
+ # Custom server URL
60
+ hestiaos --base-url http://localhost:8000 health
61
+ ```
62
+
63
+ ---
64
+
65
+ ## CLI Reference
66
+
67
+ | Command | Description |
68
+ |---------|-------------|
69
+ | `hestiaos run <text>` | Execute a command through the governance pipeline |
70
+ | `hestiaos trace <id>` | Retrieve a governance trace by ID |
71
+ | `hestiaos health` | Check server health status |
72
+
73
+ | Global Option | Description |
74
+ |---------------|-------------|
75
+ | `--base-url, -u` | API base URL (default: `http://localhost:8000`) |
76
+ | `--api-key, -k` | API key for authentication |
77
+ | `--json, -j` | Output as raw JSON |
78
+
79
+ ---
80
+
81
+ ## API
82
+
83
+ ### `Client(base_url, api_key=None)`
84
+
85
+ | Method | Returns | Description |
86
+ |--------|---------|-------------|
87
+ | `client.run(input_text)` | `RunResponse` | Execute through governance pipeline |
88
+ | `client.governance.trace(trace_id)` | `dict \| None` | Retrieve governance trace |
89
+ | `client.governance.explain(command_type, command_input)` | `dict` | Explain a governance decision |
90
+ | `client.system.status()` | `SystemStatus` | Server health status |
91
+
92
+ ### Models
93
+
94
+ - **`RunResponse`**: `result`, `trace_id`, `output`, `mode`, `budget`, `latency_ms`
95
+ - **`TraceResponse`**: `trace_id`, `decision`, `violations`, `latency_ms`
96
+ - **`HealthResponse`**: `status`, `version`, `uptime_seconds`
97
+ - **`GovernanceBlock`**: Raised when governance blocks execution
98
+
99
+ ---
100
+
101
+ ## Development
102
+
103
+ ```bash
104
+ # Clone and install
105
+ git clone <repo-url> && cd hestiaos
106
+ python -m venv venv && source venv/bin/activate
107
+ pip install -e .
108
+
109
+ # Run tests
110
+ pytest tests/test_sdk_client.py tests/test_cli.py -v
111
+ ```
112
+
113
+ ---
114
+
115
+ ## License
116
+
117
+ MIT — see [LICENSE](LICENSE).
@@ -0,0 +1,40 @@
1
+ [build-system]
2
+ requires = ["setuptools>=68.0", "wheel"]
3
+ build-backend = "setuptools.build_meta"
4
+
5
+ [project]
6
+ name = "hestiaos"
7
+ version = "0.1.0"
8
+ description = "HestiaOS SDK — Domain Interface for the HestiaOS platform"
9
+ readme = "README.md"
10
+ requires-python = ">=3.11"
11
+ license = "MIT"
12
+ authors = [
13
+ {name = "HestiaOS Team"},
14
+ ]
15
+ classifiers = [
16
+ "Development Status :: 3 - Alpha",
17
+ "Intended Audience :: Developers",
18
+ "Programming Language :: Python :: 3",
19
+ "Programming Language :: Python :: 3.11",
20
+ "Programming Language :: Python :: 3.12",
21
+ "Typing :: Typed",
22
+ ]
23
+ dependencies = [
24
+ "httpx>=0.27.0",
25
+ "typer>=0.12.0",
26
+ ]
27
+
28
+ [project.scripts]
29
+ hestiaos = "hestiaos.cli:main"
30
+
31
+ [project.urls]
32
+ Homepage = "https://hestiaos.local"
33
+ Source = "https://gitlab.com/hestiaos/hestiaos"
34
+
35
+ [tool.setuptools.packages.find]
36
+ where = ["src"]
37
+ include = ["hestiaos*"]
38
+
39
+ [tool.setuptools.package-data]
40
+ hestiaos = ["py.typed"]
@@ -0,0 +1,4 @@
1
+ [egg_info]
2
+ tag_build =
3
+ tag_date = 0
4
+
@@ -0,0 +1,7 @@
1
+ from setuptools import setup, find_packages
2
+
3
+ setup(
4
+ name="hestiaos-core",
5
+ version="1.0.0",
6
+ packages=find_packages(),
7
+ )
@@ -0,0 +1,51 @@
1
+ """
2
+ HestiaOS SDK — Domain Interface für die HestiaOS-Plattform.
3
+
4
+ Das SDK ist Resource-Oriented, nicht API-Wrapper-lastig.
5
+ Jeder Resource-Namespace ist ein Attribut des Client-Objekts.
6
+ Der Client mapped auf typed Commands, nicht direkt auf HTTP.
7
+
8
+ Usage:
9
+ from hestiaos import Client
10
+
11
+ client = Client(base_url="http://localhost:8000")
12
+ response = client.chat.send("Hello!")
13
+ status = client.system.status()
14
+ decision = client.governance.explain("WRITE")
15
+ result = client.run("Hello, world!")
16
+ """
17
+
18
+ from __future__ import annotations
19
+
20
+ from .client import (
21
+ AgentResult,
22
+ ChatResponse,
23
+ Client,
24
+ SystemMetrics,
25
+ SystemStatus,
26
+ )
27
+ from .errors import GovernanceBlock, HestiaError, InvalidInput, NotFound
28
+ from .models import (
29
+ ErrorResponse,
30
+ HealthResponse,
31
+ RunResponse,
32
+ TraceResponse,
33
+ )
34
+ from .version import __version__
35
+
36
+ __all__ = [
37
+ "Client",
38
+ "ChatResponse",
39
+ "AgentResult",
40
+ "SystemStatus",
41
+ "SystemMetrics",
42
+ "RunResponse",
43
+ "TraceResponse",
44
+ "HealthResponse",
45
+ "ErrorResponse",
46
+ "HestiaError",
47
+ "GovernanceBlock",
48
+ "InvalidInput",
49
+ "NotFound",
50
+ "__version__",
51
+ ]
@@ -0,0 +1,134 @@
1
+ """
2
+ HestiaOS CLI — Typer-basierte Kommandozeile.
3
+
4
+ Usage:
5
+ hestiaos --help
6
+ hestiaos run "create report"
7
+ hestiaos trace abc123
8
+ hestiaos health
9
+ hestiaos --base-url http://localhost:8000 run "hello" --json
10
+ """
11
+
12
+ from __future__ import annotations
13
+
14
+ import json
15
+ import sys
16
+ from typing import Any, NoReturn, Optional
17
+
18
+ import typer
19
+
20
+ from hestiaos import Client, GovernanceBlock
21
+
22
+ app = typer.Typer(
23
+ name="hestiaos",
24
+ help="HestiaOS CLI — Interact with the HestiaOS platform.",
25
+ no_args_is_help=True,
26
+ )
27
+
28
+
29
+ # ── Globale Callback-Optionen ───────────────────────────────────────
30
+ @app.callback()
31
+ def _main(
32
+ ctx: typer.Context,
33
+ base_url: Optional[str] = typer.Option(
34
+ None, "--base-url", "-u", help="HestiaOS API base URL (default: http://localhost:8000)"
35
+ ),
36
+ api_key: Optional[str] = typer.Option(
37
+ None, "--api-key", "-k", help="API key for authentication"
38
+ ),
39
+ json_output: bool = typer.Option(
40
+ False, "--json", "-j", help="Output as raw JSON"
41
+ ),
42
+ ) -> None:
43
+ """Globale Optionen für alle CLI-Commands."""
44
+ ctx.ensure_object(dict)
45
+ ctx.obj["base_url"] = base_url or "http://localhost:8000"
46
+ ctx.obj["api_key"] = api_key
47
+ ctx.obj["json_output"] = json_output
48
+
49
+
50
+ # ── Hilfsfunktionen ─────────────────────────────────────────────────
51
+ def _make_client(ctx: typer.Context) -> Client:
52
+ """Erzeugt einen Client aus den globalen Optionen."""
53
+ opts = ctx.obj
54
+ return Client(
55
+ base_url=opts["base_url"],
56
+ api_key=opts.get("api_key"),
57
+ )
58
+
59
+
60
+ def _print_result(ctx: typer.Context, data: dict[str, Any]) -> None:
61
+ """Gibt das Ergebnis aus — entweder als JSON oder als Text."""
62
+ if ctx.obj["json_output"]:
63
+ print(json.dumps(data, indent=2, default=str))
64
+ else:
65
+ for key, value in data.items():
66
+ print(f"{key}: {value}")
67
+
68
+
69
+ def _exit_on_error(message: str, code: int = 1) -> NoReturn:
70
+ """Gibt eine Fehlermeldung aus und beendet das Programm."""
71
+ print(f"❌ {message}", file=sys.stderr)
72
+ raise typer.Exit(code=code)
73
+
74
+
75
+ # ── Commands ────────────────────────────────────────────────────────
76
+ @app.command()
77
+ def run(
78
+ ctx: typer.Context,
79
+ input_text: str = typer.Argument(..., help="Input text to process"),
80
+ ) -> None:
81
+ """Führt einen Command durch die Governance-Pipeline aus."""
82
+ client = _make_client(ctx)
83
+ try:
84
+ result = client.run(input_text)
85
+ except GovernanceBlock as e:
86
+ _exit_on_error(str(e), code=1)
87
+
88
+ data: dict[str, Any] = {
89
+ "result": result.result,
90
+ "trace_id": result.trace_id,
91
+ "output": result.output,
92
+ "mode": result.mode,
93
+ "budget": result.budget,
94
+ "latency_ms": result.latency_ms,
95
+ }
96
+ _print_result(ctx, data)
97
+
98
+
99
+ @app.command()
100
+ def trace(
101
+ ctx: typer.Context,
102
+ trace_id: str = typer.Argument(..., help="Trace ID to retrieve"),
103
+ ) -> None:
104
+ """Ruft einen vollständigen Governance-Trace ab."""
105
+ client = _make_client(ctx)
106
+ result = client.governance.trace(trace_id)
107
+ if result is None:
108
+ _exit_on_error(f"Trace '{trace_id}' not found", code=1)
109
+
110
+ _print_result(ctx, result)
111
+
112
+
113
+ @app.command()
114
+ def health(
115
+ ctx: typer.Context,
116
+ ) -> None:
117
+ """Prüft den Health-Status des HestiaOS-Servers."""
118
+ client = _make_client(ctx)
119
+ status = client.system.status()
120
+ data: dict[str, Any] = {
121
+ "status": status.status,
122
+ "version": status.version,
123
+ "uptime_seconds": status.uptime_seconds,
124
+ }
125
+ _print_result(ctx, data)
126
+
127
+
128
+ def main() -> None:
129
+ """Entrypoint für pyproject.toml [project.scripts]."""
130
+ app()
131
+
132
+
133
+ if __name__ == "__main__":
134
+ main()