From 371bcd34ea96b843738b22ab380dd43706f2e959 Mon Sep 17 00:00:00 2001 From: Mega Mind <146339422+M3gA-Mind@users.noreply.github.com> Date: Thu, 9 Apr 2026 01:51:30 +0530 Subject: [PATCH] Feat/chat issue (#441) * feat: display app version in settings panel * fix(onboarding): auto-refresh accessibility state after grant (#351) * style(onboarding): apply formatter for issue #351 fix * fix(onboarding): ESLint + typed mock for ScreenPermissionsStep; clear flag in handler Consolidate tauriCommands imports and drop redundant mock cast. Handle granted accessibility in focus/visibility callback instead of a follow-up effect. Made-with: Cursor * feat(env): add support for custom dotenv path and update dependencies - Introduced an optional environment variable `OPENHUMAN_DOTENV_PATH` to specify a custom path for dotenv files, enhancing configuration flexibility. - Updated `Cargo.toml` to include the `dotenvy` dependency for improved dotenv file handling. - Enhanced the `.env.example` file with a new comment for the custom dotenv path. - Added data-testid attributes and button types in `SkillDebugModal` and `Skills` components for better testability. - Created new tests for Gmail and Notion third-party skills to ensure proper functionality of sync and debug tools. - Added documentation for memory sync functions to clarify usage patterns and function details. * fix: address CodeRabbit review on PR #441 - Dotenv: treat empty OPENHUMAN_DOTENV_PATH as unset; propagate from_path errors - Document OPENHUMAN_DOTENV_PATH parent-env requirement in .env.example - Memory docs: MD040 fence language; clarify skill namespace vs integration id - QuickJS bootstrap: modern helpers, generic platform.notify log, template URLs - Skills UI: type=button on close/settings; async waitFor in sync tests - Gmail OAuth e2e: workspace env matches MemoryClient; env/engine drop guards; redact secrets from logs - Add replace_global_engine for test teardown Made-with: Cursor --- .env.example | 4 + Cargo.lock | 7 + Cargo.toml | 1 + app/src/components/skills/SkillDebugModal.tsx | 8 + app/src/pages/Skills.tsx | 8 +- .../Skills.third-party-gmail-sync.test.tsx | 76 ++++ ...ls.third-party-notion-debug-tools.test.tsx | 170 ++++++++ docs/memory-sync-functions.md | 357 +++++++++++++++ src/core/cli.rs | 20 + src/openhuman/skills/mod.rs | 2 +- src/openhuman/skills/qjs_engine.rs | 5 + .../skills/quickjs_libs/bootstrap.js | 64 ++- tests/skills_gmail_oauth_proxy_rpc_e2e.rs | 405 ++++++++++++++++++ 13 files changed, 1103 insertions(+), 24 deletions(-) create mode 100644 app/src/pages/__tests__/Skills.third-party-gmail-sync.test.tsx create mode 100644 app/src/pages/__tests__/Skills.third-party-notion-debug-tools.test.tsx create mode 100644 docs/memory-sync-functions.md create mode 100644 tests/skills_gmail_oauth_proxy_rpc_e2e.rs diff --git a/.env.example b/.env.example index 252a06352..413a32110 100644 --- a/.env.example +++ b/.env.example @@ -34,6 +34,10 @@ OPENHUMAN_CORE_RPC_URL=http://127.0.0.1:7788/rpc OPENHUMAN_CORE_RUN_MODE=child # [optional] Override path to openhuman core binary (leave blank for auto-detection) OPENHUMAN_CORE_BIN= +# [optional] Explicit .env path for `openhuman serve` / `openhuman run` (loaded before the server starts). +# Must be set in the parent environment (exported in your shell or service manager). It is read before +# any dotenv file is loaded, so defining OPENHUMAN_DOTENV_PATH inside a .env file cannot select that file. +# OPENHUMAN_DOTENV_PATH= # --------------------------------------------------------------------------- # Config overrides (override config.toml values at runtime) diff --git a/Cargo.lock b/Cargo.lock index 520a77bd7..790906528 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1874,6 +1874,12 @@ dependencies = [ "litrs", ] +[[package]] +name = "dotenvy" +version = "0.15.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1aaf95b3e5c8f23aa320147307562d361db0ae0d51242340f558153b4eb2439b" + [[package]] name = "dunce" version = "1.0.5" @@ -5135,6 +5141,7 @@ dependencies = [ "dialoguer", "directories", "dirs 5.0.1", + "dotenvy", "enigo", "env_logger", "fantoccini", diff --git a/Cargo.toml b/Cargo.toml index a41cbf0f8..af2197bd6 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -60,6 +60,7 @@ prost = { version = "0.14", default-features = false } postgres = { version = "0.19", features = ["with-chrono-0_4"] } chrono-tz = "0.10" dialoguer = { version = "0.12", features = ["fuzzy-select"] } +dotenvy = "0.15" console = "0.16" glob = "0.3" regex = "1.10" diff --git a/app/src/components/skills/SkillDebugModal.tsx b/app/src/components/skills/SkillDebugModal.tsx index 00d797ef6..8b36dd4ab 100644 --- a/app/src/components/skills/SkillDebugModal.tsx +++ b/app/src/components/skills/SkillDebugModal.tsx @@ -129,6 +129,7 @@ export default function SkillDebugModal({ skillId, skillName, onClose }: SkillDe