execweave 0.8.38__tar.gz → 0.8.39__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.38 → execweave-0.8.39}/PKG-INFO +1 -1
- {execweave-0.8.38 → execweave-0.8.39}/pyproject.toml +2 -2
- {execweave-0.8.38 → execweave-0.8.39}/src/execweave/__init__.py +1 -1
- {execweave-0.8.38 → execweave-0.8.39}/src/execweave/correlation.py +199 -1
- {execweave-0.8.38 → execweave-0.8.39}/src/execweave/openai_agents_sdk.py +10 -2
- {execweave-0.8.38 → execweave-0.8.39}/src/execweave/strace_backend.py +216 -14
- {execweave-0.8.38 → execweave-0.8.39}/.gitignore +0 -0
- {execweave-0.8.38 → execweave-0.8.39}/LICENSE +0 -0
- {execweave-0.8.38 → execweave-0.8.39}/README.md +0 -0
- {execweave-0.8.38 → execweave-0.8.39}/src/execweave/__main__.py +0 -0
- {execweave-0.8.38 → execweave-0.8.39}/src/execweave/_conversation_records_core.py +0 -0
- {execweave-0.8.38 → execweave-0.8.39}/src/execweave/_dashboard_shell_base.py +0 -0
- {execweave-0.8.38 → execweave-0.8.39}/src/execweave/_http_proxy_base.py +0 -0
- {execweave-0.8.38 → execweave-0.8.39}/src/execweave/_http_proxy_bounded.py +0 -0
- {execweave-0.8.38 → execweave-0.8.39}/src/execweave/_http_proxy_stage.py +0 -0
- {execweave-0.8.38 → execweave-0.8.39}/src/execweave/acceptance_output.py +0 -0
- {execweave-0.8.38 → execweave-0.8.39}/src/execweave/agent_bootstrap.py +0 -0
- {execweave-0.8.38 → execweave-0.8.39}/src/execweave/agent_topology.py +0 -0
- {execweave-0.8.38 → execweave-0.8.39}/src/execweave/agent_trace.py +0 -0
- {execweave-0.8.38 → execweave-0.8.39}/src/execweave/agy_preview_sanitize.py +0 -0
- {execweave-0.8.38 → execweave-0.8.39}/src/execweave/analysis.py +0 -0
- {execweave-0.8.38 → execweave-0.8.39}/src/execweave/anthropic.py +0 -0
- {execweave-0.8.38 → execweave-0.8.39}/src/execweave/anthropic_cli.py +0 -0
- {execweave-0.8.38 → execweave-0.8.39}/src/execweave/anthropic_full_fidelity.py +0 -0
- {execweave-0.8.38 → execweave-0.8.39}/src/execweave/antigravity_adapter.py +0 -0
- {execweave-0.8.38 → execweave-0.8.39}/src/execweave/antigravity_adapter_base.py +0 -0
- {execweave-0.8.38 → execweave-0.8.39}/src/execweave/antigravity_full_fidelity.py +0 -0
- {execweave-0.8.38 → execweave-0.8.39}/src/execweave/antigravity_full_fidelity_base.py +0 -0
- {execweave-0.8.38 → execweave-0.8.39}/src/execweave/antigravity_full_fidelity_collaboration_base.py +0 -0
- {execweave-0.8.38 → execweave-0.8.39}/src/execweave/antigravity_hook_cli.py +0 -0
- {execweave-0.8.38 → execweave-0.8.39}/src/execweave/antigravity_record.py +0 -0
- {execweave-0.8.38 → execweave-0.8.39}/src/execweave/antigravity_subagent_linkage.py +0 -0
- {execweave-0.8.38 → execweave-0.8.39}/src/execweave/antigravity_trace_capability.py +0 -0
- {execweave-0.8.38 → execweave-0.8.39}/src/execweave/auto_specialized.py +0 -0
- {execweave-0.8.38 → execweave-0.8.39}/src/execweave/backends.py +0 -0
- {execweave-0.8.38 → execweave-0.8.39}/src/execweave/benchmark.py +0 -0
- {execweave-0.8.38 → execweave-0.8.39}/src/execweave/claude_adapter.py +0 -0
- {execweave-0.8.38 → execweave-0.8.39}/src/execweave/claude_child_transcript.py +0 -0
- {execweave-0.8.38 → execweave-0.8.39}/src/execweave/claude_delegation.py +0 -0
- {execweave-0.8.38 → execweave-0.8.39}/src/execweave/claude_full_fidelity.py +0 -0
- {execweave-0.8.38 → execweave-0.8.39}/src/execweave/claude_hook_cli.py +0 -0
- {execweave-0.8.38 → execweave-0.8.39}/src/execweave/claude_hook_contract.py +0 -0
- {execweave-0.8.38 → execweave-0.8.39}/src/execweave/claude_model_observer.py +0 -0
- {execweave-0.8.38 → execweave-0.8.39}/src/execweave/claude_record.py +0 -0
- {execweave-0.8.38 → execweave-0.8.39}/src/execweave/cli.py +0 -0
- {execweave-0.8.38 → execweave-0.8.39}/src/execweave/codex_adapter.py +0 -0
- {execweave-0.8.38 → execweave-0.8.39}/src/execweave/codex_conversation.py +0 -0
- {execweave-0.8.38 → execweave-0.8.39}/src/execweave/codex_full_fidelity.py +0 -0
- {execweave-0.8.38 → execweave-0.8.39}/src/execweave/codex_hook_cli.py +0 -0
- {execweave-0.8.38 → execweave-0.8.39}/src/execweave/codex_hook_entry.py +0 -0
- {execweave-0.8.38 → execweave-0.8.39}/src/execweave/codex_hook_lifecycle.py +0 -0
- {execweave-0.8.38 → execweave-0.8.39}/src/execweave/codex_message_diagnostics.py +0 -0
- {execweave-0.8.38 → execweave-0.8.39}/src/execweave/codex_message_transport_diagnostics.py +0 -0
- {execweave-0.8.38 → execweave-0.8.39}/src/execweave/codex_record.py +0 -0
- {execweave-0.8.38 → execweave-0.8.39}/src/execweave/codex_rollout_structures.py +0 -0
- {execweave-0.8.38 → execweave-0.8.39}/src/execweave/codex_rollout_trace.py +0 -0
- {execweave-0.8.38 → execweave-0.8.39}/src/execweave/codex_rollout_trace_base.py +0 -0
- {execweave-0.8.38 → execweave-0.8.39}/src/execweave/collector.py +0 -0
- {execweave-0.8.38 → execweave-0.8.39}/src/execweave/command.py +0 -0
- {execweave-0.8.38 → execweave-0.8.39}/src/execweave/command_privacy.py +0 -0
- {execweave-0.8.38 → execweave-0.8.39}/src/execweave/content_evidence.py +0 -0
- {execweave-0.8.38 → execweave-0.8.39}/src/execweave/content_integrity.py +0 -0
- {execweave-0.8.38 → execweave-0.8.39}/src/execweave/content_store.py +0 -0
- {execweave-0.8.38 → execweave-0.8.39}/src/execweave/controlled_checks.py +0 -0
- {execweave-0.8.38 → execweave-0.8.39}/src/execweave/conversation_archive.py +0 -0
- {execweave-0.8.38 → execweave-0.8.39}/src/execweave/conversation_message_identity.py +0 -0
- {execweave-0.8.38 → execweave-0.8.39}/src/execweave/conversation_preview.py +0 -0
- {execweave-0.8.38 → execweave-0.8.39}/src/execweave/conversation_preview_antigravity.py +0 -0
- {execweave-0.8.38 → execweave-0.8.39}/src/execweave/conversation_preview_claude.py +0 -0
- {execweave-0.8.38 → execweave-0.8.39}/src/execweave/conversation_preview_codex.py +0 -0
- {execweave-0.8.38 → execweave-0.8.39}/src/execweave/conversation_preview_common.py +0 -0
- {execweave-0.8.38 → execweave-0.8.39}/src/execweave/conversation_preview_generic.py +0 -0
- {execweave-0.8.38 → execweave-0.8.39}/src/execweave/conversation_preview_lines.py +0 -0
- {execweave-0.8.38 → execweave-0.8.39}/src/execweave/conversation_preview_transcript.py +0 -0
- {execweave-0.8.38 → execweave-0.8.39}/src/execweave/conversation_records.py +0 -0
- {execweave-0.8.38 → execweave-0.8.39}/src/execweave/conversation_records_antigravity.py +0 -0
- {execweave-0.8.38 → execweave-0.8.39}/src/execweave/conversation_records_codex.py +0 -0
- {execweave-0.8.38 → execweave-0.8.39}/src/execweave/conversation_records_common.py +0 -0
- {execweave-0.8.38 → execweave-0.8.39}/src/execweave/conversation_records_ollama.py +0 -0
- {execweave-0.8.38 → execweave-0.8.39}/src/execweave/cursor_adapter.py +0 -0
- {execweave-0.8.38 → execweave-0.8.39}/src/execweave/cursor_delegation.py +0 -0
- {execweave-0.8.38 → execweave-0.8.39}/src/execweave/cursor_delegation_base.py +0 -0
- {execweave-0.8.38 → execweave-0.8.39}/src/execweave/cursor_full_fidelity.py +0 -0
- {execweave-0.8.38 → execweave-0.8.39}/src/execweave/cursor_hook_cli.py +0 -0
- {execweave-0.8.38 → execweave-0.8.39}/src/execweave/cursor_hook_contract.py +0 -0
- {execweave-0.8.38 → execweave-0.8.39}/src/execweave/cursor_lifecycle.py +0 -0
- {execweave-0.8.38 → execweave-0.8.39}/src/execweave/cursor_record.py +0 -0
- {execweave-0.8.38 → execweave-0.8.39}/src/execweave/dashboard_shell.py +0 -0
- {execweave-0.8.38 → execweave-0.8.39}/src/execweave/delivery_status.py +0 -0
- {execweave-0.8.38 → execweave-0.8.39}/src/execweave/entry.py +0 -0
- {execweave-0.8.38 → execweave-0.8.39}/src/execweave/evidence_availability.py +0 -0
- {execweave-0.8.38 → execweave-0.8.39}/src/execweave/evidence_grade.py +0 -0
- {execweave-0.8.38 → execweave-0.8.39}/src/execweave/fidelity.py +0 -0
- {execweave-0.8.38 → execweave-0.8.39}/src/execweave/filesystem.py +0 -0
- {execweave-0.8.38 → execweave-0.8.39}/src/execweave/finalization.py +0 -0
- {execweave-0.8.38 → execweave-0.8.39}/src/execweave/focus.py +0 -0
- {execweave-0.8.38 → execweave-0.8.39}/src/execweave/framework_adapters/__init__.py +0 -0
- {execweave-0.8.38 → execweave-0.8.39}/src/execweave/framework_adapters/autogen.py +0 -0
- {execweave-0.8.38 → execweave-0.8.39}/src/execweave/framework_adapters/base.py +0 -0
- {execweave-0.8.38 → execweave-0.8.39}/src/execweave/framework_adapters/camel.py +0 -0
- {execweave-0.8.38 → execweave-0.8.39}/src/execweave/framework_adapters/camel_channel.py +0 -0
- {execweave-0.8.38 → execweave-0.8.39}/src/execweave/framework_adapters/metagpt.py +0 -0
- {execweave-0.8.38 → execweave-0.8.39}/src/execweave/framework_adapters/registry.py +0 -0
- {execweave-0.8.38 → execweave-0.8.39}/src/execweave/graph.py +0 -0
- {execweave-0.8.38 → execweave-0.8.39}/src/execweave/graph_ops.py +0 -0
- {execweave-0.8.38 → execweave-0.8.39}/src/execweave/hook_command.py +0 -0
- {execweave-0.8.38 → execweave-0.8.39}/src/execweave/hook_delivery.py +0 -0
- {execweave-0.8.38 → execweave-0.8.39}/src/execweave/hook_input.py +0 -0
- {execweave-0.8.38 → execweave-0.8.39}/src/execweave/http_proxy.py +0 -0
- {execweave-0.8.38 → execweave-0.8.39}/src/execweave/http_proxy_cli.py +0 -0
- {execweave-0.8.38 → execweave-0.8.39}/src/execweave/inference_gateway.py +0 -0
- {execweave-0.8.38 → execweave-0.8.39}/src/execweave/inference_gateway_cli.py +0 -0
- {execweave-0.8.38 → execweave-0.8.39}/src/execweave/inference_gateway_full_fidelity.py +0 -0
- {execweave-0.8.38 → execweave-0.8.39}/src/execweave/inference_identity.py +0 -0
- {execweave-0.8.38 → execweave-0.8.39}/src/execweave/inference_identity_cli.py +0 -0
- {execweave-0.8.38 → execweave-0.8.39}/src/execweave/integrity.py +0 -0
- {execweave-0.8.38 → execweave-0.8.39}/src/execweave/integrity_cli.py +0 -0
- {execweave-0.8.38 → execweave-0.8.39}/src/execweave/investigation_index.py +0 -0
- {execweave-0.8.38 → execweave-0.8.39}/src/execweave/litellm_callback.py +0 -0
- {execweave-0.8.38 → execweave-0.8.39}/src/execweave/litellm_callback_cli.py +0 -0
- {execweave-0.8.38 → execweave-0.8.39}/src/execweave/live.py +0 -0
- {execweave-0.8.38 → execweave-0.8.39}/src/execweave/live_core.py +0 -0
- {execweave-0.8.38 → execweave-0.8.39}/src/execweave/live_view.py +0 -0
- {execweave-0.8.38 → execweave-0.8.39}/src/execweave/live_view_extra_style.py +0 -0
- {execweave-0.8.38 → execweave-0.8.39}/src/execweave/live_view_markup.py +0 -0
- {execweave-0.8.38 → execweave-0.8.39}/src/execweave/live_view_process_layout.py +0 -0
- {execweave-0.8.38 → execweave-0.8.39}/src/execweave/live_view_readability.py +0 -0
- {execweave-0.8.38 → execweave-0.8.39}/src/execweave/live_view_script_a.py +0 -0
- {execweave-0.8.38 → execweave-0.8.39}/src/execweave/live_view_script_b.py +0 -0
- {execweave-0.8.38 → execweave-0.8.39}/src/execweave/live_view_script_c.py +0 -0
- {execweave-0.8.38 → execweave-0.8.39}/src/execweave/live_view_script_d.py +0 -0
- {execweave-0.8.38 → execweave-0.8.39}/src/execweave/live_view_style.py +0 -0
- {execweave-0.8.38 → execweave-0.8.39}/src/execweave/model_runtime.py +0 -0
- {execweave-0.8.38 → execweave-0.8.39}/src/execweave/model_runtime_cli.py +0 -0
- {execweave-0.8.38 → execweave-0.8.39}/src/execweave/model_runtime_full_fidelity.py +0 -0
- {execweave-0.8.38 → execweave-0.8.39}/src/execweave/observation.py +0 -0
- {execweave-0.8.38 → execweave-0.8.39}/src/execweave/observation_demo.py +0 -0
- {execweave-0.8.38 → execweave-0.8.39}/src/execweave/openai_agents.py +0 -0
- {execweave-0.8.38 → execweave-0.8.39}/src/execweave/openai_compatible.py +0 -0
- {execweave-0.8.38 → execweave-0.8.39}/src/execweave/openai_compatible_cli.py +0 -0
- {execweave-0.8.38 → execweave-0.8.39}/src/execweave/openai_compatible_full_fidelity.py +0 -0
- {execweave-0.8.38 → execweave-0.8.39}/src/execweave/opencode_adapter.py +0 -0
- {execweave-0.8.38 → execweave-0.8.39}/src/execweave/opencode_event_contract.py +0 -0
- {execweave-0.8.38 → execweave-0.8.39}/src/execweave/opencode_full_fidelity.py +0 -0
- {execweave-0.8.38 → execweave-0.8.39}/src/execweave/opencode_hook_cli.py +0 -0
- {execweave-0.8.38 → execweave-0.8.39}/src/execweave/opencode_plugin_cli.py +0 -0
- {execweave-0.8.38 → execweave-0.8.39}/src/execweave/opencode_record.py +0 -0
- {execweave-0.8.38 → execweave-0.8.39}/src/execweave/opencode_task_linkage.py +0 -0
- {execweave-0.8.38 → execweave-0.8.39}/src/execweave/overhead_benchmark.py +0 -0
- {execweave-0.8.38 → execweave-0.8.39}/src/execweave/privacy.py +0 -0
- {execweave-0.8.38 → execweave-0.8.39}/src/execweave/private_io.py +0 -0
- {execweave-0.8.38 → execweave-0.8.39}/src/execweave/provider_capability.py +0 -0
- {execweave-0.8.38 → execweave-0.8.39}/src/execweave/provider_lifecycle.py +0 -0
- {execweave-0.8.38 → execweave-0.8.39}/src/execweave/provider_record.py +0 -0
- {execweave-0.8.38 → execweave-0.8.39}/src/execweave/reader_identity.py +0 -0
- {execweave-0.8.38 → execweave-0.8.39}/src/execweave/redacted_archive.py +0 -0
- {execweave-0.8.38 → execweave-0.8.39}/src/execweave/risk.py +0 -0
- {execweave-0.8.38 → execweave-0.8.39}/src/execweave/rule_pack.py +0 -0
- {execweave-0.8.38 → execweave-0.8.39}/src/execweave/rule_pack_cli.py +0 -0
- {execweave-0.8.38 → execweave-0.8.39}/src/execweave/run_assessment.py +0 -0
- {execweave-0.8.38 → execweave-0.8.39}/src/execweave/runtime_endpoint_availability.py +0 -0
- {execweave-0.8.38 → execweave-0.8.39}/src/execweave/scalability_benchmark.py +0 -0
- {execweave-0.8.38 → execweave-0.8.39}/src/execweave/schema.py +0 -0
- {execweave-0.8.38 → execweave-0.8.39}/src/execweave/scope.py +0 -0
- {execweave-0.8.38 → execweave-0.8.39}/src/execweave/semantic.py +0 -0
- {execweave-0.8.38 → execweave-0.8.39}/src/execweave/session_summary.py +0 -0
- {execweave-0.8.38 → execweave-0.8.39}/src/execweave/sink.py +0 -0
- {execweave-0.8.38 → execweave-0.8.39}/src/execweave/stream_assembly.py +0 -0
- {execweave-0.8.38 → execweave-0.8.39}/src/execweave/task_artifacts.py +0 -0
- {execweave-0.8.38 → execweave-0.8.39}/src/execweave/task_validation.py +0 -0
- {execweave-0.8.38 → execweave-0.8.39}/src/execweave/theme.py +0 -0
- {execweave-0.8.38 → execweave-0.8.39}/src/execweave/top.py +0 -0
- {execweave-0.8.38 → execweave-0.8.39}/src/execweave/top_cli.py +0 -0
- {execweave-0.8.38 → execweave-0.8.39}/src/execweave/validate.py +0 -0
- {execweave-0.8.38 → execweave-0.8.39}/src/execweave/vendor/dagre.min.js +0 -0
- {execweave-0.8.38 → execweave-0.8.39}/src/execweave/view_cli.py +0 -0
- {execweave-0.8.38 → execweave-0.8.39}/src/execweave/viewer.py +0 -0
- {execweave-0.8.38 → execweave-0.8.39}/src/execweave/viewer_agent_panel.py +0 -0
- {execweave-0.8.38 → execweave-0.8.39}/src/execweave/viewer_agent_panel_antigravity.py +0 -0
- {execweave-0.8.38 → execweave-0.8.39}/src/execweave/viewer_agent_panel_claude.py +0 -0
- {execweave-0.8.38 → execweave-0.8.39}/src/execweave/viewer_agent_panel_codex.py +0 -0
- {execweave-0.8.38 → execweave-0.8.39}/src/execweave/viewer_agent_panel_cursor.py +0 -0
- {execweave-0.8.38 → execweave-0.8.39}/src/execweave/viewer_agent_panel_default.py +0 -0
- {execweave-0.8.38 → execweave-0.8.39}/src/execweave/viewer_agent_panel_ollama.py +0 -0
- {execweave-0.8.38 → execweave-0.8.39}/src/execweave/viewer_agent_panel_opencode.py +0 -0
- {execweave-0.8.38 → execweave-0.8.39}/src/execweave/viewer_agent_panel_registry.py +0 -0
- {execweave-0.8.38 → execweave-0.8.39}/src/execweave/viewer_archive_verifier.py +0 -0
- {execweave-0.8.38 → execweave-0.8.39}/src/execweave/viewer_background_files.py +0 -0
- {execweave-0.8.38 → execweave-0.8.39}/src/execweave/viewer_content_browser.py +0 -0
- {execweave-0.8.38 → execweave-0.8.39}/src/execweave/viewer_content_health.py +0 -0
- {execweave-0.8.38 → execweave-0.8.39}/src/execweave/viewer_content_inspector.py +0 -0
- {execweave-0.8.38 → execweave-0.8.39}/src/execweave/viewer_controlled_checks.py +0 -0
- {execweave-0.8.38 → execweave-0.8.39}/src/execweave/viewer_conversation_sync.py +0 -0
- {execweave-0.8.38 → execweave-0.8.39}/src/execweave/viewer_dashboard_clean.py +0 -0
- {execweave-0.8.38 → execweave-0.8.39}/src/execweave/viewer_dashboard_focus.py +0 -0
- {execweave-0.8.38 → execweave-0.8.39}/src/execweave/viewer_dashboard_hardening.py +0 -0
- {execweave-0.8.38 → execweave-0.8.39}/src/execweave/viewer_dashboard_hardening_v2.py +0 -0
- {execweave-0.8.38 → execweave-0.8.39}/src/execweave/viewer_dashboard_pr70.py +0 -0
- {execweave-0.8.38 → execweave-0.8.39}/src/execweave/viewer_delivery_status.py +0 -0
- {execweave-0.8.38 → execweave-0.8.39}/src/execweave/viewer_edge_decross.py +0 -0
- {execweave-0.8.38 → execweave-0.8.39}/src/execweave/viewer_execution_flow.py +0 -0
- {execweave-0.8.38 → execweave-0.8.39}/src/execweave/viewer_execution_flow_provider_normalization.py +0 -0
- {execweave-0.8.38 → execweave-0.8.39}/src/execweave/viewer_execution_flow_safety.py +0 -0
- {execweave-0.8.38 → execweave-0.8.39}/src/execweave/viewer_external_endpoints.py +0 -0
- {execweave-0.8.38 → execweave-0.8.39}/src/execweave/viewer_flow_canvas.py +0 -0
- {execweave-0.8.38 → execweave-0.8.39}/src/execweave/viewer_flow_layout.py +0 -0
- {execweave-0.8.38 → execweave-0.8.39}/src/execweave/viewer_fold_state.py +0 -0
- {execweave-0.8.38 → execweave-0.8.39}/src/execweave/viewer_framework_flow.py +0 -0
- {execweave-0.8.38 → execweave-0.8.39}/src/execweave/viewer_framework_model_output.py +0 -0
- {execweave-0.8.38 → execweave-0.8.39}/src/execweave/viewer_gif.py +0 -0
- {execweave-0.8.38 → execweave-0.8.39}/src/execweave/viewer_history_browser.py +0 -0
- {execweave-0.8.38 → execweave-0.8.39}/src/execweave/viewer_investigation.py +0 -0
- {execweave-0.8.38 → execweave-0.8.39}/src/execweave/viewer_layout_geometry.py +0 -0
- {execweave-0.8.38 → execweave-0.8.39}/src/execweave/viewer_layout_v2.py +0 -0
- {execweave-0.8.38 → execweave-0.8.39}/src/execweave/viewer_layout_v2_detached.py +0 -0
- {execweave-0.8.38 → execweave-0.8.39}/src/execweave/viewer_limits.py +0 -0
- {execweave-0.8.38 → execweave-0.8.39}/src/execweave/viewer_live_layout.py +0 -0
- {execweave-0.8.38 → execweave-0.8.39}/src/execweave/viewer_message_handoffs.py +0 -0
- {execweave-0.8.38 → execweave-0.8.39}/src/execweave/viewer_projection.py +0 -0
- {execweave-0.8.38 → execweave-0.8.39}/src/execweave/viewer_projection_base.py +0 -0
- {execweave-0.8.38 → execweave-0.8.39}/src/execweave/viewer_projection_bridges.py +0 -0
- {execweave-0.8.38 → execweave-0.8.39}/src/execweave/viewer_recorded_sources.py +0 -0
- {execweave-0.8.38 → execweave-0.8.39}/src/execweave/viewer_run_assessment.py +0 -0
- {execweave-0.8.38 → execweave-0.8.39}/src/execweave/viewer_run_guide.py +0 -0
- {execweave-0.8.38 → execweave-0.8.39}/src/execweave/viewer_runtime_evidence.py +0 -0
- {execweave-0.8.38 → execweave-0.8.39}/src/execweave/viewer_semantic_projection.py +0 -0
- {execweave-0.8.38 → execweave-0.8.39}/src/execweave/viewer_session_flow.py +0 -0
- {execweave-0.8.38 → execweave-0.8.39}/src/execweave/viewer_structure_share.py +0 -0
- {execweave-0.8.38 → execweave-0.8.39}/src/execweave/viewer_task_validation.py +0 -0
- {execweave-0.8.38 → execweave-0.8.39}/src/execweave/viewer_tool_mirror_identity.py +0 -0
- {execweave-0.8.38 → execweave-0.8.39}/src/execweave/viewer_workflow_mode.py +0 -0
- {execweave-0.8.38 → execweave-0.8.39}/src/execweave/workflow.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.5
|
|
2
2
|
Name: execweave
|
|
3
|
-
Version: 0.8.
|
|
3
|
+
Version: 0.8.39
|
|
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
|
|
@@ -4,8 +4,8 @@ build-backend = "hatchling.build"
|
|
|
4
4
|
|
|
5
5
|
[project]
|
|
6
6
|
name = "execweave"
|
|
7
|
-
# ExecWeave v0.8.
|
|
8
|
-
version = "0.8.
|
|
7
|
+
# ExecWeave v0.8.39 release metadata; SDK-to-OS provenance repair
|
|
8
|
+
version = "0.8.39"
|
|
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"
|
|
@@ -483,6 +483,195 @@ def _derived_event(
|
|
|
483
483
|
}
|
|
484
484
|
|
|
485
485
|
|
|
486
|
+
|
|
487
|
+
def _sdk_native_spawn_correlations(
|
|
488
|
+
events: list[dict[str, Any]],
|
|
489
|
+
*,
|
|
490
|
+
session_id: str,
|
|
491
|
+
max_window_ms: int,
|
|
492
|
+
) -> tuple[list[dict[str, Any]], int, int, int, int]:
|
|
493
|
+
"""Infer *non-causal* SDK function-span/native-spawn links.
|
|
494
|
+
|
|
495
|
+
This is a deliberately weaker result than execution-context propagation:
|
|
496
|
+
SDK callback PID/timestamps originate in a same-UID process sidecar,
|
|
497
|
+
whereas the child spawn is independently observed by strace. A temporal
|
|
498
|
+
match is not proof that the tool caused the spawn. Never classify it as
|
|
499
|
+
syscall-attributed; ambiguity (including concurrent spans) abstains.
|
|
500
|
+
"""
|
|
501
|
+
starts: dict[str, dict[str, Any]] = {}
|
|
502
|
+
# Retain even invalid/duplicated starts as competing declarations. Dropping
|
|
503
|
+
# them would let a different span claim an otherwise ambiguous native spawn.
|
|
504
|
+
all_starts: list[dict[str, Any]] = []
|
|
505
|
+
ends: dict[str, dict[str, Any]] = {}
|
|
506
|
+
spawns: list[dict[str, Any]] = []
|
|
507
|
+
for event in events:
|
|
508
|
+
attrs = event.get("attributes")
|
|
509
|
+
if not isinstance(attrs, dict):
|
|
510
|
+
continue
|
|
511
|
+
if (
|
|
512
|
+
event.get("event_type") == "process.started"
|
|
513
|
+
and event.get("relation") == "SPAWNED"
|
|
514
|
+
and attrs.get("backend") == "strace"
|
|
515
|
+
and attrs.get("attribution") == "syscall"
|
|
516
|
+
and isinstance(event.get("source"), dict)
|
|
517
|
+
and isinstance(event.get("target"), dict)
|
|
518
|
+
and event["source"].get("type") == "process"
|
|
519
|
+
and event["target"].get("type") == "process"
|
|
520
|
+
):
|
|
521
|
+
spawns.append(event)
|
|
522
|
+
continue
|
|
523
|
+
if attrs.get("evidence_source") != "agents_sdk_tracing_callback":
|
|
524
|
+
continue
|
|
525
|
+
if attrs.get("framework") != "openai-agents-sdk":
|
|
526
|
+
continue
|
|
527
|
+
call_id = attrs.get("tool_call_id")
|
|
528
|
+
pid = attrs.get("sdk_host_pid")
|
|
529
|
+
if (
|
|
530
|
+
not isinstance(call_id, str) or not call_id
|
|
531
|
+
or not isinstance(pid, int) or isinstance(pid, bool) or pid <= 0
|
|
532
|
+
or not isinstance(attrs.get("sdk_span_id"), str)
|
|
533
|
+
):
|
|
534
|
+
continue
|
|
535
|
+
if event.get("event_type") == "TOOL_CALL" and event.get("relation") == "REQUESTS_TOOL_CALL":
|
|
536
|
+
all_starts.append(event)
|
|
537
|
+
if call_id in starts:
|
|
538
|
+
# A duplicate declaration is ambiguous; refuse to join.
|
|
539
|
+
starts[call_id] = {}
|
|
540
|
+
else:
|
|
541
|
+
starts[call_id] = event
|
|
542
|
+
elif event.get("event_type") in {"TOOL_RESULT", "TOOL_FAILURE"}:
|
|
543
|
+
if call_id in ends:
|
|
544
|
+
ends[call_id] = {}
|
|
545
|
+
else:
|
|
546
|
+
ends[call_id] = event
|
|
547
|
+
|
|
548
|
+
considered = len(starts)
|
|
549
|
+
skipped_no_match = 0
|
|
550
|
+
skipped_ambiguous = 0
|
|
551
|
+
candidates: list[tuple[dict[str, Any], dict[str, Any], dict[str, Any]]] = []
|
|
552
|
+
for call_id, start in starts.items():
|
|
553
|
+
end = ends.get(call_id)
|
|
554
|
+
if not start or not end:
|
|
555
|
+
skipped_no_match += 1
|
|
556
|
+
continue
|
|
557
|
+
start_attrs = start["attributes"]
|
|
558
|
+
end_attrs = end["attributes"]
|
|
559
|
+
if (
|
|
560
|
+
start_attrs["sdk_host_pid"] != end_attrs.get("sdk_host_pid")
|
|
561
|
+
or start_attrs["sdk_span_id"] != end_attrs.get("sdk_span_id")
|
|
562
|
+
or start_attrs.get("sdk_trace_id") != end_attrs.get("sdk_trace_id")
|
|
563
|
+
):
|
|
564
|
+
skipped_ambiguous += 1
|
|
565
|
+
continue
|
|
566
|
+
begin = _event_time(start, index=1)
|
|
567
|
+
finish = _event_time(end, index=1)
|
|
568
|
+
if finish < begin:
|
|
569
|
+
skipped_no_match += 1
|
|
570
|
+
continue
|
|
571
|
+
# A time window cannot be stretched merely because a tool is slow.
|
|
572
|
+
limit = min(finish, begin + timedelta(milliseconds=max_window_ms))
|
|
573
|
+
matching = []
|
|
574
|
+
for spawn in spawns:
|
|
575
|
+
native_parent = (spawn.get("source") or {}).get("attributes") or {}
|
|
576
|
+
if native_parent.get("pid") != start_attrs["sdk_host_pid"]:
|
|
577
|
+
continue
|
|
578
|
+
when = _event_time(spawn, index=1)
|
|
579
|
+
if begin <= when < limit:
|
|
580
|
+
matching.append(spawn)
|
|
581
|
+
if len(matching) != 1:
|
|
582
|
+
if matching:
|
|
583
|
+
skipped_ambiguous += 1
|
|
584
|
+
else:
|
|
585
|
+
skipped_no_match += 1
|
|
586
|
+
continue
|
|
587
|
+
candidates.append((start, end, matching[0]))
|
|
588
|
+
|
|
589
|
+
# A span missing TOOL_RESULT still competes for a spawn in its bounded
|
|
590
|
+
# window. Ignoring incomplete spans could falsely attribute its child to
|
|
591
|
+
# a different, completed span. Never use absence of a callback as proof
|
|
592
|
+
# that a tool was not active.
|
|
593
|
+
process_claims: dict[str, int] = {}
|
|
594
|
+
for spawn in spawns:
|
|
595
|
+
parent = (spawn["source"].get("attributes") or {}).get("pid")
|
|
596
|
+
spawn_time = _event_time(spawn, index=1)
|
|
597
|
+
for start in all_starts:
|
|
598
|
+
if start["attributes"].get("sdk_host_pid") != parent:
|
|
599
|
+
continue
|
|
600
|
+
begin = _event_time(start, index=1)
|
|
601
|
+
limit = begin + timedelta(milliseconds=max_window_ms)
|
|
602
|
+
finish_event = ends.get(start["attributes"].get("tool_call_id"))
|
|
603
|
+
if finish_event:
|
|
604
|
+
finish_attrs = finish_event.get("attributes") or {}
|
|
605
|
+
if (
|
|
606
|
+
finish_attrs.get("sdk_host_pid") == parent
|
|
607
|
+
and finish_attrs.get("sdk_span_id") == start["attributes"].get("sdk_span_id")
|
|
608
|
+
and finish_attrs.get("sdk_trace_id") == start["attributes"].get("sdk_trace_id")
|
|
609
|
+
):
|
|
610
|
+
limit = min(limit, _event_time(finish_event, index=1))
|
|
611
|
+
if begin <= spawn_time < limit:
|
|
612
|
+
pid_id = spawn["target"]["id"]
|
|
613
|
+
process_claims[pid_id] = process_claims.get(pid_id, 0) + 1
|
|
614
|
+
derived = []
|
|
615
|
+
for start, end, spawn in candidates:
|
|
616
|
+
target = spawn["target"]
|
|
617
|
+
if process_claims[target["id"]] != 1:
|
|
618
|
+
skipped_ambiguous += 1
|
|
619
|
+
continue
|
|
620
|
+
attrs = start["attributes"]
|
|
621
|
+
supporting = sorted({
|
|
622
|
+
value for value in (start.get("event_id"), end.get("event_id"), spawn.get("event_id"))
|
|
623
|
+
if isinstance(value, str) and value
|
|
624
|
+
})
|
|
625
|
+
call_id = attrs["tool_call_id"]
|
|
626
|
+
digest = hashlib.sha256(
|
|
627
|
+
"|".join([session_id, call_id, target["id"], *supporting]).encode()
|
|
628
|
+
).hexdigest()[:24]
|
|
629
|
+
parent_tid = (spawn.get("attributes") or {}).get("spawn_origin_tid")
|
|
630
|
+
callback_tid = attrs.get("sdk_callback_tid")
|
|
631
|
+
derived.append({
|
|
632
|
+
"schema_version": SCHEMA_VERSION,
|
|
633
|
+
"event_id": f"inference:sdk-native-spawn:{digest}",
|
|
634
|
+
"session_id": session_id,
|
|
635
|
+
"timestamp": spawn["timestamp"],
|
|
636
|
+
"event_type": _EVENT_TYPE,
|
|
637
|
+
"relation": _RELATION,
|
|
638
|
+
"source": {
|
|
639
|
+
"type": "tool_call", "id": call_id,
|
|
640
|
+
"name": "SDK function span",
|
|
641
|
+
"attributes": {"sdk_trace_id": attrs.get("sdk_trace_id"),
|
|
642
|
+
"sdk_span_id": attrs["sdk_span_id"]},
|
|
643
|
+
},
|
|
644
|
+
"target": deepcopy(target),
|
|
645
|
+
"sequence": None,
|
|
646
|
+
"attributes": {
|
|
647
|
+
"backend": "inference",
|
|
648
|
+
"attribution": "execweave_correlation",
|
|
649
|
+
"evidence_source": "derived",
|
|
650
|
+
"inferred": True, "causal": False,
|
|
651
|
+
"process_effect_verified": False,
|
|
652
|
+
"inference_method": "unique_sdk_span_host_pid_native_spawn_window",
|
|
653
|
+
"confidence": 0.65,
|
|
654
|
+
"confidence_semantics": "heuristic_score_not_probability",
|
|
655
|
+
"candidate_count": 1,
|
|
656
|
+
"sdk_trace_id": attrs.get("sdk_trace_id"),
|
|
657
|
+
"sdk_span_id": attrs["sdk_span_id"],
|
|
658
|
+
"tool_call_id": call_id,
|
|
659
|
+
"sdk_host_pid": attrs["sdk_host_pid"],
|
|
660
|
+
"sdk_callback_tid": callback_tid,
|
|
661
|
+
"native_spawn_origin_tid": parent_tid,
|
|
662
|
+
"same_callback_and_spawn_tid": (
|
|
663
|
+
callback_tid == parent_tid
|
|
664
|
+
if isinstance(callback_tid, int) and isinstance(parent_tid, int)
|
|
665
|
+
else None
|
|
666
|
+
),
|
|
667
|
+
"max_window_ms": max_window_ms,
|
|
668
|
+
"supporting_event_ids": supporting,
|
|
669
|
+
"limitation": "SDK callback PID/time window is a claim, not an OS-verified tool context",
|
|
670
|
+
},
|
|
671
|
+
})
|
|
672
|
+
return derived, considered, skipped_no_match, skipped_ambiguous, len(derived)
|
|
673
|
+
|
|
674
|
+
|
|
486
675
|
def correlate_tool_process(
|
|
487
676
|
input_path: str | Path,
|
|
488
677
|
output_path: str | Path,
|
|
@@ -567,6 +756,15 @@ def correlate_tool_process(
|
|
|
567
756
|
)
|
|
568
757
|
)
|
|
569
758
|
|
|
759
|
+
sdk_derived, sdk_considered, sdk_missing, sdk_ambiguous, sdk_joined = (
|
|
760
|
+
_sdk_native_spawn_correlations(
|
|
761
|
+
events, session_id=session_id, max_window_ms=max_window_ms
|
|
762
|
+
)
|
|
763
|
+
)
|
|
764
|
+
derived.extend(sdk_derived)
|
|
765
|
+
skipped_no_match += sdk_missing
|
|
766
|
+
skipped_ambiguous += sdk_ambiguous
|
|
767
|
+
|
|
570
768
|
starts = [event for event in events if event.get("event_type") == "session.started"]
|
|
571
769
|
finishes = [event for event in events if event.get("event_type") == "session.finished"]
|
|
572
770
|
if len(starts) != 1 or len(finishes) != 1:
|
|
@@ -610,7 +808,7 @@ def correlate_tool_process(
|
|
|
610
808
|
session_id=session_id,
|
|
611
809
|
input_event_count=len(events),
|
|
612
810
|
output_event_count=len(correlated),
|
|
613
|
-
tool_calls_considered=len(declarations),
|
|
811
|
+
tool_calls_considered=len(declarations) + sdk_considered,
|
|
614
812
|
correlated_tool_calls=len(derived),
|
|
615
813
|
skipped_unsupported=skipped_unsupported,
|
|
616
814
|
skipped_no_match=skipped_no_match,
|
|
@@ -6,6 +6,7 @@ The module remains importable without the optional openai-agents package.
|
|
|
6
6
|
from __future__ import annotations
|
|
7
7
|
|
|
8
8
|
import hashlib
|
|
9
|
+
import os
|
|
9
10
|
import threading
|
|
10
11
|
from collections import Counter
|
|
11
12
|
from typing import Any
|
|
@@ -288,7 +289,11 @@ class AgentsSDKTraceProcessor(TracingProcessor):
|
|
|
288
289
|
call, owner, tool,
|
|
289
290
|
arguments=_safe(getattr(data, "input", None))
|
|
290
291
|
if self.capture_mode != "metadata_only" else None,
|
|
291
|
-
attributes={**self._identity(span),
|
|
292
|
+
attributes={**self._identity(span),
|
|
293
|
+
"effect_attestation": "not_provided",
|
|
294
|
+
"sdk_host_pid": os.getpid(),
|
|
295
|
+
"sdk_callback_tid": threading.get_native_id(),
|
|
296
|
+
"sdk_host_pid_source": "sdk_callback_self_report"},
|
|
292
297
|
))
|
|
293
298
|
|
|
294
299
|
def on_span_end(self, span: Any) -> None:
|
|
@@ -391,7 +396,10 @@ class AgentsSDKTraceProcessor(TracingProcessor):
|
|
|
391
396
|
self.context.record_tool_call(ToolCallRecord(
|
|
392
397
|
call, owner, tool, result=response,
|
|
393
398
|
status="failure" if failed else "result",
|
|
394
|
-
attributes={**evidence, "effect_attestation": "not_provided"
|
|
399
|
+
attributes={**evidence, "effect_attestation": "not_provided",
|
|
400
|
+
"sdk_host_pid": os.getpid(),
|
|
401
|
+
"sdk_callback_tid": threading.get_native_id(),
|
|
402
|
+
"sdk_host_pid_source": "sdk_callback_self_report"},
|
|
395
403
|
))
|
|
396
404
|
elif kind == "handoff" and not failed:
|
|
397
405
|
sender_name = getattr(data, "from_agent", None)
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
from __future__ import annotations
|
|
2
2
|
|
|
3
3
|
import ast
|
|
4
|
+
import math
|
|
4
5
|
import os
|
|
5
6
|
import re
|
|
6
7
|
import shutil
|
|
@@ -155,8 +156,91 @@ class StraceParser:
|
|
|
155
156
|
self._executable_by_pid: dict[int, str] = {}
|
|
156
157
|
self._cwd_by_pid: dict[int, Path] = {}
|
|
157
158
|
self._parent_by_pid: dict[int, int] = {}
|
|
159
|
+
# strace -ff uses TIDs as trace-file suffixes; CLONE_THREAD does not
|
|
160
|
+
# create another process. Keep thread identity distinct from process.
|
|
161
|
+
# Identity mappings are lifetime-bounded: Linux may reuse a TID after
|
|
162
|
+
# a thread exits. An all-session TID map can misattribute later files
|
|
163
|
+
# and creates false grade-A native process edges.
|
|
164
|
+
self._thread_lifetimes: dict[int, list[tuple[float, float, int]]] = {}
|
|
165
|
+
self._uncertain_lifetimes: dict[int, list[tuple[float, float]]] = {}
|
|
166
|
+
self._record_timestamp = float("-inf")
|
|
167
|
+
self._spawn_origin_tid: dict[int, int] = {}
|
|
168
|
+
|
|
169
|
+
def _process_pid(self, tid: int, timestamp: float | None = None) -> int:
|
|
170
|
+
"""Resolve a TID to its TGID only within an observed thread lifetime."""
|
|
171
|
+
at = self._record_timestamp if timestamp is None else timestamp
|
|
172
|
+
seen: set[int] = set()
|
|
173
|
+
while tid not in seen:
|
|
174
|
+
seen.add(tid)
|
|
175
|
+
lifetimes = self._thread_lifetimes.get(tid, [])
|
|
176
|
+
active = [(born, parent) for born, until, parent in lifetimes
|
|
177
|
+
if born <= at <= until]
|
|
178
|
+
if len(active) != 1:
|
|
179
|
+
break
|
|
180
|
+
tid = active[0][1]
|
|
181
|
+
return tid
|
|
182
|
+
|
|
183
|
+
def _is_thread_at(self, tid: int, timestamp: float) -> bool:
|
|
184
|
+
return any(start <= timestamp <= end for start, end, _
|
|
185
|
+
in self._thread_lifetimes.get(tid, []))
|
|
186
|
+
|
|
187
|
+
def _is_uncertain_at(self, tid: int, timestamp: float) -> bool:
|
|
188
|
+
return any(start <= timestamp <= end for start, end
|
|
189
|
+
in self._uncertain_lifetimes.get(tid, []))
|
|
190
|
+
|
|
191
|
+
@staticmethod
|
|
192
|
+
def _clone_kind(name: str, args: str) -> str:
|
|
193
|
+
"""Return thread, process or unknown without assuming undocumented flags."""
|
|
194
|
+
if name in {"fork", "vfork"}:
|
|
195
|
+
return "process"
|
|
196
|
+
if name not in {"clone", "clone3"}:
|
|
197
|
+
return "unknown"
|
|
198
|
+
# strace normally renders flags symbolically, but numeric kernel flag
|
|
199
|
+
# words also occur. CLONE_THREAD is bit 0x10000 in Linux clone flags.
|
|
200
|
+
match = re.search(r"\bflags\s*=\s*([^,}\s)]+)", args)
|
|
201
|
+
if not match:
|
|
202
|
+
return "unknown"
|
|
203
|
+
flags = match.group(1)
|
|
204
|
+
bits = 0
|
|
205
|
+
parts = flags.split("|")
|
|
206
|
+
for part in parts:
|
|
207
|
+
if part == "CLONE_THREAD":
|
|
208
|
+
return "thread"
|
|
209
|
+
if part.startswith(("0x", "0X", "0o", "0O", "0b", "0B")) or part.isdigit():
|
|
210
|
+
try:
|
|
211
|
+
bits |= int(part, 0)
|
|
212
|
+
except ValueError:
|
|
213
|
+
return "unknown"
|
|
214
|
+
elif part.startswith(("CLONE_", "SIG")):
|
|
215
|
+
continue
|
|
216
|
+
else:
|
|
217
|
+
return "unknown"
|
|
218
|
+
return "thread" if bits & 0x10000 else "process"
|
|
219
|
+
|
|
220
|
+
@classmethod
|
|
221
|
+
def _is_thread_clone(cls, name: str, args: str) -> bool:
|
|
222
|
+
return cls._clone_kind(name, args) == "thread"
|
|
223
|
+
|
|
224
|
+
def _uncertain_entity(self, tid: int) -> Entity:
|
|
225
|
+
return Entity(
|
|
226
|
+
type="unclassified_task",
|
|
227
|
+
id=f"unclassified-task:{self.session_id}:{tid}",
|
|
228
|
+
name=str(tid),
|
|
229
|
+
attributes={"tid": tid, "classification": "unknown",
|
|
230
|
+
"backend": "strace"},
|
|
231
|
+
)
|
|
232
|
+
|
|
233
|
+
def _thread_entity(self, tid: int) -> Entity:
|
|
234
|
+
leader = self._process_pid(tid)
|
|
235
|
+
return Entity(
|
|
236
|
+
type="thread", id=f"thread:{self.session_id}:{tid}", name=str(tid),
|
|
237
|
+
attributes={"tid": tid, "tgid": leader, "backend": "strace"},
|
|
238
|
+
)
|
|
158
239
|
|
|
159
240
|
def process_entity(self, pid: int) -> Entity:
|
|
241
|
+
if self._is_uncertain_at(pid, self._record_timestamp):
|
|
242
|
+
return self._uncertain_entity(pid)
|
|
243
|
+
pid = self._process_pid(pid)
|
|
160
244
|
return Entity(
|
|
161
245
|
type="process",
|
|
162
246
|
id=f"process:{self.session_id}:{pid}",
|
|
@@ -176,21 +260,64 @@ class StraceParser:
|
|
|
176
260
|
self._parse_record(record)
|
|
177
261
|
|
|
178
262
|
def _index_process_parents(self, records: Iterable[TraceRecord]) -> None:
|
|
179
|
-
"""
|
|
263
|
+
"""Pre-index thread lifetimes and native parents before timestamp ties.
|
|
180
264
|
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
for a session root. The parent index makes process identity independent of
|
|
184
|
-
cross-file ordering at equal timestamps.
|
|
265
|
+
A traced TID can later be reused as a real child process. Time-bounded
|
|
266
|
+
identities prevent a stale thread map from claiming the new child.
|
|
185
267
|
"""
|
|
186
|
-
|
|
268
|
+
materialized = sorted(records, key=lambda r: (r.timestamp, r.pid))
|
|
269
|
+
births: dict[int, list[float]] = {}
|
|
270
|
+
thread_starts: list[tuple[int, float, int]] = []
|
|
271
|
+
uncertain_starts: list[tuple[int, float]] = []
|
|
272
|
+
real_starts: list[tuple[int, float, int]] = []
|
|
273
|
+
exits: dict[int, list[float]] = {}
|
|
274
|
+
for record in materialized:
|
|
275
|
+
if _EXIT_RE.match(record.body) or _KILLED_RE.match(record.body):
|
|
276
|
+
exits.setdefault(record.pid, []).append(record.timestamp)
|
|
277
|
+
continue
|
|
187
278
|
syscall = _SYSCALL_RE.match(record.body)
|
|
188
|
-
if syscall is None
|
|
279
|
+
if syscall is None:
|
|
280
|
+
continue
|
|
281
|
+
name = syscall.group("name")
|
|
282
|
+
if name not in {"clone", "clone3", "fork", "vfork"}:
|
|
189
283
|
continue
|
|
190
284
|
child_match = _CLONE_RESULT_RE.match(syscall.group("result"))
|
|
191
285
|
if child_match is None:
|
|
192
286
|
continue
|
|
193
|
-
|
|
287
|
+
child = int(child_match.group("pid"))
|
|
288
|
+
births.setdefault(child, []).append(record.timestamp)
|
|
289
|
+
kind = self._clone_kind(name, syscall.group("args"))
|
|
290
|
+
if kind == "thread":
|
|
291
|
+
thread_starts.append((child, record.timestamp, record.pid))
|
|
292
|
+
elif kind == "process":
|
|
293
|
+
real_starts.append((child, record.timestamp, record.pid))
|
|
294
|
+
else:
|
|
295
|
+
uncertain_starts.append((child, record.timestamp))
|
|
296
|
+
|
|
297
|
+
def limit_for(tid: int, born: float) -> float:
|
|
298
|
+
# A later successful clone that returns the same TID proves the
|
|
299
|
+
# prior instance has ended even if its exit trace was lost.
|
|
300
|
+
future_births = [t for t in births.get(tid, []) if t > born]
|
|
301
|
+
cutoff = min(future_births) if future_births else float("inf")
|
|
302
|
+
possible_exits = [t for t in exits.get(tid, [])
|
|
303
|
+
if born <= t < cutoff]
|
|
304
|
+
if possible_exits:
|
|
305
|
+
return min(possible_exits)
|
|
306
|
+
if cutoff < float("inf"):
|
|
307
|
+
return math.nextafter(cutoff, float("-inf"))
|
|
308
|
+
return cutoff
|
|
309
|
+
|
|
310
|
+
for tid, born, parent_tid in thread_starts:
|
|
311
|
+
self._thread_lifetimes.setdefault(tid, []).append(
|
|
312
|
+
(born, limit_for(tid, born), parent_tid)
|
|
313
|
+
)
|
|
314
|
+
for tid, born in uncertain_starts:
|
|
315
|
+
self._uncertain_lifetimes.setdefault(tid, []).append(
|
|
316
|
+
(born, limit_for(tid, born))
|
|
317
|
+
)
|
|
318
|
+
for child, timestamp, parent_tid in real_starts:
|
|
319
|
+
self._parent_by_pid[child] = self._process_pid(parent_tid, timestamp)
|
|
320
|
+
self._spawn_origin_tid[child] = parent_tid
|
|
194
321
|
|
|
195
322
|
def _ensure_process(
|
|
196
323
|
self,
|
|
@@ -200,6 +327,11 @@ class StraceParser:
|
|
|
200
327
|
parent_pid: int | None = None,
|
|
201
328
|
relation: str | None = None,
|
|
202
329
|
) -> None:
|
|
330
|
+
if self._is_uncertain_at(pid, timestamp):
|
|
331
|
+
return
|
|
332
|
+
pid = self._process_pid(pid, timestamp)
|
|
333
|
+
if parent_pid is not None:
|
|
334
|
+
parent_pid = self._process_pid(parent_pid)
|
|
203
335
|
if pid in self._known_processes:
|
|
204
336
|
return
|
|
205
337
|
if parent_pid is None:
|
|
@@ -223,13 +355,22 @@ class StraceParser:
|
|
|
223
355
|
"attribution": "syscall",
|
|
224
356
|
"causal": True,
|
|
225
357
|
"backend": "strace",
|
|
358
|
+
"spawn_origin_tid": self._spawn_origin_tid.get(pid),
|
|
226
359
|
},
|
|
227
360
|
)
|
|
228
361
|
)
|
|
229
362
|
|
|
230
363
|
def _parse_record(self, record: TraceRecord) -> None:
|
|
364
|
+
self._record_timestamp = record.timestamp
|
|
231
365
|
exit_match = _EXIT_RE.match(record.body)
|
|
232
366
|
if exit_match is not None:
|
|
367
|
+
self._record_timestamp = record.timestamp
|
|
368
|
+
if self._is_uncertain_at(record.pid, record.timestamp):
|
|
369
|
+
self._emit_uncertain_exit(record)
|
|
370
|
+
return
|
|
371
|
+
if self._is_thread_at(record.pid, record.timestamp):
|
|
372
|
+
self._emit_thread_exit(record, exit_code=int(exit_match.group("code")))
|
|
373
|
+
return
|
|
233
374
|
self._ensure_process(record.pid, record.timestamp)
|
|
234
375
|
self.sink.emit(
|
|
235
376
|
RuntimeEvent.create(
|
|
@@ -248,6 +389,13 @@ class StraceParser:
|
|
|
248
389
|
|
|
249
390
|
killed_match = _KILLED_RE.match(record.body)
|
|
250
391
|
if killed_match is not None:
|
|
392
|
+
self._record_timestamp = record.timestamp
|
|
393
|
+
if self._is_uncertain_at(record.pid, record.timestamp):
|
|
394
|
+
self._emit_uncertain_exit(record)
|
|
395
|
+
return
|
|
396
|
+
if self._is_thread_at(record.pid, record.timestamp):
|
|
397
|
+
self._emit_thread_exit(record, signal=killed_match.group("signal"))
|
|
398
|
+
return
|
|
251
399
|
self._ensure_process(record.pid, record.timestamp)
|
|
252
400
|
self.sink.emit(
|
|
253
401
|
RuntimeEvent.create(
|
|
@@ -273,7 +421,7 @@ class StraceParser:
|
|
|
273
421
|
self._ensure_process(record.pid, record.timestamp)
|
|
274
422
|
|
|
275
423
|
if name in {"clone", "clone3", "fork", "vfork"}:
|
|
276
|
-
self._parse_process_spawn(record, result)
|
|
424
|
+
self._parse_process_spawn(record, name, args, result)
|
|
277
425
|
elif name in {"execve", "execveat"}:
|
|
278
426
|
self._parse_exec(record, name, args, result)
|
|
279
427
|
elif name == "chdir":
|
|
@@ -289,15 +437,69 @@ class StraceParser:
|
|
|
289
437
|
elif name == "connect":
|
|
290
438
|
self._parse_connect(record, args, result)
|
|
291
439
|
|
|
292
|
-
def
|
|
440
|
+
def _emit_uncertain_exit(self, record: TraceRecord) -> None:
|
|
441
|
+
self.sink.emit(RuntimeEvent.create(
|
|
442
|
+
session_id=self.session_id, event_type="task.exited",
|
|
443
|
+
relation="UNCLASSIFIED_TASK_EXITED",
|
|
444
|
+
source=self._uncertain_entity(record.pid),
|
|
445
|
+
timestamp=_iso_timestamp(record.timestamp),
|
|
446
|
+
attributes={"backend": "strace", "classification": "unknown",
|
|
447
|
+
"causal": False, "attribution": "syscall"},
|
|
448
|
+
))
|
|
449
|
+
|
|
450
|
+
def _emit_thread_exit(
|
|
451
|
+
self, record: TraceRecord, *, exit_code: int | None = None,
|
|
452
|
+
signal: str | None = None,
|
|
453
|
+
) -> None:
|
|
454
|
+
self.sink.emit(RuntimeEvent.create(
|
|
455
|
+
session_id=self.session_id, event_type="thread.exited",
|
|
456
|
+
relation="EXITED_THREAD" if signal is None else "THREAD_KILLED_BY",
|
|
457
|
+
source=self._thread_entity(record.pid),
|
|
458
|
+
timestamp=_iso_timestamp(record.timestamp),
|
|
459
|
+
attributes={"exit_code": exit_code, "signal": signal,
|
|
460
|
+
"attribution": "syscall", "backend": "strace"},
|
|
461
|
+
))
|
|
462
|
+
|
|
463
|
+
def _parse_process_spawn(
|
|
464
|
+
self, record: TraceRecord, name: str, args: str, result: str
|
|
465
|
+
) -> None:
|
|
293
466
|
child_match = _CLONE_RESULT_RE.match(result)
|
|
294
467
|
if child_match is None:
|
|
295
468
|
return
|
|
296
469
|
child_pid = int(child_match.group("pid"))
|
|
470
|
+
kind = self._clone_kind(name, args)
|
|
471
|
+
if kind == "unknown":
|
|
472
|
+
# The syscall return exposes a task ID, but without readable
|
|
473
|
+
# clone flags the OS has not established process-vs-thread kind.
|
|
474
|
+
# Do not emit a native process SPAWNED or an A-grade ancestry edge.
|
|
475
|
+
self.sink.emit(RuntimeEvent.create(
|
|
476
|
+
session_id=self.session_id, event_type="task.started",
|
|
477
|
+
relation="CLONE_KIND_UNRESOLVED",
|
|
478
|
+
source=self.process_entity(record.pid),
|
|
479
|
+
target=self._uncertain_entity(child_pid),
|
|
480
|
+
timestamp=_iso_timestamp(record.timestamp),
|
|
481
|
+
attributes={"syscall": name, "backend": "strace",
|
|
482
|
+
"attribution": "syscall", "causal": False,
|
|
483
|
+
"classification": "unknown"},
|
|
484
|
+
))
|
|
485
|
+
return
|
|
486
|
+
if kind == "thread":
|
|
487
|
+
# CLONE_THREAD creates a task/TID in the same thread group, not a
|
|
488
|
+
# new process. Retain the observed thread without inventing SPAWNED.
|
|
489
|
+
self.sink.emit(RuntimeEvent.create(
|
|
490
|
+
session_id=self.session_id, event_type="thread.started",
|
|
491
|
+
relation="STARTED_THREAD",
|
|
492
|
+
source=self.process_entity(record.pid),
|
|
493
|
+
target=self._thread_entity(child_pid),
|
|
494
|
+
timestamp=_iso_timestamp(record.timestamp),
|
|
495
|
+
attributes={"syscall": name, "attribution": "syscall",
|
|
496
|
+
"causal": True, "backend": "strace"},
|
|
497
|
+
))
|
|
498
|
+
return
|
|
297
499
|
self._ensure_process(
|
|
298
500
|
child_pid,
|
|
299
501
|
record.timestamp,
|
|
300
|
-
parent_pid=record.pid,
|
|
502
|
+
parent_pid=self._process_pid(record.pid),
|
|
301
503
|
relation="SPAWNED",
|
|
302
504
|
)
|
|
303
505
|
|
|
@@ -309,7 +511,7 @@ class StraceParser:
|
|
|
309
511
|
return
|
|
310
512
|
executable = quoted[0]
|
|
311
513
|
target_path = self._resolve_path(record.pid, executable)
|
|
312
|
-
self._executable_by_pid[record.pid] = target_path.name
|
|
514
|
+
self._executable_by_pid[self._process_pid(record.pid)] = target_path.name
|
|
313
515
|
target = Entity(
|
|
314
516
|
type="executable",
|
|
315
517
|
id=f"executable:{target_path}",
|
|
@@ -340,7 +542,7 @@ class StraceParser:
|
|
|
340
542
|
if not quoted:
|
|
341
543
|
return
|
|
342
544
|
new_cwd = self._resolve_path(record.pid, quoted[0])
|
|
343
|
-
self._cwd_by_pid[record.pid] = new_cwd
|
|
545
|
+
self._cwd_by_pid[self._process_pid(record.pid)] = new_cwd
|
|
344
546
|
target = Entity(
|
|
345
547
|
type="directory",
|
|
346
548
|
id=f"directory:{new_cwd}",
|
|
@@ -560,7 +762,7 @@ class StraceParser:
|
|
|
560
762
|
path = Path(raw_path).expanduser()
|
|
561
763
|
if path.is_absolute():
|
|
562
764
|
return path.resolve(strict=False)
|
|
563
|
-
cwd = self._cwd_by_pid.get(pid, self.watch_root)
|
|
765
|
+
cwd = self._cwd_by_pid.get(self._process_pid(pid), self.watch_root)
|
|
564
766
|
return (cwd / path).resolve(strict=False)
|
|
565
767
|
|
|
566
768
|
def _within_watch_root(self, path: Path) -> bool:
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{execweave-0.8.38 → execweave-0.8.39}/src/execweave/antigravity_full_fidelity_collaboration_base.py
RENAMED
|
File without changes
|