mirror of
https://github.com/tinyhumansai/openhuman.git
synced 2026-07-28 05:12:33 +00:00
97d83a1f778df9e5f1f4cc96eb2ab54e4fc0c32f
45
Commits
| Author | SHA1 | Message | Date | |
|---|---|---|---|---|
|
|
1a404ac9c2 | fix(backend_api): suppress Sentry on 401 via typed BackendApiError::Unauthorized (#2781) | ||
|
|
7745d58945 |
refactor(config): optimize backend URL resolution & local AI endpoint detection (#2496)
Co-authored-by: Steven Enamakel <enamakel@tinyhumans.ai> |
||
|
|
9bae6d5563 | feat(analytics): forward x-tauri-version and x-core-version on every backend request (#2514) | ||
|
|
beba562df2 | fix(windows): make pnpm dev:app:win work behind TLS-inspecting proxies (#2449) | ||
|
|
b1ee2e8112 | fix(channels): suppress Telegram PATCH 404 reaching Sentry (TAURI-R7) (#2222) | ||
|
|
4384cd1a40 |
fix(integrations): strip inference path from backend URL (#2075)
Normalize `backend_url` before it reaches `IntegrationClient` so inference-style paths (e.g. `/openai/v1/chat/completions`) cannot produce broken composio URLs. Three-layer fix: 1. `effective_backend_api_url` env-fallback branch now calls `normalize_backend_api_base_url` (same as the override branch) 2. `normalize_backend_api_base_url` handles scheme-less inputs with `https://` fallback retry 3. `IntegrationClient::new` defense-in-depth sanitization with redacted `warn!` log on fixup Closes #2075 |
||
|
|
95f1f5f063 | Refactor inference around external Ollama routing (#1975) | ||
|
|
f90a337bc0 |
Add agent task orchestration (#1768)
Co-authored-by: Steven Enamakel <enamakel@tinyhumans.ai> |
||
|
|
5411f19e47 |
Add LM Studio as a local model provider (#1750)
Co-authored-by: Steven Enamakel <enamakel@tinyhumans.ai> |
||
|
|
1e169bd588 | refactor(api): migrate callers to effective_backend_api_url (#1764) | ||
|
|
915a41da18 | feat(mcp): add stdio memory server (#1760) | ||
|
|
72a365c9ce |
fix(channels): demote channel-message 404s to typed error (OPENHUMAN-TAURI-2Y) (#1732)
Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com> |
||
|
|
23fbaecc19 | Fix composio integrations URL base normalization (#1715) | ||
|
|
7b95c37aee | test: expand unit + e2e coverage from test-map across core domains (#1724) | ||
|
|
bf9404a42f |
fix(providers): drop budget-exhausted 400s from Sentry (#3M, #12, #13) (#1633)
Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com> |
||
|
|
70083897a0 |
fix(integrations): fall back to default backend when api_url points at local AI (#51, #80, #7Z) (#1630)
Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com> Co-authored-by: Steven Enamakel <enamakel@tinyhumans.ai> |
||
|
|
41e548b3d8 |
fix(observability): drop transient backend_api + integrations failures from Sentry (#1632)
Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com> |
||
|
|
c18530f594 | fix(settings): round-trip LLM provider model_routes and consolidate UI (#1660) | ||
|
|
1d37d2dfca | fix(api): safely join api_url + path so misconfigured base can't corrupt routes (#1650) | ||
|
|
de39142117 |
refactor(api): robust websocket URL construction (#1560)
Co-authored-by: Steven Enamakel <enamakel@tinyhumans.ai> |
||
|
|
386b0025ed |
fix(observability/auth): handle JWT-required expiry path and normalize backend API base URLs (#1551)
Co-authored-by: Steven Enamakel <enamakel@tinyhumans.ai> |
||
|
|
887e483790 | Send client app version headers on backend requests (#1456) | ||
|
|
7bc3c23552 |
test: Add unit tests for user_id_from_profile_payload (#1429)
|
||
|
|
359310bad8 | 🧪 Add tests for bearer_authorization_value (#1417) | ||
|
|
dcd4f97f00 | fix(ci): staging builds resolve to prod API URL — bake VITE vars into build.yml (#1371) | ||
|
|
0eeb0c6c78 | feat(observability): centralize error reporting with Sentry tags across core (#1264) | ||
|
|
c4d93f6981 | feat(mascot): mic-only composer with cloud STT + cartoon voice (#1253) | ||
|
|
e0e7e1bd77 |
refactor: extract inline tests to sibling _tests.rs files (130 god-files) (#835)
Co-authored-by: Jwalin Shah <jshah1331@gmail.com> Co-authored-by: Steven Enamakel <enamakel@tinyhumans.ai> |
||
|
|
6733720df9 |
fix(channels): delete thinking messages after final response (#600) (#612)
* feat(channels): add send_channel_delete to REST client (#600) Add DELETE method to BackendOAuthClient for removing channel messages. Used to clean up ephemeral thinking indicators after final response delivery. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * fix(channels): show thinking ephemerally and delete on final response (#600) Thinking deltas are accumulated and sent as a temporary "💭" message on the channel. When the final agent response is ready the thinking message is deleted via the new DELETE endpoint so the user only sees the clean reply. This replaces the previous behaviour where thinking messages persisted permanently in the Telegram chat. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * style(channels): apply cargo fmt to bus.rs (#600) Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com> |
||
|
|
ea6895f19d |
test(coverage): batch 5–8 — Rust unit tests toward 80% for 20 modules (#607)
* test(coverage): batch 5–8 — Rust unit tests toward 80% for 20 modules (#530) Add 244 new unit tests across 20 modules to push line coverage from 75.06% → 75.70% overall. Modules improved: - api/socket: 77% → 100% - rpc/dispatch: 75% → 100% - config/schema/channels: 77% → 100% - composio/gmail/sync: 78% → 97% - composio/notion/sync: 77% → 96% - webhooks/router: 78% → 96% - agent/hooks: 78% → 92% - config/schema/proxy: 76% → 90% - local_ai/device: 79% → 89% - text_input/schemas: 73% → 89% - agent/harness/interrupt: 76% → 88% - billing/schemas: 79% → 87% - screen_intelligence/schemas: 78% → 81% - about_app/types, health/schemas, app_state/schemas, core/types, config/schema/identity_cost, cron/scheduler Tests cover: schema catalog integrity, param deserialization, serde roundtrips, helper functions, edge cases, error paths. All 3974 tests pass. * test(coverage): batch 9–10 — browser_open, update_memory_md, credentials profiles, cost tracker (#530) Add 53 new tests across 4 more modules: - browser_open: IPv4/IPv6 private ranges, host matching, normalize_domain edges - update_memory_md: empty file, section creation, unknown action, param validation - credentials/profiles: token expiry, CRUD operations, active profile management - cost/tracker: budget warnings, monthly exceeded, model stats aggregation All 4027 tests pass. * test(coverage): batch 11–12 — channels schemas, conversation store (#530) Add 33 new tests: - channels/controllers/schemas: per-function input validation, param deserialization, helper coverage - memory/conversations/store: thread lifecycle (create, delete, idempotent), multi-thread, empty/nonexistent thread, purge empty store All 4060 tests pass. |
||
|
|
2824850708 |
feat(streaming): thinking tokens, tool call deltas, and progressive channel edits (#549)
* feat(conversations): implement live streaming for assistant responses - Added support for live streaming of assistant responses in the Conversations component, enhancing user experience during interactions. - Introduced new interfaces for handling streaming state, including `StreamingAssistantState` and related event handlers for text, thinking, and tool argument deltas. - Updated the state management to accommodate streaming data, ensuring smooth updates to the UI as new content arrives. - Enhanced the rendering logic to display provisional assistant bubbles and thinking indicators while responses are being composed. - Refactored existing event handling to integrate with the new streaming functionality, improving overall responsiveness and interactivity. This commit significantly improves the real-time interaction capabilities of the assistant, providing users with immediate feedback during conversations. * feat(channels): progressive-edit streaming for inbound channels ChannelInboundSubscriber now buffers text/tool delta events on a 1s timer and edits the outbound channel message in place, so Telegram/ Slack-style conduits can show a single evolving reply instead of a single atomic bubble at the end. Renders a "🔧 tool …" status line above the partial text and rewrites with the final canonical reply on chat_done. Falls back to atomic-final delivery if the backend's PATCH /channels/:channel/messages/:id endpoint is unavailable or repeatedly fails, so existing channels keep working while the edit endpoint is rolled out. New rest.rs helper: BackendOAuthClient::send_channel_edit. * style: cargo fmt on streaming-related files Auto-applied by cargo fmt after the streaming plumbing changes touched provider traits, the session turn loop, the channel inbound subscriber, and the compatible-provider SSE path. * feat(streaming): compact live preview + Telegram typing indicator UI: while streaming, show only the trailing ~120 chars of assistant text in a monospace ticker-tape bubble (cursor + ellipsis prefix) so the scroll position doesn't jump as tokens arrive. The full response still replaces the preview via addInferenceResponse on chat_done. Backend bridge: ChannelInboundSubscriber now fires Telegram's typing indicator as soon as an inbound message is received and refreshes it every 4 s while the turn is in flight (Telegram's sendChatAction lasts ~5 s). New BackendOAuthClient::send_channel_typing hits POST /channels/:channel/typing; the subscriber latches typing_disabled after two failures so channels without the endpoint stop getting hit. * fix(providers): fall back to JSON parse when upstream ignores stream=true Some OpenAI-compatible backends (including our e2e mock) accept `stream: true` in the request but reply with a regular `application/json` body rather than an SSE stream. The previous implementation blindly pushed the body through the SSE line parser, which produced an empty aggregated response because the body never contained `\n\n` event separators. Detect the non-SSE content-type and fall through to the existing `parse_native_response` path so the caller still gets the aggregated response. No deltas are emitted in this case — there's nothing to stream — but correctness is preserved. Unblocks the json_rpc_protocol_auth_and_agent_hello E2E test. * Enhance event handling for progressive-edit streaming in ChannelInboundSubscriber - Introduced a new `StreamingState` struct to manage the state of progressive-edit streaming, allowing for buffered text and tool deltas. - Implemented a timer-based flushing mechanism for edits, ensuring timely updates to the channel. - Refactored event handling logic to accommodate new event types (`text_delta`, `tool_call`, `tool_result`) and improved error handling for chat events. - Updated the logic for finalizing channel replies to handle both streaming and atomic delivery scenarios, enhancing overall responsiveness and user experience. This commit significantly improves the handling of real-time updates during user interactions, providing a smoother and more interactive experience. * Enhance tool call tracking in AgentProgress and parsing logic - Added a `call_id` field to `ToolCallStarted` and `ToolCallCompleted` variants in the `AgentProgress` enum to uniquely identify tool calls and link them to their respective events. - Updated the `ParsedToolCall` struct to include an optional `id` field for tool calls originating from native responses, ensuring consistent tracking across different call types. - Modified the `parse_tool_call_value` function to initialize the `id` field appropriately, enhancing the parsing logic for tool calls. - Adjusted the `run_tool_call_loop` function to utilize the new `call_id` for progress events, ensuring accurate tracking of tool execution across iterations. - Enhanced the `spawn_progress_bridge` function to handle the new `call_id` field in progress events, improving the overall event handling mechanism. These changes improve the robustness of tool call tracking and enhance the clarity of event relationships within the agent's progress reporting. * Enhance tool call tracking and event handling in Conversations component - Added a `tool_call_id` field to `ChatToolCallEvent` and `ChatToolResultEvent` interfaces for improved tracking of tool calls across events. - Updated event key generation in the Conversations component to include `tool_call_id`, ensuring unique identification of tool events. - Enhanced the logic for managing tool timelines to prevent duplication of entries by reconciling existing tool calls based on `tool_call_id`. - Improved handling of tool argument deltas and results, allowing for more accurate updates to the UI during tool execution. These changes significantly improve the robustness of tool call tracking and enhance the clarity of event relationships within the Conversations component. * Enhance tool call event handling and progress reporting in Agent - Updated the `run_tool_call_loop` function to include stable IDs for tool calls, ensuring unique identification across iterations. - Introduced early completion events for failed tool calls, improving client-side error handling and user experience. - Refactored the `emit_progress` function to use asynchronous sending, ensuring lifecycle events are not dropped due to backpressure. - Enhanced the `turn` method to await progress emissions, improving synchronization during user message processing. These changes significantly improve the robustness of tool call tracking and enhance the clarity of event relationships within the agent's progress reporting. * fix(channels): close stuck drafts, prevent duplicate post, add bridge logs Findings #3, #5, #6 from the follow-up review: channels/bus.rs - chat_done handler no longer returns early on empty reply — it now finalizes with a "(No response from agent.)" fallback so any draft we posted during streaming gets closed off instead of being left showing "_working…_" forever. - StreamingState gained `draft_sent: bool`, set whenever the initial send_channel_message succeeds (even when the backend's response didn't include an id). finalize_channel_reply now checks this flag and silently skips the "no draft → send atomic" fallback when a draft was posted but id was lost — fixes a duplicate-bubble bug where an id-less draft plus a chat_done finalize produced two messages in the user's channel. channels/providers/web.rs - spawn_progress_bridge now logs a scoped entry message on startup (client_id/thread_id/request_id), a per-variant trace/debug line on each AgentProgress event (with call_id/iteration correlation), and an exit message with final round + events_seen count. SubagentFailed is logged at warn level for visibility. |
||
|
|
5a8a7edb91 |
Refine billing, settings, rewards, and usage UI (#547)
* feat: add react-icons support and refactor skill category handling - Added `react-icons` dependency to the project for enhanced icon usage. - Introduced new skill icons in the `toolkitMeta.tsx` component, replacing SVG icons with `react-icons` for improved maintainability and consistency. - Created a new `skillCategories.ts` file to define skill categories and their order, streamlining the management of skill categories across the application. - Refactored the `SkillCategoryFilter` component to utilize the new skill categories structure, enhancing clarity and reducing redundancy in the codebase. - Updated the `Skills` page to leverage the new icon rendering method and skill categories, improving the overall user experience. - Added tests to ensure the correct functionality of the new skill category and icon implementations. * feat: update environment configuration and enhance settings UI - Updated `.env.example` and `app/.env.example` to reflect new backend URL and added optional environment selector for staging. - Enhanced `SettingsHome` component by separating account and billing sections for improved clarity. - Introduced a new billing section in the settings menu to streamline user navigation. - Updated `useSettingsNavigation` hook to accommodate changes in settings structure. - Improved `BillingPanel` to handle session token checks and ensure accurate billing state retrieval. - Refactored `Rewards` page to enhance user experience with clearer progress indicators and improved layout. - Added tests to validate changes in the rewards and settings components. * feat(config): enhance API base URL handling and environment configuration - Introduced a new staging API base URL constant for better environment management. - Added app environment variable constants to streamline environment detection. - Refactored effective API URL resolution to accommodate environment-specific defaults. - Implemented functions to resolve app environment from process environment variables. - Added tests to validate the correct behavior of staging and production API URL handling. * feat(rewards): add community and referrals tabs for rewards management - Introduced `RewardsCommunityTab` and `RewardsReferralsTab` components to enhance the rewards management interface. - The `RewardsCommunityTab` displays user progress, Discord role statuses, and connection options, improving user engagement with rewards. - The `RewardsReferralsTab` allows users to manage their referral program, track progress, and access coupon rewards in a streamlined layout. - Updated the `Rewards` page to integrate these new tabs, enhancing overall user experience and navigation. * feat(rewards): introduce ReferralRewardsSection and RewardsRedeemTab components - Added `ReferralRewardsSection` to manage referral statistics and code application, enhancing user engagement with the referral program. - Created `RewardsRedeemTab` to streamline the process of applying reward codes, improving the overall rewards management experience. - Updated `Rewards` page to include the new redeem tab, allowing users to easily switch between referral and redeem functionalities. - Refactored `RewardsCommunityTab` to adjust the referral selection handler, ensuring consistent navigation across the rewards interface. - Removed redundant UI elements in `RewardsCouponSection` for a cleaner layout. - Enhanced tests to cover new functionalities and ensure robust performance across the rewards system. * feat(ui): introduce PillTabBar component and refactor SkillCategoryFilter and Rewards pages - Added a new `PillTabBar` component to enhance tab navigation with customizable styles and item rendering. - Refactored `SkillCategoryFilter` to utilize `PillTabBar`, improving code clarity and reducing redundancy in button rendering. - Updated the `Rewards` page to replace the existing tab navigation with `PillTabBar`, streamlining the user interface for switching between referral, rewards, and redeem tabs. - Enhanced the `ReferralRewardsSection` layout for better user experience and consistency across the rewards management interface. - Improved tests to cover the new `PillTabBar` functionality and ensure robust performance across the updated components. * fix(rewards): update placeholder and button text in RewardsCouponSection - Changed the input placeholder from "Promo code" to "Coupon code" for clarity. - Updated button text from "Apply code" to "Redeem Code" to better reflect the action being performed. - Adjusted loading state text from "Applying…" to "Redeeming..." for consistency in user feedback. * feat(composio): enhance toolkit handling and improve user messaging - Updated the `ComposioConnectModal` to simplify the connection message, removing unnecessary wording for clarity. - Introduced a `TOOLKIT_ALIASES` mapping in `toolkitMeta.tsx` to standardize toolkit slugs, improving consistency across the application. - Refactored the `composioToolkitMeta` function to utilize the new slug mapping, enhancing toolkit metadata retrieval. - Improved the `useComposioIntegrations` hook to leverage the canonicalized toolkit slugs for better integration handling. - Adjusted the `Skills` page to normalize toolkit slugs during rendering, ensuring a consistent user experience. - Updated tests to reflect changes in messaging and toolkit handling, ensuring robust functionality across the application. * feat(intelligence): add new tabs for Dreams, Memory, and Subconscious features - Introduced `IntelligenceDreamsTab`, which displays generated dreams based on daily life events, enhancing user engagement with a visually appealing layout. - Added `IntelligenceMemoryTab` to manage actionable items, featuring search and filter capabilities for improved user interaction with memory data. - Created `IntelligenceSubconsciousTab` to handle subconscious tasks and logs, providing users with insights and management options for their subconscious activities. - Refactored the `RewardsCommunityTab` to remove unused Discord role status logic, streamlining the component for better performance. - Implemented a new `PageBackButton` component for consistent navigation across settings pages. - Enhanced the `BillingPanel` and its subcomponents to improve user experience in managing billing and subscription details, including transaction history and payment methods. - Added new billing-related tabs for better organization and access to billing features, including `BillingOverviewTab`, `BillingPaymentsTab`, and `BillingPlansTab`. - Updated tests to ensure functionality across new and refactored components, maintaining robust application performance. * refactor(billing): update BillingPanel and BillingPlansTab for improved user experience - Changed the default selected tab in `BillingPanel` from 'overview' to 'plans' to prioritize subscription management. - Removed the `BillingOverviewTab` from the `BillingPanel`, streamlining the billing interface. - Enhanced the `BillingPlansTab` header to clarify the purpose, changing "Explore tiers" to "Choose a Subscription Plan". - Updated the description in `BillingPlansTab` for better clarity on payment options. - Improved the layout of the `SubscriptionPlans` component to better highlight crypto payment options and their availability. - Cleaned up unused code and comments for better maintainability. * refactor(billing): streamline BillingPanel and BillingPlansTab components - Removed unused `teamUsage` state and related API call from `BillingPanel` to simplify data management. - Adjusted layout in `BillingPlansTab` for improved visual hierarchy and user experience. - Cleaned up code by eliminating unnecessary comments and enhancing maintainability. * refactor(billing): enhance SubscriptionPlans layout for improved responsiveness - Updated the layout of the `SubscriptionPlans` component to ensure better responsiveness and visual consistency. - Adjusted class names to include minimum height and width properties for better alignment across different screen sizes. - Enhanced the layout of the pricing display section for improved clarity and user experience. * refactor(billing): update subscription plans and billing components for improved clarity and user experience - Adjusted pricing for BASIC and PRO plans to reflect new monthly and annual rates. - Enhanced feature descriptions for subscription plans to better communicate value. - Removed redundant UI elements in the BillingPaymentsTab and PayAsYouGoCard for a cleaner layout. - Added loading and confirmation messages in SubscriptionPlans to improve user feedback during payment processes. - Updated class names for better responsiveness and visual consistency across billing components. * refactor(billing): improve error messaging and UI consistency in billing components - Updated error message in BillingPanel to specify adding a payment card on Stripe for clarity. - Changed header text in AutoRechargeSection to "Enable Auto-Recharge" for better user understanding. - Modified button text in AutoRechargeSection to "Add card on Stripe" for consistency. - Enhanced styling in PayAsYouGoCard for improved visual appeal and user interaction. - Removed redundant UI elements in PayAsYouGoCard for a cleaner layout. * refactor(billing): remove unused error handling and improve UI consistency across billing components - Eliminated `setArError` prop from BillingPanel, AutoRechargeSection, and BillingPaymentsTab to streamline error handling. - Enhanced layout and styling in BillingHistoryTab and SubscriptionPlans for better visual consistency and user experience. - Removed the BillingOverviewTab component to simplify the billing interface and improve maintainability. * refactor(billing): update feature descriptions and enhance SubscriptionPlans display - Revised feature descriptions in the PLANS array for clarity and conciseness. - Increased the number of displayed features in the SubscriptionPlans component to provide users with more information at a glance. * refactor(billing): update billing components for improved clarity and functionality - Revised feature descriptions in the PLANS array to reflect increased usage limits. - Renamed header in BillingHistoryTab to "Transaction History" and updated description for clarity. - Adjusted transaction amount formatting in BillingHistoryTab to display five decimal places. - Removed redundant UI elements in BillingPaymentsTab to streamline the layout. - Enhanced PayAsYouGoCard with improved credit balance display and top-up options, including validation for custom amounts. * feat(usage): add budget completion message logic and update tests - Introduced `shouldShowBudgetCompletedMessage` to the `UsageState` interface to indicate when the budget completion message should be displayed. - Updated the `useUsageState` hook to calculate the budget completion message based on user credits and budget status. - Enhanced tests for `useUsageState` to verify the correct behavior of the budget completion message under various scenarios. - Modified the `Conversations` component to display the budget completion message appropriately based on the new logic. * style: apply formatter fixes from pre-push hook * refactor(rewards): update coupon section and test cases for clarity and consistency - Renamed placeholder text and button labels in the RewardsCouponSection test to reflect updated terminology. - Adjusted test assertions to ensure they align with the new button and placeholder names. - Updated pricing details in billingHelpers tests to reflect new monthly and annual rates for BASIC and PRO plans. - Enhanced the ContextGatheringStep labels for better clarity regarding email and LinkedIn processing stages. * style(tests): format coupon code input changes for consistency - Reformatted the coupon code input changes in the RewardsCouponSection test for improved readability and consistency. - Ensured that the test cases maintain a uniform style for better maintainability. * refactor: enhance accessibility and improve code structure in various components - Added ARIA roles and attributes to the PillTabBar for better accessibility. - Refactored the canonicalization logic for toolkit slugs into a new file for improved organization. - Updated the IntelligenceDreamsTab and IntelligenceMemoryTab components for better readability and accessibility. - Enhanced error handling and logging in the IntelligenceSubconsciousTab for improved debugging. - Streamlined the ReferralRewardsSection and RewardsCommunityTab components by normalizing referral code input handling. - Removed unused props and improved layout consistency in BillingPanel and related components. - Updated the Skills page to handle subconscious escalation dismissals more effectively. * feat(release): configure staging environment for deployment - Added steps to configure the staging app environment in the release workflow. - Set environment variables for staging, including OPENHUMAN_APP_ENV and VITE_OPENHUMAN_APP_ENV. - Updated build and deployment steps to conditionally use staging settings based on the build target. - Ensured proper handling of workspace paths for staging deployments. * chore(env): add optional staging environment variable to .env.example - Introduced OPENHUMAN_APP_ENV variable to specify the app environment as 'staging'. - Updated .env.example to include new environment configuration for clarity. * refactor(intelligence): streamline navigation and improve text formatting - Simplified the navigation logic in the IntelligenceSubconsciousTab for better readability. - Improved text formatting in the IntelligenceDreamsTab for enhanced clarity and consistency. - Refactored import statements in toolkitMeta.tsx for better organization. |
||
|
|
8057f2283c |
feat: onboarding Gmail integration + LinkedIn profile enrichment (#524)
* refactor(composio): restructure toolkit metadata handling and onboarding steps - Removed the old `toolkitMeta.ts` file and replaced it with a new `toolkitMeta.tsx` file that includes updated metadata handling for Composio toolkits, enhancing the integration with React components. - Updated the `ComposioConnectModal` to directly render icons without additional markup, streamlining the component structure. - Modified the `Skills` page to utilize the new icon rendering method, improving consistency across the application. - Enhanced the onboarding process by introducing a new `ContextGatheringStep` component, which gathers user context from connected integrations, improving the onboarding experience. - Updated the `SkillsStep` to reflect changes in toolkit connection handling and display, ensuring a smoother user interaction during onboarding. * feat(apify): introduce Apify integration tools for actor execution and status retrieval - Added new tools for running Apify actors and fetching their run statuses, enhancing automation capabilities. - Updated the integration schema to include an `apify` toggle for user configuration, allowing for flexible integration management. - Enhanced the onboarding experience by modifying the SkillsStep to focus on Gmail integration, streamlining user interactions. - Improved documentation and comments for clarity on the new Apify functionalities and their usage. * feat(learning): add LinkedIn enrichment module and schemas - Introduced a new `linkedin_enrichment` module for enriching user profiles by scraping LinkedIn data from Gmail. - Implemented the `run_linkedin_enrichment` function to handle the enrichment pipeline, including Gmail search, scraping via Apify, and data persistence. - Added controller schemas for the learning domain, enabling integration with the existing controller framework. - Updated the `all.rs` file to register the new learning controllers and schemas, enhancing the overall functionality of the learning system. * feat(linkedin): implement PROFILE.md generation for LinkedIn enrichment - Added functionality to generate a PROFILE.md file from scraped LinkedIn data, summarizing user profiles for agent context. - Updated the `run_linkedin_enrichment` function to write PROFILE.md to the workspace, enhancing data persistence. - Introduced helper functions for rendering and summarizing LinkedIn profiles, improving the overall enrichment process. - Ensured minimal PROFILE.md creation even when scraping fails, maintaining essential user context. * feat(onboarding): enhance ContextGatheringStep for LinkedIn enrichment pipeline - Updated the ContextGatheringStep to integrate a new pipeline for LinkedIn enrichment, replacing the previous Gmail profile fetching stages. - Implemented a progress animation and logging for the enrichment process, improving user feedback during data retrieval. - Refactored stage definitions to align with the new pipeline structure, enhancing clarity and maintainability. - Introduced error handling and status updates for each stage of the enrichment process, ensuring robust user experience. * feat(instructions): refactor tool instruction generation for clarity and flexibility - Introduced helper functions `tool_instructions_preamble` and `append_tool_entry` to streamline the construction of tool instructions. - Updated `build_tool_instructions` to utilize the new helper functions, improving code readability and maintainability. - Added `build_tool_instructions_filtered` to allow for generating instructions from a filtered list of tools, enhancing flexibility in tool usage. - Adjusted the startup process to use the filtered instructions, ensuring only relevant tools are included in the system prompt. * refactor(toolkitMeta): simplify component structure and improve readability - Refactored the `BrandIcon` component to streamline its props definition, enhancing code clarity. - Consolidated SVG path definitions in various icons for better readability and maintainability. - Updated the `ContextGatheringStep` to simplify the RPC call syntax, improving code conciseness. - Enhanced logging in the LinkedIn enrichment process for clearer tracking of Gmail searches and scraping stages. * fix: address PR review — USER.md→PROFILE.md consistency, Composio tool filtering, and quality fixes - Replace USER.md with PROFILE.md across all prompt paths: channels_prompt.rs, subconscious/prompt.rs, workspace/ops.rs bootstrap, and channel tests - Remove Composio tool description from main agent system prompt (tool_descs) so skills_agent is the only agent that sees Skill-category tools - Add "learning" namespace description for CLI help discovery - Fix react-hooks/set-state-in-effect: wrap synchronous setState in queueMicrotask in ContextGatheringStep - Derive SkillsStep displayToolkits from backend allowlist with error/retry UI - Add KNOWN_COMPOSIO_TOOLKITS alternate slug variants (google_calendar, etc.) - Add namespaced debug logging to onboarding handlers and pipeline - Deduplicate MemoryClient creation in linkedin_enrichment persist functions * fix: use setTimeout instead of queueMicrotask for ESLint compatibility * refactor(onboarding): streamline debug logging in handleContextNext function - Consolidated debug logging in the handleContextNext function to improve clarity and reduce verbosity. - Removed unnecessary line breaks for a more concise code structure. * refactor(linkedin): enhance enrichment pipeline with structured stage results - Introduced a new `EnrichmentStage` struct to capture detailed results for each stage of the LinkedIn enrichment process. - Updated the `LinkedInEnrichmentResult` to include a vector of stages, allowing for structured reporting of success, failure, and skipped stages. - Improved error handling and logging throughout the enrichment pipeline, ensuring better traceability of issues during execution. - Adjusted the API response to include stage results, enhancing the frontend's ability to display detailed enrichment outcomes. * chore(workflows): update macOS E2E test configuration and comment out Linux E2E job - Modified the description and default values in the macOS E2E test input options for clarity. - Commented out the entire Linux E2E job configuration to prevent execution while maintaining the setup for future use. |
||
|
|
ef9c117e9e |
test: expand agent harness coverage (#513)
* feat(tests): add comprehensive unit tests for hooks and memory context - Introduced a suite of tests for the `fire_hooks` function, ensuring that all hooks are dispatched even if one fails, enhancing reliability in the hook execution flow. - Added tests for the `sanitize_tool_output` function to validate the correct mapping of success and failure messages for various tool outputs. - Implemented a mock memory structure to facilitate testing of memory context building, ensuring that working memory is prioritized and deduplication occurs correctly. - Enhanced the `build_memory_context` function tests to verify filtering and truncation of memory entries, improving the robustness of memory management in the system. - Overall, these tests aim to strengthen the codebase by ensuring that critical functionalities related to hooks and memory context are thoroughly validated. * feat(tests): enhance unit tests for provider alias resolution and prompt options - Updated the `provider_alias_and_route_selection_round_trip` test to dynamically resolve the first provider from the registry, ensuring accurate alias resolution. - Added new tests for `DumpPromptOptions` and `ComposioStubTools`, validating default settings and expected tool names. - Introduced tests for rendering main agent dumps, ensuring tool instructions and skill counts are correctly included in the output. - Enhanced prompt handling tests to cover cache boundary extraction and subagent render options, improving overall test coverage and reliability. * feat(tests): enhance error handling and formatting in unit tests - Added new tests for `AgentError` variants to validate string formatting and error recovery from `anyhow`. - Improved formatting consistency in existing tests for better readability. - Enhanced the `sanitize_tool_output` test to ensure accurate mapping of success and failure messages. - Updated memory loader tests to enforce minimum limits and budget constraints, ensuring robust memory management. - Overall, these changes aim to strengthen the test suite by improving coverage and clarity in error handling scenarios. * feat(tests): add unit tests for tool filtering and subagent dump rendering - Introduced new tests to validate the filtering of tools based on named scopes and disallowed tools, ensuring correct tool selection in debug dumps. - Added tests for rendering subagent dumps, including handling file prompt fallbacks and missing files without panicking. - Enhanced the workspace prompt handling to prefer custom prompt locations, improving the flexibility and reliability of agent prompt rendering. - Overall, these additions strengthen the test suite by covering critical functionalities related to tool filtering and prompt rendering. * feat(tests): add comprehensive unit tests for memory loader and multimodal helpers - Introduced new tests for the memory loader to validate behavior when the header exceeds budget and when recall fails, ensuring robust memory management. - Added tests for multimodal helpers, covering image marker counting, payload extraction, and MIME type normalization, enhancing the reliability of multimodal interactions. - Overall, these additions strengthen the test suite by improving coverage and ensuring correct functionality in memory handling and multimodal processing. * feat(tests): add unit tests for tool execution and agent behavior - Introduced new tests for the `run_tool_call_loop` function, validating the rejection of vision markers for non-vision providers and ensuring correct streaming of final text chunks. - Added tests to verify that CLI-only tools are blocked in prompt mode and that native tool results are persisted as tool messages. - Enhanced the `Agent` class with tests for error handling and event publishing during single runs, ensuring robust agent behavior in various scenarios. - Overall, these additions strengthen the test suite by improving coverage and reliability in tool execution and agent interactions. * feat(tests): enhance tool execution and agent behavior tests - Added new tests for the `run_tool_call_loop` function, including scenarios for auto-approving supervised tools on non-CLI channels and handling unknown tools with default max iterations. - Introduced `ErrorResultTool` and `FailingTool` to simulate error conditions during tool execution, improving coverage of error handling in the agent. - Updated the `ScriptedProvider` to return results wrapped in `anyhow::Result`, ensuring consistent error handling across test cases. - Overall, these enhancements strengthen the test suite by validating tool execution paths and agent behavior under various conditions. * refactor(tests): improve test readability and structure - Enhanced formatting in various test cases for better clarity and consistency, including the use of line breaks and indentation. - Updated assertions to improve readability by aligning them with Rust's idiomatic style. - Overall, these changes aim to strengthen the test suite by making it more maintainable and easier to understand. * docs(agent): enhance module documentation for agent domain - Added comprehensive documentation to the `mod.rs` file, detailing the agent domain's purpose, key components, and their functionalities. - Improved clarity on how LLMs interact with the system, manage conversation history, and handle autonomous behaviors. - This update aims to enhance understanding and maintainability of the agent domain within the OpenHuman project. * docs(agent): improve documentation and formatting across multiple files - Enhanced comments and documentation in `dispatcher.rs`, `error.rs`, `hooks.rs`, and `harness/mod.rs` for better clarity and consistency. - Adjusted formatting in the `TurnContext` and `ToolCallRecord` structs to improve readability and understanding of their purpose and functionality. - Overall, these changes aim to strengthen the documentation and maintainability of the agent domain within the OpenHuman project. * feat(tests): add comprehensive tests for memory loader and agent behavior - Introduced new tests for the `DefaultMemoryLoader`, validating error propagation during primary recall failures and ensuring correct context emission when working memory is present. - Added tests to verify behavior when the working memory section exceeds budget constraints, enhancing memory management robustness. - Overall, these additions strengthen the test suite by improving coverage and reliability in memory handling and agent interactions. * refactor(tests): improve formatting and readability in memory loader tests - Reformatted the `load_context` calls in memory loader tests for better readability by chaining method calls. - Enhanced documentation comments in the `pformat.rs` file to clarify the purpose and functionality of functions. - Improved consistency in spacing and formatting across various sections of the codebase, including the `interrupt.rs` and `builder.rs` files. - Overall, these changes aim to enhance code clarity and maintainability within the test suite and related modules. * feat(tests): add new tests for self-healing interceptor and local AI provider - Introduced tests to validate the detection of missing commands in the `SelfHealingInterceptor`, ensuring proper handling of recognized and unrecognized patterns. - Added tests for the `ensure_polyfill_dir` method to confirm directory creation and path exposure. - Enhanced local AI provider tests to verify correct behavior when the service is ready and the appropriate tier is set, as well as ensuring local metadata is utilized during provider resolution. - Overall, these additions strengthen the test suite by improving coverage and reliability in self-healing and local AI functionalities. * refactor(tests): enhance test structure and external ID handling in escalation tests - Updated the `envelope` function to accept an `external_id` parameter, improving flexibility in test scenarios. - Modified various test cases to utilize specific external IDs, enhancing clarity and ensuring accurate event assertions. - Introduced a mutex lock in local AI tests to prevent race conditions, ensuring reliable test execution. - Overall, these changes improve the robustness and maintainability of the test suite for escalation and local AI functionalities. * refactor(tests): remove redundant test modules and improve test organization - Eliminated unused test modules from `hooks.rs`, `memory_loader.rs`, `fork_context.rs`, `interrupt.rs`, and `parse.rs` to streamline the codebase. - Enhanced overall test organization by consolidating relevant tests into appropriate files, improving maintainability and readability. - These changes aim to simplify the test structure and focus on active test cases, ensuring a cleaner and more efficient testing environment. * refactor(tests): improve test formatting and readability - Reformatted assertions in multiple test cases for better readability by aligning them with Rust's idiomatic style. - Enhanced the structure of test cases by using line breaks and consistent indentation, improving overall clarity. - These changes aim to strengthen the test suite by making it more maintainable and easier to understand. * refactor(api): improve string containment check and formatting in transcript handling - Updated the `key_bytes_from_string` function to use a more concise containment check for special characters. - Changed the message writing in the `write_transcript` function to utilize `writeln!` for better formatting. - Enhanced the condition in `latest_in_dir` to use `is_none_or` for improved readability and clarity. - These changes aim to streamline code and enhance maintainability across the API and transcript handling modules. * refactor(code): streamline function implementations and improve readability - Removed unnecessary whitespace in `run_voice_server_command` for cleaner code. - Simplified directory search logic in `bundled_openclaw_prompts_dir` by using `find` instead of a loop. - Updated `request_accessibility_access` to use direct references for keys and values, enhancing clarity. - Improved documentation formatting in `mod.rs` and `types.rs` for better consistency. - Refactored `Config` initialization in `load.rs` to use struct update syntax for clarity. - Added `#[allow(clippy::too_many_arguments)]` annotations in multiple functions to address linter warnings. - Enhanced type definitions and function signatures for better type safety and readability in various modules. - Overall, these changes aim to improve code maintainability and readability across the project. * chore(ci): update typecheck workflow and pre-push hooks to include clippy checks - Modified the GitHub Actions workflow to run clippy with warnings treated as errors for the `openhuman` package. - Enhanced the pre-push hook to include clippy checks, ensuring code quality before pushing changes. - Updated package.json to define a new script for running clippy, integrating it into the format check process. - These changes aim to improve code quality and maintainability by enforcing stricter linting rules. * refactor(api): simplify condition in key_bytes_from_string function - Streamlined the condition in the `key_bytes_from_string` function to improve readability by consolidating the if statement into a single line. - This change enhances code clarity while maintaining the original functionality of the key validation process. * chore(package): update format:check script to remove clippy integration - Modified the `format:check` script in `package.json` to exclude the clippy check, streamlining the formatting process. - This change simplifies the formatting workflow while maintaining the integrity of Rust formatting checks. * refactor(core): enhance documentation and structure in core modules - Improved documentation across various core functions, including `build_registered_controllers`, `run_from_cli_args`, and `dispatch`, to clarify their purpose and usage. - Streamlined comments to provide clearer guidance on the flow of operations and error handling. - Enhanced the structure of the `EventBus` and `NativeRegistry` to improve readability and maintainability. - Overall, these changes aim to improve code clarity and facilitate easier navigation and understanding of the core components. * refactor(core): reorganize imports in engine.rs for clarity - Adjusted the import statements in `engine.rs` to improve organization and readability. - Moved the macOS-specific import of `validate_focused_target` to a more appropriate location and ensured consistent ordering of imports. - These changes aim to enhance code clarity and maintainability within the core module. * refactor(core): enhance WebChannelEvent structure and documentation - Introduced a new `WebChannelEvent` struct to standardize event payloads for chat-related activities, including fields for event name, client ID, thread ID, request ID, and optional response details. - Improved documentation for the `attach_socketio` function, clarifying its role in setting up Socket.IO event handlers and the associated chat logic. - Removed unused structs and streamlined the event handling process to improve code clarity and maintainability across the core module. * refactor(core): streamline Socket.IO event handlers for clarity and consistency - Refactored the Socket.IO event handlers in `attach_socketio` to improve readability by standardizing the formatting and structure of the code. - Enhanced the organization of the event handling logic for `rpc:request`, `chat:start`, and `chat:cancel` events, making it easier to follow the flow of operations. - These changes aim to improve code maintainability and facilitate easier navigation within the Socket.IO integration. * feat(core): add new structs for Socket RPC and chat events - Introduced `SocketRpcRequest`, `ChatStartPayload`, and `ChatCancelPayload` structs to facilitate handling of Socket.IO events related to chat functionality. - These additions enhance the structure and clarity of the event payloads, improving the maintainability of the Socket.IO integration. * refactor(core): remove unused json_type_name function from socketio.rs - Eliminated the `json_type_name` function from `socketio.rs` as it was not utilized in the current codebase. - This change helps to clean up the code and improve maintainability by removing unnecessary functions. * chore(ci): update clippy command in typecheck workflow - Modified the clippy command in the GitHub Actions workflow to remove the `-D warnings` flag for the `openhuman` package, allowing warnings to be displayed without failing the build. - This change aims to improve the development experience by providing more flexibility during code analysis while still encouraging code quality. * chore(husky): remove clippy check from pre-push hook - Eliminated the clippy command from the pre-push hook to streamline the pre-push checks. - Updated the failure message to reflect the removal of clippy, focusing on format, lint, TypeScript, and Rust errors only. - This change simplifies the pre-push process while maintaining essential checks for code quality. * refactor(tests): add macOS-specific imports for enhanced test coverage - Introduced conditional imports for macOS in the tests module of `engine.rs` to support platform-specific functionality. - This change improves the test setup for macOS environments, ensuring compatibility and enhancing overall test coverage. * refactor(tests): update tool call execution in test cases - Modified the `execute_tool_call` method calls in multiple test cases to include a second parameter, improving the accuracy of the tests. - This change ensures that the tests reflect the latest method signature and enhances the reliability of the test outcomes. |
||
|
|
6410db1fad |
feat(thu-fullrun): overlay attention, skills sync, credits & settings refresh (#479)
* Update Conversations component to enhance user messaging for budget limits. Changed the warning text for exhausted weekly inference budget to improve clarity and user experience. * feat(schemas): add new configuration option for vision model usage - Introduced a new optional boolean field `use_vision_model` in the schemas for enabling vision LLM for screenshot analysis. - Updated the screen intelligence schemas to include a required `consent` field for starting sessions, replacing the previous `sample_interval_ms` field. - Enhanced the `ttl_secs` field description for clarity and modified the `capture_policy` to `screen_monitoring` for better understanding of its purpose. * feat(CoreStateProvider): enhance state management with optimistic updates and error handling - Implemented optimistic local commits for `setAnalyticsEnabled` and `setOnboardingCompletedFlag` to provide instant UI feedback while ensuring state consistency through authoritative snapshot refreshes. - Added error handling for the `refresh` function calls in `setAnalyticsEnabled`, `setOnboardingCompletedFlag`, and `clearSession` to log failures, improving robustness in state management during user interactions. - Updated dependencies in the `useCallback` hooks to include `refresh`, ensuring proper state updates and synchronization with the core. * feat(paths): centralize runtime path resolution for user-scoped skills data - Introduced a new module `paths.rs` to handle the resolution of runtime paths for skills, ensuring that `skills_data` and `workspace` directories are scoped per user. - Updated `bootstrap_skill_runtime` and `bootstrap_skills_runtime` functions to utilize the new path resolution logic, improving consistency and clarity in directory management. - Enhanced error logging for directory creation failures to include the specific path that failed, aiding in debugging. - Added a new optional field `overlay_ttl_ms` in the autocomplete schemas to support overlay time-to-live configuration. * feat(ScreenIntelligencePanel): optimize config synchronization to prevent user edit clobbering - Introduced a reference to track the last synced configuration signature, ensuring that user edits are preserved during periodic updates from the CoreStateProvider. - Updated the effect to compare serialized configuration values, allowing for re-sync only when actual changes occur, enhancing user experience and preventing unintended data loss. * feat(SkillManager): implement initial sync after OAuth completion - Added functionality to trigger an initial data sync immediately after OAuth completion, ensuring users see fresh data without waiting for the next scheduled sync. - Updated comments to clarify the change in sync behavior due to recent modifications in the Rust core, which no longer auto-triggers sync on OAuth completion. * fix(UsageLimitModal, Conversations): enhance user messaging for budget limits - Updated warning messages in both UsageLimitModal and Conversations components to provide clearer information regarding weekly limits and reset times. - Improved clarity in user notifications to enhance overall experience when budget limits are reached. * refactor(SkillSetupModal): improve session mode handling for skill configuration - Updated the SkillSetupModal component to lock the mode at mount time, ensuring users remain in the setup wizard during their session even if the skill is marked as complete. - Simplified mode management by replacing the forceSetup state with a sessionMode state, allowing explicit mode switching while maintaining a consistent user experience. * feat(SkillManager): enhance setup flow for OAuth-based skills - Updated the `startSetup` method to handle OAuth-based skills more effectively by implementing a fallback to core RPC for skills without a frontend runtime. - Improved error handling to treat missing `onSetupStart` implementations as successful completion for pure OAuth skills, allowing the setup wizard to display the "Connected!" screen. - Added detailed logging for both local runtime and core RPC fallback scenarios to improve traceability during the setup process. * feat(Home): enhance local AI status handling and asset management - Introduced a new state for local AI assets, allowing for better tracking of model file readiness. - Updated the loading logic to fetch both local AI status and assets concurrently, improving performance and error handling. - Implemented a mechanism to hide the Local Model Runtime card once all models are fully downloaded, enhancing user experience. - Added comprehensive comments to clarify the logic behind model readiness checks based on asset states. * refactor(Credits): update credit balance structure and terminology - Renamed credit categories in the RewardsCouponSection and PayAsYouGoCard components for clarity, changing "General credits" to "Promo credits" and "Top-up credits" to "Team top-up." - Updated the credit balance API to reflect the new structure, replacing `balanceUsd` and `topUpBalanceUsd` with `promotionBalanceUsd` and `teamTopupUsd`. - Adjusted normalization logic in the credits API to accommodate the new credit balance fields. - Modified tests to ensure correct handling of the updated credit balance structure. * feat(Settings): reorganize billing settings and update descriptions - Added a new top-level billing section to the settings, promoting it out of the Account & Security category for better visibility. - Updated the description for the Account & Security section to remove billing references, focusing on recovery phrase, team management, and linked account access. - Adjusted the settings navigation to accommodate the new billing section, ensuring proper routing and user experience. * refactor(Config): change logging level from info to debug for environment overrides - Updated logging statements in the Config implementation to use debug level instead of info, reducing verbosity during runtime while maintaining necessary traceability for configuration loading. * feat(Overlay): implement overlay attention event handling and refactor overlay app structure - Introduced a new overlay module to manage attention events, allowing the core to publish messages to the overlay window. - Enhanced the OverlayApp component to handle dictation and attention events, improving user interaction with the overlay. - Refactored the overlay state management to support different modes (idle, stt, attention) and added auto-dismiss functionality for attention messages. - Removed the Browser Access Toggle from the Skills page, streamlining the UI and focusing on core functionalities. - Updated tests to reflect changes in the Skills component and removed unnecessary mocks related to browser access. * fix(OverlayBubbleChip): reset typewriter animation on new bubble identity - Updated the OverlayBubbleChip component to reset the typewriter animation correctly when a new bubble is displayed by using the `key` prop. - Refactored the cleanup logic in the useEffect hook to ensure proper interval management and state reset, enhancing the user experience with bubble transitions. * refactor(rest): streamline key_bytes_from_string function and improve readability - Simplified the condition for checking the ASCII key length and character restrictions in the key_bytes_from_string function. - Consolidated the import statements for base64 engines into a single line for better clarity. - Adjusted test data formatting for improved readability in the key_bytes_from_string_tests module. * enhance(logging): improve color detection logic for terminal output - Updated the color detection logic in the logging module to prioritize environment variables (`NO_COLOR`, `FORCE_COLOR`, `CLICOLOR_FORCE`) for better control over color output. - Added detailed comments explaining the color resolution order, enhancing code clarity and maintainability. * test(Home): add mock for openhumanLocalAiAssetsStatus in tests - Enhanced the Home and HomeBootstrapButtons test files by adding a mock implementation for openhumanLocalAiAssetsStatus, which resolves to an object with null result and empty logs. This improves the test setup for local AI asset status handling. * refactor(SkillSetupModal): improve session mode handling and loading state - Updated the SkillSetupModal component to ensure session mode is determined after the first snapshot resolution, preventing premature defaults to the setup wizard. - Introduced a loading state to display a message while waiting for the skill setup status, enhancing user experience during the modal's initial render. - Refactored the SkillManager to throw errors for real failures during setup, ensuring proper error handling and user feedback. * refactor(Config): simplify logging for invalid proxy scope values - Consolidated the logging statement for invalid OPENHUMAN_PROXY_SCOPE values into a single line, improving code readability while maintaining the warning functionality. |
||
|
|
30eec2ad88 |
docs: comprehensive documentation for core Rust modules (#470)
* feat(core): enhance RPC controller and dispatch logic - Added comprehensive documentation for the core RPC controller and dispatch modules, detailing their purpose and functionality. - Introduced new functions for managing registered controllers and schemas, including validation and invocation methods. - Improved the structure of the `RpcOutcome` type to standardize response formats across domain-specific handlers. - Enhanced the local AI operations module with additional functionalities for agent interactions, model management, and audio processing. - Updated the dispatcher to better route RPC calls to their respective handlers, ensuring a more robust and maintainable architecture. These changes improve the clarity and usability of the RPC system, facilitating easier integration and interaction with various components of the OpenHuman platform. * docs: comprehensive documentation for core Rust modules * chore(dependencies): update OpenHuman to version 0.52.0 in Cargo.lock and add knip dependency in package.json |
||
|
|
264bfe4081 |
feat(local_ai): sentiment analysis, GIF decision & Tenor search (#373)
* feat(local_ai): add sentiment analysis, GIF decision, and Tenor search Extend the local model with two new capabilities: - Emotion/sentiment analysis (joy/sadness/anger/etc + valence + confidence) via a lightweight prompt, designed to run periodically (~hourly) - GIF decision + Tenor search: local model decides when a GIF response fits, generates a search query, and proxies through the backend's new Tenor API (POST /agent-integrations/tenor/search) New RPC endpoints: - openhuman.local_ai_analyze_sentiment - openhuman.local_ai_should_send_gif - openhuman.local_ai_tenor_search Frontend integrates with cadence-based invocation: - Reactions: every message (unchanged) - GIF decisions: every ~7 messages - Sentiment analysis: every ~1 hour Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * style: apply formatter fixes Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * merge g Please enter the commit message for your changes. Lines starting --------- Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com> |
||
|
|
8aa5547af4 |
feat: Telegram managed login, channel messaging, and inbound agent loop (#338)
* feat: add managed Telegram login flow and API endpoints - Introduced a new managed Telegram login flow, allowing users to link their Telegram accounts via a deep link. - Added `telegram_login_start` and `telegram_login_check` functions to handle the creation of link tokens and status checks for user linking. - Updated the API with new endpoints for managing Telegram login, including detailed response structures for link token creation and status verification. - Enhanced the `.env.example` file to include a configuration option for the Telegram bot username, facilitating easier setup for developers. * refactor: update Telegram integration to use core RPC for login flow - Replaced the managed DM API with core RPC calls for initiating and checking Telegram login status. - Introduced new API methods `telegramLoginStart` and `telegramLoginCheck` to handle link token creation and verification. - Updated the TelegramConfig and MessagingPanel components to utilize the new login flow, enhancing the user experience and simplifying the codebase. - Adjusted tests to reflect changes in the login process and ensure proper functionality. * docs: update TODO list with new user interaction registration task for memory skill * feat: add ChannelSetupModal for configuring channel integrations - Introduced a new reusable modal component, ChannelSetupModal, for configuring channel integrations such as Telegram and Discord. - The modal can be opened from the Skills page or Settings, enhancing user experience by providing a centralized configuration interface. - Updated MessagingPanel and Skills components to integrate the new modal, allowing users to easily manage their channel settings. - Implemented channel-specific configuration components for better modularity and maintainability. * feat: add ChannelSetupModal for configuring channel integrations - Introduced a new reusable modal component, ChannelSetupModal, for configuring channel integrations such as Telegram and Discord. - The modal can be opened from the Skills page or Settings, enhancing user experience by providing a centralized configuration interface. - Updated MessagingPanel and Skills components to integrate the new modal, allowing users to easily manage their channel settings. - Implemented channel-specific configuration components for better modularity and maintainability. * style: update channel components for improved UI consistency - Refactored styles across various channel configuration components, including ChannelCapabilities, ChannelConfigPanel, ChannelFieldInput, ChannelSelector, DiscordConfig, TelegramConfig, and WebChannelConfig. - Enhanced color schemes and layout for better readability and visual appeal, ensuring a cohesive design across the application. - Updated status badge styles in definitions.ts to align with the new design standards. - Improved error message visibility and loading indicators in Channels page for a more user-friendly experience. * refactor: update WebChannelConfig and tests for improved clarity and functionality - Renamed the `definition` prop in WebChannelConfig to `_definition` for clarity. - Updated test cases in DiscordConfig and TelegramConfig to reflect changes in auth mode labels, ensuring accurate rendering of UI elements. - Adjusted the TelegramConfig test to fix the click event on the connect button, enhancing test reliability. - Modified channel definitions to streamline the managed DM auth mode, improving code organization and maintainability. * fix: enhance WebGL error handling in MeshGradient and RotatingTetrahedronCanvas components - Added error handling in the MeshGradient component to gracefully catch WebGL initialization failures, ensuring the app remains functional when the GPU context is unavailable. - Updated the RotatingTetrahedronCanvas component to verify WebGL context availability before initializing the renderer, preventing crashes and improving user experience. - Modified channel definitions to update auth mode labels for clarity and consistency across the application. * style: update RotatingTetrahedronCanvas colors and animation speed - Changed fill and edge colors in the RotatingTetrahedronCanvas component for improved visual appeal. - Adjusted opacity of the fill material to enhance transparency effects. - Introduced a speed multiplier for rotation animations, allowing for more dynamic visual effects. * refactor: improve WebGL error handling and cleanup in MeshGradient component - Removed unused canvas reference and WebGL context probing to streamline the MeshGradient component. - Enhanced error handling during shader compilation to throw an error when WebGL context may be lost, improving robustness. - Wrapped initialization logic in a try-catch block to gracefully handle failures, ensuring the gradient functionality is disabled if initialization fails. * refactor: simplify Telegram login flow by removing unused link token check - Removed the `check_channel_link_status` method from the `BackendOAuthClient`, streamlining the authentication process. - Updated `telegram_login_check` to directly fetch the user profile and determine link status based on the presence of `telegramId`, enhancing clarity and reducing complexity. - Adjusted logging to reflect the new flow and ensure accurate debugging information. * feat: enhance JSON-RPC method invocation with session expiration handling - Added logic to automatically clear stored session on receiving a 401 error from the backend, improving user experience by ensuring users are redirected to the login page when their session expires. - Introduced a helper function to identify session expiration errors, enhancing code clarity and maintainability. - Refactored the `invoke_method` function to incorporate this new error handling mechanism, ensuring robust session management during RPC calls. * style: update app-dotted-canvas background gradient for improved visibility - Changed the radial gradient background color in the app-dotted-canvas from rgba(0, 0, 0, 0.2) to rgba(0, 0, 0, 0.5), enhancing the contrast and overall visual appeal of the component. * feat: implement channel messaging API with end-to-end testing script - Added a new script `test-channel-messaging.sh` for end-to-end testing of message sending to Telegram via the backend API. - Implemented new backend API methods for sending messages, reactions, creating threads, updating threads, and listing threads in channels. - Enhanced the `BackendOAuthClient` with methods to handle channel messaging operations. - Updated controller schemas and handlers to support the new messaging functionalities, ensuring robust interaction with the backend. - Improved logging for better debugging and tracking of channel operations. * feat: add test-channel-receive script for real-time channel message listening - Introduced a new script `test-channel-receive.mjs` that connects to the backend Socket.IO server and listens for incoming channel messages. - Implemented session token retrieval and validation against the backend, ensuring secure message handling. - Added options for debugging and sending test messages, enhancing the script's usability for testing purposes. - Improved logging for better visibility of connection status and incoming messages. * feat: implement inbound channel message handling for real-time responses - Added functionality to handle inbound messages from channels (e.g., Telegram, Discord) by introducing the `handle_channel_inbound_message` function. - Implemented agent inference loop to process messages and send replies back to the originating channel via the REST API. - Enhanced logging for better tracking of message reception and response handling. - Integrated timeout handling to manage long-running requests effectively. * style: fix prettier formatting for channel components Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com> |
||
|
|
e13980d8ca |
feat: encrypted OAuth token flow with XOR key-splitting (#327)
* feat: implement encrypted OAuth flow and client key management - Updated the SkillSetupWizard to include an encryption mode parameter in the OAuth connection URL. - Enhanced the SkillManager to handle client key shares during OAuth completion, allowing skills to use encrypted proxy requests. - Introduced a new API endpoint for fetching client key shares, facilitating secure communication. - Modified the OAuth deep link handler to retrieve and pass the client key share to the skill runtime. - Implemented client key persistence and restoration in the skill instance, ensuring secure access during runtime. - Updated the JavaScript fetch implementation to utilize the client key for encrypted proxy requests. * refactor: improve registry URL handling in registry_cache.rs - Updated the registry_url function to filter out empty environment variable values for SKILLS_REGISTRY_URL, ensuring a valid URL is always returned. - Enhanced the code readability by using method chaining for better clarity in the URL retrieval process. * feat: enhance SkillSetupWizard with manual integration ID entry for dev mode - Added support for manual entry of integration IDs in development mode within the OAuthLoginView component. - Implemented functionality to handle OAuth completion using the provided integration ID, including error handling and state management. - Updated the component's props to include skillId and onManualComplete for better integration with the setup wizard flow. * feat: enhance SkillSetupWizard with skill runtime readiness check - Added a mechanism to wait for the skill runtime to be fully running after starting it, improving reliability in the OAuthLoginView component. - Introduced a new JSON file for skill preferences, enabling configuration for skills like Notion, including setup completion status. * refactor: streamline code formatting and improve readability in various files - Simplified the formatting of function calls and JSON output definitions in `desktopDeepLinkListener.ts`, `rest.rs`, and `schemas.rs` for better clarity. - Cleaned up import statements in `instance.rs` to enhance organization and maintainability. * feat: remove dictation functionality and related components - Deleted the DictationOverlay component and its associated hooks, streamlining the application by removing unused dictation features. - Updated the App component to reflect the removal of dictation-related UI elements. - Cleaned up settings and navigation to eliminate references to dictation settings and panels, enhancing overall code maintainability. * refactor: update MemoryWorkspace title and enhance skill runtime error handling - Changed the title in MemoryWorkspace from "Memory (EverMind)" to "Memory" for clarity. - Improved error handling in SkillSetupWizard during skill runtime startup, ensuring more informative error messages and a timeout check for skill readiness. |
||
|
|
ef708bdd20 |
refactor(core): move app state ownership into the Rust core (#320)
* refactor(core): integrate CoreStateProvider and streamline state management - Replaced UserProvider with CoreStateProvider in App component to centralize state management. - Updated various components to utilize the new CoreStateProvider for accessing session tokens and user data. - Refactored hooks and components to eliminate direct Redux store dependencies, enhancing modularity and maintainability. - Introduced a new core state management structure to improve the handling of user authentication and onboarding states. This refactor aims to simplify state access across the application and improve overall code clarity. * fix: restore polyfills import and clean up component imports - Reintroduced the import of polyfills in main.tsx to ensure compatibility. - Adjusted import statements in PrivacyPanel and SocketProvider for consistency. - Simplified conditional expressions in TeamInvitesPanel and TeamMembersPanel for better readability. - Refactored CoreStateProvider and store.ts to streamline state initialization. - Enhanced formatting in various files for improved code clarity and maintainability. * refactor(tests): streamline onboarding and protected route tests - Updated OnboardingOverlay tests to utilize mock state management and simplify assertions. - Refactored ProtectedRoute tests to improve readability and ensure consistent use of mock state. - Enhanced teamApi tests to replace direct API calls with core RPC method calls, improving test isolation and clarity. - Adjusted socketSelectors tests to utilize a centralized core state snapshot for better state management during tests. * refactor(onboarding): simplify onboarding state management and improve loading logic - Removed unnecessary local state for onboarding completion in OnboardingOverlay, directly utilizing snapshot data. - Enhanced loading logic to prevent unnecessary renders and improve user experience during onboarding. - Updated PrivacyPanel to handle analytics consent persistence with error handling. - Refactored TeamManagementPanel and TeamPanel to improve team data fetching logic and loading states. - Streamlined CoreStateProvider to manage session token synchronization and state updates more effectively. * chore(deps): update tempfile dependency and refactor app state management - Added `tempfile` dependency to Cargo.toml for improved temporary file handling. - Refactored app state loading and saving functions to enhance error handling and ensure data integrity. - Introduced quarantine mechanism for corrupted app state files to prevent application crashes. - Updated URL parsing logic to ensure proper formatting of API URLs. - Adjusted type definitions in schemas for better clarity and consistency. * refactor(tests): simplify mock state usage in onboarding and protected route tests - Consolidated mock state management in OnboardingOverlay and ProtectedRoute tests for improved readability. - Streamlined assertions by reducing unnecessary lines in test setups. - Enhanced consistency in mock return values across tests to ensure clarity and maintainability. * refactor(tests): enhance PublicRoute tests with mock state and routing - Updated PublicRoute tests to utilize MemoryRouter for improved routing simulation. - Simplified mock state management by integrating `useCoreState` for user authentication scenarios. - Streamlined test assertions and removed redundant preloaded state configurations for clarity and maintainability. * refactor(tests): streamline mock state usage in PublicRoute and Mnemonic tests - Simplified mock state management in PublicRoute and Mnemonic tests for improved readability. - Consolidated mock return values to reduce redundancy and enhance clarity in test setups. - Improved consistency in the usage of `useCoreState` across test files. * Refactor billing components for improved readability - Cleaned up import statements in BillingPanel.tsx for better organization. - Enhanced formatting of billing plan descriptions in billingHelpers.ts for consistency. - Improved readability of conditional checks in BillingPanel component. * Refactor API endpoint handling for clarity and consistency - Updated references from `/settings` to `/auth/me` in various modules to standardize user authentication flows. - Renamed `parse_settings_response_json` to `parse_api_response_json` for improved clarity in response handling. - Adjusted user ID extraction functions to reflect the new endpoint structure, enhancing maintainability across the codebase. - Updated test cases to align with the new endpoint naming conventions, ensuring consistency in API interactions. |
||
|
|
8381283c52 |
Fix/update api (#319)
* feat(webhooks): refactor webhook URL handling and enhance API endpoints - Introduced a new utility function `buildWebhookIngressUrl` to standardize the construction of webhook URLs across components. - Updated `WebhooksDebugPanel` and `TunnelList` components to utilize the new URL builder for improved consistency and maintainability. - Refactored API endpoints in `tunnelsApi` to reflect changes in webhook routing, ensuring all references to tunnel management are aligned with the new structure. - Adjusted user API calls to replace `/telegram/me` with `/auth/me` for better clarity and consistency in authentication flows. - Enhanced socket service to normalize channel connection update payloads, improving error handling and data integrity. These changes streamline webhook management and enhance the overall developer experience when working with webhooks. * feat(messaging): enhance Telegram and Discord channel linking functionality - Added support for managed DM linking with Telegram and OAuth flow for Discord. - Introduced `createChannelLinkToken` API to generate short-lived link tokens for messaging channels. - Updated `MessagingPanel` to handle managed linking flows, including building launch URLs and user instructions. - Enhanced configuration to include a Telegram bot username for fallback linking. - Updated tests to mock new configuration values for consistent testing. These changes improve the user experience for linking messaging channels and streamline the authentication process. * feat(api): introduce core command client and refactor API calls - Added a new `coreCommandClient` to facilitate RPC calls to core services. - Refactored existing API endpoints in `authApi`, `billingApi`, `creditsApi`, `tunnelsApi`, and `userApi` to utilize the new command client for improved consistency and maintainability. - Updated the billing API to include new endpoints for fetching balance, transactions, and managing auto-recharge settings. - Enhanced the user API to streamline user data retrieval. - Improved error handling and logging across the refactored API calls. These changes enhance the overall architecture of the API services, making them more modular and easier to maintain. * refactor(api): streamline API calls and enhance error handling - Refactored `creditsApi` and `tunnelsApi` to ensure consistent use of the new core command client. - Updated API methods to improve error handling and response parsing. - Introduced a new `authed_json` method in `BackendOAuthClient` for standardized authenticated requests. - Cleaned up unused imports and optimized code structure across various modules. These changes enhance the maintainability and reliability of the API services. * refactor(api): streamline API calls and improve code readability - Reorganized API calls in `authApi`, `billingApi`, `creditsApi`, and `tunnelsApi` to enhance consistency and maintainability. - Updated function formatting for better readability, ensuring parameters are clearly defined. - Cleaned up import statements and removed unnecessary line breaks to improve code clarity. These changes contribute to a more maintainable codebase and enhance the overall developer experience. * refactor(MessagingPanel): clean up imports and remove unused constants - Reorganized import statements for clarity and consistency. - Removed unused constants related to channel definitions and status styles to streamline the component. - Simplified the `updateField` function call in the rendering logic for better readability. These changes enhance the maintainability of the MessagingPanel component. * fix: restore helper functions removed during merge cleanup buildManagedChannelLaunchUrl and buildManagedChannelInstruction were stripped by the linter after merge resolution, breaking the build. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * feat(messaging): enhance MessagingPanel with pending instruction handling - Introduced a new state for pending instructions to improve user feedback during channel connection processes. - Updated error handling to ensure users receive clear instructions, including URLs for manual access if automatic opening fails. - Refactored connection status updates to streamline the dispatch process and improve code readability. - Enhanced the rendering logic to display pending instructions in the UI, providing better context for users during authentication flows. * fix(api): encode channel and ID parameters in webhook and OAuth URLs - Updated the URL construction in the BackendOAuthClient to encode the channel parameter, ensuring proper formatting for requests. - Modified the get_tunnel, update_tunnel, and delete_tunnel functions to encode the ID parameter in webhook URLs, enhancing security and compatibility with special characters. * fix(auth): validate channel input for link token creation - Added validation to ensure the channel is not empty and is one of the supported types (telegram, discord). - Converted the channel string to lowercase for consistent matching. - Updated the call to create_channel_link_token to use a reference to the channel variable. * chore(todos): update TODO list with completed tasks and new feature requests - Marked several tasks as completed, including integration of the custom memory engine and skills registry into the core. - Added new items to the TODO list, including improvements for voiceover functionalities, screen intelligence, and Gmail skill enhancements. - Included tasks for debugging skills from the UI and improving prompts to reduce hallucinations. * refactor(webhooks): improve formatting of get_tunnel function for readability - Reformatted the get_tunnel function to enhance code clarity by adjusting the indentation and line breaks in the call to get_authed_value. - This change improves the maintainability of the code and aligns with the overall code style. * test(userApi): enhance userApi tests with improved mocking and error handling - Added a mock function for core command calls to streamline test setup. - Introduced a helper function to generate mock user data for consistent test cases. - Updated tests to use the mock function for simulating API responses, improving clarity and maintainability. - Enhanced error handling in tests to cover various API error scenarios, ensuring robustness in userApi.getMe functionality. * refactor(billingApi): update tests to use core command mocking and improve error handling - Replaced apiClient mocks with core command mocks for better alignment with the new API structure. - Updated test cases to reflect changes in API call expectations, enhancing clarity and maintainability. - Improved error handling in tests to ensure proper propagation of errors from core command calls. * refactor(billingApi): simplify test cases by consolidating mock function calls - Streamlined mock function calls in billingApi tests for improved readability and consistency. - Removed unnecessary line breaks in mock responses, enhancing clarity in test definitions. - Ensured that error handling and API call expectations are clearly represented in the tests. * refactor(api): rename settings endpoint to current_user for clarity - Updated the endpoint handling authenticated profile fetches to improve clarity in the codebase. - Adjusted the routing to reflect the new function name, enhancing maintainability and understanding of the API's purpose. --------- Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com> |
||
|
|
c5e5ae170c |
ci: speed up GitHub Actions builds (~14m → ~3-5m warm) (#136)
* chore: add CI profile for faster compilation in Cargo.toml files - Introduced a new `[profile.ci]` section in both root and Tauri Cargo.toml files to optimize build settings for continuous integration. - Adjusted compilation parameters to prioritize speed over runtime performance, including reduced optimization level and enabled code generation units. * refactor(tests): update agent test setup to return temporary directory - Modified the `build_agent_with` function calls in the agent tests to return a temporary directory alongside the agent instance, improving resource management during tests. - Ensured consistency in test setup across multiple test functions. * chore: update .gitignore to include fastembed_cache - Added 'workflow' and '.fastembed_cache' to the .gitignore file to prevent unnecessary files from being tracked in the repository. * test: enhance dispatch routing tests with panic handling Updated the `dispatch_routes_memory_doc_ingest` test to use `AssertUnwindSafe` and `catch_unwind` for better handling of potential panics during execution. This ensures that the test verifies route existence even if the handler encounters a panic, improving robustness against shared state issues in concurrent tests. * ci: speed up builds with rust-cache, sccache, mold linker, and CI profile - Replace manual Cargo registry cache with Swatinem/rust-cache@v2 (caches target/ directories for both core and Tauri crates) - Add mozilla-actions/sccache for cross-branch compilation caching - Install mold linker on Linux for faster linking - Use --profile ci for sidecar build (opt-level 1, codegen-units 16) - Override release profile env vars for Tauri build with CI-tuned settings - Add --bundles none to CI build (skip unused deb/appimage packaging) - Restrict push triggers to main branch only (PRs already cover feature branches, preventing duplicate runs) Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * fix(ci): unset RUSTC_WRAPPER for cargo fmt to avoid sccache errors The sccache-action sets RUSTC_WRAPPER globally for the job. cargo fmt invokes rustc through sccache which fails if the GHA cache service is unavailable. Clear RUSTC_WRAPPER for fmt steps and remove redundant per-step env overrides (the action already sets them job-wide). Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * refactor: implement Default trait for various structs and enums - Added Default implementations for ConnectionStatus, AgentBuilder, NativeRuntime, AutocompleteEngine, CliChannel, ActionTracker, SkillStatus, and ExtractionMode to streamline object initialization. - Simplified condition checks in several places by replacing map_or with is_some_and and is_none_or for better readability and performance. - Updated various instances of string handling in message sending to remove unnecessary conversions. This refactor enhances code clarity and consistency across the codebase. * style: clean up whitespace and improve code formatting - Removed unnecessary blank lines in several files to enhance code readability. - Simplified condition checks by consolidating method calls into single lines for better clarity. - Improved formatting in various functions to maintain consistency across the codebase. * fix(ci): use --bundles deb instead of unsupported none value Tauri CLI on this version doesn't support 'none' as a bundle type. Use 'deb' as the lightest single bundle to minimize packaging time. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * feat(ci): add Dockerfile and CI workflows for building and pushing Docker images - Introduced a Dockerfile to set up a CI environment with necessary dependencies for Tauri, Rust, Node.js, and sccache. - Created a new workflow to build and push the CI Docker image to GitHub Container Registry on main branch pushes. - Updated existing workflows to utilize the new Docker image for building and testing, enhancing consistency and efficiency in CI processes. * chore(ci): update container image references in CI workflows - Removed unnecessary permissions for packages in build, test, and typecheck workflows. - Updated container image references to use a specific digest instead of the latest tag for improved stability and reproducibility in CI processes. * fix(ci): use correct amd64 Docker image digest Previous digest was from arm64 build (Mac). Rebuilt with --platform linux/amd64 for GitHub Actions runners. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * fix(ci): use tag instead of digest for Docker image reference GHCR doesn't support pulling OCI index manifests by digest reliably. Use the rust-1.93.0 tag which is pinned to a specific Rust version and resolves correctly on amd64 CI runners. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * fix(ci): rename Docker package to openhuman_ci Move from nested ghcr.io/tinyhumansai/openhuman/ci-runner to ghcr.io/tinyhumansai/openhuman_ci to avoid GHCR nested package manifest resolution issues. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * fix(ci): remove sccache env vars from container jobs sccache can't access the GHA cache API from inside a Docker container (missing ACTIONS_CACHE_URL/ACTIONS_RUNTIME_TOKEN). Swatinem/rust-cache already caches target/ which provides the main build speedup. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * chore: update installer smoke workflow to trigger on main branch pushes - Added a trigger for the installer smoke workflow to run on pushes to the main branch, enhancing CI coverage for mainline changes. * fix: enhance Sentry DSN retrieval logic - Updated the Sentry DSN retrieval process to include an additional fallback option using `option_env!`, ensuring that the DSN can be sourced from both environment variables and optional configuration, improving robustness in observability setup. * chore: add OPENHUMAN_SENTRY_DSN to release workflow and example secrets - Included the OPENHUMAN_SENTRY_DSN variable in the release workflow configuration to enhance observability setup. - Updated the ci-secrets.example.json file to include a placeholder for OPENHUMAN_SENTRY_DSN, providing clarity for developers on required environment variables. --------- Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com> |
||
|
|
6964abbf5f |
Fix CI: remove openssl dep, skip ORT init in ingestion tests, fix fmt
- Replace openssl with aes-gcm for AES-256-GCM decryption in rest.rs - Remove openssl/openssl-sys from Cargo.toml and Cargo.lock - Use ci_safe_config() in ingestion tests to skip ORT model loading (avoids Mutex poisoned panic on CI without libonnxruntime) - Remove serial_test dependency (no longer needed) - Fix cargo fmt issue in rest.rs Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> |
||
|
|
c1a3ae1cfe |
Refactor controller registration into domain schemas and generic registry (#53)
* Refactor core server helpers and enhance REPL dotenv loading - Removed unused functions for extracting namespaces and filtering documents by namespace from `helpers.rs`, streamlining the codebase. - Introduced dotenv loading functionality in `repl.rs`, allowing for environment variable management from a specified `.env` file. - Added utility functions for parsing dotenv values and resolving the dotenv file path, improving configuration handling in the REPL. - Enhanced logging for dotenv loading to provide better visibility into the process and any issues encountered. * Add AI RPC module and enhance core server dispatch functionality - Introduced a new `rpc` module within the `ai` namespace to handle various AI-related commands, including memory file operations and session management. - Updated the core server's dispatch logic to integrate the new AI RPC functionality, improving modularity and maintainability. - Removed outdated memory dispatch implementation and streamlined the overall dispatch structure for better performance and clarity. - Enhanced error handling and logging throughout the new functionalities to improve maintainability and user feedback. * Refactor project structure and enhance RPC functionality - Introduced a new `rpc` module to streamline JSON-RPC handling across various domains, improving code organization and maintainability. - Updated the core server and API modules to utilize the new `rpc` structure, enhancing modularity and reducing code duplication. - Added new models for authentication and socket management, improving the overall functionality of the API. - Removed outdated references to the previous `openhuman` RPC structure, ensuring a cleaner and more efficient codebase. * Update architecture documentation and refactor AI prompt paths - Updated references in architecture documentation to reflect the new directory structure for AI prompts, changing paths from `src/ai/prompts` to `src/openhuman/agent/prompts`. - Enhanced clarity in command documentation by aligning AI-related commands with the updated prompt paths. - Removed obsolete AI module and streamlined memory management references to improve code organization and maintainability. - Introduced new markdown files for agent prompts, establishing a foundation for OpenHuman's AI capabilities. * Update AI prompt paths and configuration references - Changed all references from `src/ai/prompts` to `src/openhuman/agent/prompts` in documentation and code files to reflect the new directory structure. - Updated Tauri configuration to include the new resource paths for AI prompts, ensuring proper access and functionality. - Enhanced the AI configuration commands to align with the updated paths, improving clarity and maintainability across the project. * Enhance core structure and introduce new RPC functionality - Added a new `core` module to centralize shared schemas and contracts for controllers, improving code organization and maintainability. - Introduced `jsonrpc` and `cli` modules within the `core` structure to handle JSON-RPC requests and command-line interactions, enhancing modularity. - Defined a `ControllerSchema` for transport-agnostic function contracts, allowing for consistent handling across RPC and CLI layers. - Established a new `all` module to manage registered controllers and their schemas, streamlining the invocation process. - Updated documentation in `CLAUDE.md` to reflect new controller schema contracts and module organization, improving clarity for developers. * Refactor core server structure and enhance RPC functionality - Removed the `core_server` module and integrated its functionalities into the `core` module, improving code organization and maintainability. - Introduced a new `dispatch` module to handle RPC requests, streamlining the invocation process for various commands. - Updated the CLI to utilize the new core structure, enhancing command handling and modularity. - Added comprehensive logging for RPC interactions, improving visibility and debugging capabilities. - Enhanced error handling across the core server, ensuring consistent feedback for users and developers. * Refactor CLI command handling and enhance JSON-RPC integration - Consolidated CLI command structure by removing the `CoreCli` and directly implementing command functions for `run`, `call`, and `namespace`. - Improved argument parsing for server commands, including port specification and help options, enhancing user experience. - Streamlined the invocation of JSON-RPC methods, ensuring consistent error handling and response formatting across commands. - Introduced a new `run_namespace_command` function to manage namespace-specific operations, improving modularity and clarity in command execution. * Refactor SkillsPanel and TauriCommandsPanel for improved integration handling - Removed unused integration-related functions and state management from SkillsPanel, simplifying the component's logic. - Updated TauriCommandsPanel to eliminate integration name input and associated commands, streamlining the user interface. - Introduced a new local AI memory management module to handle session and memory operations, enhancing overall functionality. - Refactored core RPC client to integrate local AI method dispatching, improving command handling consistency across the application. - Cleaned up tauriCommands utility functions to align with the new command structure, enhancing maintainability. * Refactor TauriCommandsPanel to streamline command handling - Removed the `openhumanModelsRefresh` function and replaced its usage with `openhumanDoctorReport`, simplifying the command logic. - Eliminated unused model refresh buttons from the UI, enhancing the user interface and reducing clutter. - Updated related utility functions in `tauriCommands.ts` to reflect the removal of model refresh functionality, improving maintainability. * Refactor JSON-RPC server integration and remove legacy server module - Updated the CLI to invoke the JSON-RPC server directly, enhancing command execution flow. - Introduced a new HTTP router in the `jsonrpc` module, consolidating route handling for health checks and RPC requests. - Removed the deprecated `server` module, streamlining the codebase and improving maintainability. - Adjusted tests to reflect the new routing structure, ensuring continued functionality and integration. * Remove submodule and update CLAUDE.md documentation - Deleted the `.gitmodules` file and removed the `skills` submodule, simplifying the project structure. - Updated the description in `CLAUDE.md` to reflect a broader focus on community assistance rather than just crypto, enhancing clarity. - Added sections on coding philosophy and controller migration checklist to improve developer guidance and maintainability. * Refactor controller registration and enhance schema management - Introduced a centralized registry for registered controllers, improving the organization and validation of controller schemas. - Updated the `all_registered_controllers` and `all_controller_schemas` functions across various modules to streamline controller management. - Added comprehensive validation for controller registration to ensure consistency and prevent duplicate entries. - Enhanced the CLI and JSON-RPC integration to utilize the new registry structure, improving command handling and modularity. - Updated documentation in `CLAUDE.md` to reflect changes in the skills registry and controller management processes, enhancing clarity for contributors. * Enhance autocomplete, config, and credentials modules with new schemas and controller registrations - Added support for autocomplete, config, and credentials functionalities by introducing new schemas and registered controllers. - Updated the `build_registered_controllers` and `build_declared_controller_schemas` functions to include new entries for autocomplete, config, and credentials. - Implemented new JSON-RPC tests for autocomplete and config methods, ensuring proper validation and error handling. - Refactored CLI tests to include checks for new commands related to autocomplete and configuration management, improving test coverage and reliability. - Introduced new modules for schemas in autocomplete, config, and credentials, enhancing code organization and maintainability. * Add local AI and migration modules with schemas and controller registrations - Introduced local AI and migration functionalities by adding new schemas and registered controllers. - Updated the `build_registered_controllers` and `build_declared_controller_schemas` functions to include entries for local AI and migration. - Implemented JSON-RPC tests for local AI and migration methods, ensuring proper validation and error handling. - Enhanced CLI tests to verify new commands related to local AI and migration, improving test coverage and reliability. - Organized code by creating dedicated modules for schemas in local AI and migration, enhancing maintainability. * Refactor controller schemas for config and auth modules - Updated controller schemas for config and auth functionalities, aligning namespaces and function names for consistency. - Changed function names in the JSON-RPC tests to reflect the new schema structure, ensuring proper invocation. - Enhanced CLI tests to verify updated commands related to config and auth, improving test coverage and reliability. - Organized code by consolidating related functionalities under appropriate namespaces, enhancing maintainability. * Add agent and screen intelligence modules with schemas and controller registrations - Introduced agent and screen intelligence functionalities by adding new schemas and registered controllers. - Updated the `build_registered_controllers` and `build_declared_controller_schemas` functions to include entries for agent and screen intelligence. - Created dedicated modules for schemas in agent, screen intelligence, skills, tools, tray, and workspace, enhancing code organization and maintainability. - Implemented initial controller schemas for agent and screen intelligence, providing a foundation for future functionality. - Enhanced the overall structure of the core module to accommodate new integrations, improving modularity and clarity. * Enhance autocomplete and namespace descriptions in core modules - Added a new function `namespace_description` to provide descriptions for various namespaces, improving user guidance in CLI commands. - Updated the CLI help output to include namespace descriptions, enhancing clarity for users. - Introduced a new `core` module for autocomplete functionalities, including various operations and structures related to inline autocomplete. - Refactored the `autocomplete` module to improve organization and maintainability, consolidating related functionalities under appropriate namespaces. - Implemented initial JSON-RPC operations for autocomplete, ensuring a robust interface for managing autocomplete features. * Refactor and clean up code across multiple modules - Removed unnecessary whitespace in `TauriCommandsPanel.tsx`, improving code readability. - Cleaned up imports and reorganized code structure in `localCoreAiMemory.ts`, enhancing maintainability. - Streamlined module imports in `mod.rs` files across various directories, ensuring consistency and clarity. - Deleted the obsolete `rpc.rs` file in the `cron` module, consolidating functionality and reducing clutter. - Updated function definitions in `ops.rs` to improve formatting and readability, enhancing overall code quality. * Refactor session management and enhance module organization - Changed `sessionIndex` from a mutable variable to a constant in `localCoreAiMemory.ts`, improving code clarity and immutability. - Introduced new `ops.rs` files in the `approval`, `providers`, `skills`, and `quickjs_libs` modules, consolidating related functionalities and enhancing code organization. - Streamlined module imports in `mod.rs` files across various directories, ensuring consistency and clarity in module structure. - Removed obsolete code and unnecessary comments, improving overall code readability and maintainability. * Refactor configuration schema organization and module structure - Moved the configuration schema definitions from `mod.rs` to a new `types.rs` file, enhancing modularity and clarity. - Updated module imports across various files to reflect the new structure, ensuring consistency in the codebase. - Cleaned up obsolete code and comments, improving overall readability and maintainability. * Remove obsolete configuration schema file and its associated modules - Deleted the `types.rs` file from the configuration schema, consolidating the codebase and removing unused components. - This change enhances maintainability by eliminating redundant code and streamlining the overall structure of the configuration management. * Fix config schema module exports * Add configuration schema types and enhance module exports - Introduced a new `types.rs` file to define the top-level configuration structure for `config.toml`, improving modularity and clarity. - Updated `mod.rs` to re-export all public types and configurations, ensuring a streamlined interface for the configuration schema. - Enhanced the organization of configuration components, making it easier to manage and extend in the future. * Update import path for AuthProfile and AuthProfileKind in tests module - Changed the import statement for `AuthProfile` and `AuthProfileKind` to use the correct path, ensuring proper module resolution and consistency in the codebase. * Refactor import statements in test files for consistency - Cleaned up import statements across multiple test files by removing unnecessary components and ensuring uniformity in module imports. - This change enhances code readability and maintainability by streamlining the import structure. * Add agent chat and REPL session handling with schemas - Introduced new schemas for agent chat and REPL session management, enhancing the functionality of the agent module. - Implemented handlers for chat and REPL session operations, allowing for more interactive and persistent user sessions. - Updated the memory store to include category handling for memory entries, improving data organization and retrieval. - Refactored memory query methods to support ranked results and category storage, enhancing the memory management capabilities. - Improved error handling in memory recall tools to ensure non-empty parameters, increasing robustness and user feedback. * Refactor JSON-RPC method names for consistency and clarity - Updated JSON-RPC method names in tests to follow a consistent naming convention, improving readability and maintainability. - Adjusted parameter names in the JSON payload to align with the updated method names, ensuring proper functionality and clarity in the API interactions. - Enhanced overall code organization by streamlining method calls in the test suite. |
||
|
|
244702d349 |
Feat/refactor UI code (#52)
* Enhance autocomplete functionality and settings panel
- Added a new AutocompletePanel component for managing inline autocomplete settings, including options for enabling/disabling, debounce timing, and style configurations.
- Integrated autocomplete status tracking and logging within the panel to provide real-time feedback on the autocomplete engine's state.
- Updated settings navigation to include the new autocomplete settings route, improving user accessibility to autocomplete features.
- Introduced new Tauri commands for managing autocomplete operations, including start, stop, and current status retrieval, enhancing interaction with the autocomplete engine.
- Refactored existing code to streamline autocomplete-related functionalities and improve overall maintainability.
* Update TypeScript configuration and add new assets
- Modified `tsconfig.json` to adjust path aliases and include directories for improved module resolution.
- Added new SVG and image assets to the public directory, enhancing the application's visual resources.
- Introduced multiple Lottie animation JSON files for dynamic UI elements, expanding the application's animation capabilities.
* Update project structure and paths for Tauri integration
- Adjusted paths in the pull request template and various workflow files to reflect the new project structure, moving Tauri-related files under the `app` directory.
- Updated commands in the build and release workflows to ensure compatibility with the new file locations.
- Enhanced the test workflow to create the necessary `.env` file in the correct directory for end-to-end testing.
- Added new markdown files for agent prompts and configuration, establishing a foundation for OpenHuman's AI capabilities.
* Refactor project paths and update configurations for Tauri integration
- Adjusted script paths in package.json to reflect the new project structure, ensuring compatibility with the updated directory layout.
- Modified tsconfig.json to correct path aliases and include directories for improved module resolution.
- Introduced a new utility for resolving development paths, enhancing the ability to locate the `rust-core/ai` directory across different project structures.
- Updated Cargo.toml and tauri.conf.json to align with the new directory structure, ensuring proper resource and dependency management.
- Added a new dev_paths module to streamline path resolution logic, improving maintainability and clarity in the codebase.
* Refactor project structure and update configurations for Tauri integration
- Adjusted paths in .gitignore, Cargo.toml, and various scripts to reflect the new directory layout, moving Tauri-related files under the `app` directory.
- Introduced a new package.json file to manage workspace scripts and dependencies effectively.
- Updated end-to-end build and run scripts to ensure compatibility with the new project structure.
- Enhanced documentation in CONTRIBUTING.md to guide contributors on the updated project organization and Tauri command usage.
* Refactor Tauri command invocations to use dedicated utility functions
- Replaced direct `invoke` calls with utility functions from `tauriCommands` for improved readability and maintainability across multiple components.
- Updated `SkillsGrid`, `Skills`, `SkillProvider`, and `SkillManager` to utilize the new command structure, enhancing consistency in Tauri command handling.
- Introduced a new `coreRpcClient` for managing core RPC relay requests, streamlining error handling and request processing.
- Added a new `core_rpc_relay` command in the Tauri backend to facilitate communication with the core service, ensuring better service management and error reporting.
* Refactor Tauri command invocations in intelligence stats and memory manager
- Replaced direct `invoke` calls with utility functions from `tauriCommands` in `useIntelligenceStats` and `MemoryManager` for improved readability and maintainability.
- Updated the `aiListMemoryFiles`, `aiReadMemoryFile`, and `aiWriteMemoryFile` functions to utilize the new command structure, enhancing consistency in Tauri command handling.
- Introduced new command handling in the Rust backend for `ai.list_memory_files`, `ai.read_memory_file`, and `ai.write_memory_file`, streamlining communication with the core service.
* Refactor SkillsGrid and remove SelfEvolveModal component
- Removed the SelfEvolveModal component to streamline the SkillsGrid functionality.
- Updated the SkillsGrid to utilize the runtimeDiscoverSkills function for loading skills, replacing the previous invoke method.
- Simplified the skill entry normalization process by integrating it directly into the skills loading logic.
- Enhanced error handling during skill loading to improve robustness and user feedback.
* Refactor Tauri command invocations to use coreRpcClient
- Replaced direct `invoke` calls with `callCoreRpc` in various components, including `useIntelligenceStats`, `MemoryManager`, `SessionManager`, and `transcript` functions, enhancing code readability and maintainability.
- Updated the Rust backend to handle new command structures for memory and session management, streamlining communication with the core service.
- Improved consistency in handling Tauri commands across the application.
* Refactor Tauri command invocations to utilize coreRpcClient
- Replaced direct `invoke` calls with `callCoreRpc` in `tauriCommands.ts` and `tauriSocket.ts`, enhancing code readability and maintainability.
- Updated the Rust backend to support new command structures for authentication and session management, streamlining communication with the core service.
- Removed legacy socket reporting methods in `tauriSocket.ts`, reflecting a shift towards event-driven socket state management.
- Improved consistency in handling Tauri commands across the application, aligning with recent refactoring efforts.
* Remove pre-commit hook and update TODO list with completed tasks and new objectives. This includes separating the binary from the Tauri codebase, integrating accessibility service installation, and removing Android/iOS support from the codebase.
* Add core server functionality with dispatch and RPC handling
- Introduced new modules for core server operations, including dispatching RPC requests and handling various AI and memory-related commands.
- Implemented a robust structure for managing authentication, configuration, and session states through the `openhuman` namespace.
- Added helper functions for loading configurations, managing memory files, and processing authentication profiles.
- Established a new routing system using Axum for handling HTTP requests, including health checks and RPC endpoints.
- Enhanced error handling and logging throughout the new functionalities to improve maintainability and user feedback.
* Implement core server CLI and modular structure
- Introduced a new CLI module for the core server, enabling various commands for server management, health checks, and configuration settings.
- Established a modular structure for core server functionalities, including dispatching RPC requests and managing settings for models, memory, and runtime.
- Added comprehensive tests to validate the functionality of accessibility and autocomplete commands, ensuring robust error handling and schema compliance.
- Enhanced the overall organization of the core server codebase, improving maintainability and readability.
* Implement AI RPC dispatch functionality
- Introduced a new `ai_rpc` module for handling various AI-related commands, including memory file operations and session management.
- Enhanced the `try_dispatch` function to support commands such as listing, reading, writing memory files, and managing session states.
- Updated the core server dispatch module to integrate the new AI RPC functionality, improving modularity and maintainability.
- Refactored existing code to ensure consistent parameter parsing and error handling across AI commands.
* Update TODO list and refactor Rust core server files
- Added new tasks to the TODO list for documentation updates and feature flag cleanup.
- Introduced `Arc` import in `cli.rs` for improved concurrency handling.
- Cleaned up imports in `helpers.rs` and added conditional compilation for `tauri-host`.
- Removed unused `value_only` function in `types.rs` and added `#[allow(dead_code)]` to `SocketConnectParams` and `SocketEmitParams`.
- Enhanced `try_dispatch` function in `dispatch/mod.rs` for non-tauri-host scenarios.
- Updated `try_dispatch` in `openhuman/platform.rs` to correctly handle session parameters.
- Modified `screen_intelligence` configuration in tests to include new properties for better session management.
* Refactor import statements and enhance code readability
- Cleaned up import statements across multiple files for improved organization and consistency.
- Reformatted code in `cli.rs`, `helpers.rs`, and various dispatch modules to enhance readability.
- Ensured consistent parameter handling in `try_dispatch` functions, improving maintainability.
- Removed unnecessary whitespace and adjusted formatting for better code clarity.
* Refactor project structure and enhance AI memory management
- Consolidated the `openhuman-core` package into a single `Cargo.toml` file, removing the previous `rust-core` directory.
- Introduced new modules for AI memory management, including filesystem-based storage and encryption functionalities.
- Added Tauri commands for initializing memory and session management, enhancing user interaction with memory files.
- Implemented JSON-based storage for memory chunks and session transcripts, improving data accessibility and organization.
- Updated dependencies and features in `Cargo.toml` to support new functionalities and ensure compatibility.
* Update build and release workflows to reflect project structure changes
- Adjusted paths in GitHub Actions workflows to accommodate the consolidation of the `openhuman-core` package into a single `Cargo.toml`.
- Updated import statements in various files to point to the new locations of markdown resources.
- Modified the Tauri configuration to reflect the new resource paths, ensuring proper access to AI prompts.
- Enhanced the staging script to build the standalone binary from the updated project structure.
* Refactor AI directory resolution and update documentation
- Updated the logic for resolving AI directory paths to reflect the new project structure, replacing references to `rust-core/ai` with `src/ai/prompts`.
- Enhanced the `find_ai_directory` function across multiple modules to utilize the new path resolution methods.
- Updated documentation comments to clarify the new directory structure and fallback mechanisms for loading AI prompts.
* Rename `openhuman-core` to `openhuman` across the project
- Updated package names in `Cargo.toml` and `Cargo.lock` to reflect the new naming convention.
- Adjusted references in GitHub Actions workflows and scripts to use the new package name.
- Modified CLI command names and error messages to align with the updated naming.
- Ensured consistency in executable file names and paths throughout the codebase.
* Refactor project commands and update package scripts
- Updated package.json to change workspace references from `openhuman` to `app` for build, compile, dev, format, lint, and test scripts.
- Removed outdated memory and chat command files to streamline the codebase and improve maintainability.
- Adjusted the `lib.rs` file to reflect changes in memory command handling, transitioning to use `callCoreRpc` for Neocortex memory operations.
- Cleaned up the commands module by removing unused imports and consolidating functionality.
* Add Tauri host support and new daemon configuration
- Introduced new modules for Tauri host functionality, including `desktop` and `daemon_host`.
- Added static variables and initialization functions for managing the desktop app handle and resource directory.
- Updated import paths for `HeartbeatEngine` to improve clarity and organization.
- Implemented configuration loading and saving for daemon UI preferences, enhancing user experience.
* Update package names in project configuration
- Changed workspace references in package.json from `app` to `openhuman-app` for consistency.
- Updated the name field in the app's package.json to reflect the new naming convention.
* Remove Tauri host feature flags from core server modules
- Eliminated conditional compilation for Tauri host in `lib.rs`, `helpers.rs`, and `dispatch` modules.
- Streamlined socket management functions and dispatch logic by removing unused code related to Tauri host.
- Improved code clarity and maintainability by consolidating socket-related functionality.
* Enhance Tauri host feature integration and update dependencies
- Added `tauri-host` as a default feature in `Cargo.toml` to streamline feature management.
- Removed explicit feature flag from `openhuman` dependency in `app/src-tauri/Cargo.toml` for cleaner configuration.
- Updated Tauri command attributes in various modules to conditionally compile with the `tauri-host` feature, improving modularity.
- Expanded TODO list to include migration support from OpenClaw, indicating future development focus.
* Refactor authentication and credential management in OpenHuman
- Introduced new modules for handling authentication profiles and tokens, including `anthropic_token`, `openai_oauth`, and `profiles`.
- Removed unused Tauri host-related code from core server modules, enhancing clarity and maintainability.
- Updated `Cargo.toml` and `Cargo.lock` to reflect the removal of the `rquickjs` dependency and other package adjustments.
- Streamlined memory client initialization in dispatch logic to utilize the new `local_memory` module.
- Enhanced code organization by consolidating credential management functionalities and improving the overall structure of the OpenHuman module.
* Enhance Rust core RPC structure and streamline helper functions
- Introduced a dedicated `rpc.rs` file for each domain in the Rust core to manage JSON-RPC and CLI behavior, improving code organization and clarity.
- Refactored helper functions to utilize `rpc_invocation_from_outcome` for consistent handling of RPC responses across various modules.
- Removed unused authentication and credential management functions from `helpers.rs`, consolidating relevant logic into the new RPC structure.
- Updated dispatch logic in multiple modules to leverage the new RPC functions, enhancing maintainability and reducing code duplication.
* Enhance Rust core RPC structure and streamline helper functions
- Introduced a dedicated `rpc.rs` file for each domain in the Rust core to manage JSON-RPC and CLI behavior, improving code organization and clarity.
- Refactored helper functions to utilize `rpc_invocation_from_outcome` for consistent handling of RPC responses across various modules.
- Removed unused authentication and credential management functions from `helpers.rs`, consolidating relevant logic into the new RPC structure.
- Updated dispatch logic in multiple modules to leverage the new RPC functions, enhancing maintainability and reducing code duplication.
* Refactor OpenHuman configuration loading and enhance onboarding RPC
- Replaced the `load_openhuman_config` function with a new `load_config_with_timeout` method to improve timeout handling during configuration loading.
- Consolidated configuration loading logic across various modules, reducing redundancy and enhancing maintainability.
- Introduced new RPC functions for applying settings related to models, memory, screen intelligence, gateway, tunnel, runtime, and browser, streamlining the update process.
- Added onboarding helpers in a new `onboard` module, including a JSON-RPC controller for model refresh operations, improving onboarding flow management.
* Refactor CLI and configuration management in OpenHuman
- Consolidated CLI-related functionality by introducing new modules for settings and credentials management, enhancing code organization.
- Removed redundant functions and streamlined the configuration loading process, improving maintainability.
- Added new CLI helpers for screenshot tools and workspace initialization, facilitating better user experience and onboarding.
- Enhanced JSON-RPC responses to be more compatible with CLI requirements, ensuring consistent output across various commands.
* Remove gateway settings and related functionality from OpenHuman
- Eliminated the GatewaySettingsUpdate interface and associated functions from the codebase, streamlining configuration management.
- Removed references to gateway settings in the CLI and configuration modules, enhancing clarity and maintainability.
- Deleted the gateway module and its related components, including rate limiting and client handling, to simplify the architecture.
- Updated Cargo.toml and Cargo.lock to reflect the removal of dependencies related to gateway functionality.
* Update documentation and improve clarity in OpenHuman
- Revised comments in the `mod.rs`, `traits.rs`, and `pairing.rs` files to enhance clarity and accuracy.
- Updated descriptions related to security policy, long-running processes, and pairing functionality for better understanding.
* Refactor loading prop in TauriCommandsPanel for cleaner code
- Simplified the loading prop assignment in the TauriCommandsPanel component by removing unnecessary line breaks, enhancing readability and maintainability.
* Add OpenSSL dependency and implement OAuth authentication features
- Added OpenSSL as a dependency in `Cargo.toml` to support cryptographic operations.
- Introduced new OAuth-related structures and parameters in `types.rs` for handling authentication flows.
- Implemented OAuth connection and integration token fetching in `auth_socket.rs`, enhancing the authentication capabilities of the OpenHuman module.
- Created new modules for managing authentication profiles and responses, improving the organization of authentication-related code.
- Removed deprecated `anthropic_token` and `openai_oauth` modules to streamline credential management.
- Updated `Cargo.lock` to reflect the addition of the OpenSSL dependency.
* Refactor OpenHuman module and update dependencies
- Added OpenHuman integration entry in the registry for improved backend inference handling.
- Updated various files to enhance code clarity and organization, including adjustments to OAuth client methods and integration tests.
- Refactored import statements and removed unnecessary line breaks for better readability.
- Updated `Cargo.lock` to reflect changes in dependencies and ensure consistency across the project.
* Implement desktop host features and refactor runtime handling
- Introduced new modules for memory management, socket handling, and command definitions to support desktop host functionality.
- Refactored QuickJS runtime initialization to log errors when the engine is not linked, improving clarity on runtime status.
- Added placeholder commands for chat and model interactions, indicating unavailability in the desktop build while maintaining structure for future integration.
- Enhanced organization of the codebase by creating dedicated files for runtime and utility functions, streamlining the development process.
- Updated documentation to reflect new modules and their purposes, ensuring better understanding for future contributors.
* Add CLI banner and print function to enhance user experience
- Introduced a new CLI banner with branding and GitHub link for user engagement.
- Implemented a `print_cli_banner` function to display the banner when running the CLI, improving visibility and user interaction.
- Updated the CLI entry point to call the new banner function, ensuring it appears at startup.
* Add API integration and update dependencies
- Introduced new API modules for handling HTTP requests and WebSocket connections to the TinyHumans backend.
- Added `ureq` dependency for simplified HTTP client functionality, updating `Cargo.toml` and `Cargo.lock` accordingly.
- Implemented configuration and JWT handling in the new `api` module, enhancing session management and API interactions.
- Refactored existing code to utilize the new API helpers, improving code organization and maintainability.
- Updated documentation to reflect new API functionalities and usage guidelines.
* Refactor settings fetching and update dependencies
- Removed the `ureq` dependency and associated functions for fetching settings, streamlining the codebase.
- Updated the `fetch_settings` method to utilize `reqwest` for HTTP requests, enhancing consistency and reliability in API interactions.
- Adjusted the `Cargo.toml` to reflect the removal of `ureq`, ensuring dependencies are up to date.
* Update `ureq` dependency to version 3.3.0 in `Cargo.lock`
- Removed the specific version constraint for `ureq`, allowing for more flexibility in dependency resolution.
- Updated the `Cargo.lock` to reflect the new version of `ureq`, ensuring compatibility with recent changes in the codebase.
* Enhance JSON-RPC logging and CLI initialization
- Introduced a new `rpc_log` module for structured logging of JSON-RPC requests and responses, including redaction of sensitive parameters.
- Updated `execute_core_cli` to initialize logging with a default level and timestamp format.
- Enhanced logging in `rpc_handler` and `dispatch` functions to provide detailed insights into method calls and their execution times.
- Improved error handling logging to capture method failures with context, aiding in debugging and monitoring.
* Refactor HTTP server setup and add integration tests
- Introduced a new `build_core_http_router` function to encapsulate the HTTP routing logic, improving code organization and readability.
- Updated the `run_server` function to utilize the new router function, streamlining server initialization.
- Added comprehensive integration tests for the JSON-RPC API, ensuring robust functionality and error handling in real-world scenarios.
* Enhance OpenHuman backend integration and refactor provider handling
- Added support for the OpenHuman backend in the TauriCommandsPanel, including default configurations and validation for API keys.
- Introduced a new REPL command in the CLI for interactive RPC communication, allowing for dynamic mode switching and message handling.
- Refactored provider creation logic to streamline the integration of the OpenHuman backend, removing deprecated provider overrides and ensuring consistent usage across the codebase.
- Updated various components to improve error handling and user feedback related to provider selection and API interactions.
* Refactor provider handling and update default model settings
- Removed provider override states from the AgentChatPanel and TauriCommandsPanel components, simplifying state management.
- Updated local storage handling to exclude provider overrides, ensuring cleaner data storage.
- Changed default model settings across various components and backend configurations to use "neocortex-mk1" as the new default model.
- Enhanced error handling and validation logic in the TauriCommandsPanel, focusing on model and temperature settings.
- Streamlined integration tests and removed deprecated provider validation logic to improve code clarity and maintainability.
* Refactor code for improved readability and consistency
- Adjusted formatting in several files to enhance code clarity, including consistent parameter passing and alignment.
- Simplified match statement syntax in the `run_models` function for better readability.
- Streamlined assertions in tests to maintain consistency in error handling checks.
- Updated default model name handling in the `AgentBuilder` for cleaner initialization.
* Refactor API URL handling and enhance error reporting
- Updated the `effective_api_url` function to improve clarity in resolving the API base URL, incorporating environment variable checks.
- Enhanced diagnostics in the configuration check to provide clearer messages regarding the API URL status.
- Introduced new error formatting functions to improve the clarity of error messages related to API transport issues.
- Refactored error handling in the OpenAiCompatibleProvider to utilize the new error formatting, ensuring consistent and informative error reporting.
* Refactor API client initialization for consistency
- Updated the instantiation of `BackendOAuthClient` to consistently pass the API URL by reference across multiple functions.
- Simplified the match statement in the `run_models_refresh` function for improved readability.
* Enhance REPL command handling and add fallback mechanisms
- Improved error handling in the REPL command processing, providing clearer feedback for command execution failures.
- Introduced a fallback mechanism for the `agent_chat` RPC call, allowing for graceful degradation to a simpler chat method or a direct backend curl transport if the primary call fails.
- Added a new `backend_chat_via_curl` function to handle chat requests using curl as a last resort, ensuring continued functionality in case of RPC issues.
- Updated the `agent_chat_simple` function to support model overrides and temperature settings, enhancing flexibility in chat interactions.
* Update default Ollama model settings for consistency
- Changed the default Ollama model and vision model to "gemma3:4b-it-qat" for improved alignment across configurations.
- Ensured consistent model naming to enhance clarity in model usage within the local AI module.
* Implement login token consumption and enhance error handling
- Added functionality to consume login tokens via a new API endpoint, returning a JWT for authenticated sessions.
- Improved error handling in the Conversations component, introducing a fallback mechanism for chat interactions when the primary method is unavailable.
- Updated UserProvider to restore session tokens automatically, enhancing user experience during authentication.
- Refactored thread API to support the new login token consumption logic, ensuring seamless integration with the backend.
* Update HTTP client configuration to use Rustls TLS
- Replaced the HTTP/1.1 only setting with Rustls TLS in the OpenAiCompatibleProvider's client builder for enhanced security.
- Ensured consistent application of the new TLS setting across multiple client instances.
* Add Local AI command support and enhance error handling
- Introduced a new `LocalAi` command in the CLI for managing local AI runtime operations, including status checks, asset downloads, and prompt handling.
- Added detailed argument structures for various local AI functionalities, improving command usability.
- Enhanced error reporting in the `LocalAiService` by including response details in error messages for better debugging and user feedback.
- Refactored existing error handling to provide clearer context on failures during API interactions.
* Add local AI module with Ollama integration and model management
- Introduced a new local AI module that includes functionality for automatic installation of the Ollama runtime across different operating systems (Windows, macOS, Linux).
- Implemented model ID resolution and management, providing default settings for various AI models and ensuring compatibility with user configurations.
- Added HTTP API structures and request handling for Ollama, enabling interaction with the local AI service for generating responses and managing assets.
- Developed utility functions for parsing model outputs and managing workspace paths, enhancing the overall structure and usability of the local AI service.
- Established a comprehensive service layer for managing local AI operations, including status tracking and error handling for improved user experience.
* Refactor local AI service structure and enhance asset management
- Simplified the local AI module by reorganizing the service structure, introducing new modules for model IDs, paths, and asset management.
- Added comprehensive asset status tracking for various AI models, including chat, vision, embedding, STT, and TTS, with improved error handling.
- Implemented methods for downloading models and assets, ensuring better management of local AI resources.
- Updated visibility of service methods to enhance encapsulation and maintainability within the local AI service.
* Enhance local AI module with new download progress tracking and unit tests
- Added new structures for tracking download progress of various AI models, including detailed status and metrics.
- Implemented unit tests for model ID resolution, parsing suggestions, and asset path resolution to ensure robust functionality.
- Refactored service methods to improve encapsulation and maintainability, enhancing the overall structure of the local AI service.
- Updated existing tests to cover new functionalities and ensure consistent behavior across the module.
* Implement new local AI download functionalities and refactor model management
- Added support for downloading all local AI assets and tracking download progress, enhancing user experience and resource management.
- Introduced new RPC methods for fetching download progress and managing asset states, improving the overall functionality of the local AI module.
- Refactored existing model management code to utilize the new model catalog, ensuring better organization and maintainability.
- Updated relevant tests to cover new functionalities and ensure consistent behavior across the local AI service.
* Add new interfaces and functions for local AI download progress tracking
- Introduced `LocalAiDownloadProgressItem` and `LocalAiDownloadsProgress` interfaces to structure download progress data for various AI models.
- Implemented `openhumanLocalAiDownloadAllAssets` and `openhumanLocalAiDownloadsProgress` functions to facilitate downloading all assets and tracking their progress.
- Enhanced error handling for Tauri environment checks in new functions, ensuring robust operation within the local AI module.
* Refactor agent loop structure and introduce modular components
- Deleted the `loop_.rs` file and reorganized the agent loop into multiple modules for better maintainability and clarity.
- Introduced new files for handling credentials, history management, tool instructions, memory context, and parsing logic.
- Implemented functions for scrubbing sensitive credentials, managing conversation history, and building tool instructions.
- Enhanced the overall structure of the agent loop to facilitate easier testing and future development.
* Refactor authentication structure and migrate to credentials module
- Moved authentication-related functionality from `auth_profiles` to a new `credentials` module for better organization and clarity.
- Updated references in the API and core server to reflect the new module structure.
- Introduced new data structures and methods for managing authentication profiles, including session support and response handling.
- Removed the obsolete `auth_profiles` module to streamline the codebase and enhance maintainability.
* Add screen intelligence module with capture and context management
- Introduced new modules for screen capture and context management, specifically targeting macOS.
- Implemented functionality to capture screen images and retrieve foreground application context.
- Added data structures for managing application context and window bounds.
- Established limits for screenshot sizes and context character counts to ensure efficient resource management.
- Enhanced helper functions for input action validation and vision summary processing.
- Set up a modular structure for better maintainability and future enhancements.
* Refactor screen intelligence module and remove obsolete components
- Deleted unused files related to screen intelligence, including context and permissions management, to streamline the codebase.
- Refactored the capture functionality to improve organization and maintainability.
- Updated function signatures for better clarity and consistency.
- Enhanced the overall structure of the screen intelligence module for future development and testing.
* Enhance autocomplete CLI functionality and refactor related code
- Added new options for the autocomplete command in the CLI, allowing users to run the autocomplete loop in the current process or spawn a detached process.
- Introduced `AutocompleteStartCliOptions` struct to encapsulate the new command-line arguments.
- Refactored the `autocomplete_start_cli` function to handle the new options and improve process management for the autocomplete service.
- Updated documentation in `CLAUDE.md` to clarify the separation of concerns between routing and controller logic in the codebase.
* Enhance autocomplete error handling and improve focused text context retrieval
- Added a new function to identify "no text candidate" errors, improving error management in the autocomplete engine.
- Refactored the `focused_text_context` and `focused_text_context_verbose` functions to enhance clarity and reliability in retrieving application context.
- Updated the return format of the `focused_text_context_verbose` function to use a separator for better data parsing.
- Added a new TODO item for allowing users to select LLM model versions based on their CPU capabilities.
* Remove Docker, Native, and WASM runtime implementations along with related traits and tests
- Deleted the DockerRuntime, NativeRuntime, and WasmRuntime implementations to streamline the codebase.
- Removed associated traits and factory functions for runtime creation.
- Eliminated all related tests to ensure a clean removal of unused components.
- This refactor aims to simplify the runtime management and prepare for future enhancements.
* Add quickjs-runtime feature and introduce runtime module
- Added a new feature flag for `quickjs-runtime` in `Cargo.toml` to enable its usage.
- Created a new `runtime.rs` module to implement `NativeRuntime` and `DockerRuntime` with associated traits for runtime management.
- Updated the `skills` module to reference the correct path for `SkillConfig`.
- Removed the obsolete `skillforge` module from the `openhuman` namespace to streamline the codebase.
- Enhanced the `skills` module with new structures and functions for managing skills, including initialization and loading logic.
* Refactor autocomplete configuration to remove legacy disabled apps
- Updated the default configuration for `AutocompleteConfig` to remove the legacy disabled apps ('terminal' and 'code'), allowing for broader usage of Codex/CLI.
- Introduced a migration function to handle legacy disabled apps during configuration loading, ensuring custom user preferences remain intact.
- This change enhances the flexibility of the autocomplete feature by preventing unnecessary restrictions on application usage.
* Update rquickjs dependencies in Cargo.lock
- Updated the rquickjs and rquickjs-core dependencies to versions 0.11.0 and 0.9.0 respectively, ensuring compatibility with the latest features and fixes.
- Added new entries for rquickjs-sys and its corresponding version 0.9.0 to the dependency list, enhancing the project's runtime capabilities.
- This update improves the overall stability and performance of the application by leveraging the latest improvements in the rquickjs ecosystem.
* Add terminal application detection to autocomplete logic
- Introduced a new function `is_terminal_app` to identify terminal applications based on their names, enhancing the autocomplete feature's context awareness.
- Updated the `focused_text_context_verbose` function to allow terminal applications to bypass text role checks when the input value is not empty, improving user experience in terminal environments.
- This change aims to provide better support for terminal-based applications in the autocomplete system.
* Add terminal input context extraction and noise line detection
- Introduced functions to identify terminal-like buffers and filter out noise lines in terminal input, enhancing the autocomplete engine's context awareness.
- Updated the `focused_text_context` logic to utilize the new terminal context extraction, improving the handling of text in terminal applications.
- Enhanced the `focused_text_context_verbose` function to better retrieve static text values from UI elements, ensuring accurate context representation in terminal environments.
- These changes aim to improve user experience and functionality for terminal-based applications in the autocomplete system.
* Enhance autocomplete engine state management and error handling
- Added new fields `last_escape_down` and `last_overlay_signature` to `EngineState` for improved state tracking.
- Implemented `try_reject_via_escape` method to handle escape key interactions, allowing users to reject suggestions more intuitively.
- Updated error handling to display notifications for different states (ready, accepted, rejected, error) using `show_overflow_badge`.
- Refactored state updates to ensure consistent management of suggestion and phase transitions, enhancing overall user experience in the autocomplete system.
* Implement periodic status logging in autocomplete service
- Added a polling mechanism to log the status of the autocomplete engine at regular intervals.
- Enhanced logging to capture changes in phase, application name, suggestions, and errors, improving visibility during service execution.
- Refactored the `autocomplete_start_cli` function to integrate the new logging functionality, ensuring a more informative user experience while the service is running.
* Refactor memory dispatch logic and remove local memory implementation
- Updated the memory dispatch functions to utilize the new `memory_rpc` module, enhancing the handling of memory operations such as document management and namespace queries.
- Removed the local memory implementation, including database interactions and related functions, to streamline the codebase and improve maintainability.
- Introduced new RPC calls for document operations (put, list, delete) and context queries, ensuring a more efficient and consistent approach to memory management.
- This refactor aims to enhance the overall architecture and performance of the memory handling system.
* Remove macOS-specific overflow badge functionality and related helper functions
- Deleted the `show_overflow_badge` and `escape_applescript_string` functions, which were specific to macOS, to streamline the codebase.
- Refactored the `show_overflow_badge` function to provide a no-op implementation for non-macOS platforms, enhancing cross-platform compatibility.
- This change simplifies the autocomplete module by removing platform-dependent code, improving maintainability and clarity.
* Enhance text application logic in autocomplete module
- Updated the `apply_text_to_focused_field` function to improve interaction with focused UI elements on macOS.
- The new implementation retrieves the current value of the focused element and appends the provided text, ensuring better handling of text input.
- Enhanced error reporting to include stderr output when applying suggestions fails, improving debugging capabilities.
- These changes aim to provide a more robust and user-friendly experience in the autocomplete functionality.
* Refactor Landlock feature configuration for Linux support
- Moved the `landlock` and `rppal` dependencies under a conditional target configuration for Linux in both `Cargo.toml` files, ensuring they are only included when building for Linux.
- Updated the `landlock.rs` module to check for both the `sandbox-landlock` feature and the Linux target OS, improving the conditional compilation logic.
- This change enhances cross-platform compatibility and ensures that Landlock functionality is only available on supported systems.
* Update dependencies and enhance Tauri integration
- Updated the Tauri dependency in `Cargo.toml` to include the `tray-icon` feature, enabling system tray support.
- Introduced a new `rust-toolchain.toml` file to pin the Rust version to 1.93.0, ensuring compatibility with the matrix-sdk.
- Modified GitHub workflows to use the specified Rust version from `rust-toolchain.toml` instead of the stable version, improving build consistency.
- Refactored Tauri commands to utilize a new `wrapCommandResult` function for better response handling.
- Added a new `tray` module in `openhuman` for managing system tray functionality, enhancing the desktop experience.
- Updated various command implementations to streamline service management and improve error handling.
* Refactor core process handling and enhance encryption features
- Removed the `openhuman` dependency from `Cargo.lock` and `Cargo.toml`, streamlining the project structure.
- Updated the core process handling to fall back to a child process when in-process execution is unavailable, improving error handling and logging.
- Introduced new encryption commands (`ai_init_encryption`, `ai_encrypt`, `ai_decrypt`) to enhance security features, utilizing AES-GCM for data protection.
- Added a new `tray` module for managing system tray functionality, improving user experience on desktop platforms.
- Refactored various command implementations to improve service management and error handling, ensuring a more robust application architecture.
* Remove unused modules and refactor daemon host configuration
- Deleted the `daemon_host_config`, `memory`, `models`, `openhuman_daemon`, `tray`, `chat`, `conscious_loop`, and `runtime` modules to streamline the codebase.
- Refactored the daemon host configuration logic into the `openhuman` module, consolidating related functionality.
- Updated command implementations to utilize the new configuration methods, ensuring consistent handling of daemon host settings.
- This cleanup enhances maintainability and reduces complexity in the project structure.
* Refactor memory management and update Tauri dependencies
- Removed the `tray-icon` feature from the Tauri dependency in `Cargo.toml` to streamline the configuration.
- Deleted the `core:tray:default` capability from the default capabilities JSON, simplifying the capabilities structure.
- Refactored memory handling in tests to utilize `UnifiedMemory` instead of `SqliteMemory`, enhancing consistency across memory operations.
- Updated memory store, recall, and forget functionalities to support a global namespace, improving memory management and retrieval processes.
- Enhanced error handling and logging in memory operations to provide clearer feedback during execution.
* Remove AI encryption commands and related functionality
- Deleted the `ai_init_encryption`, `ai_encrypt`, and `ai_decrypt` functions to streamline the codebase and remove unused features.
- Updated the command registration in the `run` function to reflect the removal of these encryption commands, enhancing maintainability and reducing complexity.
* Add OAuth integration token handling and channel connection management
- Introduced functions to fetch and encrypt integration tokens using OAuth, enhancing security for token management.
- Updated the channel connections API to support OAuth integration, including listing, connecting, and disconnecting channels.
- Implemented checks for supported channels and authentication modes, improving the robustness of channel connection handling.
- Enhanced error handling for integration token retrieval to ensure required fields are present before proceeding.
* Refactor project structure and update documentation
- Renamed the project from "Outsourced" to "OpenHuman" and revised the project summary to reflect its focus on AI-powered assistance for crypto communities.
- Restructured the repository layout, detailing the purpose of each directory and its contents.
- Updated runtime scope to clarify platform support and Tauri's desktop-only focus.
- Enhanced documentation across various files, including architecture, services, and routing, to improve clarity and usability for contributors.
- Removed outdated sections and streamlined commands for development and production builds, ensuring consistency in the documentation.
* Implement REPL session management and multimodal support
- Introduced a new REPL session management system, allowing for session-specific interactions with agents.
- Added functions for starting, chatting, resetting, and ending REPL sessions, enhancing user experience and control.
- Implemented multimodal message handling, enabling the processing of images alongside text in user messages.
- Updated the project structure to include new modules for identity and multimodal functionalities, improving organization and maintainability.
- Enhanced error handling and logging for session operations, providing clearer feedback during execution.
* Refactor memory store implementation and introduce unified memory management
- Removed the legacy memory store implementation and replaced it with a new unified memory management system.
- Introduced a `MemoryClient` for handling document storage, retrieval, and namespace management.
- Added support for key-value storage and graph data structures within the unified memory framework.
- Enhanced the `UnifiedMemory` struct with methods for document upsertion, querying, and namespace operations.
- Updated the project structure to include new modules for memory types, factories, and traits, improving organization and maintainability.
- Improved error handling and logging across memory operations for clearer feedback during execution.
* Implement QuickJS skill instance management
- Removed the previous QjsSkillInstance implementation and replaced it with a new modular structure.
- Introduced separate modules for event loop management, instance handling, JavaScript handlers, and utility functions.
- Enhanced the event loop to efficiently manage QuickJS runtime tasks, including timer callbacks and message processing.
- Added support for asynchronous tool calls and lifecycle management within the QuickJS context.
- Improved error handling and logging throughout the new implementation for better debugging and user feedback.
- Updated documentation to reflect the new structure and functionality of the QuickJS skill instance.
|