Skip to content

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

fix(tauriCommands): align command names with backend

Steven Enamakelcf9caa37bb2e
diff --git a/app/src/utils/tauriCommands/auth.ts b/app/src/utils/tauriCommands/auth.ts
index 3826528525..7260700ea0 100644
--- a/app/src/utils/tauriCommands/auth.ts
+++ b/app/src/utils/tauriCommands/auth.ts
@@ -52,9 +52,6 @@ export async function storeSession(token: string, user: object): Promise<void> {
}
export async function openhumanEncryptSecret(plaintext: string): Promise<CommandResponse<string>> {
- if (!isTauri()) {
- throw new Error('Not running in Tauri');
- }
return await callCoreRpc<CommandResponse<string>>({
method: 'openhuman.encrypt_secret',
params: { plaintext },
@@ -62,9 +59,6 @@ export async function openhumanEncryptSecret(plaintext: string): Promise<Command
}
export async function openhumanDecryptSecret(ciphertext: string): Promise<CommandResponse<string>> {
- if (!isTauri()) {
- throw new Error('Not running in Tauri');
- }
return await callCoreRpc<CommandResponse<string>>({
method: 'openhuman.decrypt_secret',
params: { ciphertext },
@@ -101,9 +95,6 @@ export async function authStoreProviderCredentials(args: {
fields?: Record<string, string>;
setActive?: boolean;
}): Promise<CommandResponse<AuthProfileSummary>> {
- if (!isTauri()) {
- throw new Error('Not running in Tauri');
- }
return await callCoreRpc<CommandResponse<AuthProfileSummary>>({
method: 'openhuman.auth_store_provider_credentials',
params: args,
@@ -115,9 +106,6 @@ export async function authRemoveProviderCredentials(args: {
provider: string;
profile?: string;
}): Promise<CommandResponse<{ removed: boolean; provider: string; profile: string }>> {
- if (!isTauri()) {
- throw new Error('Not running in Tauri');
- }
return await callCoreRpc<
CommandResponse<{ removed: boolean; provider: string; profile: string }>
>({ method: 'openhuman.auth_remove_provider_credentials', params: args });
@@ -127,9 +115,6 @@ export async function authRemoveProviderCredentials(args: {
export async function authListProviderCredentials(
provider?: string
): Promise<CommandResponse<AuthProfileSummary[]>> {
- if (!isTauri()) {
- throw new Error('Not running in Tauri');
- }
return await callCoreRpc<CommandResponse<AuthProfileSummary[]>>({
method: 'openhuman.auth_list_provider_credentials',
params: provider ? { provider } : {},
diff --git a/app/src/utils/tauriCommands/composio.ts b/app/src/utils/tauriCommands/composio.ts
index 3b2e95a0ca..e5f018816d 100644
--- a/app/src/utils/tauriCommands/composio.ts
+++ b/app/src/utils/tauriCommands/composio.ts
@@ -19,9 +19,6 @@ export interface ComposioTriggerHistoryResult {
export async function openhumanComposioListTriggerHistory(
limit = 100
): Promise<CommandResponse<{ result: ComposioTriggerHistoryResult }>> {
- if (!isTauri()) {
- throw new Error('Not running in Tauri');
- }
return await callCoreRpc<CommandResponse<{ result: ComposioTriggerHistoryResult }>>({
method: 'openhuman.composio_list_trigger_history',
@@ -44,9 +41,6 @@ export interface ComposioModeStatus {
/// Read the current Composio routing mode and whether a direct-mode API
/// key is stored. The key itself is never returned.
export async function openhumanComposioGetMode(): Promise<CommandResponse<ComposioModeStatus>> {
- if (!isTauri()) {
- throw new Error('Not running in Tauri');
- }
return await callCoreRpc<CommandResponse<ComposioModeStatus>>({
method: 'openhuman.composio_get_mode',
});
@@ -63,9 +57,6 @@ export async function openhumanComposioSetApiKey(
apiKey: string,
activateDirect = true
): Promise<CommandResponse<ComposioSetApiKeyResult>> {
- if (!isTauri()) {
- throw new Error('Not running in Tauri');
- }
return await callCoreRpc<CommandResponse<ComposioSetApiKeyResult>>({
method: 'openhuman.composio_set_api_key',
params: { api_key: apiKey, activate_direct: activateDirect },
@@ -77,9 +68,6 @@ export async function openhumanComposioSetApiKey(
export async function openhumanComposioClearApiKey(): Promise<
CommandResponse<{ cleared: boolean; mode: string }>
> {
- if (!isTauri()) {
- throw new Error('Not running in Tauri');
- }
return await callCoreRpc<CommandResponse<{ cleared: boolean; mode: string }>>({
method: 'openhuman.composio_clear_api_key',
});
diff --git a/app/src/utils/tauriCommands/config.ts b/app/src/utils/tauriCommands/config.ts
index 1695c236f6..f6d00cac05 100644
--- a/app/src/utils/tauriCommands/config.ts
+++ b/app/src/utils/tauriCommands/config.ts
@@ -220,9 +220,6 @@ export interface AIPreview {
}
export async function openhumanGetConfig(): Promise<CommandResponse<ConfigSnapshot>> {
- if (!isTauri()) {
- throw new Error('Not running in Tauri');
- }
return await callCoreRpc<CommandResponse<ConfigSnapshot>>({ method: CORE_RPC_METHODS.configGet });
}
@@ -274,9 +271,6 @@ export interface ClientConfig {
}
export async function openhumanGetClientConfig(): Promise<CommandResponse<ClientConfig>> {
- if (!isTauri()) {
- throw new Error('Not running in Tauri');
- }
return await callCoreRpc<CommandResponse<ClientConfig>>({
method: 'openhuman.inference_get_client_config',
});
@@ -300,9 +294,6 @@ export type ClaudeCodeStatus =
* `not_installed` variant signals that case explicitly.
*/
export async function openhumanClaudeCodeStatus(): Promise<CommandResponse<ClaudeCodeStatus>> {
- if (!isTauri()) {
- throw new Error('Not running in Tauri');
- }
return await callCoreRpc<CommandResponse<ClaudeCodeStatus>>({
method: 'openhuman.inference_claude_code_status',
});
@@ -335,9 +326,6 @@ export type ClaudeCodeAuthStatus =
* Recheck, not on a tight loop.
*/
export async function openhumanClaudeCodeAuthStatus(): Promise<ClaudeCodeAuthStatus> {
- if (!isTauri()) {
- throw new Error('Not running in Tauri');
- }
// The core handler returns the value via `RpcOutcome::new(_, vec![])` with no
// logs, which `into_cli_compatible_json` serializes as the BARE value (not a
// `{ result, logs }` envelope). `callCoreRpc` returns the JSON-RPC `result`,
@@ -364,9 +352,6 @@ export interface ClaudeCodeSettings {
* `{ result, logs }` envelope) — see {@link openhumanClaudeCodeAuthStatus}.
*/
export async function openhumanClaudeCodeSettings(): Promise<ClaudeCodeSettings> {
- if (!isTauri()) {
- throw new Error('Not running in Tauri');
- }
return await callCoreRpc<ClaudeCodeSettings>({
method: 'openhuman.inference_claude_code_settings',
});
@@ -379,9 +364,6 @@ export async function openhumanClaudeCodeSettings(): Promise<ClaudeCodeSettings>
export async function openhumanClaudeCodeSetFullAccess(
enabled: boolean
): Promise<ClaudeCodeSettings> {
- if (!isTauri()) {
- throw new Error('Not running in Tauri');
- }
return await callCoreRpc<ClaudeCodeSettings>({
method: 'openhuman.inference_claude_code_set_full_access',
params: { enabled },
@@ -406,9 +388,6 @@ export async function openhumanClaudeCodeLoginLaunch(): Promise<string> {
export async function openhumanUpdateModelSettings(
update: ModelSettingsUpdate
): Promise<CommandResponse<ConfigSnapshot>> {
- if (!isTauri()) {
- throw new Error('Not running in Tauri');
- }
return await callCoreRpc<CommandResponse<ConfigSnapshot>>({
method: 'openhuman.inference_update_model_settings',
params: update,
@@ -418,9 +397,6 @@ export async function openhumanUpdateModelSettings(
export async function openhumanUpdateMemorySettings(
update: MemorySettingsUpdate
): Promise<CommandResponse<ConfigSnapshot>> {
- if (!isTauri()) {
- throw new Error('Not running in Tauri');
- }
return await callCoreRpc<CommandResponse<ConfigSnapshot>>({
method: CORE_RPC_METHODS.configUpdateMemorySettings,
params: update,
@@ -430,9 +406,6 @@ export async function openhumanUpdateMemorySettings(
export async function openhumanUpdateRuntimeSettings(
update: RuntimeSettingsUpdate
): Promise<CommandResponse<ConfigSnapshot>> {
- if (!isTauri()) {
- throw new Error('Not running in Tauri');
- }
return await callCoreRpc<CommandResponse<ConfigSnapshot>>({
method: CORE_RPC_METHODS.configUpdateRuntimeSettings,
params: update,
@@ -442,9 +415,6 @@ export async function openhumanUpdateRuntimeSettings(
export async function openhumanUpdateBrowserSettings(
update: BrowserSettingsUpdate
): Promise<CommandResponse<ConfigSnapshot>> {
- if (!isTauri()) {
- throw new Error('Not running in Tauri');
- }
return await callCoreRpc<CommandResponse<ConfigSnapshot>>({
method: CORE_RPC_METHODS.configUpdateBrowserSettings,
params: update,
@@ -498,9 +468,6 @@ export interface AutonomySettingsUpdate {
}
export async function openhumanGetAutonomySettings(): Promise<CommandResponse<AutonomySettings>> {
- if (!isTauri()) {
- throw new Error('Not running in Tauri');
- }
return await callCoreRpc<CommandResponse<AutonomySettings>>({
method: CORE_RPC_METHODS.configGetAutonomySettings,
});
@@ -529,9 +496,6 @@ export interface AgentPaths {
}
export async function openhumanGetAgentPaths(): Promise<CommandResponse<AgentPaths>> {
- if (!isTauri()) {
- throw new Error('Not running in Tauri');
- }
return await callCoreRpc<CommandResponse<AgentPaths>>({
method: CORE_RPC_METHODS.configGetAgentPaths,
});
@@ -545,9 +509,6 @@ export interface AgentPathsUpdate {
export async function openhumanUpdateAgentPaths(
update: AgentPathsUpdate
): Promise<CommandResponse<AgentPaths>> {
- if (!isTauri()) {
- throw new Error('Not running in Tauri');
- }
return await callCoreRpc<CommandResponse<AgentPaths>>({
method: CORE_RPC_METHODS.configUpdateAgentPaths,
params: update,
@@ -557,9 +518,6 @@ export async function openhumanUpdateAgentPaths(
export async function openhumanUpdateAutonomySettings(
update: AutonomySettingsUpdate
): Promise<CommandResponse<ConfigSnapshot>> {
- if (!isTauri()) {
- throw new Error('Not running in Tauri');
- }
return await callCoreRpc<CommandResponse<ConfigSnapshot>>({
method: CORE_RPC_METHODS.configUpdateAutonomySettings,
params: update,
@@ -593,9 +551,6 @@ export interface SandboxSettingsUpdate {
}
export async function openhumanGetSandboxSettings(): Promise<CommandResponse<SandboxSettings>> {
- if (!isTauri()) {
- throw new Error('Not running in Tauri');
- }
return await callCoreRpc<CommandResponse<SandboxSettings>>({
method: CORE_RPC_METHODS.configGetSandboxSettings,
});
@@ -604,9 +559,6 @@ export async function openhumanGetSandboxSettings(): Promise<CommandResponse<San
export async function openhumanUpdateSandboxSettings(
update: SandboxSettingsUpdate
): Promise<CommandResponse<ConfigSnapshot>> {
- if (!isTauri()) {
- throw new Error('Not running in Tauri');
- }
return await callCoreRpc<CommandResponse<ConfigSnapshot>>({
method: CORE_RPC_METHODS.configUpdateSandboxSettings,
params: update,
@@ -640,9 +592,6 @@ export interface MemorySyncSettingsUpdate {
export async function openhumanGetMemorySyncSettings(): Promise<
CommandResponse<MemorySyncSettings>
> {
- if (!isTauri()) {
- throw new Error('Not running in Tauri');
- }
return await callCoreRpc<CommandResponse<MemorySyncSettings>>({
method: CORE_RPC_METHODS.configGetMemorySyncSettings,
});
@@ -651,9 +600,6 @@ export async function openhumanGetMemorySyncSettings(): Promise<
export async function openhumanUpdateMemorySyncSettings(
update: MemorySyncSettingsUpdate
): Promise<CommandResponse<MemorySyncSettings>> {
- if (!isTauri()) {
- throw new Error('Not running in Tauri');
- }
return await callCoreRpc<CommandResponse<MemorySyncSettings>>({
method: CORE_RPC_METHODS.configUpdateMemorySyncSettings,
params: update,
@@ -682,9 +628,6 @@ export interface AgentSettingsUpdate {
}
export async function openhumanGetAgentSettings(): Promise<CommandResponse<AgentSettings>> {
- if (!isTauri()) {
- throw new Error('Not running in Tauri');
- }
return await callCoreRpc<CommandResponse<AgentSettings>>({
method: CORE_RPC_METHODS.configGetAgentSettings,
});
@@ -693,9 +636,6 @@ export async function openhumanGetAgentSettings(): Promise<CommandResponse<Agent
export async function openhumanUpdateAgentSettings(
update: AgentSettingsUpdate
): Promise<CommandResponse<ConfigSnapshot>> {
- if (!isTauri()) {
- throw new Error('Not running in Tauri');
- }
return await callCoreRpc<CommandResponse<ConfigSnapshot>>({
method: CORE_RPC_METHODS.configUpdateAgentSettings,
params: update,
@@ -705,9 +645,6 @@ export async function openhumanUpdateAgentSettings(
export async function openhumanUpdateLocalAiSettings(
update: LocalAiSettingsUpdate
): Promise<CommandResponse<ConfigSnapshot>> {
- if (!isTauri()) {
- throw new Error('Not running in Tauri');
- }
return await callCoreRpc<CommandResponse<ConfigSnapshot>>({
method: 'openhuman.inference_update_local_settings',
params: update,
@@ -717,9 +654,6 @@ export async function openhumanUpdateLocalAiSettings(
export async function openhumanUpdateAnalyticsSettings(update: {
enabled?: boolean;
}): Promise<CommandResponse<ConfigSnapshot>> {
- if (!isTauri()) {
- throw new Error('Not running in Tauri');
- }
return await callCoreRpc<CommandResponse<ConfigSnapshot>>({
method: CORE_RPC_METHODS.configUpdateAnalyticsSettings,
params: update,
@@ -729,9 +663,6 @@ export async function openhumanUpdateAnalyticsSettings(update: {
export async function openhumanGetAnalyticsSettings(): Promise<
CommandResponse<{ enabled: boolean }>
> {
- if (!isTauri()) {
- throw new Error('Not running in Tauri');
- }
return await callCoreRpc<CommandResponse<{ enabled: boolean }>>({
method: CORE_RPC_METHODS.configGetAnalyticsSettings,
});
@@ -839,9 +770,6 @@ export interface DashboardSettings {
}
export async function openhumanGetDashboardSettings(): Promise<CommandResponse<DashboardSettings>> {
- if (!isTauri()) {
- throw new Error('Not running in Tauri');
- }
return await callCoreRpc<CommandResponse<DashboardSettings>>({
method: CORE_RPC_METHODS.configGetDashboardSettings,
});
@@ -879,9 +807,6 @@ export interface ComposioTriggerSettings {
export async function openhumanUpdateComposioTriggerSettings(
update: ComposioTriggerSettingsUpdate
): Promise<CommandResponse<ConfigSnapshot>> {
- if (!isTauri()) {
- throw new Error('Not running in Tauri');
- }
try {
return await callCoreRpc<CommandResponse<ConfigSnapshot>>({
method: 'openhuman.config_update_composio_trigger_settings',
@@ -902,9 +827,6 @@ export async function openhumanUpdateComposioTriggerSettings(
export async function openhumanGetComposioTriggerSettings(): Promise<
CommandResponse<ComposioTriggerSettings>
> {
- if (!isTauri()) {
- throw new Error('Not running in Tauri');
- }
try {
return await callCoreRpc<CommandResponse<ComposioTriggerSettings>>({
method: 'openhuman.config_get_composio_trigger_settings',
@@ -922,9 +844,6 @@ export async function openhumanGetComposioTriggerSettings(): Promise<
}
export async function openhumanGetRuntimeFlags(): Promise<CommandResponse<RuntimeFlags>> {
- if (!isTauri()) {
- throw new Error('Not running in Tauri');
- }
return await callCoreRpc<CommandResponse<RuntimeFlags>>({
method: CORE_RPC_METHODS.configGetRuntimeFlags,
});
@@ -933,9 +852,6 @@ export async function openhumanGetRuntimeFlags(): Promise<CommandResponse<Runtim
export async function openhumanSetBrowserAllowAll(
enabled: boolean
): Promise<CommandResponse<RuntimeFlags>> {
- if (!isTauri()) {
- throw new Error('Not running in Tauri');
- }
return await callCoreRpc<CommandResponse<RuntimeFlags>>({
method: CORE_RPC_METHODS.configSetBrowserAllowAll,
params: { enabled },
diff --git a/app/src/utils/tauriCommands/core.ts b/app/src/utils/tauriCommands/core.ts
index a96199c9bd..7b0b95c503 100644
--- a/app/src/utils/tauriCommands/core.ts
+++ b/app/src/utils/tauriCommands/core.ts
@@ -306,18 +306,12 @@ export async function setOnboardingCompleted(value: boolean): Promise<boolean> {
}
export async function openhumanDoctorReport(): Promise<CommandResponse<DoctorReport>> {
- if (!isTauri()) {
- throw new Error('Not running in Tauri');
- }
return await callCoreRpc<CommandResponse<DoctorReport>>({ method: 'openhuman.doctor_report' });
}
export async function openhumanDoctorModels(
useCache = true
): Promise<CommandResponse<ModelProbeReport>> {
- if (!isTauri()) {
- throw new Error('Not running in Tauri');
- }
return await callCoreRpc<CommandResponse<ModelProbeReport>>({
method: 'openhuman.doctor_models',
params: { use_cache: useCache },
@@ -328,9 +322,6 @@ export async function openhumanMigrateOpenclaw(
sourceWorkspace?: string,
dryRun = true
): Promise<CommandResponse<MigrationReport>> {
- if (!isTauri()) {
- throw new Error('Not running in Tauri');
- }
return await callCoreRpc<CommandResponse<MigrationReport>>({
method: 'openhuman.migrate_openclaw',
params: { source_workspace: sourceWorkspace, dry_run: dryRun },
@@ -341,9 +332,6 @@ export async function openhumanMigrateHermes(
sourceWorkspace?: string,
dryRun = true
): Promise<CommandResponse<MigrationReport>> {
- if (!isTauri()) {
- throw new Error('Not running in Tauri');
- }
return await callCoreRpc<CommandResponse<MigrationReport>>({
method: 'openhuman.migrate_hermes',
params: { source_workspace: sourceWorkspace, dry_run: dryRun },
diff --git a/app/src/utils/tauriCommands/cron.ts b/app/src/utils/tauriCommands/cron.ts
index 6379c1093d..bd020455fc 100644
--- a/app/src/utils/tauriCommands/cron.ts
+++ b/app/src/utils/tauriCommands/cron.ts
@@ -68,16 +68,10 @@ export interface CronAddParams {
export async function openhumanCronAdd(
params: CronAddParams
): Promise<CommandResponse<CoreCronJob>> {
- if (!isTauri()) {
- throw new Error('Not running in Tauri');
- }
return await callCoreRpc<CommandResponse<CoreCronJob>>({ method: 'openhuman.cron_add', params });
}
export async function openhumanCronList(): Promise<CommandResponse<CoreCronJob[]>> {
- if (!isTauri()) {
- throw new Error('Not running in Tauri');
- }
return await callCoreRpc<CommandResponse<CoreCronJob[]>>({ method: 'openhuman.cron_list' });
}
@@ -85,9 +79,6 @@ export async function openhumanCronUpdate(
jobId: string,
patch: Record<string, unknown>
): Promise<CommandResponse<CoreCronJob>> {
- if (!isTauri()) {
- throw new Error('Not running in Tauri');
- }
return await callCoreRpc<CommandResponse<CoreCronJob>>({
method: 'openhuman.cron_update',
params: { job_id: jobId, patch },
@@ -97,9 +88,6 @@ export async function openhumanCronUpdate(
export async function openhumanCronRemove(
jobId: string
): Promise<CommandResponse<{ job_id: string; removed: boolean }>> {
- if (!isTauri()) {
- throw new Error('Not running in Tauri');
- }
return await callCoreRpc<CommandResponse<{ job_id: string; removed: boolean }>>({
method: 'openhuman.cron_remove',
params: { job_id: jobId },
@@ -116,9 +104,6 @@ export async function openhumanCronRun(
output?: string;
}>
> {
- if (!isTauri()) {
- throw new Error('Not running in Tauri');
- }
return await callCoreRpc<
CommandResponse<{
job_id: string;
@@ -133,9 +118,6 @@ export async function openhumanCronRuns(
jobId: string,
limit = 20
): Promise<CommandResponse<CoreCronRun[]>> {
- if (!isTauri()) {
- throw new Error('Not running in Tauri');
- }
return await callCoreRpc<CommandResponse<CoreCronRun[]>>({
method: 'openhuman.cron_runs',
params: { job_id: jobId, limit },
diff --git a/app/src/utils/tauriCommands/localAi.ts b/app/src/utils/tauriCommands/localAi.ts
index 59a1033c44..006f1b9e2e 100644
--- a/app/src/utils/tauriCommands/localAi.ts
+++ b/app/src/utils/tauriCommands/localAi.ts
@@ -228,9 +228,6 @@ export async function openhumanAgentChat(
modelOverride?: string,
temperature?: number
): Promise<CommandResponse<string>> {
- if (!isTauri()) {
- throw new Error('Not running in Tauri');
- }
return await callCoreRpc<CommandResponse<string>>({
method: 'openhuman.agent_chat',
params: { message, model_override: modelOverride, temperature },
diff --git a/app/src/utils/tauriCommands/memory.ts b/app/src/utils/tauriCommands/memory.ts
index 2ce269d3d2..398861142e 100644
--- a/app/src/utils/tauriCommands/memory.ts
+++ b/app/src/utils/tauriCommands/memory.ts
@@ -100,9 +100,6 @@ export async function syncMemoryClientToken(token: string): Promise<void> {
}
export async function memoryListDocuments(namespace?: string): Promise<unknown> {
- if (!isTauri()) {
- throw new Error('Not running in Tauri');
- }
const resp = await callCoreRpc<unknown>({
method: 'openhuman.memory_list_documents',
params: { namespace },
@@ -115,9 +112,6 @@ export async function memoryListDocuments(namespace?: string): Promise<unknown>
}
export async function memoryListNamespaces(): Promise<string[]> {
- if (!isTauri()) {
- throw new Error('Not running in Tauri');
- }
const resp = await callCoreRpc<{ data?: { namespaces?: string[] }; namespaces?: string[] }>({
method: 'openhuman.memory_list_namespaces',
});
@@ -133,9 +127,6 @@ export async function memoryDeleteDocument(
documentId: string,
namespace: string
): Promise<unknown> {
- if (!isTauri()) {
- throw new Error('Not running in Tauri');
- }
return await callCoreRpc<unknown>({
method: 'openhuman.memory_delete_document',
params: { document_id: documentId, namespace },
@@ -145,9 +136,6 @@ export async function memoryDeleteDocument(
export async function memoryClearNamespace(
namespace: string
): Promise<{ cleared: boolean; namespace: string }> {
- if (!isTauri()) {
- throw new Error('Not running in Tauri');
- }
const response = await callCoreRpc<{ result: { cleared: boolean; namespace: string } }>({
method: 'openhuman.memory_clear_namespace',
params: { namespace },
@@ -160,9 +148,6 @@ export async function memoryQueryNamespace(
query: string,
maxChunks?: number
): Promise<MemoryQueryResult> {
- if (!isTauri()) {
- throw new Error('Not running in Tauri');
- }
const resp = await callCoreRpc<unknown>({
method: 'openhuman.memory_query_namespace',
params: { namespace, query, max_chunks: maxChunks },
@@ -174,9 +159,6 @@ export async function memoryRecallNamespace(
namespace: string,
maxChunks?: number
): Promise<MemoryQueryResult> {
- if (!isTauri()) {
- throw new Error('Not running in Tauri');
- }
const resp = await callCoreRpc<unknown>({
method: 'openhuman.memory_recall_context',
params: { namespace, max_chunks: maxChunks },
@@ -189,9 +171,6 @@ export async function memoryGraphQuery(
subject?: string,
predicate?: string
): Promise<GraphRelation[]> {
- if (!isTauri()) {
- throw new Error('Not running in Tauri');
- }
const raw = await callCoreRpc<GraphRelation[] | { result: GraphRelation[] }>({
method: 'openhuman.memory_graph_query',
params: { namespace, subject, predicate },
@@ -220,9 +199,6 @@ export async function memoryDocIngest(params: {
session_id?: string;
document_id?: string;
}): Promise<unknown> {
- if (!isTauri()) {
- throw new Error('Not running in Tauri');
- }
return await callCoreRpc<unknown>({ method: 'openhuman.memory_doc_ingest', params });
}
@@ -238,9 +214,6 @@ export async function memoryDocIngest(params: {
* accepts `""` as "the memory root", so default to that.
*/
export async function aiListMemoryFiles(relativeDir = ''): Promise<string[]> {
- if (!isTauri()) {
- throw new Error('Not running in Tauri');
- }
const resp = await callCoreRpc<{ data?: { files?: string[] }; files?: string[] }>({
method: 'openhuman.memory_list_files',
params: { relative_dir: relativeDir },
@@ -255,9 +228,6 @@ export async function aiListMemoryFiles(relativeDir = ''): Promise<string[]> {
}
export async function aiReadMemoryFile(relativePath: string): Promise<string> {
- if (!isTauri()) {
- throw new Error('Not running in Tauri');
- }
const resp = await callCoreRpc<{ data?: { content?: string }; content?: string } | string>({
method: 'openhuman.memory_read_file',
params: { relative_path: relativePath },
@@ -270,9 +240,6 @@ export async function aiReadMemoryFile(relativePath: string): Promise<string> {
}
export async function aiWriteMemoryFile(relativePath: string, content: string): Promise<void> {
- if (!isTauri()) {
- throw new Error('Not running in Tauri');
- }
await callCoreRpc<boolean>({
method: 'openhuman.memory_write_file',
params: { relative_path: relativePath, content },
@@ -306,9 +273,6 @@ export interface MemoryLearnAllResult {
*/
export async function memorySyncChannel(channelId: string): Promise<MemorySyncChannelResult> {
console.debug('[memory.sync] memorySyncChannel: entry channel_id=%s', channelId);
- if (!isTauri()) {
- throw new Error('Not running in Tauri');
- }
const resp = await callCoreRpc<MemorySyncChannelResult>({
method: 'openhuman.memory_sync_channel',
params: { channel_id: channelId },
@@ -323,9 +287,6 @@ export async function memorySyncChannel(channelId: string): Promise<MemorySyncCh
*/
export async function memorySyncAll(): Promise<MemorySyncAllResult> {
console.debug('[memory.sync] memorySyncAll: entry');
- if (!isTauri()) {
- throw new Error('Not running in Tauri');
- }
const resp = await callCoreRpc<MemorySyncAllResult>({ method: 'openhuman.memory_sync_all' });
console.debug('[memory.sync] memorySyncAll: exit result=%o', resp);
return resp;
@@ -337,9 +298,6 @@ export async function memorySyncAll(): Promise<MemorySyncAllResult> {
*/
export async function memoryLearnAll(namespaces?: string[]): Promise<MemoryLearnAllResult> {
console.debug('[memory.learn] memoryLearnAll: entry namespaces=%o', namespaces);
- if (!isTauri()) {
- throw new Error('Not running in Tauri');
- }
const params: Record<string, unknown> = {};
if (namespaces && namespaces.length > 0) {
params.namespaces = namespaces;
diff --git a/app/src/utils/tauriCommands/service.ts b/app/src/utils/tauriCommands/service.ts
index 27b264a713..26e72d53ae 100644
--- a/app/src/utils/tauriCommands/service.ts
+++ b/app/src/utils/tauriCommands/service.ts
@@ -100,9 +100,6 @@ export async function openhumanServiceRestart(
source?: string,
reason?: string
): Promise<CommandResponse<RestartStatus>> {
- if (!isTauri()) {
- throw new Error('Not running in Tauri');
- }
return await callCoreRpc<CommandResponse<RestartStatus>>({
method: 'openhuman.service_restart',
params: { source, reason },
@@ -110,18 +107,12 @@ export async function openhumanServiceRestart(
}
export async function openhumanAgentServerStatus(): Promise<CommandResponse<AgentServerStatus>> {
- if (!isTauri()) {
- throw new Error('Not running in Tauri');
- }
return await callCoreRpc<CommandResponse<AgentServerStatus>>({
method: 'openhuman.agent_server_status',
});
}
export async function openhumanGetDaemonHostConfig(): Promise<CommandResponse<DaemonHostConfig>> {
- if (!isTauri()) {
- throw new Error('Not running in Tauri');
- }
return await callCoreRpc<CommandResponse<DaemonHostConfig>>({
method: 'openhuman.service_daemon_host_get',
});
@@ -130,9 +121,6 @@ export async function openhumanGetDaemonHostConfig(): Promise<CommandResponse<Da
export async function openhumanSetDaemonHostConfig(
showTray: boolean
): Promise<CommandResponse<DaemonHostConfig>> {
- if (!isTauri()) {
- throw new Error('Not running in Tauri');
- }
return await callCoreRpc<CommandResponse<DaemonHostConfig>>({
method: 'openhuman.service_daemon_host_set',
params: { show_tray: showTray },