dharta-runtime 0.6.77__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.
- dharta_runtime-0.6.77/LICENSE +21 -0
- dharta_runtime-0.6.77/PKG-INFO +429 -0
- dharta_runtime-0.6.77/README.md +350 -0
- dharta_runtime-0.6.77/pyproject.toml +172 -0
- dharta_runtime-0.6.77/src/dharta/__init__.py +46 -0
- dharta_runtime-0.6.77/src/dharta/__main__.py +4 -0
- dharta_runtime-0.6.77/src/dharta/active_releases.py +243 -0
- dharta_runtime-0.6.77/src/dharta/agent.py +59 -0
- dharta_runtime-0.6.77/src/dharta/agent_builder_surface_authority.py +326 -0
- dharta_runtime-0.6.77/src/dharta/agent_runtime.py +290 -0
- dharta_runtime-0.6.77/src/dharta/app.py +757 -0
- dharta_runtime-0.6.77/src/dharta/artifacts/__init__.py +227 -0
- dharta_runtime-0.6.77/src/dharta/artifacts/agent_activation.py +146 -0
- dharta_runtime-0.6.77/src/dharta/artifacts/agent_activation_authority.py +204 -0
- dharta_runtime-0.6.77/src/dharta/artifacts/agent_activation_transport.py +148 -0
- dharta_runtime-0.6.77/src/dharta/artifacts/agent_delegation_contract.py +284 -0
- dharta_runtime-0.6.77/src/dharta/artifacts/agent_package.py +74 -0
- dharta_runtime-0.6.77/src/dharta/artifacts/agentcore_renderer_backend.py +1284 -0
- dharta_runtime-0.6.77/src/dharta/artifacts/artifact-runtime.json +750 -0
- dharta_runtime-0.6.77/src/dharta/artifacts/builtin_runner.py +230 -0
- dharta_runtime-0.6.77/src/dharta/artifacts/builtin_views.py +181 -0
- dharta_runtime-0.6.77/src/dharta/artifacts/cli.py +391 -0
- dharta_runtime-0.6.77/src/dharta/artifacts/contract.py +328 -0
- dharta_runtime-0.6.77/src/dharta/artifacts/contract_generated.py +204 -0
- dharta_runtime-0.6.77/src/dharta/artifacts/executable_ingest.py +305 -0
- dharta_runtime-0.6.77/src/dharta/artifacts/executable_models.py +202 -0
- dharta_runtime-0.6.77/src/dharta/artifacts/execution_coordinator.py +109 -0
- dharta_runtime-0.6.77/src/dharta/artifacts/execution_cost.py +77 -0
- dharta_runtime-0.6.77/src/dharta/artifacts/execution_materializer.py +351 -0
- dharta_runtime-0.6.77/src/dharta/artifacts/execution_service.py +118 -0
- dharta_runtime-0.6.77/src/dharta/artifacts/grounded.py +108 -0
- dharta_runtime-0.6.77/src/dharta/artifacts/helper.py +326 -0
- dharta_runtime-0.6.77/src/dharta/artifacts/http_gateway.py +525 -0
- dharta_runtime-0.6.77/src/dharta/artifacts/index.py +246 -0
- dharta_runtime-0.6.77/src/dharta/artifacts/ingest.py +492 -0
- dharta_runtime-0.6.77/src/dharta/artifacts/injection.py +85 -0
- dharta_runtime-0.6.77/src/dharta/artifacts/legacy_adapter.py +84 -0
- dharta_runtime-0.6.77/src/dharta/artifacts/manifest.py +193 -0
- dharta_runtime-0.6.77/src/dharta/artifacts/manifest_store.py +208 -0
- dharta_runtime-0.6.77/src/dharta/artifacts/pack_export.py +408 -0
- dharta_runtime-0.6.77/src/dharta/artifacts/portable_execution_pack.py +255 -0
- dharta_runtime-0.6.77/src/dharta/artifacts/portable_pack_codec.py +206 -0
- dharta_runtime-0.6.77/src/dharta/artifacts/portable_pack_contract.py +224 -0
- dharta_runtime-0.6.77/src/dharta/artifacts/portable_pack_files.py +352 -0
- dharta_runtime-0.6.77/src/dharta/artifacts/portable_share_runtime.py +42 -0
- dharta_runtime-0.6.77/src/dharta/artifacts/portable_share_service.py +61 -0
- dharta_runtime-0.6.77/src/dharta/artifacts/presentation.py +209 -0
- dharta_runtime-0.6.77/src/dharta/artifacts/records.py +395 -0
- dharta_runtime-0.6.77/src/dharta/artifacts/release_context.py +68 -0
- dharta_runtime-0.6.77/src/dharta/artifacts/runner_cli.py +116 -0
- dharta_runtime-0.6.77/src/dharta/artifacts/runner_supervisor.py +789 -0
- dharta_runtime-0.6.77/src/dharta/artifacts/s3_posix_tree.py +716 -0
- dharta_runtime-0.6.77/src/dharta/artifacts/share_pack.py +729 -0
- dharta_runtime-0.6.77/src/dharta/artifacts/share_retention.py +77 -0
- dharta_runtime-0.6.77/src/dharta/artifacts/skill/SKILL.md +232 -0
- dharta_runtime-0.6.77/src/dharta/artifacts/snapshot_coordinator.py +180 -0
- dharta_runtime-0.6.77/src/dharta/artifacts/supervisor_transport.py +110 -0
- dharta_runtime-0.6.77/src/dharta/artifacts/tree_resolver.py +457 -0
- dharta_runtime-0.6.77/src/dharta/artifacts/types.py +244 -0
- dharta_runtime-0.6.77/src/dharta/billing/__init__.py +23 -0
- dharta_runtime-0.6.77/src/dharta/billing/agentcore_resource_aggregation.py +246 -0
- dharta_runtime-0.6.77/src/dharta/billing/agentcore_resource_collector.py +639 -0
- dharta_runtime-0.6.77/src/dharta/billing/agentcore_resource_gaps.py +313 -0
- dharta_runtime-0.6.77/src/dharta/billing/agentcore_resource_schema.py +148 -0
- dharta_runtime-0.6.77/src/dharta/billing/agentcore_resource_store.py +317 -0
- dharta_runtime-0.6.77/src/dharta/billing/agentcore_usage_delivery.py +221 -0
- dharta_runtime-0.6.77/src/dharta/billing/agentcore_usage_logs.py +238 -0
- dharta_runtime-0.6.77/src/dharta/billing/invocation_emitter.py +483 -0
- dharta_runtime-0.6.77/src/dharta/billing/telemetry_event_contract.py +282 -0
- dharta_runtime-0.6.77/src/dharta/billing/telemetry_identity.py +53 -0
- dharta_runtime-0.6.77/src/dharta/billing/telemetry_microvm_bindings.py +142 -0
- dharta_runtime-0.6.77/src/dharta/billing/telemetry_outbox.py +442 -0
- dharta_runtime-0.6.77/src/dharta/billing/telemetry_outbox_schema.py +71 -0
- dharta_runtime-0.6.77/src/dharta/billing/turn_admission.py +349 -0
- dharta_runtime-0.6.77/src/dharta/billing/turn_payload_contract.py +160 -0
- dharta_runtime-0.6.77/src/dharta/billing/usage_emitter.py +794 -0
- dharta_runtime-0.6.77/src/dharta/billing/usage_outbox.py +1461 -0
- dharta_runtime-0.6.77/src/dharta/billing/usage_outbox_schema.py +566 -0
- dharta_runtime-0.6.77/src/dharta/browser_url_policy.py +41 -0
- dharta_runtime-0.6.77/src/dharta/builder.py +222 -0
- dharta_runtime-0.6.77/src/dharta/byok.py +224 -0
- dharta_runtime-0.6.77/src/dharta/cache.py +257 -0
- dharta_runtime-0.6.77/src/dharta/capture_contract.py +88 -0
- dharta_runtime-0.6.77/src/dharta/cli.py +913 -0
- dharta_runtime-0.6.77/src/dharta/cli_renderer.py +248 -0
- dharta_runtime-0.6.77/src/dharta/connector.py +42 -0
- dharta_runtime-0.6.77/src/dharta/consumer/__init__.py +7 -0
- dharta_runtime-0.6.77/src/dharta/consumer/activity.py +708 -0
- dharta_runtime-0.6.77/src/dharta/consumer/agent_origins.py +98 -0
- dharta_runtime-0.6.77/src/dharta/consumer/challenge.py +116 -0
- dharta_runtime-0.6.77/src/dharta/consumer/context_envelope.py +231 -0
- dharta_runtime-0.6.77/src/dharta/consumer/embed.py +411 -0
- dharta_runtime-0.6.77/src/dharta/consumer/event_log.py +244 -0
- dharta_runtime-0.6.77/src/dharta/consumer/events.py +182 -0
- dharta_runtime-0.6.77/src/dharta/consumer/managed_agents.py +297 -0
- dharta_runtime-0.6.77/src/dharta/consumer/openai_chat.py +113 -0
- dharta_runtime-0.6.77/src/dharta/consumer/openai_responses.py +137 -0
- dharta_runtime-0.6.77/src/dharta/consumer/session_token.py +35 -0
- dharta_runtime-0.6.77/src/dharta/consumer/tasks.py +326 -0
- dharta_runtime-0.6.77/src/dharta/consumer/transcript.py +243 -0
- dharta_runtime-0.6.77/src/dharta/consumer/turn_projection.py +118 -0
- dharta_runtime-0.6.77/src/dharta/consumer/wire_events.py +91 -0
- dharta_runtime-0.6.77/src/dharta/control_plane.py +372 -0
- dharta_runtime-0.6.77/src/dharta/di/__init__.py +32 -0
- dharta_runtime-0.6.77/src/dharta/di/allocator.py +287 -0
- dharta_runtime-0.6.77/src/dharta/di/anchor.py +191 -0
- dharta_runtime-0.6.77/src/dharta/di/audit.py +91 -0
- dharta_runtime-0.6.77/src/dharta/di/bik.py +58 -0
- dharta_runtime-0.6.77/src/dharta/di/conversation.py +155 -0
- dharta_runtime-0.6.77/src/dharta/di/crypto.py +100 -0
- dharta_runtime-0.6.77/src/dharta/di/envelope.py +73 -0
- dharta_runtime-0.6.77/src/dharta/di/instance_token.py +86 -0
- dharta_runtime-0.6.77/src/dharta/di/keys.py +250 -0
- dharta_runtime-0.6.77/src/dharta/di/leak_guard.py +112 -0
- dharta_runtime-0.6.77/src/dharta/di/lifecycle.py +88 -0
- dharta_runtime-0.6.77/src/dharta/di/object_cipher.py +364 -0
- dharta_runtime-0.6.77/src/dharta/di/revocation.py +155 -0
- dharta_runtime-0.6.77/src/dharta/di/tenant.py +149 -0
- dharta_runtime-0.6.77/src/dharta/durable/__init__.py +22 -0
- dharta_runtime-0.6.77/src/dharta/durable/local.py +112 -0
- dharta_runtime-0.6.77/src/dharta/durable/port.py +24 -0
- dharta_runtime-0.6.77/src/dharta/durable/s3.py +117 -0
- dharta_runtime-0.6.77/src/dharta/end_user_context.py +239 -0
- dharta_runtime-0.6.77/src/dharta/env_policy.py +85 -0
- dharta_runtime-0.6.77/src/dharta/events.py +21 -0
- dharta_runtime-0.6.77/src/dharta/execution/__init__.py +24 -0
- dharta_runtime-0.6.77/src/dharta/execution/fake.py +78 -0
- dharta_runtime-0.6.77/src/dharta/execution/port.py +85 -0
- dharta_runtime-0.6.77/src/dharta/gateway/__init__.py +15 -0
- dharta_runtime-0.6.77/src/dharta/gateway/base.py +29 -0
- dharta_runtime-0.6.77/src/dharta/gateway/events.py +73 -0
- dharta_runtime-0.6.77/src/dharta/gateway/http.py +80 -0
- dharta_runtime-0.6.77/src/dharta/gateway/local.py +151 -0
- dharta_runtime-0.6.77/src/dharta/gateway/registry.py +65 -0
- dharta_runtime-0.6.77/src/dharta/genui/__init__.py +29 -0
- dharta_runtime-0.6.77/src/dharta/genui/bundle.py +179 -0
- dharta_runtime-0.6.77/src/dharta/genui/injection.py +87 -0
- dharta_runtime-0.6.77/src/dharta/genui/manifest.py +133 -0
- dharta_runtime-0.6.77/src/dharta/genui/skill/SKILL.md +114 -0
- dharta_runtime-0.6.77/src/dharta/harness/__init__.py +4 -0
- dharta_runtime-0.6.77/src/dharta/harness/account_mcp.py +189 -0
- dharta_runtime-0.6.77/src/dharta/harness/base.py +492 -0
- dharta_runtime-0.6.77/src/dharta/harness/claude.py +697 -0
- dharta_runtime-0.6.77/src/dharta/harness/claude_message_mapper.py +899 -0
- dharta_runtime-0.6.77/src/dharta/harness/claude_runtime.py +777 -0
- dharta_runtime-0.6.77/src/dharta/harness/claude_runtime_types.py +253 -0
- dharta_runtime-0.6.77/src/dharta/harness/codex.py +665 -0
- dharta_runtime-0.6.77/src/dharta/harness/config_env.py +101 -0
- dharta_runtime-0.6.77/src/dharta/harness/deepagents.py +750 -0
- dharta_runtime-0.6.77/src/dharta/harness/factory.py +91 -0
- dharta_runtime-0.6.77/src/dharta/harness/gateway_usage.py +84 -0
- dharta_runtime-0.6.77/src/dharta/harness/goose.py +767 -0
- dharta_runtime-0.6.77/src/dharta/harness/opencode.py +610 -0
- dharta_runtime-0.6.77/src/dharta/harness/platform_context.py +100 -0
- dharta_runtime-0.6.77/src/dharta/harness/spec.py +173 -0
- dharta_runtime-0.6.77/src/dharta/harness/stub.py +301 -0
- dharta_runtime-0.6.77/src/dharta/harness/subprocess.py +343 -0
- dharta_runtime-0.6.77/src/dharta/harness/utils.py +103 -0
- dharta_runtime-0.6.77/src/dharta/harness/wakeups_mcp.py +218 -0
- dharta_runtime-0.6.77/src/dharta/host_assets.py +64 -0
- dharta_runtime-0.6.77/src/dharta/instance.py +739 -0
- dharta_runtime-0.6.77/src/dharta/model_broker_quota_contracts.py +153 -0
- dharta_runtime-0.6.77/src/dharta/model_broker_transport_contracts/__init__.py +101 -0
- dharta_runtime-0.6.77/src/dharta/model_broker_transport_contracts/_common.py +239 -0
- dharta_runtime-0.6.77/src/dharta/model_broker_transport_contracts/binding.py +282 -0
- dharta_runtime-0.6.77/src/dharta/model_broker_transport_contracts/relay.py +320 -0
- dharta_runtime-0.6.77/src/dharta/model_broker_transport_contracts/request.py +642 -0
- dharta_runtime-0.6.77/src/dharta/model_broker_transport_contracts/spool.py +489 -0
- dharta_runtime-0.6.77/src/dharta/model_broker_transport_contracts/spool_reader.py +455 -0
- dharta_runtime-0.6.77/src/dharta/model_broker_transport_contracts/spool_sequence.py +188 -0
- dharta_runtime-0.6.77/src/dharta/model_broker_transport_contracts/verification.py +417 -0
- dharta_runtime-0.6.77/src/dharta/model_connector_adapter_registry.py +708 -0
- dharta_runtime-0.6.77/src/dharta/model_contracts.py +2483 -0
- dharta_runtime-0.6.77/src/dharta/model_egress_contracts/__init__.py +85 -0
- dharta_runtime-0.6.77/src/dharta/model_egress_contracts/_common.py +365 -0
- dharta_runtime-0.6.77/src/dharta/model_egress_contracts/bedrock_capability.py +699 -0
- dharta_runtime-0.6.77/src/dharta/model_egress_contracts/dispatch_authorization.py +383 -0
- dharta_runtime-0.6.77/src/dharta/model_egress_contracts/dispatch_context.py +146 -0
- dharta_runtime-0.6.77/src/dharta/model_egress_contracts/endpoint_policy.py +488 -0
- dharta_runtime-0.6.77/src/dharta/model_egress_contracts/exact_grant.py +652 -0
- dharta_runtime-0.6.77/src/dharta/model_egress_contracts/manifest.py +878 -0
- dharta_runtime-0.6.77/src/dharta/model_egress_contracts/manifest_verification.py +290 -0
- dharta_runtime-0.6.77/src/dharta/model_endpoint_policy.py +95 -0
- dharta_runtime-0.6.77/src/dharta/model_failure.py +248 -0
- dharta_runtime-0.6.77/src/dharta/model_gateway.py +1745 -0
- dharta_runtime-0.6.77/src/dharta/model_http_transport.py +106 -0
- dharta_runtime-0.6.77/src/dharta/model_readiness.py +348 -0
- dharta_runtime-0.6.77/src/dharta/model_readiness_credentials.py +199 -0
- dharta_runtime-0.6.77/src/dharta/model_route.py +867 -0
- dharta_runtime-0.6.77/src/dharta/model_settings.py +691 -0
- dharta_runtime-0.6.77/src/dharta/observability/__init__.py +172 -0
- dharta_runtime-0.6.77/src/dharta/observability/_noop.py +75 -0
- dharta_runtime-0.6.77/src/dharta/observability/_otel.py +104 -0
- dharta_runtime-0.6.77/src/dharta/observability/attribute_policy.py +217 -0
- dharta_runtime-0.6.77/src/dharta/observability/gen_ai_emitter.py +547 -0
- dharta_runtime-0.6.77/src/dharta/observability/gen_ai_semconv.py +76 -0
- dharta_runtime-0.6.77/src/dharta/observability/log_metric_policy.py +132 -0
- dharta_runtime-0.6.77/src/dharta/observability/logging_setup.py +100 -0
- dharta_runtime-0.6.77/src/dharta/observability/metrics.py +107 -0
- dharta_runtime-0.6.77/src/dharta/observability/secret_redaction.py +96 -0
- dharta_runtime-0.6.77/src/dharta/observability/sentry.py +154 -0
- dharta_runtime-0.6.77/src/dharta/observability/stream_event_contract.py +87 -0
- dharta_runtime-0.6.77/src/dharta/observability/trace_propagation.py +88 -0
- dharta_runtime-0.6.77/src/dharta/participant.py +55 -0
- dharta_runtime-0.6.77/src/dharta/persistence/__init__.py +44 -0
- dharta_runtime-0.6.77/src/dharta/persistence/encrypting_backend.py +44 -0
- dharta_runtime-0.6.77/src/dharta/persistence/erase.py +130 -0
- dharta_runtime-0.6.77/src/dharta/persistence/fork.py +241 -0
- dharta_runtime-0.6.77/src/dharta/persistence/gc.py +823 -0
- dharta_runtime-0.6.77/src/dharta/persistence/local_backend.py +220 -0
- dharta_runtime-0.6.77/src/dharta/persistence/manifest.py +148 -0
- dharta_runtime-0.6.77/src/dharta/persistence/pack.py +243 -0
- dharta_runtime-0.6.77/src/dharta/persistence/profile.py +216 -0
- dharta_runtime-0.6.77/src/dharta/persistence/reconcile.py +76 -0
- dharta_runtime-0.6.77/src/dharta/persistence/s3_backend.py +341 -0
- dharta_runtime-0.6.77/src/dharta/persistence/setup_pack.py +206 -0
- dharta_runtime-0.6.77/src/dharta/persistence/store.py +1348 -0
- dharta_runtime-0.6.77/src/dharta/persistence/stress.py +539 -0
- dharta_runtime-0.6.77/src/dharta/persistence/text_merge.py +70 -0
- dharta_runtime-0.6.77/src/dharta/persistence/workspace_paths.py +60 -0
- dharta_runtime-0.6.77/src/dharta/persistence/workspace_snapshot.py +584 -0
- dharta_runtime-0.6.77/src/dharta/policies.py +29 -0
- dharta_runtime-0.6.77/src/dharta/preview_admission.py +147 -0
- dharta_runtime-0.6.77/src/dharta/preview_model_broker.py +510 -0
- dharta_runtime-0.6.77/src/dharta/preview_model_readiness.py +619 -0
- dharta_runtime-0.6.77/src/dharta/preview_runtime_probe.py +128 -0
- dharta_runtime-0.6.77/src/dharta/preview_runtime_proof.py +110 -0
- dharta_runtime-0.6.77/src/dharta/preview_storage_reconcile.py +121 -0
- dharta_runtime-0.6.77/src/dharta/registry.py +137 -0
- dharta_runtime-0.6.77/src/dharta/release_artifacts.py +349 -0
- dharta_runtime-0.6.77/src/dharta/release_model_intent.py +638 -0
- dharta_runtime-0.6.77/src/dharta/releases.py +1090 -0
- dharta_runtime-0.6.77/src/dharta/response.py +175 -0
- dharta_runtime-0.6.77/src/dharta/runtime/__init__.py +3 -0
- dharta_runtime-0.6.77/src/dharta/runtime/turn_accumulator.py +231 -0
- dharta_runtime-0.6.77/src/dharta/secrets_bootstrap.py +88 -0
- dharta_runtime-0.6.77/src/dharta/server/__init__.py +22 -0
- dharta_runtime-0.6.77/src/dharta/server/agentcore.py +755 -0
- dharta_runtime-0.6.77/src/dharta/server/agentcore_agent_runtime.py +879 -0
- dharta_runtime-0.6.77/src/dharta/server/agentcore_client.py +979 -0
- dharta_runtime-0.6.77/src/dharta/server/agentcore_client_config.py +356 -0
- dharta_runtime-0.6.77/src/dharta/server/agentcore_client_types.py +130 -0
- dharta_runtime-0.6.77/src/dharta/server/agentcore_gateway_client.py +96 -0
- dharta_runtime-0.6.77/src/dharta/server/agentcore_internal_frames.py +769 -0
- dharta_runtime-0.6.77/src/dharta/server/agentcore_quota.py +120 -0
- dharta_runtime-0.6.77/src/dharta/server/agentcore_router.py +545 -0
- dharta_runtime-0.6.77/src/dharta/server/agentcore_serve.py +552 -0
- dharta_runtime-0.6.77/src/dharta/server/agentcore_session_socket.py +121 -0
- dharta_runtime-0.6.77/src/dharta/server/agentcore_sessions.py +125 -0
- dharta_runtime-0.6.77/src/dharta/server/agentcore_stream.py +65 -0
- dharta_runtime-0.6.77/src/dharta/server/agentcore_turn_recorder.py +175 -0
- dharta_runtime-0.6.77/src/dharta/server/agentcore_workspace.py +899 -0
- dharta_runtime-0.6.77/src/dharta/server/approval_store.py +506 -0
- dharta_runtime-0.6.77/src/dharta/server/artifact_browser_policy.py +252 -0
- dharta_runtime-0.6.77/src/dharta/server/artifact_execution_sessions.py +314 -0
- dharta_runtime-0.6.77/src/dharta/server/artifact_qualification_runtime.py +74 -0
- dharta_runtime-0.6.77/src/dharta/server/artifact_renderer.py +1051 -0
- dharta_runtime-0.6.77/src/dharta/server/artifact_runtime_binding.py +44 -0
- dharta_runtime-0.6.77/src/dharta/server/artifact_runtime_serve.py +190 -0
- dharta_runtime-0.6.77/src/dharta/server/artifact_sandbox.py +923 -0
- dharta_runtime-0.6.77/src/dharta/server/artifact_share_routes.py +380 -0
- dharta_runtime-0.6.77/src/dharta/server/artifact_stream_bridge.py +173 -0
- dharta_runtime-0.6.77/src/dharta/server/artifact_surface_routes.py +527 -0
- dharta_runtime-0.6.77/src/dharta/server/auth.py +1111 -0
- dharta_runtime-0.6.77/src/dharta/server/body_limit.py +89 -0
- dharta_runtime-0.6.77/src/dharta/server/bounded_websocket_protocol.py +108 -0
- dharta_runtime-0.6.77/src/dharta/server/consumer_chat_routes.py +219 -0
- dharta_runtime-0.6.77/src/dharta/server/consumer_routes.py +942 -0
- dharta_runtime-0.6.77/src/dharta/server/continuation_registry.py +328 -0
- dharta_runtime-0.6.77/src/dharta/server/conversation_crypto.py +202 -0
- dharta_runtime-0.6.77/src/dharta/server/conversation_store.py +960 -0
- dharta_runtime-0.6.77/src/dharta/server/conversation_transcripts.py +110 -0
- dharta_runtime-0.6.77/src/dharta/server/credential_guard.py +47 -0
- dharta_runtime-0.6.77/src/dharta/server/crypto_stores.py +214 -0
- dharta_runtime-0.6.77/src/dharta/server/di_factory.py +121 -0
- dharta_runtime-0.6.77/src/dharta/server/di_key_factory.py +57 -0
- dharta_runtime-0.6.77/src/dharta/server/di_resolver.py +99 -0
- dharta_runtime-0.6.77/src/dharta/server/embed_routes.py +358 -0
- dharta_runtime-0.6.77/src/dharta/server/end_user_context_binding.py +92 -0
- dharta_runtime-0.6.77/src/dharta/server/end_user_context_store.py +275 -0
- dharta_runtime-0.6.77/src/dharta/server/endpoint_pool.py +517 -0
- dharta_runtime-0.6.77/src/dharta/server/fastapi_app.py +704 -0
- dharta_runtime-0.6.77/src/dharta/server/first_party_access.py +32 -0
- dharta_runtime-0.6.77/src/dharta/server/git_auth.py +112 -0
- dharta_runtime-0.6.77/src/dharta/server/git_routes.py +183 -0
- dharta_runtime-0.6.77/src/dharta/server/git_transcode.py +279 -0
- dharta_runtime-0.6.77/src/dharta/server/identity.py +329 -0
- dharta_runtime-0.6.77/src/dharta/server/instance_env.py +242 -0
- dharta_runtime-0.6.77/src/dharta/server/instance_env_cache.py +114 -0
- dharta_runtime-0.6.77/src/dharta/server/instance_env_delivery.py +225 -0
- dharta_runtime-0.6.77/src/dharta/server/instance_routes.py +218 -0
- dharta_runtime-0.6.77/src/dharta/server/instance_write_lease.py +164 -0
- dharta_runtime-0.6.77/src/dharta/server/internal_ip.py +56 -0
- dharta_runtime-0.6.77/src/dharta/server/internal_routes.py +883 -0
- dharta_runtime-0.6.77/src/dharta/server/invocation_leases.py +268 -0
- dharta_runtime-0.6.77/src/dharta/server/karta_env_routes.py +194 -0
- dharta_runtime-0.6.77/src/dharta/server/lease_maintenance.py +97 -0
- dharta_runtime-0.6.77/src/dharta/server/ma_artifact_execution_routes.py +379 -0
- dharta_runtime-0.6.77/src/dharta/server/ma_artifact_route_context.py +29 -0
- dharta_runtime-0.6.77/src/dharta/server/ma_artifact_routes.py +920 -0
- dharta_runtime-0.6.77/src/dharta/server/ma_routes.py +680 -0
- dharta_runtime-0.6.77/src/dharta/server/ma_session_history_routes.py +133 -0
- dharta_runtime-0.6.77/src/dharta/server/ma_session_routes.py +627 -0
- dharta_runtime-0.6.77/src/dharta/server/ma_surface_routes.py +300 -0
- dharta_runtime-0.6.77/src/dharta/server/ma_task_routes.py +135 -0
- dharta_runtime-0.6.77/src/dharta/server/ma_workspace_downloads.py +30 -0
- dharta_runtime-0.6.77/src/dharta/server/ma_workspace_routes.py +235 -0
- dharta_runtime-0.6.77/src/dharta/server/metering.py +323 -0
- dharta_runtime-0.6.77/src/dharta/server/publication_attempts.py +466 -0
- dharta_runtime-0.6.77/src/dharta/server/publication_recovery.py +180 -0
- dharta_runtime-0.6.77/src/dharta/server/ratelimit.py +65 -0
- dharta_runtime-0.6.77/src/dharta/server/release_inventory.py +108 -0
- dharta_runtime-0.6.77/src/dharta/server/release_mapping.py +1094 -0
- dharta_runtime-0.6.77/src/dharta/server/release_publisher.py +887 -0
- dharta_runtime-0.6.77/src/dharta/server/release_reaper.py +182 -0
- dharta_runtime-0.6.77/src/dharta/server/release_tree.py +83 -0
- dharta_runtime-0.6.77/src/dharta/server/runtime_generation_store.py +265 -0
- dharta_runtime-0.6.77/src/dharta/server/runtime_rotation.py +190 -0
- dharta_runtime-0.6.77/src/dharta/server/schemas.py +621 -0
- dharta_runtime-0.6.77/src/dharta/server/serialization.py +38 -0
- dharta_runtime-0.6.77/src/dharta/server/serve_box_crypto.py +198 -0
- dharta_runtime-0.6.77/src/dharta/server/serve_host_policy.py +160 -0
- dharta_runtime-0.6.77/src/dharta/server/serve_surfaces.py +542 -0
- dharta_runtime-0.6.77/src/dharta/server/session_catalog.py +85 -0
- dharta_runtime-0.6.77/src/dharta/server/session_db.py +156 -0
- dharta_runtime-0.6.77/src/dharta/server/session_routes.py +132 -0
- dharta_runtime-0.6.77/src/dharta/server/session_store.py +479 -0
- dharta_runtime-0.6.77/src/dharta/server/sse.py +10 -0
- dharta_runtime-0.6.77/src/dharta/server/state.py +99 -0
- dharta_runtime-0.6.77/src/dharta/server/static/agent-chat/assets/agent-chat-PreviewContent.js +6 -0
- dharta_runtime-0.6.77/src/dharta/server/static/agent-chat/assets/agent-chat-pdf-renderer.js +54 -0
- dharta_runtime-0.6.77/src/dharta/server/static/agent-chat/assets/agent-chat.css +2 -0
- dharta_runtime-0.6.77/src/dharta/server/static/agent-chat/assets/agent-chat.js +178 -0
- dharta_runtime-0.6.77/src/dharta/server/static/agent-chat/assets/agent-chat.mjs +29 -0
- dharta_runtime-0.6.77/src/dharta/server/static/agent-chat/assets/pentagraph.worker-BaB5eTrj.js +1 -0
- dharta_runtime-0.6.77/src/dharta/server/static/agent-chat/fonts/dharta-arc/DhartaArc-Bold.woff2 +0 -0
- dharta_runtime-0.6.77/src/dharta/server/static/agent-chat/fonts/dharta-arc/DhartaArc-ExtraBold.woff2 +0 -0
- dharta_runtime-0.6.77/src/dharta/server/static/agent-chat/fonts/dharta-arc/DhartaArc-Medium.woff2 +0 -0
- dharta_runtime-0.6.77/src/dharta/server/static/agent-chat/fonts/dharta-arc/DhartaArc-Regular.woff2 +0 -0
- dharta_runtime-0.6.77/src/dharta/server/static/agent-chat/fonts/dharta-arc/DhartaArc-SemiBold.woff2 +0 -0
- dharta_runtime-0.6.77/src/dharta/server/static/agent-chat/fonts/dharta-arc/OFL.txt +88 -0
- dharta_runtime-0.6.77/src/dharta/server/static/agent-chat/fonts/dharta-mono/DhartaMono-Bold.woff2 +0 -0
- dharta_runtime-0.6.77/src/dharta/server/static/agent-chat/fonts/dharta-mono/DhartaMono-BoldItalic.woff2 +0 -0
- dharta_runtime-0.6.77/src/dharta/server/static/agent-chat/fonts/dharta-mono/DhartaMono-Medium.woff2 +0 -0
- dharta_runtime-0.6.77/src/dharta/server/static/agent-chat/fonts/dharta-mono/DhartaMono-MediumItalic.woff2 +0 -0
- dharta_runtime-0.6.77/src/dharta/server/static/agent-chat/fonts/dharta-mono/DhartaMono-Regular.woff2 +0 -0
- dharta_runtime-0.6.77/src/dharta/server/static/agent-chat/fonts/dharta-mono/DhartaMono-RegularItalic.woff2 +0 -0
- dharta_runtime-0.6.77/src/dharta/server/static/agent-chat/fonts/dharta-mono/DhartaMono-SemiBold.woff2 +0 -0
- dharta_runtime-0.6.77/src/dharta/server/static/agent-chat/fonts/dharta-mono/DhartaMono-SemiBoldItalic.woff2 +0 -0
- dharta_runtime-0.6.77/src/dharta/server/static/agent-chat/fonts/dharta-mono/OFL.txt +88 -0
- dharta_runtime-0.6.77/src/dharta/server/static/agent-chat/index.html +14 -0
- dharta_runtime-0.6.77/src/dharta/server/static/widget/v1/dharta.js +1 -0
- dharta_runtime-0.6.77/src/dharta/server/static/widget/v1/dharta.js.README.md +17 -0
- dharta_runtime-0.6.77/src/dharta/server/store_db.py +247 -0
- dharta_runtime-0.6.77/src/dharta/server/surface_preview_routes.py +317 -0
- dharta_runtime-0.6.77/src/dharta/server/surface_reaper.py +270 -0
- dharta_runtime-0.6.77/src/dharta/server/task_ledger.py +71 -0
- dharta_runtime-0.6.77/src/dharta/server/task_store.py +515 -0
- dharta_runtime-0.6.77/src/dharta/server/tenant_store.py +139 -0
- dharta_runtime-0.6.77/src/dharta/server/turn_admissions.py +327 -0
- dharta_runtime-0.6.77/src/dharta/server/turn_agentcore_driver.py +852 -0
- dharta_runtime-0.6.77/src/dharta/server/turn_continuations.py +378 -0
- dharta_runtime-0.6.77/src/dharta/server/turn_failure.py +78 -0
- dharta_runtime-0.6.77/src/dharta/server/turn_finalization.py +133 -0
- dharta_runtime-0.6.77/src/dharta/server/turn_identity.py +203 -0
- dharta_runtime-0.6.77/src/dharta/server/turn_local_driver.py +823 -0
- dharta_runtime-0.6.77/src/dharta/server/turn_support.py +501 -0
- dharta_runtime-0.6.77/src/dharta/server/turn_telemetry.py +139 -0
- dharta_runtime-0.6.77/src/dharta/server/turns.py +173 -0
- dharta_runtime-0.6.77/src/dharta/server/webhooks.py +60 -0
- dharta_runtime-0.6.77/src/dharta/server/workspace_access.py +164 -0
- dharta_runtime-0.6.77/src/dharta/server/workspace_auth.py +97 -0
- dharta_runtime-0.6.77/src/dharta/server/workspace_read.py +657 -0
- dharta_runtime-0.6.77/src/dharta/server/workspace_routes.py +152 -0
- dharta_runtime-0.6.77/src/dharta/session.py +166 -0
- dharta_runtime-0.6.77/src/dharta/subscriber_authorization_contracts.py +809 -0
- dharta_runtime-0.6.77/src/dharta/subscriber_sponsorship_contracts.py +781 -0
- dharta_runtime-0.6.77/src/dharta/subscription_credential.py +96 -0
- dharta_runtime-0.6.77/src/dharta/surfaces/__init__.py +57 -0
- dharta_runtime-0.6.77/src/dharta/surfaces/access.py +69 -0
- dharta_runtime-0.6.77/src/dharta/surfaces/artifact.py +62 -0
- dharta_runtime-0.6.77/src/dharta/surfaces/artifact_access.py +256 -0
- dharta_runtime-0.6.77/src/dharta/surfaces/artifact_delegation.py +205 -0
- dharta_runtime-0.6.77/src/dharta/surfaces/artifact_runtime.py +191 -0
- dharta_runtime-0.6.77/src/dharta/surfaces/browser.py +52 -0
- dharta_runtime-0.6.77/src/dharta/surfaces/manifest.py +99 -0
- dharta_runtime-0.6.77/src/dharta/surfaces/preview_bridge.py +224 -0
- dharta_runtime-0.6.77/src/dharta/surfaces/published_applications.py +66 -0
- dharta_runtime-0.6.77/src/dharta/token_signing.py +160 -0
- dharta_runtime-0.6.77/src/dharta/vault/__init__.py +21 -0
- dharta_runtime-0.6.77/src/dharta/vault/agentcore.py +33 -0
- dharta_runtime-0.6.77/src/dharta/vault/local.py +43 -0
- dharta_runtime-0.6.77/src/dharta/vault/port.py +28 -0
- dharta_runtime-0.6.77/src/dharta/workspace.py +487 -0
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 LifeSage LLC
|
|
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,429 @@
|
|
|
1
|
+
Metadata-Version: 2.3
|
|
2
|
+
Name: dharta-runtime
|
|
3
|
+
Version: 0.6.77
|
|
4
|
+
Summary: Dharta agent runtime: harness adapters, dev serve, and the platform serve layer
|
|
5
|
+
License: MIT License
|
|
6
|
+
|
|
7
|
+
Copyright (c) 2026 LifeSage LLC
|
|
8
|
+
|
|
9
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
10
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
11
|
+
in the Software without restriction, including without limitation the rights
|
|
12
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
13
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
14
|
+
furnished to do so, subject to the following conditions:
|
|
15
|
+
|
|
16
|
+
The above copyright notice and this permission notice shall be included in all
|
|
17
|
+
copies or substantial portions of the Software.
|
|
18
|
+
|
|
19
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
20
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
21
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
22
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
23
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
24
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
25
|
+
SOFTWARE.
|
|
26
|
+
Keywords: agents,ai,framework,orchestration
|
|
27
|
+
Author: Dharta
|
|
28
|
+
Author-email: team@dharta.ai
|
|
29
|
+
Requires-Python: >=3.11,<3.14
|
|
30
|
+
Classifier: Development Status :: 3 - Alpha
|
|
31
|
+
Classifier: Intended Audience :: Developers
|
|
32
|
+
Classifier: License :: OSI Approved :: MIT License
|
|
33
|
+
Classifier: Programming Language :: Python :: 3
|
|
34
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
35
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
36
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
37
|
+
Classifier: Framework :: FastAPI
|
|
38
|
+
Provides-Extra: dev-reload
|
|
39
|
+
Provides-Extra: gitmerge
|
|
40
|
+
Provides-Extra: otel
|
|
41
|
+
Provides-Extra: postgres
|
|
42
|
+
Provides-Extra: s3
|
|
43
|
+
Provides-Extra: sentry
|
|
44
|
+
Requires-Dist: anyio (>=4.14.2,<5.0.0)
|
|
45
|
+
Requires-Dist: backoff (>=2.2.1,<3.0.0)
|
|
46
|
+
Requires-Dist: boto3 (>=1.35.92,<2.0.0) ; extra == "s3"
|
|
47
|
+
Requires-Dist: claude-agent-sdk (>=0.2.82,<0.3.0) ; python_version >= "3.10"
|
|
48
|
+
Requires-Dist: cryptography (>=44,<50)
|
|
49
|
+
Requires-Dist: dulwich (>=1.2.11,<2.0.0)
|
|
50
|
+
Requires-Dist: fastapi (>=0.139.2,<0.140.0)
|
|
51
|
+
Requires-Dist: httpcore (>=1.0.9,<2.0.0)
|
|
52
|
+
Requires-Dist: httpx (>=0.28.1,<0.29.0)
|
|
53
|
+
Requires-Dist: idna (>=3.10,<4.0)
|
|
54
|
+
Requires-Dist: jsonschema (>=4.23.0,<5.0.0)
|
|
55
|
+
Requires-Dist: litellm (==1.92.0)
|
|
56
|
+
Requires-Dist: markdown-it-py (>=3.0,<5.0)
|
|
57
|
+
Requires-Dist: opentelemetry-api (>=1.27.0,<2.0.0) ; extra == "otel"
|
|
58
|
+
Requires-Dist: opentelemetry-exporter-otlp-proto-http (>=1.27.0,<2.0.0) ; extra == "otel"
|
|
59
|
+
Requires-Dist: opentelemetry-instrumentation-asgi (>=0.48b0,<1.0) ; extra == "otel"
|
|
60
|
+
Requires-Dist: opentelemetry-instrumentation-fastapi (>=0.48b0,<1.0) ; extra == "otel"
|
|
61
|
+
Requires-Dist: opentelemetry-instrumentation-httpx (>=0.48b0,<1.0) ; extra == "otel"
|
|
62
|
+
Requires-Dist: opentelemetry-sdk (>=1.27.0,<2.0.0) ; extra == "otel"
|
|
63
|
+
Requires-Dist: orjson (>=3.11.6,<4.0.0)
|
|
64
|
+
Requires-Dist: psycopg-pool (>=3.3.1,<4.0.0) ; extra == "postgres"
|
|
65
|
+
Requires-Dist: psycopg[binary] (>=3.2.3,<4.0.0) ; extra == "postgres"
|
|
66
|
+
Requires-Dist: pydantic (>=2.10.4,<3.0.0)
|
|
67
|
+
Requires-Dist: pygit2 (>=1.18.0,<2.0.0) ; (python_version >= "3.11") and (extra == "gitmerge")
|
|
68
|
+
Requires-Dist: python-frontmatter (>=1.1.0,<2.0.0)
|
|
69
|
+
Requires-Dist: rich (>=13.0.0,<16.0.0)
|
|
70
|
+
Requires-Dist: sentry-sdk (>=2.20.0,<3.0.0) ; extra == "sentry"
|
|
71
|
+
Requires-Dist: typer (>=0.21,<0.27)
|
|
72
|
+
Requires-Dist: uvicorn[standard] (>=0.50.0,<0.52.0)
|
|
73
|
+
Requires-Dist: watchfiles (>=1.0.0,<2.0.0) ; extra == "dev-reload"
|
|
74
|
+
Project-URL: Documentation, https://docs.dharta.ai
|
|
75
|
+
Project-URL: Homepage, https://dharta.ai
|
|
76
|
+
Project-URL: Repository, https://github.com/dharta-ai/dharta
|
|
77
|
+
Description-Content-Type: text/markdown
|
|
78
|
+
|
|
79
|
+
<div align="center">
|
|
80
|
+
<h1>dharta-runtime</h1>
|
|
81
|
+
<p><strong>The Dharta runtime: harness adapters, sessions, and the consumer session API on agent harnesses like Claude Code and OpenCode</strong></p>
|
|
82
|
+
</div>
|
|
83
|
+
|
|
84
|
+
<div align="center">
|
|
85
|
+
|
|
86
|
+
[](https://github.com/karta/karta/blob/main/LICENSE)
|
|
87
|
+
[](https://pypi.org/project/dharta-runtime/)
|
|
88
|
+
[](https://www.python.org/)
|
|
89
|
+
[](https://github.com/karta/karta/issues)
|
|
90
|
+
|
|
91
|
+
</div>
|
|
92
|
+
|
|
93
|
+
> **Looking for the `karta` command?** The public CLI is
|
|
94
|
+
> [`@dharta/cli`](../../sdks/typescript-cli/) (`npm install -g @dharta/cli`).
|
|
95
|
+
> This package is `dharta-runtime` - the internal engine that CLI bootstraps
|
|
96
|
+
> for `dharta dev`, and the data plane the platform serves (RFC 0013,
|
|
97
|
+
> [docs/rfcs/0013-unified-cli.md](../../docs/rfcs/0013-unified-cli.md)). Its
|
|
98
|
+
> own CLI verbs are internal (see [CLI](#cli-internal)); use it directly as a
|
|
99
|
+
> Python SDK/library, exactly as documented below.
|
|
100
|
+
|
|
101
|
+
## Why Dharta
|
|
102
|
+
|
|
103
|
+
Agent frameworks like [LangGraph](https://github.com/langchain-ai/langgraph), [CrewAI](https://github.com/crewAIInc/crewAI), [AutoGen](https://github.com/microsoft/autogen), and the [OpenAI Agents SDK](https://github.com/openai/openai-agents-python) build agents from scratch — defining their own tool systems, context management, memory, and execution loops.
|
|
104
|
+
|
|
105
|
+
**Dharta takes the opposite approach.** Agent harnesses like [Claude Code](https://docs.anthropic.com/en/docs/claude-code) and [OpenCode](https://opencode.ai) already solved the hard problems — tools, MCP servers, context management, memory, skills, and agentic execution. They're battle-tested, deeply integrated with real development workflows, and improving fast.
|
|
106
|
+
|
|
107
|
+
Dharta builds **on top** of these harnesses in two tiers: a **thin core** that delegates all agent execution and conversation persistence to the harness, plus a **platform layer** that adds the multi-tenant SaaS machinery production applications need. Together they provide **multi-user sessions**, **multi-agent routing**, **participant-aware messaging**, **cross-instance communication**, **HTTP deployment**, **multi-tenancy with durable tenant isolation**, **BYOK key management**, **usage metering**, **policy enforcement**, and **lifecycle hooks** — without reinventing agent capabilities from scratch.
|
|
108
|
+
|
|
109
|
+
```
|
|
110
|
+
┌──────────────────────────────────────────────────────────┐
|
|
111
|
+
│ Other frameworks │ Dharta │
|
|
112
|
+
│ │ │
|
|
113
|
+
│ Build agents from scratch │ Build ON existing harnesses │
|
|
114
|
+
│ Own tool system │ Harness tools (MCP, etc.) │
|
|
115
|
+
│ Own memory/context │ Harness memory/context │
|
|
116
|
+
│ Own execution loop │ Harness execution loop │
|
|
117
|
+
│ + Multi-agent orchestr. │ + Multi-user sessions │
|
|
118
|
+
│ │ + Multi-agent routing │
|
|
119
|
+
│ │ + Gateway & fan-out │
|
|
120
|
+
│ │ + Multi-tenancy │
|
|
121
|
+
│ │ + HTTP API & CLI │
|
|
122
|
+
│ │ + Hooks & policies │
|
|
123
|
+
└──────────────────────────────────────────────────────────┘
|
|
124
|
+
```
|
|
125
|
+
|
|
126
|
+
## What Dharta provides
|
|
127
|
+
|
|
128
|
+
| Feature | Description |
|
|
129
|
+
|---------|-------------|
|
|
130
|
+
| **Multi-agent routing** | Discover and route to specialist agents defined in your harness's native format |
|
|
131
|
+
| **Multi-user sessions** | Route conversations by metadata (customer ID, channel, etc.) with automatic persistence |
|
|
132
|
+
| **Participant model** | Multiple humans and AI agents in the same session with message attribution |
|
|
133
|
+
| **Gateway & fan-out** | Unified event ingestion with fan-out delivery to all session participants |
|
|
134
|
+
| **Cross-instance messaging** | Agents on different Dharta instances communicate via gateway HTTP POST |
|
|
135
|
+
| **Multi-tenancy** | Workspace-per-user isolation with `DhartaHub` orchestrator |
|
|
136
|
+
| **Session persistence** | SQLite (default), PostgreSQL, or S3 backends |
|
|
137
|
+
| **Lifecycle hooks** | Events on `message.received`, `message.completed`, `agent.handoff`, `session.created` |
|
|
138
|
+
| **Policy enforcement** | Validate messages against configurable policies (length limits, message counts, keyword gates) |
|
|
139
|
+
| **HTTP API** | Production-ready FastAPI server with REST endpoints and SSE streaming |
|
|
140
|
+
| **Internal CLI** | `dharta-runtime dev/dev-serve/serve` - streaming terminal REPL and the local/self-host serve planes (the public CLI is `@dharta/cli`) |
|
|
141
|
+
| **Typed streaming** | Structured events: `text`, `tool_use`, `reasoning`, `step_start`, `step_finish`, `error`, `input_required` |
|
|
142
|
+
|
|
143
|
+
## Install
|
|
144
|
+
|
|
145
|
+
```bash
|
|
146
|
+
pip install dharta-runtime
|
|
147
|
+
```
|
|
148
|
+
|
|
149
|
+
With optional backends:
|
|
150
|
+
|
|
151
|
+
```bash
|
|
152
|
+
pip install dharta-runtime[postgres] # PostgreSQL sessions
|
|
153
|
+
pip install dharta-runtime[s3] # S3 sessions
|
|
154
|
+
```
|
|
155
|
+
|
|
156
|
+
You also need a coding agent harness installed:
|
|
157
|
+
|
|
158
|
+
- **Claude Code**: `npm install -g @anthropic-ai/claude-code` ([docs](https://docs.anthropic.com/en/docs/claude-code))
|
|
159
|
+
- **OpenCode**: `curl -fsSL https://opencode.ai/install | bash` ([docs](https://opencode.ai))
|
|
160
|
+
|
|
161
|
+
## Quickstart
|
|
162
|
+
|
|
163
|
+
### Zero-config hello world
|
|
164
|
+
|
|
165
|
+
```python
|
|
166
|
+
from dharta import Dharta
|
|
167
|
+
|
|
168
|
+
app = Dharta()
|
|
169
|
+
response = app.send_sync("Hello!")
|
|
170
|
+
print(response.text)
|
|
171
|
+
```
|
|
172
|
+
|
|
173
|
+
Dharta auto-detects your harness from the project directory (`.claude/` → Claude Code, `.opencode/` → OpenCode).
|
|
174
|
+
|
|
175
|
+
### Multi-turn sessions
|
|
176
|
+
|
|
177
|
+
```python
|
|
178
|
+
from dharta import Dharta
|
|
179
|
+
|
|
180
|
+
app = Dharta()
|
|
181
|
+
|
|
182
|
+
session = app.session(metadata={"customer_id": "abc123"})
|
|
183
|
+
response = session.send_sync("I need help with my order")
|
|
184
|
+
response = session.send_sync("Order #12345")
|
|
185
|
+
|
|
186
|
+
# Resume later by looking up the session
|
|
187
|
+
session = app.session(metadata={"customer_id": "abc123"})
|
|
188
|
+
response = session.send_sync("Any updates?")
|
|
189
|
+
```
|
|
190
|
+
|
|
191
|
+
### Multi-agent routing
|
|
192
|
+
|
|
193
|
+
Define specialist agents in your harness's native format (`.claude/agents/*.md` or `.opencode/agents/*.md`), then route:
|
|
194
|
+
|
|
195
|
+
```python
|
|
196
|
+
from dharta import Dharta
|
|
197
|
+
|
|
198
|
+
app = Dharta()
|
|
199
|
+
|
|
200
|
+
# Route to a specific agent
|
|
201
|
+
response = app.send_sync("Audit my billing", agent="billing-specialist")
|
|
202
|
+
|
|
203
|
+
# Agent handoff within a session
|
|
204
|
+
session = app.session(metadata={"customer_id": "abc123"})
|
|
205
|
+
session.send_sync("I need help with my order") # → default agent
|
|
206
|
+
session.current_agent = app.agents["billing"] # handoff
|
|
207
|
+
session.send_sync("Check invoice #789") # → billing agent
|
|
208
|
+
```
|
|
209
|
+
|
|
210
|
+
### Multi-participant sessions
|
|
211
|
+
|
|
212
|
+
```python
|
|
213
|
+
from dharta import Dharta, HumanAgent
|
|
214
|
+
|
|
215
|
+
app = Dharta()
|
|
216
|
+
session = app.session()
|
|
217
|
+
|
|
218
|
+
alice = HumanAgent(name="alice", display_name="Alice Chen")
|
|
219
|
+
bob = HumanAgent(name="bob", display_name="Bob Park")
|
|
220
|
+
|
|
221
|
+
# Messages are attributed to the sending participant
|
|
222
|
+
session.send_sync("I need help with deployment", participant=alice)
|
|
223
|
+
session.send_sync("I can help — what's the error?", participant=bob)
|
|
224
|
+
```
|
|
225
|
+
|
|
226
|
+
### Streaming
|
|
227
|
+
|
|
228
|
+
```python
|
|
229
|
+
import asyncio
|
|
230
|
+
from dharta import Dharta
|
|
231
|
+
|
|
232
|
+
async def main():
|
|
233
|
+
app = Dharta()
|
|
234
|
+
async for event in app.stream("Explain quicksort"):
|
|
235
|
+
if event.type == "text":
|
|
236
|
+
print(event.text, end="", flush=True)
|
|
237
|
+
|
|
238
|
+
asyncio.run(main())
|
|
239
|
+
```
|
|
240
|
+
|
|
241
|
+
### HTTP API
|
|
242
|
+
|
|
243
|
+
```python
|
|
244
|
+
from dharta import Dharta
|
|
245
|
+
from dharta.server import create_fastapi_app
|
|
246
|
+
import uvicorn
|
|
247
|
+
|
|
248
|
+
app = Dharta()
|
|
249
|
+
fastapi_app = create_fastapi_app(app)
|
|
250
|
+
uvicorn.run(fastapi_app, host="0.0.0.0", port=8000)
|
|
251
|
+
```
|
|
252
|
+
|
|
253
|
+
This exposes:
|
|
254
|
+
|
|
255
|
+
- `POST /v1/send` — send a message, get a response
|
|
256
|
+
- `POST /v1/stream` — send a message, get SSE stream
|
|
257
|
+
- `POST /v1/sessions` — create a session
|
|
258
|
+
- `GET /v1/sessions` — list/lookup sessions
|
|
259
|
+
- `POST /v1/sessions/{id}/messages` — send within a session
|
|
260
|
+
- `POST /v1/sessions/{id}/input/respond` — respond to approval prompts
|
|
261
|
+
- `POST /v1/gateway/submit` — submit a gateway event
|
|
262
|
+
- `POST /v1/gateway/deliver` — deliver to a local participant
|
|
263
|
+
- `GET /healthz` — health check
|
|
264
|
+
|
|
265
|
+
### Multi-tenancy
|
|
266
|
+
|
|
267
|
+
```python
|
|
268
|
+
from dharta import DhartaHub
|
|
269
|
+
|
|
270
|
+
hub = DhartaHub("/path/to/karta-root")
|
|
271
|
+
|
|
272
|
+
# Each tenant/user gets an isolated workspace
|
|
273
|
+
session = hub.session("acme", "alice", metadata={"topic": "billing"})
|
|
274
|
+
response = session.send_sync("Help with invoice")
|
|
275
|
+
```
|
|
276
|
+
|
|
277
|
+
### Lifecycle hooks
|
|
278
|
+
|
|
279
|
+
```python
|
|
280
|
+
app = Dharta()
|
|
281
|
+
|
|
282
|
+
@app.on("message.completed")
|
|
283
|
+
async def log_response(event):
|
|
284
|
+
print(f"Session {event.session.id}: {event.message.text}")
|
|
285
|
+
|
|
286
|
+
@app.on("agent.handoff")
|
|
287
|
+
async def track_handoff(event):
|
|
288
|
+
print(f"Handoff: {event.payload['from']} → {event.payload['to']}")
|
|
289
|
+
```
|
|
290
|
+
|
|
291
|
+
### CLI (internal)
|
|
292
|
+
|
|
293
|
+
The customer-facing CLI is `@dharta/cli`; this package's verbs are internal
|
|
294
|
+
(local platform dev, self-host):
|
|
295
|
+
|
|
296
|
+
```bash
|
|
297
|
+
dharta-runtime dev <path> # Hot-reload REPL against a folder
|
|
298
|
+
dharta-runtime dev-serve <path> # Serve a folder behind the consumer session API
|
|
299
|
+
# (what the unified CLI's `dharta dev` spawns)
|
|
300
|
+
dharta-runtime serve # The platform serve plane (self-host / dev-infra)
|
|
301
|
+
```
|
|
302
|
+
|
|
303
|
+
This package installs no `karta` script at all - that name belongs to
|
|
304
|
+
the unified CLI (`npm install -g @dharta/cli`). It was dropped rather
|
|
305
|
+
than shimmed: dharta-python never shipped to PyPI, so there is no
|
|
306
|
+
installed base to point anywhere.
|
|
307
|
+
|
|
308
|
+
## Architecture
|
|
309
|
+
|
|
310
|
+
```
|
|
311
|
+
External Clients / Other Dharta Instances
|
|
312
|
+
│
|
|
313
|
+
┌─────────▼──────────┐
|
|
314
|
+
│ Gateway │ event ingestion, fan-out delivery
|
|
315
|
+
│ Local · HTTP │ cross-instance messaging
|
|
316
|
+
└─────────┬──────────┘
|
|
317
|
+
│
|
|
318
|
+
┌─────────▼──────────┐
|
|
319
|
+
│ Client Layer │ HTTP API · CLI · Python SDK
|
|
320
|
+
└─────────┬──────────┘
|
|
321
|
+
│
|
|
322
|
+
┌─────────▼──────────┐
|
|
323
|
+
│ Multi-Tenancy │ DhartaHub → WorkspaceManager
|
|
324
|
+
└─────────┬──────────┘
|
|
325
|
+
│
|
|
326
|
+
┌─────────▼──────────┐
|
|
327
|
+
│ Dharta Core │ sessions, agents, policies,
|
|
328
|
+
│ │ hooks, participants
|
|
329
|
+
└─────────┬──────────┘
|
|
330
|
+
│
|
|
331
|
+
┌─────────▼──────────┐
|
|
332
|
+
│ Harness Layer │ Claude Code (SDK) or
|
|
333
|
+
│ │ OpenCode (CLI subprocess)
|
|
334
|
+
└─────────┬──────────┘
|
|
335
|
+
│
|
|
336
|
+
┌─────────▼──────────┐
|
|
337
|
+
│ Coding Agent │ tools, MCP, context,
|
|
338
|
+
│ │ memory, skills
|
|
339
|
+
└──────────────────────┘
|
|
340
|
+
```
|
|
341
|
+
|
|
342
|
+
### Design principles
|
|
343
|
+
|
|
344
|
+
- **Convention over configuration** — follows your harness's folder conventions
|
|
345
|
+
- **Progressive disclosure** — start with 3 lines, add features as you need them
|
|
346
|
+
- **Harness-native** — agents are defined in `.claude/agents/*.md` or `.opencode/agents/*.md`, not reinvented
|
|
347
|
+
- **Zero abstraction tax** — examples from harness docs work as-is inside Dharta
|
|
348
|
+
|
|
349
|
+
## Progressive examples
|
|
350
|
+
|
|
351
|
+
The [`examples/`](examples/) directory walks through increasing levels of complexity:
|
|
352
|
+
|
|
353
|
+
| Level | Directory | What it demonstrates |
|
|
354
|
+
|-------|-----------|---------------------|
|
|
355
|
+
| 0 | `level-0-zero-config/` | No config needed — just `app.send()` |
|
|
356
|
+
| 1 | `level-1-project-context/` | Project context with `AGENTS.md` / `.opencode` |
|
|
357
|
+
| 1 | `level-1-project-context-claude-code/` | Same, using Claude Code |
|
|
358
|
+
| 2 | `level-2-custom-agent/` | Single agent with a custom skill |
|
|
359
|
+
| 2 | `level-2-custom-agent-claude-code/` | Same, using Claude Code |
|
|
360
|
+
| 3 | `level-3-multiple-agents/` | Multi-agent routing |
|
|
361
|
+
| 4 | `level-4-multi-turn-sessions/` | Session persistence and metadata lookup |
|
|
362
|
+
| 5 | `level-5-hooks-policies/` | Lifecycle hooks and policy enforcement |
|
|
363
|
+
|
|
364
|
+
## Configuration
|
|
365
|
+
|
|
366
|
+
Dharta uses your harness's native agent definitions as the source of truth. Optional Dharta-specific settings go in `dharta.jsonc`:
|
|
367
|
+
|
|
368
|
+
```jsonc
|
|
369
|
+
{
|
|
370
|
+
"cli": {
|
|
371
|
+
"hidden_event_types": ["system"],
|
|
372
|
+
"input_required_policy": "prompt"
|
|
373
|
+
},
|
|
374
|
+
"harness": {
|
|
375
|
+
"claude": {
|
|
376
|
+
"idle_timeout_seconds": 600,
|
|
377
|
+
"permission_intercept": false
|
|
378
|
+
}
|
|
379
|
+
}
|
|
380
|
+
}
|
|
381
|
+
```
|
|
382
|
+
|
|
383
|
+
See [`examples/configurations/`](examples/configurations/) for copy-ready templates.
|
|
384
|
+
|
|
385
|
+
## Supported harnesses
|
|
386
|
+
|
|
387
|
+
| Harness | Adapter | Detection |
|
|
388
|
+
|---------|---------|-----------|
|
|
389
|
+
| Claude Code | `ClaudeAdapter` (via Claude SDK) | `.claude/` directory or `CLAUDE.md` |
|
|
390
|
+
| OpenCode | `OpenCodeAdapter` (via `opencode run`) | `.opencode/` directory |
|
|
391
|
+
| Deep Agents Code | `DeepAgentsAdapter` (via `dcode -n`) | `.deepagents/` directory |
|
|
392
|
+
| Goose | `GooseAdapter` (via `goose run --output-format stream-json`) | `.goose/` directory |
|
|
393
|
+
| Codex CLI | `CodexCliAdapter` (via `codex exec --json`) | `.codex/config.toml` |
|
|
394
|
+
|
|
395
|
+
Adding a new harness means implementing one `HarnessAdapter` class.
|
|
396
|
+
|
|
397
|
+
## Documentation
|
|
398
|
+
|
|
399
|
+
Design documents and implementation specs live in [`dev/`](dev/):
|
|
400
|
+
|
|
401
|
+
- [Architecture](dev/ARCHITECTURE.md) — system architecture reference
|
|
402
|
+
- [Design document](dev/2026-02-12-karta-design-doc.md) — architecture and design philosophy
|
|
403
|
+
- [Implementation spec](dev/2026-02-13-karta-implementation-spec.md) — detailed implementation reference
|
|
404
|
+
- [CLI spec](dev/2026-02-13-dharta-cli.md) — CLI commands and options
|
|
405
|
+
- [HTTP API spec](dev/2026-02-13-karta-http-api.md) — REST endpoint reference
|
|
406
|
+
- [Gateway implementation plan](dev/2026-02-14-gateway-implementation-plan.md) — gateway system design
|
|
407
|
+
- [Multi-tenancy architecture](dev/2026-02-14-multi-tenancy-architecture.md) — workspace isolation deep dive
|
|
408
|
+
- [Phase status](dev/phase-status.md) — implementation progress tracking
|
|
409
|
+
|
|
410
|
+
## Development
|
|
411
|
+
|
|
412
|
+
```bash
|
|
413
|
+
# Install dependencies
|
|
414
|
+
poetry install --all-extras
|
|
415
|
+
|
|
416
|
+
# Run tests
|
|
417
|
+
poetry run pytest
|
|
418
|
+
|
|
419
|
+
# Lint
|
|
420
|
+
poetry run ruff check src/ tests/
|
|
421
|
+
|
|
422
|
+
# Type check
|
|
423
|
+
poetry run mypy src/dharta/
|
|
424
|
+
```
|
|
425
|
+
|
|
426
|
+
## License
|
|
427
|
+
|
|
428
|
+
This project is licensed under the MIT License — see the [LICENSE](LICENSE) file for details.
|
|
429
|
+
|