execweave 0.6.5__tar.gz → 0.6.6__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-0.6.5 → execweave-0.6.6}/PKG-INFO +1 -1
- {execweave-0.6.5 → execweave-0.6.6}/pyproject.toml +1 -1
- {execweave-0.6.5 → execweave-0.6.6}/src/execweave/__init__.py +1 -1
- execweave-0.6.6/src/execweave/agent_bootstrap.py +288 -0
- {execweave-0.6.5 → execweave-0.6.6}/src/execweave/claude_hook_cli.py +13 -0
- execweave-0.6.6/src/execweave/claude_model_observer.py +353 -0
- {execweave-0.6.5 → execweave-0.6.6}/src/execweave/codex_hook_cli.py +7 -0
- {execweave-0.6.5 → execweave-0.6.6}/src/execweave/codex_record.py +3 -3
- {execweave-0.6.5 → execweave-0.6.6}/src/execweave/cursor_hook_cli.py +4 -0
- execweave-0.6.6/src/execweave/entry.py +81 -0
- {execweave-0.6.5 → execweave-0.6.6}/src/execweave/gemini_hook_cli.py +4 -0
- {execweave-0.6.5 → execweave-0.6.6}/src/execweave/graph.py +11 -1
- execweave-0.6.6/src/execweave/live.py +186 -0
- execweave-0.6.6/src/execweave/live_view.py +64 -0
- execweave-0.6.6/src/execweave/live_view_extra_style.py +10 -0
- execweave-0.6.6/src/execweave/live_view_markup.py +29 -0
- execweave-0.6.6/src/execweave/live_view_script_a.py +44 -0
- execweave-0.6.6/src/execweave/live_view_script_b.py +19 -0
- execweave-0.6.6/src/execweave/live_view_script_c.py +17 -0
- execweave-0.6.6/src/execweave/live_view_script_d.py +47 -0
- execweave-0.6.6/src/execweave/live_view_style.py +33 -0
- {execweave-0.6.5 → execweave-0.6.6}/src/execweave/opencode_hook_cli.py +4 -0
- {execweave-0.6.5 → execweave-0.6.6}/src/execweave/opencode_plugin_cli.py +5 -2
- execweave-0.6.6/src/execweave/provider_lifecycle.py +167 -0
- {execweave-0.6.5 → execweave-0.6.6}/src/execweave/provider_record.py +12 -5
- {execweave-0.6.5 → execweave-0.6.6}/src/execweave/view_cli.py +1 -1
- execweave-0.6.6/src/execweave/viewer_content_inspector.py +196 -0
- execweave-0.6.6/src/execweave/viewer_projection.py +310 -0
- {execweave-0.6.5 → execweave-0.6.6}/src/execweave/workflow.py +1 -1
- execweave-0.6.6/tests/test_agent_bootstrap.py +274 -0
- execweave-0.6.6/tests/test_claude_model_observer.py +393 -0
- execweave-0.6.6/tests/test_live_dashboard.py +31 -0
- execweave-0.6.6/tests/test_live_dashboard_js.py +48 -0
- execweave-0.6.6/tests/test_live_logs_export.py +90 -0
- execweave-0.6.6/tests/test_provider_lifecycle.py +239 -0
- execweave-0.6.6/tests/test_viewer_content_inspector.py +178 -0
- execweave-0.6.6/tests/test_viewer_projection.py +334 -0
- execweave-0.6.5/src/execweave/entry.py +0 -18
- execweave-0.6.5/src/execweave/live_view.py +0 -79
- {execweave-0.6.5 → execweave-0.6.6}/.github/workflows/ci.yml +0 -0
- {execweave-0.6.5 → execweave-0.6.6}/.github/workflows/i18n.yml +0 -0
- {execweave-0.6.5 → execweave-0.6.6}/.github/workflows/package-benchmark.yml +0 -0
- {execweave-0.6.5 → execweave-0.6.6}/.github/workflows/package-smoke.yml +0 -0
- {execweave-0.6.5 → execweave-0.6.6}/.github/workflows/publish.yml +0 -0
- {execweave-0.6.5 → execweave-0.6.6}/.github/workflows/scalability.yml +0 -0
- {execweave-0.6.5 → execweave-0.6.6}/.github/workflows/wheel-smoke.yml +0 -0
- {execweave-0.6.5 → execweave-0.6.6}/.github/workflows/windows-launcher.yml +0 -0
- {execweave-0.6.5 → execweave-0.6.6}/.gitignore +0 -0
- {execweave-0.6.5 → execweave-0.6.6}/LICENSE +0 -0
- {execweave-0.6.5 → execweave-0.6.6}/README.de.md +0 -0
- {execweave-0.6.5 → execweave-0.6.6}/README.fr.md +0 -0
- {execweave-0.6.5 → execweave-0.6.6}/README.ja.md +0 -0
- {execweave-0.6.5 → execweave-0.6.6}/README.ko.md +0 -0
- {execweave-0.6.5 → execweave-0.6.6}/README.md +0 -0
- {execweave-0.6.5 → execweave-0.6.6}/README.ru.md +0 -0
- {execweave-0.6.5 → execweave-0.6.6}/README.zh-CN.md +0 -0
- {execweave-0.6.5 → execweave-0.6.6}/README.zh-TW.md +0 -0
- {execweave-0.6.5 → execweave-0.6.6}/benchmarks/phase1_overhead.py +0 -0
- {execweave-0.6.5 → execweave-0.6.6}/docs/assets/execweave-launch-demo-v5-x.gif +0 -0
- {execweave-0.6.5 → execweave-0.6.6}/docs/benchmarks/README.md +0 -0
- {execweave-0.6.5 → execweave-0.6.6}/docs/benchmarks/v0.6.0-github-actions.json +0 -0
- {execweave-0.6.5 → execweave-0.6.6}/docs/benchmarks/v0.6.0-github-actions.svg +0 -0
- {execweave-0.6.5 → execweave-0.6.6}/docs/claude-code-hooks.de.md +0 -0
- {execweave-0.6.5 → execweave-0.6.6}/docs/claude-code-hooks.fr.md +0 -0
- {execweave-0.6.5 → execweave-0.6.6}/docs/claude-code-hooks.ja.md +0 -0
- {execweave-0.6.5 → execweave-0.6.6}/docs/claude-code-hooks.ko.md +0 -0
- {execweave-0.6.5 → execweave-0.6.6}/docs/claude-code-hooks.md +0 -0
- {execweave-0.6.5 → execweave-0.6.6}/docs/claude-code-hooks.ru.md +0 -0
- {execweave-0.6.5 → execweave-0.6.6}/docs/claude-code-hooks.zh-CN.md +0 -0
- {execweave-0.6.5 → execweave-0.6.6}/docs/claude-code-hooks.zh-TW.md +0 -0
- {execweave-0.6.5 → execweave-0.6.6}/docs/codex-hooks.de.md +0 -0
- {execweave-0.6.5 → execweave-0.6.6}/docs/codex-hooks.fr.md +0 -0
- {execweave-0.6.5 → execweave-0.6.6}/docs/codex-hooks.ja.md +0 -0
- {execweave-0.6.5 → execweave-0.6.6}/docs/codex-hooks.ko.md +0 -0
- {execweave-0.6.5 → execweave-0.6.6}/docs/codex-hooks.md +0 -0
- {execweave-0.6.5 → execweave-0.6.6}/docs/codex-hooks.ru.md +0 -0
- {execweave-0.6.5 → execweave-0.6.6}/docs/codex-hooks.zh-CN.md +0 -0
- {execweave-0.6.5 → execweave-0.6.6}/docs/codex-hooks.zh-TW.md +0 -0
- {execweave-0.6.5 → execweave-0.6.6}/docs/cursor-hooks.de.md +0 -0
- {execweave-0.6.5 → execweave-0.6.6}/docs/cursor-hooks.fr.md +0 -0
- {execweave-0.6.5 → execweave-0.6.6}/docs/cursor-hooks.ja.md +0 -0
- {execweave-0.6.5 → execweave-0.6.6}/docs/cursor-hooks.ko.md +0 -0
- {execweave-0.6.5 → execweave-0.6.6}/docs/cursor-hooks.md +0 -0
- {execweave-0.6.5 → execweave-0.6.6}/docs/cursor-hooks.ru.md +0 -0
- {execweave-0.6.5 → execweave-0.6.6}/docs/cursor-hooks.zh-CN.md +0 -0
- {execweave-0.6.5 → execweave-0.6.6}/docs/cursor-hooks.zh-TW.md +0 -0
- {execweave-0.6.5 → execweave-0.6.6}/docs/evidence-grades.de.md +0 -0
- {execweave-0.6.5 → execweave-0.6.6}/docs/evidence-grades.fr.md +0 -0
- {execweave-0.6.5 → execweave-0.6.6}/docs/evidence-grades.ja.md +0 -0
- {execweave-0.6.5 → execweave-0.6.6}/docs/evidence-grades.ko.md +0 -0
- {execweave-0.6.5 → execweave-0.6.6}/docs/evidence-grades.md +0 -0
- {execweave-0.6.5 → execweave-0.6.6}/docs/evidence-grades.ru.md +0 -0
- {execweave-0.6.5 → execweave-0.6.6}/docs/evidence-grades.zh-CN.md +0 -0
- {execweave-0.6.5 → execweave-0.6.6}/docs/evidence-grades.zh-TW.md +0 -0
- {execweave-0.6.5 → execweave-0.6.6}/docs/gemini-hooks.de.md +0 -0
- {execweave-0.6.5 → execweave-0.6.6}/docs/gemini-hooks.fr.md +0 -0
- {execweave-0.6.5 → execweave-0.6.6}/docs/gemini-hooks.ja.md +0 -0
- {execweave-0.6.5 → execweave-0.6.6}/docs/gemini-hooks.ko.md +0 -0
- {execweave-0.6.5 → execweave-0.6.6}/docs/gemini-hooks.md +0 -0
- {execweave-0.6.5 → execweave-0.6.6}/docs/gemini-hooks.ru.md +0 -0
- {execweave-0.6.5 → execweave-0.6.6}/docs/gemini-hooks.zh-CN.md +0 -0
- {execweave-0.6.5 → execweave-0.6.6}/docs/gemini-hooks.zh-TW.md +0 -0
- {execweave-0.6.5 → execweave-0.6.6}/docs/inference-gateway.de.md +0 -0
- {execweave-0.6.5 → execweave-0.6.6}/docs/inference-gateway.fr.md +0 -0
- {execweave-0.6.5 → execweave-0.6.6}/docs/inference-gateway.ja.md +0 -0
- {execweave-0.6.5 → execweave-0.6.6}/docs/inference-gateway.ko.md +0 -0
- {execweave-0.6.5 → execweave-0.6.6}/docs/inference-gateway.md +0 -0
- {execweave-0.6.5 → execweave-0.6.6}/docs/inference-gateway.ru.md +0 -0
- {execweave-0.6.5 → execweave-0.6.6}/docs/inference-gateway.zh-CN.md +0 -0
- {execweave-0.6.5 → execweave-0.6.6}/docs/inference-gateway.zh-TW.md +0 -0
- {execweave-0.6.5 → execweave-0.6.6}/docs/live-graph.de.md +0 -0
- {execweave-0.6.5 → execweave-0.6.6}/docs/live-graph.fr.md +0 -0
- {execweave-0.6.5 → execweave-0.6.6}/docs/live-graph.ja.md +0 -0
- {execweave-0.6.5 → execweave-0.6.6}/docs/live-graph.ko.md +0 -0
- {execweave-0.6.5 → execweave-0.6.6}/docs/live-graph.md +0 -0
- {execweave-0.6.5 → execweave-0.6.6}/docs/live-graph.ru.md +0 -0
- {execweave-0.6.5 → execweave-0.6.6}/docs/live-graph.zh-CN.md +0 -0
- {execweave-0.6.5 → execweave-0.6.6}/docs/live-graph.zh-TW.md +0 -0
- {execweave-0.6.5 → execweave-0.6.6}/docs/model-runtime.de.md +0 -0
- {execweave-0.6.5 → execweave-0.6.6}/docs/model-runtime.fr.md +0 -0
- {execweave-0.6.5 → execweave-0.6.6}/docs/model-runtime.ja.md +0 -0
- {execweave-0.6.5 → execweave-0.6.6}/docs/model-runtime.ko.md +0 -0
- {execweave-0.6.5 → execweave-0.6.6}/docs/model-runtime.md +0 -0
- {execweave-0.6.5 → execweave-0.6.6}/docs/model-runtime.ru.md +0 -0
- {execweave-0.6.5 → execweave-0.6.6}/docs/model-runtime.zh-CN.md +0 -0
- {execweave-0.6.5 → execweave-0.6.6}/docs/model-runtime.zh-TW.md +0 -0
- {execweave-0.6.5 → execweave-0.6.6}/docs/opencode-plugin.de.md +0 -0
- {execweave-0.6.5 → execweave-0.6.6}/docs/opencode-plugin.fr.md +0 -0
- {execweave-0.6.5 → execweave-0.6.6}/docs/opencode-plugin.ja.md +0 -0
- {execweave-0.6.5 → execweave-0.6.6}/docs/opencode-plugin.ko.md +0 -0
- {execweave-0.6.5 → execweave-0.6.6}/docs/opencode-plugin.md +0 -0
- {execweave-0.6.5 → execweave-0.6.6}/docs/opencode-plugin.ru.md +0 -0
- {execweave-0.6.5 → execweave-0.6.6}/docs/opencode-plugin.zh-CN.md +0 -0
- {execweave-0.6.5 → execweave-0.6.6}/docs/opencode-plugin.zh-TW.md +0 -0
- {execweave-0.6.5 → execweave-0.6.6}/docs/phase-1-runtime-collection.de.md +0 -0
- {execweave-0.6.5 → execweave-0.6.6}/docs/phase-1-runtime-collection.fr.md +0 -0
- {execweave-0.6.5 → execweave-0.6.6}/docs/phase-1-runtime-collection.ja.md +0 -0
- {execweave-0.6.5 → execweave-0.6.6}/docs/phase-1-runtime-collection.ko.md +0 -0
- {execweave-0.6.5 → execweave-0.6.6}/docs/phase-1-runtime-collection.md +0 -0
- {execweave-0.6.5 → execweave-0.6.6}/docs/phase-1-runtime-collection.ru.md +0 -0
- {execweave-0.6.5 → execweave-0.6.6}/docs/phase-1-runtime-collection.zh-CN.md +0 -0
- {execweave-0.6.5 → execweave-0.6.6}/docs/phase-1-runtime-collection.zh-TW.md +0 -0
- {execweave-0.6.5 → execweave-0.6.6}/docs/phase-2-execution-graph.de.md +0 -0
- {execweave-0.6.5 → execweave-0.6.6}/docs/phase-2-execution-graph.fr.md +0 -0
- {execweave-0.6.5 → execweave-0.6.6}/docs/phase-2-execution-graph.ja.md +0 -0
- {execweave-0.6.5 → execweave-0.6.6}/docs/phase-2-execution-graph.ko.md +0 -0
- {execweave-0.6.5 → execweave-0.6.6}/docs/phase-2-execution-graph.md +0 -0
- {execweave-0.6.5 → execweave-0.6.6}/docs/phase-2-execution-graph.ru.md +0 -0
- {execweave-0.6.5 → execweave-0.6.6}/docs/phase-2-execution-graph.zh-CN.md +0 -0
- {execweave-0.6.5 → execweave-0.6.6}/docs/phase-2-execution-graph.zh-TW.md +0 -0
- {execweave-0.6.5 → execweave-0.6.6}/docs/rule-packs.de.md +0 -0
- {execweave-0.6.5 → execweave-0.6.6}/docs/rule-packs.fr.md +0 -0
- {execweave-0.6.5 → execweave-0.6.6}/docs/rule-packs.ja.md +0 -0
- {execweave-0.6.5 → execweave-0.6.6}/docs/rule-packs.ko.md +0 -0
- {execweave-0.6.5 → execweave-0.6.6}/docs/rule-packs.md +0 -0
- {execweave-0.6.5 → execweave-0.6.6}/docs/rule-packs.ru.md +0 -0
- {execweave-0.6.5 → execweave-0.6.6}/docs/rule-packs.zh-CN.md +0 -0
- {execweave-0.6.5 → execweave-0.6.6}/docs/rule-packs.zh-TW.md +0 -0
- {execweave-0.6.5 → execweave-0.6.6}/docs/run-integrity.de.md +0 -0
- {execweave-0.6.5 → execweave-0.6.6}/docs/run-integrity.fr.md +0 -0
- {execweave-0.6.5 → execweave-0.6.6}/docs/run-integrity.ja.md +0 -0
- {execweave-0.6.5 → execweave-0.6.6}/docs/run-integrity.ko.md +0 -0
- {execweave-0.6.5 → execweave-0.6.6}/docs/run-integrity.md +0 -0
- {execweave-0.6.5 → execweave-0.6.6}/docs/run-integrity.ru.md +0 -0
- {execweave-0.6.5 → execweave-0.6.6}/docs/run-integrity.zh-CN.md +0 -0
- {execweave-0.6.5 → execweave-0.6.6}/docs/run-integrity.zh-TW.md +0 -0
- {execweave-0.6.5 → execweave-0.6.6}/docs/runtime-threat-model.de.md +0 -0
- {execweave-0.6.5 → execweave-0.6.6}/docs/runtime-threat-model.fr.md +0 -0
- {execweave-0.6.5 → execweave-0.6.6}/docs/runtime-threat-model.ja.md +0 -0
- {execweave-0.6.5 → execweave-0.6.6}/docs/runtime-threat-model.ko.md +0 -0
- {execweave-0.6.5 → execweave-0.6.6}/docs/runtime-threat-model.md +0 -0
- {execweave-0.6.5 → execweave-0.6.6}/docs/runtime-threat-model.ru.md +0 -0
- {execweave-0.6.5 → execweave-0.6.6}/docs/runtime-threat-model.zh-CN.md +0 -0
- {execweave-0.6.5 → execweave-0.6.6}/docs/runtime-threat-model.zh-TW.md +0 -0
- {execweave-0.6.5 → execweave-0.6.6}/docs/security-analysis.de.md +0 -0
- {execweave-0.6.5 → execweave-0.6.6}/docs/security-analysis.fr.md +0 -0
- {execweave-0.6.5 → execweave-0.6.6}/docs/security-analysis.ja.md +0 -0
- {execweave-0.6.5 → execweave-0.6.6}/docs/security-analysis.ko.md +0 -0
- {execweave-0.6.5 → execweave-0.6.6}/docs/security-analysis.md +0 -0
- {execweave-0.6.5 → execweave-0.6.6}/docs/security-analysis.ru.md +0 -0
- {execweave-0.6.5 → execweave-0.6.6}/docs/security-analysis.zh-CN.md +0 -0
- {execweave-0.6.5 → execweave-0.6.6}/docs/security-analysis.zh-TW.md +0 -0
- {execweave-0.6.5 → execweave-0.6.6}/docs/semantic-telemetry.de.md +0 -0
- {execweave-0.6.5 → execweave-0.6.6}/docs/semantic-telemetry.fr.md +0 -0
- {execweave-0.6.5 → execweave-0.6.6}/docs/semantic-telemetry.ja.md +0 -0
- {execweave-0.6.5 → execweave-0.6.6}/docs/semantic-telemetry.ko.md +0 -0
- {execweave-0.6.5 → execweave-0.6.6}/docs/semantic-telemetry.md +0 -0
- {execweave-0.6.5 → execweave-0.6.6}/docs/semantic-telemetry.ru.md +0 -0
- {execweave-0.6.5 → execweave-0.6.6}/docs/semantic-telemetry.zh-CN.md +0 -0
- {execweave-0.6.5 → execweave-0.6.6}/docs/semantic-telemetry.zh-TW.md +0 -0
- {execweave-0.6.5 → execweave-0.6.6}/docs/v0.6.5-hardening-decisions.md +0 -0
- {execweave-0.6.5 → execweave-0.6.6}/scripts/audit_i18n_parity.py +0 -0
- {execweave-0.6.5 → execweave-0.6.6}/scripts/check_claude_hook.py +0 -0
- {execweave-0.6.5 → execweave-0.6.6}/scripts/check_claude_record_graph.py +0 -0
- {execweave-0.6.5 → execweave-0.6.6}/scripts/check_codex_hook.py +0 -0
- {execweave-0.6.5 → execweave-0.6.6}/scripts/check_correlation_graph.py +0 -0
- {execweave-0.6.5 → execweave-0.6.6}/scripts/check_inference_gateway_cli.py +0 -0
- {execweave-0.6.5 → execweave-0.6.6}/scripts/check_model_runtime_cli.py +0 -0
- {execweave-0.6.5 → execweave-0.6.6}/scripts/check_openai_compatible_cli.py +0 -0
- {execweave-0.6.5 → execweave-0.6.6}/scripts/check_semantic_graph.py +0 -0
- {execweave-0.6.5 → execweave-0.6.6}/scripts/check_viewer_js.py +0 -0
- {execweave-0.6.5 → execweave-0.6.6}/scripts/check_wheel_install.py +0 -0
- {execweave-0.6.5 → execweave-0.6.6}/scripts/check_windows_launchers.py +0 -0
- {execweave-0.6.5 → execweave-0.6.6}/scripts/emit_claude_hook_smoke.py +0 -0
- {execweave-0.6.5 → execweave-0.6.6}/scripts/emit_cursor_hook_smoke.py +0 -0
- {execweave-0.6.5 → execweave-0.6.6}/scripts/emit_gemini_hook_smoke.py +0 -0
- {execweave-0.6.5 → execweave-0.6.6}/scripts/emit_opencode_plugin_smoke.py +0 -0
- {execweave-0.6.5 → execweave-0.6.6}/scripts/make_semantic_smoke.py +0 -0
- {execweave-0.6.5 → execweave-0.6.6}/scripts/sync_i18n_nav.py +0 -0
- {execweave-0.6.5 → execweave-0.6.6}/src/execweave/__main__.py +0 -0
- {execweave-0.6.5 → execweave-0.6.6}/src/execweave/analysis.py +0 -0
- {execweave-0.6.5 → execweave-0.6.6}/src/execweave/anthropic.py +0 -0
- {execweave-0.6.5 → execweave-0.6.6}/src/execweave/anthropic_cli.py +0 -0
- {execweave-0.6.5 → execweave-0.6.6}/src/execweave/anthropic_full_fidelity.py +0 -0
- {execweave-0.6.5 → execweave-0.6.6}/src/execweave/auto_specialized.py +0 -0
- {execweave-0.6.5 → execweave-0.6.6}/src/execweave/backends.py +0 -0
- {execweave-0.6.5 → execweave-0.6.6}/src/execweave/benchmark.py +0 -0
- {execweave-0.6.5 → execweave-0.6.6}/src/execweave/claude_adapter.py +0 -0
- {execweave-0.6.5 → execweave-0.6.6}/src/execweave/claude_full_fidelity.py +0 -0
- {execweave-0.6.5 → execweave-0.6.6}/src/execweave/claude_record.py +0 -0
- {execweave-0.6.5 → execweave-0.6.6}/src/execweave/cli.py +0 -0
- {execweave-0.6.5 → execweave-0.6.6}/src/execweave/codex_adapter.py +0 -0
- {execweave-0.6.5 → execweave-0.6.6}/src/execweave/codex_full_fidelity.py +0 -0
- {execweave-0.6.5 → execweave-0.6.6}/src/execweave/collector.py +0 -0
- {execweave-0.6.5 → execweave-0.6.6}/src/execweave/command.py +0 -0
- {execweave-0.6.5 → execweave-0.6.6}/src/execweave/content_evidence.py +0 -0
- {execweave-0.6.5 → execweave-0.6.6}/src/execweave/content_store.py +0 -0
- {execweave-0.6.5 → execweave-0.6.6}/src/execweave/correlation.py +0 -0
- {execweave-0.6.5 → execweave-0.6.6}/src/execweave/cursor_adapter.py +0 -0
- {execweave-0.6.5 → execweave-0.6.6}/src/execweave/cursor_full_fidelity.py +0 -0
- {execweave-0.6.5 → execweave-0.6.6}/src/execweave/cursor_record.py +0 -0
- {execweave-0.6.5 → execweave-0.6.6}/src/execweave/evidence_grade.py +0 -0
- {execweave-0.6.5 → execweave-0.6.6}/src/execweave/fidelity.py +0 -0
- {execweave-0.6.5 → execweave-0.6.6}/src/execweave/filesystem.py +0 -0
- {execweave-0.6.5 → execweave-0.6.6}/src/execweave/focus.py +0 -0
- {execweave-0.6.5 → execweave-0.6.6}/src/execweave/gemini_adapter.py +0 -0
- {execweave-0.6.5 → execweave-0.6.6}/src/execweave/gemini_full_fidelity.py +0 -0
- {execweave-0.6.5 → execweave-0.6.6}/src/execweave/gemini_record.py +0 -0
- {execweave-0.6.5 → execweave-0.6.6}/src/execweave/graph_ops.py +0 -0
- {execweave-0.6.5 → execweave-0.6.6}/src/execweave/http_proxy.py +0 -0
- {execweave-0.6.5 → execweave-0.6.6}/src/execweave/http_proxy_cli.py +0 -0
- {execweave-0.6.5 → execweave-0.6.6}/src/execweave/inference_gateway.py +0 -0
- {execweave-0.6.5 → execweave-0.6.6}/src/execweave/inference_gateway_cli.py +0 -0
- {execweave-0.6.5 → execweave-0.6.6}/src/execweave/inference_gateway_full_fidelity.py +0 -0
- {execweave-0.6.5 → execweave-0.6.6}/src/execweave/inference_identity.py +0 -0
- {execweave-0.6.5 → execweave-0.6.6}/src/execweave/inference_identity_cli.py +0 -0
- {execweave-0.6.5 → execweave-0.6.6}/src/execweave/integrity.py +0 -0
- {execweave-0.6.5 → execweave-0.6.6}/src/execweave/integrity_cli.py +0 -0
- {execweave-0.6.5 → execweave-0.6.6}/src/execweave/litellm_callback.py +0 -0
- {execweave-0.6.5 → execweave-0.6.6}/src/execweave/litellm_callback_cli.py +0 -0
- /execweave-0.6.5/src/execweave/live.py → /execweave-0.6.6/src/execweave/live_core.py +0 -0
- {execweave-0.6.5 → execweave-0.6.6}/src/execweave/model_runtime.py +0 -0
- {execweave-0.6.5 → execweave-0.6.6}/src/execweave/model_runtime_cli.py +0 -0
- {execweave-0.6.5 → execweave-0.6.6}/src/execweave/model_runtime_full_fidelity.py +0 -0
- {execweave-0.6.5 → execweave-0.6.6}/src/execweave/openai_compatible.py +0 -0
- {execweave-0.6.5 → execweave-0.6.6}/src/execweave/openai_compatible_cli.py +0 -0
- {execweave-0.6.5 → execweave-0.6.6}/src/execweave/openai_compatible_full_fidelity.py +0 -0
- {execweave-0.6.5 → execweave-0.6.6}/src/execweave/opencode_adapter.py +0 -0
- {execweave-0.6.5 → execweave-0.6.6}/src/execweave/opencode_full_fidelity.py +0 -0
- {execweave-0.6.5 → execweave-0.6.6}/src/execweave/opencode_record.py +0 -0
- {execweave-0.6.5 → execweave-0.6.6}/src/execweave/overhead_benchmark.py +0 -0
- {execweave-0.6.5 → execweave-0.6.6}/src/execweave/rule_pack.py +0 -0
- {execweave-0.6.5 → execweave-0.6.6}/src/execweave/rule_pack_cli.py +0 -0
- {execweave-0.6.5 → execweave-0.6.6}/src/execweave/scalability_benchmark.py +0 -0
- {execweave-0.6.5 → execweave-0.6.6}/src/execweave/schema.py +0 -0
- {execweave-0.6.5 → execweave-0.6.6}/src/execweave/scope.py +0 -0
- {execweave-0.6.5 → execweave-0.6.6}/src/execweave/semantic.py +0 -0
- {execweave-0.6.5 → execweave-0.6.6}/src/execweave/sink.py +0 -0
- {execweave-0.6.5 → execweave-0.6.6}/src/execweave/strace_backend.py +0 -0
- {execweave-0.6.5 → execweave-0.6.6}/src/execweave/theme.py +0 -0
- {execweave-0.6.5 → execweave-0.6.6}/src/execweave/top.py +0 -0
- {execweave-0.6.5 → execweave-0.6.6}/src/execweave/top_cli.py +0 -0
- {execweave-0.6.5 → execweave-0.6.6}/src/execweave/validate.py +0 -0
- {execweave-0.6.5 → execweave-0.6.6}/src/execweave/viewer.py +0 -0
- {execweave-0.6.5 → execweave-0.6.6}/tests/fixtures/hooks/README.md +0 -0
- {execweave-0.6.5 → execweave-0.6.6}/tests/fixtures/hooks/claude.json +0 -0
- {execweave-0.6.5 → execweave-0.6.6}/tests/fixtures/hooks/codex.json +0 -0
- {execweave-0.6.5 → execweave-0.6.6}/tests/fixtures/hooks/cursor.json +0 -0
- {execweave-0.6.5 → execweave-0.6.6}/tests/fixtures/hooks/gemini.json +0 -0
- {execweave-0.6.5 → execweave-0.6.6}/tests/fixtures/hooks/manifest.json +0 -0
- {execweave-0.6.5 → execweave-0.6.6}/tests/fixtures/hooks/opencode.json +0 -0
- {execweave-0.6.5 → execweave-0.6.6}/tests/test_analysis.py +0 -0
- {execweave-0.6.5 → execweave-0.6.6}/tests/test_anthropic.py +0 -0
- {execweave-0.6.5 → execweave-0.6.6}/tests/test_auto_specialized.py +0 -0
- {execweave-0.6.5 → execweave-0.6.6}/tests/test_backends.py +0 -0
- {execweave-0.6.5 → execweave-0.6.6}/tests/test_claude_adapter.py +0 -0
- {execweave-0.6.5 → execweave-0.6.6}/tests/test_claude_full_fidelity.py +0 -0
- {execweave-0.6.5 → execweave-0.6.6}/tests/test_claude_record.py +0 -0
- {execweave-0.6.5 → execweave-0.6.6}/tests/test_codex_adapter.py +0 -0
- {execweave-0.6.5 → execweave-0.6.6}/tests/test_codex_full_fidelity.py +0 -0
- {execweave-0.6.5 → execweave-0.6.6}/tests/test_codex_record.py +0 -0
- {execweave-0.6.5 → execweave-0.6.6}/tests/test_collector.py +0 -0
- {execweave-0.6.5 → execweave-0.6.6}/tests/test_command.py +0 -0
- {execweave-0.6.5 → execweave-0.6.6}/tests/test_condense.py +0 -0
- {execweave-0.6.5 → execweave-0.6.6}/tests/test_correlation.py +0 -0
- {execweave-0.6.5 → execweave-0.6.6}/tests/test_correlation_canonical_path.py +0 -0
- {execweave-0.6.5 → execweave-0.6.6}/tests/test_correlation_checker.py +0 -0
- {execweave-0.6.5 → execweave-0.6.6}/tests/test_correlation_process_exe.py +0 -0
- {execweave-0.6.5 → execweave-0.6.6}/tests/test_cursor_adapter.py +0 -0
- {execweave-0.6.5 → execweave-0.6.6}/tests/test_cursor_full_fidelity.py +0 -0
- {execweave-0.6.5 → execweave-0.6.6}/tests/test_cursor_record.py +0 -0
- {execweave-0.6.5 → execweave-0.6.6}/tests/test_evidence_grade.py +0 -0
- {execweave-0.6.5 → execweave-0.6.6}/tests/test_fidelity.py +0 -0
- {execweave-0.6.5 → execweave-0.6.6}/tests/test_filesystem_resilience.py +0 -0
- {execweave-0.6.5 → execweave-0.6.6}/tests/test_focus.py +0 -0
- {execweave-0.6.5 → execweave-0.6.6}/tests/test_full_fidelity.py +0 -0
- {execweave-0.6.5 → execweave-0.6.6}/tests/test_gemini_adapter.py +0 -0
- {execweave-0.6.5 → execweave-0.6.6}/tests/test_gemini_full_fidelity.py +0 -0
- {execweave-0.6.5 → execweave-0.6.6}/tests/test_gemini_record.py +0 -0
- {execweave-0.6.5 → execweave-0.6.6}/tests/test_graph.py +0 -0
- {execweave-0.6.5 → execweave-0.6.6}/tests/test_graph_ops.py +0 -0
- {execweave-0.6.5 → execweave-0.6.6}/tests/test_hook_fixture_corpus.py +0 -0
- {execweave-0.6.5 → execweave-0.6.6}/tests/test_http_proxy.py +0 -0
- {execweave-0.6.5 → execweave-0.6.6}/tests/test_inference_gateway.py +0 -0
- {execweave-0.6.5 → execweave-0.6.6}/tests/test_inference_gateway_full_fidelity.py +0 -0
- {execweave-0.6.5 → execweave-0.6.6}/tests/test_inference_identity.py +0 -0
- {execweave-0.6.5 → execweave-0.6.6}/tests/test_integrity.py +0 -0
- {execweave-0.6.5 → execweave-0.6.6}/tests/test_litellm_callback.py +0 -0
- {execweave-0.6.5 → execweave-0.6.6}/tests/test_live.py +0 -0
- {execweave-0.6.5 → execweave-0.6.6}/tests/test_live_auth.py +0 -0
- {execweave-0.6.5 → execweave-0.6.6}/tests/test_live_delta.py +0 -0
- {execweave-0.6.5 → execweave-0.6.6}/tests/test_live_theme.py +0 -0
- {execweave-0.6.5 → execweave-0.6.6}/tests/test_lmstudio_auto_specialized.py +0 -0
- {execweave-0.6.5 → execweave-0.6.6}/tests/test_model_runtime.py +0 -0
- {execweave-0.6.5 → execweave-0.6.6}/tests/test_model_runtime_full_fidelity.py +0 -0
- {execweave-0.6.5 → execweave-0.6.6}/tests/test_openai_compatible.py +0 -0
- {execweave-0.6.5 → execweave-0.6.6}/tests/test_opencode_adapter.py +0 -0
- {execweave-0.6.5 → execweave-0.6.6}/tests/test_opencode_full_fidelity.py +0 -0
- {execweave-0.6.5 → execweave-0.6.6}/tests/test_opencode_plugin.py +0 -0
- {execweave-0.6.5 → execweave-0.6.6}/tests/test_opencode_record.py +0 -0
- {execweave-0.6.5 → execweave-0.6.6}/tests/test_overhead_benchmark.py +0 -0
- {execweave-0.6.5 → execweave-0.6.6}/tests/test_rule_pack.py +0 -0
- {execweave-0.6.5 → execweave-0.6.6}/tests/test_schema.py +0 -0
- {execweave-0.6.5 → execweave-0.6.6}/tests/test_scope.py +0 -0
- {execweave-0.6.5 → execweave-0.6.6}/tests/test_semantic.py +0 -0
- {execweave-0.6.5 → execweave-0.6.6}/tests/test_strace_backend.py +0 -0
- {execweave-0.6.5 → execweave-0.6.6}/tests/test_threat_model.py +0 -0
- {execweave-0.6.5 → execweave-0.6.6}/tests/test_top_detached.py +0 -0
- {execweave-0.6.5 → execweave-0.6.6}/tests/test_v063_features.py +0 -0
- {execweave-0.6.5 → execweave-0.6.6}/tests/test_v064_live_auto_integrations.py +0 -0
- {execweave-0.6.5 → execweave-0.6.6}/tests/test_v064_live_evidence.py +0 -0
- {execweave-0.6.5 → execweave-0.6.6}/tests/test_validate.py +0 -0
- {execweave-0.6.5 → execweave-0.6.6}/tests/test_version.py +0 -0
- {execweave-0.6.5 → execweave-0.6.6}/tests/test_viewer.py +0 -0
- {execweave-0.6.5 → execweave-0.6.6}/tests/test_workflow.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.5
|
|
2
2
|
Name: execweave
|
|
3
|
-
Version: 0.6.
|
|
3
|
+
Version: 0.6.6
|
|
4
4
|
Summary: Turn AI-agent runtime behavior into a local interactive execution graph.
|
|
5
5
|
Project-URL: Homepage, https://github.com/Irish-kw/ExecWeave
|
|
6
6
|
Project-URL: Repository, https://github.com/Irish-kw/ExecWeave
|
|
@@ -0,0 +1,288 @@
|
|
|
1
|
+
from __future__ import annotations
|
|
2
|
+
|
|
3
|
+
import json
|
|
4
|
+
import os
|
|
5
|
+
import stat
|
|
6
|
+
from copy import deepcopy
|
|
7
|
+
from dataclasses import asdict, dataclass
|
|
8
|
+
from pathlib import Path
|
|
9
|
+
from typing import Any, Mapping
|
|
10
|
+
|
|
11
|
+
_AUTO_FLAG = "--auto"
|
|
12
|
+
_CONFIG_RETRIES = 3
|
|
13
|
+
_SUPPORTED_AGENTS = {"claude", "codex", "gemini", "cursor", "opencode"}
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
@dataclass(frozen=True)
|
|
17
|
+
class AgentBootstrapResult:
|
|
18
|
+
provider: str | None
|
|
19
|
+
status: str
|
|
20
|
+
path: str | None = None
|
|
21
|
+
changed: bool = False
|
|
22
|
+
detail: str | None = None
|
|
23
|
+
|
|
24
|
+
def to_dict(self) -> dict[str, object]:
|
|
25
|
+
return asdict(self)
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
def _command_name(value: str) -> str:
|
|
29
|
+
name = value.replace("\\", "/").rsplit("/", 1)[-1].lower()
|
|
30
|
+
for suffix in (".exe", ".cmd", ".bat", ".ps1"):
|
|
31
|
+
if name.endswith(suffix):
|
|
32
|
+
return name[: -len(suffix)]
|
|
33
|
+
return name
|
|
34
|
+
|
|
35
|
+
|
|
36
|
+
def supported_agent(command: list[str]) -> str | None:
|
|
37
|
+
if not command:
|
|
38
|
+
return None
|
|
39
|
+
name = _command_name(command[0])
|
|
40
|
+
return name if name in _SUPPORTED_AGENTS else None
|
|
41
|
+
|
|
42
|
+
|
|
43
|
+
def _bounded_detail(value: object, limit: int = 240) -> str:
|
|
44
|
+
text = " ".join(str(value).split())
|
|
45
|
+
return text if len(text) <= limit else text[: limit - 3] + "..."
|
|
46
|
+
|
|
47
|
+
|
|
48
|
+
def _load_json_object(raw: bytes, *, path: Path) -> dict[str, Any]:
|
|
49
|
+
if not raw:
|
|
50
|
+
return {}
|
|
51
|
+
try:
|
|
52
|
+
payload = json.loads(raw.decode("utf-8"))
|
|
53
|
+
except (UnicodeDecodeError, json.JSONDecodeError) as exc:
|
|
54
|
+
raise ValueError(f"invalid JSON in {path}: {exc}") from exc
|
|
55
|
+
if not isinstance(payload, dict):
|
|
56
|
+
raise ValueError(f"configuration root must be an object: {path}")
|
|
57
|
+
return payload
|
|
58
|
+
|
|
59
|
+
|
|
60
|
+
def _read_bytes(path: Path) -> bytes | None:
|
|
61
|
+
try:
|
|
62
|
+
return path.read_bytes()
|
|
63
|
+
except FileNotFoundError:
|
|
64
|
+
return None
|
|
65
|
+
|
|
66
|
+
|
|
67
|
+
def _contains_execweave_command(value: object, marker: str) -> bool:
|
|
68
|
+
if isinstance(value, dict):
|
|
69
|
+
command = value.get("command")
|
|
70
|
+
if isinstance(command, str) and marker in command:
|
|
71
|
+
return True
|
|
72
|
+
return any(_contains_execweave_command(child, marker) for child in value.values())
|
|
73
|
+
if isinstance(value, list):
|
|
74
|
+
return any(_contains_execweave_command(child, marker) for child in value)
|
|
75
|
+
return False
|
|
76
|
+
|
|
77
|
+
|
|
78
|
+
def _merge_hook_fragment(
|
|
79
|
+
current: dict[str, Any],
|
|
80
|
+
fragment: dict[str, Any],
|
|
81
|
+
*,
|
|
82
|
+
marker: str,
|
|
83
|
+
) -> tuple[dict[str, Any], bool]:
|
|
84
|
+
merged = deepcopy(current)
|
|
85
|
+
changed = False
|
|
86
|
+
|
|
87
|
+
for key, value in fragment.items():
|
|
88
|
+
if key == "hooks":
|
|
89
|
+
continue
|
|
90
|
+
if key not in merged:
|
|
91
|
+
merged[key] = deepcopy(value)
|
|
92
|
+
changed = True
|
|
93
|
+
|
|
94
|
+
incoming_hooks = fragment.get("hooks")
|
|
95
|
+
if not isinstance(incoming_hooks, dict):
|
|
96
|
+
raise ValueError("ExecWeave hook fragment has no hooks object")
|
|
97
|
+
|
|
98
|
+
existing_hooks = merged.get("hooks")
|
|
99
|
+
if existing_hooks is None:
|
|
100
|
+
existing_hooks = {}
|
|
101
|
+
merged["hooks"] = existing_hooks
|
|
102
|
+
changed = True
|
|
103
|
+
if not isinstance(existing_hooks, dict):
|
|
104
|
+
raise ValueError("existing hooks value is not an object")
|
|
105
|
+
|
|
106
|
+
for event_name, incoming_groups in incoming_hooks.items():
|
|
107
|
+
if not isinstance(incoming_groups, list):
|
|
108
|
+
raise ValueError(f"ExecWeave hook event is not a list: {event_name}")
|
|
109
|
+
existing_groups = existing_hooks.get(event_name)
|
|
110
|
+
if existing_groups is None:
|
|
111
|
+
existing_hooks[event_name] = deepcopy(incoming_groups)
|
|
112
|
+
changed = True
|
|
113
|
+
continue
|
|
114
|
+
if not isinstance(existing_groups, list):
|
|
115
|
+
raise ValueError(f"existing hook event is not a list: {event_name}")
|
|
116
|
+
if _contains_execweave_command(existing_groups, marker):
|
|
117
|
+
continue
|
|
118
|
+
existing_groups.extend(deepcopy(incoming_groups))
|
|
119
|
+
changed = True
|
|
120
|
+
|
|
121
|
+
return merged, changed
|
|
122
|
+
|
|
123
|
+
|
|
124
|
+
def _write_bytes_optimistic(path: Path, original: bytes | None, payload: bytes) -> bool:
|
|
125
|
+
path.parent.mkdir(parents=True, exist_ok=True)
|
|
126
|
+
current = _read_bytes(path)
|
|
127
|
+
if current != original:
|
|
128
|
+
return False
|
|
129
|
+
|
|
130
|
+
mode = None
|
|
131
|
+
if path.exists():
|
|
132
|
+
try:
|
|
133
|
+
mode = stat.S_IMODE(path.stat().st_mode)
|
|
134
|
+
except OSError:
|
|
135
|
+
mode = None
|
|
136
|
+
|
|
137
|
+
temporary = path.with_name(f".{path.name}.execweave-{os.getpid()}.tmp")
|
|
138
|
+
try:
|
|
139
|
+
temporary.write_bytes(payload)
|
|
140
|
+
if mode is not None:
|
|
141
|
+
try:
|
|
142
|
+
temporary.chmod(mode)
|
|
143
|
+
except OSError:
|
|
144
|
+
pass
|
|
145
|
+
os.replace(temporary, path)
|
|
146
|
+
finally:
|
|
147
|
+
try:
|
|
148
|
+
temporary.unlink()
|
|
149
|
+
except FileNotFoundError:
|
|
150
|
+
pass
|
|
151
|
+
return True
|
|
152
|
+
|
|
153
|
+
|
|
154
|
+
def _merge_json_file(path: Path, fragment: dict[str, Any], *, marker: str) -> bool:
|
|
155
|
+
for _ in range(_CONFIG_RETRIES):
|
|
156
|
+
original = _read_bytes(path)
|
|
157
|
+
current = _load_json_object(original or b"", path=path)
|
|
158
|
+
merged, changed = _merge_hook_fragment(current, fragment, marker=marker)
|
|
159
|
+
if not changed:
|
|
160
|
+
return False
|
|
161
|
+
encoded = (
|
|
162
|
+
json.dumps(merged, ensure_ascii=False, indent=2, sort_keys=True) + "\n"
|
|
163
|
+
).encode("utf-8")
|
|
164
|
+
if _write_bytes_optimistic(path, original, encoded):
|
|
165
|
+
return True
|
|
166
|
+
raise RuntimeError(f"configuration changed concurrently while updating {path}")
|
|
167
|
+
|
|
168
|
+
|
|
169
|
+
def _write_plugin_file(path: Path, content: str, *, marker: str) -> bool:
|
|
170
|
+
encoded = content.encode("utf-8")
|
|
171
|
+
for _ in range(_CONFIG_RETRIES):
|
|
172
|
+
original = _read_bytes(path)
|
|
173
|
+
if original is not None:
|
|
174
|
+
try:
|
|
175
|
+
existing = original.decode("utf-8")
|
|
176
|
+
except UnicodeDecodeError as exc:
|
|
177
|
+
raise ValueError(f"existing OpenCode plugin is not UTF-8: {path}") from exc
|
|
178
|
+
if existing == content or marker in existing:
|
|
179
|
+
return False
|
|
180
|
+
raise FileExistsError(f"refusing to replace existing OpenCode plugin: {path}")
|
|
181
|
+
if _write_bytes_optimistic(path, original, encoded):
|
|
182
|
+
return True
|
|
183
|
+
raise RuntimeError(f"plugin path changed concurrently while updating {path}")
|
|
184
|
+
|
|
185
|
+
|
|
186
|
+
def _config_dir_from_env(environment: Mapping[str, str], key: str) -> Path | None:
|
|
187
|
+
raw = environment.get(key, "").strip()
|
|
188
|
+
return Path(raw).expanduser() if raw else None
|
|
189
|
+
|
|
190
|
+
|
|
191
|
+
def _provider_target(
|
|
192
|
+
provider: str,
|
|
193
|
+
*,
|
|
194
|
+
home: Path,
|
|
195
|
+
environment: Mapping[str, str],
|
|
196
|
+
) -> Path:
|
|
197
|
+
if provider == "claude":
|
|
198
|
+
root = _config_dir_from_env(environment, "CLAUDE_CONFIG_DIR") or home / ".claude"
|
|
199
|
+
return root / "settings.json"
|
|
200
|
+
if provider == "codex":
|
|
201
|
+
root = _config_dir_from_env(environment, "CODEX_HOME") or home / ".codex"
|
|
202
|
+
return root / "hooks.json"
|
|
203
|
+
if provider == "gemini":
|
|
204
|
+
return home / ".gemini" / "settings.json"
|
|
205
|
+
if provider == "cursor":
|
|
206
|
+
return home / ".cursor" / "hooks.json"
|
|
207
|
+
if provider == "opencode":
|
|
208
|
+
root = _config_dir_from_env(environment, "XDG_CONFIG_HOME") or home / ".config"
|
|
209
|
+
return root / "opencode" / "plugins" / "execweave.ts"
|
|
210
|
+
raise ValueError(f"unsupported provider: {provider}")
|
|
211
|
+
|
|
212
|
+
|
|
213
|
+
def _provider_fragment(provider: str) -> tuple[dict[str, Any], str]:
|
|
214
|
+
if provider == "claude":
|
|
215
|
+
from .claude_hook_cli import claude_hook_config
|
|
216
|
+
|
|
217
|
+
return claude_hook_config(f"execweave-claude-hook {_AUTO_FLAG}"), "execweave-claude-hook"
|
|
218
|
+
if provider == "codex":
|
|
219
|
+
from .codex_hook_cli import codex_hook_config
|
|
220
|
+
|
|
221
|
+
return codex_hook_config(f"execweave-codex-hook {_AUTO_FLAG}"), "execweave-codex-hook"
|
|
222
|
+
if provider == "gemini":
|
|
223
|
+
from .gemini_hook_cli import gemini_hook_config
|
|
224
|
+
|
|
225
|
+
return gemini_hook_config(f"execweave-gemini-hook {_AUTO_FLAG}"), "execweave-gemini-hook"
|
|
226
|
+
if provider == "cursor":
|
|
227
|
+
from .cursor_hook_cli import cursor_hook_config
|
|
228
|
+
|
|
229
|
+
return cursor_hook_config(f"execweave-cursor-hook {_AUTO_FLAG}"), "execweave-cursor-hook"
|
|
230
|
+
raise ValueError(f"provider does not use JSON hooks: {provider}")
|
|
231
|
+
|
|
232
|
+
|
|
233
|
+
def bootstrap_supported_agent(
|
|
234
|
+
command: list[str],
|
|
235
|
+
*,
|
|
236
|
+
home: str | Path | None = None,
|
|
237
|
+
environment: Mapping[str, str] | None = None,
|
|
238
|
+
) -> AgentBootstrapResult:
|
|
239
|
+
provider = supported_agent(command)
|
|
240
|
+
if provider is None:
|
|
241
|
+
command_name = _command_name(command[0]) if command else "unknown"
|
|
242
|
+
return AgentBootstrapResult(
|
|
243
|
+
provider=None,
|
|
244
|
+
status="unavailable",
|
|
245
|
+
detail=f"no specialized lifecycle integration for {command_name}",
|
|
246
|
+
)
|
|
247
|
+
|
|
248
|
+
env = os.environ if environment is None else environment
|
|
249
|
+
home_path = Path.home() if home is None else Path(home).expanduser()
|
|
250
|
+
target = _provider_target(provider, home=home_path, environment=env)
|
|
251
|
+
|
|
252
|
+
try:
|
|
253
|
+
if provider == "opencode":
|
|
254
|
+
from .opencode_plugin_cli import plugin_text
|
|
255
|
+
|
|
256
|
+
content = plugin_text(("execweave-opencode-hook", _AUTO_FLAG))
|
|
257
|
+
changed = _write_plugin_file(target, content, marker="execweave-opencode-hook")
|
|
258
|
+
else:
|
|
259
|
+
fragment, marker = _provider_fragment(provider)
|
|
260
|
+
changed = _merge_json_file(target, fragment, marker=marker)
|
|
261
|
+
|
|
262
|
+
if provider == "claude":
|
|
263
|
+
raw = _read_bytes(target)
|
|
264
|
+
payload = _load_json_object(raw or b"", path=target)
|
|
265
|
+
if payload.get("disableAllHooks") is True:
|
|
266
|
+
return AgentBootstrapResult(
|
|
267
|
+
provider=provider,
|
|
268
|
+
status="unavailable",
|
|
269
|
+
path=str(target),
|
|
270
|
+
changed=changed,
|
|
271
|
+
detail="Claude hooks are disabled by disableAllHooks",
|
|
272
|
+
)
|
|
273
|
+
|
|
274
|
+
return AgentBootstrapResult(
|
|
275
|
+
provider=provider,
|
|
276
|
+
status="active",
|
|
277
|
+
path=str(target),
|
|
278
|
+
changed=changed,
|
|
279
|
+
detail="specialized hook/plugin bootstrap is configured",
|
|
280
|
+
)
|
|
281
|
+
except (FileExistsError, OSError, RuntimeError, TypeError, ValueError) as exc:
|
|
282
|
+
return AgentBootstrapResult(
|
|
283
|
+
provider=provider,
|
|
284
|
+
status="bootstrap_failed",
|
|
285
|
+
path=str(target),
|
|
286
|
+
changed=False,
|
|
287
|
+
detail=_bounded_detail(exc),
|
|
288
|
+
)
|
|
@@ -10,6 +10,7 @@ from typing import Any
|
|
|
10
10
|
|
|
11
11
|
from .claude_adapter import append_semantic_records, claude_hook_to_semantic_events, read_hook_payload
|
|
12
12
|
from .claude_full_fidelity import claude_hook_to_content_events
|
|
13
|
+
from .claude_model_observer import append_claude_transcript_model_events
|
|
13
14
|
from .content_store import FullFidelityContentStore
|
|
14
15
|
|
|
15
16
|
|
|
@@ -75,6 +76,11 @@ def build_parser() -> argparse.ArgumentParser:
|
|
|
75
76
|
action="store_true",
|
|
76
77
|
help="Return non-zero on telemetry errors. Default is fail-open so tracing cannot block Claude.",
|
|
77
78
|
)
|
|
79
|
+
parser.add_argument(
|
|
80
|
+
"--auto",
|
|
81
|
+
action="store_true",
|
|
82
|
+
help=argparse.SUPPRESS,
|
|
83
|
+
)
|
|
78
84
|
parser.add_argument(
|
|
79
85
|
"--print-config",
|
|
80
86
|
action="store_true",
|
|
@@ -94,6 +100,8 @@ def main(argv: list[str] | None = None) -> int:
|
|
|
94
100
|
if args.print_config:
|
|
95
101
|
print(json.dumps(claude_hook_config(args.command), indent=2, sort_keys=True))
|
|
96
102
|
return 0
|
|
103
|
+
if args.auto and not os.environ.get("EXECWEAVE_SEMANTIC_SIDECAR"):
|
|
104
|
+
return 0
|
|
97
105
|
|
|
98
106
|
try:
|
|
99
107
|
payload = read_hook_payload()
|
|
@@ -113,6 +121,11 @@ def main(argv: list[str] | None = None) -> int:
|
|
|
113
121
|
)
|
|
114
122
|
)
|
|
115
123
|
append_semantic_records(sidecar, records)
|
|
124
|
+
append_claude_transcript_model_events(
|
|
125
|
+
payload,
|
|
126
|
+
sidecar=sidecar,
|
|
127
|
+
timestamp=observed_at,
|
|
128
|
+
)
|
|
116
129
|
except (OSError, RuntimeError, TimeoutError, TypeError, ValueError) as exc:
|
|
117
130
|
print(f"ExecWeave Claude hook warning: {exc}", file=sys.stderr)
|
|
118
131
|
return 1 if args.strict else 0
|