* Refactor BillingPanel to use updated user usage structure
- Changed the usage data source in BillingPanel from activeTeam to user, aligning with the new IUserUsage interface.
- Updated the display of token usage percentage and progress bar to reflect the new usage metrics (spentThisCycleUsd and cycleBudgetUsd).
- Cleaned up commented-out code and improved layout for better readability and user experience.
* Enhance skill synchronization and connection status management
- Exported `deriveConnectionStatus` function from hooks for better accessibility.
- Introduced `syncToolsToBackend` function to synchronize tool states with the backend, ensuring up-to-date connection status.
- Integrated `syncToolsToBackend` calls in `SkillManager` lifecycle methods and socket connection events to maintain consistent state across the application.
- Added new `sync.ts` file to encapsulate synchronization logic, improving code organization and maintainability.
* Add Rust-side tool:sync emission and document dual socket codebase
Implement tool:sync on the Rust side so desktop/mobile apps emit skill
state to the backend natively, without relying on the frontend WebView.
- SocketManager: add sync_tools() method, derive_connection_status()
helper, and sync_tools_via_channel() for event handler context
- SocketManager: emit tool:sync on "ready" (connect/reconnect)
- RuntimeEngine: store SocketManager reference, call sync_tools after
start_skill, stop_skill, and auto_start_skills
- lib.rs: wire SocketManager into RuntimeEngine during setup
- CLAUDE.md: add Dual Socket Codebase pattern noting that any socket
event change must be implemented in both TypeScript and Rust
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
* Refactor BillingPanel to use updated user usage structure
- Changed the usage data source in BillingPanel from activeTeam to user, aligning with the new IUserUsage interface.
- Updated the display of token usage percentage and progress bar to reflect the new usage metrics (spentThisCycleUsd and cycleBudgetUsd).
- Cleaned up commented-out code and improved layout for better readability and user experience.
* Update OAuth credential handling in SkillManager and related state management
- Introduced `setSkillOAuthCredential` action to manage OAuth credentials in the Redux store.
- Enhanced `SkillManager` to persist and restore OAuth credentials during skill setup and disconnection.
- Updated `SkillState` interface to include `oauthCredential` for better state management.
- Refactored related components to ensure seamless integration of OAuth handling.
- Updated subproject commit reference in the skills directory.
* Update connection indicator messages and enhance OAuth credential handling
- Changed the default description in the ConnectionIndicator component to refer to "Your device" instead of "Your browser."
- Removed hardcoded connection indicator in GetStartedStep to use the updated description.
- Improved OAuth credential management by restoring persisted credentials on startup and ensuring they are cleared from the store when revoked.
- Updated HTTP client configuration to use native TLS for better compatibility across platforms.
- Cleaned up Cargo.lock and Cargo.toml by removing unused dependencies and ensuring proper feature flags for reqwest.
* Enhance OAuth credential management in QjsSkillInstance
- Removed redundant comment regarding OAuth credential restoration.
- Implemented lazy-loading of persisted OAuth credentials before tool calls.
- Cleared OAuth credentials from memory upon skill stop and marked as disconnected in the store.
- Updated comments for clarity on credential handling during OAuth operations.
* Refactor JWT token retrieval to use session token method
- Updated the JWT token retrieval in multiple functions to utilize the new `get_session_token` method from `__ops`, enhancing security and consistency in token management.
- Added the `get_session_token` function to the operations core for improved session handling.
* update bootstrap
* Add middleware to sync JWT token with Rust SESSION_SERVICE
- Introduced `syncTokenToRust` middleware to synchronize the JWT token with the Rust SESSION_SERVICE whenever the `setToken` action is dispatched or the auth state is rehydrated.
- Enhanced the `get_session_token` function in Rust to log the retrieved token for better debugging and monitoring.
- Updated Redux store configuration to include the new middleware, improving token management and security.
* update skills
* Update subproject commit reference in skills directory to indicate a dirty state
* Remove unused ConnectionIndicator import from GetStartedStep component
* chore: add CI secrets management and local testing script
- Added ci-secrets.example.json to provide a template for CI secrets configuration.
- Introduced test-ci-local.sh script to facilitate local testing of the package-and-publish workflow using act.
- Updated .gitignore to exclude the actual ci-secrets.json file containing sensitive tokens.
* Add user-facing error handling system with opt-in reporting
Intercept all errors (React, global JS, skill runtime) and show non-blocking
notifications that let users inspect the exact sanitized payload before
choosing to report or dismiss. Errors are no longer auto-sent to Sentry.
- Add error report queue (errorReportQueue.ts) with subscribe/notify pattern
- Add ErrorReportNotification rendered in isolated React root (survives crashes)
- Add ErrorFallbackScreen for catastrophic React boundary errors
- Wire Sentry beforeSend to queue errors instead of auto-sending
- Add skill runtime error capture via runtime:skill-status-changed listener
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* Remove conflicting Telegram API fields from ci-secrets.example.json
* Strip sensitive fields from exception before queuing for user review
Sanitize stacktrace frames to remove local variables (vars), source code
context lines (context_line, pre_context, post_context), and mechanism.data.
Only safe location metadata (filename, function, lineno, colno, in_app)
is retained in the sanitized event shown to the user.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* Compute analyticsEnabled on each render instead of caching with useMemo
The Report button now reflects the current analytics setting immediately
when the user toggles it in Settings.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* Refactor components for improved readability and consistency
- Adjusted formatting in ErrorFallbackScreen and ErrorReportNotification components for better JSX structure.
- Removed unnecessary line breaks in Home component for cleaner layout.
- Streamlined error handling logic in SkillProvider for clarity.
- Enhanced errorReportQueue with consistent object formatting for better maintainability.
---------
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
* Remove ModelProvider and related components to streamline application architecture
- Deleted the ModelProvider component and its associated hooks and state management, simplifying the application structure.
- Removed ModelDownloadProgress component from Home and Welcome pages, eliminating unnecessary model download handling.
- Updated App component to remove ModelProvider wrapping, ensuring a cleaner provider hierarchy.
- Adjusted Redux store configuration by removing model-related state management, enhancing overall performance and maintainability.
* Update subproject commit and refactor Model Bridge API to route requests to cloud backend
- Updated the subproject commit reference in the skills directory.
- Refactored the Model Bridge API to replace local inference methods with cloud-based requests for text generation and summarization, enhancing functionality and scalability.
* Update skills submodule with prettier formatting fixes
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
* Add MiniSidebar component and update routing for Conversations and Agents pages
- Introduced a new MiniSidebar component for navigation, enhancing user experience.
- Updated App component to include MiniSidebar and adjusted layout for better responsiveness.
- Added new routes for Conversations and Agents pages, ensuring they are protected routes.
- Refactored Settings route to render as a page instead of a modal, streamlining settings management.
- Removed obsolete SettingsModal and SettingsLayout components to clean up the codebase.
* Update layout and styles in Settings components for improved user experience
- Updated the `MiniSidebar` component to enhance navigation with adjusted z-index and background styles.
- Refactored `SettingsHome` and `SettingsHeader` components to improve layout and responsiveness.
- Added max-width constraints to various elements for better alignment and presentation.
- Cleaned up commented-out code in `MiniSidebar` for clarity.
- Updated subproject commit reference in the skills directory.
- Simplified error handling in `useModelStatus` and `ModelProvider` by consolidating dispatch calls.
- Streamlined greeting array initialization in `Welcome` component for better readability.
- Enhanced `SkillProvider` to listen for skill state changes and dispatch updates accordingly.
- Updated Rust backend to sync published state and emit events for skill state changes.
- Introduced a `dirty` flag in `SkillState` to track modifications for efficient state management.
- Updated the motto formatting in multiple agent markdown files to use italics for consistency.
- Modified YAML files for package and publish workflows to standardize quotation marks and improve readability.
- Ensured no newlines at the end of files were added during the updates.
- Updated the subproject commit reference in the skills directory.
- Refactored the SkillSetupWizard component to use `connection_status: "connected"` instead of `connected: true` for improved clarity in state management during OAuth completion.
- Updated the subproject commit reference in the skills directory.
- Refactored state management functions to directly use __ops for data operations, removing the obsolete __store functions for improved clarity and efficiency.
- Added `ignoreInProduction` property to `SkillListEntry` and updated processing logic to filter skills based on the `IS_DEV` flag.
- Updated Rust structures in the Tauri backend to include `ignoreInProduction` in the skill manifest.
- Refactored desktop deep link listener to remove unnecessary `IS_DEV` checks.
- Improved JSON serialization handling in QuickJS skill instance.
- Updated the subproject commit reference in the skills directory.
- Adjusted the state management functions to utilize the __store for get, set, and delete operations, ensuring consistency in data handling.
- Removed obsolete store functions to streamline the codebase.
- Updated the subproject commit reference in the skills directory.
- Deleted the deploy-gh-pages.yml workflow as it is no longer needed.
- Modified package-and-publish.yml to include a release body in the draft release creation step.
- Removed ARCHITECTURE.md and README.md files from the publish directory as part of the cleanup.
- Replaced all references from TDLib to QuickJS in the codebase, including service paths and storage management.
- Introduced a new bootstrap file for QuickJS runtime, providing necessary browser-like API shims.
- Updated the documentation in CLAUDE.md to reflect the integration of QuickJS instead of TDLib.
- Enhanced the TODO list with new tasks for skill bundling and independent skill coding.
- Introduced `IS_DEV` flag to conditionally append `responseType=json` for OAuth URL generation in development mode
- Enhances testing flexibility when working with authentication flows in development environments
Resolved "Error converting from js 'object' into type 'string'" in TDLib integration:
- Updated TdLibClient.send() to serialize JavaScript objects to JSON strings before sending to Rust bridge
- Enhanced error handling and logging in TDLib manager for better debugging
- Added comprehensive parameter validation and type conversion
- Improved V8 ops bridge logging for TDLib operations
This ensures proper communication between TypeScript skills and Rust TDLib backend.
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
- Replaced TDLib references with QuickJS in the CLAUDE.md documentation.
- Updated service paths and imports in the Rust codebase to reflect the transition to QuickJS.
- Added a new bootstrap.js file for QuickJS runtime, providing necessary browser-like API shims.
- Enhanced the TODO list with tasks for allowing bundling of unverified skills and coding new skills independently.
- Introduced a new storage layer for IndexedDB emulation and updated related operations for QuickJS compatibility.
- Updated the API endpoint in SkillSetupWizard to remove the unnecessary responseType parameter, streamlining the OAuth URL request.
- This change enhances the clarity of the API call while maintaining functionality for OAuth integration.
- Replaced direct URL construction with a call to apiClient to fetch the OAuth authorization URL from the backend.
- Improved error handling for OAuth connection failures, providing clearer feedback in case of issues.
- Updated state management to reflect the new OAuth flow, enhancing user experience during the setup process.
- Updated SkillSetupWizard to handle cases where no setup steps are returned, indicating an OAuth-only skill.
- Modified SkillManager's startSetup method to return null for skills that do not implement setup/start.
- Enhanced SkillRuntime's setupStart method to return null if no setup step is available, improving error handling.
- Updated SkillProvider to include OAuth configuration details in skill discovery.
- Added support for OAuth in the SkillSetupWizard, allowing skills to handle OAuth login and state management.
- Introduced new OAuthLoginView component for user interaction during OAuth processes.
- Updated SkillManager to notify skills of successful OAuth completion and manage OAuth credentials.
- Enhanced deep link handling to support OAuth success and error states.
- Modified SkillManifest to include OAuth configuration details.
- Updated runtime and backend to accommodate OAuth functionality, ensuring skills can utilize OAuth for authentication.
- Changed the runtime specification in SkillsGrid from 'v8' to 'quickjs'.
- Updated documentation in the SkillRuntime class to reflect the transition to QuickJS.
- Modified transport logic to clarify that reverse RPC handling is now managed by QuickJS bridge globals, ensuring compatibility with the new runtime.
- Updated the skill runtime documentation to reflect the transition from V8 to the Rust QuickJS runtime engine.
- Modified the SkillManifest interface to specify "quickjs" as the only runtime option.
- Enhanced the SkillProvider to discover skills using the QuickJS runtime and added filtering for production builds.
- Expanded the TODO list with new tasks for Android version release, background processes, AI message summarization, and remaining skills implementation.
- Added CLAUDE.local.md to .gitignore to prevent local configuration files from being tracked.
- Refactored the App component layout for improved responsiveness and user experience.
- Updated ModelDownloadProgress to include a new `isDownloaded` state for better visibility of download status.
- Simplified SettingsHome by commenting out unused functions and improving the organization of settings options.
- Adjusted PrivacyPanel to ensure analytics settings are correctly evaluated.
- Modified various page components to use `min-h-full` for consistent height management across the application.
- Simplified the `PublicRoute` component by removing the onboarding status check, allowing the `Home` component to handle redirection based on user profile loading.
- Enhanced the `ModelProvider` component by consolidating the initialization logic and improving error handling during model status checks and downloads.
- Introduced cancellation logic in the `ModelProvider` to prevent state updates after component unmounting, ensuring better resource management and preventing memory leaks.
- Introduced a new `HomeRoute` component to manage user redirection based on onboarding status.
- Updated `DefaultRedirect` and `PublicRoute` components to simplify navigation logic, ensuring users are directed to the home page if logged in, while handling onboarding within the `HomeRoute`.
- Removed redundant checks for onboarding status in `DefaultRedirect` and `PublicRoute`, streamlining the routing process.
- Introduced a new `ModelProvider` component to manage model download and status synchronization with the Rust backend.
- Updated the `useModelStatus` hook to utilize Redux for state management, improving error handling and download control.
- Refactored the `App` component to include `ModelProvider`, ensuring proper context for model-related operations.
- Simplified the `Welcome` component by removing auto-trigger logic for model downloads, relying on the new provider for state management.
- Added a new `modelSlice` to the Redux store to handle model status and actions, enhancing overall state management.
- Updated the codebase to replace dynamic imports with static imports for Tauri API calls, enhancing performance and compliance with new coding standards.
- Implemented try/catch blocks around Tauri API calls to handle errors gracefully in non-Tauri environments.
- Refactored components to ensure consistent usage of static imports, improving code clarity and maintainability.
- Adjusted the `activeTeamId` property in the User interface to be required, ensuring better type safety.
- Added a new `downloaded` status to the `ModelStatus` interface to track if the model file has been downloaded.
- Implemented `startDownload` function in the `useModelStatus` hook to initiate model downloads without loading into memory.
- Updated the `Welcome` component to automatically trigger model downloads on desktop and provide visual feedback on download progress.
- Enhanced the Tauri backend with a new `model_start_download` command to support the download process.
- Improved the model status management to reflect the current download state and handle errors effectively.
- Updated the subproject reference in the `skills` file to the latest commit.
- Standardized quotes in the `deploy-gh-pages.yml` and `package-android.yml` workflows for consistency.
- Removed unused Telegram API credentials from environment variables in workflows and example configuration files to streamline the setup.
- Included `TELEGRAM_API_ID` and `TELEGRAM_API_HASH` as environment variables in the `package-and-publish.yml` workflow to facilitate Telegram integration.
- Removed the `dotenvy` dependency from `Cargo.toml` and `Cargo.lock` to streamline the project and eliminate unnecessary packages.
* Enhance socket connection logging and URL handling
- Added logging for the backend URL in the `runtime_socket_connect` function to improve traceability.
- Updated the `SocketManager` to convert HTTP/HTTPS URLs to WebSocket URLs, enhancing connection handling.
- Improved error logging to capture detailed error chains during connection failures, aiding in debugging.
* Enhance TDLib integration and macOS bundling process
- Updated build.rs to include a setup function for TDLib, ensuring the correct version is used based on the target OS.
- Added a new script, build-tdlib-from-source.sh, to facilitate building TDLib from source for macOS with the appropriate deployment target.
- Modified .gitignore to exclude the new tdlib-local and tdlib-build directories.
- Updated tauri.conf.json to streamline TDLib references and ensure compatibility with the new bundling process.
- Removed outdated bundling scripts to simplify the build workflow.
* Refactor socket management and update dependencies
- Updated `build.rs` to correctly reference architecture-specific paths for local TDLib builds.
- Replaced `rust_socketio` with `tf-rust-socketio` in `Cargo.toml` and `socket_manager.rs` to align with the new dependency structure.
- Enhanced logging in `socket_manager.rs` for better connection diagnostics and pre-flight checks.
- Updated `build-tdlib-from-source.sh` to define architecture-specific build and install directories, improving build isolation.
* Update TDLib installation process and refine socket payload handling
- Modified `build-tdlib-from-source.sh` to manually install `tdjson` libraries, addressing potential installation failures.
- Updated `socket_manager.rs` to handle payloads with an additional parameter in `Payload::Text`, improving data extraction and connection management.
* Add macOS TDLib binary for version 1.8.29
- Introduced the `libtdjson.1.8.29.dylib` binary to the macOS TDLib prebuilt directory, enabling integration with the latest TDLib features and improvements.
* Refactor SocketManager to use WebSocket and update dependencies
- Replaced `tf-rust-socketio` with a WebSocket-based implementation using `tokio-tungstenite`, enhancing connection stability and compatibility.
- Updated `Cargo.toml` to include new features for `reqwest` and removed deprecated dependencies.
- Improved documentation in `socket_manager.rs` to clarify the new WebSocket connection handling and its implications for Android.
- Streamlined connection lifecycle management and error handling for better performance and maintainability.
- Replaced `tf-rust-socketio` with a WebSocket-based implementation using `tokio-tungstenite`, enhancing connection stability and compatibility.
- Updated `Cargo.toml` to include new features for `reqwest` and removed deprecated dependencies.
- Improved documentation in `socket_manager.rs` to clarify the new WebSocket connection handling and its implications for Android.
- Streamlined connection lifecycle management and error handling for better performance and maintainability.
- Introduced the `libtdjson.1.8.29.dylib` binary to the macOS TDLib prebuilt directory, enabling integration with the latest TDLib features and improvements.
- Modified `build-tdlib-from-source.sh` to manually install `tdjson` libraries, addressing potential installation failures.
- Updated `socket_manager.rs` to handle payloads with an additional parameter in `Payload::Text`, improving data extraction and connection management.