chore: remove unused sys import#6545
Open
operagxoksana wants to merge 218 commits intoelizaOS:v2.0.0from
Open
Conversation
Implement comprehensive hot reload functionality for backend code changes during development. When TypeScript files in watched packages are modified, the system automatically rebuilds the CLI and restarts the server. Core implementation: - Watch all CLI dependency packages (cli, core, server, api-client, plugin-bootstrap, plugin-sql, config) - Debounce file changes (300ms) to prevent rapid rebuilds - Graceful server shutdown and restart on code changes - Health check verification after rebuilds to detect crashes - Rebuild queueing for changes during active rebuilds Technical details: - Use Bun.spawn() for all process execution per project standards - Comprehensive TypeScript type annotations with JSDoc - Exit event listeners for proper SIGKILL fallback - Directory existence checks to handle optional packages gracefully - Full test coverage with 13 passing tests using temp directories The dev environment now provides: - Automatic backend rebuild on TypeScript file changes - Server health verification after each rebuild - Graceful error handling and process cleanup - Clear logging for all rebuild operations Usage: bun run dev Addresses all PR review feedback from @cursor, @greptile-apps, and @claude
Co-authored-by: sayonara <sayonara@elizalabs.ai>
- Add .catch() handler on child.exited promise - Ensure setTimeout always calls resolve() after SIGKILL - Wrap child.kill() in try-catch for error handling - Match the pattern used in cleanup() function This prevents the rebuild from freezing if the process doesn't respond to signals or if child.exited rejects.
Co-authored-by: sayonara <sayonara@elizalabs.ai>
…r extraction - Add retry logic for XML parsing with exponential backoff (1s, 2s, 4s... capped at 8s) - Add summary generation retry with graceful fallback message - Add parameter extraction from multi-step decision template - Add formatActionsWithParams() for LLM parameter schema information - Add bounds checking for retry counts (1-10 range) - Add comprehensive tests for retry and parameter scenarios
Enhanced JSON parameter parsing to ensure only non-null objects are accepted, with appropriate logging for invalid types. Updated related test and provider logic to match stricter validation and improved code consistency.
Added explicit checks and warnings for array-type parameters in both DefaultMessageService and multi-step tests. Metadata properties in accumulated state are now prefixed with underscores to avoid collisions with action parameters.
Improves logging granularity and clarity for multi-step message processing, including step-by-step info, provider/action execution, and summary generation. Adds streaming support for summary output in multi-step mode and ensures streaming contexts are correctly managed for both single-shot and multi-step flows. Minor code formatting and consistency improvements applied.
Replaces 'state' with 'accumulatedState' in provider and action calls to ensure correct state is used. Adds logic to prevent duplicate streaming of summary output to the user on retry attempts, tracking streaming status with 'hasStreamedToUser'.
Marks streaming as started before sending content to prevent duplicate streams on retries in DefaultMessageService. Updates action parameter formatting to handle invalid definitions and provide defaults for missing type or description.
Updates submodule from 797ad22 (init commit) to 4a33c0c (Add ElizaOS scenario testing rules) 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
…entries - Add array check to prevent malformed parameter output - Filter invalid param entries upfront to avoid dangling headers
- Added methods to StreamingContext for managing streaming state, including reset, getStreamedText, and isComplete. - Improved DefaultMessageService to utilize intelligent retry logic for streaming, allowing for continuation prompts when text extraction is incomplete. - Updated tests to validate new streaming context features and ensure correct behavior during retries. - Enhanced IStreamExtractor interface with reset and flush methods for better state management.
- Removed redundant '[MULTI-STEP]' prefix from logging messages in DefaultMessageService to enhance clarity and readability. - Updated various log statements to maintain consistency while preserving essential information about the multi-step processing flow. - other: fix docs
Replace ACTIONS_REGEX with indexOf-based extraction in detectResponseStrategy. This eliminates potential polynomial-time regex matching on malicious inputs.
Ensures continuation response is properly streamed to user in single-shot mode, matching the behavior of multi-step continuation at line 1862.
…nt results Previously, calling getStreamedText() multiple times would return different results because flush() empties the buffer. Now the flushed content is accumulated into streamedText, ensuring consistent results across calls.
This commit refactors the error handling and shutdown logic in the development server scripts. It ensures that processes are properly cleaned up and that errors are logged and handled more effectively. Co-authored-by: sayonara <sayonara@elizalabs.ai>
* fix: typo threshholds -> thresholds, commited -> committed * fix: typo packge -> package * fix: typo brige -> bridge * fix: typo unneccesary -> unnecessary * fix: typo wheather -> whether * fix: typo assitant -> assistant * fix: typo exisitng -> existing
Contributor
|
Important Review skippedAuto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
Tip Try Coding Plans. Let us write the prompt for your AI agent so you can ship faster (with fewer bugs). Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Removes an unused sys import from scripts/update-python-versions.py, reducing minor dead code without affecting functionality.
Greptile Summary
This PR removes an unused
import sysstatement fromscripts/update-python-versions.py. Thesysmodule is confirmed to be entirely unreferenced throughout the file — the script relies exclusively onargparse,re, andpathlib.Pathfor its functionality.import sys) with no functional changepyproject.tomlupdates, dependency constraint rewrites, and__init__.pyversion bumps remain completely unaffectedConfidence Score: 5/5
sysmodule is definitively unreferenced in the file and removing it cannot affect behavior. No dependencies, logic, or functionality are altered.Flowchart
%%{init: {'theme': 'neutral'}}%% flowchart TD A([Start]) --> B[Parse CLI args\nversion, --dry-run, --verbose] B --> C[normalize_version\nConvert to PEP 440 format] C --> D[discover_package_dirs\nFind pyproject.toml files] D --> E[get_elizaos_package_names\nCollect known elizaos packages] E --> F{For each\npackage dir} F --> G[update_pyproject_version\nSet version = x.y.z] F --> H[update_pyproject_dependencies\nUpdate elizaos dep constraints] F --> I[update_init_version\nSet __version__ in __init__.py] G --> J{dry_run?} H --> J I --> J J -- Yes --> K[Print changes only] J -- No --> L[Write files to disk] K --> M([Done — print summary]) L --> MLast reviewed commit: 6219398
(5/5) You can turn off certain types of comments like style here!