running-process 4.2.0__tar.gz → 4.3.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.
- {running_process-4.2.0 → running_process-4.3.0}/Cargo.lock +2 -2
- {running_process-4.2.0 → running_process-4.3.0}/Cargo.toml +1 -1
- {running_process-4.2.0 → running_process-4.3.0}/PKG-INFO +1 -1
- {running_process-4.2.0 → running_process-4.3.0}/crates/running-process/Cargo.toml +5 -0
- {running_process-4.2.0 → running_process-4.3.0}/crates/running-process/src/bin/daemon.rs +31 -0
- {running_process-4.2.0 → running_process-4.3.0}/crates/running-process/src/bin/runpm.rs +118 -9
- running_process-4.3.0/crates/running-process/src/broker/adopt.rs +273 -0
- running_process-4.3.0/crates/running-process/src/broker/builders.rs +225 -0
- {running_process-4.2.0 → running_process-4.3.0}/crates/running-process/src/broker/client.rs +64 -0
- {running_process-4.2.0 → running_process-4.3.0}/crates/running-process/src/broker/mod.rs +2 -0
- {running_process-4.2.0 → running_process-4.3.0}/crates/running-process/src/daemon/handlers/mod.rs +2 -0
- running_process-4.3.0/crates/running-process/src/daemon/handlers/services.rs +259 -0
- {running_process-4.2.0 → running_process-4.3.0}/crates/running-process/src/daemon/handlers_tests.rs +5 -0
- {running_process-4.2.0 → running_process-4.3.0}/crates/running-process/src/daemon/mod.rs +1 -0
- {running_process-4.2.0 → running_process-4.3.0}/crates/running-process/src/daemon/reaper.rs +8 -0
- {running_process-4.2.0 → running_process-4.3.0}/crates/running-process/src/daemon/server.rs +25 -0
- running_process-4.3.0/crates/running-process/src/daemon/services.rs +1024 -0
- {running_process-4.2.0 → running_process-4.3.0}/crates/running-process/src/lib.rs +93 -4
- running_process-4.3.0/crates/running-process/src/observer/mod.rs +367 -0
- running_process-4.3.0/crates/running-process/src/observer/tests.rs +184 -0
- running_process-4.3.0/crates/running-process/tests/broker/builders.rs +99 -0
- {running_process-4.2.0 → running_process-4.3.0}/crates/running-process/tests/broker/client.rs +69 -2
- {running_process-4.2.0 → running_process-4.3.0}/crates/running-process/tests/broker/main.rs +2 -0
- running_process-4.3.0/crates/running-process/tests/broker/toy_three_party.rs +306 -0
- {running_process-4.2.0 → running_process-4.3.0}/crates/running-process/tests/daemon_autostart_test.rs +8 -0
- {running_process-4.2.0 → running_process-4.3.0}/crates/running-process/tests/daemon_runpm_service_stubs.rs +78 -61
- {running_process-4.2.0 → running_process-4.3.0}/pyproject.toml +1 -1
- {running_process-4.2.0 → running_process-4.3.0}/src/running_process/__init__.py +1 -1
- running_process-4.2.0/crates/running-process/src/daemon/handlers/services.rs +0 -125
- {running_process-4.2.0 → running_process-4.3.0}/LICENSE +0 -0
- {running_process-4.2.0 → running_process-4.3.0}/README.md +0 -0
- {running_process-4.2.0 → running_process-4.3.0}/crates/running-process/README.md +0 -0
- {running_process-4.2.0 → running_process-4.3.0}/crates/running-process/build.rs +0 -0
- {running_process-4.2.0 → running_process-4.3.0}/crates/running-process/examples/handoff_rollout_evidence.rs +0 -0
- {running_process-4.2.0 → running_process-4.3.0}/crates/running-process/proto/broker_v1/broker_v1_admin.proto +0 -0
- {running_process-4.2.0 → running_process-4.3.0}/crates/running-process/proto/broker_v1/broker_v1_envelope.proto +0 -0
- {running_process-4.2.0 → running_process-4.3.0}/crates/running-process/proto/broker_v1/broker_v1_manifest.proto +0 -0
- {running_process-4.2.0 → running_process-4.3.0}/crates/running-process/proto/broker_v1/broker_v1_service_def.proto +0 -0
- {running_process-4.2.0 → running_process-4.3.0}/crates/running-process/proto/broker_v1/buf.yaml +0 -0
- {running_process-4.2.0 → running_process-4.3.0}/crates/running-process/proto/daemon.proto +0 -0
- {running_process-4.2.0 → running_process-4.3.0}/crates/running-process/src/bin/running-process-broker-v1.rs +0 -0
- {running_process-4.2.0 → running_process-4.3.0}/crates/running-process/src/bin/running-process-cleanup.rs +0 -0
- {running_process-4.2.0 → running_process-4.3.0}/crates/running-process/src/bin/trampoline.rs +0 -0
- {running_process-4.2.0 → running_process-4.3.0}/crates/running-process/src/broker/backend_handle.rs +0 -0
- {running_process-4.2.0 → running_process-4.3.0}/crates/running-process/src/broker/backend_lib/accept_handed_off.rs +0 -0
- {running_process-4.2.0 → running_process-4.3.0}/crates/running-process/src/broker/backend_lib/mod.rs +0 -0
- {running_process-4.2.0 → running_process-4.3.0}/crates/running-process/src/broker/backend_lib/wire.rs +0 -0
- {running_process-4.2.0 → running_process-4.3.0}/crates/running-process/src/broker/backend_lifecycle/identity.rs +0 -0
- {running_process-4.2.0 → running_process-4.3.0}/crates/running-process/src/broker/backend_lifecycle/mod.rs +0 -0
- {running_process-4.2.0 → running_process-4.3.0}/crates/running-process/src/broker/backend_lifecycle/probe.rs +0 -0
- {running_process-4.2.0 → running_process-4.3.0}/crates/running-process/src/broker/backend_lifecycle/probe_async.rs +0 -0
- {running_process-4.2.0 → running_process-4.3.0}/crates/running-process/src/broker/backend_lifecycle/verify_pid.rs +0 -0
- {running_process-4.2.0 → running_process-4.3.0}/crates/running-process/src/broker/backend_sdk/frame_client.rs +0 -0
- {running_process-4.2.0 → running_process-4.3.0}/crates/running-process/src/broker/backend_sdk/frame_client_async.rs +0 -0
- {running_process-4.2.0 → running_process-4.3.0}/crates/running-process/src/broker/backend_sdk/identity_file.rs +0 -0
- {running_process-4.2.0 → running_process-4.3.0}/crates/running-process/src/broker/backend_sdk/mod.rs +0 -0
- {running_process-4.2.0 → running_process-4.3.0}/crates/running-process/src/broker/backend_sdk/mux.rs +0 -0
- {running_process-4.2.0 → running_process-4.3.0}/crates/running-process/src/broker/capabilities.rs +0 -0
- {running_process-4.2.0 → running_process-4.3.0}/crates/running-process/src/broker/doctor.rs +0 -0
- {running_process-4.2.0 → running_process-4.3.0}/crates/running-process/src/broker/fs_health.rs +0 -0
- {running_process-4.2.0 → running_process-4.3.0}/crates/running-process/src/broker/host_identity.rs +0 -0
- {running_process-4.2.0 → running_process-4.3.0}/crates/running-process/src/broker/lifecycle/crash_dump.rs +0 -0
- {running_process-4.2.0 → running_process-4.3.0}/crates/running-process/src/broker/lifecycle/mod.rs +0 -0
- {running_process-4.2.0 → running_process-4.3.0}/crates/running-process/src/broker/lifecycle/names.rs +0 -0
- {running_process-4.2.0 → running_process-4.3.0}/crates/running-process/src/broker/lifecycle/privilege.rs +0 -0
- {running_process-4.2.0 → running_process-4.3.0}/crates/running-process/src/broker/lifecycle/process_tree.rs +0 -0
- {running_process-4.2.0 → running_process-4.3.0}/crates/running-process/src/broker/lifecycle/sid.rs +0 -0
- {running_process-4.2.0 → running_process-4.3.0}/crates/running-process/src/broker/manifest.rs +0 -0
- {running_process-4.2.0 → running_process-4.3.0}/crates/running-process/src/broker/protocol/frame_ext.rs +0 -0
- {running_process-4.2.0 → running_process-4.3.0}/crates/running-process/src/broker/protocol/framing.rs +0 -0
- {running_process-4.2.0 → running_process-4.3.0}/crates/running-process/src/broker/protocol/mod.rs +0 -0
- {running_process-4.2.0 → running_process-4.3.0}/crates/running-process/src/broker/protocol/registry.rs +0 -0
- {running_process-4.2.0 → running_process-4.3.0}/crates/running-process/src/broker/protocol/validate.rs +0 -0
- {running_process-4.2.0 → running_process-4.3.0}/crates/running-process/src/broker/secure_dir.rs +0 -0
- {running_process-4.2.0 → running_process-4.3.0}/crates/running-process/src/broker/server/admin.rs +0 -0
- {running_process-4.2.0 → running_process-4.3.0}/crates/running-process/src/broker/server/backend_endpoint_allocator.rs +0 -0
- {running_process-4.2.0 → running_process-4.3.0}/crates/running-process/src/broker/server/backend_launcher.rs +0 -0
- {running_process-4.2.0 → running_process-4.3.0}/crates/running-process/src/broker/server/backend_registry.rs +0 -0
- {running_process-4.2.0 → running_process-4.3.0}/crates/running-process/src/broker/server/broadcast.rs +0 -0
- {running_process-4.2.0 → running_process-4.3.0}/crates/running-process/src/broker/server/connection.rs +0 -0
- {running_process-4.2.0 → running_process-4.3.0}/crates/running-process/src/broker/server/control_socket.rs +0 -0
- {running_process-4.2.0 → running_process-4.3.0}/crates/running-process/src/broker/server/fd_pressure.rs +0 -0
- {running_process-4.2.0 → running_process-4.3.0}/crates/running-process/src/broker/server/handoff/ack.rs +0 -0
- {running_process-4.2.0 → running_process-4.3.0}/crates/running-process/src/broker/server/handoff/fallback.rs +0 -0
- {running_process-4.2.0 → running_process-4.3.0}/crates/running-process/src/broker/server/handoff/handoff_token.rs +0 -0
- {running_process-4.2.0 → running_process-4.3.0}/crates/running-process/src/broker/server/handoff/latency.rs +0 -0
- {running_process-4.2.0 → running_process-4.3.0}/crates/running-process/src/broker/server/handoff/mod.rs +0 -0
- {running_process-4.2.0 → running_process-4.3.0}/crates/running-process/src/broker/server/handoff/orchestrate.rs +0 -0
- {running_process-4.2.0 → running_process-4.3.0}/crates/running-process/src/broker/server/handoff/orchestrate_unix.rs +0 -0
- {running_process-4.2.0 → running_process-4.3.0}/crates/running-process/src/broker/server/handoff/pending.rs +0 -0
- {running_process-4.2.0 → running_process-4.3.0}/crates/running-process/src/broker/server/handoff/unix.rs +0 -0
- {running_process-4.2.0 → running_process-4.3.0}/crates/running-process/src/broker/server/handoff/windows.rs +0 -0
- {running_process-4.2.0 → running_process-4.3.0}/crates/running-process/src/broker/server/handoff/wire.rs +0 -0
- {running_process-4.2.0 → running_process-4.3.0}/crates/running-process/src/broker/server/handoff_serve.rs +0 -0
- {running_process-4.2.0 → running_process-4.3.0}/crates/running-process/src/broker/server/hello_handler.rs +0 -0
- {running_process-4.2.0 → running_process-4.3.0}/crates/running-process/src/broker/server/hello_router.rs +0 -0
- {running_process-4.2.0 → running_process-4.3.0}/crates/running-process/src/broker/server/idle_coord.rs +0 -0
- {running_process-4.2.0 → running_process-4.3.0}/crates/running-process/src/broker/server/instance.rs +0 -0
- {running_process-4.2.0 → running_process-4.3.0}/crates/running-process/src/broker/server/metrics.rs +0 -0
- {running_process-4.2.0 → running_process-4.3.0}/crates/running-process/src/broker/server/mod.rs +0 -0
- {running_process-4.2.0 → running_process-4.3.0}/crates/running-process/src/broker/server/perf_guard.rs +0 -0
- {running_process-4.2.0 → running_process-4.3.0}/crates/running-process/src/broker/server/recovery.rs +0 -0
- {running_process-4.2.0 → running_process-4.3.0}/crates/running-process/src/broker/server/serve.rs +0 -0
- {running_process-4.2.0 → running_process-4.3.0}/crates/running-process/src/broker/server/service_def_loader.rs +0 -0
- {running_process-4.2.0 → running_process-4.3.0}/crates/running-process/src/broker/server/spawn_coordinator.rs +0 -0
- {running_process-4.2.0 → running_process-4.3.0}/crates/running-process/src/broker/server/spawn_wait.rs +0 -0
- {running_process-4.2.0 → running_process-4.3.0}/crates/running-process/src/broker/server/trace_context.rs +0 -0
- {running_process-4.2.0 → running_process-4.3.0}/crates/running-process/src/broker/server/version_allow_list.rs +0 -0
- {running_process-4.2.0 → running_process-4.3.0}/crates/running-process/src/cleanup/instances.rs +0 -0
- {running_process-4.2.0 → running_process-4.3.0}/crates/running-process/src/cleanup/list.rs +0 -0
- {running_process-4.2.0 → running_process-4.3.0}/crates/running-process/src/cleanup/mod.rs +0 -0
- {running_process-4.2.0 → running_process-4.3.0}/crates/running-process/src/cleanup/prune.rs +0 -0
- {running_process-4.2.0 → running_process-4.3.0}/crates/running-process/src/cleanup/uninstall.rs +0 -0
- {running_process-4.2.0 → running_process-4.3.0}/crates/running-process/src/cleanup/verify_artifacts.rs +0 -0
- {running_process-4.2.0 → running_process-4.3.0}/crates/running-process/src/cleanup/verify_basic.rs +0 -0
- {running_process-4.2.0 → running_process-4.3.0}/crates/running-process/src/client/client.rs +0 -0
- {running_process-4.2.0 → running_process-4.3.0}/crates/running-process/src/client/mod.rs +0 -0
- {running_process-4.2.0 → running_process-4.3.0}/crates/running-process/src/client/paths.rs +0 -0
- {running_process-4.2.0 → running_process-4.3.0}/crates/running-process/src/client/pipe_session.rs +0 -0
- {running_process-4.2.0 → running_process-4.3.0}/crates/running-process/src/client/pty_session.rs +0 -0
- {running_process-4.2.0 → running_process-4.3.0}/crates/running-process/src/client/telemetry.rs +0 -0
- {running_process-4.2.0 → running_process-4.3.0}/crates/running-process/src/console_detect.rs +0 -0
- {running_process-4.2.0 → running_process-4.3.0}/crates/running-process/src/containment.rs +0 -0
- {running_process-4.2.0 → running_process-4.3.0}/crates/running-process/src/daemon/attach_stream.rs +0 -0
- {running_process-4.2.0 → running_process-4.3.0}/crates/running-process/src/daemon/config.rs +0 -0
- {running_process-4.2.0 → running_process-4.3.0}/crates/running-process/src/daemon/emergency_reserve.rs +0 -0
- {running_process-4.2.0 → running_process-4.3.0}/crates/running-process/src/daemon/handlers/core.rs +0 -0
- {running_process-4.2.0 → running_process-4.3.0}/crates/running-process/src/daemon/handlers/kill.rs +0 -0
- {running_process-4.2.0 → running_process-4.3.0}/crates/running-process/src/daemon/handlers/maintenance.rs +0 -0
- {running_process-4.2.0 → running_process-4.3.0}/crates/running-process/src/daemon/handlers/pipe_sessions_handlers.rs +0 -0
- {running_process-4.2.0 → running_process-4.3.0}/crates/running-process/src/daemon/handlers/process_tree.rs +0 -0
- {running_process-4.2.0 → running_process-4.3.0}/crates/running-process/src/daemon/handlers/pty_sessions_handlers.rs +0 -0
- {running_process-4.2.0 → running_process-4.3.0}/crates/running-process/src/daemon/handlers/registry_handlers.rs +0 -0
- {running_process-4.2.0 → running_process-4.3.0}/crates/running-process/src/daemon/handlers/spawn.rs +0 -0
- {running_process-4.2.0 → running_process-4.3.0}/crates/running-process/src/daemon/handlers/telemetry.rs +0 -0
- {running_process-4.2.0 → running_process-4.3.0}/crates/running-process/src/daemon/handlers/util.rs +0 -0
- {running_process-4.2.0 → running_process-4.3.0}/crates/running-process/src/daemon/idle.rs +0 -0
- {running_process-4.2.0 → running_process-4.3.0}/crates/running-process/src/daemon/pipe_attach_stream.rs +0 -0
- {running_process-4.2.0 → running_process-4.3.0}/crates/running-process/src/daemon/pipe_sessions.rs +0 -0
- {running_process-4.2.0 → running_process-4.3.0}/crates/running-process/src/daemon/platform/mod.rs +0 -0
- {running_process-4.2.0 → running_process-4.3.0}/crates/running-process/src/daemon/platform/unix.rs +0 -0
- {running_process-4.2.0 → running_process-4.3.0}/crates/running-process/src/daemon/platform/windows.rs +0 -0
- {running_process-4.2.0 → running_process-4.3.0}/crates/running-process/src/daemon/pty_sessions.rs +0 -0
- {running_process-4.2.0 → running_process-4.3.0}/crates/running-process/src/daemon/registry.rs +0 -0
- {running_process-4.2.0 → running_process-4.3.0}/crates/running-process/src/daemon/runtime_gc.rs +0 -0
- {running_process-4.2.0 → running_process-4.3.0}/crates/running-process/src/daemon/shadow.rs +0 -0
- {running_process-4.2.0 → running_process-4.3.0}/crates/running-process/src/daemon/telemetry.rs +0 -0
- {running_process-4.2.0 → running_process-4.3.0}/crates/running-process/src/helpers.rs +0 -0
- {running_process-4.2.0 → running_process-4.3.0}/crates/running-process/src/maintenance/mod.rs +0 -0
- {running_process-4.2.0 → running_process-4.3.0}/crates/running-process/src/maintenance/release_handles.rs +0 -0
- {running_process-4.2.0 → running_process-4.3.0}/crates/running-process/src/originator.rs +0 -0
- {running_process-4.2.0 → running_process-4.3.0}/crates/running-process/src/pty/backend.rs +0 -0
- {running_process-4.2.0 → running_process-4.3.0}/crates/running-process/src/pty/conpty_passthrough/child.rs +0 -0
- {running_process-4.2.0 → running_process-4.3.0}/crates/running-process/src/pty/conpty_passthrough/mod.rs +0 -0
- {running_process-4.2.0 → running_process-4.3.0}/crates/running-process/src/pty/conpty_passthrough/pipes.rs +0 -0
- {running_process-4.2.0 → running_process-4.3.0}/crates/running-process/src/pty/conpty_passthrough/proc_thread_attr.rs +0 -0
- {running_process-4.2.0 → running_process-4.3.0}/crates/running-process/src/pty/conpty_passthrough/pseudoconsole.rs +0 -0
- {running_process-4.2.0 → running_process-4.3.0}/crates/running-process/src/pty/mod.rs +0 -0
- {running_process-4.2.0 → running_process-4.3.0}/crates/running-process/src/pty/native_pty_process.rs +0 -0
- {running_process-4.2.0 → running_process-4.3.0}/crates/running-process/src/pty/pty_posix.rs +0 -0
- {running_process-4.2.0 → running_process-4.3.0}/crates/running-process/src/pty/pty_windows.rs +0 -0
- {running_process-4.2.0 → running_process-4.3.0}/crates/running-process/src/pty/terminal_input.rs +0 -0
- {running_process-4.2.0 → running_process-4.3.0}/crates/running-process/src/public_symbols.rs +0 -0
- {running_process-4.2.0 → running_process-4.3.0}/crates/running-process/src/rust_debug.rs +0 -0
- {running_process-4.2.0 → running_process-4.3.0}/crates/running-process/src/spawn.rs +0 -0
- {running_process-4.2.0 → running_process-4.3.0}/crates/running-process/src/spawn_imp_unix.rs +0 -0
- {running_process-4.2.0 → running_process-4.3.0}/crates/running-process/src/spawn_imp_windows.rs +0 -0
- {running_process-4.2.0 → running_process-4.3.0}/crates/running-process/src/systemd_killmode.rs +0 -0
- {running_process-4.2.0 → running_process-4.3.0}/crates/running-process/src/terminal_graphics.rs +0 -0
- {running_process-4.2.0 → running_process-4.3.0}/crates/running-process/src/test_support/conformance.rs +0 -0
- {running_process-4.2.0 → running_process-4.3.0}/crates/running-process/src/test_support/mod.rs +0 -0
- {running_process-4.2.0 → running_process-4.3.0}/crates/running-process/src/tests.rs +0 -0
- {running_process-4.2.0 → running_process-4.3.0}/crates/running-process/src/types.rs +0 -0
- {running_process-4.2.0 → running_process-4.3.0}/crates/running-process/src/unix.rs +0 -0
- {running_process-4.2.0 → running_process-4.3.0}/crates/running-process/src/windows.rs +0 -0
- {running_process-4.2.0 → running_process-4.3.0}/crates/running-process/tests/broker/admin.rs +0 -0
- {running_process-4.2.0 → running_process-4.3.0}/crates/running-process/tests/broker/backend_endpoint_allocator.rs +0 -0
- {running_process-4.2.0 → running_process-4.3.0}/crates/running-process/tests/broker/backend_handle_boot_id.rs +0 -0
- {running_process-4.2.0 → running_process-4.3.0}/crates/running-process/tests/broker/backend_handle_common.rs +0 -0
- {running_process-4.2.0 → running_process-4.3.0}/crates/running-process/tests/broker/backend_handle_dead.rs +0 -0
- {running_process-4.2.0 → running_process-4.3.0}/crates/running-process/tests/broker/backend_handle_probe.rs +0 -0
- {running_process-4.2.0 → running_process-4.3.0}/crates/running-process/tests/broker/backend_handle_recycled.rs +0 -0
- {running_process-4.2.0 → running_process-4.3.0}/crates/running-process/tests/broker/backend_registry.rs +0 -0
- {running_process-4.2.0 → running_process-4.3.0}/crates/running-process/tests/broker/backend_sdk.rs +0 -0
- {running_process-4.2.0 → running_process-4.3.0}/crates/running-process/tests/broker/backend_sdk_async.rs +0 -0
- {running_process-4.2.0 → running_process-4.3.0}/crates/running-process/tests/broker/broadcast_release_handles.rs +0 -0
- {running_process-4.2.0 → running_process-4.3.0}/crates/running-process/tests/broker/conformance_kit.rs +0 -0
- {running_process-4.2.0 → running_process-4.3.0}/crates/running-process/tests/broker/connection.rs +0 -0
- {running_process-4.2.0 → running_process-4.3.0}/crates/running-process/tests/broker/contrib_templates.rs +0 -0
- {running_process-4.2.0 → running_process-4.3.0}/crates/running-process/tests/broker/docs_escape_hatch.rs +0 -0
- {running_process-4.2.0 → running_process-4.3.0}/crates/running-process/tests/broker/docs_index.rs +0 -0
- {running_process-4.2.0 → running_process-4.3.0}/crates/running-process/tests/broker/doctor.rs +0 -0
- {running_process-4.2.0 → running_process-4.3.0}/crates/running-process/tests/broker/fd_pressure.rs +0 -0
- {running_process-4.2.0 → running_process-4.3.0}/crates/running-process/tests/broker/framing.rs +0 -0
- {running_process-4.2.0 → running_process-4.3.0}/crates/running-process/tests/broker/golden_bytes.rs +0 -0
- {running_process-4.2.0 → running_process-4.3.0}/crates/running-process/tests/broker/handoff_ack_deadline.rs +0 -0
- {running_process-4.2.0 → running_process-4.3.0}/crates/running-process/tests/broker/handoff_adopted_backend.rs +0 -0
- {running_process-4.2.0 → running_process-4.3.0}/crates/running-process/tests/broker/handoff_adoption.rs +0 -0
- {running_process-4.2.0 → running_process-4.3.0}/crates/running-process/tests/broker/handoff_backend_lib.rs +0 -0
- {running_process-4.2.0 → running_process-4.3.0}/crates/running-process/tests/broker/handoff_capability.rs +0 -0
- {running_process-4.2.0 → running_process-4.3.0}/crates/running-process/tests/broker/handoff_cross_os_acceptance.rs +0 -0
- {running_process-4.2.0 → running_process-4.3.0}/crates/running-process/tests/broker/handoff_end_to_end_acceptance.rs +0 -0
- {running_process-4.2.0 → running_process-4.3.0}/crates/running-process/tests/broker/handoff_fallback_perm_denied.rs +0 -0
- {running_process-4.2.0 → running_process-4.3.0}/crates/running-process/tests/broker/handoff_latency.rs +0 -0
- {running_process-4.2.0 → running_process-4.3.0}/crates/running-process/tests/broker/handoff_latency_e2e.rs +0 -0
- {running_process-4.2.0 → running_process-4.3.0}/crates/running-process/tests/broker/handoff_orchestrate.rs +0 -0
- {running_process-4.2.0 → running_process-4.3.0}/crates/running-process/tests/broker/handoff_serve_e2e.rs +0 -0
- {running_process-4.2.0 → running_process-4.3.0}/crates/running-process/tests/broker/handoff_serve_latency.rs +0 -0
- {running_process-4.2.0 → running_process-4.3.0}/crates/running-process/tests/broker/handoff_token_mismatch.rs +0 -0
- {running_process-4.2.0 → running_process-4.3.0}/crates/running-process/tests/broker/handoff_transport.rs +0 -0
- {running_process-4.2.0 → running_process-4.3.0}/crates/running-process/tests/broker/handoff_under_load.rs +0 -0
- {running_process-4.2.0 → running_process-4.3.0}/crates/running-process/tests/broker/handoff_unix_e2e_orchestrate.rs +0 -0
- {running_process-4.2.0 → running_process-4.3.0}/crates/running-process/tests/broker/handoff_unix_orchestrate.rs +0 -0
- {running_process-4.2.0 → running_process-4.3.0}/crates/running-process/tests/broker/handoff_windows_duplicate_handle.rs +0 -0
- {running_process-4.2.0 → running_process-4.3.0}/crates/running-process/tests/broker/handoff_windows_orchestrate.rs +0 -0
- {running_process-4.2.0 → running_process-4.3.0}/crates/running-process/tests/broker/handoff_wire.rs +0 -0
- {running_process-4.2.0 → running_process-4.3.0}/crates/running-process/tests/broker/hello_concurrent.rs +0 -0
- {running_process-4.2.0 → running_process-4.3.0}/crates/running-process/tests/broker/hello_handler.rs +0 -0
- {running_process-4.2.0 → running_process-4.3.0}/crates/running-process/tests/broker/hello_rate_limit.rs +0 -0
- {running_process-4.2.0 → running_process-4.3.0}/crates/running-process/tests/broker/hello_router.rs +0 -0
- {running_process-4.2.0 → running_process-4.3.0}/crates/running-process/tests/broker/hello_service_unknown.rs +0 -0
- {running_process-4.2.0 → running_process-4.3.0}/crates/running-process/tests/broker/hello_skip.rs +0 -0
- {running_process-4.2.0 → running_process-4.3.0}/crates/running-process/tests/broker/hello_version_blocked.rs +0 -0
- {running_process-4.2.0 → running_process-4.3.0}/crates/running-process/tests/broker/idle_coord.rs +0 -0
- {running_process-4.2.0 → running_process-4.3.0}/crates/running-process/tests/broker/instance.rs +0 -0
- {running_process-4.2.0 → running_process-4.3.0}/crates/running-process/tests/broker/instance_isolation.rs +0 -0
- {running_process-4.2.0 → running_process-4.3.0}/crates/running-process/tests/broker/lifecycle_event_size.rs +0 -0
- {running_process-4.2.0 → running_process-4.3.0}/crates/running-process/tests/broker/manifest_atomic.rs +0 -0
- {running_process-4.2.0 → running_process-4.3.0}/crates/running-process/tests/broker/manifest_boot_id.rs +0 -0
- {running_process-4.2.0 → running_process-4.3.0}/crates/running-process/tests/broker/manifest_corruption.rs +0 -0
- {running_process-4.2.0 → running_process-4.3.0}/crates/running-process/tests/broker/manifest_roundtrip.rs +0 -0
- {running_process-4.2.0 → running_process-4.3.0}/crates/running-process/tests/broker/metrics_names_frozen.rs +0 -0
- {running_process-4.2.0 → running_process-4.3.0}/crates/running-process/tests/broker/names.rs +0 -0
- {running_process-4.2.0 → running_process-4.3.0}/crates/running-process/tests/broker/peer_creds_drop.rs +0 -0
- {running_process-4.2.0 → running_process-4.3.0}/crates/running-process/tests/broker/perf_guard.rs +0 -0
- {running_process-4.2.0 → running_process-4.3.0}/crates/running-process/tests/broker/process_tree_lifecycle.rs +0 -0
- {running_process-4.2.0 → running_process-4.3.0}/crates/running-process/tests/broker/proto_field_numbers.rs +0 -0
- {running_process-4.2.0 → running_process-4.3.0}/crates/running-process/tests/broker/proto_roundtrip.rs +0 -0
- {running_process-4.2.0 → running_process-4.3.0}/crates/running-process/tests/broker/recovery_one_retry.rs +0 -0
- {running_process-4.2.0 → running_process-4.3.0}/crates/running-process/tests/broker/serve.rs +0 -0
- {running_process-4.2.0 → running_process-4.3.0}/crates/running-process/tests/broker/service_def_loader.rs +0 -0
- {running_process-4.2.0 → running_process-4.3.0}/crates/running-process/tests/broker/servicedef_cli.rs +0 -0
- {running_process-4.2.0 → running_process-4.3.0}/crates/running-process/tests/broker/socket_common.rs +0 -0
- {running_process-4.2.0 → running_process-4.3.0}/crates/running-process/tests/broker/spawn_coordinator.rs +0 -0
- {running_process-4.2.0 → running_process-4.3.0}/crates/running-process/tests/broker/spawn_wait.rs +0 -0
- {running_process-4.2.0 → running_process-4.3.0}/crates/running-process/tests/broker/trace_propagation.rs +0 -0
- {running_process-4.2.0 → running_process-4.3.0}/crates/running-process/tests/broker/verify_pid/linux.rs +0 -0
- {running_process-4.2.0 → running_process-4.3.0}/crates/running-process/tests/broker/verify_pid/macos.rs +0 -0
- {running_process-4.2.0 → running_process-4.3.0}/crates/running-process/tests/broker/verify_pid/mod.rs +0 -0
- {running_process-4.2.0 → running_process-4.3.0}/crates/running-process/tests/broker/verify_pid/windows.rs +0 -0
- {running_process-4.2.0 → running_process-4.3.0}/crates/running-process/tests/cleanup/cleanup_list.rs +0 -0
- {running_process-4.2.0 → running_process-4.3.0}/crates/running-process/tests/cleanup/cleanup_prune_confirm.rs +0 -0
- {running_process-4.2.0 → running_process-4.3.0}/crates/running-process/tests/cleanup/cleanup_prune_dryrun.rs +0 -0
- {running_process-4.2.0 → running_process-4.3.0}/crates/running-process/tests/cleanup/cleanup_uninstall.rs +0 -0
- {running_process-4.2.0 → running_process-4.3.0}/crates/running-process/tests/cleanup/cleanup_verify_artifacts.rs +0 -0
- {running_process-4.2.0 → running_process-4.3.0}/crates/running-process/tests/cleanup/common.rs +0 -0
- {running_process-4.2.0 → running_process-4.3.0}/crates/running-process/tests/cleanup/main.rs +0 -0
- {running_process-4.2.0 → running_process-4.3.0}/crates/running-process/tests/containment_test.rs +0 -0
- {running_process-4.2.0 → running_process-4.3.0}/crates/running-process/tests/daemon_backlog_accumulation_test.rs +0 -0
- {running_process-4.2.0 → running_process-4.3.0}/crates/running-process/tests/daemon_cross_process_pty_attach_test.rs +0 -0
- {running_process-4.2.0 → running_process-4.3.0}/crates/running-process/tests/daemon_fast_ctrl_c_handoff_test.rs +0 -0
- {running_process-4.2.0 → running_process-4.3.0}/crates/running-process/tests/daemon_integration/compiler_wrap_seam_test.rs +0 -0
- {running_process-4.2.0 → running_process-4.3.0}/crates/running-process/tests/daemon_integration/env_replace_test.rs +0 -0
- {running_process-4.2.0 → running_process-4.3.0}/crates/running-process/tests/daemon_integration/main.rs +0 -0
- {running_process-4.2.0 → running_process-4.3.0}/crates/running-process/tests/daemon_integration/more_tests.rs +0 -0
- {running_process-4.2.0 → running_process-4.3.0}/crates/running-process/tests/daemon_integration/stdout_seam_test.rs +0 -0
- {running_process-4.2.0 → running_process-4.3.0}/crates/running-process/tests/daemon_non_tty_attach_test.rs +0 -0
- {running_process-4.2.0 → running_process-4.3.0}/crates/running-process/tests/daemon_pipe_session_attach_test.rs +0 -0
- {running_process-4.2.0 → running_process-4.3.0}/crates/running-process/tests/daemon_pty_session_attach_test.rs +0 -0
- {running_process-4.2.0 → running_process-4.3.0}/crates/running-process/tests/daemon_resize_rpc_test.rs +0 -0
- {running_process-4.2.0 → running_process-4.3.0}/crates/running-process/tests/daemon_sessions_bulk_ops_test.rs +0 -0
- {running_process-4.2.0 → running_process-4.3.0}/crates/running-process/tests/daemon_sessions_log_test.rs +0 -0
- {running_process-4.2.0 → running_process-4.3.0}/crates/running-process/tests/daemon_tee_ring_test.rs +0 -0
- {running_process-4.2.0 → running_process-4.3.0}/crates/running-process/tests/daemon_termination_outcome_test.rs +0 -0
- {running_process-4.2.0 → running_process-4.3.0}/crates/running-process/tests/daemon_tree_kill_test.rs +0 -0
- {running_process-4.2.0 → running_process-4.3.0}/crates/running-process/tests/daemon_tui_repaint_test.rs +0 -0
- {running_process-4.2.0 → running_process-4.3.0}/crates/running-process/tests/fs_adversarial_test.rs +0 -0
- {running_process-4.2.0 → running_process-4.3.0}/crates/running-process/tests/interactive_pty_session_test.rs +0 -0
- {running_process-4.2.0 → running_process-4.3.0}/crates/running-process/tests/maintenance/main.rs +0 -0
- {running_process-4.2.0 → running_process-4.3.0}/crates/running-process/tests/maintenance/release_handles_unix.rs +0 -0
- {running_process-4.2.0 → running_process-4.3.0}/crates/running-process/tests/maintenance/release_handles_windows.rs +0 -0
- {running_process-4.2.0 → running_process-4.3.0}/crates/running-process/tests/originator_test.rs +0 -0
- {running_process-4.2.0 → running_process-4.3.0}/crates/running-process/tests/process_core_test.rs +0 -0
- {running_process-4.2.0 → running_process-4.3.0}/crates/running-process/tests/pty_conhost_job_test.rs +0 -0
- {running_process-4.2.0 → running_process-4.3.0}/crates/running-process/tests/pty_master_public_api_test.rs +0 -0
- {running_process-4.2.0 → running_process-4.3.0}/crates/running-process/tests/security/cross_user_release_handles.rs +0 -0
- {running_process-4.2.0 → running_process-4.3.0}/crates/running-process/tests/security/cve_dbus_2014_3639.rs +0 -0
- {running_process-4.2.0 → running_process-4.3.0}/crates/running-process/tests/security/cve_dbus_2023_34969.rs +0 -0
- {running_process-4.2.0 → running_process-4.3.0}/crates/running-process/tests/security/cve_sccache_2023_1521.rs +0 -0
- {running_process-4.2.0 → running_process-4.3.0}/crates/running-process/tests/security/deferred_runtime_surfaces.rs +0 -0
- {running_process-4.2.0 → running_process-4.3.0}/crates/running-process/tests/security/dependency_surface.rs +0 -0
- {running_process-4.2.0 → running_process-4.3.0}/crates/running-process/tests/security/fuzz_campaign_signoff.rs +0 -0
- {running_process-4.2.0 → running_process-4.3.0}/crates/running-process/tests/security/main.rs +0 -0
- {running_process-4.2.0 → running_process-4.3.0}/crates/running-process/tests/security/manifest_tamper_detection.rs +0 -0
- {running_process-4.2.0 → running_process-4.3.0}/crates/running-process/tests/security/no_network_dependencies.rs +0 -0
- {running_process-4.2.0 → running_process-4.3.0}/crates/running-process/tests/security/pipe_name_validation.rs +0 -0
- {running_process-4.2.0 → running_process-4.3.0}/crates/running-process/tests/security/pipe_squatting.rs +0 -0
- {running_process-4.2.0 → running_process-4.3.0}/crates/running-process/tests/security/security_audit_workflow.rs +0 -0
- {running_process-4.2.0 → running_process-4.3.0}/crates/running-process/tests/security/security_fuzz_workflow.rs +0 -0
- {running_process-4.2.0 → running_process-4.3.0}/crates/running-process/tests/security/service_name_validation.rs +0 -0
- {running_process-4.2.0 → running_process-4.3.0}/crates/running-process/tests/security/unsafe_inventory.rs +0 -0
- {running_process-4.2.0 → running_process-4.3.0}/crates/running-process/tests/security/wanted_version_shell_injection.rs +0 -0
- {running_process-4.2.0 → running_process-4.3.0}/crates/running-process/tests/security/wanted_version_traversal.rs +0 -0
- {running_process-4.2.0 → running_process-4.3.0}/crates/running-process/tests/spawn_test.rs +0 -0
- {running_process-4.2.0 → running_process-4.3.0}/crates/running-process/tests/terminal_graphics_capabilities_test.rs +0 -0
- {running_process-4.2.0 → running_process-4.3.0}/crates/running-process-py/Cargo.toml +0 -0
- {running_process-4.2.0 → running_process-4.3.0}/crates/running-process-py/src/containment.rs +0 -0
- {running_process-4.2.0 → running_process-4.3.0}/crates/running-process-py/src/daemon_client.rs +0 -0
- {running_process-4.2.0 → running_process-4.3.0}/crates/running-process-py/src/debug_traces.rs +0 -0
- {running_process-4.2.0 → running_process-4.3.0}/crates/running-process-py/src/helpers.rs +0 -0
- {running_process-4.2.0 → running_process-4.3.0}/crates/running-process-py/src/idle_detector.rs +0 -0
- {running_process-4.2.0 → running_process-4.3.0}/crates/running-process-py/src/lib.rs +0 -0
- {running_process-4.2.0 → running_process-4.3.0}/crates/running-process-py/src/metrics.rs +0 -0
- {running_process-4.2.0 → running_process-4.3.0}/crates/running-process-py/src/originator.rs +0 -0
- {running_process-4.2.0 → running_process-4.3.0}/crates/running-process-py/src/pid_tracking.rs +0 -0
- {running_process-4.2.0 → running_process-4.3.0}/crates/running-process-py/src/priority.rs +0 -0
- {running_process-4.2.0 → running_process-4.3.0}/crates/running-process-py/src/process.rs +0 -0
- {running_process-4.2.0 → running_process-4.3.0}/crates/running-process-py/src/process_tree.rs +0 -0
- {running_process-4.2.0 → running_process-4.3.0}/crates/running-process-py/src/pty_buffer.rs +0 -0
- {running_process-4.2.0 → running_process-4.3.0}/crates/running-process-py/src/pty_process.rs +0 -0
- {running_process-4.2.0 → running_process-4.3.0}/crates/running-process-py/src/public_symbols.rs +0 -0
- {running_process-4.2.0 → running_process-4.3.0}/crates/running-process-py/src/py_native_process.rs +0 -0
- {running_process-4.2.0 → running_process-4.3.0}/crates/running-process-py/src/registry.rs +0 -0
- {running_process-4.2.0 → running_process-4.3.0}/crates/running-process-py/src/signal_bool.rs +0 -0
- {running_process-4.2.0 → running_process-4.3.0}/crates/running-process-py/src/terminal_input.rs +0 -0
- {running_process-4.2.0 → running_process-4.3.0}/crates/running-process-py/src/tests/control_churn.rs +0 -0
- {running_process-4.2.0 → running_process-4.3.0}/crates/running-process-py/src/tests/expect_match.rs +0 -0
- {running_process-4.2.0 → running_process-4.3.0}/crates/running-process-py/src/tests/idle_detector.rs +0 -0
- {running_process-4.2.0 → running_process-4.3.0}/crates/running-process-py/src/tests/mod.rs +0 -0
- {running_process-4.2.0 → running_process-4.3.0}/crates/running-process-py/src/tests/parse_command.rs +0 -0
- {running_process-4.2.0 → running_process-4.3.0}/crates/running-process-py/src/tests/process_tree.rs +0 -0
- {running_process-4.2.0 → running_process-4.3.0}/crates/running-process-py/src/tests/pty_buffer.rs +0 -0
- {running_process-4.2.0 → running_process-4.3.0}/crates/running-process-py/src/tests/pty_process.rs +0 -0
- {running_process-4.2.0 → running_process-4.3.0}/crates/running-process-py/src/tests/registry.rs +0 -0
- {running_process-4.2.0 → running_process-4.3.0}/crates/running-process-py/src/tests/signal_bool.rs +0 -0
- {running_process-4.2.0 → running_process-4.3.0}/crates/running-process-py/src/tests/terminal_input.rs +0 -0
- {running_process-4.2.0 → running_process-4.3.0}/crates/test-watchdog/Cargo.toml +0 -0
- {running_process-4.2.0 → running_process-4.3.0}/crates/test-watchdog/src/lib.rs +0 -0
- {running_process-4.2.0 → running_process-4.3.0}/crates/test-watchdog/tests/hang_dump.rs +0 -0
- {running_process-4.2.0 → running_process-4.3.0}/src/running_process/assets/example.txt +0 -0
- {running_process-4.2.0 → running_process-4.3.0}/src/running_process/cli.py +0 -0
- {running_process-4.2.0 → running_process-4.3.0}/src/running_process/command_render.py +0 -0
- {running_process-4.2.0 → running_process-4.3.0}/src/running_process/compat.py +0 -0
- {running_process-4.2.0 → running_process-4.3.0}/src/running_process/console_encoding.py +0 -0
- {running_process-4.2.0 → running_process-4.3.0}/src/running_process/daemon.py +0 -0
- {running_process-4.2.0 → running_process-4.3.0}/src/running_process/dashboard.py +0 -0
- {running_process-4.2.0 → running_process-4.3.0}/src/running_process/exit_status.py +0 -0
- {running_process-4.2.0 → running_process-4.3.0}/src/running_process/expect.py +0 -0
- {running_process-4.2.0 → running_process-4.3.0}/src/running_process/interrupt_handler.py +0 -0
- {running_process-4.2.0 → running_process-4.3.0}/src/running_process/launch.py +0 -0
- {running_process-4.2.0 → running_process-4.3.0}/src/running_process/line_iterator.py +0 -0
- {running_process-4.2.0 → running_process-4.3.0}/src/running_process/output_formatter.py +0 -0
- {running_process-4.2.0 → running_process-4.3.0}/src/running_process/priority.py +0 -0
- {running_process-4.2.0 → running_process-4.3.0}/src/running_process/process_utils.py +0 -0
- {running_process-4.2.0 → running_process-4.3.0}/src/running_process/processor_cli.py +0 -0
- {running_process-4.2.0 → running_process-4.3.0}/src/running_process/pty/__init__.py +0 -0
- {running_process-4.2.0 → running_process-4.3.0}/src/running_process/pty/_command.py +0 -0
- {running_process-4.2.0 → running_process-4.3.0}/src/running_process/pty/_console_io.py +0 -0
- {running_process-4.2.0 → running_process-4.3.0}/src/running_process/pty/_errors.py +0 -0
- {running_process-4.2.0 → running_process-4.3.0}/src/running_process/pty/_idle_helpers.py +0 -0
- {running_process-4.2.0 → running_process-4.3.0}/src/running_process/pty/_idle_state.py +0 -0
- {running_process-4.2.0 → running_process-4.3.0}/src/running_process/pty/_interactive.py +0 -0
- {running_process-4.2.0 → running_process-4.3.0}/src/running_process/pty/_process_helpers.py +0 -0
- {running_process-4.2.0 → running_process-4.3.0}/src/running_process/pty/_pseudo_terminal.py +0 -0
- {running_process-4.2.0 → running_process-4.3.0}/src/running_process/pty/_pty_expect.py +0 -0
- {running_process-4.2.0 → running_process-4.3.0}/src/running_process/pty/_pty_idle_waiter.py +0 -0
- {running_process-4.2.0 → running_process-4.3.0}/src/running_process/pty/_pty_input_relay.py +0 -0
- {running_process-4.2.0 → running_process-4.3.0}/src/running_process/pty/_pty_reader.py +0 -0
- {running_process-4.2.0 → running_process-4.3.0}/src/running_process/pty/_pty_wait_for.py +0 -0
- {running_process-4.2.0 → running_process-4.3.0}/src/running_process/pty/_terminal_strip.py +0 -0
- {running_process-4.2.0 → running_process-4.3.0}/src/running_process/pty/_types.py +0 -0
- {running_process-4.2.0 → running_process-4.3.0}/src/running_process/pty/_wait_input.py +0 -0
- {running_process-4.2.0 → running_process-4.3.0}/src/running_process/running_process/__init__.py +0 -0
- {running_process-4.2.0 → running_process-4.3.0}/src/running_process/running_process/_classmethod_api.py +0 -0
- {running_process-4.2.0 → running_process-4.3.0}/src/running_process/running_process/_core.py +0 -0
- {running_process-4.2.0 → running_process-4.3.0}/src/running_process/running_process/_helpers.py +0 -0
- {running_process-4.2.0 → running_process-4.3.0}/src/running_process/running_process/_iter.py +0 -0
- {running_process-4.2.0 → running_process-4.3.0}/src/running_process/running_process/_subprocess.py +0 -0
- {running_process-4.2.0 → running_process-4.3.0}/src/running_process/running_process/_types.py +0 -0
- {running_process-4.2.0 → running_process-4.3.0}/src/running_process/running_process/_wait_methods.py +0 -0
- {running_process-4.2.0 → running_process-4.3.0}/src/running_process/running_process_manager.py +0 -0
|
@@ -1085,7 +1085,7 @@ checksum = "dc897dd8d9e8bd1ed8cdad82b5966c3e0ecae09fb1907d58efaa013543185d0a"
|
|
|
1085
1085
|
|
|
1086
1086
|
[[package]]
|
|
1087
1087
|
name = "running-process"
|
|
1088
|
-
version = "4.
|
|
1088
|
+
version = "4.3.0"
|
|
1089
1089
|
dependencies = [
|
|
1090
1090
|
"anyhow",
|
|
1091
1091
|
"blake3",
|
|
@@ -1120,7 +1120,7 @@ dependencies = [
|
|
|
1120
1120
|
|
|
1121
1121
|
[[package]]
|
|
1122
1122
|
name = "running-process-py"
|
|
1123
|
-
version = "4.
|
|
1123
|
+
version = "4.3.0"
|
|
1124
1124
|
dependencies = [
|
|
1125
1125
|
"interprocess",
|
|
1126
1126
|
"libc",
|
|
@@ -91,6 +91,11 @@ daemon = [
|
|
|
91
91
|
"dep:rusqlite", "dep:toml",
|
|
92
92
|
]
|
|
93
93
|
originator-scan = [] # used by running-process-py for cwd-tagging
|
|
94
|
+
# #433 R4: opt-in test seam. Gates the `RUNNING_PROCESS_FAKE_BACKEND` backdoor
|
|
95
|
+
# inside `connect_to_backend`. OFF by default and never listed by production
|
|
96
|
+
# consumers, so the backdoor is physically absent from every shipped build.
|
|
97
|
+
# Enabled only by the crate's own test pass (see `ci/test.py`).
|
|
98
|
+
test-seams = ["client"]
|
|
94
99
|
# #415: consumer-consumable conformance test kit
|
|
95
100
|
# (`crate::test_support::conformance`). Off by default; consumers opt in
|
|
96
101
|
# from their `dev-dependencies`.
|
|
@@ -140,6 +140,32 @@ fn parse_duration_secs(value: &str) -> Result<u64, String> {
|
|
|
140
140
|
Ok(n.saturating_mul(unit_secs))
|
|
141
141
|
}
|
|
142
142
|
|
|
143
|
+
/// Set the visible process/thread name for the running daemon (#222).
|
|
144
|
+
///
|
|
145
|
+
/// The daemon binary is still `running-process-daemon` (renaming it is out
|
|
146
|
+
/// of Phase 2 scope), but the *visible long-running identity* must be
|
|
147
|
+
/// `runpm-daemon`. On Linux `prctl(PR_SET_NAME)` renames the main thread,
|
|
148
|
+
/// which is what `ps`, `top`, and `/proc/<pid>/comm` report. On other
|
|
149
|
+
/// platforms this is currently a no-op; full argv0 rewriting there is
|
|
150
|
+
/// tracked as follow-up work.
|
|
151
|
+
fn set_daemon_process_name(name: &str) {
|
|
152
|
+
#[cfg(target_os = "linux")]
|
|
153
|
+
{
|
|
154
|
+
// PR_SET_NAME truncates to 15 bytes + NUL; "runpm-daemon" fits.
|
|
155
|
+
if let Ok(cstr) = std::ffi::CString::new(name) {
|
|
156
|
+
// SAFETY: prctl with PR_SET_NAME and a valid NUL-terminated
|
|
157
|
+
// pointer only writes the calling thread's name.
|
|
158
|
+
unsafe {
|
|
159
|
+
libc::prctl(libc::PR_SET_NAME, cstr.as_ptr() as libc::c_ulong, 0, 0, 0);
|
|
160
|
+
}
|
|
161
|
+
}
|
|
162
|
+
}
|
|
163
|
+
#[cfg(not(target_os = "linux"))]
|
|
164
|
+
{
|
|
165
|
+
let _ = name;
|
|
166
|
+
}
|
|
167
|
+
}
|
|
168
|
+
|
|
143
169
|
/// Initialize structured logging via `tracing-subscriber`.
|
|
144
170
|
///
|
|
145
171
|
/// Logs go to stderr (standard daemon practice). The level is controlled by
|
|
@@ -165,6 +191,11 @@ fn main() {
|
|
|
165
191
|
socket_path,
|
|
166
192
|
db_path,
|
|
167
193
|
} => {
|
|
194
|
+
// #222: the long-running supervisor identity is `runpm-daemon`,
|
|
195
|
+
// not the launcher binary name. Rename the process so it shows
|
|
196
|
+
// up that way in `ps`/`top` without renaming the binary (which
|
|
197
|
+
// would churn paths, spawn, and packaging across phases).
|
|
198
|
+
set_daemon_process_name("runpm-daemon");
|
|
168
199
|
init_logging();
|
|
169
200
|
// #391: warn at startup when a systemd KillMode would reap
|
|
170
201
|
// spawned children on unit stop. Silent when not under systemd.
|
|
@@ -10,7 +10,7 @@ use clap::{Parser, Subcommand};
|
|
|
10
10
|
|
|
11
11
|
use running_process::client::{connect_or_start, ClientError, DaemonClient};
|
|
12
12
|
use running_process::maintenance::run_release_handles;
|
|
13
|
-
use running_process::proto::daemon::{DaemonResponse, ServiceConfig, StatusCode};
|
|
13
|
+
use running_process::proto::daemon::{DaemonResponse, ServiceConfig, ServiceState, StatusCode};
|
|
14
14
|
|
|
15
15
|
#[derive(Parser)]
|
|
16
16
|
#[command(
|
|
@@ -70,7 +70,11 @@ enum Commands {
|
|
|
70
70
|
},
|
|
71
71
|
/// List all supervised services
|
|
72
72
|
#[command(alias = "ls", alias = "status")]
|
|
73
|
-
List
|
|
73
|
+
List {
|
|
74
|
+
/// Emit JSON instead of a human-readable table
|
|
75
|
+
#[arg(long)]
|
|
76
|
+
json: bool,
|
|
77
|
+
},
|
|
74
78
|
/// Show details about a single service
|
|
75
79
|
#[command(alias = "describe")]
|
|
76
80
|
Show {
|
|
@@ -160,7 +164,7 @@ fn main() -> ExitCode {
|
|
|
160
164
|
Commands::Delete { target } => {
|
|
161
165
|
cmd_simple_target("delete", &target, |c, t| c.service_delete(t))
|
|
162
166
|
}
|
|
163
|
-
Commands::List => cmd_list(),
|
|
167
|
+
Commands::List { json } => cmd_list(json),
|
|
164
168
|
Commands::Show { target } => cmd_show(&target),
|
|
165
169
|
Commands::Logs {
|
|
166
170
|
target,
|
|
@@ -267,19 +271,38 @@ fn cmd_start(
|
|
|
267
271
|
|
|
268
272
|
let mut client = connect()?;
|
|
269
273
|
let resp = client.service_start(config).map_err(client_err)?;
|
|
270
|
-
|
|
274
|
+
ensure_ok("start", &resp)?;
|
|
275
|
+
if let Some(svc) = resp.service_start.and_then(|r| r.service) {
|
|
276
|
+
println!(
|
|
277
|
+
"started '{}' (id={}, pid={}, status={})",
|
|
278
|
+
svc.name, svc.id, svc.pid, svc.status
|
|
279
|
+
);
|
|
280
|
+
}
|
|
281
|
+
Ok(())
|
|
271
282
|
}
|
|
272
283
|
|
|
273
|
-
fn cmd_list() -> Result<()> {
|
|
284
|
+
fn cmd_list(json: bool) -> Result<()> {
|
|
274
285
|
let mut client = connect()?;
|
|
275
286
|
let resp = client.service_list().map_err(client_err)?;
|
|
276
|
-
|
|
287
|
+
ensure_ok("list", &resp)?;
|
|
288
|
+
let services = resp.service_list.map(|r| r.services).unwrap_or_default();
|
|
289
|
+
if json {
|
|
290
|
+
print_services_json(&services);
|
|
291
|
+
} else {
|
|
292
|
+
print_services_table(&services);
|
|
293
|
+
}
|
|
294
|
+
Ok(())
|
|
277
295
|
}
|
|
278
296
|
|
|
279
297
|
fn cmd_show(target: &str) -> Result<()> {
|
|
280
298
|
let mut client = connect()?;
|
|
281
299
|
let resp = client.service_describe(target).map_err(client_err)?;
|
|
282
|
-
|
|
300
|
+
ensure_ok("show", &resp)?;
|
|
301
|
+
match resp.service_describe.and_then(|r| r.service) {
|
|
302
|
+
Some(svc) => print_service_detail(&svc),
|
|
303
|
+
None => println!("no such service: {target}"),
|
|
304
|
+
}
|
|
305
|
+
Ok(())
|
|
283
306
|
}
|
|
284
307
|
|
|
285
308
|
fn cmd_logs(target: &str, lines: u32, follow: bool) -> Result<()> {
|
|
@@ -301,7 +324,18 @@ where
|
|
|
301
324
|
{
|
|
302
325
|
let mut client = connect()?;
|
|
303
326
|
let resp = call(&mut client, target).map_err(client_err)?;
|
|
304
|
-
|
|
327
|
+
ensure_ok(label, &resp)?;
|
|
328
|
+
let count = match label {
|
|
329
|
+
"stop" => resp.service_stop.as_ref().map(|r| r.stopped_count),
|
|
330
|
+
"restart" => resp.service_restart.as_ref().map(|r| r.restarted_count),
|
|
331
|
+
"delete" => resp.service_delete.as_ref().map(|r| r.deleted_count),
|
|
332
|
+
_ => None,
|
|
333
|
+
};
|
|
334
|
+
match count {
|
|
335
|
+
Some(n) => println!("{label}: {n} service(s)"),
|
|
336
|
+
None => println!("OK: {label}"),
|
|
337
|
+
}
|
|
338
|
+
Ok(())
|
|
305
339
|
}
|
|
306
340
|
|
|
307
341
|
fn cmd_no_arg<F>(label: &str, call: F) -> Result<()>
|
|
@@ -353,8 +387,14 @@ fn client_err(err: ClientError) -> anyhow::Error {
|
|
|
353
387
|
}
|
|
354
388
|
|
|
355
389
|
fn print_status(label: &str, resp: &DaemonResponse) -> Result<()> {
|
|
390
|
+
ensure_ok(label, resp)?;
|
|
391
|
+
println!("OK: {label}");
|
|
392
|
+
Ok(())
|
|
393
|
+
}
|
|
394
|
+
|
|
395
|
+
/// Return an error if the daemon responded with a non-OK status code.
|
|
396
|
+
fn ensure_ok(label: &str, resp: &DaemonResponse) -> Result<()> {
|
|
356
397
|
if resp.code == StatusCode::Ok as i32 {
|
|
357
|
-
println!("OK: {label}");
|
|
358
398
|
Ok(())
|
|
359
399
|
} else {
|
|
360
400
|
Err(anyhow!(
|
|
@@ -368,6 +408,75 @@ fn print_status(label: &str, resp: &DaemonResponse) -> Result<()> {
|
|
|
368
408
|
}
|
|
369
409
|
}
|
|
370
410
|
|
|
411
|
+
// ---------------------------------------------------------------------------
|
|
412
|
+
// Service rendering
|
|
413
|
+
// ---------------------------------------------------------------------------
|
|
414
|
+
|
|
415
|
+
fn print_services_table(services: &[ServiceState]) {
|
|
416
|
+
if services.is_empty() {
|
|
417
|
+
println!("no services");
|
|
418
|
+
return;
|
|
419
|
+
}
|
|
420
|
+
println!(
|
|
421
|
+
"{:<4} {:<20} {:<10} {:<8} {:<8} COMMAND",
|
|
422
|
+
"ID", "NAME", "STATUS", "PID", "RESTARTS"
|
|
423
|
+
);
|
|
424
|
+
for s in services {
|
|
425
|
+
let command = s
|
|
426
|
+
.config
|
|
427
|
+
.as_ref()
|
|
428
|
+
.map(|c| c.cmd.join(" "))
|
|
429
|
+
.unwrap_or_default();
|
|
430
|
+
println!(
|
|
431
|
+
"{:<4} {:<20} {:<10} {:<8} {:<8} {}",
|
|
432
|
+
s.id, s.name, s.status, s.pid, s.restart_count, command
|
|
433
|
+
);
|
|
434
|
+
}
|
|
435
|
+
}
|
|
436
|
+
|
|
437
|
+
fn print_service_detail(s: &ServiceState) {
|
|
438
|
+
println!("name: {}", s.name);
|
|
439
|
+
println!("id: {}", s.id);
|
|
440
|
+
println!("status: {}", s.status);
|
|
441
|
+
println!("pid: {}", s.pid);
|
|
442
|
+
println!("restart_count: {}", s.restart_count);
|
|
443
|
+
println!("last_exit: {}", s.last_exit_code);
|
|
444
|
+
if let Some(c) = &s.config {
|
|
445
|
+
println!("command: {}", c.cmd.join(" "));
|
|
446
|
+
if !c.cwd.is_empty() {
|
|
447
|
+
println!("cwd: {}", c.cwd);
|
|
448
|
+
}
|
|
449
|
+
println!("autorestart: {}", c.autorestart);
|
|
450
|
+
println!("max_restarts: {}", c.max_restarts);
|
|
451
|
+
}
|
|
452
|
+
}
|
|
453
|
+
|
|
454
|
+
fn print_services_json(services: &[ServiceState]) {
|
|
455
|
+
let values: Vec<serde_json::Value> = services
|
|
456
|
+
.iter()
|
|
457
|
+
.map(|s| {
|
|
458
|
+
serde_json::json!({
|
|
459
|
+
"id": s.id,
|
|
460
|
+
"name": s.name,
|
|
461
|
+
"status": s.status,
|
|
462
|
+
"pid": s.pid,
|
|
463
|
+
"restart_count": s.restart_count,
|
|
464
|
+
"last_started_at": s.last_started_at,
|
|
465
|
+
"last_exited_at": s.last_exited_at,
|
|
466
|
+
"last_exit_code": s.last_exit_code,
|
|
467
|
+
"command": s.config.as_ref().map(|c| c.cmd.clone()).unwrap_or_default(),
|
|
468
|
+
"cwd": s.config.as_ref().map(|c| c.cwd.clone()).unwrap_or_default(),
|
|
469
|
+
"autorestart": s.config.as_ref().map(|c| c.autorestart).unwrap_or(false),
|
|
470
|
+
"max_restarts": s.config.as_ref().map(|c| c.max_restarts).unwrap_or(0),
|
|
471
|
+
})
|
|
472
|
+
})
|
|
473
|
+
.collect();
|
|
474
|
+
match serde_json::to_string_pretty(&values) {
|
|
475
|
+
Ok(s) => println!("{s}"),
|
|
476
|
+
Err(e) => eprintln!("failed to serialize JSON: {e}"),
|
|
477
|
+
}
|
|
478
|
+
}
|
|
479
|
+
|
|
371
480
|
fn parse_env(args: &[String]) -> Result<HashMap<String, String>> {
|
|
372
481
|
let mut out = HashMap::new();
|
|
373
482
|
for entry in args {
|
|
@@ -0,0 +1,273 @@
|
|
|
1
|
+
//! One-call broker adoption: negotiate → dial → ready-to-talk client (#433 R1).
|
|
2
|
+
//!
|
|
3
|
+
//! [`connect_to_backend`] returns a raw
|
|
4
|
+
//! [`BackendConnection`] — a bare
|
|
5
|
+
//! socket the consumer must still wrap in a [`FrameClient`] before it can send
|
|
6
|
+
//! a single request. Every consumer (zccache, soldr, clud, fbuild) repeats the
|
|
7
|
+
//! same three lines: check the disable env, call `connect_to_backend`, wrap the
|
|
8
|
+
//! stream. [`BrokerSession::adopt`] is that recipe, owned once here so the
|
|
9
|
+
//! contract is a single call:
|
|
10
|
+
//!
|
|
11
|
+
//! ```no_run
|
|
12
|
+
//! use running_process::broker::adopt::BrokerSession;
|
|
13
|
+
//! use running_process::broker::client::ConnectBackendRequest;
|
|
14
|
+
//!
|
|
15
|
+
//! # fn main() -> Result<(), Box<dyn std::error::Error>> {
|
|
16
|
+
//! let request = ConnectBackendRequest::new("broker.sock", "zccache", "1.11.20", "1.11.20");
|
|
17
|
+
//! let mut session = BrokerSession::adopt(request)?;
|
|
18
|
+
//! let reply = session.request(0x7A63, b"ping".to_vec())?;
|
|
19
|
+
//! assert_eq!(reply.payload, b"pong");
|
|
20
|
+
//! # Ok(()) }
|
|
21
|
+
//! ```
|
|
22
|
+
//!
|
|
23
|
+
//! The blocking [`BrokerSession`] is the wire-of-record; the async
|
|
24
|
+
//! [`AsyncBrokerSession`] (feature `client-async`, #433 R3) is a thin
|
|
25
|
+
//! `spawn_blocking` wrapper so tokio daemons get the same one-call adoption
|
|
26
|
+
//! without re-implementing the negotiation against `AsyncRead`/`AsyncWrite`.
|
|
27
|
+
|
|
28
|
+
use crate::broker::backend_sdk::{FrameClient, FrameClientError};
|
|
29
|
+
use crate::broker::client::{
|
|
30
|
+
broker_disabled_by_env, connect_to_backend, BackendConnection, BackendConnectionRoute,
|
|
31
|
+
BrokerClientError, BrokerDisableEnvError, ConnectBackendRequest,
|
|
32
|
+
};
|
|
33
|
+
use crate::broker::protocol::{Frame, Negotiated};
|
|
34
|
+
|
|
35
|
+
/// A negotiated, dialed, and framed broker backend connection.
|
|
36
|
+
///
|
|
37
|
+
/// Produced by [`BrokerSession::adopt`]. Wraps the
|
|
38
|
+
/// [`BackendConnection`] stream in a
|
|
39
|
+
/// [`FrameClient`] so the caller can issue correlated request/response frames
|
|
40
|
+
/// immediately, while still exposing how the connection was reached
|
|
41
|
+
/// ([`route`](Self::route)), the cacheable [`endpoint`](Self::endpoint), and the
|
|
42
|
+
/// broker's [`negotiated`](Self::negotiated) metadata.
|
|
43
|
+
pub struct BrokerSession {
|
|
44
|
+
client: FrameClient,
|
|
45
|
+
route: BackendConnectionRoute,
|
|
46
|
+
endpoint: String,
|
|
47
|
+
negotiated: Option<Negotiated>,
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
impl BrokerSession {
|
|
51
|
+
/// Negotiate through the broker and return a ready-to-talk session.
|
|
52
|
+
///
|
|
53
|
+
/// Honours the canonical escape hatch first: if
|
|
54
|
+
/// `RUNNING_PROCESS_DISABLE=1` is set, this returns
|
|
55
|
+
/// [`AdoptError::BrokerDisabled`] so the consumer falls back to its direct
|
|
56
|
+
/// path instead of silently dialing the broker. An invalid disable value
|
|
57
|
+
/// surfaces as [`AdoptError::DisableEnv`].
|
|
58
|
+
pub fn adopt(request: ConnectBackendRequest<'_>) -> Result<Self, AdoptError> {
|
|
59
|
+
if broker_disabled_by_env()? {
|
|
60
|
+
return Err(AdoptError::BrokerDisabled);
|
|
61
|
+
}
|
|
62
|
+
Ok(Self::from_connection(connect_to_backend(request)?))
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
fn from_connection(connection: BackendConnection) -> Self {
|
|
66
|
+
Self {
|
|
67
|
+
client: FrameClient::from_stream(connection.stream),
|
|
68
|
+
route: connection.route,
|
|
69
|
+
endpoint: connection.endpoint,
|
|
70
|
+
negotiated: connection.negotiated,
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
/// How the backend connection was reached.
|
|
75
|
+
pub fn route(&self) -> BackendConnectionRoute {
|
|
76
|
+
self.route
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
/// Negotiated backend endpoint, suitable as a Hello-skip cache key.
|
|
80
|
+
pub fn endpoint(&self) -> &str {
|
|
81
|
+
&self.endpoint
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
/// Broker negotiation metadata, present when the broker path was used.
|
|
85
|
+
pub fn negotiated(&self) -> Option<&Negotiated> {
|
|
86
|
+
self.negotiated.as_ref()
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
/// Send one correlated request and await its response frame.
|
|
90
|
+
pub fn request(
|
|
91
|
+
&mut self,
|
|
92
|
+
payload_protocol: u32,
|
|
93
|
+
payload: Vec<u8>,
|
|
94
|
+
) -> Result<Frame, FrameClientError> {
|
|
95
|
+
self.client.request(payload_protocol, payload)
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
/// Borrow the underlying frame client for advanced use.
|
|
99
|
+
pub fn client_mut(&mut self) -> &mut FrameClient {
|
|
100
|
+
&mut self.client
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
/// Consume the session and return the owned frame client.
|
|
104
|
+
pub fn into_client(self) -> FrameClient {
|
|
105
|
+
self.client
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
/// Errors from [`BrokerSession::adopt`] / [`AsyncBrokerSession::adopt`].
|
|
110
|
+
#[derive(Debug, thiserror::Error)]
|
|
111
|
+
pub enum AdoptError {
|
|
112
|
+
/// `RUNNING_PROCESS_DISABLE=1` is set — the caller should use its direct
|
|
113
|
+
/// (non-broker) path. Not a failure of the broker itself.
|
|
114
|
+
#[error("broker disabled via RUNNING_PROCESS_DISABLE=1; use the direct path")]
|
|
115
|
+
BrokerDisabled,
|
|
116
|
+
/// The disable env var held an invalid value.
|
|
117
|
+
#[error(transparent)]
|
|
118
|
+
DisableEnv(#[from] BrokerDisableEnvError),
|
|
119
|
+
/// Broker negotiation or backend dial failed. Use
|
|
120
|
+
/// [`BrokerClientError::refusal_kind`] to branch on broker refusals.
|
|
121
|
+
#[error(transparent)]
|
|
122
|
+
Connect(#[from] BrokerClientError),
|
|
123
|
+
/// The async adoption worker thread failed to join (panicked or was
|
|
124
|
+
/// cancelled). Only reachable on the `client-async` path.
|
|
125
|
+
#[cfg(feature = "client-async")]
|
|
126
|
+
#[error("async adopt worker failed to join: {0}")]
|
|
127
|
+
AsyncJoin(String),
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
/// Owned inputs for [`AsyncBrokerSession::adopt`] (#433 R3).
|
|
131
|
+
///
|
|
132
|
+
/// The blocking [`ConnectBackendRequest`] borrows `&str`, which cannot cross a
|
|
133
|
+
/// `spawn_blocking` boundary. This owned mirror carries the same fields by
|
|
134
|
+
/// value; [`AsyncBrokerSession::adopt`] reconstructs a borrowed
|
|
135
|
+
/// [`ConnectBackendRequest`] from it inside the worker thread.
|
|
136
|
+
#[cfg(feature = "client-async")]
|
|
137
|
+
#[derive(Clone, Debug)]
|
|
138
|
+
pub struct OwnedConnectRequest {
|
|
139
|
+
/// Broker pipe/socket endpoint.
|
|
140
|
+
pub broker_endpoint: String,
|
|
141
|
+
/// Logical service name, such as `zccache`.
|
|
142
|
+
pub service_name: String,
|
|
143
|
+
/// Backend version the caller wants.
|
|
144
|
+
pub wanted_version: String,
|
|
145
|
+
/// Version of the caller's own service binary.
|
|
146
|
+
pub self_version: String,
|
|
147
|
+
/// Previously negotiated backend endpoint, if the caller has one.
|
|
148
|
+
pub cached_backend_endpoint: Option<String>,
|
|
149
|
+
/// Informational client version.
|
|
150
|
+
pub client_version: String,
|
|
151
|
+
/// Client library name for diagnostics.
|
|
152
|
+
pub client_lib_name: String,
|
|
153
|
+
/// Client library version for diagnostics.
|
|
154
|
+
pub client_lib_version: String,
|
|
155
|
+
/// Proposed keepalive interval.
|
|
156
|
+
pub client_keepalive_secs: u64,
|
|
157
|
+
/// Opt in to adopting a handed-off backend connection.
|
|
158
|
+
pub adopt_handed_off_connection: bool,
|
|
159
|
+
/// Deadline for the handoff-ready relay when adoption is enabled.
|
|
160
|
+
pub handoff_ready_timeout: std::time::Duration,
|
|
161
|
+
}
|
|
162
|
+
|
|
163
|
+
#[cfg(feature = "client-async")]
|
|
164
|
+
impl OwnedConnectRequest {
|
|
165
|
+
/// Build an owned request with running-process defaults.
|
|
166
|
+
pub fn new(
|
|
167
|
+
broker_endpoint: impl Into<String>,
|
|
168
|
+
service_name: impl Into<String>,
|
|
169
|
+
wanted_version: impl Into<String>,
|
|
170
|
+
self_version: impl Into<String>,
|
|
171
|
+
) -> Self {
|
|
172
|
+
Self {
|
|
173
|
+
broker_endpoint: broker_endpoint.into(),
|
|
174
|
+
service_name: service_name.into(),
|
|
175
|
+
wanted_version: wanted_version.into(),
|
|
176
|
+
self_version: self_version.into(),
|
|
177
|
+
cached_backend_endpoint: None,
|
|
178
|
+
client_version: String::new(),
|
|
179
|
+
client_lib_name: "running-process".to_string(),
|
|
180
|
+
client_lib_version: env!("CARGO_PKG_VERSION").to_string(),
|
|
181
|
+
client_keepalive_secs: 0,
|
|
182
|
+
adopt_handed_off_connection: false,
|
|
183
|
+
handoff_ready_timeout: crate::broker::client::DEFAULT_HANDOFF_READY_TIMEOUT,
|
|
184
|
+
}
|
|
185
|
+
}
|
|
186
|
+
|
|
187
|
+
fn as_request(&self) -> ConnectBackendRequest<'_> {
|
|
188
|
+
ConnectBackendRequest {
|
|
189
|
+
broker_endpoint: &self.broker_endpoint,
|
|
190
|
+
service_name: &self.service_name,
|
|
191
|
+
wanted_version: &self.wanted_version,
|
|
192
|
+
self_version: &self.self_version,
|
|
193
|
+
cached_backend_endpoint: self.cached_backend_endpoint.as_deref(),
|
|
194
|
+
client_version: &self.client_version,
|
|
195
|
+
client_lib_name: &self.client_lib_name,
|
|
196
|
+
client_lib_version: &self.client_lib_version,
|
|
197
|
+
client_keepalive_secs: self.client_keepalive_secs,
|
|
198
|
+
adopt_handed_off_connection: self.adopt_handed_off_connection,
|
|
199
|
+
handoff_ready_timeout: self.handoff_ready_timeout,
|
|
200
|
+
}
|
|
201
|
+
}
|
|
202
|
+
}
|
|
203
|
+
|
|
204
|
+
/// Async counterpart of [`BrokerSession`] for tokio daemons (#433 R3).
|
|
205
|
+
///
|
|
206
|
+
/// Runs the blocking negotiation on `tokio::task::spawn_blocking` and wraps the
|
|
207
|
+
/// resulting [`FrameClient`] in an [`AsyncFrameClient`] so every later request
|
|
208
|
+
/// is `.await`-able without a manual `spawn_blocking` at the call site.
|
|
209
|
+
///
|
|
210
|
+
/// [`AsyncFrameClient`]: crate::broker::backend_sdk::AsyncFrameClient
|
|
211
|
+
#[cfg(feature = "client-async")]
|
|
212
|
+
pub struct AsyncBrokerSession {
|
|
213
|
+
client: crate::broker::backend_sdk::AsyncFrameClient,
|
|
214
|
+
route: BackendConnectionRoute,
|
|
215
|
+
endpoint: String,
|
|
216
|
+
negotiated: Option<Negotiated>,
|
|
217
|
+
}
|
|
218
|
+
|
|
219
|
+
#[cfg(feature = "client-async")]
|
|
220
|
+
impl AsyncBrokerSession {
|
|
221
|
+
/// Negotiate through the broker on a blocking worker and return a
|
|
222
|
+
/// ready-to-talk async session.
|
|
223
|
+
pub async fn adopt(request: OwnedConnectRequest) -> Result<Self, AdoptError> {
|
|
224
|
+
let joined = tokio::task::spawn_blocking(move || {
|
|
225
|
+
BrokerSession::adopt(request.as_request()).map(|session| {
|
|
226
|
+
(
|
|
227
|
+
session.route,
|
|
228
|
+
session.endpoint,
|
|
229
|
+
session.negotiated,
|
|
230
|
+
session.client,
|
|
231
|
+
)
|
|
232
|
+
})
|
|
233
|
+
})
|
|
234
|
+
.await
|
|
235
|
+
.map_err(|err| AdoptError::AsyncJoin(err.to_string()))?;
|
|
236
|
+
let (route, endpoint, negotiated, client) = joined?;
|
|
237
|
+
Ok(Self {
|
|
238
|
+
client: crate::broker::backend_sdk::AsyncFrameClient::from_blocking(client),
|
|
239
|
+
route,
|
|
240
|
+
endpoint,
|
|
241
|
+
negotiated,
|
|
242
|
+
})
|
|
243
|
+
}
|
|
244
|
+
|
|
245
|
+
/// How the backend connection was reached.
|
|
246
|
+
pub fn route(&self) -> BackendConnectionRoute {
|
|
247
|
+
self.route
|
|
248
|
+
}
|
|
249
|
+
|
|
250
|
+
/// Negotiated backend endpoint, suitable as a Hello-skip cache key.
|
|
251
|
+
pub fn endpoint(&self) -> &str {
|
|
252
|
+
&self.endpoint
|
|
253
|
+
}
|
|
254
|
+
|
|
255
|
+
/// Broker negotiation metadata, present when the broker path was used.
|
|
256
|
+
pub fn negotiated(&self) -> Option<&Negotiated> {
|
|
257
|
+
self.negotiated.as_ref()
|
|
258
|
+
}
|
|
259
|
+
|
|
260
|
+
/// Send one correlated request and await its response frame.
|
|
261
|
+
pub async fn request(
|
|
262
|
+
&mut self,
|
|
263
|
+
payload_protocol: u32,
|
|
264
|
+
payload: Vec<u8>,
|
|
265
|
+
) -> Result<Frame, FrameClientError> {
|
|
266
|
+
self.client.request(payload_protocol, payload).await
|
|
267
|
+
}
|
|
268
|
+
|
|
269
|
+
/// Consume the session and return the owned async frame client.
|
|
270
|
+
pub fn into_client(self) -> crate::broker::backend_sdk::AsyncFrameClient {
|
|
271
|
+
self.client
|
|
272
|
+
}
|
|
273
|
+
}
|