Files
openhuman/package.json
T
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

121 lines
4.5 KiB
JSON

{
"name": "alphahuman",
"private": true,
"version": "0.47.0",
"type": "module",
"scripts": {
"dev": "vite",
"dev:web": "vite",
"dev:app": "source scripts/load-dotenv.sh && tauri dev",
"build": "tsc && vite build",
"build:app": "yarn skills:build && tsc && vite build",
"compile": "tsc --noEmit",
"preview": "vite preview",
"tauri": "tauri",
"macos:build:debug": "yarn macos:build:release --debug",
"macos:build:release": "source scripts/load-dotenv.sh && tauri build --bundles app dmg",
"macos:build:sign:release": "source scripts/load-env.sh && tauri build --bundles app dmg",
"macos:run": "open 'src-tauri/target/debug/bundle/macos/AlphaHuman.app'",
"macos:dev": "yarn macos:build:debug && open 'src-tauri/target/debug/bundle/macos/AlphaHuman.app'",
"android:dev": "tauri android dev",
"android:build": "tauri android build",
"test": "vitest run",
"test:unit": "vitest run",
"test:unit:watch": "vitest",
"test:watch": "vitest",
"test:coverage": "vitest run --coverage",
"test:rust": "source $HOME/.cargo/env 2>/dev/null; cargo test --manifest-path src-tauri/Cargo.toml",
"test:e2e:build": "bash scripts/e2e-build.sh",
"test:e2e:login": "bash scripts/e2e-login.sh",
"test:e2e:auth": "bash scripts/e2e-auth.sh",
"test:e2e:payment": "bash scripts/e2e-payment.sh",
"test:e2e:crypto-payment": "bash scripts/e2e-crypto-payment.sh",
"test:e2e:telegram": "bash scripts/e2e-telegram.sh",
"test:e2e:notion": "bash scripts/e2e-notion.sh",
"test:e2e:gmail": "bash scripts/e2e-gmail.sh",
"test:e2e": "yarn test:e2e:build && yarn test:e2e:login && yarn test:e2e:auth && yarn test:e2e:payment && yarn test:e2e:crypto-payment && yarn test:e2e:telegram && yarn test:e2e:notion && yarn test:e2e:gmail",
"test:all": "yarn test:coverage && yarn test:rust && yarn test:e2e",
"format": "prettier --write .",
"format:check": "prettier --check .",
"lint": "eslint . --ext .ts,.tsx",
"lint:fix": "eslint . --ext .ts,.tsx --fix",
"skills:build": "cd skills && yarn build",
"skills:watch": "cd skills && yarn build:watch",
"prepare": "husky"
},
"dependencies": {
"@noble/hashes": "^2.0.1",
"@noble/secp256k1": "^2.0.0",
"@heroicons/react": "^2.2.0",
"@reduxjs/toolkit": "^2.11.2",
"@scure/bip32": "^1.5.1",
"@scure/bip39": "^2.0.1",
"@sentry/react": "^10.38.0",
"@tauri-apps/api": "^2",
"@tauri-apps/plugin-deep-link": "^2",
"@tauri-apps/plugin-opener": "^2",
"@tauri-apps/plugin-os": "^2.3.2",
"@tauri-apps/plugin-shell": "~2",
"@types/react-router-dom": "^5.3.3",
"buffer": "^6.0.3",
"debug": "^4.4.3",
"immer": "^11.1.3",
"lottie-react": "^2.4.1",
"os-browserify": "^0.3.0",
"process": "^0.11.10",
"qrcode.react": "^4.2.0",
"react": "^19.1.0",
"react-dom": "^19.1.0",
"react-markdown": "^10.1.0",
"react-redux": "^9.2.0",
"react-router-dom": "^7.13.0",
"redux-logger": "^3.0.6",
"redux-persist": "^6.0.0",
"socket.io-client": "^4.8.3",
"telegram": "^2.26.22",
"util": "^0.12.5",
"zustand": "^5.0.10"
},
"devDependencies": {
"@eslint/js": "^9.39.2",
"@tailwindcss/forms": "^0.5.11",
"@tailwindcss/typography": "^0.5.19",
"@tauri-apps/cli": "^2",
"@testing-library/dom": "^10.4.1",
"@testing-library/jest-dom": "^6.9.1",
"@testing-library/react": "^16.3.2",
"@testing-library/user-event": "^14.6.1",
"@trivago/prettier-plugin-sort-imports": "^6.0.2",
"@types/debug": "^4.1.12",
"@types/node": "^25.0.10",
"@types/react": "^19.1.8",
"@types/react-dom": "^19.1.6",
"@types/redux-logger": "^3.0.13",
"@typescript-eslint/eslint-plugin": "^8.54.0",
"@typescript-eslint/parser": "^8.54.0",
"@vitejs/plugin-react": "^4.6.0",
"@vitest/coverage-v8": "^4.0.18",
"@wdio/appium-service": "^9.24.0",
"@wdio/cli": "^9.24.0",
"@wdio/local-runner": "^9.24.0",
"@wdio/mocha-framework": "^9.24.0",
"@wdio/spec-reporter": "^9.24.0",
"autoprefixer": "^10.4.23",
"eslint": "^9.39.2",
"eslint-config-prettier": "^10.1.8",
"eslint-plugin-import": "^2.32.0",
"eslint-plugin-react": "^7.37.5",
"eslint-plugin-react-hooks": "^7.0.1",
"husky": "^9.1.7",
"jsdom": "^28.0.0",
"msw": "^2.12.10",
"postcss": "^8.5.6",
"prettier": "^3.8.1",
"tailwindcss": "^3.4.19",
"typescript": "~5.8.3",
"vite": "^7.0.4",
"vite-plugin-node-polyfills": "^0.25.0",
"vitest": "^4.0.18"
}
}