Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -147,10 +147,6 @@ describe('BrowserConnectionsPanel', () => {
allowed_domains: [],
session_name: null,
backend: 'auto',
native_headless: true,
native_webdriver_url: 'http://127.0.0.1:9515',
native_chrome_path: null,
computer_use: { endpoint: 'http://127.0.0.1:8787/v1/actions', timeout_ms: 15000 },
},
http_request: { allowed_domains: ['selenium.dev'] },
},
Expand Down
14 changes: 7 additions & 7 deletions app/src/utils/tauriCommands/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -762,14 +762,14 @@ export interface SearchSettingsUpdate {
allow_all?: boolean;
}

export interface DiagramViewerSettings {
enabled: boolean;
source_url: string;
refresh_interval_seconds: number;
}

export interface DashboardSettings {
diagram_viewer: DiagramViewerSettings;
event_stream: { enabled: boolean; max_entries: number; new_entries: string };
model_health: {
enabled: boolean;
hallucination_threshold: number;
min_tasks_for_rating: number;
evaluation_window_tasks: number;
};
}

export async function openhumanGetDashboardSettings(): Promise<CommandResponse<DashboardSettings>> {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,6 @@ async fn config(tmp: &tempfile::TempDir) -> Config {
};
config.local_ai.runtime_enabled = false;
config.memory.conversations.enabled = false;
config.agent.session_dual_write = false;
config.agent.session_shadow_reads = false;
crate::credentials::api_key::store_api_key(&config, "test-session-fixture-key")
.await
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,6 @@ async fn config(tmp: &tempfile::TempDir, agent_id: Option<&str>) -> Config {
config.modules.allow_download = false;
config.local_ai.runtime_enabled = false;
config.memory.conversations.enabled = false;
config.agent.session_dual_write = false;
config.agent.session_shadow_reads = false;
crate::credentials::api_key::store_api_key(&config, "test-session-fixture-key")
.await
Expand Down
6 changes: 1 addition & 5 deletions crates/openhuman-core/src/config/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -92,10 +92,8 @@ On success the resolved workspace is published to the cache in [`schema/load/act
way). `active_workspace_snapshot()` resolves the workspace again from disk and returns it with a revision
number, for callers that make one decision per workspace switch.

Two other entry points exist for narrower cases. `Config::load_from_config_path` reloads a config whose
One other entry point exists for a narrower case. `Config::load_from_config_path` reloads a config whose
paths are already known and ignores `OPENHUMAN_WORKSPACE`, for long-lived objects that hold a snapshot.
`Config::load_from_default_paths` ignores `OPENHUMAN_WORKSPACE` too and is read-only; the debug prompt
dump uses it.

Most code does not call these directly. `ops::load_config_with_timeout()` wraps `load_or_init` in a
30-second timeout, returns the embedding host's `Config` instead when one is installed on the current
Expand Down Expand Up @@ -165,7 +163,6 @@ config.update_model_settings (JSON-RPC / CLI)
| `migrations/` | Version-gated startup migrations and `seed_new_workspace`. See [migrations/README.md](migrations/README.md). |
| `workspace/` | Workspace bootstrap (`init_workspace`) and the `workspace.*` RPCs over the editable persona files (`SOUL.md`, `IDENTITY.md`). Registers its own controllers. See [workspace/README.md](workspace/README.md). |
| `app_env.rs` | Reads the app environment (`production`, `staging`) used to pick the root directory. |
| [`daemon.rs`](./daemon.rs) | `DaemonConfig`, a small bundle of `data_dir`, `workspace_dir` and the autonomy, security, reliability, secrets and audit sections, built from a Tauri app data dir by `from_app_data_dir`. Re-exported by `openhuman-embed`. |
| [`tools.rs`](./tools.rs) | Read-only agent tools over config: `config_snapshot`, `config_get_runtime_flags`, `config_get_client_config`, `config_get_autonomy`, `config_get_search`, `config_resolve_api_url`, `config_get_data_paths`. |
| [`workspace_handle.rs`](./workspace_handle.rs) | `workspace_handle(path)`, a short stable digest of a workspace path. Process-wide streams (Event Log, `core_notification`) carry it instead of the path so home directories never reach exported logs. |

Expand All @@ -183,7 +180,6 @@ config.update_model_settings (JSON-RPC / CLI)
| `build_runtime_proxy_client`, `apply_runtime_proxy_to_builder` | [`schema/proxy.rs`](./schema/proxy.rs) | `reqwest` clients that honor the configured proxy for a named service key. |
| `migrations::run_pending`, `CURRENT_SCHEMA_VERSION` | [`migrations/mod.rs`](./migrations/mod.rs) | The startup migration runner. |
| `WORKLOAD_ROLES` | [`schema/types/model_ids.rs`](./schema/types/model_ids.rs) | Provider-neutral workload roles shared by inference and settings. Hosted model ids and aliases are registered by the host. |
| `DaemonConfig` | `daemon.rs` | Supervisor-level config bundle for embedders. |

## RPC surface

Expand Down
57 changes: 0 additions & 57 deletions crates/openhuman-core/src/config/daemon.rs

This file was deleted.

13 changes: 0 additions & 13 deletions crates/openhuman-core/src/config/daemon_tests.rs

This file was deleted.

34 changes: 15 additions & 19 deletions crates/openhuman-core/src/config/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,10 @@
//! This module serves as the primary gateway for all configuration-related functionality.
//! It re-exports types and functions from submodules to provide a unified API for:
//! - Loading and saving user settings (`Config`).
//! - Managing the core daemon's lifecycle and options (`DaemonConfig`).
//! - Defining the RPC surface for configuration management.
//! - Handling the schema definitions for all agent and system settings.

pub mod app_env;
pub mod daemon;
pub mod enrichers;
pub mod migrations;
pub mod ops;
Expand All @@ -20,8 +18,6 @@ pub(crate) mod user_scope;
pub mod workspace;
pub mod workspace_handle;

#[allow(unused_imports)]
pub use daemon::DaemonConfig;
pub use enrichers::{
register_enricher, register_enricher_in, run_enrichers, unregister_enricher, ConfigEnricher,
};
Expand All @@ -46,27 +42,27 @@ pub use schema::{
apply_runtime_proxy_to_builder, build_runtime_proxy_client,
build_runtime_proxy_client_with_timeouts, device_time_zone, normalize_time_zone,
output_language_directive, runtime_proxy_config, set_runtime_proxy_config,
Agent37RuntimeConfig, AgentConfig, AuditConfig, AutonomyConfig, BrowserComputerUseConfig,
BrowserConfig, BudgetAction, BudgetPeriod, BudgetPolicy, BudgetScope, CapabilityProviderConfig,
Agent37RuntimeConfig, AgentConfig, AuditConfig, AutonomyConfig, BrowserConfig, BudgetAction,
BudgetPeriod, BudgetPolicy, BudgetScope, CapabilityProviderConfig,
CapabilityProviderTrustState, ChannelVoiceConfig, ChannelVoiceOverride, ChannelsConfig,
CompactionSettings, CompactionStrategy, ComposioConfig, ComposioDirectBaseUrls,
ComposioHostCredential, ComputerConfig, Config, ContextConfig, ContextSettings, CostConfig,
CronConfig, CurlConfig, DashboardConfig, DecisionModel, DiagramViewerConfig, DiscordConfig,
DockerRuntimeConfig, EmailConfig, EmbeddingRouteConfig, GitbooksConfig, HttpHeader,
HttpRequestConfig, IMessageConfig, IntegrationToggle, IntegrationsConfig, LarkConfig,
LegacySearchInputs, LinqConfig, LocalAiConfig, LocalJailConfig, McpAuthConfig, McpClientConfig,
CronConfig, CurlConfig, DashboardConfig, DecisionModel, DiscordConfig, DockerRuntimeConfig,
EmailConfig, EmbeddingRouteConfig, GitbooksConfig, HttpHeader, HttpRequestConfig,
IMessageConfig, IntegrationToggle, IntegrationsConfig, LarkConfig, LegacySearchInputs,
LinqConfig, LocalAiConfig, LocalJailConfig, McpAuthConfig, McpClientConfig,
McpClientIdentityConfig, McpServerConfig, McpToolExposure, MemoryConfig, MemoryLayoutMode,
ModelRouteConfig, MultimodalConfig, MultimodalFileConfig, ObservabilityConfig,
OpenShellRuntimeConfig, OrchestratorModelConfig, PresentationMode, PrivacyConfig, PrivacyMode,
ProviderRoute, ProxyConfig, ProxyScope, ReliabilityConfig, ResourceLimitsConfig, RuntimeConfig,
SandboxBackend, SandboxConfig, SchedulerConfig, SchedulerGateConfig, SchedulerGateMode,
SearchConfig, SearchEngineCredentials, SearchHostCredential, SearchProviderSettings,
SearxngConfig, SecretsConfig, SecurityConfig, ShellConfig, SlackConfig, StreamMode, SttEngine,
TeamModelConfig, TelegramConfig, TokenjuiceConfig, UnknownKeyedSearchProvider, UpdateConfig,
UpdateRestartStrategy, VoiceServerConfig, WebSearchConfig, YuanbaoConfig,
MANAGED_SEARCH_PROVIDERS, SEARCH_ENGINE_BRAVE, SEARCH_ENGINE_DISABLED, SEARCH_ENGINE_EXA,
SEARCH_ENGINE_MANAGED, SEARCH_ENGINE_PARALLEL, SEARCH_ENGINE_QUERIT, SEARCH_ENGINE_TAVILY,
SEARCH_PROVIDERS, SEARCH_ROLES, SEARCH_ROLE_ANSWER, SEARCH_ROLE_CONTENTS, SEARCH_ROLE_SEARCH,
ProviderRoute, ProxyConfig, ProxyScope, ReliabilityConfig, RuntimeConfig, SandboxBackend,
SandboxConfig, SchedulerConfig, SchedulerGateConfig, SchedulerGateMode, SearchConfig,
SearchEngineCredentials, SearchHostCredential, SearchProviderSettings, SearxngConfig,
SecretsConfig, ShellConfig, SlackConfig, StreamMode, SttEngine, TeamModelConfig,
TelegramConfig, TokenjuiceConfig, UnknownKeyedSearchProvider, UpdateConfig,
UpdateRestartStrategy, VoiceServerConfig, YuanbaoConfig, MANAGED_SEARCH_PROVIDERS,
SEARCH_ENGINE_BRAVE, SEARCH_ENGINE_DISABLED, SEARCH_ENGINE_EXA, SEARCH_ENGINE_MANAGED,
SEARCH_ENGINE_PARALLEL, SEARCH_ENGINE_QUERIT, SEARCH_ENGINE_TAVILY, SEARCH_PROVIDERS,
SEARCH_ROLES, SEARCH_ROLE_ANSWER, SEARCH_ROLE_CONTENTS, SEARCH_ROLE_SEARCH,
};
// Kept as a separate re-export (issue #4117) so the large alphabetized group
// above stays byte-identical and rustfmt-stable.
Expand Down
1 change: 0 additions & 1 deletion crates/openhuman-core/src/config/ops/loader/snapshot.rs
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,6 @@ const DATA_KEYED_MAPS: &[&str] = &[
"/inbound_debounce/by_channel",
"/memory/agents",
"/memory/engines",
"/reliability/model_fallbacks",
"/runtime/reasoning_effort_by_model",
"/search/providers",
"/search/roles",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ fn config_with_every_secret() -> Config {
}
filled += 1;
}
assert_eq!(filled, 38, "every sealed credential field must be set");
assert_eq!(filled, 37, "every sealed credential field must be set");
config
}

Expand Down
15 changes: 7 additions & 8 deletions crates/openhuman-core/src/config/schema/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,12 @@ is mounted as a submodule of [`load/dirs.rs`](./load/dirs.rs) via `#[path]`.
| `[agent]`, `[orchestrator]`, `[teams.*]` | [`agent.rs`](./agent.rs) | `AgentConfig`, `OrchestratorModelConfig`, `TeamModelConfig` |
| `[autonomy]` | [`autonomy.rs`](./autonomy.rs) | `AutonomyConfig`: feeds `security::SecurityPolicy` |
| `[[capability_providers]]` | [`capability_providers.rs`](./capability_providers.rs) | `CapabilityProviderConfig` |
| `[channels_config]`, `[sandbox]` | [`channels.rs`](./channels.rs) | `ChannelsConfig` and per-provider configs re-exported from `tinychannels_bus`; `SandboxConfig`, `ResourceLimitsConfig`, `AuditConfig`, and `SecurityConfig` (only `DaemonConfig` embeds the last one) |
| `[channels_config]`, `[sandbox]` | [`channels.rs`](./channels.rs) | `ChannelsConfig` and per-provider configs re-exported from `tinychannels_bus`; `SandboxConfig` and `AuditConfig` |
| `[claude_agent_sdk]` | [`claude_agent_sdk.rs`](./claude_agent_sdk.rs) | `ClaudeAgentSdkConfig` |
| `[[cloud_providers]]`, `primary_cloud`, `*_provider` slugs | [`cloud_providers.rs`](./cloud_providers.rs) | `CloudProviderCreds`, `AuthStyle` |
| `[context]` | TinyAgents `ContextConfig` re-exported by [`context.rs`](./context.rs); OpenHuman environment overlays remain in `load/env_overlay/context.rs` | `ContextConfig` |
| `[cost]` | [`identity_cost.rs`](./identity_cost.rs) | `CostConfig`, `ModelPricing` |
| `[dashboard]` | [`dashboard.rs`](./dashboard.rs) | `DashboardConfig`, `DiagramViewerConfig`, `EventStreamConfig`, `ModelHealthConfig` |
| `[dashboard]` | [`dashboard.rs`](./dashboard.rs) | `DashboardConfig`, `EventStreamConfig`, `ModelHealthConfig` |
| `[channel_voice]` | [`channel_voice.rs`](./channel_voice.rs) | `ChannelVoiceConfig`, `ChannelVoiceOverride`, `VoiceReplyMode` |
| `[ephemeral_route]` | [`ephemeral_route.rs`](./ephemeral_route.rs) | `EphemeralRoute` |
| `[cron]` | [`cron.rs`](./cron.rs) | `CronConfig` (`shell_timeout_secs`: shell-job timeout, default 120) |
Expand All @@ -39,7 +39,7 @@ is mounted as a submodule of [`load/dirs.rs`](./load/dirs.rs) via `#[path]`.
| `[observability]` | [`observability.rs`](./observability.rs) | `ObservabilityConfig`, `AgentTracingConfig` |
| `[privacy]` | [`privacy.rs`](./privacy.rs) | `PrivacyConfig`, `PrivacyMode` |
| `[prompt_screen]` | [`prompt_screen.rs`](./prompt_screen.rs) | `PromptScreenConfig`, `PromptScreenMode` (TinySecurity prompt screen; `off` is an explicit opt-out, default enforces and fails closed; `[security] mode = "off"` also turns it off) |
| `[security]` | [`security_mode.rs`](./security_mode.rs) | `SecurityModeConfig`, `SecurityMode` (whether TinySecurity-delegated checks run; `off` allows them and passes redaction through, default enforces and fails closed). Not the daemon's `SecurityConfig` in `security.rs` |
| `[security]` | [`security_mode.rs`](./security_mode.rs) | `SecurityModeConfig`, `SecurityMode` (whether TinySecurity-delegated checks run; `off` allows them and passes redaction through, default enforces and fails closed) |
| `[proxy]` | [`proxy.rs`](./proxy.rs) | `ProxyConfig`, `ProxyScope`, plus `runtime_proxy_config()` / `set_runtime_proxy_config()` process-wide accessors |
| `[[model_routes]]`, `[[embedding_routes]]` | [`routes.rs`](./routes.rs) | `ModelRouteConfig`, `EmbeddingRouteConfig` |
| `[runtime]` (+ `[runtime.docker]`), `[shell]`, `[reliability]`, `[scheduler]` | [`runtime.rs`](./runtime.rs) | `RuntimeConfig`, `DockerRuntimeConfig`, `ShellConfig`, `ReliabilityConfig`, `SchedulerConfig` |
Expand All @@ -56,13 +56,12 @@ is mounted as a submodule of [`load/dirs.rs`](./load/dirs.rs) via `#[path]`.
| top-level `Config` and its scalar keys | `types.rs` (+ `types/config.rs`, `types/model_ids.rs`) | `Config`, `ModelRegistryEntry`, provider-neutral workload roles |
| built-in defaults | [`defaults.rs`](./defaults.rs) | `impl Default for Config` and per-field `default_*` fns |

[`tools/mod.rs`](./tools/mod.rs) groups the tool-facing sections: `browser.rs` (`BrowserConfig`,
`BrowserComputerUseConfig`, and the `unattended_actions` allow-list with its
known names in `UNATTENDED_BROWSER_ACTIONS`), `http.rs` (`HttpRequestConfig`, `CurlConfig`),
[`tools/mod.rs`](./tools/mod.rs) groups the tool-facing sections: `browser.rs` (`BrowserConfig` and the
`unattended_actions` allow-list with its known names in `UNATTENDED_BROWSER_ACTIONS`), `http.rs` (`HttpRequestConfig`, `CurlConfig`),
`integrations.rs` (`IntegrationsConfig`, `ComposioConfig`, `SecretsConfig`),
`mcp.rs` (`McpServerConfig`, `McpClientConfig`, `GitbooksConfig`),
`multimodal.rs` (`MultimodalConfig`, `MultimodalFileConfig`), `search.rs`
(`SearchConfig`, `WebSearchConfig`, `SearxngConfig`, `SeltzConfig`).
(`SearchConfig`, `SearxngConfig`, `SeltzConfig`).
`SearchConfig` (schema version 2) holds `providers` (enabled + `managed` /
`direct` route per provider), `roles` (ordered providers per capability role),
`presentation`, limits, and direct keys; fresh installs default to managed Exa
Expand Down Expand Up @@ -111,7 +110,7 @@ sandbox policy contract described under Workspace/identity helpers below.
`resolve_runtime_config_dirs_with`). With no config file and the default
config dir, it returns a pre-login in-memory `Config` without writing
anything.
2. Read and parse `config.toml` (`parse_config_with_recovery`), recovering
2. Read and parse `config.toml` (`parse_config_boxed`), recovering
from non-UTF-8 or unparsable content by renaming the file to
`.corrupted[.<ts>]`, trying the `.bak` copy, and finally falling back to
defaults with `recovered_from_corruption = true`.
Expand Down
13 changes: 0 additions & 13 deletions crates/openhuman-core/src/config/schema/agent.rs
Original file line number Diff line number Diff line change
Expand Up @@ -244,14 +244,6 @@ pub struct AgentConfig {
#[serde(default = "default_agent_timeout_secs")]
pub agent_timeout_secs: u64,

/// **Retired, no effect.** Once mirrored each completed turn from the
/// `session_raw/*.jsonl` transcript into a second, file-shaped layout
/// (`{workspace}/tinyagents_store/{kv,journal}`). Sessions now live in the
/// storage backend and nothing is mirrored; the field is kept so existing
/// `config.toml` files still load.
#[serde(default = "default_session_dual_write")]
pub session_dual_write: bool,

/// **Retired, no effect.** Once compared a resumed session's transcript
/// with its mirror in the file-shaped store and logged any divergence
/// (`[session_shadow_read]`). The mirror is gone with the dual-write; the
Expand Down Expand Up @@ -383,10 +375,6 @@ fn default_agents_md_enabled() -> bool {
true
}

fn default_session_dual_write() -> bool {
true
}

fn default_session_shadow_reads() -> bool {
// ON for the Phase 2 parity soak. Observation-only: the legacy read stays
// authoritative and the probe runs on a background task, so the worst case
Expand Down Expand Up @@ -495,7 +483,6 @@ impl Default for AgentConfig {
channel_agents: std::collections::HashMap::new(),
tool_result_budget_bytes: default_tool_result_budget_bytes(),
agent_timeout_secs: default_agent_timeout_secs(),
session_dual_write: default_session_dual_write(),
session_shadow_reads: default_session_shadow_reads(),
required_output: None,
agents_md_enabled: default_agents_md_enabled(),
Expand Down
Loading
Loading