flowproof 0.24.0__tar.gz → 0.26.0__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.
- {flowproof-0.24.0 → flowproof-0.26.0}/Cargo.lock +56 -9
- {flowproof-0.24.0 → flowproof-0.26.0}/Cargo.toml +1 -1
- {flowproof-0.24.0 → flowproof-0.26.0}/PKG-INFO +1 -1
- {flowproof-0.24.0 → flowproof-0.26.0}/crates/flowproof-cli/Cargo.toml +3 -0
- {flowproof-0.24.0 → flowproof-0.26.0}/crates/flowproof-cli/src/lib.rs +35 -3
- flowproof-0.26.0/crates/flowproof-cli/src/mcp_codex.rs +293 -0
- flowproof-0.26.0/crates/flowproof-cli/src/mcp_install.rs +618 -0
- {flowproof-0.24.0 → flowproof-0.26.0}/crates/flowproof-cli/src/mcp_server.rs +3 -1
- {flowproof-0.24.0 → flowproof-0.26.0}/crates/flowproof-cli/src/mcp_tools.rs +68 -4
- {flowproof-0.24.0 → flowproof-0.26.0}/crates/flowproof-cli/tests/mcp_server_e2e.rs +44 -2
- {flowproof-0.24.0 → flowproof-0.26.0}/flowproof/__init__.py +1 -1
- {flowproof-0.24.0 → flowproof-0.26.0}/pyproject.toml +1 -1
- flowproof-0.24.0/crates/flowproof-cli/src/mcp_install.rs +0 -317
- {flowproof-0.24.0 → flowproof-0.26.0}/README.md +0 -0
- {flowproof-0.24.0 → flowproof-0.26.0}/crates/flowproof-adapters/Cargo.toml +0 -0
- {flowproof-0.24.0 → flowproof-0.26.0}/crates/flowproof-adapters/examples/vision_bench.rs +0 -0
- {flowproof-0.24.0 → flowproof-0.26.0}/crates/flowproof-adapters/examples/vision_do.rs +0 -0
- {flowproof-0.24.0 → flowproof-0.26.0}/crates/flowproof-adapters/src/agent_proxy.rs +0 -0
- {flowproof-0.24.0 → flowproof-0.26.0}/crates/flowproof-adapters/src/agent_runner.rs +0 -0
- {flowproof-0.24.0 → flowproof-0.26.0}/crates/flowproof-adapters/src/egress.rs +0 -0
- {flowproof-0.24.0 → flowproof-0.26.0}/crates/flowproof-adapters/src/egress_linux.rs +0 -0
- {flowproof-0.24.0 → flowproof-0.26.0}/crates/flowproof-adapters/src/egress_windows/audit.rs +0 -0
- {flowproof-0.24.0 → flowproof-0.26.0}/crates/flowproof-adapters/src/egress_windows/capture.rs +0 -0
- {flowproof-0.24.0 → flowproof-0.26.0}/crates/flowproof-adapters/src/egress_windows/env_block.rs +0 -0
- {flowproof-0.24.0 → flowproof-0.26.0}/crates/flowproof-adapters/src/egress_windows/filters.rs +0 -0
- {flowproof-0.24.0 → flowproof-0.26.0}/crates/flowproof-adapters/src/egress_windows/identity.rs +0 -0
- {flowproof-0.24.0 → flowproof-0.26.0}/crates/flowproof-adapters/src/egress_windows/logon.rs +0 -0
- {flowproof-0.24.0 → flowproof-0.26.0}/crates/flowproof-adapters/src/egress_windows/netevents.rs +0 -0
- {flowproof-0.24.0 → flowproof-0.26.0}/crates/flowproof-adapters/src/egress_windows/run.rs +0 -0
- {flowproof-0.24.0 → flowproof-0.26.0}/crates/flowproof-adapters/src/egress_windows/spawn.rs +0 -0
- {flowproof-0.24.0 → flowproof-0.26.0}/crates/flowproof-adapters/src/egress_windows/wfp.rs +0 -0
- {flowproof-0.24.0 → flowproof-0.26.0}/crates/flowproof-adapters/src/egress_windows.rs +0 -0
- {flowproof-0.24.0 → flowproof-0.26.0}/crates/flowproof-adapters/src/ffmpeg.rs +0 -0
- {flowproof-0.24.0 → flowproof-0.26.0}/crates/flowproof-adapters/src/fiori.rs +0 -0
- {flowproof-0.24.0 → flowproof-0.26.0}/crates/flowproof-adapters/src/fs_observe.rs +0 -0
- {flowproof-0.24.0 → flowproof-0.26.0}/crates/flowproof-adapters/src/kept_browser.rs +0 -0
- {flowproof-0.24.0 → flowproof-0.26.0}/crates/flowproof-adapters/src/lib.rs +0 -0
- {flowproof-0.24.0 → flowproof-0.26.0}/crates/flowproof-adapters/src/mcp_core.rs +0 -0
- {flowproof-0.24.0 → flowproof-0.26.0}/crates/flowproof-adapters/src/mcp_http.rs +0 -0
- {flowproof-0.24.0 → flowproof-0.26.0}/crates/flowproof-adapters/src/mcp_stdio.rs +0 -0
- {flowproof-0.24.0 → flowproof-0.26.0}/crates/flowproof-adapters/src/sap_com.rs +0 -0
- {flowproof-0.24.0 → flowproof-0.26.0}/crates/flowproof-adapters/src/video_frames.rs +0 -0
- {flowproof-0.24.0 → flowproof-0.26.0}/crates/flowproof-adapters/src/vision/start.rs +0 -0
- {flowproof-0.24.0 → flowproof-0.26.0}/crates/flowproof-adapters/src/vision.rs +0 -0
- {flowproof-0.24.0 → flowproof-0.26.0}/crates/flowproof-adapters/src/vision_bench.rs +0 -0
- {flowproof-0.24.0 → flowproof-0.26.0}/crates/flowproof-adapters/src/vision_elements.rs +0 -0
- {flowproof-0.24.0 → flowproof-0.26.0}/crates/flowproof-adapters/src/vision_grid.rs +0 -0
- {flowproof-0.24.0 → flowproof-0.26.0}/crates/flowproof-adapters/src/vision_winocr.rs +0 -0
- {flowproof-0.24.0 → flowproof-0.26.0}/crates/flowproof-adapters/src/web.rs +0 -0
- {flowproof-0.24.0 → flowproof-0.26.0}/crates/flowproof-adapters/tests/a11y_capture.rs +0 -0
- {flowproof-0.24.0 → flowproof-0.26.0}/crates/flowproof-adapters/tests/consent_e2e.rs +0 -0
- {flowproof-0.24.0 → flowproof-0.26.0}/crates/flowproof-adapters/tests/drag_spike.rs +0 -0
- {flowproof-0.24.0 → flowproof-0.26.0}/crates/flowproof-adapters/tests/fingerprint_capture.rs +0 -0
- {flowproof-0.24.0 → flowproof-0.26.0}/crates/flowproof-adapters/tests/fixtures/windows-start.png +0 -0
- {flowproof-0.24.0 → flowproof-0.26.0}/crates/flowproof-adapters/tests/framed_scene_e2e.rs +0 -0
- {flowproof-0.24.0 → flowproof-0.26.0}/crates/flowproof-adapters/tests/fs_observation_e2e.rs +0 -0
- {flowproof-0.24.0 → flowproof-0.26.0}/crates/flowproof-adapters/tests/grid_scene_e2e.rs +0 -0
- {flowproof-0.24.0 → flowproof-0.26.0}/crates/flowproof-adapters/tests/list_scene_e2e.rs +0 -0
- {flowproof-0.24.0 → flowproof-0.26.0}/crates/flowproof-adapters/tests/network_idle_e2e.rs +0 -0
- {flowproof-0.24.0 → flowproof-0.26.0}/crates/flowproof-adapters/tests/page_ready_e2e.rs +0 -0
- {flowproof-0.24.0 → flowproof-0.26.0}/crates/flowproof-adapters/tests/password_recording_e2e.rs +0 -0
- {flowproof-0.24.0 → flowproof-0.26.0}/crates/flowproof-adapters/tests/replayable_selectors_e2e.rs +0 -0
- {flowproof-0.24.0 → flowproof-0.26.0}/crates/flowproof-adapters/tests/shared_browser_shutdown_e2e.rs +0 -0
- {flowproof-0.24.0 → flowproof-0.26.0}/crates/flowproof-adapters/tests/side_effect_http_e2e.rs +0 -0
- {flowproof-0.24.0 → flowproof-0.26.0}/crates/flowproof-adapters/tests/static_area_e2e.rs +0 -0
- {flowproof-0.24.0 → flowproof-0.26.0}/crates/flowproof-adapters/tests/suggestion_pick_e2e.rs +0 -0
- {flowproof-0.24.0 → flowproof-0.26.0}/crates/flowproof-adapters/tests/video_frames_e2e.rs +0 -0
- {flowproof-0.24.0 → flowproof-0.26.0}/crates/flowproof-adapters/tests/visibility_detach_e2e.rs +0 -0
- {flowproof-0.24.0 → flowproof-0.26.0}/crates/flowproof-adapters/tests/windows_containment_e2e.rs +0 -0
- {flowproof-0.24.0 → flowproof-0.26.0}/crates/flowproof-agent/Cargo.toml +0 -0
- {flowproof-0.24.0 → flowproof-0.26.0}/crates/flowproof-agent/src/acp/mod.rs +0 -0
- {flowproof-0.24.0 → flowproof-0.26.0}/crates/flowproof-agent/src/acp/wire.rs +0 -0
- {flowproof-0.24.0 → flowproof-0.26.0}/crates/flowproof-agent/src/agent_steps.rs +0 -0
- {flowproof-0.24.0 → flowproof-0.26.0}/crates/flowproof-agent/src/author.rs +0 -0
- {flowproof-0.24.0 → flowproof-0.26.0}/crates/flowproof-agent/src/clarify.rs +0 -0
- {flowproof-0.24.0 → flowproof-0.26.0}/crates/flowproof-agent/src/code_author.rs +0 -0
- {flowproof-0.24.0 → flowproof-0.26.0}/crates/flowproof-agent/src/doc_author.rs +0 -0
- {flowproof-0.24.0 → flowproof-0.26.0}/crates/flowproof-agent/src/doc_formats/hp_alm.rs +0 -0
- {flowproof-0.24.0 → flowproof-0.26.0}/crates/flowproof-agent/src/doc_formats.rs +0 -0
- {flowproof-0.24.0 → flowproof-0.26.0}/crates/flowproof-agent/src/draft_assembly.rs +0 -0
- {flowproof-0.24.0 → flowproof-0.26.0}/crates/flowproof-agent/src/heal.rs +0 -0
- {flowproof-0.24.0 → flowproof-0.26.0}/crates/flowproof-agent/src/lib.rs +0 -0
- {flowproof-0.24.0 → flowproof-0.26.0}/crates/flowproof-agent/src/llm.rs +0 -0
- {flowproof-0.24.0 → flowproof-0.26.0}/crates/flowproof-agent/src/recorder.rs +0 -0
- {flowproof-0.24.0 → flowproof-0.26.0}/crates/flowproof-agent/src/repair.rs +0 -0
- {flowproof-0.24.0 → flowproof-0.26.0}/crates/flowproof-agent/src/rules.rs +0 -0
- {flowproof-0.24.0 → flowproof-0.26.0}/crates/flowproof-agent/src/selection.rs +0 -0
- {flowproof-0.24.0 → flowproof-0.26.0}/crates/flowproof-agent/src/spec.rs +0 -0
- {flowproof-0.24.0 → flowproof-0.26.0}/crates/flowproof-agent/src/video_author.rs +0 -0
- {flowproof-0.24.0 → flowproof-0.26.0}/crates/flowproof-agent/tests/model_client_http.rs +0 -0
- {flowproof-0.24.0 → flowproof-0.26.0}/crates/flowproof-cli/build.rs +0 -0
- {flowproof-0.24.0 → flowproof-0.26.0}/crates/flowproof-cli/skills/flowproof-config/SKILL.md +0 -0
- {flowproof-0.24.0 → flowproof-0.26.0}/crates/flowproof-cli/skills/flowproof-flows/SKILL.md +0 -0
- {flowproof-0.24.0 → flowproof-0.26.0}/crates/flowproof-cli/src/agent_flow.rs +0 -0
- {flowproof-0.24.0 → flowproof-0.26.0}/crates/flowproof-cli/src/agent_surface.rs +0 -0
- {flowproof-0.24.0 → flowproof-0.26.0}/crates/flowproof-cli/src/capture.rs +0 -0
- {flowproof-0.24.0 → flowproof-0.26.0}/crates/flowproof-cli/src/config.rs +0 -0
- {flowproof-0.24.0 → flowproof-0.26.0}/crates/flowproof-cli/src/doctor.rs +0 -0
- {flowproof-0.24.0 → flowproof-0.26.0}/crates/flowproof-cli/src/main.rs +0 -0
- {flowproof-0.24.0 → flowproof-0.26.0}/crates/flowproof-cli/src/suite.rs +0 -0
- {flowproof-0.24.0 → flowproof-0.26.0}/crates/flowproof-cli/src/suite_checkpoint.rs +0 -0
- {flowproof-0.24.0 → flowproof-0.26.0}/crates/flowproof-cli/src/suite_inputs.rs +0 -0
- {flowproof-0.24.0 → flowproof-0.26.0}/crates/flowproof-cli/src/suite_journal.rs +0 -0
- {flowproof-0.24.0 → flowproof-0.26.0}/crates/flowproof-cli/src/update_check.rs +0 -0
- {flowproof-0.24.0 → flowproof-0.26.0}/crates/flowproof-cli/tests/a11y_selector_e2e.rs +0 -0
- {flowproof-0.24.0 → flowproof-0.26.0}/crates/flowproof-cli/tests/agent_conversation_anthropic_e2e.rs +0 -0
- {flowproof-0.24.0 → flowproof-0.26.0}/crates/flowproof-cli/tests/agent_conversation_streaming_e2e.rs +0 -0
- {flowproof-0.24.0 → flowproof-0.26.0}/crates/flowproof-cli/tests/agent_flow_e2e.rs +0 -0
- {flowproof-0.24.0 → flowproof-0.26.0}/crates/flowproof-cli/tests/agent_url_record_e2e.rs +0 -0
- {flowproof-0.24.0 → flowproof-0.26.0}/crates/flowproof-cli/tests/api_pipeline.rs +0 -0
- {flowproof-0.24.0 → flowproof-0.26.0}/crates/flowproof-cli/tests/audit_record_e2e.rs +0 -0
- {flowproof-0.24.0 → flowproof-0.26.0}/crates/flowproof-cli/tests/author_from_code_e2e.rs +0 -0
- {flowproof-0.24.0 → flowproof-0.26.0}/crates/flowproof-cli/tests/calc_e2e.rs +0 -0
- {flowproof-0.24.0 → flowproof-0.26.0}/crates/flowproof-cli/tests/citrix_start.rs +0 -0
- {flowproof-0.24.0 → flowproof-0.26.0}/crates/flowproof-cli/tests/claude_code_plugin.rs +0 -0
- {flowproof-0.24.0 → flowproof-0.26.0}/crates/flowproof-cli/tests/clock_e2e.rs +0 -0
- {flowproof-0.24.0 → flowproof-0.26.0}/crates/flowproof-cli/tests/config_cli_e2e.rs +0 -0
- {flowproof-0.24.0 → flowproof-0.26.0}/crates/flowproof-cli/tests/config_seed_e2e.rs +0 -0
- {flowproof-0.24.0 → flowproof-0.26.0}/crates/flowproof-cli/tests/config_skill_e2e.rs +0 -0
- {flowproof-0.24.0 → flowproof-0.26.0}/crates/flowproof-cli/tests/cookie_e2e.rs +0 -0
- {flowproof-0.24.0 → flowproof-0.26.0}/crates/flowproof-cli/tests/doctor_ai_e2e.rs +0 -0
- {flowproof-0.24.0 → flowproof-0.26.0}/crates/flowproof-cli/tests/doctor_e2e.rs +0 -0
- {flowproof-0.24.0 → flowproof-0.26.0}/crates/flowproof-cli/tests/documented_flags.rs +0 -0
- {flowproof-0.24.0 → flowproof-0.26.0}/crates/flowproof-cli/tests/egress_e2e.rs +0 -0
- {flowproof-0.24.0 → flowproof-0.26.0}/crates/flowproof-cli/tests/examples_resolve.rs +0 -0
- {flowproof-0.24.0 → flowproof-0.26.0}/crates/flowproof-cli/tests/export_e2e.rs +0 -0
- {flowproof-0.24.0 → flowproof-0.26.0}/crates/flowproof-cli/tests/falsifiability_arg_matchers.rs +0 -0
- {flowproof-0.24.0 → flowproof-0.26.0}/crates/flowproof-cli/tests/falsifiability_audit_since.rs +0 -0
- {flowproof-0.24.0 → flowproof-0.26.0}/crates/flowproof-cli/tests/falsifiability_call_order.rs +0 -0
- {flowproof-0.24.0 → flowproof-0.26.0}/crates/flowproof-cli/tests/falsifiability_capability_regression.rs +0 -0
- {flowproof-0.24.0 → flowproof-0.26.0}/crates/flowproof-cli/tests/falsifiability_control_verdict.rs +0 -0
- {flowproof-0.24.0 → flowproof-0.26.0}/crates/flowproof-cli/tests/falsifiability_mcp_kill.rs +0 -0
- {flowproof-0.24.0 → flowproof-0.26.0}/crates/flowproof-cli/tests/falsifiability_no_tool_call.rs +0 -0
- {flowproof-0.24.0 → flowproof-0.26.0}/crates/flowproof-cli/tests/falsifiability_reply_contains.rs +0 -0
- {flowproof-0.24.0 → flowproof-0.26.0}/crates/flowproof-cli/tests/falsifiability_side_effect.rs +0 -0
- {flowproof-0.24.0 → flowproof-0.26.0}/crates/flowproof-cli/tests/fiori_field_commit_e2e.rs +0 -0
- {flowproof-0.24.0 → flowproof-0.26.0}/crates/flowproof-cli/tests/grid_cell_e2e.rs +0 -0
- {flowproof-0.24.0 → flowproof-0.26.0}/crates/flowproof-cli/tests/heal_apply_proposal.rs +0 -0
- {flowproof-0.24.0 → flowproof-0.26.0}/crates/flowproof-cli/tests/heal_vars_e2e.rs +0 -0
- {flowproof-0.24.0 → flowproof-0.26.0}/crates/flowproof-cli/tests/iframe_e2e.rs +0 -0
- {flowproof-0.24.0 → flowproof-0.26.0}/crates/flowproof-cli/tests/llm_author_e2e.rs +0 -0
- {flowproof-0.24.0 → flowproof-0.26.0}/crates/flowproof-cli/tests/mcp_http_e2e.rs +0 -0
- {flowproof-0.24.0 → flowproof-0.26.0}/crates/flowproof-cli/tests/mcp_stdio_e2e.rs +0 -0
- {flowproof-0.24.0 → flowproof-0.26.0}/crates/flowproof-cli/tests/notepad_author_e2e.rs +0 -0
- {flowproof-0.24.0 → flowproof-0.26.0}/crates/flowproof-cli/tests/notepad_e2e.rs +0 -0
- {flowproof-0.24.0 → flowproof-0.26.0}/crates/flowproof-cli/tests/page_title_e2e.rs +0 -0
- {flowproof-0.24.0 → flowproof-0.26.0}/crates/flowproof-cli/tests/pinned_random_e2e.rs +0 -0
- {flowproof-0.24.0 → flowproof-0.26.0}/crates/flowproof-cli/tests/record_progress.rs +0 -0
- {flowproof-0.24.0 → flowproof-0.26.0}/crates/flowproof-cli/tests/sap_e2e.rs +0 -0
- {flowproof-0.24.0 → flowproof-0.26.0}/crates/flowproof-cli/tests/sap_pipeline.rs +0 -0
- {flowproof-0.24.0 → flowproof-0.26.0}/crates/flowproof-cli/tests/sap_sim_e2e.rs +0 -0
- {flowproof-0.24.0 → flowproof-0.26.0}/crates/flowproof-cli/tests/scoped_container_e2e.rs +0 -0
- {flowproof-0.24.0 → flowproof-0.26.0}/crates/flowproof-cli/tests/select_missing_option_e2e.rs +0 -0
- {flowproof-0.24.0 → flowproof-0.26.0}/crates/flowproof-cli/tests/sigterm_shared_browser_e2e.rs +0 -0
- {flowproof-0.24.0 → flowproof-0.26.0}/crates/flowproof-cli/tests/skip_unless_env.rs +0 -0
- {flowproof-0.24.0 → flowproof-0.26.0}/crates/flowproof-cli/tests/suite_checkpoint.rs +0 -0
- {flowproof-0.24.0 → flowproof-0.26.0}/crates/flowproof-cli/tests/suite_env_from.rs +0 -0
- {flowproof-0.24.0 → flowproof-0.26.0}/crates/flowproof-cli/tests/suite_flow_isolation.rs +0 -0
- {flowproof-0.24.0 → flowproof-0.26.0}/crates/flowproof-cli/tests/suite_hook_stdout_json.rs +0 -0
- {flowproof-0.24.0 → flowproof-0.26.0}/crates/flowproof-cli/tests/suite_missing_trace.rs +0 -0
- {flowproof-0.24.0 → flowproof-0.26.0}/crates/flowproof-cli/tests/suite_policy.rs +0 -0
- {flowproof-0.24.0 → flowproof-0.26.0}/crates/flowproof-cli/tests/support/sap_simulator.py +0 -0
- {flowproof-0.24.0 → flowproof-0.26.0}/crates/flowproof-cli/tests/visibility_e2e.rs +0 -0
- {flowproof-0.24.0 → flowproof-0.26.0}/crates/flowproof-cli/tests/vision_pipeline.rs +0 -0
- {flowproof-0.24.0 → flowproof-0.26.0}/crates/flowproof-cli/tests/vision_start_replay.rs +0 -0
- {flowproof-0.24.0 → flowproof-0.26.0}/crates/flowproof-cli/tests/web_e2e.rs +0 -0
- {flowproof-0.24.0 → flowproof-0.26.0}/crates/flowproof-driver/Cargo.toml +0 -0
- {flowproof-0.24.0 → flowproof-0.26.0}/crates/flowproof-driver/src/app.rs +0 -0
- {flowproof-0.24.0 → flowproof-0.26.0}/crates/flowproof-driver/src/backend.rs +0 -0
- {flowproof-0.24.0 → flowproof-0.26.0}/crates/flowproof-driver/src/gdi.rs +0 -0
- {flowproof-0.24.0 → flowproof-0.26.0}/crates/flowproof-driver/src/lib.rs +0 -0
- {flowproof-0.24.0 → flowproof-0.26.0}/crates/flowproof-driver/src/mock.rs +0 -0
- {flowproof-0.24.0 → flowproof-0.26.0}/crates/flowproof-driver/src/oob.rs +0 -0
- {flowproof-0.24.0 → flowproof-0.26.0}/crates/flowproof-driver/src/recording.rs +0 -0
- {flowproof-0.24.0 → flowproof-0.26.0}/crates/flowproof-driver/src/redact.rs +0 -0
- {flowproof-0.24.0 → flowproof-0.26.0}/crates/flowproof-driver/src/surface.rs +0 -0
- {flowproof-0.24.0 → flowproof-0.26.0}/crates/flowproof-driver/src/uia_scan.rs +0 -0
- {flowproof-0.24.0 → flowproof-0.26.0}/crates/flowproof-driver/src/visual.rs +0 -0
- {flowproof-0.24.0 → flowproof-0.26.0}/crates/flowproof-driver/src/window.rs +0 -0
- {flowproof-0.24.0 → flowproof-0.26.0}/crates/flowproof-python/Cargo.toml +0 -0
- {flowproof-0.24.0 → flowproof-0.26.0}/crates/flowproof-python/src/lib.rs +0 -0
- {flowproof-0.24.0 → flowproof-0.26.0}/crates/flowproof-replay/Cargo.toml +0 -0
- {flowproof-0.24.0 → flowproof-0.26.0}/crates/flowproof-replay/src/lib.rs +0 -0
- {flowproof-0.24.0 → flowproof-0.26.0}/crates/flowproof-replay/src/report.rs +0 -0
- {flowproof-0.24.0 → flowproof-0.26.0}/crates/flowproof-replay/src/runrecord.rs +0 -0
- {flowproof-0.24.0 → flowproof-0.26.0}/crates/flowproof-replay/tests/replay_calc.rs +0 -0
- {flowproof-0.24.0 → flowproof-0.26.0}/crates/flowproof-replay/tests/spec_step.rs +0 -0
- {flowproof-0.24.0 → flowproof-0.26.0}/crates/flowproof-trace/Cargo.toml +0 -0
- {flowproof-0.24.0 → flowproof-0.26.0}/crates/flowproof-trace/schema/cassette-v1.schema.json +0 -0
- {flowproof-0.24.0 → flowproof-0.26.0}/crates/flowproof-trace/schema/side-effect-v1.schema.json +0 -0
- {flowproof-0.24.0 → flowproof-0.26.0}/crates/flowproof-trace/schema/trace-v1.schema.json +0 -0
- {flowproof-0.24.0 → flowproof-0.26.0}/crates/flowproof-trace/src/captures.rs +0 -0
- {flowproof-0.24.0 → flowproof-0.26.0}/crates/flowproof-trace/src/cassette.rs +0 -0
- {flowproof-0.24.0 → flowproof-0.26.0}/crates/flowproof-trace/src/cassette_diff.rs +0 -0
- {flowproof-0.24.0 → flowproof-0.26.0}/crates/flowproof-trace/src/egress.rs +0 -0
- {flowproof-0.24.0 → flowproof-0.26.0}/crates/flowproof-trace/src/format.rs +0 -0
- {flowproof-0.24.0 → flowproof-0.26.0}/crates/flowproof-trace/src/lib.rs +0 -0
- {flowproof-0.24.0 → flowproof-0.26.0}/crates/flowproof-trace/src/secret.rs +0 -0
- {flowproof-0.24.0 → flowproof-0.26.0}/crates/flowproof-trace/src/secret_scan.rs +0 -0
- {flowproof-0.24.0 → flowproof-0.26.0}/crates/flowproof-trace/src/side_effect.rs +0 -0
- {flowproof-0.24.0 → flowproof-0.26.0}/crates/flowproof-trace/src/substitution.rs +0 -0
- {flowproof-0.24.0 → flowproof-0.26.0}/crates/flowproof-trace/src/toolcalls.rs +0 -0
- {flowproof-0.24.0 → flowproof-0.26.0}/crates/flowproof-trace/src/tosca.rs +0 -0
- {flowproof-0.24.0 → flowproof-0.26.0}/crates/flowproof-trace/tests/cassette_conformance.rs +0 -0
- {flowproof-0.24.0 → flowproof-0.26.0}/crates/flowproof-trace/tests/fixtures/guarded.trace.jsonl +0 -0
- {flowproof-0.24.0 → flowproof-0.26.0}/crates/flowproof-trace/tests/fixtures/multi.trace.jsonl +0 -0
- {flowproof-0.24.0 → flowproof-0.26.0}/crates/flowproof-trace/tests/fixtures/repeat.trace.jsonl +0 -0
- {flowproof-0.24.0 → flowproof-0.26.0}/crates/flowproof-trace/tests/fixtures/sample.trace.jsonl +0 -0
- {flowproof-0.24.0 → flowproof-0.26.0}/crates/flowproof-trace/tests/schema_conformance.rs +0 -0
- {flowproof-0.24.0 → flowproof-0.26.0}/crates/flowproof-trace/tests/side_effect_conformance.rs +0 -0
- {flowproof-0.24.0 → flowproof-0.26.0}/crates/flowproof-trace/tests/tosca_export.rs +0 -0
- {flowproof-0.24.0 → flowproof-0.26.0}/flowproof/_archived_mcp_server.py +0 -0
- {flowproof-0.24.0 → flowproof-0.26.0}/flowproof/cli.py +0 -0
- {flowproof-0.24.0 → flowproof-0.26.0}/flowproof/flow.py +0 -0
- {flowproof-0.24.0 → flowproof-0.26.0}/flowproof/py.typed +0 -0
|
@@ -888,7 +888,7 @@ dependencies = [
|
|
|
888
888
|
|
|
889
889
|
[[package]]
|
|
890
890
|
name = "flowproof-adapters"
|
|
891
|
-
version = "0.
|
|
891
|
+
version = "0.26.0"
|
|
892
892
|
dependencies = [
|
|
893
893
|
"anyhow",
|
|
894
894
|
"flowproof-driver",
|
|
@@ -907,7 +907,7 @@ dependencies = [
|
|
|
907
907
|
|
|
908
908
|
[[package]]
|
|
909
909
|
name = "flowproof-agent"
|
|
910
|
-
version = "0.
|
|
910
|
+
version = "0.26.0"
|
|
911
911
|
dependencies = [
|
|
912
912
|
"base64",
|
|
913
913
|
"chrono",
|
|
@@ -926,7 +926,7 @@ dependencies = [
|
|
|
926
926
|
|
|
927
927
|
[[package]]
|
|
928
928
|
name = "flowproof-cli"
|
|
929
|
-
version = "0.
|
|
929
|
+
version = "0.26.0"
|
|
930
930
|
dependencies = [
|
|
931
931
|
"ab_glyph",
|
|
932
932
|
"chrono",
|
|
@@ -947,13 +947,14 @@ dependencies = [
|
|
|
947
947
|
"serde_norway",
|
|
948
948
|
"sha2 0.10.9",
|
|
949
949
|
"tiny_http",
|
|
950
|
+
"toml_edit",
|
|
950
951
|
"ureq",
|
|
951
952
|
"uuid",
|
|
952
953
|
]
|
|
953
954
|
|
|
954
955
|
[[package]]
|
|
955
956
|
name = "flowproof-driver"
|
|
956
|
-
version = "0.
|
|
957
|
+
version = "0.26.0"
|
|
957
958
|
dependencies = [
|
|
958
959
|
"calamine",
|
|
959
960
|
"flowproof-trace",
|
|
@@ -969,7 +970,7 @@ dependencies = [
|
|
|
969
970
|
|
|
970
971
|
[[package]]
|
|
971
972
|
name = "flowproof-python"
|
|
972
|
-
version = "0.
|
|
973
|
+
version = "0.26.0"
|
|
973
974
|
dependencies = [
|
|
974
975
|
"flowproof-agent",
|
|
975
976
|
"flowproof-cli",
|
|
@@ -981,7 +982,7 @@ dependencies = [
|
|
|
981
982
|
|
|
982
983
|
[[package]]
|
|
983
984
|
name = "flowproof-replay"
|
|
984
|
-
version = "0.
|
|
985
|
+
version = "0.26.0"
|
|
985
986
|
dependencies = [
|
|
986
987
|
"chrono",
|
|
987
988
|
"flowproof-agent",
|
|
@@ -995,7 +996,7 @@ dependencies = [
|
|
|
995
996
|
|
|
996
997
|
[[package]]
|
|
997
998
|
name = "flowproof-terminal-replica"
|
|
998
|
-
version = "0.
|
|
999
|
+
version = "0.26.0"
|
|
999
1000
|
dependencies = [
|
|
1000
1001
|
"image",
|
|
1001
1002
|
"serde",
|
|
@@ -1006,7 +1007,7 @@ dependencies = [
|
|
|
1006
1007
|
|
|
1007
1008
|
[[package]]
|
|
1008
1009
|
name = "flowproof-trace"
|
|
1009
|
-
version = "0.
|
|
1010
|
+
version = "0.26.0"
|
|
1010
1011
|
dependencies = [
|
|
1011
1012
|
"jsonschema",
|
|
1012
1013
|
"regex",
|
|
@@ -1017,7 +1018,7 @@ dependencies = [
|
|
|
1017
1018
|
|
|
1018
1019
|
[[package]]
|
|
1019
1020
|
name = "flowproof-video-fixture"
|
|
1020
|
-
version = "0.
|
|
1021
|
+
version = "0.26.0"
|
|
1021
1022
|
dependencies = [
|
|
1022
1023
|
"anyhow",
|
|
1023
1024
|
"flowproof-driver",
|
|
@@ -3084,6 +3085,43 @@ dependencies = [
|
|
|
3084
3085
|
"tokio",
|
|
3085
3086
|
]
|
|
3086
3087
|
|
|
3088
|
+
[[package]]
|
|
3089
|
+
name = "toml_datetime"
|
|
3090
|
+
version = "1.1.3+spec-1.1.0"
|
|
3091
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
3092
|
+
checksum = "173f25c883cd2176a2d8212155638c0a60d484a9d84546d270866f40f56b6e49"
|
|
3093
|
+
dependencies = [
|
|
3094
|
+
"serde_core",
|
|
3095
|
+
]
|
|
3096
|
+
|
|
3097
|
+
[[package]]
|
|
3098
|
+
name = "toml_edit"
|
|
3099
|
+
version = "0.25.21+spec-1.1.0"
|
|
3100
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
3101
|
+
checksum = "88497dab46de5bf343ec66b05c251e48c6213f3e9170c70a70a823f7abe886a4"
|
|
3102
|
+
dependencies = [
|
|
3103
|
+
"indexmap",
|
|
3104
|
+
"toml_datetime",
|
|
3105
|
+
"toml_parser",
|
|
3106
|
+
"toml_writer",
|
|
3107
|
+
"winnow",
|
|
3108
|
+
]
|
|
3109
|
+
|
|
3110
|
+
[[package]]
|
|
3111
|
+
name = "toml_parser"
|
|
3112
|
+
version = "1.1.7+spec-1.1.0"
|
|
3113
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
3114
|
+
checksum = "0bb28d6e049a9766c3bd91a8326e6179f5b132dec87906bb97018ef7a2f3431a"
|
|
3115
|
+
dependencies = [
|
|
3116
|
+
"winnow",
|
|
3117
|
+
]
|
|
3118
|
+
|
|
3119
|
+
[[package]]
|
|
3120
|
+
name = "toml_writer"
|
|
3121
|
+
version = "1.2.0+spec-1.1.0"
|
|
3122
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
3123
|
+
checksum = "009dbb7700f11c55ef83aebbe4c0e9cf1f1ac0844bd8d6f00dc38f302026e13a"
|
|
3124
|
+
|
|
3087
3125
|
[[package]]
|
|
3088
3126
|
name = "ttf-parser"
|
|
3089
3127
|
version = "0.25.1"
|
|
@@ -3713,6 +3751,15 @@ version = "0.52.6"
|
|
|
3713
3751
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
3714
3752
|
checksum = "589f6da84c646204747d1270a2a5661ea66ed1cced2631d546fdfb155959f9ec"
|
|
3715
3753
|
|
|
3754
|
+
[[package]]
|
|
3755
|
+
name = "winnow"
|
|
3756
|
+
version = "1.0.5"
|
|
3757
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
3758
|
+
checksum = "8c3b93199df0ab874cdf0c6a94f0a0dc3423fe41f1cafb62b8bd7b1deb277aef"
|
|
3759
|
+
dependencies = [
|
|
3760
|
+
"memchr",
|
|
3761
|
+
]
|
|
3762
|
+
|
|
3716
3763
|
[[package]]
|
|
3717
3764
|
name = "winreg"
|
|
3718
3765
|
version = "0.56.0"
|
|
@@ -22,7 +22,7 @@ members = ["crates/flowproof-driver", "crates/flowproof-trace", "crates/flowproo
|
|
|
22
22
|
exclude = ["spike/windows-containment"]
|
|
23
23
|
|
|
24
24
|
[workspace.package]
|
|
25
|
-
version = "0.
|
|
25
|
+
version = "0.26.0"
|
|
26
26
|
edition = "2021"
|
|
27
27
|
license = "Apache-2.0"
|
|
28
28
|
repository = "https://github.com/automators-com/flowproof"
|
|
@@ -45,6 +45,9 @@ serde_yaml = { workspace = true }
|
|
|
45
45
|
# Side-effect path redaction hashes what it will not store. Already in the
|
|
46
46
|
# build graph via pdf-extract, so no new crate compiles.
|
|
47
47
|
sha2 = "0.10"
|
|
48
|
+
# `flowproof mcp install --codex` edits the user's hand-written Codex
|
|
49
|
+
# `config.toml`; format-preserving, so their comments and key order survive.
|
|
50
|
+
toml_edit = "0.25"
|
|
48
51
|
# Best-effort "a newer version exists" check (crates/flowproof-cli/src/update_check.rs).
|
|
49
52
|
# Already in the build graph via flowproof-agent's model-client calls, so no
|
|
50
53
|
# new crate compiles.
|
|
@@ -6,6 +6,7 @@ mod agent_surface;
|
|
|
6
6
|
mod capture;
|
|
7
7
|
pub mod config;
|
|
8
8
|
mod doctor;
|
|
9
|
+
mod mcp_codex;
|
|
9
10
|
mod mcp_install;
|
|
10
11
|
mod mcp_server;
|
|
11
12
|
mod mcp_tools;
|
|
@@ -322,14 +323,35 @@ enum McpAction {
|
|
|
322
323
|
/// Write only `.gemini/settings.json`.
|
|
323
324
|
#[arg(long)]
|
|
324
325
|
gemini: bool,
|
|
326
|
+
/// Register the server with the Claude desktop app, in its
|
|
327
|
+
/// per-user `claude_desktop_config.json`. On its own, writes
|
|
328
|
+
/// nothing into the project.
|
|
329
|
+
#[arg(long)]
|
|
330
|
+
claude_desktop: bool,
|
|
331
|
+
/// Register the server with Codex (CLI, IDE extension and desktop
|
|
332
|
+
/// app), in its per-user `config.toml` under `$CODEX_HOME` or
|
|
333
|
+
/// `~/.codex`. On its own, writes nothing into the project.
|
|
334
|
+
#[arg(long)]
|
|
335
|
+
codex: bool,
|
|
325
336
|
/// Print the entry for a client this command does not know, and
|
|
326
337
|
/// write nothing.
|
|
327
338
|
#[arg(long)]
|
|
328
339
|
print: bool,
|
|
329
340
|
/// Replace a `flowproof` entry that is already there with
|
|
330
|
-
/// different content
|
|
341
|
+
/// different content, or with `--remove`, remove one that does not
|
|
342
|
+
/// match.
|
|
331
343
|
#[arg(long)]
|
|
332
344
|
force: bool,
|
|
345
|
+
/// Start this engine instead of `flowproof` from PATH: an absolute
|
|
346
|
+
/// path, for an engine that is not on PATH (Flowproof Desktop passes
|
|
347
|
+
/// the one it bundles).
|
|
348
|
+
#[arg(long, value_name = "PATH")]
|
|
349
|
+
command: Option<String>,
|
|
350
|
+
/// Take the `flowproof` entry out instead of adding it. An entry
|
|
351
|
+
/// other than the one install would write stays unless `--force`.
|
|
352
|
+
/// Skill files are left in place.
|
|
353
|
+
#[arg(long, conflicts_with = "print")]
|
|
354
|
+
remove: bool,
|
|
333
355
|
},
|
|
334
356
|
}
|
|
335
357
|
|
|
@@ -5328,17 +5350,27 @@ where
|
|
|
5328
5350
|
claude,
|
|
5329
5351
|
cursor,
|
|
5330
5352
|
gemini,
|
|
5353
|
+
claude_desktop,
|
|
5354
|
+
codex,
|
|
5331
5355
|
print,
|
|
5332
5356
|
force,
|
|
5357
|
+
command,
|
|
5358
|
+
remove,
|
|
5333
5359
|
}),
|
|
5334
5360
|
} => mcp_install::cmd_install(
|
|
5335
5361
|
&mcp_install::Clients {
|
|
5336
5362
|
claude,
|
|
5337
5363
|
cursor,
|
|
5338
5364
|
gemini,
|
|
5365
|
+
claude_desktop,
|
|
5366
|
+
codex,
|
|
5367
|
+
},
|
|
5368
|
+
&mcp_install::Options {
|
|
5369
|
+
print,
|
|
5370
|
+
force,
|
|
5371
|
+
remove,
|
|
5372
|
+
command: command.as_deref(),
|
|
5339
5373
|
},
|
|
5340
|
-
print,
|
|
5341
|
-
force,
|
|
5342
5374
|
),
|
|
5343
5375
|
};
|
|
5344
5376
|
// Skipped for mcp-stdio and mcp: those commands' contract is stdout
|
|
@@ -0,0 +1,293 @@
|
|
|
1
|
+
//! `flowproof mcp install --codex`: the `[mcp_servers.flowproof]` table in
|
|
2
|
+
//! Codex's per-user `config.toml` (Flowproof Desktop's plan 008). Codex's
|
|
3
|
+
//! CLI, IDE extension and desktop app all read that file.
|
|
4
|
+
//!
|
|
5
|
+
//! Keys as OpenAI's Codex MCP docs gave them on 2026-11-26
|
|
6
|
+
//! (developers.openai.com/codex/mcp): one `[mcp_servers.<name>]` table per
|
|
7
|
+
//! server, `command` plus optional `args` for stdio. The file lives in
|
|
8
|
+
//! `$CODEX_HOME`, which defaults to `~/.codex`.
|
|
9
|
+
//!
|
|
10
|
+
//! People edit this file by hand, so the edit goes through `toml_edit`:
|
|
11
|
+
//! comments, key order and every other table survive. Only the `flowproof`
|
|
12
|
+
//! table is written or removed. Keys the user added to it (`env`, timeouts)
|
|
13
|
+
//! don't stop it counting as ours, and stay when it is already current.
|
|
14
|
+
|
|
15
|
+
use std::ffi::OsString;
|
|
16
|
+
use std::path::{Path, PathBuf};
|
|
17
|
+
|
|
18
|
+
use toml_edit::{value, Array, DocumentMut, Item, Table};
|
|
19
|
+
|
|
20
|
+
/// `$CODEX_HOME/config.toml`, or `~/.codex/config.toml`.
|
|
21
|
+
pub(crate) fn config_path() -> Result<PathBuf, String> {
|
|
22
|
+
path_from(std::env::var_os("CODEX_HOME"), dirs::home_dir())
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
fn path_from(codex_home: Option<OsString>, home: Option<PathBuf>) -> Result<PathBuf, String> {
|
|
26
|
+
let dir = match codex_home.filter(|v| !v.is_empty()) {
|
|
27
|
+
Some(dir) => PathBuf::from(dir),
|
|
28
|
+
None => home
|
|
29
|
+
.ok_or("could not find your home folder")?
|
|
30
|
+
.join(".codex"),
|
|
31
|
+
};
|
|
32
|
+
Ok(dir.join("config.toml"))
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
/// The table `--print --codex` shows.
|
|
36
|
+
pub(crate) fn render_entry(command: &str) -> String {
|
|
37
|
+
let mut doc = DocumentMut::new();
|
|
38
|
+
let mut servers = Table::new();
|
|
39
|
+
servers.set_implicit(true);
|
|
40
|
+
servers.insert("flowproof", Item::Table(table(command)));
|
|
41
|
+
doc.insert("mcp_servers", Item::Table(servers));
|
|
42
|
+
doc.to_string()
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
fn table(command: &str) -> Table {
|
|
46
|
+
let mut table = Table::new();
|
|
47
|
+
table.insert("command", value(command));
|
|
48
|
+
table.insert("args", value(Array::from_iter(["mcp"])));
|
|
49
|
+
table
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
/// Whether an existing `flowproof` table starts `command mcp`.
|
|
53
|
+
fn matches(existing: &Item, command: &str) -> bool {
|
|
54
|
+
let args = existing.get("args").and_then(Item::as_array).map(|args| {
|
|
55
|
+
args.iter()
|
|
56
|
+
.map(|arg| arg.as_str().unwrap_or_default())
|
|
57
|
+
.collect::<Vec<_>>()
|
|
58
|
+
});
|
|
59
|
+
existing.get("command").and_then(Item::as_str) == Some(command)
|
|
60
|
+
&& args.as_deref() == Some(&["mcp"][..])
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
/// Add the `flowproof` table. Returns false when one starting the same
|
|
64
|
+
/// engine is already there.
|
|
65
|
+
pub(crate) fn install(path: &Path, command: &str, force: bool) -> Result<bool, String> {
|
|
66
|
+
let shown = path.display();
|
|
67
|
+
let mut doc = read(path)?.unwrap_or_default();
|
|
68
|
+
let servers = doc.entry("mcp_servers").or_insert_with(|| {
|
|
69
|
+
let mut servers = Table::new();
|
|
70
|
+
servers.set_implicit(true);
|
|
71
|
+
Item::Table(servers)
|
|
72
|
+
});
|
|
73
|
+
let Some(servers) = servers.as_table_mut() else {
|
|
74
|
+
return Err(format!(
|
|
75
|
+
"{shown}: `mcp_servers` is not a table, so the file is left alone; add the \
|
|
76
|
+
`flowproof` entry by hand (`flowproof mcp install --codex --print` shows it)"
|
|
77
|
+
));
|
|
78
|
+
};
|
|
79
|
+
match servers.get("flowproof") {
|
|
80
|
+
Some(existing) if matches(existing, command) => return Ok(false),
|
|
81
|
+
Some(_) if !force => {
|
|
82
|
+
return Err(format!(
|
|
83
|
+
"{shown} already has a different `flowproof` entry; pass --force to replace it"
|
|
84
|
+
))
|
|
85
|
+
}
|
|
86
|
+
_ => {}
|
|
87
|
+
}
|
|
88
|
+
servers.insert("flowproof", Item::Table(table(command)));
|
|
89
|
+
if let Some(parent) = path.parent() {
|
|
90
|
+
std::fs::create_dir_all(parent)
|
|
91
|
+
.map_err(|e| format!("could not create {}: {e}", parent.display()))?;
|
|
92
|
+
}
|
|
93
|
+
write(path, &doc)?;
|
|
94
|
+
Ok(true)
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
/// Take the `flowproof` table out. One that starts another engine stays
|
|
98
|
+
/// unless `force`. Returns false when there is none.
|
|
99
|
+
pub(crate) fn uninstall(path: &Path, command: &str, force: bool) -> Result<bool, String> {
|
|
100
|
+
let shown = path.display();
|
|
101
|
+
let Some(mut doc) = read(path)? else {
|
|
102
|
+
return Ok(false);
|
|
103
|
+
};
|
|
104
|
+
let Some(servers) = doc.get_mut("mcp_servers").and_then(Item::as_table_mut) else {
|
|
105
|
+
return Ok(false);
|
|
106
|
+
};
|
|
107
|
+
match servers.get("flowproof") {
|
|
108
|
+
None => return Ok(false),
|
|
109
|
+
Some(existing) if !matches(existing, command) && !force => {
|
|
110
|
+
return Err(format!(
|
|
111
|
+
"{shown} has a different `flowproof` entry, so it is left alone; pass --force \
|
|
112
|
+
to remove it anyway"
|
|
113
|
+
))
|
|
114
|
+
}
|
|
115
|
+
_ => {}
|
|
116
|
+
}
|
|
117
|
+
servers.remove("flowproof");
|
|
118
|
+
write(path, &doc)?;
|
|
119
|
+
Ok(true)
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
/// The parsed file, or `None` when there is none.
|
|
123
|
+
fn read(path: &Path) -> Result<Option<DocumentMut>, String> {
|
|
124
|
+
let shown = path.display();
|
|
125
|
+
match std::fs::read_to_string(path) {
|
|
126
|
+
Ok(text) => text
|
|
127
|
+
.parse::<DocumentMut>()
|
|
128
|
+
.map(Some)
|
|
129
|
+
.map_err(|e| format!("{shown} is not valid TOML, so it is left alone: {e}")),
|
|
130
|
+
Err(e) if e.kind() == std::io::ErrorKind::NotFound => Ok(None),
|
|
131
|
+
Err(e) => Err(format!("could not read {shown}: {e}")),
|
|
132
|
+
}
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
fn write(path: &Path, doc: &DocumentMut) -> Result<(), String> {
|
|
136
|
+
std::fs::write(path, doc.to_string())
|
|
137
|
+
.map_err(|e| format!("could not write {}: {e}", path.display()))
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
#[cfg(test)]
|
|
141
|
+
mod tests {
|
|
142
|
+
use super::*;
|
|
143
|
+
|
|
144
|
+
const ENGINE: &str = "/Applications/flowproof.app/Contents/MacOS/flowproof-engine";
|
|
145
|
+
|
|
146
|
+
fn temp_config(name: &str) -> PathBuf {
|
|
147
|
+
let dir = std::env::temp_dir().join(format!("flowproof-mcp-codex-{name}"));
|
|
148
|
+
std::fs::remove_dir_all(&dir).ok();
|
|
149
|
+
dir.join(".codex").join("config.toml")
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
fn parsed(path: &Path) -> DocumentMut {
|
|
153
|
+
std::fs::read_to_string(path)
|
|
154
|
+
.expect("read")
|
|
155
|
+
.parse()
|
|
156
|
+
.expect("toml")
|
|
157
|
+
}
|
|
158
|
+
|
|
159
|
+
fn command_in(path: &Path) -> Option<String> {
|
|
160
|
+
parsed(path)
|
|
161
|
+
.get("mcp_servers")
|
|
162
|
+
.and_then(|servers| servers.get("flowproof"))
|
|
163
|
+
.and_then(|entry| entry.get("command"))
|
|
164
|
+
.and_then(Item::as_str)
|
|
165
|
+
.map(str::to_owned)
|
|
166
|
+
}
|
|
167
|
+
|
|
168
|
+
fn cleanup(path: &Path) {
|
|
169
|
+
if let Some(dir) = path.parent().and_then(Path::parent) {
|
|
170
|
+
std::fs::remove_dir_all(dir).ok();
|
|
171
|
+
}
|
|
172
|
+
}
|
|
173
|
+
|
|
174
|
+
#[test]
|
|
175
|
+
fn codex_home_wins_over_the_home_folder() {
|
|
176
|
+
let home = Some(PathBuf::from("/home/me"));
|
|
177
|
+
assert_eq!(
|
|
178
|
+
path_from(None, home.clone()).expect("default"),
|
|
179
|
+
Path::new("/home/me/.codex/config.toml")
|
|
180
|
+
);
|
|
181
|
+
assert_eq!(
|
|
182
|
+
path_from(Some("/srv/codex".into()), home.clone()).expect("set"),
|
|
183
|
+
Path::new("/srv/codex/config.toml")
|
|
184
|
+
);
|
|
185
|
+
assert_eq!(
|
|
186
|
+
path_from(Some("".into()), home).expect("empty"),
|
|
187
|
+
Path::new("/home/me/.codex/config.toml")
|
|
188
|
+
);
|
|
189
|
+
assert!(path_from(None, None).is_err());
|
|
190
|
+
}
|
|
191
|
+
|
|
192
|
+
#[test]
|
|
193
|
+
fn a_new_file_gets_just_the_flowproof_table() {
|
|
194
|
+
let path = temp_config("new");
|
|
195
|
+
assert!(install(&path, ENGINE, false).expect("install"));
|
|
196
|
+
let text = std::fs::read_to_string(&path).expect("read");
|
|
197
|
+
assert_eq!(text, render_entry(ENGINE));
|
|
198
|
+
assert!(text.starts_with("[mcp_servers.flowproof]\n"), "{text}");
|
|
199
|
+
assert!(!text.contains("[mcp_servers]\n"), "{text}");
|
|
200
|
+
assert!(!install(&path, ENGINE, false).expect("again"));
|
|
201
|
+
assert_eq!(std::fs::read_to_string(&path).expect("read"), text);
|
|
202
|
+
cleanup(&path);
|
|
203
|
+
}
|
|
204
|
+
|
|
205
|
+
#[test]
|
|
206
|
+
fn comments_and_other_settings_survive_install_and_remove() {
|
|
207
|
+
let path = temp_config("keeps");
|
|
208
|
+
std::fs::create_dir_all(path.parent().expect("parent")).expect("folder");
|
|
209
|
+
let before = "# my settings\nmodel = \"gpt-5\" # pinned\n\n\
|
|
210
|
+
[mcp_servers.other]\ncommand = \"x\"\nargs = [\"serve\"]\n";
|
|
211
|
+
std::fs::write(&path, before).expect("write");
|
|
212
|
+
assert!(install(&path, ENGINE, false).expect("install"));
|
|
213
|
+
let after = std::fs::read_to_string(&path).expect("read");
|
|
214
|
+
assert!(after.starts_with(before), "{after}");
|
|
215
|
+
assert_eq!(command_in(&path).as_deref(), Some(ENGINE));
|
|
216
|
+
assert!(uninstall(&path, ENGINE, false).expect("remove"));
|
|
217
|
+
assert_eq!(std::fs::read_to_string(&path).expect("read"), before);
|
|
218
|
+
cleanup(&path);
|
|
219
|
+
}
|
|
220
|
+
|
|
221
|
+
#[test]
|
|
222
|
+
fn keys_the_user_added_keep_it_current() {
|
|
223
|
+
let path = temp_config("extra");
|
|
224
|
+
std::fs::create_dir_all(path.parent().expect("parent")).expect("folder");
|
|
225
|
+
let text = format!(
|
|
226
|
+
"[mcp_servers.flowproof]\ncommand = \"{ENGINE}\"\nargs = [\"mcp\"]\n\
|
|
227
|
+
startup_timeout_sec = 30\n"
|
|
228
|
+
);
|
|
229
|
+
std::fs::write(&path, &text).expect("write");
|
|
230
|
+
assert!(!install(&path, ENGINE, false).expect("current"));
|
|
231
|
+
assert_eq!(std::fs::read_to_string(&path).expect("read"), text);
|
|
232
|
+
assert!(uninstall(&path, ENGINE, false).expect("ours"));
|
|
233
|
+
cleanup(&path);
|
|
234
|
+
}
|
|
235
|
+
|
|
236
|
+
#[test]
|
|
237
|
+
fn a_windows_path_is_written_verbatim() {
|
|
238
|
+
let path = temp_config("windows");
|
|
239
|
+
let windows = r"C:\Program Files\flowproof\flowproof-engine.exe";
|
|
240
|
+
assert!(install(&path, windows, false).expect("install"));
|
|
241
|
+
assert_eq!(command_in(&path).as_deref(), Some(windows));
|
|
242
|
+
assert!(!install(&path, windows, false).expect("again"));
|
|
243
|
+
cleanup(&path);
|
|
244
|
+
}
|
|
245
|
+
|
|
246
|
+
#[test]
|
|
247
|
+
fn a_different_entry_needs_force() {
|
|
248
|
+
let path = temp_config("force");
|
|
249
|
+
std::fs::create_dir_all(path.parent().expect("parent")).expect("folder");
|
|
250
|
+
let theirs = "[mcp_servers.flowproof]\ncommand = \"flowproof\"\nargs = [\"mcp\"]\n";
|
|
251
|
+
std::fs::write(&path, theirs).expect("write");
|
|
252
|
+
let refused = install(&path, ENGINE, false).expect_err("refused");
|
|
253
|
+
assert!(refused.contains("--force"), "{refused}");
|
|
254
|
+
let refused = uninstall(&path, ENGINE, false).expect_err("refused");
|
|
255
|
+
assert!(refused.contains("--force"), "{refused}");
|
|
256
|
+
assert_eq!(std::fs::read_to_string(&path).expect("read"), theirs);
|
|
257
|
+
assert!(install(&path, ENGINE, true).expect("forced"));
|
|
258
|
+
assert_eq!(command_in(&path).as_deref(), Some(ENGINE));
|
|
259
|
+
std::fs::write(&path, theirs).expect("write");
|
|
260
|
+
assert!(uninstall(&path, ENGINE, true).expect("forced"));
|
|
261
|
+
assert_eq!(command_in(&path), None);
|
|
262
|
+
cleanup(&path);
|
|
263
|
+
}
|
|
264
|
+
|
|
265
|
+
#[test]
|
|
266
|
+
fn remove_without_a_file_creates_nothing() {
|
|
267
|
+
let path = temp_config("missing");
|
|
268
|
+
assert!(!uninstall(&path, ENGINE, false).expect("no file"));
|
|
269
|
+
assert!(!path.exists());
|
|
270
|
+
cleanup(&path);
|
|
271
|
+
}
|
|
272
|
+
|
|
273
|
+
#[test]
|
|
274
|
+
fn invalid_toml_is_left_alone() {
|
|
275
|
+
let path = temp_config("invalid");
|
|
276
|
+
std::fs::create_dir_all(path.parent().expect("parent")).expect("folder");
|
|
277
|
+
std::fs::write(&path, "model = \n").expect("write");
|
|
278
|
+
let refused = install(&path, ENGINE, false).expect_err("refused");
|
|
279
|
+
assert!(refused.contains("not valid TOML"), "{refused}");
|
|
280
|
+
assert_eq!(std::fs::read_to_string(&path).expect("read"), "model = \n");
|
|
281
|
+
cleanup(&path);
|
|
282
|
+
}
|
|
283
|
+
|
|
284
|
+
#[test]
|
|
285
|
+
fn an_inline_mcp_servers_is_left_alone() {
|
|
286
|
+
let path = temp_config("inline");
|
|
287
|
+
std::fs::create_dir_all(path.parent().expect("parent")).expect("folder");
|
|
288
|
+
std::fs::write(&path, "mcp_servers = {}\n").expect("write");
|
|
289
|
+
let refused = install(&path, ENGINE, false).expect_err("refused");
|
|
290
|
+
assert!(refused.contains("--print"), "{refused}");
|
|
291
|
+
cleanup(&path);
|
|
292
|
+
}
|
|
293
|
+
}
|