Commit Graph
1042 Commits
Author SHA1 Message Date
M3gA-Mind c12fb22f9d Merge remote-tracking branch 'upstream/develop' into feat/final-flow-check 2026-03-05 20:57:53 +05:30
M3gA-Mind 05581d9d85 Refactor Gmail metadata synchronization logic
- Updated the `syncGmailMetadataToBackend` function to accept a new `GmailStateForSync` interface, enhancing type safety and clarity.
- Introduced a new `GmailEmailSummaryLike` interface to represent email summaries in the synchronization process.
- Adjusted the handling of Gmail profile data to ensure proper extraction and emission of metadata to the backend.
- Updated the `SkillProvider` to dispatch Gmail emails to the Redux store and synchronize the Gmail state effectively.
2026-03-05 20:55:45 +05:30
cyrusandClaude aef7df5dce feat: implement unified AI injection system with dynamic TOOLS.md generation
- Create complete modular AI configuration system following OpenClaw standards
- Add dynamic TOOLS.md generation from V8 skills runtime discovery
- Implement unified injection system with injectAll() for SOUL + TOOLS contexts
- Update all 4 integration points to use unified injection consistently

## New Features:

### Modular AI Configuration System
- loadSoul() → SoulConfig (personality, voice, behavior)
- loadTools() → ToolsConfig (available tools and capabilities)
- loadAIConfig() → AIConfig (unified SOUL + TOOLS configuration)
- Multi-layer caching: memory → localStorage → GitHub → bundled

### Dynamic TOOLS.md Generation
- yarn tools:generate command for build-time tool discovery
- Spawns Tauri runtime to call runtime_all_tools() from V8 skills
- Generates OpenClaw-compliant documentation with usage examples
- Professional formatting with environment configs and statistics
- Currently discovers 4 tools from 3 skills (telegram, notion, gmail)

### Unified Injection System
- injectAll() function combines SOUL + TOOLS injection
- injectSoul() and injectTools() for individual injection
- Consistent [PERSONA_CONTEXT] and [TOOLS_CONTEXT] formatting
- Updated all integration points: Conversations.tsx, threadSlice.ts, threadApi.ts, tauriCommands.ts

### Build System Integration
- Added tools:generate script to package.json
- Rust binary: src-tauri/src/bin/alphahuman-tools-discovery.rs
- Cross-platform discovery scripts in scripts/tools-generator/
- Fixed Cargo.toml binary configuration and main.rs imports

### Enhanced Settings UI
- AI Configuration panel shows both SOUL and TOOLS
- Individual refresh buttons for each component
- Combined "Refresh All AI Configuration" functionality
- Source indicators and statistics display

## Technical Implementation:

### File Structure:
- /ai/TOOLS.md - Auto-generated tool documentation
- src/lib/ai/tools/injector.ts - Tools injection system
- src/lib/ai/injector.ts - Unified injection orchestrator
- src/lib/ai/loader.ts - Unified configuration loader
- scripts/tools-generator/ - Build-time discovery system

### Message Format:
```
[PERSONA_CONTEXT]
I am AlphaHuman: incredibly smart, funny friend...
[/PERSONA_CONTEXT]

[TOOLS_CONTEXT]
4 tools across 3 skills
Categories: Communication (2), Productivity (1), Email (1)
[/TOOLS_CONTEXT]

User message: Hello!
```

### Performance & Reliability:
- Multi-layer caching with 30min TTL
- Graceful degradation if injection fails
- Cross-platform build support (Windows, macOS, Linux)
- Full TypeScript compliance with comprehensive error handling

