The fastest, cheapest, most efficient open-source agent harness. Run more than 500 agents on a $10 VPS.
Rust agent-orchestrationai-agentsai-assistantdesktopllmlocal-firstmcppersonal-aiprivacyrustsecond-braintauri
refactor(web_chat): drop the unscoped cancel_chat wrapper
Steven Enamakela71a20c5535d
diff --git a/app/src/services/rpcMethods.ts b/app/src/services/rpcMethods.tsindex f94d769a37..af1b6347ff 100644--- a/app/src/services/rpcMethods.ts+++ b/app/src/services/rpcMethods.ts@@ -98,6 +98,8 @@ export const CORE_RPC_METHODS = {type CoreRpcMethod = (typeof CORE_RPC_METHODS)[keyof typeof CORE_RPC_METHODS];+// keep until v0.66 (review after 2027-01-11): remove with the server table only+// after shipped-client analytics and Sentry method-count evidence.export const LEGACY_METHOD_ALIASES: Record<string, CoreRpcMethod> = {// The session RPCs became the kind-agnostic credential pair once the core// stopped validating sessions itself. Mirrored indiff --git a/crates/openhuman-core/src/agent/artifacts/migrate.rs b/crates/openhuman-core/src/agent/artifacts/migrate.rsindex 8aeb605126..4a9c4c24ad 100644--- a/crates/openhuman-core/src/agent/artifacts/migrate.rs+++ b/crates/openhuman-core/src/agent/artifacts/migrate.rs@@ -54,6 +54,8 @@ const METADATA_FILES: &[&str] = &["meta.json", "args.json", "meta.json.tmp"];/// Migrate every legacy `Ready` artifact in `workspace_dir` into `files_dir`./// Idempotent and safe to run on every boot.+// keep until v0.66 (review after 2027-01-11): offline workspaces can still hold+// pre-files Ready artifacts; remove only with an explicit upgrade/import boundary.pub async fn migrate_legacy_artifacts(workspace_dir: &Path, files_dir: &Path) -> MigrationReport {migrate_with(workspace_dir, files_dir, None).await}diff --git a/crates/openhuman-core/src/agent/orchestration/tools/spawn_subagent_parameters.rs b/crates/openhuman-core/src/agent/orchestration/tools/spawn_subagent_parameters.rsindex 9f0a1a6cac..814d089098 100644--- a/crates/openhuman-core/src/agent/orchestration/tools/spawn_subagent_parameters.rs+++ b/crates/openhuman-core/src/agent/orchestration/tools/spawn_subagent_parameters.rs@@ -38,6 +38,8 @@ fn spawn_subagent_parameters_schema() -> serde_json::Value {"required": ["agent_id", "prompt"],"properties": {"agent_id": agent_id_schema,+ // keep until v0.66 (review after 2027-01-11): resumed sessions freeze+ // their tool schemas; retirement needs persisted-call evidence.// Back-compat alias — older callers used `archetype`."archetype": {"type": "string",diff --git a/crates/openhuman-core/src/core/legacy_aliases.rs b/crates/openhuman-core/src/core/legacy_aliases.rsindex 128ef2b977..fd1abaea52 100644--- a/crates/openhuman-core/src/core/legacy_aliases.rs+++ b/crates/openhuman-core/src/core/legacy_aliases.rs@@ -1,3 +1,5 @@+// keep until v0.66 (review after 2027-01-11): shipped-client analytics and+// Sentry method-count coverage are required before removing both wire tables.//! Server-side legacy RPC method aliases.//!//! Mirrors the frontend's `LEGACY_METHOD_ALIASES` table indiff --git a/crates/openhuman-core/src/inference/provider/factory/routing.rs b/crates/openhuman-core/src/inference/provider/factory/routing.rsindex d8034b69e9..d232c3b481 100644--- a/crates/openhuman-core/src/inference/provider/factory/routing.rs+++ b/crates/openhuman-core/src/inference/provider/factory/routing.rs@@ -74,6 +74,8 @@ pub(crate) fn role_uses_implicit_cloud_fallback(role: &str, config: &Config) ->/// precedence when `primary_cloud` still points at OpenHuman because/// migration 1→2 preserved the URL as a custom provider entry but older/// configs did not explicitly set per-workload routes.+// keep until v0.66 (review after 2027-01-11): inference_url remains a supported+// config.update input, and unfinished BYOK upgrades must not change billing route.pub fn provider_for_role(role: &str, config: &Config) -> String {let opt = configured_route_for_role(role, config);let s = opt.unwrap_or("").trim();diff --git a/crates/openhuman-core/src/skills/ops_discover/api.rs b/crates/openhuman-core/src/skills/ops_discover/api.rsindex 2a7bba4557..cfbab75b56 100644--- a/crates/openhuman-core/src/skills/ops_discover/api.rs+++ b/crates/openhuman-core/src/skills/ops_discover/api.rs@@ -87,6 +87,8 @@ pub fn discovery_home_dir() -> Option<PathBuf> {////// Project-scope (workspace) skills still take precedence over user-scope/// on name collisions.+// keep until v0.66 (review after 2027-01-11): this is the cached, ambient-user+// discovery entry point; discover_workflows alone omits those host semantics.pub fn load_workflow_metadata(workspace_dir: &Path) -> Vec<Workflow> {let trusted = is_workspace_trusted(workspace_dir);let home = discovery_home_dir();diff --git a/crates/openhuman-core/src/threads/ops/edit.rs b/crates/openhuman-core/src/threads/ops/edit.rsindex 26eee81d8d..0e23442cc4 100644--- a/crates/openhuman-core/src/threads/ops/edit.rs+++ b/crates/openhuman-core/src/threads/ops/edit.rs@@ -85,7 +85,7 @@ pub async fn edit_message(request: EditMessageRequest) -> Result<Outcome<Value>,let thread_id = request.thread_id;let dir = workspace_dir().await.map_err(ThreadsError::Message)?;- crate::web_chat::cancel_chat(&client_id, &thread_id)+ crate::web_chat::cancel_chat_scoped(&client_id, &thread_id, None).await.map_err(ThreadsError::Message)?;@@ -149,7 +149,7 @@ pub async fn regenerate(request: RegenerateRequest) -> Result<Outcome<Value>, Thlet thread_id = request.thread_id;let dir = workspace_dir().await.map_err(ThreadsError::Message)?;- crate::web_chat::cancel_chat(&client_id, &thread_id)+ crate::web_chat::cancel_chat_scoped(&client_id, &thread_id, None).await.map_err(ThreadsError::Message)?;diff --git a/crates/openhuman-core/src/tools/user_filter.rs b/crates/openhuman-core/src/tools/user_filter.rsindex 391f56c048..b7b3a23a46 100644--- a/crates/openhuman-core/src/tools/user_filter.rs+++ b/crates/openhuman-core/src/tools/user_filter.rs@@ -120,6 +120,8 @@ const TOOL_FAMILIES: &[ToolFamily] = &[],default_enabled: false,},+ // keep until v0.66 (review after 2027-01-11): persisted opt-in snapshots need+ // a one-shot skill_manage -> workflow_manage migration before retirement.// Legacy alias: pre-rename `enabled_tool_names` snapshots stored this// family as `skill_manage`. Retain it (same rust_names) so users who had// already opted in keep these default-OFF tools enabled after thediff --git a/crates/openhuman-core/src/voice/schemas/params.rs b/crates/openhuman-core/src/voice/schemas/params.rsindex 19156662e4..c1a55fe5d5 100644--- a/crates/openhuman-core/src/voice/schemas/params.rs+++ b/crates/openhuman-core/src/voice/schemas/params.rs@@ -51,6 +51,8 @@ pub(super) struct CloudTranscribeParams {/// effective provider from `config.local_ai.stt_provider`. Keeps the/// existing `voice_cloud_transcribe` RPC intact for back-compat — older/// renderers still pin the cloud path directly.+// keep until v0.66 (review after 2027-01-11): shipped sttClient still calls+// voice_cloud_transcribe; migrate it and verify client telemetry before removal.#[derive(Debug, Deserialize)]pub(super) struct SttDispatchParams {pub(super) audio_base64: String,diff --git a/crates/openhuman-core/src/web_chat/mod.rs b/crates/openhuman-core/src/web_chat/mod.rsindex b2b3b92c40..9ab75a5ae0 100644--- a/crates/openhuman-core/src/web_chat/mod.rs+++ b/crates/openhuman-core/src/web_chat/mod.rs@@ -79,7 +79,7 @@ pub use ops::parallel_in_flight_entries_for_test;#[cfg(test)]pub(crate) use ops::track_parallel_turn_for_test;pub use ops::{- cancel_all_turns, cancel_chat, cancel_chat_scoped, cancel_should_target, channel_web_cancel,+ cancel_all_turns, cancel_chat_scoped, cancel_should_target, channel_web_cancel,channel_web_chat, channel_web_queue_clear, channel_web_queue_remove, channel_web_queue_status,in_flight_entries_for_test, invalidate_thread_sessions, run_system_turn_on_thread, start_chat,StartChatError, SESSION_CHECKOUT_FAILURE, SYSTEM_CLIENT_ID,diff --git a/crates/openhuman-core/src/web_chat/ops.rs b/crates/openhuman-core/src/web_chat/ops.rsindex 10464d19ec..a2ac56ab7f 100644--- a/crates/openhuman-core/src/web_chat/ops.rs+++ b/crates/openhuman-core/src/web_chat/ops.rs@@ -19,7 +19,7 @@ pub(super) use budget_correlation::{};pub use channel_ops::{- cancel_all_turns, cancel_chat, cancel_chat_scoped, channel_web_cancel, channel_web_chat,+ cancel_all_turns, cancel_chat_scoped, channel_web_cancel, channel_web_chat,channel_web_queue_clear, channel_web_queue_remove, channel_web_queue_status,};diff --git a/crates/openhuman-core/src/web_chat/ops/channel_ops.rs b/crates/openhuman-core/src/web_chat/ops/channel_ops.rsindex 03d48c0dbb..3423a9a590 100644--- a/crates/openhuman-core/src/web_chat/ops/channel_ops.rs+++ b/crates/openhuman-core/src/web_chat/ops/channel_ops.rs@@ -13,16 +13,6 @@ use super::parallel_turn::{cancel_parallel_turn_by_request_id, cancel_parallel_tuse super::start_chat::start_chat;use super::state::{cancel_in_flight_gracefully, cancel_should_target, in_flight, key_for};-/// Cancel whatever turn is currently running on a thread (unscoped stop).-///-/// Back-compat entry point (Stop button / session teardown). For a cancel that-/// must only affect a specific turn — so a stale cancel can't kill a newer turn-/// on the same thread — use [`cancel_chat_scoped`] with the target `request_id`-/// (#4760).-pub async fn cancel_chat(client_id: &str, thread_id: &str) -> Result<Option<String>, String> {- cancel_chat_scoped(client_id, thread_id, None).await-}-/// Cancel the in-flight turn(s) for a thread.////// When `request_id` is `Some`, the cancel is **scoped**: it only tears down thediff --git a/crates/openhuman-core/src/web_chat/web_tests.rs b/crates/openhuman-core/src/web_chat/web_tests.rsindex 245679d54e..91bb3cfbc8 100644--- a/crates/openhuman-core/src/web_chat/web_tests.rs+++ b/crates/openhuman-core/src/web_chat/web_tests.rs@@ -1,6 +1,5 @@use super::{- all_web_channel_controller_schemas, all_web_channel_registered_controllers, cancel_chat,- channel_web_cancel, channel_web_queue_clear, channel_web_queue_remove,+ all_web_channel_controller_schemas, all_web_channel_registered_controllers, channel_web_cancel, channel_web_queue_clear, channel_web_queue_remove,channel_web_queue_status, classify_inference_error, drain_queued_turns_for_test,event_session_id_for, generic_inference_error_user_message, in_flight_entries_for_test,inference_budget_exceeded_user_message, is_inference_budget_exceeded_error, key_for,diff --git a/crates/openhuman-core/src/web_chat/web_tests_queue_acceptance_tests.rs b/crates/openhuman-core/src/web_chat/web_tests_queue_acceptance_tests.rsindex fe2d4f256a..f0f2cd237d 100644--- a/crates/openhuman-core/src/web_chat/web_tests_queue_acceptance_tests.rs+++ b/crates/openhuman-core/src/web_chat/web_tests_queue_acceptance_tests.rs@@ -37,7 +37,7 @@ async fn queue_message(thread_id: &str, text: &str, mode: &str) -> serde_json::V}async fn cancel_parked_turn(thread_id: &str, block: &TestRunChatTaskBlock) {- cancel_chat("queue-test-client", thread_id)+ cancel_chat_scoped("queue-test-client", thread_id, None).await.expect("parked turn should cancel");wait_for_in_flight(|entries| !entries.iter().any(|(key, _)| key == thread_id)).await;diff --git a/crates/openhuman-core/src/web_chat/web_tests_session_and_concurrency_tests.rs b/crates/openhuman-core/src/web_chat/web_tests_session_and_concurrency_tests.rsindex d7d95555f5..fedc3420a6 100644--- a/crates/openhuman-core/src/web_chat/web_tests_session_and_concurrency_tests.rs+++ b/crates/openhuman-core/src/web_chat/web_tests_session_and_concurrency_tests.rs@@ -247,8 +247,8 @@ async fn start_chat_runs_distinct_threads_concurrently() {);// Cleanup: cancel both and clear the test hook.- let _ = cancel_chat("client-a", thread_a).await;- let _ = cancel_chat("client-b", thread_b).await;+ let _ = cancel_chat_scoped("client-a", thread_a, None).await;+ let _ = cancel_chat_scoped("client-b", thread_b, None).await;set_test_run_chat_task_block(None).await;}@@ -283,7 +283,7 @@ async fn cancel_chat_cooperatively_stops_in_flight_turn() {"turn should still be parked, not yet dropped");- let cancelled = cancel_chat("cancel-client", thread_id)+ let cancelled = cancel_chat_scoped("cancel-client", thread_id, None).await.expect("cancel_chat should succeed");assert_eq!(@@ -422,7 +422,7 @@ async fn parallel_turn_runs_concurrently_with_primary_on_same_thread() {);// A thread-level cancel tears down BOTH the primary and the parallel turn.- cancel_chat("pp-client", thread_id)+ cancel_chat_scoped("pp-client", thread_id, None).await.expect("cancel should succeed");wait_for_in_flight(|e| !e.iter().any(|(k, _)| k == thread_id)).await;diff --git a/crates/openhuman-core/src/web_chat/web_tests_start_chat_ingress_tests.rs b/crates/openhuman-core/src/web_chat/web_tests_start_chat_ingress_tests.rsindex 2f29e8662e..fb1bdd6445 100644--- a/crates/openhuman-core/src/web_chat/web_tests_start_chat_ingress_tests.rs+++ b/crates/openhuman-core/src/web_chat/web_tests_start_chat_ingress_tests.rs@@ -85,12 +85,12 @@ async fn start_chat_rejects_prompt_injection_payload() {#[tokio::test]async fn cancel_chat_validates_required_fields() {- let err = cancel_chat("", "thread")+ let err = cancel_chat_scoped("", "thread", None).await.expect_err("client id should be required");assert!(err.contains("client_id is required"));- let err = cancel_chat("client", "")+ let err = cancel_chat_scoped("client", "", None).await.expect_err("thread id should be required");assert!(err.contains("thread_id is required"));