execweave 0.8.34__tar.gz → 0.8.36__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.
Potentially problematic release.
This version of execweave might be problematic. Click here for more details.
- {execweave-0.8.34 → execweave-0.8.36}/PKG-INFO +60 -14
- {execweave-0.8.34 → execweave-0.8.36}/README.md +58 -12
- {execweave-0.8.34 → execweave-0.8.36}/pyproject.toml +3 -3
- {execweave-0.8.34 → execweave-0.8.36}/src/execweave/__init__.py +1 -1
- {execweave-0.8.34 → execweave-0.8.36}/src/execweave/_conversation_records_core.py +3 -6
- {execweave-0.8.34 → execweave-0.8.36}/src/execweave/_http_proxy_base.py +26 -0
- {execweave-0.8.34 → execweave-0.8.36}/src/execweave/_http_proxy_bounded.py +71 -30
- {execweave-0.8.34 → execweave-0.8.36}/src/execweave/_http_proxy_stage.py +3 -0
- {execweave-0.8.34 → execweave-0.8.36}/src/execweave/agent_bootstrap.py +74 -11
- {execweave-0.8.34 → execweave-0.8.36}/src/execweave/anthropic.py +5 -6
- {execweave-0.8.34 → execweave-0.8.36}/src/execweave/anthropic_cli.py +3 -0
- {execweave-0.8.34 → execweave-0.8.36}/src/execweave/antigravity_adapter_base.py +5 -6
- {execweave-0.8.34 → execweave-0.8.36}/src/execweave/antigravity_hook_cli.py +9 -2
- {execweave-0.8.34 → execweave-0.8.36}/src/execweave/claude_adapter.py +5 -6
- {execweave-0.8.34 → execweave-0.8.36}/src/execweave/claude_hook_cli.py +6 -1
- {execweave-0.8.34 → execweave-0.8.36}/src/execweave/cli.py +10 -8
- {execweave-0.8.34 → execweave-0.8.36}/src/execweave/codex_adapter.py +5 -6
- {execweave-0.8.34 → execweave-0.8.36}/src/execweave/codex_hook_cli.py +5 -1
- {execweave-0.8.34 → execweave-0.8.36}/src/execweave/codex_hook_entry.py +5 -4
- {execweave-0.8.34 → execweave-0.8.36}/src/execweave/collector.py +106 -22
- execweave-0.8.36/src/execweave/command_privacy.py +20 -0
- {execweave-0.8.34 → execweave-0.8.36}/src/execweave/content_store.py +16 -10
- {execweave-0.8.34 → execweave-0.8.36}/src/execweave/correlation.py +11 -19
- {execweave-0.8.34 → execweave-0.8.36}/src/execweave/cursor_adapter.py +5 -6
- {execweave-0.8.34 → execweave-0.8.36}/src/execweave/cursor_hook_cli.py +6 -1
- {execweave-0.8.34 → execweave-0.8.36}/src/execweave/entry.py +23 -6
- {execweave-0.8.34 → execweave-0.8.36}/src/execweave/fidelity.py +4 -6
- {execweave-0.8.34 → execweave-0.8.36}/src/execweave/filesystem.py +82 -2
- execweave-0.8.36/src/execweave/finalization.py +92 -0
- {execweave-0.8.34 → execweave-0.8.36}/src/execweave/framework_adapters/base.py +7 -5
- {execweave-0.8.34 → execweave-0.8.36}/src/execweave/graph.py +43 -7
- {execweave-0.8.34 → execweave-0.8.36}/src/execweave/graph_ops.py +36 -10
- execweave-0.8.36/src/execweave/hook_command.py +32 -0
- execweave-0.8.36/src/execweave/hook_delivery.py +32 -0
- {execweave-0.8.34 → execweave-0.8.36}/src/execweave/inference_gateway.py +5 -6
- {execweave-0.8.34 → execweave-0.8.36}/src/execweave/inference_gateway_cli.py +3 -0
- {execweave-0.8.34 → execweave-0.8.36}/src/execweave/integrity.py +6 -24
- execweave-0.8.36/src/execweave/integrity_cli.py +55 -0
- {execweave-0.8.34 → execweave-0.8.36}/src/execweave/investigation_index.py +5 -4
- {execweave-0.8.34 → execweave-0.8.36}/src/execweave/litellm_callback.py +4 -0
- {execweave-0.8.34 → execweave-0.8.36}/src/execweave/live.py +8 -8
- {execweave-0.8.34 → execweave-0.8.36}/src/execweave/live_core.py +133 -29
- {execweave-0.8.34 → execweave-0.8.36}/src/execweave/live_view_extra_style.py +1 -1
- {execweave-0.8.34 → execweave-0.8.36}/src/execweave/live_view_script_a.py +7 -5
- {execweave-0.8.34 → execweave-0.8.36}/src/execweave/model_runtime.py +5 -6
- {execweave-0.8.34 → execweave-0.8.36}/src/execweave/model_runtime_cli.py +3 -0
- execweave-0.8.36/src/execweave/observation.py +53 -0
- execweave-0.8.36/src/execweave/observation_demo.py +69 -0
- execweave-0.8.36/src/execweave/openai_agents.py +267 -0
- {execweave-0.8.34 → execweave-0.8.36}/src/execweave/openai_compatible.py +5 -6
- {execweave-0.8.34 → execweave-0.8.36}/src/execweave/openai_compatible_cli.py +3 -0
- {execweave-0.8.34 → execweave-0.8.36}/src/execweave/opencode_adapter.py +5 -6
- {execweave-0.8.34 → execweave-0.8.36}/src/execweave/opencode_hook_cli.py +8 -2
- execweave-0.8.36/src/execweave/privacy.py +84 -0
- execweave-0.8.36/src/execweave/private_io.py +465 -0
- execweave-0.8.36/src/execweave/reader_identity.py +13 -0
- execweave-0.8.36/src/execweave/risk.py +106 -0
- {execweave-0.8.34 → execweave-0.8.36}/src/execweave/run_assessment.py +16 -4
- {execweave-0.8.34 → execweave-0.8.36}/src/execweave/semantic.py +16 -16
- execweave-0.8.36/src/execweave/session_summary.py +159 -0
- execweave-0.8.36/src/execweave/sink.py +71 -0
- {execweave-0.8.34 → execweave-0.8.36}/src/execweave/strace_backend.py +32 -5
- {execweave-0.8.34 → execweave-0.8.36}/src/execweave/task_validation.py +5 -5
- {execweave-0.8.34 → execweave-0.8.36}/src/execweave/top.py +30 -20
- {execweave-0.8.34 → execweave-0.8.36}/src/execweave/top_cli.py +3 -0
- {execweave-0.8.34 → execweave-0.8.36}/src/execweave/validate.py +10 -7
- {execweave-0.8.34 → execweave-0.8.36}/src/execweave/viewer.py +3 -2
- {execweave-0.8.34 → execweave-0.8.36}/src/execweave/viewer_agent_panel.py +78 -16
- {execweave-0.8.34 → execweave-0.8.36}/src/execweave/viewer_dashboard_clean.py +7 -2
- {execweave-0.8.34 → execweave-0.8.36}/src/execweave/viewer_flow_canvas.py +525 -52
- {execweave-0.8.34 → execweave-0.8.36}/src/execweave/viewer_flow_layout.py +8 -55
- {execweave-0.8.34 → execweave-0.8.36}/src/execweave/viewer_framework_flow.py +15 -1
- {execweave-0.8.34 → execweave-0.8.36}/src/execweave/viewer_projection.py +4 -3
- {execweave-0.8.34 → execweave-0.8.36}/src/execweave/viewer_projection_base.py +9 -3
- execweave-0.8.36/src/execweave/viewer_run_assessment.py +274 -0
- {execweave-0.8.34 → execweave-0.8.36}/src/execweave/viewer_semantic_projection.py +152 -4
- execweave-0.8.36/src/execweave/viewer_session_flow.py +491 -0
- execweave-0.8.34/src/execweave/finalization.py +0 -58
- execweave-0.8.34/src/execweave/integrity_cli.py +0 -52
- execweave-0.8.34/src/execweave/session_summary.py +0 -48
- execweave-0.8.34/src/execweave/sink.py +0 -33
- execweave-0.8.34/src/execweave/viewer_run_assessment.py +0 -120
- execweave-0.8.34/src/execweave/viewer_session_flow.py +0 -166
- {execweave-0.8.34 → execweave-0.8.36}/.gitignore +0 -0
- {execweave-0.8.34 → execweave-0.8.36}/LICENSE +0 -0
- {execweave-0.8.34 → execweave-0.8.36}/src/execweave/__main__.py +0 -0
- {execweave-0.8.34 → execweave-0.8.36}/src/execweave/_dashboard_shell_base.py +0 -0
- {execweave-0.8.34 → execweave-0.8.36}/src/execweave/acceptance_output.py +0 -0
- {execweave-0.8.34 → execweave-0.8.36}/src/execweave/agent_topology.py +0 -0
- {execweave-0.8.34 → execweave-0.8.36}/src/execweave/agent_trace.py +0 -0
- {execweave-0.8.34 → execweave-0.8.36}/src/execweave/agy_preview_sanitize.py +0 -0
- {execweave-0.8.34 → execweave-0.8.36}/src/execweave/analysis.py +0 -0
- {execweave-0.8.34 → execweave-0.8.36}/src/execweave/anthropic_full_fidelity.py +0 -0
- {execweave-0.8.34 → execweave-0.8.36}/src/execweave/antigravity_adapter.py +0 -0
- {execweave-0.8.34 → execweave-0.8.36}/src/execweave/antigravity_full_fidelity.py +0 -0
- {execweave-0.8.34 → execweave-0.8.36}/src/execweave/antigravity_full_fidelity_base.py +0 -0
- {execweave-0.8.34 → execweave-0.8.36}/src/execweave/antigravity_full_fidelity_collaboration_base.py +0 -0
- {execweave-0.8.34 → execweave-0.8.36}/src/execweave/antigravity_record.py +0 -0
- {execweave-0.8.34 → execweave-0.8.36}/src/execweave/antigravity_subagent_linkage.py +0 -0
- {execweave-0.8.34 → execweave-0.8.36}/src/execweave/antigravity_trace_capability.py +0 -0
- {execweave-0.8.34 → execweave-0.8.36}/src/execweave/auto_specialized.py +0 -0
- {execweave-0.8.34 → execweave-0.8.36}/src/execweave/backends.py +0 -0
- {execweave-0.8.34 → execweave-0.8.36}/src/execweave/benchmark.py +0 -0
- {execweave-0.8.34 → execweave-0.8.36}/src/execweave/claude_child_transcript.py +0 -0
- {execweave-0.8.34 → execweave-0.8.36}/src/execweave/claude_delegation.py +0 -0
- {execweave-0.8.34 → execweave-0.8.36}/src/execweave/claude_full_fidelity.py +0 -0
- {execweave-0.8.34 → execweave-0.8.36}/src/execweave/claude_hook_contract.py +0 -0
- {execweave-0.8.34 → execweave-0.8.36}/src/execweave/claude_model_observer.py +0 -0
- {execweave-0.8.34 → execweave-0.8.36}/src/execweave/claude_record.py +0 -0
- {execweave-0.8.34 → execweave-0.8.36}/src/execweave/codex_conversation.py +0 -0
- {execweave-0.8.34 → execweave-0.8.36}/src/execweave/codex_full_fidelity.py +0 -0
- {execweave-0.8.34 → execweave-0.8.36}/src/execweave/codex_hook_lifecycle.py +0 -0
- {execweave-0.8.34 → execweave-0.8.36}/src/execweave/codex_message_diagnostics.py +0 -0
- {execweave-0.8.34 → execweave-0.8.36}/src/execweave/codex_message_transport_diagnostics.py +0 -0
- {execweave-0.8.34 → execweave-0.8.36}/src/execweave/codex_record.py +0 -0
- {execweave-0.8.34 → execweave-0.8.36}/src/execweave/codex_rollout_structures.py +0 -0
- {execweave-0.8.34 → execweave-0.8.36}/src/execweave/codex_rollout_trace.py +0 -0
- {execweave-0.8.34 → execweave-0.8.36}/src/execweave/codex_rollout_trace_base.py +0 -0
- {execweave-0.8.34 → execweave-0.8.36}/src/execweave/command.py +0 -0
- {execweave-0.8.34 → execweave-0.8.36}/src/execweave/content_evidence.py +0 -0
- {execweave-0.8.34 → execweave-0.8.36}/src/execweave/content_integrity.py +0 -0
- {execweave-0.8.34 → execweave-0.8.36}/src/execweave/controlled_checks.py +0 -0
- {execweave-0.8.34 → execweave-0.8.36}/src/execweave/conversation_archive.py +0 -0
- {execweave-0.8.34 → execweave-0.8.36}/src/execweave/conversation_message_identity.py +0 -0
- {execweave-0.8.34 → execweave-0.8.36}/src/execweave/conversation_preview.py +0 -0
- {execweave-0.8.34 → execweave-0.8.36}/src/execweave/conversation_preview_antigravity.py +0 -0
- {execweave-0.8.34 → execweave-0.8.36}/src/execweave/conversation_preview_claude.py +0 -0
- {execweave-0.8.34 → execweave-0.8.36}/src/execweave/conversation_preview_codex.py +0 -0
- {execweave-0.8.34 → execweave-0.8.36}/src/execweave/conversation_preview_common.py +0 -0
- {execweave-0.8.34 → execweave-0.8.36}/src/execweave/conversation_preview_generic.py +0 -0
- {execweave-0.8.34 → execweave-0.8.36}/src/execweave/conversation_preview_lines.py +0 -0
- {execweave-0.8.34 → execweave-0.8.36}/src/execweave/conversation_preview_transcript.py +0 -0
- {execweave-0.8.34 → execweave-0.8.36}/src/execweave/conversation_records.py +0 -0
- {execweave-0.8.34 → execweave-0.8.36}/src/execweave/conversation_records_antigravity.py +0 -0
- {execweave-0.8.34 → execweave-0.8.36}/src/execweave/conversation_records_codex.py +0 -0
- {execweave-0.8.34 → execweave-0.8.36}/src/execweave/conversation_records_common.py +0 -0
- {execweave-0.8.34 → execweave-0.8.36}/src/execweave/conversation_records_ollama.py +0 -0
- {execweave-0.8.34 → execweave-0.8.36}/src/execweave/cursor_delegation.py +0 -0
- {execweave-0.8.34 → execweave-0.8.36}/src/execweave/cursor_delegation_base.py +0 -0
- {execweave-0.8.34 → execweave-0.8.36}/src/execweave/cursor_full_fidelity.py +0 -0
- {execweave-0.8.34 → execweave-0.8.36}/src/execweave/cursor_hook_contract.py +0 -0
- {execweave-0.8.34 → execweave-0.8.36}/src/execweave/cursor_lifecycle.py +0 -0
- {execweave-0.8.34 → execweave-0.8.36}/src/execweave/cursor_record.py +0 -0
- {execweave-0.8.34 → execweave-0.8.36}/src/execweave/dashboard_shell.py +0 -0
- {execweave-0.8.34 → execweave-0.8.36}/src/execweave/delivery_status.py +0 -0
- {execweave-0.8.34 → execweave-0.8.36}/src/execweave/evidence_availability.py +0 -0
- {execweave-0.8.34 → execweave-0.8.36}/src/execweave/evidence_grade.py +0 -0
- {execweave-0.8.34 → execweave-0.8.36}/src/execweave/focus.py +0 -0
- {execweave-0.8.34 → execweave-0.8.36}/src/execweave/framework_adapters/__init__.py +0 -0
- {execweave-0.8.34 → execweave-0.8.36}/src/execweave/framework_adapters/autogen.py +0 -0
- {execweave-0.8.34 → execweave-0.8.36}/src/execweave/framework_adapters/camel.py +0 -0
- {execweave-0.8.34 → execweave-0.8.36}/src/execweave/framework_adapters/camel_channel.py +0 -0
- {execweave-0.8.34 → execweave-0.8.36}/src/execweave/framework_adapters/metagpt.py +0 -0
- {execweave-0.8.34 → execweave-0.8.36}/src/execweave/framework_adapters/registry.py +0 -0
- {execweave-0.8.34 → execweave-0.8.36}/src/execweave/hook_input.py +0 -0
- {execweave-0.8.34 → execweave-0.8.36}/src/execweave/http_proxy.py +0 -0
- {execweave-0.8.34 → execweave-0.8.36}/src/execweave/http_proxy_cli.py +0 -0
- {execweave-0.8.34 → execweave-0.8.36}/src/execweave/inference_gateway_full_fidelity.py +0 -0
- {execweave-0.8.34 → execweave-0.8.36}/src/execweave/inference_identity.py +0 -0
- {execweave-0.8.34 → execweave-0.8.36}/src/execweave/inference_identity_cli.py +0 -0
- {execweave-0.8.34 → execweave-0.8.36}/src/execweave/litellm_callback_cli.py +0 -0
- {execweave-0.8.34 → execweave-0.8.36}/src/execweave/live_view.py +0 -0
- {execweave-0.8.34 → execweave-0.8.36}/src/execweave/live_view_markup.py +0 -0
- {execweave-0.8.34 → execweave-0.8.36}/src/execweave/live_view_process_layout.py +0 -0
- {execweave-0.8.34 → execweave-0.8.36}/src/execweave/live_view_readability.py +0 -0
- {execweave-0.8.34 → execweave-0.8.36}/src/execweave/live_view_script_b.py +0 -0
- {execweave-0.8.34 → execweave-0.8.36}/src/execweave/live_view_script_c.py +0 -0
- {execweave-0.8.34 → execweave-0.8.36}/src/execweave/live_view_script_d.py +0 -0
- {execweave-0.8.34 → execweave-0.8.36}/src/execweave/live_view_style.py +0 -0
- {execweave-0.8.34 → execweave-0.8.36}/src/execweave/model_runtime_full_fidelity.py +0 -0
- {execweave-0.8.34 → execweave-0.8.36}/src/execweave/openai_compatible_full_fidelity.py +0 -0
- {execweave-0.8.34 → execweave-0.8.36}/src/execweave/opencode_event_contract.py +0 -0
- {execweave-0.8.34 → execweave-0.8.36}/src/execweave/opencode_full_fidelity.py +0 -0
- {execweave-0.8.34 → execweave-0.8.36}/src/execweave/opencode_plugin_cli.py +0 -0
- {execweave-0.8.34 → execweave-0.8.36}/src/execweave/opencode_record.py +0 -0
- {execweave-0.8.34 → execweave-0.8.36}/src/execweave/opencode_task_linkage.py +0 -0
- {execweave-0.8.34 → execweave-0.8.36}/src/execweave/overhead_benchmark.py +0 -0
- {execweave-0.8.34 → execweave-0.8.36}/src/execweave/provider_capability.py +0 -0
- {execweave-0.8.34 → execweave-0.8.36}/src/execweave/provider_lifecycle.py +0 -0
- {execweave-0.8.34 → execweave-0.8.36}/src/execweave/provider_record.py +0 -0
- {execweave-0.8.34 → execweave-0.8.36}/src/execweave/redacted_archive.py +0 -0
- {execweave-0.8.34 → execweave-0.8.36}/src/execweave/rule_pack.py +0 -0
- {execweave-0.8.34 → execweave-0.8.36}/src/execweave/rule_pack_cli.py +0 -0
- {execweave-0.8.34 → execweave-0.8.36}/src/execweave/runtime_endpoint_availability.py +0 -0
- {execweave-0.8.34 → execweave-0.8.36}/src/execweave/scalability_benchmark.py +0 -0
- {execweave-0.8.34 → execweave-0.8.36}/src/execweave/schema.py +0 -0
- {execweave-0.8.34 → execweave-0.8.36}/src/execweave/scope.py +0 -0
- {execweave-0.8.34 → execweave-0.8.36}/src/execweave/stream_assembly.py +0 -0
- {execweave-0.8.34 → execweave-0.8.36}/src/execweave/task_artifacts.py +0 -0
- {execweave-0.8.34 → execweave-0.8.36}/src/execweave/theme.py +0 -0
- {execweave-0.8.34 → execweave-0.8.36}/src/execweave/vendor/dagre.min.js +0 -0
- {execweave-0.8.34 → execweave-0.8.36}/src/execweave/view_cli.py +0 -0
- {execweave-0.8.34 → execweave-0.8.36}/src/execweave/viewer_agent_panel_antigravity.py +0 -0
- {execweave-0.8.34 → execweave-0.8.36}/src/execweave/viewer_agent_panel_claude.py +0 -0
- {execweave-0.8.34 → execweave-0.8.36}/src/execweave/viewer_agent_panel_codex.py +0 -0
- {execweave-0.8.34 → execweave-0.8.36}/src/execweave/viewer_agent_panel_cursor.py +0 -0
- {execweave-0.8.34 → execweave-0.8.36}/src/execweave/viewer_agent_panel_default.py +0 -0
- {execweave-0.8.34 → execweave-0.8.36}/src/execweave/viewer_agent_panel_ollama.py +0 -0
- {execweave-0.8.34 → execweave-0.8.36}/src/execweave/viewer_agent_panel_opencode.py +0 -0
- {execweave-0.8.34 → execweave-0.8.36}/src/execweave/viewer_agent_panel_registry.py +0 -0
- {execweave-0.8.34 → execweave-0.8.36}/src/execweave/viewer_archive_verifier.py +0 -0
- {execweave-0.8.34 → execweave-0.8.36}/src/execweave/viewer_background_files.py +0 -0
- {execweave-0.8.34 → execweave-0.8.36}/src/execweave/viewer_content_browser.py +0 -0
- {execweave-0.8.34 → execweave-0.8.36}/src/execweave/viewer_content_health.py +0 -0
- {execweave-0.8.34 → execweave-0.8.36}/src/execweave/viewer_content_inspector.py +0 -0
- {execweave-0.8.34 → execweave-0.8.36}/src/execweave/viewer_controlled_checks.py +0 -0
- {execweave-0.8.34 → execweave-0.8.36}/src/execweave/viewer_conversation_sync.py +0 -0
- {execweave-0.8.34 → execweave-0.8.36}/src/execweave/viewer_dashboard_focus.py +0 -0
- {execweave-0.8.34 → execweave-0.8.36}/src/execweave/viewer_dashboard_hardening.py +0 -0
- {execweave-0.8.34 → execweave-0.8.36}/src/execweave/viewer_dashboard_hardening_v2.py +0 -0
- {execweave-0.8.34 → execweave-0.8.36}/src/execweave/viewer_dashboard_pr70.py +0 -0
- {execweave-0.8.34 → execweave-0.8.36}/src/execweave/viewer_delivery_status.py +0 -0
- {execweave-0.8.34 → execweave-0.8.36}/src/execweave/viewer_edge_decross.py +0 -0
- {execweave-0.8.34 → execweave-0.8.36}/src/execweave/viewer_execution_flow.py +0 -0
- {execweave-0.8.34 → execweave-0.8.36}/src/execweave/viewer_execution_flow_provider_normalization.py +0 -0
- {execweave-0.8.34 → execweave-0.8.36}/src/execweave/viewer_execution_flow_safety.py +0 -0
- {execweave-0.8.34 → execweave-0.8.36}/src/execweave/viewer_external_endpoints.py +0 -0
- {execweave-0.8.34 → execweave-0.8.36}/src/execweave/viewer_fold_state.py +0 -0
- {execweave-0.8.34 → execweave-0.8.36}/src/execweave/viewer_framework_model_output.py +0 -0
- {execweave-0.8.34 → execweave-0.8.36}/src/execweave/viewer_gif.py +0 -0
- {execweave-0.8.34 → execweave-0.8.36}/src/execweave/viewer_history_browser.py +0 -0
- {execweave-0.8.34 → execweave-0.8.36}/src/execweave/viewer_investigation.py +0 -0
- {execweave-0.8.34 → execweave-0.8.36}/src/execweave/viewer_layout_geometry.py +0 -0
- {execweave-0.8.34 → execweave-0.8.36}/src/execweave/viewer_layout_v2.py +0 -0
- {execweave-0.8.34 → execweave-0.8.36}/src/execweave/viewer_layout_v2_detached.py +0 -0
- {execweave-0.8.34 → execweave-0.8.36}/src/execweave/viewer_limits.py +0 -0
- {execweave-0.8.34 → execweave-0.8.36}/src/execweave/viewer_live_layout.py +0 -0
- {execweave-0.8.34 → execweave-0.8.36}/src/execweave/viewer_message_handoffs.py +0 -0
- {execweave-0.8.34 → execweave-0.8.36}/src/execweave/viewer_projection_bridges.py +0 -0
- {execweave-0.8.34 → execweave-0.8.36}/src/execweave/viewer_recorded_sources.py +0 -0
- {execweave-0.8.34 → execweave-0.8.36}/src/execweave/viewer_run_guide.py +0 -0
- {execweave-0.8.34 → execweave-0.8.36}/src/execweave/viewer_runtime_evidence.py +0 -0
- {execweave-0.8.34 → execweave-0.8.36}/src/execweave/viewer_structure_share.py +0 -0
- {execweave-0.8.34 → execweave-0.8.36}/src/execweave/viewer_task_validation.py +0 -0
- {execweave-0.8.34 → execweave-0.8.36}/src/execweave/viewer_tool_mirror_identity.py +0 -0
- {execweave-0.8.34 → execweave-0.8.36}/src/execweave/viewer_workflow_mode.py +0 -0
- {execweave-0.8.34 → execweave-0.8.36}/src/execweave/workflow.py +0 -0
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
Metadata-Version: 2.5
|
|
2
2
|
Name: execweave
|
|
3
|
-
Version: 0.8.
|
|
4
|
-
Summary:
|
|
3
|
+
Version: 0.8.36
|
|
4
|
+
Summary: Local AI-agent execution graphs that identify sender/recipient handoffs with no observed receive in graph.json.
|
|
5
5
|
Project-URL: Homepage, https://github.com/Irish-kw/ExecWeave
|
|
6
6
|
Project-URL: Repository, https://github.com/Irish-kw/ExecWeave
|
|
7
7
|
Project-URL: Documentation, https://github.com/Irish-kw/ExecWeave#documentation
|
|
@@ -61,6 +61,10 @@ Provides-Extra: validation
|
|
|
61
61
|
Requires-Dist: cryptography>=44; extra == 'validation'
|
|
62
62
|
Description-Content-Type: text/markdown
|
|
63
63
|
|
|
64
|
+
<p align="center">
|
|
65
|
+
<img src="docs/assets/shot5_brand.jpg" alt="ExecWeave" width="100%">
|
|
66
|
+
</p>
|
|
67
|
+
|
|
64
68
|
# ExecWeave
|
|
65
69
|
|
|
66
70
|
<!-- i18n-nav:start -->
|
|
@@ -85,6 +89,8 @@ Description-Content-Type: text/markdown
|
|
|
85
89
|
|
|
86
90
|
**See what AI agents actually do on your machine.**
|
|
87
91
|
|
|
92
|
+
**In multi-role agent workflows, ExecWeave automatically flags recorded handoffs where a send event has no matching observed receive event, identifies the sender and recipient, and records `message_receive_not_observed` in `graph.json`. This is an observation gap, not proof of failed delivery.**
|
|
93
|
+
|
|
88
94
|
ExecWeave is a local-first observability project for AI agents and AI-assisted development tools. It combines provider-level semantics with operating-system runtime evidence and presents them as one interactive execution graph.
|
|
89
95
|
|
|
90
96
|
> **Events are evidence. The graph is a materialized view.**
|
|
@@ -122,32 +128,65 @@ python -m pip install -e ".[dev]"
|
|
|
122
128
|
|
|
123
129
|
## Quick start
|
|
124
130
|
|
|
125
|
-
|
|
131
|
+
First create an isolated, user-owned virtual environment (no sudo):
|
|
126
132
|
|
|
127
133
|
```bash
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
+
python -m venv .venv
|
|
135
|
+
source .venv/bin/activate
|
|
136
|
+
python -m pip install -U execweave
|
|
137
|
+
```
|
|
138
|
+
|
|
139
|
+
On Windows PowerShell, activate with `.venv\Scripts\Activate.ps1` instead.
|
|
140
|
+
|
|
141
|
+
Reproduce the built-in negative example **before** enabling any provider hook:
|
|
142
|
+
|
|
143
|
+
```bash
|
|
144
|
+
python -m execweave.observation_demo --output-dir ./observation-negative
|
|
134
145
|
```
|
|
135
146
|
|
|
136
|
-
|
|
147
|
+
The example's workload can succeed while evidence remains incomplete. Inspect
|
|
148
|
+
`observation-negative/graph.json` and `observation-negative/finalization.json`;
|
|
149
|
+
`execution_state=succeeded` is not the same as complete observation.
|
|
150
|
+
|
|
151
|
+
If you need provider-specific lifecycle evidence, explicitly approve and install
|
|
152
|
+
its hook in this user environment; **do not use sudo**:
|
|
137
153
|
|
|
138
154
|
```bash
|
|
139
|
-
execweave
|
|
155
|
+
execweave hooks install antigravity
|
|
156
|
+
execweave hooks status antigravity
|
|
140
157
|
```
|
|
141
158
|
|
|
142
|
-
|
|
159
|
+
Now launch a real provider (Antigravity's CLI is `agy`, if installed):
|
|
143
160
|
|
|
144
161
|
```bash
|
|
162
|
+
execweave live --open -- agy
|
|
163
|
+
```
|
|
164
|
+
|
|
165
|
+
Other available client commands can be wrapped the same way:
|
|
166
|
+
|
|
167
|
+
```bash
|
|
168
|
+
execweave live --open -- claude
|
|
169
|
+
execweave live --open -- codex
|
|
170
|
+
execweave live --open -- cursor
|
|
171
|
+
execweave live --open -- opencode
|
|
172
|
+
execweave record --open -- codex
|
|
145
173
|
execweave top -- codex
|
|
146
174
|
```
|
|
147
175
|
|
|
176
|
+
Provider-specific hooks require their own explicit installation/approval.
|
|
177
|
+
An exit code of zero does not establish recording completeness or task validity.
|
|
178
|
+
|
|
148
179
|
### Provider integration approval
|
|
149
180
|
|
|
150
|
-
|
|
181
|
+
Since 0.8.35, `live` only checks hook configuration; it never installs or rewrites it. Explicitly run `execweave hooks install antigravity` (or `claude`, `codex`, `cursor`, `opencode`) from your user-owned environment, without sudo. `execweave hooks status antigravity` checks setup without writing. Provider approval may still be required. **Configured does not mean evidence was delivered.** Missing delivery and incomplete observation are recorded independently of process exit.
|
|
182
|
+
|
|
183
|
+
See [observation integrity and the negative example](docs/observation-integrity.md) for the three result axes and their honest limits. These changes ship in 0.8.35; earlier versions do not contain them.
|
|
184
|
+
|
|
185
|
+
**Live privacy and authentication (0.8.35)**
|
|
186
|
+
|
|
187
|
+
`execweave live` and `execweave top` record the complete provider/model content an integration exposes (prompts, responses, tool values) by default, because the run stays on your own machine for you to inspect. Add `--metadata-only` when a run must not store that plaintext; `--capture-content` remains accepted and selects the default explicitly. Invalid capture-policy values fail closed to metadata-only at automatic recorder boundaries.
|
|
188
|
+
|
|
189
|
+
The live dashboard no longer puts its API credential in `?t=...`. The announced URL contains no credential. Browser access uses a one-time pairing code submitted in a POST body and then an `HttpOnly; SameSite=Strict` cookie; non-browser API clients use the private `X-ExecWeave-Token` header.
|
|
151
190
|
|
|
152
191
|
Google Antigravity currently uses the `agy` CLI command. ExecWeave also accepts `antigravity` as a friendly alias.
|
|
153
192
|
|
|
@@ -185,6 +224,8 @@ execweave live --open -- ollama run deepseek-r1:1.5b
|
|
|
185
224
|
|
|
186
225
|
This mode does not start an Ollama server. A reachable upstream server is still required.
|
|
187
226
|
|
|
227
|
+
In both modes the relay forwards every request and, by default, records each inference exchange so the prompts and responses appear in the run and on the dashboard. Add `--metadata-only` (for example, `execweave live --metadata-only --open -- ollama serve`) when the conversation must not be stored.
|
|
228
|
+
|
|
188
229
|
## Dashboard
|
|
189
230
|
|
|
190
231
|
The dashboard is designed to keep large, multi-agent runs inspectable without changing the underlying evidence.
|
|
@@ -348,7 +389,8 @@ Raw observations remain separate from derived semantic and correlation outputs.
|
|
|
348
389
|
- **Failure ownership cleanup:** if the portable collector fails unexpectedly after launching a managed workload, it terminates the workload it owns before recording terminal session state. A filesystem observer that only partially starts is also torn down before the startup error propagates.
|
|
349
390
|
- Linux also provides a `strace` reference backend with stronger syscall-attributed evidence for supported executions.
|
|
350
391
|
- Provider semantics depend on what each integration actually exposes. Missing prompts, hidden reasoning, remote provider internals, and unexposed routing cannot be reconstructed reliably.
|
|
351
|
-
- Full-fidelity provider content may contain credentials, secrets, source code, prompts, tool values, model responses, shell output, and file contents.
|
|
392
|
+
- Full-fidelity provider content may contain credentials, secrets, source code, prompts, tool values, model responses, shell output, and file contents. `live`/`top` store it by default because the run stays on the local machine; the run directory is owner-private, and `--metadata-only` keeps that plaintext out of the run entirely.
|
|
393
|
+
- Run artifacts are written through owner-private primitives. POSIX permissions are established before sensitive bytes are published; the Windows path applies a protected owner DACL. Final Windows guarantees still depend on the release CI matrix and are not inferred from Linux tests.
|
|
352
394
|
- Conversation isolation is an attribution rule, not a redaction boundary. Explicitly routed content may legitimately appear at more than one participant.
|
|
353
395
|
- A local integrity manifest detects changes relative to the manifest; it is not an adversary-resistant trusted logging system if both evidence and manifest remain inside the same writable trust boundary.
|
|
354
396
|
- Review the complete run directory before sharing it.
|
|
@@ -401,3 +443,7 @@ the adapter automatically joins that run and the finished Dashboard is built
|
|
|
401
443
|
from the merged runtime plus framework evidence. Task prompts and routed
|
|
402
444
|
messages remain local content references and are visible from their task and
|
|
403
445
|
agent nodes.
|
|
446
|
+
|
|
447
|
+
## Custom OpenAI Python scripts
|
|
448
|
+
|
|
449
|
+
Use `execweave record -- python my_agent.py` or `execweave live --open -- python my_agent.py` to observe the runtime. For **OpenAI API-key single-/multi-Agent semantic evidence**, wrap the official SDK with `OpenAIAgentRecorder` and explicitly record each Agent's send/receive handoffs. No API key is read by the adapter, and HTTPS cannot reveal roles by itself. See [OpenAI Python integration](docs/openai-python.md) for synchronous/async calls, privacy and limitations.
|
|
@@ -1,3 +1,7 @@
|
|
|
1
|
+
<p align="center">
|
|
2
|
+
<img src="docs/assets/shot5_brand.jpg" alt="ExecWeave" width="100%">
|
|
3
|
+
</p>
|
|
4
|
+
|
|
1
5
|
# ExecWeave
|
|
2
6
|
|
|
3
7
|
<!-- i18n-nav:start -->
|
|
@@ -22,6 +26,8 @@
|
|
|
22
26
|
|
|
23
27
|
**See what AI agents actually do on your machine.**
|
|
24
28
|
|
|
29
|
+
**In multi-role agent workflows, ExecWeave automatically flags recorded handoffs where a send event has no matching observed receive event, identifies the sender and recipient, and records `message_receive_not_observed` in `graph.json`. This is an observation gap, not proof of failed delivery.**
|
|
30
|
+
|
|
25
31
|
ExecWeave is a local-first observability project for AI agents and AI-assisted development tools. It combines provider-level semantics with operating-system runtime evidence and presents them as one interactive execution graph.
|
|
26
32
|
|
|
27
33
|
> **Events are evidence. The graph is a materialized view.**
|
|
@@ -59,32 +65,65 @@ python -m pip install -e ".[dev]"
|
|
|
59
65
|
|
|
60
66
|
## Quick start
|
|
61
67
|
|
|
62
|
-
|
|
68
|
+
First create an isolated, user-owned virtual environment (no sudo):
|
|
63
69
|
|
|
64
70
|
```bash
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
+
python -m venv .venv
|
|
72
|
+
source .venv/bin/activate
|
|
73
|
+
python -m pip install -U execweave
|
|
74
|
+
```
|
|
75
|
+
|
|
76
|
+
On Windows PowerShell, activate with `.venv\Scripts\Activate.ps1` instead.
|
|
77
|
+
|
|
78
|
+
Reproduce the built-in negative example **before** enabling any provider hook:
|
|
79
|
+
|
|
80
|
+
```bash
|
|
81
|
+
python -m execweave.observation_demo --output-dir ./observation-negative
|
|
71
82
|
```
|
|
72
83
|
|
|
73
|
-
|
|
84
|
+
The example's workload can succeed while evidence remains incomplete. Inspect
|
|
85
|
+
`observation-negative/graph.json` and `observation-negative/finalization.json`;
|
|
86
|
+
`execution_state=succeeded` is not the same as complete observation.
|
|
87
|
+
|
|
88
|
+
If you need provider-specific lifecycle evidence, explicitly approve and install
|
|
89
|
+
its hook in this user environment; **do not use sudo**:
|
|
74
90
|
|
|
75
91
|
```bash
|
|
76
|
-
execweave
|
|
92
|
+
execweave hooks install antigravity
|
|
93
|
+
execweave hooks status antigravity
|
|
77
94
|
```
|
|
78
95
|
|
|
79
|
-
|
|
96
|
+
Now launch a real provider (Antigravity's CLI is `agy`, if installed):
|
|
80
97
|
|
|
81
98
|
```bash
|
|
99
|
+
execweave live --open -- agy
|
|
100
|
+
```
|
|
101
|
+
|
|
102
|
+
Other available client commands can be wrapped the same way:
|
|
103
|
+
|
|
104
|
+
```bash
|
|
105
|
+
execweave live --open -- claude
|
|
106
|
+
execweave live --open -- codex
|
|
107
|
+
execweave live --open -- cursor
|
|
108
|
+
execweave live --open -- opencode
|
|
109
|
+
execweave record --open -- codex
|
|
82
110
|
execweave top -- codex
|
|
83
111
|
```
|
|
84
112
|
|
|
113
|
+
Provider-specific hooks require their own explicit installation/approval.
|
|
114
|
+
An exit code of zero does not establish recording completeness or task validity.
|
|
115
|
+
|
|
85
116
|
### Provider integration approval
|
|
86
117
|
|
|
87
|
-
|
|
118
|
+
Since 0.8.35, `live` only checks hook configuration; it never installs or rewrites it. Explicitly run `execweave hooks install antigravity` (or `claude`, `codex`, `cursor`, `opencode`) from your user-owned environment, without sudo. `execweave hooks status antigravity` checks setup without writing. Provider approval may still be required. **Configured does not mean evidence was delivered.** Missing delivery and incomplete observation are recorded independently of process exit.
|
|
119
|
+
|
|
120
|
+
See [observation integrity and the negative example](docs/observation-integrity.md) for the three result axes and their honest limits. These changes ship in 0.8.35; earlier versions do not contain them.
|
|
121
|
+
|
|
122
|
+
**Live privacy and authentication (0.8.35)**
|
|
123
|
+
|
|
124
|
+
`execweave live` and `execweave top` record the complete provider/model content an integration exposes (prompts, responses, tool values) by default, because the run stays on your own machine for you to inspect. Add `--metadata-only` when a run must not store that plaintext; `--capture-content` remains accepted and selects the default explicitly. Invalid capture-policy values fail closed to metadata-only at automatic recorder boundaries.
|
|
125
|
+
|
|
126
|
+
The live dashboard no longer puts its API credential in `?t=...`. The announced URL contains no credential. Browser access uses a one-time pairing code submitted in a POST body and then an `HttpOnly; SameSite=Strict` cookie; non-browser API clients use the private `X-ExecWeave-Token` header.
|
|
88
127
|
|
|
89
128
|
Google Antigravity currently uses the `agy` CLI command. ExecWeave also accepts `antigravity` as a friendly alias.
|
|
90
129
|
|
|
@@ -122,6 +161,8 @@ execweave live --open -- ollama run deepseek-r1:1.5b
|
|
|
122
161
|
|
|
123
162
|
This mode does not start an Ollama server. A reachable upstream server is still required.
|
|
124
163
|
|
|
164
|
+
In both modes the relay forwards every request and, by default, records each inference exchange so the prompts and responses appear in the run and on the dashboard. Add `--metadata-only` (for example, `execweave live --metadata-only --open -- ollama serve`) when the conversation must not be stored.
|
|
165
|
+
|
|
125
166
|
## Dashboard
|
|
126
167
|
|
|
127
168
|
The dashboard is designed to keep large, multi-agent runs inspectable without changing the underlying evidence.
|
|
@@ -285,7 +326,8 @@ Raw observations remain separate from derived semantic and correlation outputs.
|
|
|
285
326
|
- **Failure ownership cleanup:** if the portable collector fails unexpectedly after launching a managed workload, it terminates the workload it owns before recording terminal session state. A filesystem observer that only partially starts is also torn down before the startup error propagates.
|
|
286
327
|
- Linux also provides a `strace` reference backend with stronger syscall-attributed evidence for supported executions.
|
|
287
328
|
- Provider semantics depend on what each integration actually exposes. Missing prompts, hidden reasoning, remote provider internals, and unexposed routing cannot be reconstructed reliably.
|
|
288
|
-
- Full-fidelity provider content may contain credentials, secrets, source code, prompts, tool values, model responses, shell output, and file contents.
|
|
329
|
+
- Full-fidelity provider content may contain credentials, secrets, source code, prompts, tool values, model responses, shell output, and file contents. `live`/`top` store it by default because the run stays on the local machine; the run directory is owner-private, and `--metadata-only` keeps that plaintext out of the run entirely.
|
|
330
|
+
- Run artifacts are written through owner-private primitives. POSIX permissions are established before sensitive bytes are published; the Windows path applies a protected owner DACL. Final Windows guarantees still depend on the release CI matrix and are not inferred from Linux tests.
|
|
289
331
|
- Conversation isolation is an attribution rule, not a redaction boundary. Explicitly routed content may legitimately appear at more than one participant.
|
|
290
332
|
- A local integrity manifest detects changes relative to the manifest; it is not an adversary-resistant trusted logging system if both evidence and manifest remain inside the same writable trust boundary.
|
|
291
333
|
- Review the complete run directory before sharing it.
|
|
@@ -338,3 +380,7 @@ the adapter automatically joins that run and the finished Dashboard is built
|
|
|
338
380
|
from the merged runtime plus framework evidence. Task prompts and routed
|
|
339
381
|
messages remain local content references and are visible from their task and
|
|
340
382
|
agent nodes.
|
|
383
|
+
|
|
384
|
+
## Custom OpenAI Python scripts
|
|
385
|
+
|
|
386
|
+
Use `execweave record -- python my_agent.py` or `execweave live --open -- python my_agent.py` to observe the runtime. For **OpenAI API-key single-/multi-Agent semantic evidence**, wrap the official SDK with `OpenAIAgentRecorder` and explicitly record each Agent's send/receive handoffs. No API key is read by the adapter, and HTTPS cannot reveal roles by itself. See [OpenAI Python integration](docs/openai-python.md) for synchronous/async calls, privacy and limitations.
|
|
@@ -4,9 +4,9 @@ build-backend = "hatchling.build"
|
|
|
4
4
|
|
|
5
5
|
[project]
|
|
6
6
|
name = "execweave"
|
|
7
|
-
# ExecWeave v0.8.
|
|
8
|
-
version = "0.8.
|
|
9
|
-
description = "
|
|
7
|
+
# ExecWeave v0.8.36 release metadata
|
|
8
|
+
version = "0.8.36"
|
|
9
|
+
description = "Local AI-agent execution graphs that identify sender/recipient handoffs with no observed receive in graph.json."
|
|
10
10
|
readme = "README.md"
|
|
11
11
|
requires-python = ">=3.10"
|
|
12
12
|
license = { file = "LICENSE" }
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
from __future__ import annotations
|
|
2
2
|
|
|
3
|
-
import json
|
|
4
3
|
import re
|
|
5
4
|
from collections import Counter
|
|
6
5
|
from pathlib import Path
|
|
7
6
|
from typing import Any
|
|
8
7
|
from .content_store import _filesystem_path
|
|
8
|
+
from .private_io import write_private_json, write_private_text
|
|
9
9
|
|
|
10
10
|
from .agent_topology import (
|
|
11
11
|
COMPLETENESS_ROUTING_ONLY,
|
|
@@ -897,9 +897,6 @@ def write_conversation_records(
|
|
|
897
897
|
entries = payload["entries"]
|
|
898
898
|
json_path = root / "conversations.json"
|
|
899
899
|
markdown_path = root / "conversations.md"
|
|
900
|
-
json_path.
|
|
901
|
-
|
|
902
|
-
encoding="utf-8",
|
|
903
|
-
)
|
|
904
|
-
markdown_path.write_text(_render_markdown(entries), encoding="utf-8")
|
|
900
|
+
write_private_json(json_path, payload, replace=json_path.exists())
|
|
901
|
+
write_private_text(markdown_path, _render_markdown(entries), replace=markdown_path.exists())
|
|
905
902
|
return json_path, markdown_path
|
|
@@ -4,6 +4,7 @@ import http.client
|
|
|
4
4
|
import ipaddress
|
|
5
5
|
import json
|
|
6
6
|
import sys
|
|
7
|
+
import threading
|
|
7
8
|
import uuid
|
|
8
9
|
from dataclasses import dataclass
|
|
9
10
|
from http.server import BaseHTTPRequestHandler, ThreadingHTTPServer
|
|
@@ -16,6 +17,7 @@ from .content_store import FullFidelityContentStore
|
|
|
16
17
|
from .model_runtime_full_fidelity import runtime_exchange_to_content_events
|
|
17
18
|
from .openai_compatible import append_openai_compatible_records
|
|
18
19
|
from .openai_compatible_full_fidelity import exchange_to_content_events
|
|
20
|
+
from .privacy import full_content_capture_enabled
|
|
19
21
|
from .stream_assembly import (
|
|
20
22
|
OLLAMA_NDJSON,
|
|
21
23
|
OPENAI_CHAT_DELTA,
|
|
@@ -208,6 +210,8 @@ def record_exchange_fail_open(
|
|
|
208
210
|
request_only: bool = False,
|
|
209
211
|
request_recorded: bool = False,
|
|
210
212
|
) -> bool:
|
|
213
|
+
if not full_content_capture_enabled():
|
|
214
|
+
return False
|
|
211
215
|
try:
|
|
212
216
|
request = _json(request_body)
|
|
213
217
|
if not isinstance(request, dict):
|
|
@@ -386,8 +390,30 @@ class ExecWeaveHTTPProxyServer(ThreadingHTTPServer):
|
|
|
386
390
|
self.proxy_config = config
|
|
387
391
|
self.upstream = _parse_upstream(config.upstream)
|
|
388
392
|
self.recorder = recorder
|
|
393
|
+
# Handler threads are daemonic, so ThreadingMixIn.server_close() does not
|
|
394
|
+
# join them. A response can reach the client before its recording finishes,
|
|
395
|
+
# so closing the server waits for those recordings explicitly instead.
|
|
396
|
+
self._recordings = 0
|
|
397
|
+
self._recordings_done = threading.Condition()
|
|
389
398
|
super().__init__(address, ExecWeaveHTTPProxyHandler)
|
|
390
399
|
|
|
400
|
+
def begin_recording(self) -> None:
|
|
401
|
+
with self._recordings_done:
|
|
402
|
+
self._recordings += 1
|
|
403
|
+
|
|
404
|
+
def end_recording(self) -> None:
|
|
405
|
+
with self._recordings_done:
|
|
406
|
+
self._recordings -= 1
|
|
407
|
+
self._recordings_done.notify_all()
|
|
408
|
+
|
|
409
|
+
def wait_for_recordings(self, timeout: float | None = None) -> bool:
|
|
410
|
+
with self._recordings_done:
|
|
411
|
+
return self._recordings_done.wait_for(lambda: self._recordings == 0, timeout)
|
|
412
|
+
|
|
413
|
+
def server_close(self) -> None:
|
|
414
|
+
super().server_close()
|
|
415
|
+
self.wait_for_recordings()
|
|
416
|
+
|
|
391
417
|
|
|
392
418
|
class ExecWeaveHTTPProxyHandler(BaseHTTPRequestHandler):
|
|
393
419
|
server: ExecWeaveHTTPProxyServer
|
|
@@ -4,7 +4,9 @@ import http.client
|
|
|
4
4
|
import itertools
|
|
5
5
|
import json
|
|
6
6
|
import os
|
|
7
|
+
import socket
|
|
7
8
|
import tempfile
|
|
9
|
+
import threading
|
|
8
10
|
from pathlib import Path
|
|
9
11
|
from typing import Any, Iterator
|
|
10
12
|
|
|
@@ -486,34 +488,73 @@ def relay_default(handler: _base.ExecWeaveHTTPProxyHandler) -> None:
|
|
|
486
488
|
return
|
|
487
489
|
finally:
|
|
488
490
|
connection.close()
|
|
491
|
+
|
|
492
|
+
def record() -> None:
|
|
493
|
+
try:
|
|
494
|
+
if capture is not None:
|
|
495
|
+
capture.finish()
|
|
496
|
+
_record_capture(
|
|
497
|
+
handler.server.proxy_config,
|
|
498
|
+
exchange_id=exchange_id,
|
|
499
|
+
request_body=body,
|
|
500
|
+
response_content_type=response_type,
|
|
501
|
+
method=handler.command,
|
|
502
|
+
request_path=target,
|
|
503
|
+
status=status,
|
|
504
|
+
capture=capture,
|
|
505
|
+
)
|
|
506
|
+
else:
|
|
507
|
+
handler.server.recorder(
|
|
508
|
+
handler.server.proxy_config,
|
|
509
|
+
exchange_id=exchange_id,
|
|
510
|
+
method=handler.command,
|
|
511
|
+
request_path=target,
|
|
512
|
+
request_body=body,
|
|
513
|
+
request_content_type=handler.headers.get("Content-Type"),
|
|
514
|
+
status=status,
|
|
515
|
+
response_body=bytes(response_body),
|
|
516
|
+
response_content_type=response_type,
|
|
517
|
+
request_recorded=request_recorded,
|
|
518
|
+
)
|
|
519
|
+
except Exception as exc:
|
|
520
|
+
print(f"ExecWeave HTTP proxy recorder warning: {exc}", file=_base.sys.stderr)
|
|
521
|
+
finally:
|
|
522
|
+
if capture is not None:
|
|
523
|
+
capture.cleanup()
|
|
524
|
+
|
|
525
|
+
_record_after_response(handler, record)
|
|
526
|
+
|
|
527
|
+
|
|
528
|
+
# Recording normally finishes in well under this, so the client still sees the end
|
|
529
|
+
# of the response only once its evidence is on disk. A slow disk, lock or scanner
|
|
530
|
+
# must not hold the user's program, though: past this point the response is ended
|
|
531
|
+
# while recording finishes, and closing the server waits for it.
|
|
532
|
+
_CLIENT_RELEASE_SECONDS = 2.0
|
|
533
|
+
|
|
534
|
+
|
|
535
|
+
def _record_after_response(handler: _base.ExecWeaveHTTPProxyHandler, record) -> None:
|
|
536
|
+
server = handler.server
|
|
537
|
+
server.begin_recording()
|
|
538
|
+
|
|
539
|
+
def run() -> None:
|
|
540
|
+
try:
|
|
541
|
+
record()
|
|
542
|
+
finally:
|
|
543
|
+
server.end_recording()
|
|
544
|
+
|
|
545
|
+
worker = threading.Thread(target=run, name="execweave-proxy-record", daemon=True)
|
|
489
546
|
try:
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
handler.server.proxy_config,
|
|
505
|
-
exchange_id=exchange_id,
|
|
506
|
-
method=handler.command,
|
|
507
|
-
request_path=target,
|
|
508
|
-
request_body=body,
|
|
509
|
-
request_content_type=handler.headers.get("Content-Type"),
|
|
510
|
-
status=status,
|
|
511
|
-
response_body=bytes(response_body),
|
|
512
|
-
response_content_type=response_type,
|
|
513
|
-
request_recorded=request_recorded,
|
|
514
|
-
)
|
|
515
|
-
except Exception as exc:
|
|
516
|
-
print(f"ExecWeave HTTP proxy recorder warning: {exc}", file=_base.sys.stderr)
|
|
517
|
-
finally:
|
|
518
|
-
if capture is not None:
|
|
519
|
-
capture.cleanup()
|
|
547
|
+
worker.start()
|
|
548
|
+
except RuntimeError:
|
|
549
|
+
run()
|
|
550
|
+
return
|
|
551
|
+
worker.join(_CLIENT_RELEASE_SECONDS)
|
|
552
|
+
if worker.is_alive():
|
|
553
|
+
# HTTP/1.0 with Connection: close and no Content-Length, so the client
|
|
554
|
+
# treats the end of the stream as the end of the response.
|
|
555
|
+
try:
|
|
556
|
+
handler.wfile.flush()
|
|
557
|
+
handler.connection.shutdown(socket.SHUT_WR)
|
|
558
|
+
except OSError:
|
|
559
|
+
pass
|
|
560
|
+
worker.join()
|
|
@@ -6,6 +6,7 @@ from . import _http_proxy_base as _base
|
|
|
6
6
|
from . import model_runtime_full_fidelity as _runtime_ff
|
|
7
7
|
from . import openai_compatible_full_fidelity as _openai_ff
|
|
8
8
|
from ._http_proxy_base import * # noqa: F403
|
|
9
|
+
from .privacy import full_content_capture_enabled
|
|
9
10
|
|
|
10
11
|
|
|
11
12
|
# OpenAI-compatible request config is request-side evidence too. Without this relation
|
|
@@ -435,6 +436,8 @@ def record_exchange_fail_open(
|
|
|
435
436
|
request_only: bool = False,
|
|
436
437
|
request_recorded: bool = False,
|
|
437
438
|
) -> bool:
|
|
439
|
+
if not full_content_capture_enabled():
|
|
440
|
+
return False
|
|
438
441
|
try:
|
|
439
442
|
if request_only:
|
|
440
443
|
return _record_request_phase(
|
|
@@ -8,6 +8,8 @@ from dataclasses import asdict, dataclass
|
|
|
8
8
|
from pathlib import Path
|
|
9
9
|
from typing import Any, Mapping
|
|
10
10
|
|
|
11
|
+
from .hook_command import hook_argv, hook_command, hook_markers
|
|
12
|
+
|
|
11
13
|
_AUTO_FLAG = "--auto"
|
|
12
14
|
_CONFIG_RETRIES = 3
|
|
13
15
|
_SUPPORTED_AGENTS = {
|
|
@@ -73,7 +75,7 @@ def _read_bytes(path: Path) -> bytes | None:
|
|
|
73
75
|
def _contains_execweave_command(value: object, marker: str) -> bool:
|
|
74
76
|
if isinstance(value, dict):
|
|
75
77
|
command = value.get("command")
|
|
76
|
-
if isinstance(command, str) and
|
|
78
|
+
if isinstance(command, str) and any(value in command for value in hook_markers(marker)):
|
|
77
79
|
return True
|
|
78
80
|
return any(_contains_execweave_command(child, marker) for child in value.values())
|
|
79
81
|
if isinstance(value, list):
|
|
@@ -81,6 +83,28 @@ def _contains_execweave_command(value: object, marker: str) -> bool:
|
|
|
81
83
|
return False
|
|
82
84
|
|
|
83
85
|
|
|
86
|
+
def _migrate_hook_commands(value: object, marker: str) -> bool:
|
|
87
|
+
"""Upgrade only our old canonical bare entry point, retaining user settings."""
|
|
88
|
+
changed = False
|
|
89
|
+
if isinstance(value, dict):
|
|
90
|
+
command = value.get("command")
|
|
91
|
+
if isinstance(command, str):
|
|
92
|
+
prefix = f"{marker} --auto"
|
|
93
|
+
suffix = command[len(prefix):] if command.startswith(prefix) else None
|
|
94
|
+
valid_suffixes = {"", " --event PreInvocation", " --event PostInvocation",
|
|
95
|
+
" --event PostToolUse", " --event Stop"}
|
|
96
|
+
if suffix in valid_suffixes:
|
|
97
|
+
provider = marker.removeprefix("execweave-").removesuffix("-hook")
|
|
98
|
+
value["command"] = hook_command(provider) + suffix
|
|
99
|
+
changed = True
|
|
100
|
+
for child in value.values():
|
|
101
|
+
changed = _migrate_hook_commands(child, marker) or changed
|
|
102
|
+
elif isinstance(value, list):
|
|
103
|
+
for child in value:
|
|
104
|
+
changed = _migrate_hook_commands(child, marker) or changed
|
|
105
|
+
return changed
|
|
106
|
+
|
|
107
|
+
|
|
84
108
|
def _merge_hook_fragment(
|
|
85
109
|
current: dict[str, Any],
|
|
86
110
|
fragment: dict[str, Any],
|
|
@@ -88,7 +112,7 @@ def _merge_hook_fragment(
|
|
|
88
112
|
marker: str,
|
|
89
113
|
) -> tuple[dict[str, Any], bool]:
|
|
90
114
|
merged = deepcopy(current)
|
|
91
|
-
changed =
|
|
115
|
+
changed = _migrate_hook_commands(merged, marker)
|
|
92
116
|
|
|
93
117
|
for key, value in fragment.items():
|
|
94
118
|
if key == "hooks":
|
|
@@ -135,8 +159,9 @@ def _merge_named_hook_fragment(
|
|
|
135
159
|
) -> tuple[dict[str, Any], bool]:
|
|
136
160
|
"""Merge Antigravity's named-hook ``hooks.json`` schema conservatively."""
|
|
137
161
|
merged = deepcopy(current)
|
|
162
|
+
changed = _migrate_hook_commands(merged, marker)
|
|
138
163
|
if _contains_execweave_command(merged, marker):
|
|
139
|
-
return merged,
|
|
164
|
+
return merged, changed
|
|
140
165
|
for name, definition in fragment.items():
|
|
141
166
|
if name in merged:
|
|
142
167
|
raise FileExistsError(
|
|
@@ -215,9 +240,11 @@ def _write_plugin_file(path: Path, content: str, *, marker: str) -> bool:
|
|
|
215
240
|
existing = original.decode("utf-8")
|
|
216
241
|
except UnicodeDecodeError as exc:
|
|
217
242
|
raise ValueError(f"existing OpenCode plugin is not UTF-8: {path}") from exc
|
|
218
|
-
if existing == content
|
|
243
|
+
if existing == content:
|
|
219
244
|
return False
|
|
220
|
-
|
|
245
|
+
from .opencode_plugin_cli import plugin_text
|
|
246
|
+
if existing != plugin_text(("execweave-opencode-hook", _AUTO_FLAG)):
|
|
247
|
+
raise FileExistsError(f"refusing to replace existing OpenCode plugin: {path}")
|
|
221
248
|
if _write_bytes_optimistic(path, original, encoded):
|
|
222
249
|
return True
|
|
223
250
|
raise RuntimeError(f"plugin path changed concurrently while updating {path}")
|
|
@@ -254,11 +281,11 @@ def _provider_fragment(provider: str) -> tuple[dict[str, Any], str]:
|
|
|
254
281
|
if provider == "claude":
|
|
255
282
|
from .claude_hook_cli import claude_hook_config
|
|
256
283
|
|
|
257
|
-
return claude_hook_config(
|
|
284
|
+
return claude_hook_config(hook_command("claude")), "execweave-claude-hook"
|
|
258
285
|
if provider == "codex":
|
|
259
286
|
from .codex_hook_cli import codex_hook_config
|
|
260
287
|
|
|
261
|
-
return codex_hook_config(
|
|
288
|
+
return codex_hook_config(hook_command("codex")), "execweave-codex-hook"
|
|
262
289
|
if provider == "antigravity":
|
|
263
290
|
from .antigravity_hook_cli import antigravity_hook_config
|
|
264
291
|
|
|
@@ -266,7 +293,7 @@ def _provider_fragment(provider: str) -> tuple[dict[str, Any], str]:
|
|
|
266
293
|
if provider == "cursor":
|
|
267
294
|
from .cursor_hook_cli import cursor_hook_config
|
|
268
295
|
|
|
269
|
-
return cursor_hook_config(
|
|
296
|
+
return cursor_hook_config(hook_command("cursor")), "execweave-cursor-hook"
|
|
270
297
|
raise ValueError(f"provider does not use JSON hooks: {provider}")
|
|
271
298
|
|
|
272
299
|
|
|
@@ -293,7 +320,7 @@ def bootstrap_supported_agent(
|
|
|
293
320
|
if provider == "opencode":
|
|
294
321
|
from .opencode_plugin_cli import plugin_text
|
|
295
322
|
|
|
296
|
-
content = plugin_text(("
|
|
323
|
+
content = plugin_text(tuple(hook_argv("opencode")))
|
|
297
324
|
changed = _write_plugin_file(target, content, marker="execweave-opencode-hook")
|
|
298
325
|
else:
|
|
299
326
|
fragment, marker = _provider_fragment(provider)
|
|
@@ -317,10 +344,10 @@ def bootstrap_supported_agent(
|
|
|
317
344
|
|
|
318
345
|
return AgentBootstrapResult(
|
|
319
346
|
provider=provider,
|
|
320
|
-
status="
|
|
347
|
+
status="configured_unverified",
|
|
321
348
|
path=str(target),
|
|
322
349
|
changed=changed,
|
|
323
|
-
detail="specialized hook/plugin
|
|
350
|
+
detail="specialized hook/plugin configured; delivery unverified",
|
|
324
351
|
)
|
|
325
352
|
except (FileExistsError, OSError, RuntimeError, TypeError, ValueError) as exc:
|
|
326
353
|
return AgentBootstrapResult(
|
|
@@ -330,3 +357,39 @@ def bootstrap_supported_agent(
|
|
|
330
357
|
changed=False,
|
|
331
358
|
detail=_bounded_detail(exc),
|
|
332
359
|
)
|
|
360
|
+
|
|
361
|
+
|
|
362
|
+
def inspect_supported_agent(
|
|
363
|
+
command: list[str], *, home: str | Path | None = None,
|
|
364
|
+
environment: Mapping[str, str] | None = None,
|
|
365
|
+
) -> AgentBootstrapResult:
|
|
366
|
+
"""Read configuration only. Configuration is never proof of hook delivery."""
|
|
367
|
+
provider = supported_agent(command)
|
|
368
|
+
if provider is None:
|
|
369
|
+
return AgentBootstrapResult(provider=None, status="unavailable",
|
|
370
|
+
detail="no specialized lifecycle integration")
|
|
371
|
+
env = os.environ if environment is None else environment
|
|
372
|
+
home_path = Path.home() if home is None else Path(home).expanduser()
|
|
373
|
+
target = _provider_target(provider, home=home_path, environment=env)
|
|
374
|
+
try:
|
|
375
|
+
raw = _read_bytes(target)
|
|
376
|
+
if raw is None:
|
|
377
|
+
return AgentBootstrapResult(provider=provider, status="not_configured", path=str(target),
|
|
378
|
+
detail=f"Run execweave hooks install {provider} explicitly; never use sudo")
|
|
379
|
+
if provider == "opencode":
|
|
380
|
+
present = any(marker in raw.decode("utf-8")
|
|
381
|
+
for marker in hook_markers("execweave-opencode-hook"))
|
|
382
|
+
else:
|
|
383
|
+
config = _load_json_object(raw, path=target)
|
|
384
|
+
present = _contains_execweave_command(config, f"execweave-{provider}-hook")
|
|
385
|
+
if provider == "claude" and config.get("disableAllHooks") is True:
|
|
386
|
+
present = False
|
|
387
|
+
if provider == "antigravity":
|
|
388
|
+
group = config.get("execweave-observability", {})
|
|
389
|
+
present = present and isinstance(group, dict) and group.get("enabled") is True
|
|
390
|
+
return AgentBootstrapResult(provider=provider,
|
|
391
|
+
status="configured_unverified" if present else "not_configured",
|
|
392
|
+
path=str(target), detail="delivery must be verified from recorded evidence")
|
|
393
|
+
except (OSError, ValueError, UnicodeError) as exc:
|
|
394
|
+
return AgentBootstrapResult(provider=provider, status="bootstrap_failed", path=str(target),
|
|
395
|
+
detail=type(exc).__name__)
|