Commit Graph
8 Commits
Author SHA1 Message Date
cyrus 8f4bef70c2 refactor: replace injectAll with injectOpenClawContext for streamlined context injection
- Removed `injectAll`, `injectSoulIntoMessage`, and `injectToolsIntoMessage` along with their utilities.
- Added `injectOpenClawContext` as the new single context injection system.
- Updated context injection logic across Redux, APIs, and Tauri commands.
- Deleted SOUL and TOOLS injection code, aligning with the new OpenClaw approach.
2026-03-20 19:15:19 +05:30
M3gA-Mind 01c6fd9421 refactor: streamline JSON formatting and enhance documentation clarity
- Consolidated JSON structure in `.mcp.json` and `.claude/mcp.json` for improved readability.
- Updated `CLAUDE.md` and other documentation files to enhance formatting consistency and clarity.
- Improved the organization of agent roles and initialization procedures in `AGENTS.md`, `BOOTSTRAP.md`, and `IDENTITY.md`.
- Enhanced user understanding and personalization strategies in `USER.md` and `MEMORY.md`.
- Refined tool generation scripts for better error handling and output formatting in `discover-tools.js` and `openClaw-formatter.js`.
2026-03-10 05:31:26 +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
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
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
29f542a3d7 feat: add E2E tests for card payment processing flow (#124)
* feat: add E2E tests for auth access control and billing/subscription flows

Add comprehensive E2E test coverage for authentication, access control,
and billing/subscription lifecycle using Appium mac2 + WebDriverIO.

New test cases (11 total):
- 1.1 User registration via deep link
- 1.1.1 Duplicate account handling
- 1.2 Multi-device sessions
- 3.1.1 Default FREE plan allocation
- 3.2.1 Upgrade flow (Stripe purchase API + polling)
- 3.2.2 Downgrade flow verification
- 3.3.1 Active subscription display
- 3.3.2 Renewal date handling
- 3.3.3 Cancellation via Stripe portal
- 1.3 Logout via Settings
- 1.3.1 Revoked session auto-logout

Mock server additions:
- Dynamic team data with subscription controlled by mockBehavior
- /payments/stripe/currentPlan, purchasePlan, portal routes
- /payments/coinbase/charge route

Split e2e.sh into per-flow scripts (e2e-login.sh, e2e-auth.sh) to
prevent Redux Persist state leaking between specs.

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

* style: fix Prettier formatting for E2E test files

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

* fix: address review findings for E2E auth spec

- clickFirstCandidate: check retry result, return null with tree dump on failure
- navigateToHome: throw on failure instead of silently continuing
- 3.2.2: assert exactly 1 Upgrade element (PRO only) and verify PRO visible

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

* feat: add E2E tests for card payment processing flow

Add 8 new E2E tests covering checkout sessions, payment confirmation
via polling, duplicate prevention, and billing events for Stripe card
and Coinbase crypto payment flows.

New files:
- test/e2e/specs/card-payment-flow.spec.ts (8 test cases)
- scripts/e2e-payment.sh (standalone runner)

Modified:
- mock-server.ts: add purchaseError/coinbaseError behavior toggles
- package.json: add test:e2e:payment script and chain into test:e2e

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

* fix: add assertions to waitForTextToDisappear calls and guard purchaseError cleanup

Ensure all waitForTextToDisappear results are asserted with expect().toBe(true)
instead of silently discarding the return value. Wrap 5.2.2 test body in
try/finally so the purchaseError mock flag is always reset even if assertions throw.

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

* style: fix Prettier formatting in card payment spec

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

* style: fix pre-existing Prettier formatting issues

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

* feat: add E2E tests for cryptocurrency payment processing flow

Covers invoice creation (Coinbase charge), confirmation handling
(success, underpayment, overpayment), and payment status updates
(polling, API errors, expired charges). Extends mock server with
crypto payment status endpoint and adds test runner script.

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

* feat: add E2E tests for Telegram integration flows

Covers sections 7.1-7.5: account linking, permission levels, command
processing, webhook handling, and disconnect/re-setup flows (13 tests).

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

* feat: add E2E tests for Notion integration flows

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

* feat: add E2E tests for Gmail integration flows

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

---------

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-21 10:57:12 +04:00
Mega MindandGitHub 2993571eb0 Feat/chats (#119)
* feat: add Conversations section with error handling and optimistic message removal

* feat: add thread deletion functionality and update Conversations component for thread selection

* feat: add unread message count and responsive layout to Conversations and MiniSidebar components

* feat: implement suggested questions feature in Conversations component for new threads

* feat: add scrollbar hiding utility and improve suggested questions layout in Conversations component
2026-02-18 09:18:43 +05:30
f4801726f3 Fix async tool calls not fetching data in QuickJS runtime (#102)
* Implement data synchronization feature in SkillManagementPanel

- Added a new `handleSync` function to trigger manual synchronization for skills, enhancing user control over data updates.
- Integrated skill state management to track synchronization progress, errors, and completion status.
- Updated the UI to display synchronization status, including progress indicators and error messages, improving user feedback during sync operations.
- Enhanced the SkillManager and SkillRuntime classes to support the new sync functionality, ensuring proper handling of sync requests and lifecycle hooks.

Updated subproject commit reference in the skills directory.

* Implement Conversations UI with two-panel thread layout and resizable sidebar

Add full Conversations feature: thread types, API service, Redux slice, and a
two-panel page with a draggable resize handle. Uncomment Conversations nav item
in MiniSidebar and enable prefix-based active state matching.

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

* Add Intelligence page and integrate intelligence stats hook

- Introduced a new Intelligence page with a skill management interface, allowing users to view and manage skills.
- Implemented the `useIntelligenceStats` hook to fetch and display session statistics, memory files, and entity counts.
- Enhanced the SkillsGrid component to utilize shared skill icons and status displays, improving UI consistency.
- Added functionality for skill synchronization and management, including action buttons for skill setup and syncing.
- Updated the Conversations page to support sending messages with optimistic UI updates, enhancing user experience.

This commit lays the groundwork for a more interactive and informative intelligence management feature.

* Update subproject commit reference in skills directory and enhance fetch handling in bootstrap.js

- Updated the subproject commit reference in the skills directory to the latest version.
- Modified the fetch implementation in bootstrap.js to ensure options are sent as a JSON string and to parse the JSON response, improving data handling and error management.

* Update subproject commit reference in skills directory and comment out Conversations nav item in MiniSidebar

- Updated the subproject commit reference in the skills directory to the latest version.
- Commented out the Conversations navigation item in MiniSidebar for future implementation.

---------

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-11 17:56:47 +05:30