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.
- hestiaos-0.1.0/LICENSE +21 -0
- hestiaos-0.1.0/PKG-INFO +138 -0
- hestiaos-0.1.0/README.md +117 -0
- hestiaos-0.1.0/pyproject.toml +40 -0
- hestiaos-0.1.0/setup.cfg +4 -0
- hestiaos-0.1.0/setup.py +7 -0
- hestiaos-0.1.0/src/hestiaos/__init__.py +51 -0
- hestiaos-0.1.0/src/hestiaos/cli.py +134 -0
- hestiaos-0.1.0/src/hestiaos/client.py +394 -0
- hestiaos-0.1.0/src/hestiaos/contract_guard.py +133 -0
- hestiaos-0.1.0/src/hestiaos/errors.py +61 -0
- hestiaos-0.1.0/src/hestiaos/models.py +103 -0
- hestiaos-0.1.0/src/hestiaos/py.typed +0 -0
- hestiaos-0.1.0/src/hestiaos/transport.py +98 -0
- hestiaos-0.1.0/src/hestiaos/version.py +5 -0
- hestiaos-0.1.0/src/hestiaos.egg-info/PKG-INFO +138 -0
- hestiaos-0.1.0/src/hestiaos.egg-info/SOURCES.txt +245 -0
- hestiaos-0.1.0/src/hestiaos.egg-info/dependency_links.txt +1 -0
- hestiaos-0.1.0/src/hestiaos.egg-info/entry_points.txt +2 -0
- hestiaos-0.1.0/src/hestiaos.egg-info/requires.txt +2 -0
- hestiaos-0.1.0/src/hestiaos.egg-info/top_level.txt +1 -0
- hestiaos-0.1.0/tests/test_advanced_context.py +109 -0
- hestiaos-0.1.0/tests/test_advanced_integration.py +109 -0
- hestiaos-0.1.0/tests/test_agent_fix.py +0 -0
- hestiaos-0.1.0/tests/test_agent_response_flow.py +60 -0
- hestiaos-0.1.0/tests/test_alerting.py +110 -0
- hestiaos-0.1.0/tests/test_antigravity_obsolescence_integration.py +589 -0
- hestiaos-0.1.0/tests/test_api_end_to_end.py +180 -0
- hestiaos-0.1.0/tests/test_api_sse_compliance.py +55 -0
- hestiaos-0.1.0/tests/test_api_v1_contract.py +555 -0
- hestiaos-0.1.0/tests/test_arbitration_g2.py +362 -0
- hestiaos-0.1.0/tests/test_architectural_invariants.py +56 -0
- hestiaos-0.1.0/tests/test_artifact_api.py +644 -0
- hestiaos-0.1.0/tests/test_artifact_replay.py +451 -0
- hestiaos-0.1.0/tests/test_artifact_stabilization.py +644 -0
- hestiaos-0.1.0/tests/test_artifact_system.py +464 -0
- hestiaos-0.1.0/tests/test_artifact_transformation.py +633 -0
- hestiaos-0.1.0/tests/test_ast_fix_engine.py +250 -0
- hestiaos-0.1.0/tests/test_auto_fix.py +32 -0
- hestiaos-0.1.0/tests/test_auto_fix_policy.py +364 -0
- hestiaos-0.1.0/tests/test_backend_abstraction.py +258 -0
- hestiaos-0.1.0/tests/test_backend_endpoints.py +264 -0
- hestiaos-0.1.0/tests/test_behavioral_context.py +135 -0
- hestiaos-0.1.0/tests/test_bifrost_mcp_integration.py +53 -0
- hestiaos-0.1.0/tests/test_bootstrap.py +69 -0
- hestiaos-0.1.0/tests/test_budget_coupling.py +184 -0
- hestiaos-0.1.0/tests/test_cache_key_fix.py +202 -0
- hestiaos-0.1.0/tests/test_canary_routing.py +150 -0
- hestiaos-0.1.0/tests/test_cancellation.py +63 -0
- hestiaos-0.1.0/tests/test_causal_attribution_g3.py +81 -0
- hestiaos-0.1.0/tests/test_causal_governance_g3.py +86 -0
- hestiaos-0.1.0/tests/test_causal_integrity.py +82 -0
- hestiaos-0.1.0/tests/test_causal_sensitivity_g3.py +133 -0
- hestiaos-0.1.0/tests/test_ce_bootstrap_script.py +172 -0
- hestiaos-0.1.0/tests/test_ce_integration.py +424 -0
- hestiaos-0.1.0/tests/test_cli.py +230 -0
- hestiaos-0.1.0/tests/test_cli_v1.py +101 -0
- hestiaos-0.1.0/tests/test_complete_system.py +254 -0
- hestiaos-0.1.0/tests/test_configuration_manager.py +418 -0
- hestiaos-0.1.0/tests/test_consciousness_security_integration.py +116 -0
- hestiaos-0.1.0/tests/test_context_injection.py +68 -0
- hestiaos-0.1.0/tests/test_contract_immutability.py +530 -0
- hestiaos-0.1.0/tests/test_credential_resolver.py +328 -0
- hestiaos-0.1.0/tests/test_credential_vault.py +431 -0
- hestiaos-0.1.0/tests/test_crt_drift_compliance.py +667 -0
- hestiaos-0.1.0/tests/test_crt_drift_fixtures.py +218 -0
- hestiaos-0.1.0/tests/test_crt_drift_injection.py +1210 -0
- hestiaos-0.1.0/tests/test_crt_serialization.py +331 -0
- hestiaos-0.1.0/tests/test_crypto_adapter.py +352 -0
- hestiaos-0.1.0/tests/test_curiosity_scorer.py +36 -0
- hestiaos-0.1.0/tests/test_curiosity_workflow.py +74 -0
- hestiaos-0.1.0/tests/test_data_protection.py +446 -0
- hestiaos-0.1.0/tests/test_decision_engine.py +462 -0
- hestiaos-0.1.0/tests/test_deterministic_budgeting.py +167 -0
- hestiaos-0.1.0/tests/test_drift_engine.py +413 -0
- hestiaos-0.1.0/tests/test_drift_monitor.py +170 -0
- hestiaos-0.1.0/tests/test_drift_policy.py +207 -0
- hestiaos-0.1.0/tests/test_dsgk_enforcement.py +1987 -0
- hestiaos-0.1.0/tests/test_dual_gate_protocol.py +666 -0
- hestiaos-0.1.0/tests/test_e2e.py +67 -0
- hestiaos-0.1.0/tests/test_embedding_integration.py +336 -0
- hestiaos-0.1.0/tests/test_embedding_rag_foundation.py +660 -0
- hestiaos-0.1.0/tests/test_encryption_system.py +245 -0
- hestiaos-0.1.0/tests/test_end_to_end_fix_accuracy_workflow.py +408 -0
- hestiaos-0.1.0/tests/test_end_to_end_flow.py +203 -0
- hestiaos-0.1.0/tests/test_end_to_end_validation.py +213 -0
- hestiaos-0.1.0/tests/test_enhanced_security_v4.py +79 -0
- hestiaos-0.1.0/tests/test_enterprise_export.py +68 -0
- hestiaos-0.1.0/tests/test_event_bus_contract.py +218 -0
- hestiaos-0.1.0/tests/test_execution_context.py +72 -0
- hestiaos-0.1.0/tests/test_failover_integration.py +85 -0
- hestiaos-0.1.0/tests/test_fallback_results.py +269 -0
- hestiaos-0.1.0/tests/test_file_state_cache_invalidation.py +356 -0
- hestiaos-0.1.0/tests/test_final_fix.py +197 -0
- hestiaos-0.1.0/tests/test_final_system_validation.py +220 -0
- hestiaos-0.1.0/tests/test_fix_accuracy_measurement.py +261 -0
- hestiaos-0.1.0/tests/test_fix_verification.py +163 -0
- hestiaos-0.1.0/tests/test_fixed_routing.py +217 -0
- hestiaos-0.1.0/tests/test_full_pipeline.py +168 -0
- hestiaos-0.1.0/tests/test_gateway_routing.py +175 -0
- hestiaos-0.1.0/tests/test_german_reasoning.py +242 -0
- hestiaos-0.1.0/tests/test_ghost_writer.py +84 -0
- hestiaos-0.1.0/tests/test_ghostwriter_fix.py +172 -0
- hestiaos-0.1.0/tests/test_governance_bridge.py +454 -0
- hestiaos-0.1.0/tests/test_governance_hardening.py +350 -0
- hestiaos-0.1.0/tests/test_governed_reasoning.py +268 -0
- hestiaos-0.1.0/tests/test_hardware_identity.py +67 -0
- hestiaos-0.1.0/tests/test_hardware_security.py +110 -0
- hestiaos-0.1.0/tests/test_hsp_cache.py +523 -0
- hestiaos-0.1.0/tests/test_ibm_agent_integration.py +50 -0
- hestiaos-0.1.0/tests/test_integration.py +35 -0
- hestiaos-0.1.0/tests/test_intelligence_integration.py +104 -0
- hestiaos-0.1.0/tests/test_invariant_canon.py +775 -0
- hestiaos-0.1.0/tests/test_invariant_consumers.py +241 -0
- hestiaos-0.1.0/tests/test_ir_models.py +625 -0
- hestiaos-0.1.0/tests/test_ir_semantic_kernel.py +915 -0
- hestiaos-0.1.0/tests/test_kpi_metrics.py +166 -0
- hestiaos-0.1.0/tests/test_kpi_simple.py +222 -0
- hestiaos-0.1.0/tests/test_load_balancing.py +54 -0
- hestiaos-0.1.0/tests/test_matrix_gateway.py +59 -0
- hestiaos-0.1.0/tests/test_mcp_memory.py +74 -0
- hestiaos-0.1.0/tests/test_mem0_embedding_v1.py +43 -0
- hestiaos-0.1.0/tests/test_memory_client.py +68 -0
- hestiaos-0.1.0/tests/test_memory_ranking.py +361 -0
- hestiaos-0.1.0/tests/test_memory_sync.py +63 -0
- hestiaos-0.1.0/tests/test_middleware_v2_integration.py +269 -0
- hestiaos-0.1.0/tests/test_mobile_access.py +196 -0
- hestiaos-0.1.0/tests/test_mode_boundaries.py +94 -0
- hestiaos-0.1.0/tests/test_model_authority_snapshot_swap.py +121 -0
- hestiaos-0.1.0/tests/test_multi_tenant_rbac.py +48 -0
- hestiaos-0.1.0/tests/test_n8n_webhook_bridge.py +538 -0
- hestiaos-0.1.0/tests/test_nc_api_direct.py +83 -0
- hestiaos-0.1.0/tests/test_nc_chat_v2.py +23 -0
- hestiaos-0.1.0/tests/test_nc_connection.py +43 -0
- hestiaos-0.1.0/tests/test_nc_v4.py +28 -0
- hestiaos-0.1.0/tests/test_nextcloud_poller.py +120 -0
- hestiaos-0.1.0/tests/test_nextcloud_talk_plugin.py +73 -0
- hestiaos-0.1.0/tests/test_nextcloud_talk_plugin_updated.py +140 -0
- hestiaos-0.1.0/tests/test_nextcloud_talk_response_guarantee.py +214 -0
- hestiaos-0.1.0/tests/test_now.py +93 -0
- hestiaos-0.1.0/tests/test_observability_phase_e.py +784 -0
- hestiaos-0.1.0/tests/test_ocs_api.py +93 -0
- hestiaos-0.1.0/tests/test_orchestrator_execution_adapter.py +629 -0
- hestiaos-0.1.0/tests/test_outbound.py +233 -0
- hestiaos-0.1.0/tests/test_outbound_post.py +284 -0
- hestiaos-0.1.0/tests/test_output_sanitization.py +174 -0
- hestiaos-0.1.0/tests/test_output_sanitization_final.py +137 -0
- hestiaos-0.1.0/tests/test_pathway_optimizer.py +40 -0
- hestiaos-0.1.0/tests/test_performance_simple.py +195 -0
- hestiaos-0.1.0/tests/test_phase0_g0_integration.py +675 -0
- hestiaos-0.1.0/tests/test_phase10_skills.py +1352 -0
- hestiaos-0.1.0/tests/test_phase12_self_stabilizing_kernel.py +315 -0
- hestiaos-0.1.0/tests/test_phase1_5_reality_injection.py +421 -0
- hestiaos-0.1.0/tests/test_phase2_consciousness.py +1 -0
- hestiaos-0.1.0/tests/test_phase7_in_process_swarming.py +320 -0
- hestiaos-0.1.0/tests/test_phase8_agent_integration.py +229 -0
- hestiaos-0.1.0/tests/test_phase9_validation_suite.py +528 -0
- hestiaos-0.1.0/tests/test_plugin_loader.py +29 -0
- hestiaos-0.1.0/tests/test_plugin_manager_permanent.py +85 -0
- hestiaos-0.1.0/tests/test_plugin_reload.py +144 -0
- hestiaos-0.1.0/tests/test_plugin_validation.py +0 -0
- hestiaos-0.1.0/tests/test_pm_integration_v2.py +102 -0
- hestiaos-0.1.0/tests/test_postgres_persistence.py +384 -0
- hestiaos-0.1.0/tests/test_postgres_persistence_sqlite.py +420 -0
- hestiaos-0.1.0/tests/test_predictive_drift.py +337 -0
- hestiaos-0.1.0/tests/test_privacy_controls.py +698 -0
- hestiaos-0.1.0/tests/test_production_integration.py +20 -0
- hestiaos-0.1.0/tests/test_query_engine.py +359 -0
- hestiaos-0.1.0/tests/test_ralph_loop.py +33 -0
- hestiaos-0.1.0/tests/test_ralph_orchestrator.py +387 -0
- hestiaos-0.1.0/tests/test_rbac_api_guards_v5.py +81 -0
- hestiaos-0.1.0/tests/test_rbac_enforcement.py +639 -0
- hestiaos-0.1.0/tests/test_rbac_permissions.py +332 -0
- hestiaos-0.1.0/tests/test_rbac_roles.py +243 -0
- hestiaos-0.1.0/tests/test_real_hestiaos_tool_orchestration.py +325 -0
- hestiaos-0.1.0/tests/test_real_wave_v1.py +61 -0
- hestiaos-0.1.0/tests/test_real_world_fix_engine.py +300 -0
- hestiaos-0.1.0/tests/test_real_world_tool_orchestration.py +468 -0
- hestiaos-0.1.0/tests/test_roo_integration.py +169 -0
- hestiaos-0.1.0/tests/test_routing_decisions.py +267 -0
- hestiaos-0.1.0/tests/test_routing_determinism.py +580 -0
- hestiaos-0.1.0/tests/test_routing_diag.py +24 -0
- hestiaos-0.1.0/tests/test_routing_duplication.py +135 -0
- hestiaos-0.1.0/tests/test_routing_intelligence_health_model.py +488 -0
- hestiaos-0.1.0/tests/test_routing_intelligence_metrics.py +335 -0
- hestiaos-0.1.0/tests/test_routing_intelligence_policy.py +481 -0
- hestiaos-0.1.0/tests/test_routing_intelligence_scoring.py +385 -0
- hestiaos-0.1.0/tests/test_routing_robustness.py +77 -0
- hestiaos-0.1.0/tests/test_sandbox.py +50 -0
- hestiaos-0.1.0/tests/test_science_edition.py +130 -0
- hestiaos-0.1.0/tests/test_science_edition_final.py +76 -0
- hestiaos-0.1.0/tests/test_science_phase2.py +72 -0
- hestiaos-0.1.0/tests/test_sdk_client.py +397 -0
- hestiaos-0.1.0/tests/test_security.py +61 -0
- hestiaos-0.1.0/tests/test_security_vault.py +54 -0
- hestiaos-0.1.0/tests/test_semantic_intent.py +431 -0
- hestiaos-0.1.0/tests/test_send_fix.py +165 -0
- hestiaos-0.1.0/tests/test_service_accounts.py +470 -0
- hestiaos-0.1.0/tests/test_service_accounts_api.py +423 -0
- hestiaos-0.1.0/tests/test_service_accounts_integration.py +425 -0
- hestiaos-0.1.0/tests/test_system_arbitration.py +181 -0
- hestiaos-0.1.0/tests/test_system_startup.py +76 -0
- hestiaos-0.1.0/tests/test_system_stress.py +140 -0
- hestiaos-0.1.0/tests/test_temporal_navigation.py +587 -0
- hestiaos-0.1.0/tests/test_temporal_vibe.py +363 -0
- hestiaos-0.1.0/tests/test_tenant_isolation.py +118 -0
- hestiaos-0.1.0/tests/test_tenant_manager.py +381 -0
- hestiaos-0.1.0/tests/test_three_tier_memory_system.py +399 -0
- hestiaos-0.1.0/tests/test_token_budgeting.py +43 -0
- hestiaos-0.1.0/tests/test_tombstoning.py +280 -0
- hestiaos-0.1.0/tests/test_tombstoning_simple.py +94 -0
- hestiaos-0.1.0/tests/test_tool_capability.py +43 -0
- hestiaos-0.1.0/tests/test_tool_orchestration_aggregation.py +233 -0
- hestiaos-0.1.0/tests/test_tool_orchestration_policy.py +254 -0
- hestiaos-0.1.0/tests/test_tool_result_budgeting.py +329 -0
- hestiaos-0.1.0/tests/test_tool_routing.py +398 -0
- hestiaos-0.1.0/tests/test_triple_agent.py +67 -0
- hestiaos-0.1.0/tests/test_ultron_protocol.py +65 -0
- hestiaos-0.1.0/tests/test_v1_evolutionary_system.py +462 -0
- hestiaos-0.1.0/tests/test_v1_integration.py +223 -0
- hestiaos-0.1.0/tests/test_v8_hardening.py +81 -0
- hestiaos-0.1.0/tests/test_v9_observability.py +126 -0
- hestiaos-0.1.0/tests/test_vector_sync.py +92 -0
- hestiaos-0.1.0/tests/test_vllm_direct.py +175 -0
- hestiaos-0.1.0/tests/test_vllm_integration.py +215 -0
- hestiaos-0.1.0/tests/test_vllm_tool_calling.py +183 -0
- hestiaos-0.1.0/tests/test_wave.py +20 -0
- hestiaos-0.1.0/tests/test_wave_encryption.py +58 -0
- hestiaos-0.1.0/tests/test_wave_engine_v1.py +62 -0
- hestiaos-0.1.0/tests/test_wave_store.py +120 -0
- hestiaos-0.1.0/tests/test_wave_store_db.py +308 -0
- hestiaos-0.1.0/tests/test_wave_sync_logic.py +80 -0
- hestiaos-0.1.0/tests/test_waves_api.py +813 -0
- hestiaos-0.1.0/tests/test_waves_api_simple.py +170 -0
- hestiaos-0.1.0/tests/test_workflow_dsl_context.py +167 -0
- hestiaos-0.1.0/tests/test_workflow_dsl_execution_controller.py +329 -0
- hestiaos-0.1.0/tests/test_workflow_dsl_executor.py +311 -0
- hestiaos-0.1.0/tests/test_workflow_dsl_expressions.py +182 -0
- hestiaos-0.1.0/tests/test_workflow_dsl_graph.py +144 -0
- hestiaos-0.1.0/tests/test_workflow_dsl_models.py +274 -0
- hestiaos-0.1.0/tests/test_workflow_dsl_registry.py +144 -0
- hestiaos-0.1.0/tests/test_workflow_dsl_run_state_machine.py +198 -0
- hestiaos-0.1.0/tests/test_workflow_dsl_run_store.py +361 -0
- hestiaos-0.1.0/tests/test_workflow_dsl_step_tracker.py +269 -0
- hestiaos-0.1.0/tests/test_workflow_dsl_triggers.py +216 -0
- hestiaos-0.1.0/tests/test_writer_memory.py +222 -0
- 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.
|
hestiaos-0.1.0/PKG-INFO
ADDED
|
@@ -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
|
+
[](https://pypi.org/project/hestiaos/)
|
|
27
|
+
[](https://pypi.org/project/hestiaos/)
|
|
28
|
+
[](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).
|
hestiaos-0.1.0/README.md
ADDED
|
@@ -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
|
+
[](https://pypi.org/project/hestiaos/)
|
|
6
|
+
[](https://pypi.org/project/hestiaos/)
|
|
7
|
+
[](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"]
|
hestiaos-0.1.0/setup.cfg
ADDED
hestiaos-0.1.0/setup.py
ADDED
|
@@ -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()
|