Skip to content

The fastest, cheapest, most efficient open-source agent harness. Run more than 500 agents on a $10 VPS.

feat(rpc): add auth session aliases and credential methods

Steven Enamakelc595531b2584
diff --git a/app/src/services/rpcMethods.ts b/app/src/services/rpcMethods.ts
index 9e454c0e0c..a8a7692c61 100644
--- a/app/src/services/rpcMethods.ts
+++ b/app/src/services/rpcMethods.ts
@@ -1,4 +1,8 @@
export const CORE_RPC_METHODS = {
+ authClearCredential: 'openhuman.auth_clear_credential',
+ authGetSessionToken: 'openhuman.auth_get_session_token',
+ authGetState: 'openhuman.auth_get_state',
+ authSetCredential: 'openhuman.auth_set_credential',
configGet: 'openhuman.config_get',
configGetAgentPaths: 'openhuman.config_get_agent_paths',
configGetAgentSettings: 'openhuman.config_get_agent_settings',
@@ -66,6 +70,11 @@ export const CORE_RPC_METHODS = {
type CoreRpcMethod = (typeof CORE_RPC_METHODS)[keyof typeof CORE_RPC_METHODS];
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 in
+ // crates/openhuman-core/src/core/legacy_aliases.rs.
+ 'openhuman.auth_clear_session': CORE_RPC_METHODS.authClearCredential,
+ 'openhuman.auth_store_session': CORE_RPC_METHODS.authSetCredential,
// #3565: old desktop clients used dotted namespace/function channel calls.
'channels.list': CORE_RPC_METHODS.channelsList,
// MCP clients — old method names that appeared in Sentry (CORE-RUST-DR/DS/DT/DV/DW).
diff --git a/crates/openhuman-core/src/core/legacy_aliases.rs b/crates/openhuman-core/src/core/legacy_aliases.rs
index 21ccd9fc49..b230a1d4a9 100644
--- a/crates/openhuman-core/src/core/legacy_aliases.rs
+++ b/crates/openhuman-core/src/core/legacy_aliases.rs
@@ -21,6 +21,14 @@
/// Order doesn't matter for correctness, but is kept alphabetical by legacy
/// key for easier diffing against the frontend table.
const LEGACY_ALIASES: &[(&str, &str)] = &[
+ // The session RPCs became the kind-agnostic credential pair once the
+ // core stopped validating sessions itself (`auth.set_credential` /
+ // `auth.clear_credential`). A pre-migration bundle's `store_session`
+ // params (`token`, `userId`, `user`) are a subset of `set_credential`'s;
+ // its `clear_session` maps to a clear of every kind, which on a desktop
+ // (never an API-key holder) is the same thing.
+ ("openhuman.auth_clear_session", "openhuman.auth_clear_credential"),
+ ("openhuman.auth_store_session", "openhuman.auth_set_credential"),
// #3565: old desktop clients called the channels controller with a dotted
// namespace/function spelling before the canonical
// `openhuman.<namespace>_<function>` form was established.