🤖 Generated with Claude Code(https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2026-03-05 19:42:55 +05:30
Cyrus GrayandGitHub 9452ea619d Merge pull request #159 from graycyrus/feature/soul-persona-system
refactor: implement organized /ai/ directory with SOUL injection system and OpenClaw bootstrap files
2026-03-05 18:35:10 +05:30
cyrus 01266b1ff4 Merge remote-tracking branch 'upstream/develop' into feature/soul-persona-system
# Conflicts:
#	src/components/settings/panels/AIPanel.tsx
#	src/lib/ai/soul/loader.ts
2026-03-05 18:34:09 +05:30
cyrusandClaude f826612e80 refactor: migrate to organized /ai/ directory structure with OpenClaw bootstrap files
- Move SOUL.md from src/ to /ai/ directory for better organization
- Create comprehensive /ai/ directory structure following OpenClaw framework:
  - /ai/SOUL.md - Moved existing vibrant personality configuration
  - /ai/TOOLS.md - TODO placeholder for available tools and capabilities
  - /ai/AGENTS.md - TODO placeholder for agent definitions and roles
  - /ai/IDENTITY.md - TODO placeholder for core identity and values
  - /ai/USER.md - TODO placeholder for user context and personalization
  - /ai/BOOTSTRAP.md - TODO placeholder for initialization procedures
  - /ai/MEMORY.md - TODO placeholder for curated long-term knowledge
  - /ai/README.md - Comprehensive documentation and implementation guide

- Update import paths in soul/loader.ts:
  - Local import: '../../../../ai/SOUL.md?raw'
  - GitHub URL: 'main/ai/SOUL.md' for remote loading
  - Maintain backward compatibility with existing caching system

- Benefits:
  - Clean separation of AI config from source code
  - Organized structure for future AI configuration expansion
  - User-friendly location for editing AI behavior
  - Scalable foundation for full OpenClaw bootstrap system
  - Better version control and collaboration on AI personality

All TODO placeholder files include detailed structure examples and
implementation guidance for future development.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2026-03-05 18:28:16 +05:30
cyrusandClaude df03ca19da fix: make SOUL refresh button functional and update persona to be more human
- Fix Refresh SOUL Configuration button to actually refresh cached data
  - Add clearSoulCache() call before loading fresh configuration
  - Create separate refreshSoulConfig() function for button click
  - Add loading state "Refreshing..." for better UX
  - Clear both memory and localStorage cache for fresh data

- Update SOUL.md persona to be more human, funny, and vibrant
  - Transform from robotic assistant to "smart, funny friend" personality
  - Add humor, empathy, and authentic human communication style
  - Update personality traits: Curious, Witty, Empathetic, Authentic, Optimistic
  - Enhance voice & tone with conversational, relatable language
  - Improve behavioral guidelines with natural, friendly examples
  - Maintain professional competence while adding warmth and personality

The refresh button now properly clears cache and reloads SOUL configuration,
and the AI persona is much more engaging and human-like.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2026-03-05 18:10:47 +05:30
e8c93313cd feat: implement SOUL.md persona injection system for consistent AI behavior (#158)
* feat: add .mcp.json for MCP server configuration

- Introduced `.mcp.json` with server details for managing MCP integrations
- Defines `readme` server with HTTP type and URL endpoint configuration

* fix: Update skills submodule with Telegram error handling improvements

- Fixed setup flow showing false success when TDLib errors occurred
- Improved async error handling in setup steps
- Added client reset mechanisms for error recovery
- Enhanced error messaging for better user experience
- Cleaned up excessive debug logging while maintaining error logs

Resolves issue where Telegram setup showed success modal despite underlying TDLib errors.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>

* Add daemon lifecycle management system to frontend UI

This implementation integrates the Rust daemon's health monitoring and lifecycle management into the React frontend. Key features include real-time health indicators, automatic start/error recovery, and detailed control panels, enhancing both user experience and operational reliability.

* Enhance daemon health monitoring with detailed logging, event tracking, and state management improvements.

* Add extensive logging for Tauri socket lifecycle and event listeners

This update improves troubleshooting and debugging by adding detailed logs throughout Tauri socket initialization, event listener setup, and error handling processes.

* Define global Tauri interface types in TypeScript

* Fix daemon service management and health communication issues

This comprehensive fix resolves two critical daemon-related issues:

1. **Launchctl "Input/output error" fix**:
   - Add intelligent state checking before service operations
   - Only load LaunchAgent if not already loaded
   - Treat "already running" as success, not failure
   - Add helper functions for cross-platform service state detection
   - Implement idempotent service start operations

2. **Daemon health communication fix**:
   - Add ALPHAHUMAN_DAEMON_INTERNAL environment variable to external service plist
   - Force external daemon to use file-based communication (daemon_state.json)
   - Implement file watching bridge in main app to emit Tauri events
   - Ensure frontend receives proper health updates from external daemon

**Key Changes**:
- Enhanced `start()` function with state checking across all platforms
- Added `is_service_loaded_macos()`, `is_service_enabled_linux()`, `is_task_exists_windows()`
- Modified macOS plist to include `ALPHAHUMAN_DAEMON_INTERNAL=false`
- Added `watch_daemon_health_file()` function for external daemon communication
- Updated daemon mode detection logic for cross-platform consistency
- Added comprehensive logging for service management operations

**Expected Results**:
- No more "Input/output error" when clicking daemon start button
- External daemon status shows "connected" instead of "disconnected"
- Idempotent service operations (safe to run multiple times)
- Single daemon process prevents resource conflicts
- Cross-platform daemon service reliability

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>

* Add `ALPHAHUMAN_DAEMON_INTERNAL` env variable to configuration documentation

* Optimize imports in `TauriCommandsPanel.tsx` by removing unused variables and adding necessary hooks.

* Add OAuth login support with configurable provider types and UI components

This update introduces OAuth login functionality, including support for multiple providers (Google, GitHub, Twitter, Discord). Added reusable components for provider buttons and a login section, along with styled configurations and type definitions. Includes enhancements for token handling and updated login flows.

* Add OAuth debug mode support for development environments

Introduce `IS_DEV` checks to enable OAuth debug mode, allowing detailed logging and adjustable OAuth URLs with debug parameters during development.

* Implement hybrid local/API thread storage with message persistence

- Add local-first thread and message storage using Redux Persist
- Persist threads, messages, and UI state (panelWidth, lastViewedAt, selectedThreadId) locally
- Remove API dependencies for thread/message fetching (fetchThreads, fetchThreadMessages)
- Add local thread management actions (createThreadLocal, deleteThreadLocal, addMessageLocal)
- Fix message persistence issue: ensure both user and AI messages survive navigation
- Maintain API integration for sendMessage functionality with AI responses
- Preserve optimistic updates and error handling behavior
- Enable instant app startup and offline conversation viewing

Key changes:
- Enhanced threadSlice with messagesByThreadId storage and local management actions
- Updated Redux persist config to include thread data
- Modified Conversations component to use local thread operations
- Fixed addInferenceResponse to persist preceding user messages
- Maintained all existing UI patterns and error states

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>

* feat: implement SOUL.md persona injection system

- Add complete SOUL.md persona injection into user messages
- Create AI Configuration panel in Settings for SOUL management
- Implement multi-layer caching (memory → localStorage → GitHub → bundled)
- Add SOUL injection to all message flows:
  - Main Conversations page (inferenceApi flow)
  - Settings Agent Chat (Tauri commands)
  - Redux sendMessage thunk
  - Thread API layer
- Parse SOUL.md sections: personality, safety rules, behaviors, interactions
- Inject persona context with [PERSONA_CONTEXT] tags
- Add graceful error handling with console logging
- Token-optimized context building (top 3 traits, critical safety rules)
- Cross-platform compatibility (Tauri + web environments)

Files added:
- src/lib/ai/soul/types.ts - TypeScript interfaces
- src/lib/ai/soul/loader.ts - SOUL loading with caching
- src/lib/ai/soul/injector.ts - Message injection logic
- src/components/settings/panels/AIPanel.tsx - Settings UI

Files modified:
- src/pages/Conversations.tsx - Add SOUL injection to main chat
- src/store/threadSlice.ts - Add SOUL injection to Redux flow
- src/services/api/threadApi.ts - Add SOUL injection to API layer
- src/utils/tauriCommands.ts - Add SOUL injection to Tauri commands
- src/components/settings/SettingsHome.tsx - Add AI Configuration menu
- src/pages/Settings.tsx - Add AI panel routing

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>

---------

Co-authored-by: Claude <noreply@anthropic.com>
2026-03-05 17:43:04 +05:30
cyrusandClaude d85313138f feat: implement SOUL.md persona injection system
- Add complete SOUL.md persona injection into user messages
- Create AI Configuration panel in Settings for SOUL management
- Implement multi-layer caching (memory → localStorage → GitHub → bundled)
- Add SOUL injection to all message flows:
  - Main Conversations page (inferenceApi flow)
  - Settings Agent Chat (Tauri commands)
  - Redux sendMessage thunk
  - Thread API layer
- Parse SOUL.md sections: personality, safety rules, behaviors, interactions
- Inject persona context with [PERSONA_CONTEXT] tags
- Add graceful error handling with console logging
- Token-optimized context building (top 3 traits, critical safety rules)
- Cross-platform compatibility (Tauri + web environments)

Files added:
- src/lib/ai/soul/types.ts - TypeScript interfaces
- src/lib/ai/soul/loader.ts - SOUL loading with caching
- src/lib/ai/soul/injector.ts - Message injection logic
- src/components/settings/panels/AIPanel.tsx - Settings UI

Files modified:
- src/pages/Conversations.tsx - Add SOUL injection to main chat
- src/store/threadSlice.ts - Add SOUL injection to Redux flow
- src/services/api/threadApi.ts - Add SOUL injection to API layer
- src/utils/tauriCommands.ts - Add SOUL injection to Tauri commands
- src/components/settings/SettingsHome.tsx - Add AI Configuration menu
- src/pages/Settings.tsx - Add AI panel routing

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2026-03-05 17:36:18 +05:30
M3gA-Mind cc4fd44843 Merge remote-tracking branch 'upstream/develop' into feat/final-flow-check 2026-03-04 17:06:06 +05:30
cyrus de10d9f572 Merge remote-tracking branch 'upstream/develop' into develop
# Conflicts:
#	src/pages/Conversations.tsx
#	src/store/index.ts
#	src/store/threadSlice.ts
2026-03-04 14:41:30 +05:30
Mega MindandGitHub c3718d9e4f Feat/final flow check (#155)
* feat: add mnemonic recovery flow and encryption key management

- Introduced a new Mnemonic page for users to generate or import their recovery phrase.
- Updated routing to redirect users to the Mnemonic page after onboarding.
- Enhanced state management to store and retrieve AES encryption keys derived from the mnemonic.
- Added utility functions for generating and validating BIP39 mnemonic phrases.
- Updated selectors and reducers to handle encryption key state in the auth slice.
- Included new dependencies for cryptographic operations.

* feat: integrate Web3 wallet functionality and enhance state management

- Added WalletInfoSection component to display connected wallet address, network, and balance.
- Updated auth slice to manage primary wallet address derived from mnemonic.
- Enhanced SkillManager to pass wallet address as load parameters for wallet skill.
- Introduced utility function to derive EVM wallet address from mnemonic.
- Updated dependencies for cryptographic operations related to wallet functionality.

* fix: improve error handling and network selection in WalletInfoSection

- Enhanced the parsing of network data to ensure robustness against undefined values.
- Updated network selection logic to prioritize valid entries and provide a fallback.
- Improved error logging for better debugging of wallet information loading issues.
- Adjusted balance retrieval to handle cases where chain_id may be missing.

* feat: add socket event contract for Tauri integration

- Documented the socket event contract for communication between the backend and frontend in Tauri mode.
- Introduced constants for `REQUEST_ENCRYPTION_KEY` and `ENCRYPTION_KEY_EVENT` to facilitate encryption key management.
- Updated `setupTauriSocketListeners` to handle the encryption key request and response flow.

* Refactor wallet information fetching and connection status handling

- Updated `WalletInfoSection` to improve loading state management and error handling during wallet info retrieval.
- Introduced a retry mechanism for fetching wallet information with a maximum of 5 attempts.
- Enhanced connection status logic in `SkillsGrid` to treat missing authentication status as connected.
- Added a new method in `SkillManager` to set the wallet address and notify the wallet skill accordingly.

* feat: add integration token fetching and decryption functionality

- Introduced `fetchIntegrationTokens` API call to retrieve encrypted OAuth tokens for integrations.
- Implemented decryption logic for integration tokens using a provided key.
- Enhanced deep link handling to support fetching and storing integration tokens upon successful OAuth login.
- Added utility functions for hex and base64 conversions to facilitate token decryption.
- Updated `authApi.ts` and `desktopDeepLinkListener.ts` to integrate new functionality.

* refactor: move integration token encryption/decryption logic to a new utility file

- Extracted encryption and decryption functions for integration tokens into `integrationTokensCrypto.ts`.
- Removed redundant functions from `desktopDeepLinkListener.ts` to streamline the code.
- Updated deep link handling to store only the encrypted tokens instead of decrypted ones.
- Improved type definitions for integration tokens and their payloads.

* feat: enhance Gmail skill integration and state management

- Updated `SkillManager` to accept an optional access token for Gmail during OAuth completion.
- Introduced `gmailSlice` to manage Gmail user profile and emails in the Redux store.
- Implemented synchronization of Gmail skill state with the Redux store to keep user data updated.
- Refactored `SkillProvider` to handle Gmail state changes and fetch initial state from the backend.
- Adjusted deep link handling to pass decrypted access tokens for Gmail integration.
- Modified API endpoint for onboarding completion to remove the Telegram prefix.

* feat: implement Gmail metadata synchronization to backend

- Added a new utility function `syncGmailMetadataToBackend` to emit Gmail profile and email summaries to the backend via the `integration:metadata-sync` socket event.
- Updated `SkillProvider` to call the new synchronization function, ensuring Gmail skill state is sent to the backend when updated.

* refactor: update Tauri socket event handling and improve Mnemonic component typing

- Revised the Tauri socket event contract to clarify that encryption key handling is managed via the API instead of the socket.
- Removed outdated socket event constants related to encryption key requests from `tauriSocket.ts`.
- Enhanced type definitions in the `Mnemonic` component by specifying the event type for keyboard events.

* fix: update Gmail provider constant and adjust metadata synchronization logic

- Changed the constant for the Google provider from 'google' to 'gmail' for clarity.
- Commented out the email metadata synchronization logic in `syncGmailMetadataToBackend` to prevent potential issues with undefined email states.

* feat: implement Gmail metadata synchronization service

- Added a new file `metadataSync.ts` to handle the synchronization of Gmail profile and email summaries to the backend via the `integration:metadata-sync` socket event.
- Updated import paths in `SkillProvider` to reflect the new location of the Gmail metadata synchronization function.
- Enhanced type definitions for Gmail profile and email summaries to ensure proper data structure during synchronization.

* refactor: clean up code formatting and improve readability across multiple components

- Standardized import statements and formatting in various files, including `WalletInfoSection`, `AgentChatPanel`, and `SkillsPanel`.
- Enhanced readability by adjusting line breaks and spacing in JSX elements and function definitions.
- Improved consistency in the use of arrow functions and destructuring across components.
- Updated type definitions and ensured proper alignment of code for better maintainability.

* feat: enhance error handling in WalletInfoSection and improve user feedback

- Added error reporting functionality in `WalletInfoSection` to capture and enqueue errors when wallet info fails to load.
- Updated `Mnemonic` component to handle user state more robustly, ensuring encryption key is only set if the user is loaded.
- Refactored `TauriCommandsPanel` to improve string comparisons for loading states by converting to lowercase.
- Adjusted deep link handling in `desktopDeepLinkListener` to use trimmed hex values for encryption key conversion.

* fix: improve balance parsing and error handling in WalletInfoSection

- Updated balance parsing logic in `WalletInfoSection` to ensure that non-finite values default to zero.
- Enhanced error handling in `desktopDeepLinkListener` by adding error reporting for invalid encryption keys and conversion failures, improving user feedback and debugging capabilities.

* Merge remote-tracking branch 'upstream/develop' into feat/final-flow-check

* chore: update submodule URL for skills repository to use HTTPS

* chore: update skills submodule to latest commit and enhance SkillsGrid component

- Updated the skills submodule to the latest commit for improved functionality.
- Refactored `SkillsGrid` to better handle skill setup logic, ensuring accurate representation of skills with setup requirements.
- Cleaned up code formatting and improved readability in various components, including `SkillActionButton` and `desktopDeepLinkListener`.

* feat: implement Notion metadata synchronization and user profile management

- Added a new service `metadataSync.ts` to handle synchronization of Notion user metadata to the backend via the `integration:metadata-sync` socket event.
- Introduced a new Redux slice `notionSlice.ts` for managing the Notion user profile state.
- Updated `SkillProvider` to fetch and sync Notion user profile upon connection, ensuring seamless integration with the backend.
- Enhanced the store configuration to include the new Notion reducer.

* refactor: remove unnecessary console warnings in SkillProvider

- Eliminated console warnings related to Notion user retrieval errors and auto-loading skills, streamlining the logging process for better clarity and reducing noise in the console output.
- Improved code readability by cleaning up commented-out warning messages that were no longer needed.
2026-03-04 14:33:17 +05:30
M3gA-Mind 29133f7c91 refactor: remove unnecessary console warnings in SkillProvider
- Eliminated console warnings related to Notion user retrieval errors and auto-loading skills, streamlining the logging process for better clarity and reducing noise in the console output.
- Improved code readability by cleaning up commented-out warning messages that were no longer needed.
2026-03-04 04:22:13 +05:30
M3gA-Mind 7fe929414c Merge remote-tracking branch 'upstream/develop' into feat/final-flow-check 2026-03-04 02:19:57 +05:30
M3gA-Mind 3627dc1ef2 feat: implement Notion metadata synchronization and user profile management
- Added a new service `metadataSync.ts` to handle synchronization of Notion user metadata to the backend via the `integration:metadata-sync` socket event.
- Introduced a new Redux slice `notionSlice.ts` for managing the Notion user profile state.
- Updated `SkillProvider` to fetch and sync Notion user profile upon connection, ensuring seamless integration with the backend.
- Enhanced the store configuration to include the new Notion reducer.
2026-03-02 21:17:51 +05:30
6acdfef488 Implement hybrid local/API thread storage with message persistence (#154)
* feat: add .mcp.json for MCP server configuration

- Introduced `.mcp.json` with server details for managing MCP integrations
- Defines `readme` server with HTTP type and URL endpoint configuration

* fix: Update skills submodule with Telegram error handling improvements

- Fixed setup flow showing false success when TDLib errors occurred
- Improved async error handling in setup steps
- Added client reset mechanisms for error recovery
- Enhanced error messaging for better user experience
- Cleaned up excessive debug logging while maintaining error logs

Resolves issue where Telegram setup showed success modal despite underlying TDLib errors.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>

* Add daemon lifecycle management system to frontend UI

This implementation integrates the Rust daemon's health monitoring and lifecycle management into the React frontend. Key features include real-time health indicators, automatic start/error recovery, and detailed control panels, enhancing both user experience and operational reliability.

* Enhance daemon health monitoring with detailed logging, event tracking, and state management improvements.

* Add extensive logging for Tauri socket lifecycle and event listeners

This update improves troubleshooting and debugging by adding detailed logs throughout Tauri socket initialization, event listener setup, and error handling processes.

* Define global Tauri interface types in TypeScript

* Fix daemon service management and health communication issues

This comprehensive fix resolves two critical daemon-related issues:

1. **Launchctl "Input/output error" fix**:
   - Add intelligent state checking before service operations
   - Only load LaunchAgent if not already loaded
   - Treat "already running" as success, not failure
   - Add helper functions for cross-platform service state detection
   - Implement idempotent service start operations

2. **Daemon health communication fix**:
   - Add ALPHAHUMAN_DAEMON_INTERNAL environment variable to external service plist
   - Force external daemon to use file-based communication (daemon_state.json)
   - Implement file watching bridge in main app to emit Tauri events
   - Ensure frontend receives proper health updates from external daemon

**Key Changes**:
- Enhanced `start()` function with state checking across all platforms
- Added `is_service_loaded_macos()`, `is_service_enabled_linux()`, `is_task_exists_windows()`
- Modified macOS plist to include `ALPHAHUMAN_DAEMON_INTERNAL=false`
- Added `watch_daemon_health_file()` function for external daemon communication
- Updated daemon mode detection logic for cross-platform consistency
- Added comprehensive logging for service management operations

**Expected Results**:
- No more "Input/output error" when clicking daemon start button
- External daemon status shows "connected" instead of "disconnected"
- Idempotent service operations (safe to run multiple times)
- Single daemon process prevents resource conflicts
- Cross-platform daemon service reliability

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>

* Add `ALPHAHUMAN_DAEMON_INTERNAL` env variable to configuration documentation

* Optimize imports in `TauriCommandsPanel.tsx` by removing unused variables and adding necessary hooks.

* Add OAuth login support with configurable provider types and UI components

This update introduces OAuth login functionality, including support for multiple providers (Google, GitHub, Twitter, Discord). Added reusable components for provider buttons and a login section, along with styled configurations and type definitions. Includes enhancements for token handling and updated login flows.

* Add OAuth debug mode support for development environments

Introduce `IS_DEV` checks to enable OAuth debug mode, allowing detailed logging and adjustable OAuth URLs with debug parameters during development.

* Implement hybrid local/API thread storage with message persistence

- Add local-first thread and message storage using Redux Persist
- Persist threads, messages, and UI state (panelWidth, lastViewedAt, selectedThreadId) locally
- Remove API dependencies for thread/message fetching (fetchThreads, fetchThreadMessages)
- Add local thread management actions (createThreadLocal, deleteThreadLocal, addMessageLocal)
- Fix message persistence issue: ensure both user and AI messages survive navigation
- Maintain API integration for sendMessage functionality with AI responses
- Preserve optimistic updates and error handling behavior
- Enable instant app startup and offline conversation viewing

Key changes:
- Enhanced threadSlice with messagesByThreadId storage and local management actions
- Updated Redux persist config to include thread data
- Modified Conversations component to use local thread operations
- Fixed addInferenceResponse to persist preceding user messages
- Maintained all existing UI patterns and error states

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>

---------

Co-authored-by: Claude <noreply@anthropic.com>
2026-03-02 18:13:01 +03:00
M3gA-Mind fef36f963d chore: update skills submodule to latest commit and enhance SkillsGrid component
- Updated the skills submodule to the latest commit for improved functionality.
- Refactored `SkillsGrid` to better handle skill setup logic, ensuring accurate representation of skills with setup requirements.
- Cleaned up code formatting and improved readability in various components, including `SkillActionButton` and `desktopDeepLinkListener`.
2026-03-02 20:13:05 +05:30
cyrusandClaude 70d9ff128d Implement hybrid local/API thread storage with message persistence
- Add local-first thread and message storage using Redux Persist
- Persist threads, messages, and UI state (panelWidth, lastViewedAt, selectedThreadId) locally
- Remove API dependencies for thread/message fetching (fetchThreads, fetchThreadMessages)
- Add local thread management actions (createThreadLocal, deleteThreadLocal, addMessageLocal)
- Fix message persistence issue: ensure both user and AI messages survive navigation
- Maintain API integration for sendMessage functionality with AI responses
- Preserve optimistic updates and error handling behavior
- Enable instant app startup and offline conversation viewing

Key changes:
- Enhanced threadSlice with messagesByThreadId storage and local management actions
- Updated Redux persist config to include thread data
- Modified Conversations component to use local thread operations
- Fixed addInferenceResponse to persist preceding user messages
- Maintained all existing UI patterns and error states

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2026-03-02 16:20:15 +05:30
cyrus 5cd8193cd6 Merge remote-tracking branch 'upstream/develop' into develop 2026-03-02 15:31:24 +05:30
M3gA-Mind 66b67c8482 chore: update submodule URL for skills repository to use HTTPS 2026-03-02 14:33:40 +05:30
M3gA-Mind 842f099c3c Merge remote-tracking branch 'upstream/develop' into feat/final-flow-check 2026-03-02 13:58:14 +05:30
2c64761b21 Oauth logins added (#153)
* feat: add .mcp.json for MCP server configuration

- Introduced `.mcp.json` with server details for managing MCP integrations
- Defines `readme` server with HTTP type and URL endpoint configuration

* fix: Update skills submodule with Telegram error handling improvements

- Fixed setup flow showing false success when TDLib errors occurred
- Improved async error handling in setup steps
- Added client reset mechanisms for error recovery
- Enhanced error messaging for better user experience
- Cleaned up excessive debug logging while maintaining error logs

Resolves issue where Telegram setup showed success modal despite underlying TDLib errors.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>

* Add daemon lifecycle management system to frontend UI

This implementation integrates the Rust daemon's health monitoring and lifecycle management into the React frontend. Key features include real-time health indicators, automatic start/error recovery, and detailed control panels, enhancing both user experience and operational reliability.

* Enhance daemon health monitoring with detailed logging, event tracking, and state management improvements.

* Add extensive logging for Tauri socket lifecycle and event listeners

This update improves troubleshooting and debugging by adding detailed logs throughout Tauri socket initialization, event listener setup, and error handling processes.

* Define global Tauri interface types in TypeScript

* Fix daemon service management and health communication issues

This comprehensive fix resolves two critical daemon-related issues:

1. **Launchctl "Input/output error" fix**:
   - Add intelligent state checking before service operations
   - Only load LaunchAgent if not already loaded
   - Treat "already running" as success, not failure
   - Add helper functions for cross-platform service state detection
   - Implement idempotent service start operations

2. **Daemon health communication fix**:
   - Add ALPHAHUMAN_DAEMON_INTERNAL environment variable to external service plist
   - Force external daemon to use file-based communication (daemon_state.json)
   - Implement file watching bridge in main app to emit Tauri events
   - Ensure frontend receives proper health updates from external daemon

**Key Changes**:
- Enhanced `start()` function with state checking across all platforms
- Added `is_service_loaded_macos()`, `is_service_enabled_linux()`, `is_task_exists_windows()`
- Modified macOS plist to include `ALPHAHUMAN_DAEMON_INTERNAL=false`
- Added `watch_daemon_health_file()` function for external daemon communication
- Updated daemon mode detection logic for cross-platform consistency
- Added comprehensive logging for service management operations

**Expected Results**:
- No more "Input/output error" when clicking daemon start button
- External daemon status shows "connected" instead of "disconnected"
- Idempotent service operations (safe to run multiple times)
- Single daemon process prevents resource conflicts
- Cross-platform daemon service reliability

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>

* Add `ALPHAHUMAN_DAEMON_INTERNAL` env variable to configuration documentation

* Optimize imports in `TauriCommandsPanel.tsx` by removing unused variables and adding necessary hooks.

* Add OAuth login support with configurable provider types and UI components

This update introduces OAuth login functionality, including support for multiple providers (Google, GitHub, Twitter, Discord). Added reusable components for provider buttons and a login section, along with styled configurations and type definitions. Includes enhancements for token handling and updated login flows.

* Add OAuth debug mode support for development environments

Introduce `IS_DEV` checks to enable OAuth debug mode, allowing detailed logging and adjustable OAuth URLs with debug parameters during development.

---------

Co-authored-by: Claude <noreply@anthropic.com>
2026-02-28 10:55:19 +03:00
cyrus 09a6d332d6 Add OAuth debug mode support for development environments
Introduce `IS_DEV` checks to enable OAuth debug mode, allowing detailed logging and adjustable OAuth URLs with debug parameters during development.
2026-02-27 22:16:06 +05:30
cyrus 1ee2f653ec Add OAuth login support with configurable provider types and UI components
This update introduces OAuth login functionality, including support for multiple providers (Google, GitHub, Twitter, Discord). Added reusable components for provider buttons and a login section, along with styled configurations and type definitions. Includes enhancements for token handling and updated login flows.
2026-02-27 20:01:47 +05:30
cyrus 6a1fe574b2 Merge remote-tracking branch 'origin/feat/daemon-setup' into develop
# Conflicts:
#	src/components/settings/panels/TauriCommandsPanel.tsx
2026-02-27 17:57:17 +05:30
cyrus 6d5613a2de Optimize imports in TauriCommandsPanel.tsx by removing unused variables and adding necessary hooks. 2026-02-27 13:25:44 +05:30
cyrus 2e30b4587f Merge remote-tracking branch 'upstream/develop' into develop 2026-02-27 13:18:14 +05:30
fb4a88867a feat: self evolving skills (#150)
* feat(skills): extend GenerateSkillSpec with full_index_js and update generator

- Add optional `full_index_js` field to GenerateSkillSpec so LLM-generated
  JS source can be written verbatim instead of using the default template
- Change generate_alphahuman() return type from PathBuf to Vec<PathBuf>
  (returns both manifest.json and index.js paths for audit logging)
- Add UnifiedSkillRegistry::skills_dir() and engine() helper accessors
  needed by the self-evolve orchestrator

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

* feat(skills): add isolated QuickJS skill tester with mock bridge globals

Introduces SkillTester::run_isolated() which spins up a fresh rquickjs
context (no shared state), injects no-op mock globals for all bridge APIs
(db, net, state, platform, cron, skills), loads index.js, and calls
init/start plus each tool's execute() with empty args.

The test passes only if every exported tool returns without throwing and
produces valid output. Used by the self-evolve loop to validate generated
code before registering it into the live registry.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

* feat(skills): add LLM code generator using Anthropic Claude API

Introduces LlmGenerator with two methods:
- generate_spec(task): first-pass generation from a natural-language task
  description; produces a complete GenerateSkillSpec including full_index_js
- fix_spec(task, prev_code, error): retry pass that feeds the previous
  code and the test error back to the model for correction

Uses claude-3-5-haiku-20241022 via direct reqwest POST to the Anthropic
messages API. System prompt teaches the model the exact QuickJS index.js
format, available bridge globals, and synchronous net.fetch semantics.
Strips markdown code fences from the response before use.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

* feat(skills): add self-evolve orchestrator with iteration loop and audit log

Introduces SkillEvolver::evolve() which implements the full pipeline:
  1. LLM generates a GenerateSkillSpec from a task description
  2. generator::generate_alphahuman() writes manifest.json + index.js
  3. SkillTester::run_isolated() validates the code in a fresh sandbox
  4. On failure: feed error back to LLM and regenerate (up to max_iterations)
  5. On success: discover_skills() + start_skill() to register live, then
     execute() to run the real task and capture final output
  6. Returns SelfEvolveResult with full audit log, files_created, and
     the final UnifiedSkillResult

Wraps the entire evolve() call in tokio::time::timeout (default 120s).
Cleans up written skill directory on permanent failure so no partial
skill is left registered.

Key types:
  SelfEvolveRequest  — task_description, max_iterations, timeout_secs,
                       optional anthropic_api_key override
  SelfEvolveResult   — skill_id, success, iterations_used, audit_log,
                       files_created, final_result, failure_reason
  IterationLog       — per-iteration code, test output, pass/fail flag

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

* feat(tauri): register unified_self_evolve_skill command with progress events

Adds unified_self_evolve_skill Tauri command that:
- Accepts a SelfEvolveRequest (task_description + optional limits)
- Emits skill:evolve:progress event after each iteration so the frontend
  can show live progress without polling
- Delegates to SkillEvolver::evolve() and returns SelfEvolveResult
- Mobile stub returns an informative error (feature requires desktop runtime)

Registers the command in generate_handler![] in lib.rs.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

* feat(ui): add SelfEvolveModal and Auto-Generate button to SkillsGrid

SelfEvolveModal (src/components/skills/SelfEvolveModal.tsx):
- createPortal modal with 4 states: idle / running / success / failed
- Text input for natural-language task description
- Calls unified_self_evolve_skill via invoke() on submit
- Subscribes to skill:evolve:progress Tauri events to show live iteration
  updates (iteration number, pass/fail indicator)
- On success: displays audit log accordion with per-iteration code,
  test output, and final task result
- On failure: shows failure reason and full audit trail for debugging
- Calls onSkillCreated() callback to trigger grid refresh

SkillsGrid changes:
- Add selfEvolveOpen state + "Auto-Generate" button in the toolbar
- Extract refreshSkills as a named async function reused by both the
  initial load and the SelfEvolveModal's onSkillCreated callback
- Add activeSkillType state so SkillSetupModal shows the correct badge
  when opened from either the Connect or Manage flow

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

* fix(skills): fix alphahuman skill template and generation pipeline

- generator.rs: use bare `tools = []` (not const) for globalThis access,
  add `execute: async function(args)` method, fix `input_schema` casing
- mod.rs: call start_skill() after generate() so skills are immediately executable
- llm_generator.rs: update model to claude-haiku-4-5-20251001, sync system prompt

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

* fix(skills): fix tools not loading for generated skills and add robustness fixes

- llm_generator: require 'var tools = [...]' in system prompt (const/let are
  block-scoped and do not attach to globalThis, causing extract_tools() to find
  an empty array in the production QuickJS engine)
- llm_generator: add smart_name() — deterministic display name from task
  description (strips preambles + lead fillers + stop words, title-cases 3
  tokens); replaces brittle LLM-dependent naming
- llm_generator: improve sandbox testing rules in system prompt so placeholder
  values prevent test failures when net.fetch returns empty JSON
- skill_tester: detect {error: '...'} return values as test failures (both sync
  and Promise paths) so the iteration loop attempts a fix instead of treating
  them as success
- manager.ts: dispatch setSkillSetupComplete(true) for skills without a setup
  flow so deriveConnectionStatus() returns "connected" instead of "connecting"

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

---------

Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-02-26 19:58:42 +04:00
694dcfe3cc Feat/openclaw work - #131 (#151)
* feat: add initial project structure and documentation

- Introduced the GNU General Public License (GPL) v3 in LICENSE file.
- Added MCP configuration in .claude/mcp.json for server integration.
- Created architecture documentation in docs/ARCHITECTURE.md outlining the platform's design and components.
- Defined MVP specifications in docs/MVP.md for the Telegram-based Agent Assistant.
- Established API reference for team management in docs/teams-api-reference.md.
- Set up basic HTML structure in public/index.html and added logo image in public/logo.png.

* feat: add initial project documentation and HTML structure

- Introduced CODE_OF_CONDUCT.md to establish community guidelines and standards for behavior.
- Created CONTRIBUTING.md to outline contribution process, development setup, and project conventions.
- Added SECURITY.md to define the security policy, supported versions, and reporting procedures for vulnerabilities.
- Established basic HTML structure in index.html for the application interface.

* chore: remove hello-python skill files

- Deleted skill.json and skill.py files for the Hello Python example runtime skill, as they are no longer needed in the project.

* feat: port tinyhuman agent runtime from ZeroClaw into Tauri backend

Port daemon supervisor, health registry, security (policy, secrets, audit,
pairing), agent traits, and config modules from ZeroClaw (MIT) into a new
tinyhuman/ module under src-tauri/src/. The daemon auto-starts on desktop
and shuts down gracefully on app exit via CancellationToken.

- health: global HealthRegistry with component tracking and JSON snapshots
- security/policy: SecurityPolicy with command validation, risk levels, rate limiting
- security/secrets: ChaCha20-Poly1305 SecretStore with legacy XOR migration
- security/audit: AuditLogger with JSON-line events and log rotation
- security/pairing: PairingGuard with brute-force protection and SHA-256 hashing
- security/traits: Sandbox trait + NoopSandbox
- config: minimal DaemonConfig with autonomy, reliability, secrets, audit sub-configs
- daemon: supervisor with health state writer emitting Tauri events
- agent/traits: Provider, Tool, Memory, Observer, RuntimeAdapter traits + Noop impls
- commands/tinyhuman: Tauri commands for health, security policy, encrypt/decrypt
- 185 inline unit tests across all modules
- README updated with custom inference/tunneling/memory positioning

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* feat: update README to reflect AlphaHuman Mk1 branding and enhanced description

- Changed project title to "AlphaHuman Mk1" for clarity.
- Revised project description to emphasize user-friendly AI capabilities and the use of the Neocortex Mk1 model.
- Removed outdated sections on custom inference, tunneling, and memory, streamlining the content for better readability.

* update readme

* Port zeroclaw runtime into tinyhuman

* Replace CLI mentions with UI language

* Split gateway module into smaller units

* Split channels and config schema modules

* Fix tinyhuman build, tests, and tunnel integration

* feat(tinyhuman): add missing modules and ui-friendly services

* refactor: rename tinyhuman to alphahuman

* chore: remove bottom text from Welcome component

* feat(settings): add tauri command console

* feat(daemon): enhance daemon mode handling and integrate rustls with ring feature

* feat(settings): implement comprehensive configuration management in TauriCommandsPanel

* refactor(TauriCommandsPanel): streamline error handling and enhance async function usage

* feat(settings): add skill management functionality to TauriCommandsPanel

* style(TauriCommandsPanel): update input styles for improved readability and user experience

* feat(settings): add Skills and Agent Chat panels with navigation and integration management

* feat(settings): implement browser access management in SkillsPanel and enhance AgentChatPanel with local storage functionality

* Implement inference API integration in Conversations component

- Added inference API service to handle chat completions and model management.
- Updated Conversations component to fetch available models on mount and allow model selection.
- Enhanced message sending functionality to utilize the inference API for generating responses.
- Introduced state management for loading models and handling errors during API calls.
- Refactored optimistic message handling and send status management for improved user experience.

---------

Co-authored-by: Steven Enamakel <enamakel@vezures.xyz>
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
Co-authored-by: Steven Enamakel <31011319+senamakel@users.noreply.github.com>
2026-02-26 19:58:21 +04:00
ca11b001c8 feat: comprehensive Tauri Command Console redesign with runtime panic fixes (#136)
* feat: add .mcp.json for MCP server configuration

- Introduced `.mcp.json` with server details for managing MCP integrations
- Defines `readme` server with HTTP type and URL endpoint configuration

* fix: Update skills submodule with Telegram error handling improvements

- Fixed setup flow showing false success when TDLib errors occurred
- Improved async error handling in setup steps
- Added client reset mechanisms for error recovery
- Enhanced error messaging for better user experience
- Cleaned up excessive debug logging while maintaining error logs

Resolves issue where Telegram setup showed success modal despite underlying TDLib errors.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>

* feat: comprehensive redesign of Tauri Command Console

Transform 845-line admin interface into premium crypto-styled experience:

- Complete architectural redesign with 6 logical categories
- Premium card system with priority-based styling (Ocean blue, Slate, Amber)
- Progressive disclosure system (Basic → Advanced → Developer modes)
- Contextual descriptions for all 60+ form fields
- Responsive design with desktop grid and mobile accordion
- 100% functionality preservation while dramatically improving UX

Categories reorganized:
• System Configuration (Critical - API keys, model settings)
• Runtime & Execution (Critical - V8 engine, skills, services)
• Security & Data (Critical - encryption, integrations)
• Network & Infrastructure (Infrastructure - gateway, tunnels, memory)
• Development & Operations (Development - diagnostics, hardware)
• Interactive Tools (Tools - agent chat, output console)

Components added:
- SectionCard: Priority-based collapsible sections
- InputGroup: Consistent form field organization
- ActionPanel: Enhanced action buttons with loading states

Features:
- Smart progressive disclosure with user preference memory
- Contextually accurate field descriptions and guidance
- Professional typography using Cabinet Grotesk and Inter
- Sophisticated color gradients matching crypto aesthetic
- Mobile-responsive accordion behavior
- Accessibility improvements with proper ARIA labeling

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>

* refactor: remove tooltips and reposition descriptions in Tauri Commands Panel

- Remove tooltip system entirely from InputGroup components
- Move full descriptions directly below labels instead of after input fields
- Improve spacing and readability throughout interface
- Delete unused Tooltip component and textUtils utilities
- Enhance Field and CheckboxField components with better typography

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>

* style: improve spacing and layout in Tauri Commands Panel

- Enhance spacing between sections and components for better readability
- Improve grid gaps and padding throughout the interface
- Refine ActionPanel and SectionCard component spacing
- Better organize skills display with improved item spacing
- Polish overall visual hierarchy and component alignment

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>

* feat: implement comprehensive UI consistency for Tauri Command Console

- Replace all white backgrounds with sophisticated dark theme styling
- Update input fields with bg-stone-900/40 and proper focus states
- Implement custom button system replacing DaisyUI dependencies
- Apply consistent glass morphism patterns throughout interface
- Enhance checkbox and form component styling for better integration
- Fix textarea elements with proper dark theme colors and borders
- Add professional hover states and accessibility improvements
- Achieve perfect visual consistency with Intelligence and Skills pages

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>

* feat: implement accordion pattern for System Configuration, Runtime & Execution, and Security & Data sections

- Convert three critical sections to use collapsible accordion pattern
- Add isSectionVisible() conditional wrappers for progressive disclosure
- Change collapsible={false} to collapsible={true} for all three sections
- Add defaultExpanded={!isCollapsed()} for consistent state management
- Fix section ID consistency in getSectionVisibility() function
- Maintain all existing functionality and content
- Provide consistent UX matching Network & Infrastructure pattern

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>

* style: standardize all sections with Network & Infrastructure color scheme

- Change all priority values to "infrastructure" for visual consistency
- System Configuration: priority="critical" → "infrastructure"
- Runtime & Execution: priority="critical" → "infrastructure"
- Security & Data: priority="critical" → "infrastructure"
- Development & Operations: priority="development" → "infrastructure"
- Interactive Tools: priority="tools" → "infrastructure"

All sections now use unified slate gradient backgrounds and icon colors
for a cohesive, professional appearance throughout the interface.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>

* fix: resolve JSX syntax error in Interactive Tools section

- Fix extra '>' character in ChatBubbleLeftRightIcon icon prop
- Corrects TypeScript compilation error on line 1050
- Ensures proper JSX syntax for SectionCard component

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>

* feat: remove view mode selector and always show all 6 sections

- Remove view mode state and selector UI (basic/advanced/developer)
- Always show all sections: System Configuration, Runtime & Execution, Security & Data, Network & Infrastructure, Development & Operations, Interactive Tools
- All sections start expanded by default for immediate access
- Simplify section visibility logic to always return true
- Keep loading indicator positioned on the right
- Improve UX by removing unnecessary progressive disclosure

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>

* fix: resolve runtime panic and infinite loading in Test Connection

- Fixed "Cannot drop a runtime in a context where blocking is not allowed" panic
- Implemented Handle::try_current() pattern in TDLib manager and skills bridge
- Added runtime safety utilities with proper async execution patterns
- Fixed ownership issues with request_rx and future parameters
- Added timeout protection to config loading operations
- Enhanced error handling for runtime creation conflicts
- Resolved compilation errors with proper variable cloning

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>

* feat: enhance Tauri Commands Panel with comprehensive validation system

- Added ValidatedField component with real-time validation and visual feedback
- Implemented provider-specific smart defaults and URL auto-population
- Enhanced Test Connection with proper timeout and error handling
- Added change tracking with unsaved changes indicator
- Improved field validation for API keys, URLs, providers, models, and temperature
- Enhanced ActionPanel and SectionCard with loading states and change indicators
- Added provider configuration system with model suggestions
- Implemented comprehensive error handling with field-specific feedback

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>

* chore: update skills submodule with dependency updates

---------

Co-authored-by: Claude <noreply@anthropic.com>
2026-02-26 19:56:51 +04:00
9e26a9525a Fix/api endpoints alignment (#149)
* feat: add .mcp.json for MCP server configuration

- Introduced `.mcp.json` with server details for managing MCP integrations
- Defines `readme` server with HTTP type and URL endpoint configuration

* fix: Update skills submodule with Telegram error handling improvements

- Fixed setup flow showing false success when TDLib errors occurred
- Improved async error handling in setup steps
- Added client reset mechanisms for error recovery
- Enhanced error messaging for better user experience
- Cleaned up excessive debug logging while maintaining error logs

Resolves issue where Telegram setup showed success modal despite underlying TDLib errors.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>

* fix: align frontend API endpoints with backend specification

- Fix thread API endpoints by removing incorrect /telegram prefix
- Fix user settings endpoint path
- Add missing API services: settings, actionable items, credits, feedback, API keys
- Ensure all endpoints match backend OpenAPI specification

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>

* Refactor MCP server configuration structure

Updated the MCP configuration to use "alphaHuman" as the key instead of "readme" for clarity and consistency. This change ensures better alignment with naming conventions and improves readability.

---------

Co-authored-by: Claude <noreply@anthropic.com>
2026-02-26 19:56:25 +04:00
b037627d84 Feat/daemon setup (#148)
* feat: add .mcp.json for MCP server configuration

- Introduced `.mcp.json` with server details for managing MCP integrations
- Defines `readme` server with HTTP type and URL endpoint configuration

* fix: Update skills submodule with Telegram error handling improvements

- Fixed setup flow showing false success when TDLib errors occurred
- Improved async error handling in setup steps
- Added client reset mechanisms for error recovery
- Enhanced error messaging for better user experience
- Cleaned up excessive debug logging while maintaining error logs

Resolves issue where Telegram setup showed success modal despite underlying TDLib errors.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>

* Add daemon lifecycle management system to frontend UI

This implementation integrates the Rust daemon's health monitoring and lifecycle management into the React frontend. Key features include real-time health indicators, automatic start/error recovery, and detailed control panels, enhancing both user experience and operational reliability.

* Enhance daemon health monitoring with detailed logging, event tracking, and state management improvements.

* Add extensive logging for Tauri socket lifecycle and event listeners

This update improves troubleshooting and debugging by adding detailed logs throughout Tauri socket initialization, event listener setup, and error handling processes.

* Define global Tauri interface types in TypeScript

* Fix daemon service management and health communication issues

This comprehensive fix resolves two critical daemon-related issues:

1. **Launchctl "Input/output error" fix**:
   - Add intelligent state checking before service operations
   - Only load LaunchAgent if not already loaded
   - Treat "already running" as success, not failure
   - Add helper functions for cross-platform service state detection
   - Implement idempotent service start operations

2. **Daemon health communication fix**:
   - Add ALPHAHUMAN_DAEMON_INTERNAL environment variable to external service plist
   - Force external daemon to use file-based communication (daemon_state.json)
   - Implement file watching bridge in main app to emit Tauri events
   - Ensure frontend receives proper health updates from external daemon

**Key Changes**:
- Enhanced `start()` function with state checking across all platforms
- Added `is_service_loaded_macos()`, `is_service_enabled_linux()`, `is_task_exists_windows()`
- Modified macOS plist to include `ALPHAHUMAN_DAEMON_INTERNAL=false`
- Added `watch_daemon_health_file()` function for external daemon communication
- Updated daemon mode detection logic for cross-platform consistency
- Added comprehensive logging for service management operations

**Expected Results**:
- No more "Input/output error" when clicking daemon start button
- External daemon status shows "connected" instead of "disconnected"
- Idempotent service operations (safe to run multiple times)
- Single daemon process prevents resource conflicts
- Cross-platform daemon service reliability

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>

* Add `ALPHAHUMAN_DAEMON_INTERNAL` env variable to configuration documentation

---------

Co-authored-by: Claude <noreply@anthropic.com>
2026-02-26 19:55:53 +04:00
793b54ebf5 feat(skills): show skill type badge in manage modal header (#147)
Pass skill_type through to SkillSetupModal and render an alphahuman/openclaw
badge next to the title in the modal header, consistent with the grid badges.

Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-02-26 19:55:33 +04:00
cyrus a36f64b4dc Merge remote-tracking branch 'upstream/develop' into develop 2026-02-25 16:47:10 +05:30
cyrus 5d9fa84605 Add ALPHAHUMAN_DAEMON_INTERNAL env variable to configuration documentation 2026-02-25 16:32:15 +05:30
cyrusandClaude 73d010efc7 Fix daemon service management and health communication issues
This comprehensive fix resolves two critical daemon-related issues:

1. **Launchctl "Input/output error" fix**:
   - Add intelligent state checking before service operations
   - Only load LaunchAgent if not already loaded
   - Treat "already running" as success, not failure
   - Add helper functions for cross-platform service state detection
   - Implement idempotent service start operations

2. **Daemon health communication fix**:
   - Add ALPHAHUMAN_DAEMON_INTERNAL environment variable to external service plist
   - Force external daemon to use file-based communication (daemon_state.json)
   - Implement file watching bridge in main app to emit Tauri events
   - Ensure frontend receives proper health updates from external daemon

**Key Changes**:
- Enhanced `start()` function with state checking across all platforms
- Added `is_service_loaded_macos()`, `is_service_enabled_linux()`, `is_task_exists_windows()`
- Modified macOS plist to include `ALPHAHUMAN_DAEMON_INTERNAL=false`
- Added `watch_daemon_health_file()` function for external daemon communication
- Updated daemon mode detection logic for cross-platform consistency
- Added comprehensive logging for service management operations

**Expected Results**:
- No more "Input/output error" when clicking daemon start button
- External daemon status shows "connected" instead of "disconnected"
- Idempotent service operations (safe to run multiple times)
- Single daemon process prevents resource conflicts
- Cross-platform daemon service reliability

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2026-02-25 16:31:51 +05:30
2876f4468e Feat/zeroclaw x alphahuman (#140)
* feat(runtime): add skill_type to SkillManifest for unified registry

Add optional skill_type field (alphahuman | openclaw) with serde default
'alphahuman' so existing manifest.json files remain valid. Enables
type-based dispatch in the unified skill system.

* feat(runtime): add UnifiedSkillEntry and UnifiedSkillResult types

UnifiedSkillEntry provides a common interface for both alphahuman (QuickJS)
and openclaw (SKILL.md/TOML) skills: id, name, skill_type, version,
description, status, tools. UnifiedSkillResult standardizes execution
responses (skill_id, tool_name, content, is_error, executed_at) and is
MCP-spec compatible for content blocks.

* feat(runtime): expose skills_source_dir() on RuntimeEngine

Public getter for the skill source directory so the unified skill
generator can write new alphahuman skills (manifest.json + index.js)
to the same directory the runtime discovers skills from.

* feat(skills): add unified skill registry, openclaw executor, generator

- UnifiedSkillRegistry: merges alphahuman (RuntimeEngine::discover_skills)
  and openclaw (load_skills from ~/.alphahuman/workspace/skills/), dispatches
  execute by skill_type, supports generate from GenerateSkillSpec.
- openclaw_executor: runs SKILL.toml tools via shell (sh -c) or http
  (reqwest), returns SKILL.md prompt as text when no tools;  interpolation.
- generator: generate_alphahuman writes manifest.json + index.js to skills dir;
  generate_openclaw writes SKILL.md or SKILL.toml to workspace/skills/<name>/.

* feat(commands): add Tauri commands for unified skill API

- unified_list_skills: returns Vec<UnifiedSkillEntry> (alphahuman + openclaw).
- unified_execute_skill: dispatches by skill_type to QuickJS or openclaw
  executor, returns UnifiedSkillResult.
- unified_generate_skill: generates skill from spec, returns new UnifiedSkillEntry.
Desktop implementations use UnifiedSkillRegistry; mobile stubs return
empty/error (QuickJS not available on Android/iOS).

* feat(tauri): register unified skill commands in generate_handler

Wire unified_list_skills, unified_execute_skill, and unified_generate_skill
into both desktop and mobile generate_handler![] blocks so the frontend
can invoke them via Tauri IPC.

* feat(skills): add skill_type to frontend skill types

- SkillManifest (lib/skills/types.ts): optional skill_type 'alphahuman' | 'openclaw'.
- SkillListEntry (skills/shared.tsx): same for list entries so the grid
  can show type badges and handle openclaw vs alphahuman differently if needed.

* feat(SkillsGrid): use unified registry, type badges, generate button

- Load skills via unified_list_skills (fallback to runtime_discover_skills
  when unavailable, e.g. mobile).
- Show SkillTypeBadge per row: blue for alphahuman, purple for openclaw.
- Add Generate button that calls unified_generate_skill with a demo
  alphahuman spec and refreshes the list so the new skill appears.

* feat(skills): unified skill registry with security hardening and PR fixes

- Add UnifiedSkillRegistry merging alphahuman (QuickJS) and openclaw (SKILL.md/TOML) skill types
- Add three Tauri commands: unified_list_skills, unified_execute_skill, unified_generate_skill
- Add skill_type field to SkillManifest and UnifiedSkillEntry
- Add SkillTypeBadge (blue=alphahuman, sage=openclaw) and Generate button in SkillsGrid

Security fixes from PR review:
- Fix shell injection in openclaw_executor: POSIX single-quote escaping + 30s timeout
- Fix SSRF in run_http_tool: URL scheme validation + DNS resolution + private IP blocking
- Add EscapeContext enum (Shell/Url/None) for context-aware arg interpolation

Generator fixes:
- Guard sanitize_id empty result with early Err in generate_alphahuman/generate_openclaw
- Fix JS description embedding via serde_json::to_string (proper newline/backslash escaping)
- Fix sanitize_fn_name to prepend _ when result starts with digit
- Replace manual TOML format! with serde structs + toml::to_string for correct escaping

Frontend fixes:
- Extract normalizeUnifiedEntry helper shared by initial load and post-generate refresh
- Replace hardcoded hasSetup/ignoreInProduction in refreshed mapping with data-driven values
- Use SkillType alias centralising 'alphahuman' | 'openclaw' union in types.ts and shared.tsx
- Fix SkillTypeBadge colors to approved palette (sage) and radius token (rounded-md)

Nitpick: remove status from UnifiedSkillEntry (frontend derives status from Redux)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

---------

Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-02-25 10:43:49 +04:00
cyrus 4edf2f5b8c Define global Tauri interface types in TypeScript 2026-02-23 18:40:49 +05:30
cyrus 8616ff0c31 Add extensive logging for Tauri socket lifecycle and event listeners
This update improves troubleshooting and debugging by adding detailed logs throughout Tauri socket initialization, event listener setup, and error handling processes.
2026-02-23 18:38:19 +05:30
M3gA-Mind 138983acdf fix: improve balance parsing and error handling in WalletInfoSection
- Updated balance parsing logic in `WalletInfoSection` to ensure that non-finite values default to zero.
- Enhanced error handling in `desktopDeepLinkListener` by adding error reporting for invalid encryption keys and conversion failures, improving user feedback and debugging capabilities.
2026-02-23 18:36:46 +05:30
cyrus f379cbc30f Enhance daemon health monitoring with detailed logging, event tracking, and state management improvements. 2026-02-23 18:01:35 +05:30
M3gA-Mind 2bfdfbf6fd feat: enhance error handling in WalletInfoSection and improve user feedback
- Added error reporting functionality in `WalletInfoSection` to capture and enqueue errors when wallet info fails to load.
- Updated `Mnemonic` component to handle user state more robustly, ensuring encryption key is only set if the user is loaded.
- Refactored `TauriCommandsPanel` to improve string comparisons for loading states by converting to lowercase.
- Adjusted deep link handling in `desktopDeepLinkListener` to use trimmed hex values for encryption key conversion.
2026-02-23 17:52:56 +05:30
cyrus a6eeb00e88 Add daemon lifecycle management system to frontend UI
This implementation integrates the Rust daemon's health monitoring and lifecycle management into the React frontend. Key features include real-time health indicators, automatic start/error recovery, and detailed control panels, enhancing both user experience and operational reliability.
2026-02-23 16:05:27 +05:30
cyrus 221889a291 Merge remote-tracking branch 'upstream/develop' into develop 2026-02-23 14:57:16 +05:30
M3gA-Mind 23d21667e2 refactor: clean up code formatting and improve readability across multiple components
- Standardized import statements and formatting in various files, including `WalletInfoSection`, `AgentChatPanel`, and `SkillsPanel`.
- Enhanced readability by adjusting line breaks and spacing in JSX elements and function definitions.
- Improved consistency in the use of arrow functions and destructuring across components.
- Updated type definitions and ensured proper alignment of code for better maintainability.
2026-02-23 14:39:09 +05:30
M3gA-Mind b6810429c4 Merge remote-tracking branch 'upstream/develop' into feat/cryto-encryption 2026-02-23 14:38:25 +05:30
M3gA-Mind 497d3414df feat: implement Gmail metadata synchronization service
- Added a new file `metadataSync.ts` to handle the synchronization of Gmail profile and email summaries to the backend via the `integration:metadata-sync` socket event.
- Updated import paths in `SkillProvider` to reflect the new location of the Gmail metadata synchronization function.
- Enhanced type definitions for Gmail profile and email summaries to ensure proper data structure during synchronization.
2026-02-23 14:35:47 +05:30
Steven Enamakel 427250e84a style: update README with branded social media links
- Replaced text links for Discord, Reddit, and Twitter/X with visually appealing badge-style links for improved aesthetics and user engagement.
2026-02-21 21:08:47 +04:00
Steven Enamakel a03a035246 refactor: update README to reflect branding changes and enhance project description
- Changed project title from "AlphaHuman Mk1" to "AlphaHuman" for clarity.
- Revised project description to emphasize user-friendly AI capabilities and link to the Neocortex Mk1 model.
- Updated navigation links to include Discord, Reddit, and Twitter/X.
- Improved formatting in the download section for better readability.
2026-02-21 21:03:06 +04:00
Steven EnamakelandGitHub 0b66cece0a Merge branch 'main' into develop 2026-02-21 10:57:37 +04:00