execweave 1.0.1__tar.gz → 1.0.2__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.
- {execweave-1.0.1 → execweave-1.0.2}/PKG-INFO +22 -1
- {execweave-1.0.1 → execweave-1.0.2}/README.md +19 -0
- {execweave-1.0.1 → execweave-1.0.2}/pyproject.toml +5 -2
- {execweave-1.0.1 → execweave-1.0.2}/src/execweave/__init__.py +1 -1
- {execweave-1.0.1 → execweave-1.0.2}/src/execweave/backends.py +11 -0
- {execweave-1.0.1 → execweave-1.0.2}/src/execweave/cli.py +99 -2
- execweave-1.0.2/src/execweave/lane/__init__.py +16 -0
- execweave-1.0.2/src/execweave/lane/backend.py +234 -0
- execweave-1.0.2/src/execweave/lane/exec_client.py +57 -0
- execweave-1.0.2/src/execweave/lane/hooks/__init__.py +0 -0
- execweave-1.0.2/src/execweave/lane/hooks/antigravity.py +112 -0
- execweave-1.0.2/src/execweave/lane/hooks/antigravity_bash_shim.sh +34 -0
- execweave-1.0.2/src/execweave/lane/hooks/claude_code.py +35 -0
- execweave-1.0.2/src/execweave/lane/hooks/codex_bash_shim.sh +14 -0
- execweave-1.0.2/src/execweave/lane/hooks/cursor.py +104 -0
- execweave-1.0.2/src/execweave/lane/lane_sensor_native_v2.bt +152 -0
- execweave-1.0.2/src/execweave/lane/runner.py +178 -0
- execweave-1.0.2/src/execweave/lane/sensor_canary.py +75 -0
- execweave-1.0.2/src/execweave/lane/sensor_guard.py +258 -0
- execweave-1.0.2/src/execweave/lane/sensor_nonce.py +73 -0
- execweave-1.0.2/src/execweave/lane/service.py +1176 -0
- {execweave-1.0.1 → execweave-1.0.2}/.gitignore +0 -0
- {execweave-1.0.1 → execweave-1.0.2}/LICENSE +0 -0
- {execweave-1.0.1 → execweave-1.0.2}/src/execweave/__main__.py +0 -0
- {execweave-1.0.1 → execweave-1.0.2}/src/execweave/_conversation_records_core.py +0 -0
- {execweave-1.0.1 → execweave-1.0.2}/src/execweave/_dashboard_shell_base.py +0 -0
- {execweave-1.0.1 → execweave-1.0.2}/src/execweave/_http_proxy_base.py +0 -0
- {execweave-1.0.1 → execweave-1.0.2}/src/execweave/_http_proxy_bounded.py +0 -0
- {execweave-1.0.1 → execweave-1.0.2}/src/execweave/_http_proxy_stage.py +0 -0
- {execweave-1.0.1 → execweave-1.0.2}/src/execweave/acceptance_output.py +0 -0
- {execweave-1.0.1 → execweave-1.0.2}/src/execweave/agent_bootstrap.py +0 -0
- {execweave-1.0.1 → execweave-1.0.2}/src/execweave/agent_topology.py +0 -0
- {execweave-1.0.1 → execweave-1.0.2}/src/execweave/agent_trace.py +0 -0
- {execweave-1.0.1 → execweave-1.0.2}/src/execweave/agy_preview_sanitize.py +0 -0
- {execweave-1.0.1 → execweave-1.0.2}/src/execweave/analysis.py +0 -0
- {execweave-1.0.1 → execweave-1.0.2}/src/execweave/anthropic.py +0 -0
- {execweave-1.0.1 → execweave-1.0.2}/src/execweave/anthropic_cli.py +0 -0
- {execweave-1.0.1 → execweave-1.0.2}/src/execweave/anthropic_full_fidelity.py +0 -0
- {execweave-1.0.1 → execweave-1.0.2}/src/execweave/antigravity_adapter.py +0 -0
- {execweave-1.0.1 → execweave-1.0.2}/src/execweave/antigravity_adapter_base.py +0 -0
- {execweave-1.0.1 → execweave-1.0.2}/src/execweave/antigravity_full_fidelity.py +0 -0
- {execweave-1.0.1 → execweave-1.0.2}/src/execweave/antigravity_full_fidelity_base.py +0 -0
- {execweave-1.0.1 → execweave-1.0.2}/src/execweave/antigravity_full_fidelity_collaboration_base.py +0 -0
- {execweave-1.0.1 → execweave-1.0.2}/src/execweave/antigravity_hook_cli.py +0 -0
- {execweave-1.0.1 → execweave-1.0.2}/src/execweave/antigravity_record.py +0 -0
- {execweave-1.0.1 → execweave-1.0.2}/src/execweave/antigravity_subagent_linkage.py +0 -0
- {execweave-1.0.1 → execweave-1.0.2}/src/execweave/antigravity_trace_capability.py +0 -0
- {execweave-1.0.1 → execweave-1.0.2}/src/execweave/auto_specialized.py +0 -0
- {execweave-1.0.1 → execweave-1.0.2}/src/execweave/benchmark.py +0 -0
- {execweave-1.0.1 → execweave-1.0.2}/src/execweave/claude_adapter.py +0 -0
- {execweave-1.0.1 → execweave-1.0.2}/src/execweave/claude_child_transcript.py +0 -0
- {execweave-1.0.1 → execweave-1.0.2}/src/execweave/claude_delegation.py +0 -0
- {execweave-1.0.1 → execweave-1.0.2}/src/execweave/claude_full_fidelity.py +0 -0
- {execweave-1.0.1 → execweave-1.0.2}/src/execweave/claude_hook_cli.py +0 -0
- {execweave-1.0.1 → execweave-1.0.2}/src/execweave/claude_hook_contract.py +0 -0
- {execweave-1.0.1 → execweave-1.0.2}/src/execweave/claude_model_observer.py +0 -0
- {execweave-1.0.1 → execweave-1.0.2}/src/execweave/claude_record.py +0 -0
- {execweave-1.0.1 → execweave-1.0.2}/src/execweave/codex_adapter.py +0 -0
- {execweave-1.0.1 → execweave-1.0.2}/src/execweave/codex_conversation.py +0 -0
- {execweave-1.0.1 → execweave-1.0.2}/src/execweave/codex_full_fidelity.py +0 -0
- {execweave-1.0.1 → execweave-1.0.2}/src/execweave/codex_hook_cli.py +0 -0
- {execweave-1.0.1 → execweave-1.0.2}/src/execweave/codex_hook_entry.py +0 -0
- {execweave-1.0.1 → execweave-1.0.2}/src/execweave/codex_hook_lifecycle.py +0 -0
- {execweave-1.0.1 → execweave-1.0.2}/src/execweave/codex_message_diagnostics.py +0 -0
- {execweave-1.0.1 → execweave-1.0.2}/src/execweave/codex_message_transport_diagnostics.py +0 -0
- {execweave-1.0.1 → execweave-1.0.2}/src/execweave/codex_record.py +0 -0
- {execweave-1.0.1 → execweave-1.0.2}/src/execweave/codex_rollout_structures.py +0 -0
- {execweave-1.0.1 → execweave-1.0.2}/src/execweave/codex_rollout_trace.py +0 -0
- {execweave-1.0.1 → execweave-1.0.2}/src/execweave/codex_rollout_trace_base.py +0 -0
- {execweave-1.0.1 → execweave-1.0.2}/src/execweave/collector.py +0 -0
- {execweave-1.0.1 → execweave-1.0.2}/src/execweave/command.py +0 -0
- {execweave-1.0.1 → execweave-1.0.2}/src/execweave/command_privacy.py +0 -0
- {execweave-1.0.1 → execweave-1.0.2}/src/execweave/content_evidence.py +0 -0
- {execweave-1.0.1 → execweave-1.0.2}/src/execweave/content_integrity.py +0 -0
- {execweave-1.0.1 → execweave-1.0.2}/src/execweave/content_store.py +0 -0
- {execweave-1.0.1 → execweave-1.0.2}/src/execweave/controlled_checks.py +0 -0
- {execweave-1.0.1 → execweave-1.0.2}/src/execweave/conversation_archive.py +0 -0
- {execweave-1.0.1 → execweave-1.0.2}/src/execweave/conversation_message_identity.py +0 -0
- {execweave-1.0.1 → execweave-1.0.2}/src/execweave/conversation_preview.py +0 -0
- {execweave-1.0.1 → execweave-1.0.2}/src/execweave/conversation_preview_antigravity.py +0 -0
- {execweave-1.0.1 → execweave-1.0.2}/src/execweave/conversation_preview_claude.py +0 -0
- {execweave-1.0.1 → execweave-1.0.2}/src/execweave/conversation_preview_codex.py +0 -0
- {execweave-1.0.1 → execweave-1.0.2}/src/execweave/conversation_preview_common.py +0 -0
- {execweave-1.0.1 → execweave-1.0.2}/src/execweave/conversation_preview_generic.py +0 -0
- {execweave-1.0.1 → execweave-1.0.2}/src/execweave/conversation_preview_lines.py +0 -0
- {execweave-1.0.1 → execweave-1.0.2}/src/execweave/conversation_preview_transcript.py +0 -0
- {execweave-1.0.1 → execweave-1.0.2}/src/execweave/conversation_records.py +0 -0
- {execweave-1.0.1 → execweave-1.0.2}/src/execweave/conversation_records_antigravity.py +0 -0
- {execweave-1.0.1 → execweave-1.0.2}/src/execweave/conversation_records_codex.py +0 -0
- {execweave-1.0.1 → execweave-1.0.2}/src/execweave/conversation_records_common.py +0 -0
- {execweave-1.0.1 → execweave-1.0.2}/src/execweave/conversation_records_ollama.py +0 -0
- {execweave-1.0.1 → execweave-1.0.2}/src/execweave/correlation.py +0 -0
- {execweave-1.0.1 → execweave-1.0.2}/src/execweave/cursor_adapter.py +0 -0
- {execweave-1.0.1 → execweave-1.0.2}/src/execweave/cursor_delegation.py +0 -0
- {execweave-1.0.1 → execweave-1.0.2}/src/execweave/cursor_delegation_base.py +0 -0
- {execweave-1.0.1 → execweave-1.0.2}/src/execweave/cursor_full_fidelity.py +0 -0
- {execweave-1.0.1 → execweave-1.0.2}/src/execweave/cursor_hook_cli.py +0 -0
- {execweave-1.0.1 → execweave-1.0.2}/src/execweave/cursor_hook_contract.py +0 -0
- {execweave-1.0.1 → execweave-1.0.2}/src/execweave/cursor_lifecycle.py +0 -0
- {execweave-1.0.1 → execweave-1.0.2}/src/execweave/cursor_record.py +0 -0
- {execweave-1.0.1 → execweave-1.0.2}/src/execweave/dashboard_shell.py +0 -0
- {execweave-1.0.1 → execweave-1.0.2}/src/execweave/delivery_status.py +0 -0
- {execweave-1.0.1 → execweave-1.0.2}/src/execweave/entry.py +0 -0
- {execweave-1.0.1 → execweave-1.0.2}/src/execweave/evidence_availability.py +0 -0
- {execweave-1.0.1 → execweave-1.0.2}/src/execweave/evidence_grade.py +0 -0
- {execweave-1.0.1 → execweave-1.0.2}/src/execweave/fidelity.py +0 -0
- {execweave-1.0.1 → execweave-1.0.2}/src/execweave/filesystem.py +0 -0
- {execweave-1.0.1 → execweave-1.0.2}/src/execweave/finalization.py +0 -0
- {execweave-1.0.1 → execweave-1.0.2}/src/execweave/focus.py +0 -0
- {execweave-1.0.1 → execweave-1.0.2}/src/execweave/framework_adapters/__init__.py +0 -0
- {execweave-1.0.1 → execweave-1.0.2}/src/execweave/framework_adapters/autogen.py +0 -0
- {execweave-1.0.1 → execweave-1.0.2}/src/execweave/framework_adapters/base.py +0 -0
- {execweave-1.0.1 → execweave-1.0.2}/src/execweave/framework_adapters/camel.py +0 -0
- {execweave-1.0.1 → execweave-1.0.2}/src/execweave/framework_adapters/camel_channel.py +0 -0
- {execweave-1.0.1 → execweave-1.0.2}/src/execweave/framework_adapters/metagpt.py +0 -0
- {execweave-1.0.1 → execweave-1.0.2}/src/execweave/framework_adapters/metagpt_ollama_compat.py +0 -0
- {execweave-1.0.1 → execweave-1.0.2}/src/execweave/framework_adapters/metagpt_recording.py +0 -0
- {execweave-1.0.1 → execweave-1.0.2}/src/execweave/framework_adapters/registry.py +0 -0
- {execweave-1.0.1 → execweave-1.0.2}/src/execweave/graph.py +0 -0
- {execweave-1.0.1 → execweave-1.0.2}/src/execweave/graph_ops.py +0 -0
- {execweave-1.0.1 → execweave-1.0.2}/src/execweave/hook_command.py +0 -0
- {execweave-1.0.1 → execweave-1.0.2}/src/execweave/hook_delivery.py +0 -0
- {execweave-1.0.1 → execweave-1.0.2}/src/execweave/hook_input.py +0 -0
- {execweave-1.0.1 → execweave-1.0.2}/src/execweave/http_proxy.py +0 -0
- {execweave-1.0.1 → execweave-1.0.2}/src/execweave/http_proxy_cli.py +0 -0
- {execweave-1.0.1 → execweave-1.0.2}/src/execweave/inference_gateway.py +0 -0
- {execweave-1.0.1 → execweave-1.0.2}/src/execweave/inference_gateway_cli.py +0 -0
- {execweave-1.0.1 → execweave-1.0.2}/src/execweave/inference_gateway_full_fidelity.py +0 -0
- {execweave-1.0.1 → execweave-1.0.2}/src/execweave/inference_identity.py +0 -0
- {execweave-1.0.1 → execweave-1.0.2}/src/execweave/inference_identity_cli.py +0 -0
- {execweave-1.0.1 → execweave-1.0.2}/src/execweave/integrity.py +0 -0
- {execweave-1.0.1 → execweave-1.0.2}/src/execweave/integrity_cli.py +0 -0
- {execweave-1.0.1 → execweave-1.0.2}/src/execweave/investigation_index.py +0 -0
- {execweave-1.0.1 → execweave-1.0.2}/src/execweave/litellm_callback.py +0 -0
- {execweave-1.0.1 → execweave-1.0.2}/src/execweave/litellm_callback_cli.py +0 -0
- {execweave-1.0.1 → execweave-1.0.2}/src/execweave/live.py +0 -0
- {execweave-1.0.1 → execweave-1.0.2}/src/execweave/live_core.py +0 -0
- {execweave-1.0.1 → execweave-1.0.2}/src/execweave/live_view.py +0 -0
- {execweave-1.0.1 → execweave-1.0.2}/src/execweave/live_view_extra_style.py +0 -0
- {execweave-1.0.1 → execweave-1.0.2}/src/execweave/live_view_markup.py +0 -0
- {execweave-1.0.1 → execweave-1.0.2}/src/execweave/live_view_process_layout.py +0 -0
- {execweave-1.0.1 → execweave-1.0.2}/src/execweave/live_view_readability.py +0 -0
- {execweave-1.0.1 → execweave-1.0.2}/src/execweave/live_view_script_a.py +0 -0
- {execweave-1.0.1 → execweave-1.0.2}/src/execweave/live_view_script_b.py +0 -0
- {execweave-1.0.1 → execweave-1.0.2}/src/execweave/live_view_script_c.py +0 -0
- {execweave-1.0.1 → execweave-1.0.2}/src/execweave/live_view_script_d.py +0 -0
- {execweave-1.0.1 → execweave-1.0.2}/src/execweave/live_view_style.py +0 -0
- {execweave-1.0.1 → execweave-1.0.2}/src/execweave/model_runtime.py +0 -0
- {execweave-1.0.1 → execweave-1.0.2}/src/execweave/model_runtime_cli.py +0 -0
- {execweave-1.0.1 → execweave-1.0.2}/src/execweave/model_runtime_full_fidelity.py +0 -0
- {execweave-1.0.1 → execweave-1.0.2}/src/execweave/observation.py +0 -0
- {execweave-1.0.1 → execweave-1.0.2}/src/execweave/observation_demo.py +0 -0
- {execweave-1.0.1 → execweave-1.0.2}/src/execweave/openai_agents.py +0 -0
- {execweave-1.0.1 → execweave-1.0.2}/src/execweave/openai_agents_sdk.py +0 -0
- {execweave-1.0.1 → execweave-1.0.2}/src/execweave/openai_compatible.py +0 -0
- {execweave-1.0.1 → execweave-1.0.2}/src/execweave/openai_compatible_cli.py +0 -0
- {execweave-1.0.1 → execweave-1.0.2}/src/execweave/openai_compatible_full_fidelity.py +0 -0
- {execweave-1.0.1 → execweave-1.0.2}/src/execweave/opencode_adapter.py +0 -0
- {execweave-1.0.1 → execweave-1.0.2}/src/execweave/opencode_event_contract.py +0 -0
- {execweave-1.0.1 → execweave-1.0.2}/src/execweave/opencode_full_fidelity.py +0 -0
- {execweave-1.0.1 → execweave-1.0.2}/src/execweave/opencode_hook_cli.py +0 -0
- {execweave-1.0.1 → execweave-1.0.2}/src/execweave/opencode_plugin_cli.py +0 -0
- {execweave-1.0.1 → execweave-1.0.2}/src/execweave/opencode_record.py +0 -0
- {execweave-1.0.1 → execweave-1.0.2}/src/execweave/opencode_task_linkage.py +0 -0
- {execweave-1.0.1 → execweave-1.0.2}/src/execweave/overhead_benchmark.py +0 -0
- {execweave-1.0.1 → execweave-1.0.2}/src/execweave/privacy.py +0 -0
- {execweave-1.0.1 → execweave-1.0.2}/src/execweave/private_io.py +0 -0
- {execweave-1.0.1 → execweave-1.0.2}/src/execweave/provider_capability.py +0 -0
- {execweave-1.0.1 → execweave-1.0.2}/src/execweave/provider_lifecycle.py +0 -0
- {execweave-1.0.1 → execweave-1.0.2}/src/execweave/provider_record.py +0 -0
- {execweave-1.0.1 → execweave-1.0.2}/src/execweave/reader_identity.py +0 -0
- {execweave-1.0.1 → execweave-1.0.2}/src/execweave/redacted_archive.py +0 -0
- {execweave-1.0.1 → execweave-1.0.2}/src/execweave/risk.py +0 -0
- {execweave-1.0.1 → execweave-1.0.2}/src/execweave/rule_pack.py +0 -0
- {execweave-1.0.1 → execweave-1.0.2}/src/execweave/rule_pack_cli.py +0 -0
- {execweave-1.0.1 → execweave-1.0.2}/src/execweave/run_assessment.py +0 -0
- {execweave-1.0.1 → execweave-1.0.2}/src/execweave/runtime_endpoint_availability.py +0 -0
- {execweave-1.0.1 → execweave-1.0.2}/src/execweave/scalability_benchmark.py +0 -0
- {execweave-1.0.1 → execweave-1.0.2}/src/execweave/schema.py +0 -0
- {execweave-1.0.1 → execweave-1.0.2}/src/execweave/scope.py +0 -0
- {execweave-1.0.1 → execweave-1.0.2}/src/execweave/semantic.py +0 -0
- {execweave-1.0.1 → execweave-1.0.2}/src/execweave/session_summary.py +0 -0
- {execweave-1.0.1 → execweave-1.0.2}/src/execweave/sink.py +0 -0
- {execweave-1.0.1 → execweave-1.0.2}/src/execweave/strace_backend.py +0 -0
- {execweave-1.0.1 → execweave-1.0.2}/src/execweave/stream_assembly.py +0 -0
- {execweave-1.0.1 → execweave-1.0.2}/src/execweave/task_artifacts.py +0 -0
- {execweave-1.0.1 → execweave-1.0.2}/src/execweave/task_validation.py +0 -0
- {execweave-1.0.1 → execweave-1.0.2}/src/execweave/theme.py +0 -0
- {execweave-1.0.1 → execweave-1.0.2}/src/execweave/top.py +0 -0
- {execweave-1.0.1 → execweave-1.0.2}/src/execweave/top_cli.py +0 -0
- {execweave-1.0.1 → execweave-1.0.2}/src/execweave/validate.py +0 -0
- {execweave-1.0.1 → execweave-1.0.2}/src/execweave/vendor/dagre.min.js +0 -0
- {execweave-1.0.1 → execweave-1.0.2}/src/execweave/view_cli.py +0 -0
- {execweave-1.0.1 → execweave-1.0.2}/src/execweave/viewer.py +0 -0
- {execweave-1.0.1 → execweave-1.0.2}/src/execweave/viewer_agent_panel.py +0 -0
- {execweave-1.0.1 → execweave-1.0.2}/src/execweave/viewer_agent_panel_antigravity.py +0 -0
- {execweave-1.0.1 → execweave-1.0.2}/src/execweave/viewer_agent_panel_claude.py +0 -0
- {execweave-1.0.1 → execweave-1.0.2}/src/execweave/viewer_agent_panel_codex.py +0 -0
- {execweave-1.0.1 → execweave-1.0.2}/src/execweave/viewer_agent_panel_cursor.py +0 -0
- {execweave-1.0.1 → execweave-1.0.2}/src/execweave/viewer_agent_panel_default.py +0 -0
- {execweave-1.0.1 → execweave-1.0.2}/src/execweave/viewer_agent_panel_ollama.py +0 -0
- {execweave-1.0.1 → execweave-1.0.2}/src/execweave/viewer_agent_panel_opencode.py +0 -0
- {execweave-1.0.1 → execweave-1.0.2}/src/execweave/viewer_agent_panel_registry.py +0 -0
- {execweave-1.0.1 → execweave-1.0.2}/src/execweave/viewer_archive_verifier.py +0 -0
- {execweave-1.0.1 → execweave-1.0.2}/src/execweave/viewer_background_files.py +0 -0
- {execweave-1.0.1 → execweave-1.0.2}/src/execweave/viewer_content_browser.py +0 -0
- {execweave-1.0.1 → execweave-1.0.2}/src/execweave/viewer_content_health.py +0 -0
- {execweave-1.0.1 → execweave-1.0.2}/src/execweave/viewer_content_inspector.py +0 -0
- {execweave-1.0.1 → execweave-1.0.2}/src/execweave/viewer_controlled_checks.py +0 -0
- {execweave-1.0.1 → execweave-1.0.2}/src/execweave/viewer_conversation_sync.py +0 -0
- {execweave-1.0.1 → execweave-1.0.2}/src/execweave/viewer_dashboard_clean.py +0 -0
- {execweave-1.0.1 → execweave-1.0.2}/src/execweave/viewer_dashboard_focus.py +0 -0
- {execweave-1.0.1 → execweave-1.0.2}/src/execweave/viewer_dashboard_hardening.py +0 -0
- {execweave-1.0.1 → execweave-1.0.2}/src/execweave/viewer_dashboard_hardening_v2.py +0 -0
- {execweave-1.0.1 → execweave-1.0.2}/src/execweave/viewer_dashboard_projection.py +0 -0
- {execweave-1.0.1 → execweave-1.0.2}/src/execweave/viewer_delivery_status.py +0 -0
- {execweave-1.0.1 → execweave-1.0.2}/src/execweave/viewer_edge_decross.py +0 -0
- {execweave-1.0.1 → execweave-1.0.2}/src/execweave/viewer_execution_flow.py +0 -0
- {execweave-1.0.1 → execweave-1.0.2}/src/execweave/viewer_execution_flow_provider_normalization.py +0 -0
- {execweave-1.0.1 → execweave-1.0.2}/src/execweave/viewer_execution_flow_safety.py +0 -0
- {execweave-1.0.1 → execweave-1.0.2}/src/execweave/viewer_external_endpoints.py +0 -0
- {execweave-1.0.1 → execweave-1.0.2}/src/execweave/viewer_flow_canvas.py +0 -0
- {execweave-1.0.1 → execweave-1.0.2}/src/execweave/viewer_flow_layout.py +0 -0
- {execweave-1.0.1 → execweave-1.0.2}/src/execweave/viewer_fold_state.py +0 -0
- {execweave-1.0.1 → execweave-1.0.2}/src/execweave/viewer_framework_flow.py +0 -0
- {execweave-1.0.1 → execweave-1.0.2}/src/execweave/viewer_framework_model_output.py +0 -0
- {execweave-1.0.1 → execweave-1.0.2}/src/execweave/viewer_gif.py +0 -0
- {execweave-1.0.1 → execweave-1.0.2}/src/execweave/viewer_history_browser.py +0 -0
- {execweave-1.0.1 → execweave-1.0.2}/src/execweave/viewer_investigation.py +0 -0
- {execweave-1.0.1 → execweave-1.0.2}/src/execweave/viewer_layout_geometry.py +0 -0
- {execweave-1.0.1 → execweave-1.0.2}/src/execweave/viewer_layout_v2.py +0 -0
- {execweave-1.0.1 → execweave-1.0.2}/src/execweave/viewer_layout_v2_detached.py +0 -0
- {execweave-1.0.1 → execweave-1.0.2}/src/execweave/viewer_limits.py +0 -0
- {execweave-1.0.1 → execweave-1.0.2}/src/execweave/viewer_live_layout.py +0 -0
- {execweave-1.0.1 → execweave-1.0.2}/src/execweave/viewer_message_handoffs.py +0 -0
- {execweave-1.0.1 → execweave-1.0.2}/src/execweave/viewer_projection.py +0 -0
- {execweave-1.0.1 → execweave-1.0.2}/src/execweave/viewer_projection_base.py +0 -0
- {execweave-1.0.1 → execweave-1.0.2}/src/execweave/viewer_projection_bridges.py +0 -0
- {execweave-1.0.1 → execweave-1.0.2}/src/execweave/viewer_recorded_sources.py +0 -0
- {execweave-1.0.1 → execweave-1.0.2}/src/execweave/viewer_run_assessment.py +0 -0
- {execweave-1.0.1 → execweave-1.0.2}/src/execweave/viewer_run_guide.py +0 -0
- {execweave-1.0.1 → execweave-1.0.2}/src/execweave/viewer_runtime_evidence.py +0 -0
- {execweave-1.0.1 → execweave-1.0.2}/src/execweave/viewer_semantic_projection.py +0 -0
- {execweave-1.0.1 → execweave-1.0.2}/src/execweave/viewer_session_flow.py +0 -0
- {execweave-1.0.1 → execweave-1.0.2}/src/execweave/viewer_structure_share.py +0 -0
- {execweave-1.0.1 → execweave-1.0.2}/src/execweave/viewer_task_validation.py +0 -0
- {execweave-1.0.1 → execweave-1.0.2}/src/execweave/viewer_tool_mirror_identity.py +0 -0
- {execweave-1.0.1 → execweave-1.0.2}/src/execweave/viewer_workflow_mode.py +0 -0
- {execweave-1.0.1 → execweave-1.0.2}/src/execweave/workflow.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.5
|
|
2
2
|
Name: execweave
|
|
3
|
-
Version: 1.0.
|
|
3
|
+
Version: 1.0.2
|
|
4
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
|
|
@@ -55,6 +55,8 @@ Provides-Extra: e2e
|
|
|
55
55
|
Requires-Dist: pillow>=10.0; extra == 'e2e'
|
|
56
56
|
Requires-Dist: playwright>=1.44; extra == 'e2e'
|
|
57
57
|
Requires-Dist: pywinpty<4,>=3.0.5; (platform_system == 'Windows') and extra == 'e2e'
|
|
58
|
+
Provides-Extra: lane
|
|
59
|
+
Requires-Dist: cryptography>=44; extra == 'lane'
|
|
58
60
|
Provides-Extra: release
|
|
59
61
|
Requires-Dist: build>=1.2; extra == 'release'
|
|
60
62
|
Requires-Dist: tomli>=2.0; (python_version < '3.11') and extra == 'release'
|
|
@@ -359,6 +361,25 @@ execweave-integrity seal .execweave/runs/<run-id>
|
|
|
359
361
|
execweave-integrity verify .execweave/runs/<run-id>
|
|
360
362
|
```
|
|
361
363
|
|
|
364
|
+
### Per-call lanes (Linux, root)
|
|
365
|
+
|
|
366
|
+
The `lane` backend binds each routed shell call to the processes it starts. A root launcher starts every call in its own cgroup v2 lane and records the call id, lane, and launched process in a hash-chained, Ed25519-signed ledger. A root eBPF sensor (bpftrace) stamps each recorded event with the cgroup id of the acting task, and the auditor attributes events to calls by matching that id against the ledger, so attribution does not depend on command text, timing, or process-tree reconstruction.
|
|
367
|
+
|
|
368
|
+
Requirements: Linux with cgroup v2 and Landlock ABI 6 or later (Linux 6.12+ for signal scoping; sender pidfds need Linux 6.5+), root, `bpftrace`, and `pip install "execweave[lane]"`.
|
|
369
|
+
|
|
370
|
+
```bash
|
|
371
|
+
sudo execweave lane doctor
|
|
372
|
+
sudo execweave run --backend lane --agent-user "$USER" -- your-agent-command
|
|
373
|
+
execweave lane verify .execweave/runs/<run-id>/lane/ledger.jsonl
|
|
374
|
+
execweave lane audit .execweave/runs/<run-id>/lane --output-dir audit-out
|
|
375
|
+
```
|
|
376
|
+
|
|
377
|
+
The command runs as `--agent-user` in the agent lane. A call gets its own lane only when it is routed through the launcher: a harness hook or shell shim runs the launch client (`execweave-lane-exec`, the `EW_LANE_EXEC` path exported to the command) with the call id. `execweave-lane-claude-hook` is a Claude Code `PreToolUse` hook that does this for Bash tool calls; `execweave/lane/hooks/` also contains Cursor and Antigravity hooks and a bash shim for Codex. By default the launcher requires sender pidfds and runs each call in its own Landlock domain with signal scoping (`--call-isolation`, `--no-require-pidfd`).
|
|
378
|
+
|
|
379
|
+
Outputs in the run directory: `lane/ledger.jsonl` and `lane/ledger_pub.pem` (the signed ledger), `lane/sensor.log`, `events.jsonl` (ExecWeave event stream), `lane_attribution.json` (call id to lane and root process), and `meta.json`.
|
|
380
|
+
|
|
381
|
+
Limits: the call id is only as trustworthy as the harness and hook that supply it; a hook that is bypassed, or a process outside every lane, is not attributed to a call; the sensor can lose events under load, and lost events cannot be recovered; work that an existing daemon performs for a later call stays in the lane of the call that started the daemon unless delegation grants are used.
|
|
382
|
+
|
|
362
383
|
## Run artifacts
|
|
363
384
|
|
|
364
385
|
A provider-integrated run can contain:
|
|
@@ -294,6 +294,25 @@ execweave-integrity seal .execweave/runs/<run-id>
|
|
|
294
294
|
execweave-integrity verify .execweave/runs/<run-id>
|
|
295
295
|
```
|
|
296
296
|
|
|
297
|
+
### Per-call lanes (Linux, root)
|
|
298
|
+
|
|
299
|
+
The `lane` backend binds each routed shell call to the processes it starts. A root launcher starts every call in its own cgroup v2 lane and records the call id, lane, and launched process in a hash-chained, Ed25519-signed ledger. A root eBPF sensor (bpftrace) stamps each recorded event with the cgroup id of the acting task, and the auditor attributes events to calls by matching that id against the ledger, so attribution does not depend on command text, timing, or process-tree reconstruction.
|
|
300
|
+
|
|
301
|
+
Requirements: Linux with cgroup v2 and Landlock ABI 6 or later (Linux 6.12+ for signal scoping; sender pidfds need Linux 6.5+), root, `bpftrace`, and `pip install "execweave[lane]"`.
|
|
302
|
+
|
|
303
|
+
```bash
|
|
304
|
+
sudo execweave lane doctor
|
|
305
|
+
sudo execweave run --backend lane --agent-user "$USER" -- your-agent-command
|
|
306
|
+
execweave lane verify .execweave/runs/<run-id>/lane/ledger.jsonl
|
|
307
|
+
execweave lane audit .execweave/runs/<run-id>/lane --output-dir audit-out
|
|
308
|
+
```
|
|
309
|
+
|
|
310
|
+
The command runs as `--agent-user` in the agent lane. A call gets its own lane only when it is routed through the launcher: a harness hook or shell shim runs the launch client (`execweave-lane-exec`, the `EW_LANE_EXEC` path exported to the command) with the call id. `execweave-lane-claude-hook` is a Claude Code `PreToolUse` hook that does this for Bash tool calls; `execweave/lane/hooks/` also contains Cursor and Antigravity hooks and a bash shim for Codex. By default the launcher requires sender pidfds and runs each call in its own Landlock domain with signal scoping (`--call-isolation`, `--no-require-pidfd`).
|
|
311
|
+
|
|
312
|
+
Outputs in the run directory: `lane/ledger.jsonl` and `lane/ledger_pub.pem` (the signed ledger), `lane/sensor.log`, `events.jsonl` (ExecWeave event stream), `lane_attribution.json` (call id to lane and root process), and `meta.json`.
|
|
313
|
+
|
|
314
|
+
Limits: the call id is only as trustworthy as the harness and hook that supply it; a hook that is bypassed, or a process outside every lane, is not attributed to a call; the sensor can lose events under load, and lost events cannot be recovered; work that an existing daemon performs for a later call stays in the lane of the call that started the daemon unless delegation grants are used.
|
|
315
|
+
|
|
297
316
|
## Run artifacts
|
|
298
317
|
|
|
299
318
|
A provider-integrated run can contain:
|
|
@@ -4,8 +4,8 @@ build-backend = "hatchling.build"
|
|
|
4
4
|
|
|
5
5
|
[project]
|
|
6
6
|
name = "execweave"
|
|
7
|
-
# ExecWeave v1.0.
|
|
8
|
-
version = "1.0.
|
|
7
|
+
# ExecWeave v1.0.2 release metadata
|
|
8
|
+
version = "1.0.2"
|
|
9
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"
|
|
@@ -44,6 +44,7 @@ dependencies = [
|
|
|
44
44
|
[project.optional-dependencies]
|
|
45
45
|
agents = ["openai-agents>=0.24,<0.25"]
|
|
46
46
|
validation = ["cryptography>=44"]
|
|
47
|
+
lane = ["cryptography>=44"]
|
|
47
48
|
dev = [
|
|
48
49
|
"cryptography>=44",
|
|
49
50
|
"pytest>=8.0",
|
|
@@ -100,6 +101,8 @@ execweave-inference-link = "execweave.inference_identity_cli:main"
|
|
|
100
101
|
execweave-litellm-callback = "execweave.litellm_callback_cli:main"
|
|
101
102
|
execweave-rule-pack = "execweave.rule_pack_cli:main"
|
|
102
103
|
execweave-integrity = "execweave.integrity_cli:main"
|
|
104
|
+
execweave-lane-exec = "execweave.lane.exec_client:main"
|
|
105
|
+
execweave-lane-claude-hook = "execweave.lane.hooks.claude_code:main"
|
|
103
106
|
execweave-overhead = "execweave.overhead_benchmark:main"
|
|
104
107
|
execweave-scalability = "execweave.scalability_benchmark:main"
|
|
105
108
|
|
|
@@ -93,10 +93,21 @@ def create_collector(
|
|
|
93
93
|
return collector
|
|
94
94
|
|
|
95
95
|
|
|
96
|
+
def _lane_available() -> bool:
|
|
97
|
+
try:
|
|
98
|
+
from .lane import runner as lane_runner
|
|
99
|
+
|
|
100
|
+
lane_runner.check_available()
|
|
101
|
+
except Exception:
|
|
102
|
+
return False
|
|
103
|
+
return True
|
|
104
|
+
|
|
105
|
+
|
|
96
106
|
def backend_diagnostics() -> dict[str, object]:
|
|
97
107
|
return {
|
|
98
108
|
"platform": sys.platform,
|
|
99
109
|
"portable": True,
|
|
100
110
|
"strace": strace_available(),
|
|
111
|
+
"lane": _lane_available(),
|
|
101
112
|
"auto_selected": resolve_backend("auto"),
|
|
102
113
|
}
|
|
@@ -46,9 +46,25 @@ def _add_collection_arguments(parser: argparse.ArgumentParser) -> None:
|
|
|
46
46
|
)
|
|
47
47
|
parser.add_argument(
|
|
48
48
|
"--backend",
|
|
49
|
-
choices=["auto", "portable", "strace"],
|
|
49
|
+
choices=["auto", "portable", "strace", "lane"],
|
|
50
50
|
default="auto",
|
|
51
|
-
help="Runtime backend. auto prefers strace on Linux when available"
|
|
51
|
+
help="Runtime backend. auto prefers strace on Linux when available; lane runs each "
|
|
52
|
+
"routed shell call in its own cgroup lane (Linux, root, bpftrace)",
|
|
53
|
+
)
|
|
54
|
+
parser.add_argument(
|
|
55
|
+
"--agent-user",
|
|
56
|
+
default=None,
|
|
57
|
+
help="lane backend: user that runs the command (required with --backend lane)",
|
|
58
|
+
)
|
|
59
|
+
parser.add_argument(
|
|
60
|
+
"--call-isolation",
|
|
61
|
+
default="landlock",
|
|
62
|
+
help="lane backend: per-call isolation modes, comma-separated from pidns, uid, landlock, or off (default: landlock)",
|
|
63
|
+
)
|
|
64
|
+
parser.add_argument(
|
|
65
|
+
"--no-require-pidfd",
|
|
66
|
+
action="store_true",
|
|
67
|
+
help="lane backend: accept launch requests without a sender pidfd",
|
|
52
68
|
)
|
|
53
69
|
parser.add_argument("--no-files", action="store_true", help="Disable filesystem observation")
|
|
54
70
|
parser.add_argument("--no-network", action="store_true", help="Disable network observation")
|
|
@@ -175,6 +191,16 @@ def build_parser() -> argparse.ArgumentParser:
|
|
|
175
191
|
|
|
176
192
|
subparsers.add_parser("doctor", help="Show runtime collector availability")
|
|
177
193
|
|
|
194
|
+
lane = subparsers.add_parser("lane", help="Per-call execution lanes: diagnostics, ledger verification, and audit")
|
|
195
|
+
lane_sub = lane.add_subparsers(dest="lane_command", required=True)
|
|
196
|
+
lane_sub.add_parser("doctor", help="Show whether this host can run the lane backend")
|
|
197
|
+
lane_verify = lane_sub.add_parser("verify", help="Verify a lane ledger's hash chain and signatures")
|
|
198
|
+
lane_verify.add_argument("ledger", type=Path)
|
|
199
|
+
lane_verify.add_argument("--pubkey", type=Path, default=None, help="Pinned public key (default: ledger_pub.pem beside the ledger)")
|
|
200
|
+
lane_audit = lane_sub.add_parser("audit", help="Rebuild events and lane attribution from a sensor log and ledger")
|
|
201
|
+
lane_audit.add_argument("lane_dir", type=Path, help="Directory with sensor.log, ledger.jsonl and ledger_pub.pem")
|
|
202
|
+
lane_audit.add_argument("--output-dir", type=Path, required=True)
|
|
203
|
+
|
|
178
204
|
benchmark = subparsers.add_parser(
|
|
179
205
|
"benchmark", help="Run the Phase 1 overhead smoke benchmark"
|
|
180
206
|
)
|
|
@@ -337,6 +363,68 @@ def _clean_command(command: list[str]) -> list[str]:
|
|
|
337
363
|
return result
|
|
338
364
|
|
|
339
365
|
|
|
366
|
+
def _run_lane(args: argparse.Namespace, parser: argparse.ArgumentParser, command: list[str]) -> int:
|
|
367
|
+
from .lane import runner as lane_runner
|
|
368
|
+
|
|
369
|
+
if not args.agent_user:
|
|
370
|
+
parser.error("--backend lane requires --agent-user")
|
|
371
|
+
watch_root = (args.watch_root or Path.cwd()).expanduser().resolve()
|
|
372
|
+
isolation = "" if args.call_isolation in ("", "off", "none") else args.call_isolation
|
|
373
|
+
try:
|
|
374
|
+
result = lane_runner.run_session(
|
|
375
|
+
command,
|
|
376
|
+
agent_user=args.agent_user,
|
|
377
|
+
watch_root=watch_root,
|
|
378
|
+
output_root=args.output.parent if args.output else None,
|
|
379
|
+
call_isolation=isolation,
|
|
380
|
+
require_pidfd=not args.no_require_pidfd,
|
|
381
|
+
)
|
|
382
|
+
except (lane_runner.LaneUnavailable, KeyError, RuntimeError, OSError) as exc:
|
|
383
|
+
parser.error(str(exc))
|
|
384
|
+
print(f"ExecWeave session: {result.session_id}")
|
|
385
|
+
print("Backend: lane")
|
|
386
|
+
print(f"Working directory: {watch_root}")
|
|
387
|
+
print(f"Events: {result.events}")
|
|
388
|
+
print(f"Lane attribution: {result.attribution}")
|
|
389
|
+
return result.return_code
|
|
390
|
+
|
|
391
|
+
|
|
392
|
+
def _lane_main(args: argparse.Namespace, parser: argparse.ArgumentParser) -> int:
|
|
393
|
+
from .lane import runner as lane_runner
|
|
394
|
+
from .lane import service as lane_service
|
|
395
|
+
|
|
396
|
+
if args.lane_command == "doctor":
|
|
397
|
+
print(json.dumps(lane_runner.diagnostics(), indent=2, sort_keys=True))
|
|
398
|
+
return 0
|
|
399
|
+
if args.lane_command == "verify":
|
|
400
|
+
pubkey = args.pubkey or args.ledger.with_name("ledger_pub.pem")
|
|
401
|
+
result = lane_service.verify_ledger(args.ledger, pubkey)
|
|
402
|
+
print(json.dumps(result, indent=2, sort_keys=True, default=str))
|
|
403
|
+
return 0 if result.get("valid") else 1
|
|
404
|
+
if args.lane_command == "audit":
|
|
405
|
+
from .lane import backend as lane_backend
|
|
406
|
+
|
|
407
|
+
out = args.output_dir
|
|
408
|
+
out.mkdir(parents=True, exist_ok=True)
|
|
409
|
+
built = lane_backend.build(
|
|
410
|
+
sensor_path=args.lane_dir / "sensor.log",
|
|
411
|
+
ledger_path=args.lane_dir / "ledger.jsonl",
|
|
412
|
+
pubkey_path=args.lane_dir / "ledger_pub.pem",
|
|
413
|
+
session_id=uuid4().hex,
|
|
414
|
+
mono_offset_ns=0,
|
|
415
|
+
started_ns_wall=0,
|
|
416
|
+
finished_ns_wall=0,
|
|
417
|
+
agent_name="agent",
|
|
418
|
+
command=[],
|
|
419
|
+
out_events=out / "events.jsonl",
|
|
420
|
+
out_attr=out / "lane_attribution.json",
|
|
421
|
+
)
|
|
422
|
+
print(json.dumps(built, indent=2, sort_keys=True, default=str))
|
|
423
|
+
return 0
|
|
424
|
+
parser.error(f"unknown lane command: {args.lane_command}")
|
|
425
|
+
return 2
|
|
426
|
+
|
|
427
|
+
|
|
340
428
|
def main(argv: list[str] | None = None) -> int:
|
|
341
429
|
parser = build_parser()
|
|
342
430
|
args = parser.parse_args(argv)
|
|
@@ -351,6 +439,9 @@ def main(argv: list[str] | None = None) -> int:
|
|
|
351
439
|
print(json.dumps(backend_diagnostics(), indent=2, sort_keys=True))
|
|
352
440
|
return 0
|
|
353
441
|
|
|
442
|
+
if args.subcommand == "lane":
|
|
443
|
+
return _lane_main(args, parser)
|
|
444
|
+
|
|
354
445
|
if args.subcommand == "benchmark":
|
|
355
446
|
try:
|
|
356
447
|
result = run_benchmark(backend=args.backend, iterations=args.iterations)
|
|
@@ -544,6 +635,9 @@ def main(argv: list[str] | None = None) -> int:
|
|
|
544
635
|
print(json.dumps({"output": str(written)}, indent=2, sort_keys=True))
|
|
545
636
|
return 0
|
|
546
637
|
|
|
638
|
+
if getattr(args, "backend", None) == "lane" and args.subcommand in ("record", "live"):
|
|
639
|
+
parser.error("the lane backend is available with `execweave run --backend lane`")
|
|
640
|
+
|
|
547
641
|
if args.subcommand == "record":
|
|
548
642
|
command = _clean_command(args.command)
|
|
549
643
|
if not command:
|
|
@@ -599,6 +693,9 @@ def main(argv: list[str] | None = None) -> int:
|
|
|
599
693
|
if not command:
|
|
600
694
|
parser.error("execweave run requires a command, e.g. execweave run -- claude")
|
|
601
695
|
|
|
696
|
+
if args.backend == "lane":
|
|
697
|
+
return _run_lane(args, parser, command)
|
|
698
|
+
|
|
602
699
|
session_id = uuid4().hex
|
|
603
700
|
watch_root = (args.watch_root or Path.cwd()).expanduser().resolve()
|
|
604
701
|
output = args.output or (watch_root / ".execweave" / "runs" / f"{session_id}.jsonl")
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
"""Per-call execution lanes (Linux, root).
|
|
2
|
+
|
|
3
|
+
A root launcher starts every routed shell call in its own cgroup v2 lane and records the
|
|
4
|
+
binding of call id to lane in a hash-chained, Ed25519-signed ledger. A root eBPF sensor
|
|
5
|
+
(bpftrace) stamps each recorded event with the cgroup id of the acting task, and the
|
|
6
|
+
auditor attributes events to calls by cgroup-id equality with the ledger.
|
|
7
|
+
|
|
8
|
+
Modules:
|
|
9
|
+
service the launcher (Unix-socket protocol, ledger, delegation grants, call isolation)
|
|
10
|
+
exec_client the launch client that a harness hook or shell shim runs for each call
|
|
11
|
+
backend the auditor: sensor log + ledger -> ExecWeave event stream and lane attribution
|
|
12
|
+
sensor_nonce per-run record nonce for the sensor log
|
|
13
|
+
sensor_guard start/end canary that checks that the sensor observes every CPU
|
|
14
|
+
runner one recorded session: cgroup mount, sensor, launcher, command, audit
|
|
15
|
+
hooks harness integrations (Claude Code, Cursor, Antigravity, Codex shell shim)
|
|
16
|
+
"""
|
|
@@ -0,0 +1,234 @@
|
|
|
1
|
+
"""Lane backend: turn the privileged sensor stream + signed launch ledger into an
|
|
2
|
+
ExecWeave-format runtime event stream plus identity-exact attribution.
|
|
3
|
+
|
|
4
|
+
Every event carries the kernel cgroup id of the acting task; the ledger maps lane
|
|
5
|
+
inodes to (agent, tool call). No timestamps are used for attribution.
|
|
6
|
+
"""
|
|
7
|
+
from __future__ import annotations
|
|
8
|
+
|
|
9
|
+
import json
|
|
10
|
+
import re
|
|
11
|
+
import os
|
|
12
|
+
from datetime import datetime, timezone
|
|
13
|
+
from pathlib import Path
|
|
14
|
+
from typing import Any
|
|
15
|
+
from uuid import uuid4
|
|
16
|
+
|
|
17
|
+
from .service import verify_ledger
|
|
18
|
+
|
|
19
|
+
SCHEMA_VERSION = "0.2"
|
|
20
|
+
US = "\x1f"
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
def iso(ns_wall: int) -> str:
|
|
24
|
+
return datetime.fromtimestamp(ns_wall / 1e9, tz=timezone.utc).isoformat(timespec="microseconds").replace("+00:00", "Z")
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
def parse_sensor(path: Path, nonce: str | None = None) -> list[dict[str, Any]]:
|
|
28
|
+
"""Parse the bpftrace stream; execve headers are followed by raw argv lines.
|
|
29
|
+
|
|
30
|
+
If the log has a record nonce (``<log>.nonce``, see sensor_nonce.py) or one is passed, a JSON line is a record only if it starts with the nonce; a JSON
|
|
31
|
+
line without it is text the traced program wrote (for example an argv element with an embedded newline) and is kept as argv text, or counted as
|
|
32
|
+
``forged_record_rejected`` if no execve header is pending."""
|
|
33
|
+
if nonce is None:
|
|
34
|
+
from .sensor_nonce import detect
|
|
35
|
+
nonce = detect(path)
|
|
36
|
+
elif nonce == "":
|
|
37
|
+
nonce = None
|
|
38
|
+
out: list[dict[str, Any]] = []
|
|
39
|
+
pending: dict[str, Any] | None = None
|
|
40
|
+
argv_lines: list[str] = []
|
|
41
|
+
|
|
42
|
+
def flush() -> None:
|
|
43
|
+
nonlocal pending, argv_lines
|
|
44
|
+
if pending is not None:
|
|
45
|
+
blob = "\n".join(argv_lines)
|
|
46
|
+
pending["argv"] = blob.split(US) if blob else []
|
|
47
|
+
out.append(pending)
|
|
48
|
+
pending, argv_lines = None, []
|
|
49
|
+
|
|
50
|
+
with open(path, "r", encoding="utf-8", errors="replace") as fh:
|
|
51
|
+
for raw in fh:
|
|
52
|
+
line = raw.rstrip("\n")
|
|
53
|
+
if nonce is not None:
|
|
54
|
+
if line.startswith(nonce + '{"ev":'):
|
|
55
|
+
line = line[len(nonce):]
|
|
56
|
+
elif line.startswith('{"ev":'):
|
|
57
|
+
if pending is not None:
|
|
58
|
+
argv_lines.append(line)
|
|
59
|
+
else:
|
|
60
|
+
out.append({"ev": "forged_record_rejected"})
|
|
61
|
+
continue
|
|
62
|
+
if line.startswith('{"ev":'):
|
|
63
|
+
flush()
|
|
64
|
+
try:
|
|
65
|
+
rec = json.loads(line)
|
|
66
|
+
except json.JSONDecodeError:
|
|
67
|
+
continue
|
|
68
|
+
if rec.get("ev") == "execve":
|
|
69
|
+
pending = rec
|
|
70
|
+
else:
|
|
71
|
+
out.append(rec)
|
|
72
|
+
elif re.match(r"^Lost \d+ events", line):
|
|
73
|
+
# bpftrace reports perf-buffer drops on stdout; keep them as explicit gap records
|
|
74
|
+
flush()
|
|
75
|
+
out.append({"ev": "sensor_lost", "count": int(line.split()[1])})
|
|
76
|
+
elif pending is not None:
|
|
77
|
+
argv_lines.append(line)
|
|
78
|
+
flush()
|
|
79
|
+
return out
|
|
80
|
+
|
|
81
|
+
|
|
82
|
+
def load_ledger(path: Path) -> list[dict[str, Any]]:
|
|
83
|
+
return [json.loads(line)["record"] for line in path.read_text(encoding="utf-8").split("\n") if line.strip()] # "\n" only: see Ledger.append
|
|
84
|
+
|
|
85
|
+
|
|
86
|
+
def build(*, sensor_path: Path, ledger_path: Path, pubkey_path: Path, session_id: str, mono_offset_ns: int,
|
|
87
|
+
started_ns_wall: int, finished_ns_wall: int, agent_name: str, command: list[str],
|
|
88
|
+
out_events: Path, out_attr: Path) -> dict[str, Any]:
|
|
89
|
+
verification = verify_ledger(ledger_path, pubkey_path)
|
|
90
|
+
ledger = load_ledger(ledger_path)
|
|
91
|
+
lanes: dict[int, dict[str, Any]] = {}
|
|
92
|
+
ledger_edges: list[dict[str, Any]] = []
|
|
93
|
+
for rec in ledger:
|
|
94
|
+
if rec["op"] == "intent" and rec.get("lane_inode") not in lanes:
|
|
95
|
+
# a lane announced before its child was spawned; replaced by the launch record when that exists (a missing launch record is reported)
|
|
96
|
+
lanes[rec["lane_inode"]] = {"lane": rec["lane"], "kind": {"launch": "call", "launch_delegated": "delegated"}.get(rec.get("for_op"), "agent"),
|
|
97
|
+
"call_id": rec.get("call_id"), "agent": rec.get("agent"), "child_pid": None, "argv": None, "declared": None,
|
|
98
|
+
"requester_pid": (rec.get("requester") or {}).get("pid"), "requester_agent": None, "seq": rec["seq"], "ts": rec["ts"],
|
|
99
|
+
"intent_only": True}
|
|
100
|
+
continue
|
|
101
|
+
if rec["op"] in ("launch_root", "launch", "spawn_agent", "launch_delegated"):
|
|
102
|
+
lanes[rec["lane_inode"]] = {"lane": rec["lane"], "kind": {"launch": "call", "launch_delegated": "delegated"}.get(rec["op"], "agent"),
|
|
103
|
+
"call_id": rec.get("call_id") or (rec.get("on_behalf_of") or {}).get("call_id"),
|
|
104
|
+
"delegated_by": (rec.get("requester") or {}).get("lane") if rec["op"] == "launch_delegated" else None, "agent": rec.get("agent") or (rec.get("requester") or {}).get("agent"),
|
|
105
|
+
"child_pid": rec["child_pid"], "argv": rec.get("argv"), "declared": rec.get("declared"),
|
|
106
|
+
"requester_pid": (rec.get("requester") or {}).get("pid"), "requester_agent": (rec.get("requester") or {}).get("agent"),
|
|
107
|
+
"seq": rec["seq"], "ts": rec["ts"]}
|
|
108
|
+
if rec["op"] != "launch_root":
|
|
109
|
+
ledger_edges.append(rec)
|
|
110
|
+
|
|
111
|
+
def lane_for(cg: int) -> dict[str, Any] | None:
|
|
112
|
+
return lanes.get(int(cg))
|
|
113
|
+
|
|
114
|
+
def pent(pid: int, cg: int | None = None, name: str | None = None) -> dict[str, Any]:
|
|
115
|
+
attrs: dict[str, Any] = {"pid": pid, "backend": "lane_sensor", "identity_scope": "session"}
|
|
116
|
+
if cg is not None:
|
|
117
|
+
attrs["cgroup_id"] = int(cg)
|
|
118
|
+
info = lane_for(cg)
|
|
119
|
+
if info:
|
|
120
|
+
attrs["lane"] = info["lane"]
|
|
121
|
+
if info.get("call_id"):
|
|
122
|
+
attrs["lane_call_id"] = info["call_id"]
|
|
123
|
+
if info.get("agent"):
|
|
124
|
+
attrs["lane_agent"] = info["agent"]
|
|
125
|
+
return {"type": "process", "id": f"process:{session_id}:{pid}", "name": f"{name or pid} · {pid}" if name else str(pid), "attributes": attrs}
|
|
126
|
+
|
|
127
|
+
events: list[dict[str, Any]] = []
|
|
128
|
+
|
|
129
|
+
def emit(ts_ns_mono: int, event_type: str, relation: str, source: dict, target: dict | None, attributes: dict) -> None:
|
|
130
|
+
events.append({"schema_version": SCHEMA_VERSION, "event_id": str(uuid4()), "session_id": session_id,
|
|
131
|
+
"timestamp": iso(mono_offset_ns + int(ts_ns_mono)), "event_type": event_type, "relation": relation,
|
|
132
|
+
"source": source, "target": target, "sequence": None, "attributes": attributes})
|
|
133
|
+
|
|
134
|
+
records = parse_sensor(sensor_path)
|
|
135
|
+
last_argv: dict[int, list[str]] = {}
|
|
136
|
+
last_tag: dict[int, str] = {} # pid -> EW_TOOL_CALL_ID value seen at the most recent execve attempt
|
|
137
|
+
pending_connect: dict[int, dict[str, Any]] = {}
|
|
138
|
+
names: dict[int, str] = {}
|
|
139
|
+
base_attrs = {"backend": "lane_sensor", "attribution": "ebpf_tracepoint_cgroup", "causal": True}
|
|
140
|
+
kept = 0
|
|
141
|
+
for r in records:
|
|
142
|
+
cg = r.get("cg")
|
|
143
|
+
ev = r.get("ev")
|
|
144
|
+
if cg is None or lane_for(cg) is None:
|
|
145
|
+
continue
|
|
146
|
+
kept += 1
|
|
147
|
+
info = lane_for(cg) or {}
|
|
148
|
+
lane_attrs = {"cgroup_id": int(cg), "lane": info.get("lane"), "lane_call_id": info.get("call_id"), "lane_agent": info.get("agent")}
|
|
149
|
+
pid = int(r.get("pid", 0))
|
|
150
|
+
if ev == "execve":
|
|
151
|
+
last_argv[pid] = r.get("argv") or []
|
|
152
|
+
elif ev == "envtag":
|
|
153
|
+
last_tag[pid] = str(r.get("tag", "")).split("=", 1)[-1]
|
|
154
|
+
elif ev == "fork":
|
|
155
|
+
ppid, child = int(r["ppid"]), int(r["pid"])
|
|
156
|
+
emit(r["ns"], "process.started", "SPAWNED", pent(ppid, cg, names.get(ppid)), pent(child, cg), {**base_attrs, **lane_attrs, "syscall": "fork"})
|
|
157
|
+
elif ev == "exec":
|
|
158
|
+
filename = r.get("filename", "")
|
|
159
|
+
names[pid] = os.path.basename(filename)
|
|
160
|
+
emit(r["ns"], "process.exec", "EXECUTED", pent(pid, cg, names[pid]),
|
|
161
|
+
{"type": "executable", "id": f"executable:{filename}", "name": os.path.basename(filename), "attributes": {}},
|
|
162
|
+
{**base_attrs, **lane_attrs, "syscall": "execve", "argv": last_argv.get(pid), "uid": r.get("uid"),
|
|
163
|
+
"env_tool_call_id": last_tag.pop(pid, None)})
|
|
164
|
+
elif ev == "exit":
|
|
165
|
+
emit(r["ns"], "process.exited", "EXITED", pent(pid, cg, names.get(pid)), None, {**base_attrs, **lane_attrs})
|
|
166
|
+
elif ev == "open_write":
|
|
167
|
+
path = r.get("path", "")
|
|
168
|
+
emit(r["ns"], "filesystem.open", "OPENED_WRITE", pent(pid, cg, names.get(pid)),
|
|
169
|
+
{"type": "file", "id": f"file:{path}", "name": os.path.basename(path), "attributes": {}},
|
|
170
|
+
{**base_attrs, **lane_attrs, "syscall": "openat", "flags": r.get("flags"), "raw_path": path})
|
|
171
|
+
elif ev == "connect":
|
|
172
|
+
pending_connect[pid] = r
|
|
173
|
+
elif ev == "connect_ret":
|
|
174
|
+
c = pending_connect.pop(pid, None)
|
|
175
|
+
if c is None:
|
|
176
|
+
continue
|
|
177
|
+
ret = int(r.get("ret", -1))
|
|
178
|
+
connected = ret == 0 or ret == -115 # 0 or EINPROGRESS
|
|
179
|
+
endpoint = f"{c.get('addr')}:{c.get('port')}"
|
|
180
|
+
emit(c["ns"], "network.connection" if connected else "network.connection_attempt",
|
|
181
|
+
"CONNECTED_TO" if connected else "CONNECT_ATTEMPTED", pent(pid, cg, names.get(pid)),
|
|
182
|
+
{"type": "network_endpoint", "id": f"network_endpoint:{endpoint}", "name": endpoint, "attributes": {}},
|
|
183
|
+
{**base_attrs, **lane_attrs, "syscall": "connect", "endpoint": endpoint, "family": "AF_INET", "connected": connected, "result": ret})
|
|
184
|
+
|
|
185
|
+
# trusted launch edges from the ledger: requester process -> launched child
|
|
186
|
+
for rec in ledger_edges:
|
|
187
|
+
rp = rec["requester"]["pid"]
|
|
188
|
+
datetime.fromisoformat(rec["ts"].replace("Z", "+00:00")) # rejects a malformed ledger timestamp
|
|
189
|
+
events.append({"schema_version": SCHEMA_VERSION, "event_id": str(uuid4()), "session_id": session_id,
|
|
190
|
+
"timestamp": rec["ts"], "event_type": "process.started", "relation": "SPAWNED",
|
|
191
|
+
"source": pent(rp), "target": pent(rec["child_pid"]), "sequence": None,
|
|
192
|
+
"attributes": {"backend": "lane_ledger", "attribution": "trusted_launcher", "causal": True,
|
|
193
|
+
"lane": rec["lane"], "lane_inode": rec["lane_inode"], "call_id": rec.get("call_id"),
|
|
194
|
+
"agent": rec.get("agent") or rec["requester"].get("agent"), "ledger_seq": rec["seq"], "op": rec["op"]}})
|
|
195
|
+
|
|
196
|
+
agent = {"type": "agent", "id": f"agent:{agent_name}", "name": agent_name, "attributes": {}}
|
|
197
|
+
session = {"type": "session", "id": f"session:{session_id}", "name": session_id, "attributes": {"backend": "lane_sensor", "command": command}}
|
|
198
|
+
start = {"schema_version": SCHEMA_VERSION, "event_id": str(uuid4()), "session_id": session_id, "timestamp": iso(started_ns_wall),
|
|
199
|
+
"event_type": "session.started", "relation": "STARTED_SESSION", "source": agent, "target": session, "sequence": None,
|
|
200
|
+
"attributes": {"backend": "lane_sensor", "collector_pid": os.getpid(), "platform": "linux", "ledger_verified": verification["valid"]}}
|
|
201
|
+
finish = {"schema_version": SCHEMA_VERSION, "event_id": str(uuid4()), "session_id": session_id, "timestamp": iso(finished_ns_wall),
|
|
202
|
+
"event_type": "session.finished", "relation": "FINISHED_SESSION", "source": session, "target": None, "sequence": None,
|
|
203
|
+
"attributes": {"backend": "lane_sensor"}}
|
|
204
|
+
events.sort(key=lambda e: e["timestamp"])
|
|
205
|
+
# clamp to the session interval (bpftrace clock skew guard)
|
|
206
|
+
events = [e for e in events if start["timestamp"] <= e["timestamp"] <= finish["timestamp"]]
|
|
207
|
+
stream = [start, *events, finish]
|
|
208
|
+
for i, e in enumerate(stream, start=1):
|
|
209
|
+
e["sequence"] = i
|
|
210
|
+
out_events.parent.mkdir(parents=True, exist_ok=True)
|
|
211
|
+
out_events.write_text("".join(json.dumps(e, sort_keys=True, ensure_ascii=False) + "\n" for e in stream), encoding="utf-8")
|
|
212
|
+
|
|
213
|
+
lost = sum(int(r.get("count", 0)) for r in records if r.get("ev") == "sensor_lost")
|
|
214
|
+
attribution = {"tool_calls": {}, "agents": {}, "ledger": verification, "lanes": {str(k): v for k, v in lanes.items()},
|
|
215
|
+
"sensor_records_total": len(records), "sensor_records_in_lanes": kept, "sensor_lost_events": lost}
|
|
216
|
+
seen_ids: dict[str, int] = {}
|
|
217
|
+
for info in lanes.values():
|
|
218
|
+
if info["kind"] == "call" and info.get("call_id"):
|
|
219
|
+
seen_ids[info["call_id"]] = seen_ids.get(info["call_id"], 0) + 1
|
|
220
|
+
attribution["duplicate_call_ids"] = sorted(k for k, v in seen_ids.items() if v > 1)
|
|
221
|
+
for info in lanes.values():
|
|
222
|
+
if info["kind"] == "call" and info.get("call_id") in attribution["duplicate_call_ids"]:
|
|
223
|
+
continue # never silently overwrite a binding; duplicates are reported instead
|
|
224
|
+
if info["kind"] == "call" and info.get("call_id"):
|
|
225
|
+
attribution["tool_calls"][info["call_id"]] = {"process_id": f"process:{session_id}:{info['child_pid']}", "lane": info["lane"],
|
|
226
|
+
"lane_inode": [k for k, v in lanes.items() if v is info][0], "agent": info.get("agent"),
|
|
227
|
+
"argv": info.get("argv"), "declared": info.get("declared"),
|
|
228
|
+
"declared_matches_argv": (info.get("declared") == " ".join(info.get("argv") or [])) if info.get("declared") is not None else None,
|
|
229
|
+
"method": "lane_exact", "confidence": 1.0}
|
|
230
|
+
elif info["kind"] == "agent":
|
|
231
|
+
attribution["agents"][info["agent"]] = {"process_id": f"process:{session_id}:{info['child_pid']}", "lane": info["lane"], "parent_agent": info.get("requester_agent")}
|
|
232
|
+
out_attr.write_text(json.dumps(attribution, indent=2, sort_keys=True), encoding="utf-8")
|
|
233
|
+
return {"events": len(stream), "sensor_records": len(records), "in_lane": kept, "ledger": verification, "lanes": len(lanes),
|
|
234
|
+
"sensor_lost_events": lost}
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
#!/usr/bin/env python3
|
|
2
|
+
"""Run a command through the lane launcher with the caller's stdio, and exit with its status.
|
|
3
|
+
|
|
4
|
+
lane_exec.py --sock PATH --call-id ID [--declared TEXT] -- ARGV...
|
|
5
|
+
|
|
6
|
+
Used by the PreToolUse hook of the real-agent experiment: the hook rewrites an agent's Bash command into a
|
|
7
|
+
lane_exec invocation, so the command runs in its own call lane while its output still reaches the agent.
|
|
8
|
+
Requester identity is not sent: the launcher takes it from SO_PEERCRED and the caller's cgroup.
|
|
9
|
+
"""
|
|
10
|
+
import argparse
|
|
11
|
+
import json
|
|
12
|
+
import os
|
|
13
|
+
import socket
|
|
14
|
+
import sys
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
def main() -> int:
|
|
18
|
+
ap = argparse.ArgumentParser()
|
|
19
|
+
ap.add_argument("--sock", required=True)
|
|
20
|
+
ap.add_argument("--call-id", required=True)
|
|
21
|
+
ap.add_argument("--declared", default=None)
|
|
22
|
+
ap.add_argument("argv", nargs=argparse.REMAINDER)
|
|
23
|
+
a = ap.parse_args()
|
|
24
|
+
argv = a.argv[1:] if a.argv and a.argv[0] == "--" else a.argv
|
|
25
|
+
# harness-native per-call context (Claude Code TRACEPARENT/TRACESTATE, Codex CODEX_TOOL_CALL_ID) is passed through unchanged, so
|
|
26
|
+
# the native-tag baseline sees inside a lane the same variables it would see without the launcher
|
|
27
|
+
env = {k: v for k, v in os.environ.items() if k in ("PATH", "LANG", "LC_ALL", "TMPDIR", "HOME", "TRACEPARENT", "TRACESTATE", "CODEX_TOOL_CALL_ID")
|
|
28
|
+
or k.startswith(("EW_", "EXECWEAVE_"))}
|
|
29
|
+
req = {"op": "launch", "call_id": a.call_id, "argv": argv, "declared": a.declared, "cwd": os.getcwd(), "env": env}
|
|
30
|
+
s = socket.socket(socket.AF_UNIX, socket.SOCK_STREAM)
|
|
31
|
+
s.connect(a.sock)
|
|
32
|
+
socket.send_fds(s, [(json.dumps(req) + "\n").encode()], [0, 1, 2])
|
|
33
|
+
buf = b""
|
|
34
|
+
while not buf.endswith(b"\n"):
|
|
35
|
+
c = s.recv(65536)
|
|
36
|
+
if not c:
|
|
37
|
+
break
|
|
38
|
+
buf += c
|
|
39
|
+
r = json.loads(buf)
|
|
40
|
+
if not r.get("ok"):
|
|
41
|
+
print(f"lane_exec: launch refused: {r.get('error')}", file=sys.stderr)
|
|
42
|
+
return 126
|
|
43
|
+
s2 = socket.socket(socket.AF_UNIX, socket.SOCK_STREAM)
|
|
44
|
+
s2.connect(a.sock)
|
|
45
|
+
s2.sendall((json.dumps({"op": "wait", "pid": r["pid"]}) + "\n").encode())
|
|
46
|
+
buf = b""
|
|
47
|
+
while not buf.endswith(b"\n"):
|
|
48
|
+
c = s2.recv(65536)
|
|
49
|
+
if not c:
|
|
50
|
+
break
|
|
51
|
+
buf += c
|
|
52
|
+
w = json.loads(buf)
|
|
53
|
+
return int(w.get("returncode", 1)) if w.get("ok") else 1
|
|
54
|
+
|
|
55
|
+
|
|
56
|
+
if __name__ == "__main__":
|
|
57
|
+
raise SystemExit(main())
|
|
File without changes
|