├── .gitignore
├── .vscode
└── settings.json
├── README.md
├── docs
├── arch
│ └── RaySystem 整体架构.v0.1.svg
├── develop
│ ├── 001.添加鉴权.md
│ ├── 002.笔记支持移动.md
│ ├── 003.后端工程的标准结构.md
│ ├── 004.LLM 模块设计.md
│ ├── 005.支持切换双列卡片流.md
│ ├── 006.LLM会话管理.md
│ ├── 007.AppFlowyEditor.md
│ ├── 008.AppFlowyEditor LaTeX.md
│ └── 009.双链笔记.md
├── notes
│ └── SQLAlchemy
│ │ └── hybrid_property.md
└── screenshot2025-02-23.png
├── emacs
├── main.el
└── ray-info.el
├── raysystem
├── .gitignore
├── .python-version
├── .vscode
│ └── settings.json
├── README.md
├── RaySystemConfig.example.yaml
├── alembic.ini
├── docs
│ ├── module_structure_guide.md
│ └── ray_scheduler_usage.md
├── main.py
├── make_migration.sh
├── migrations
│ ├── README
│ ├── env.py
│ ├── script.py.mako
│ └── versions
│ │ ├── 09a7180cb8b5_info_add_storage_html.py
│ │ ├── 1d2096bbfdff_raysystem_migration.py
│ │ ├── 4918d64178d6_raysystem_migration.py
│ │ ├── 4ff507e26b13_people_people_add_more_names.py
│ │ ├── 711ec8f2a63c_raysystem_migration.py
│ │ ├── 760764980ad9_raysystem_migration.py
│ │ ├── a0e5b18ff5c9_raysystem_migration.py
│ │ ├── ce3a41c917b1_raysystem_migration.py
│ │ ├── e3a6362f26d7_raysystem_migration.py
│ │ ├── e667c1aea8f1_site_rename_url_to_host.py
│ │ └── fc0446d32712_site_info_unique_for_host_and_url.py
├── module
│ ├── __init__.py
│ ├── base
│ │ ├── __init__.py
│ │ └── constants.py
│ ├── browser
│ │ ├── __init__.py
│ │ └── browser.py
│ ├── crawler
│ │ ├── __init__.py
│ │ ├── ddg
│ │ │ ├── __init__.py
│ │ │ └── ddg.py
│ │ ├── rss
│ │ │ ├── __init__.py
│ │ │ └── rss_collector.py
│ │ └── test
│ │ │ ├── __init__.py
│ │ │ └── test_crawler.py
│ ├── db
│ │ ├── __init__.py
│ │ ├── base.py
│ │ └── db.py
│ ├── early_sleeping
│ │ ├── __init__.py
│ │ └── early_sleeping.py
│ ├── fs
│ │ ├── README.md
│ │ ├── __init__.py
│ │ └── fs.py
│ ├── http
│ │ ├── __init__.py
│ │ └── http.py
│ ├── info
│ │ ├── __init__.py
│ │ ├── api.py
│ │ ├── info.py
│ │ ├── model.py
│ │ ├── schemas.py
│ │ └── utils.py
│ ├── llm
│ │ ├── __init__.py
│ │ ├── api.py
│ │ ├── chat_session.py
│ │ ├── llm.py
│ │ ├── model.py
│ │ └── schemas.py
│ ├── note
│ │ ├── __init__.py
│ │ ├── api.py
│ │ ├── events.py
│ │ ├── model.py
│ │ ├── note.py
│ │ └── schema.py
│ ├── ocr
│ │ ├── __init__.py
│ │ ├── api.py
│ │ └── ocr.py
│ ├── people
│ │ ├── __init__.py
│ │ ├── api.py
│ │ ├── core.py
│ │ ├── model.py
│ │ ├── people.py
│ │ └── schemas.py
│ ├── repl
│ │ ├── __init__.py
│ │ └── repl.py
│ ├── storage
│ │ ├── README.md
│ │ ├── __init__.py
│ │ └── storage.py
│ ├── system
│ │ ├── __init__.py
│ │ ├── api.py
│ │ ├── system.py
│ │ └── utils.py
│ ├── task_queue
│ │ ├── __init__.py
│ │ └── task_queue.py
│ └── task_scheduler
│ │ ├── __init__.py
│ │ ├── api.py
│ │ ├── model.py
│ │ └── task_scheduler.py
├── open_config.sh
├── pyproject.toml
├── raysystem.egg-info
│ └── requires.txt
├── run_migrate.sh
├── run_tests.sh
├── tests
│ ├── __init__.py
│ ├── conftest.py
│ └── module
│ │ ├── __init__.py
│ │ ├── info
│ │ ├── __init__.py
│ │ ├── test_info.py
│ │ ├── test_site.py
│ │ └── test_utils.py
│ │ ├── note
│ │ ├── __init__.py
│ │ └── test_note_hierarchy.py
│ │ └── task_scheduler
│ │ ├── test_task_scheduler.py
│ │ └── test_task_scheduler_api.py
├── utils
│ ├── __init__.py
│ ├── config.py
│ ├── file.py
│ └── logger.py
└── uv.lock
├── raysystem_flutter
├── .gitignore
├── .metadata
├── .vscode
│ └── launch.json
├── README.md
├── analysis_options.yaml
├── android
│ ├── .gitignore
│ ├── app
│ │ ├── build.gradle
│ │ └── src
│ │ │ ├── debug
│ │ │ └── AndroidManifest.xml
│ │ │ ├── main
│ │ │ ├── AndroidManifest.xml
│ │ │ ├── kotlin
│ │ │ │ └── com
│ │ │ │ │ └── example
│ │ │ │ │ └── raysystem_flutter
│ │ │ │ │ └── MainActivity.kt
│ │ │ └── res
│ │ │ │ ├── drawable-v21
│ │ │ │ └── launch_background.xml
│ │ │ │ ├── drawable
│ │ │ │ └── launch_background.xml
│ │ │ │ ├── mipmap-hdpi
│ │ │ │ └── ic_launcher.png
│ │ │ │ ├── mipmap-mdpi
│ │ │ │ └── ic_launcher.png
│ │ │ │ ├── mipmap-xhdpi
│ │ │ │ └── ic_launcher.png
│ │ │ │ ├── mipmap-xxhdpi
│ │ │ │ └── ic_launcher.png
│ │ │ │ ├── mipmap-xxxhdpi
│ │ │ │ └── ic_launcher.png
│ │ │ │ ├── values-night
│ │ │ │ └── styles.xml
│ │ │ │ └── values
│ │ │ │ └── styles.xml
│ │ │ └── profile
│ │ │ └── AndroidManifest.xml
│ ├── build.gradle
│ ├── gradle.properties
│ ├── gradle
│ │ └── wrapper
│ │ │ └── gradle-wrapper.properties
│ └── settings.gradle
├── api
│ ├── .gitignore
│ ├── .openapi-generator-ignore
│ ├── .openapi-generator
│ │ ├── FILES
│ │ └── VERSION
│ ├── README.md
│ ├── analysis_options.yaml
│ ├── doc
│ │ ├── ChatCompletionRequest.md
│ │ ├── ChatCompletionResponse.md
│ │ ├── ChatMessageInput.md
│ │ ├── ChatMessageOutput.md
│ │ ├── ChatSessionCreate.md
│ │ ├── ChatSessionResponse.md
│ │ ├── ChatSessionUpdate.md
│ │ ├── ChatSessionsApi.md
│ │ ├── ChatSessionsListResponse.md
│ │ ├── DefaultApi.md
│ │ ├── DiskMetrics.md
│ │ ├── HTTPValidationError.md
│ │ ├── InfoList.md
│ │ ├── InfoResponse.md
│ │ ├── InfoStats.md
│ │ ├── LLMApi.md
│ │ ├── ListModelsResponse.md
│ │ ├── MemoryMetrics.md
│ │ ├── ModelInfo.md
│ │ ├── NetworkMetrics.md
│ │ ├── NoteCreate.md
│ │ ├── NoteResponse.md
│ │ ├── NoteTitleBase.md
│ │ ├── NoteTitleCreate.md
│ │ ├── NoteTitleResponse.md
│ │ ├── NoteTitleUpdate.md
│ │ ├── NoteTitlesApi.md
│ │ ├── NoteTreeNode.md
│ │ ├── NoteTreeResponse.md
│ │ ├── NoteUpdate.md
│ │ ├── NotesApi.md
│ │ ├── NotesListResponse.md
│ │ ├── PeopleApi.md
│ │ ├── PeopleCreate.md
│ │ ├── PeopleListResponse.md
│ │ ├── PeopleNameCreate.md
│ │ ├── PeopleNameResponse.md
│ │ ├── PeopleResponse.md
│ │ ├── PeopleUpdate.md
│ │ ├── ResponseGetMetricsSystemMetricsGet.md
│ │ ├── ScheduledTaskResponse.md
│ │ ├── Site.md
│ │ ├── SiteCreate.md
│ │ ├── SystemMetrics.md
│ │ ├── TaskScheduleType.md
│ │ ├── ValidationError.md
│ │ └── ValidationErrorLocInner.md
│ ├── lib
│ │ ├── openapi.dart
│ │ └── src
│ │ │ ├── api.dart
│ │ │ ├── api
│ │ │ ├── chat_sessions_api.dart
│ │ │ ├── default_api.dart
│ │ │ ├── llm_api.dart
│ │ │ ├── note_titles_api.dart
│ │ │ ├── notes_api.dart
│ │ │ └── people_api.dart
│ │ │ ├── api_util.dart
│ │ │ ├── auth
│ │ │ ├── api_key_auth.dart
│ │ │ ├── auth.dart
│ │ │ ├── basic_auth.dart
│ │ │ ├── bearer_auth.dart
│ │ │ └── oauth.dart
│ │ │ ├── date_serializer.dart
│ │ │ ├── model
│ │ │ ├── chat_completion_request.dart
│ │ │ ├── chat_completion_request.g.dart
│ │ │ ├── chat_completion_response.dart
│ │ │ ├── chat_completion_response.g.dart
│ │ │ ├── chat_message_input.dart
│ │ │ ├── chat_message_input.g.dart
│ │ │ ├── chat_message_output.dart
│ │ │ ├── chat_message_output.g.dart
│ │ │ ├── chat_session_create.dart
│ │ │ ├── chat_session_create.g.dart
│ │ │ ├── chat_session_response.dart
│ │ │ ├── chat_session_response.g.dart
│ │ │ ├── chat_session_update.dart
│ │ │ ├── chat_session_update.g.dart
│ │ │ ├── chat_sessions_list_response.dart
│ │ │ ├── chat_sessions_list_response.g.dart
│ │ │ ├── date.dart
│ │ │ ├── disk_metrics.dart
│ │ │ ├── disk_metrics.g.dart
│ │ │ ├── http_validation_error.dart
│ │ │ ├── http_validation_error.g.dart
│ │ │ ├── info_list.dart
│ │ │ ├── info_list.g.dart
│ │ │ ├── info_response.dart
│ │ │ ├── info_response.g.dart
│ │ │ ├── info_stats.dart
│ │ │ ├── info_stats.g.dart
│ │ │ ├── list_models_response.dart
│ │ │ ├── list_models_response.g.dart
│ │ │ ├── memory_metrics.dart
│ │ │ ├── memory_metrics.g.dart
│ │ │ ├── model_info.dart
│ │ │ ├── model_info.g.dart
│ │ │ ├── network_metrics.dart
│ │ │ ├── network_metrics.g.dart
│ │ │ ├── note_create.dart
│ │ │ ├── note_create.g.dart
│ │ │ ├── note_response.dart
│ │ │ ├── note_response.g.dart
│ │ │ ├── note_title_base.dart
│ │ │ ├── note_title_base.g.dart
│ │ │ ├── note_title_create.dart
│ │ │ ├── note_title_create.g.dart
│ │ │ ├── note_title_response.dart
│ │ │ ├── note_title_response.g.dart
│ │ │ ├── note_title_update.dart
│ │ │ ├── note_title_update.g.dart
│ │ │ ├── note_tree_node.dart
│ │ │ ├── note_tree_node.g.dart
│ │ │ ├── note_tree_response.dart
│ │ │ ├── note_tree_response.g.dart
│ │ │ ├── note_update.dart
│ │ │ ├── note_update.g.dart
│ │ │ ├── notes_list_response.dart
│ │ │ ├── notes_list_response.g.dart
│ │ │ ├── people_create.dart
│ │ │ ├── people_create.g.dart
│ │ │ ├── people_list_response.dart
│ │ │ ├── people_list_response.g.dart
│ │ │ ├── people_name_create.dart
│ │ │ ├── people_name_create.g.dart
│ │ │ ├── people_name_response.dart
│ │ │ ├── people_name_response.g.dart
│ │ │ ├── people_response.dart
│ │ │ ├── people_response.g.dart
│ │ │ ├── people_update.dart
│ │ │ ├── people_update.g.dart
│ │ │ ├── response_get_metrics_system_metrics_get.dart
│ │ │ ├── response_get_metrics_system_metrics_get.g.dart
│ │ │ ├── scheduled_task_response.dart
│ │ │ ├── scheduled_task_response.g.dart
│ │ │ ├── site.dart
│ │ │ ├── site.g.dart
│ │ │ ├── site_create.dart
│ │ │ ├── site_create.g.dart
│ │ │ ├── system_metrics.dart
│ │ │ ├── system_metrics.g.dart
│ │ │ ├── task_schedule_type.dart
│ │ │ ├── task_schedule_type.g.dart
│ │ │ ├── validation_error.dart
│ │ │ ├── validation_error.g.dart
│ │ │ ├── validation_error_loc_inner.dart
│ │ │ └── validation_error_loc_inner.g.dart
│ │ │ ├── serializers.dart
│ │ │ └── serializers.g.dart
│ ├── pubspec.yaml
│ └── test
│ │ ├── chat_completion_request_test.dart
│ │ ├── chat_completion_response_test.dart
│ │ ├── chat_message_input_test.dart
│ │ ├── chat_message_output_test.dart
│ │ ├── chat_session_create_test.dart
│ │ ├── chat_session_response_test.dart
│ │ ├── chat_session_update_test.dart
│ │ ├── chat_sessions_api_test.dart
│ │ ├── chat_sessions_list_response_test.dart
│ │ ├── default_api_test.dart
│ │ ├── disk_metrics_test.dart
│ │ ├── http_validation_error_test.dart
│ │ ├── info_list_test.dart
│ │ ├── info_response_test.dart
│ │ ├── info_stats_test.dart
│ │ ├── list_models_response_test.dart
│ │ ├── llm_api_test.dart
│ │ ├── memory_metrics_test.dart
│ │ ├── model_info_test.dart
│ │ ├── network_metrics_test.dart
│ │ ├── note_create_test.dart
│ │ ├── note_response_test.dart
│ │ ├── note_title_base_test.dart
│ │ ├── note_title_create_test.dart
│ │ ├── note_title_response_test.dart
│ │ ├── note_title_update_test.dart
│ │ ├── note_titles_api_test.dart
│ │ ├── note_tree_node_test.dart
│ │ ├── note_tree_response_test.dart
│ │ ├── note_update_test.dart
│ │ ├── notes_api_test.dart
│ │ ├── notes_list_response_test.dart
│ │ ├── people_api_test.dart
│ │ ├── people_create_test.dart
│ │ ├── people_list_response_test.dart
│ │ ├── people_name_create_test.dart
│ │ ├── people_name_response_test.dart
│ │ ├── people_response_test.dart
│ │ ├── people_update_test.dart
│ │ ├── response_get_metrics_system_metrics_get_test.dart
│ │ ├── scheduled_task_response_test.dart
│ │ ├── site_create_test.dart
│ │ ├── site_test.dart
│ │ ├── system_metrics_test.dart
│ │ ├── task_schedule_type_test.dart
│ │ ├── validation_error_loc_inner_test.dart
│ │ └── validation_error_test.dart
├── assets
│ └── js
│ │ └── network_listener.js
├── build_macos.sh
├── build_runner.sh
├── devtools_options.yaml
├── docs
│ ├── card.md
│ └── editor_styling_guide.md
├── ios
│ ├── .gitignore
│ ├── Flutter
│ │ ├── AppFrameworkInfo.plist
│ │ ├── Debug.xcconfig
│ │ └── Release.xcconfig
│ ├── Podfile
│ ├── Runner.xcodeproj
│ │ ├── project.pbxproj
│ │ ├── project.xcworkspace
│ │ │ ├── contents.xcworkspacedata
│ │ │ └── xcshareddata
│ │ │ │ ├── IDEWorkspaceChecks.plist
│ │ │ │ └── WorkspaceSettings.xcsettings
│ │ └── xcshareddata
│ │ │ └── xcschemes
│ │ │ └── Runner.xcscheme
│ ├── Runner.xcworkspace
│ │ ├── contents.xcworkspacedata
│ │ └── xcshareddata
│ │ │ ├── IDEWorkspaceChecks.plist
│ │ │ └── WorkspaceSettings.xcsettings
│ ├── Runner
│ │ ├── AppDelegate.swift
│ │ ├── Assets.xcassets
│ │ │ ├── AppIcon.appiconset
│ │ │ │ ├── Contents.json
│ │ │ │ ├── Icon-App-1024x1024@1x.png
│ │ │ │ ├── Icon-App-20x20@1x.png
│ │ │ │ ├── Icon-App-20x20@2x.png
│ │ │ │ ├── Icon-App-20x20@3x.png
│ │ │ │ ├── Icon-App-29x29@1x.png
│ │ │ │ ├── Icon-App-29x29@2x.png
│ │ │ │ ├── Icon-App-29x29@3x.png
│ │ │ │ ├── Icon-App-40x40@1x.png
│ │ │ │ ├── Icon-App-40x40@2x.png
│ │ │ │ ├── Icon-App-40x40@3x.png
│ │ │ │ ├── Icon-App-60x60@2x.png
│ │ │ │ ├── Icon-App-60x60@3x.png
│ │ │ │ ├── Icon-App-76x76@1x.png
│ │ │ │ ├── Icon-App-76x76@2x.png
│ │ │ │ └── Icon-App-83.5x83.5@2x.png
│ │ │ └── LaunchImage.imageset
│ │ │ │ ├── Contents.json
│ │ │ │ ├── LaunchImage.png
│ │ │ │ ├── LaunchImage@2x.png
│ │ │ │ ├── LaunchImage@3x.png
│ │ │ │ └── README.md
│ │ ├── Base.lproj
│ │ │ ├── LaunchScreen.storyboard
│ │ │ └── Main.storyboard
│ │ ├── Info.plist
│ │ └── Runner-Bridging-Header.h
│ └── RunnerTests
│ │ └── RunnerTests.swift
├── lib
│ ├── api
│ │ ├── api.dart
│ │ └── api_provider.dart
│ ├── card
│ │ ├── card_list_view.dart
│ │ ├── card_manager.dart
│ │ └── recent_notes_list_card.dart
│ ├── commands.dart
│ ├── commands
│ │ ├── command.dart
│ │ ├── info_commands.dart
│ │ ├── llm_commands.dart
│ │ ├── note_commands.dart
│ │ ├── playground_commands.dart
│ │ ├── scheduler_commands.dart
│ │ ├── settings_commands.dart
│ │ ├── text_commands.dart
│ │ └── todo_commands.dart
│ ├── component
│ │ ├── card
│ │ │ └── ray_card.dart
│ │ ├── ocr_card.dart
│ │ ├── status_bar
│ │ │ ├── items
│ │ │ │ └── always_on_top.dart
│ │ │ └── status_bar.dart
│ │ ├── system_metrics_provider.dart
│ │ └── widgets
│ │ │ └── mac_os_buttons.dart
│ ├── form
│ │ ├── form_dialog.dart
│ │ ├── form_field.dart
│ │ └── form_manager.dart
│ ├── main.dart
│ ├── module
│ │ ├── browser
│ │ │ ├── browser_commands.dart
│ │ │ ├── component
│ │ │ │ ├── browser_card
│ │ │ │ │ └── browser_card.dart
│ │ │ │ └── browser_window
│ │ │ │ │ └── browser_window.dart
│ │ │ ├── debug
│ │ │ │ ├── browser_debug_manager.dart
│ │ │ │ ├── browser_debug_state.dart
│ │ │ │ └── browser_dev_tools_card.dart
│ │ │ └── utils
│ │ │ │ ├── browser_utils.dart
│ │ │ │ └── network_listener.dart
│ │ ├── editor
│ │ │ ├── blocks
│ │ │ │ └── code
│ │ │ │ │ ├── code_block_actions.dart
│ │ │ │ │ ├── code_block_block_component.dart
│ │ │ │ │ ├── code_block_constants.dart
│ │ │ │ │ ├── code_block_localization.dart
│ │ │ │ │ ├── code_block_shortcuts.dart
│ │ │ │ │ ├── code_block_style.dart
│ │ │ │ │ ├── code_block_themes.dart
│ │ │ │ │ ├── code_block_toolbar_item.dart
│ │ │ │ │ └── plugin.dart
│ │ │ └── editor.dart
│ │ ├── llm
│ │ │ ├── api
│ │ │ │ └── llm_service.dart
│ │ │ ├── components
│ │ │ │ ├── chat_header.dart
│ │ │ │ ├── chat_input_field.dart
│ │ │ │ ├── chat_message_bubble.dart
│ │ │ │ ├── chat_messages_area.dart
│ │ │ │ ├── chat_sessions_sidebar.dart
│ │ │ │ ├── chat_settings_panel.dart
│ │ │ │ ├── llm_chat_card.dart
│ │ │ │ └── prompt_selector.dart
│ │ │ ├── llm.dart
│ │ │ └── models
│ │ │ │ ├── chat_message.dart
│ │ │ │ ├── chat_prompt.dart
│ │ │ │ ├── chat_session.dart
│ │ │ │ └── chat_session_model.dart
│ │ ├── note
│ │ │ ├── api
│ │ │ │ ├── note
│ │ │ │ │ ├── api_note_service.dart
│ │ │ │ │ └── note_service.dart
│ │ │ │ └── note_tree
│ │ │ │ │ ├── api_note_tree_service.dart
│ │ │ │ │ └── note_tree_service.dart
│ │ │ ├── components
│ │ │ │ ├── note
│ │ │ │ │ ├── note_card.dart
│ │ │ │ │ └── provider
│ │ │ │ │ │ └── note_service_provider.dart
│ │ │ │ └── note_tree
│ │ │ │ │ ├── note_tree_card.dart
│ │ │ │ │ ├── note_tree_card_controller.dart
│ │ │ │ │ ├── note_tree_view.dart
│ │ │ │ │ └── painters.dart
│ │ │ ├── model
│ │ │ │ └── note_tree_model.dart
│ │ │ └── providers
│ │ │ │ └── notes_provider.dart
│ │ └── people
│ │ │ ├── cards
│ │ │ ├── people_card
│ │ │ │ ├── people_card.dart
│ │ │ │ └── people_card_view_model.dart
│ │ │ ├── recent_people
│ │ │ │ ├── README.md
│ │ │ │ ├── recent_people_card.dart
│ │ │ │ └── recent_people_view_model.dart
│ │ │ └── search_people
│ │ │ │ └── search_people_card.dart
│ │ │ └── people_commands.dart
│ └── utils
│ │ └── string_ext.dart
├── linux
│ ├── .gitignore
│ ├── CMakeLists.txt
│ ├── flutter
│ │ ├── CMakeLists.txt
│ │ ├── generated_plugin_registrant.cc
│ │ ├── generated_plugin_registrant.h
│ │ └── generated_plugins.cmake
│ └── runner
│ │ ├── CMakeLists.txt
│ │ ├── main.cc
│ │ ├── my_application.cc
│ │ └── my_application.h
├── macos
│ ├── .gitignore
│ ├── Flutter
│ │ ├── Flutter-Debug.xcconfig
│ │ ├── Flutter-Release.xcconfig
│ │ └── GeneratedPluginRegistrant.swift
│ ├── Podfile
│ ├── Podfile.lock
│ ├── Runner.xcodeproj
│ │ ├── project.pbxproj
│ │ ├── project.xcworkspace
│ │ │ └── xcshareddata
│ │ │ │ └── IDEWorkspaceChecks.plist
│ │ └── xcshareddata
│ │ │ └── xcschemes
│ │ │ └── Runner.xcscheme
│ ├── Runner.xcworkspace
│ │ ├── contents.xcworkspacedata
│ │ └── xcshareddata
│ │ │ └── IDEWorkspaceChecks.plist
│ ├── Runner
│ │ ├── AppDelegate.swift
│ │ ├── Assets.xcassets
│ │ │ └── AppIcon.appiconset
│ │ │ │ ├── Contents.json
│ │ │ │ ├── app_icon_1024.png
│ │ │ │ ├── app_icon_128.png
│ │ │ │ ├── app_icon_16.png
│ │ │ │ ├── app_icon_256.png
│ │ │ │ ├── app_icon_32.png
│ │ │ │ ├── app_icon_512.png
│ │ │ │ └── app_icon_64.png
│ │ ├── Base.lproj
│ │ │ └── MainMenu.xib
│ │ ├── Configs
│ │ │ ├── AppInfo.xcconfig
│ │ │ ├── Debug.xcconfig
│ │ │ ├── Release.xcconfig
│ │ │ └── Warnings.xcconfig
│ │ ├── DebugProfile.entitlements
│ │ ├── Info.plist
│ │ ├── MainFlutterWindow.swift
│ │ └── Release.entitlements
│ └── RunnerTests
│ │ └── RunnerTests.swift
├── openapi_generator_config.json
├── pubspec.lock
├── pubspec.yaml
├── test
│ └── widget_test.dart
├── web
│ ├── favicon.png
│ ├── icons
│ │ ├── Icon-192.png
│ │ ├── Icon-512.png
│ │ ├── Icon-maskable-192.png
│ │ └── Icon-maskable-512.png
│ ├── index.html
│ └── manifest.json
└── windows
│ ├── .gitignore
│ ├── CMakeLists.txt
│ ├── flutter
│ ├── CMakeLists.txt
│ ├── generated_plugin_registrant.cc
│ ├── generated_plugin_registrant.h
│ └── generated_plugins.cmake
│ └── runner
│ ├── CMakeLists.txt
│ ├── Runner.rc
│ ├── flutter_window.cpp
│ ├── flutter_window.h
│ ├── main.cpp
│ ├── resource.h
│ ├── resources
│ └── app_icon.ico
│ ├── runner.exe.manifest
│ ├── utils.cpp
│ ├── utils.h
│ ├── win32_window.cpp
│ └── win32_window.h
└── todo.md
/.gitignore:
--------------------------------------------------------------------------------
1 | .venv
2 | __pycache__/
--------------------------------------------------------------------------------
/.vscode/settings.json:
--------------------------------------------------------------------------------
1 | {
2 | "python.analysis.typeCheckingMode": "standard"
3 | }
--------------------------------------------------------------------------------
/docs/develop/002.笔记支持移动.md:
--------------------------------------------------------------------------------
1 | lib/module/note/components/note_tree/note_tree_card.dart 和 lib/module/note/components/note_tree/note_tree_view.dart 和 lib/module/note/components/note_tree/note_tree_card_controller.dart,它们是我的 RaySystem 的笔记模块的目录树视图,我想添加一个拖拽移动的功能。
2 |
3 | 具体来说,对于笔记节点,支持进行拖拽,拖拽到新的节点下。在 api/lib/src/api/notes_api.dart 的 NotesApi 类中,已经有 moveNoteNotesNoteIdMovePost 方法,用于笔记移动。
4 |
5 | 需要注意的是,笔记不允许拖拽到自己的子笔记下,因为层级关系是靠笔记的 parent 去链接的,这样链接就被搞乱了。
6 |
7 | 请你分析代码,帮我构思实现方案。
--------------------------------------------------------------------------------
/docs/develop/004.LLM 模块设计.md:
--------------------------------------------------------------------------------
1 | 在 RaySytem 的后端工程中,我希望引入一个新模块——LLM 模块。
2 |
3 | LLM 模块用于访问 LLM 模型,能够支持对接不同的 LLM 服务。
4 |
5 | 我希望将模块创建在 `raysystem/module/llm` 目录下。
6 |
7 | 对于模块的设计,我有一套标准化的设计方案,具体参见:`docs/develop/003.后端工程的标准结构.md`。
8 |
9 | 我规划的功能如下:
10 |
11 | ## 配置 LLM 服务
12 |
13 | 在 `RaySystemConfig.yaml` 中配置 LLM 服务的地址和密钥等信息。
14 |
15 | 我使用 openai 这个 SDK,目前接入的服务都兼容这个 SDK。因此在配置中,需要用户填入:
16 |
17 | - `llm_service`: LLM 服务的地址
18 | - `llm_key`: LLM 服务的密钥
19 | - `llm_model`: LLM 模型的名称
20 |
21 | ## AsyncIO 异步 OpenAI SDK 调用
22 |
23 | RaySystem 的后段工程是一个使用 AsyncIO 的 FastAPI 项目,因此需要使用异步的方式调用 OpenAI 的 SDK。
24 |
25 | 不能阻塞 FastAPI 的事件循环。
26 |
27 | ## FastAPI 封装 OpenAI SDK
28 |
29 | 我通过 FastAPI 向前端提供 API 接口,因此需要封装 OpenAI 的 SDK,提供一个可供前端调用的接口。
30 |
31 | 同时需要注意,前端的 Client 调用时通过 OpenAPI 协议生成器自动生成的 Dart 代码。
32 |
33 | 因此需要保证,我们提供的 API 接口,能够被 OpenAPI 协议生成器正确解析。
34 |
35 | ## 支持添加中间件
36 |
37 | 我希望在调用 OpenAI 的 SDK 时,能够支持添加中间件。
38 |
39 | 例如,允许添加中间件,供我获取到聊天会话,使我能够将对话保存到数据库当中,这样我可以不断积累语料,用于未来我自己的模型训练中。
40 |
41 | 再例如,允许添加中间件,供我统计 token 的使用情况。
42 |
43 | 再例如,允许添加中间件,用于未来实现 Agent、记忆等功能。
44 |
45 | 我们这次不必实现这些中间件,只需要提供一个接口,供我在未来实现中间件时使用。
46 |
47 |
--------------------------------------------------------------------------------
/docs/develop/005.支持切换双列卡片流.md:
--------------------------------------------------------------------------------
1 | 在 RaySystem 的 Flutter 工程中,我实现了一种名为卡片流的交互方式。
2 |
3 | 具体来说,在一个列表视图中,可以向列表中添加卡片,所有的功能,都是通过卡片来实现的。
4 |
5 | 现在,我想拓展卡片流的交互方式,让其支持单列、双列的布局方式。
6 |
7 | 我希望在状态栏(raysystem_flutter/lib/component/status_bar.dart)添加一个单列双列的切换按钮,点击后,能够切换卡片流的布局方式。
8 |
9 | 接下来需要修改 raysystem_flutter/lib/card/card_manager.dart 中的 CardManager 类:
10 |
11 | - 首先扩展数据结构,设计两个卡片列表,分别表示左右。
12 | - 其次,设计一个布局方式的枚举,表示单列和双列两种布局方式。
13 | - 设置一个状态,来记录当前活跃的是哪一列。
14 | - 之后扩展卡片添减的接口,允许向左或右添减卡片。
15 |
16 | 接下来需要修改 raysystem_flutter/lib/card/card_list_view.dart 中的 CardListView 组件,实现以下功能:
17 |
18 | - 根据布局方式,决定是单列还是双列。
19 | - 如果是双列布局,则并排展示两个 CardListView 组件。
20 | - 如果是单列布局,则只展示一个 CardListView 组件。
21 | - 在多列场景下,读取当前活跃的列,给这一列添加一个醒目的边框
22 |
23 | 卡片流的全称是命令式卡片流,在 App 界面底部有一个命令面板:
24 |
25 | - 点击命令即可向 CardManager 中添加卡片
26 | - 在现有的实现中,仍然是向 CardManager 中添加卡片,但是是自动添加在活跃的列中。
--------------------------------------------------------------------------------
/docs/develop/006.LLM会话管理.md:
--------------------------------------------------------------------------------
1 | 我想在 LLM 卡片的左侧添加一个侧边栏,用于进行会话管理。需满足如下功能:
2 |
3 | - 在 LLM 卡片左侧添加一个侧边栏,用于展示聊天会话
4 | - 我们使用假数据来模拟,每个会话 item 标题都是时间格式
5 | - 聊天会话 Item 支持删除,删除成功后,LLMCard 恢复到无聊天的默认状态
6 | - 聊天会话列表需要支持分页加载,使用 infinite_scroll_pagination 这个库来实现
7 |
8 |
9 | ---
10 |
11 | 我想添加一个新功能,在 LLM 卡片加入一个会话管理侧边栏,调用 llmAPI 中的会话管理的 API。
12 |
13 | 具体功能如下:
14 |
15 | - 在 LLM 卡片左侧添加一个侧边栏,用于展示聊天会话
16 | - 调用 get_recent_chat_sessions 接口展示聊天会话,并支持滚动到底部加载更多
17 | - 点击聊天会话,加载对应的聊天记录
18 | - 聊天会话 Item 支持删除,调用 delete_chat_session 接口进行删除。删除成功后,LLMCard 恢复到无聊天的默认状态
19 | - 需要注意聊天会话的创建逻辑:对于新对话,在 LLM 首次返回结果后,创建一个新的会话
20 | - 对于已有对话,在 LLM 返回结果后,调用 update_chat_session 接口更新会话
21 | - 所有的 CRUD 操作,需要有 Snackbar 提示
22 |
23 |
--------------------------------------------------------------------------------
/docs/notes/SQLAlchemy/hybrid_property.md:
--------------------------------------------------------------------------------
1 | # hybrid_property 的作用
2 |
3 | `sqlalchemy.ext.hybrid.hybrid_property` 在 SQLAlchemy 中是一个非常强大的功能,它有以下几个关键作用:
4 |
5 | 1. **双重访问模式**:它允许你定义一个方法,这个方法既可以像普通的 Python 属性一样在 Python 对象上访问,也可以在数据库查询中使用。
6 |
7 | 2. **表达式转换**:当你在 Python 对象上访问 hybrid_property 时,它执行 Python 代码;当你在查询中使用它时,它会被转换为适当的 SQL 表达式。
8 |
9 | 3. **计算属性**:它可以根据模型的其他属性动态计算值,而不需要实际存储这个值在数据库中。
10 |
11 | 在你的 `Note` 模型中,`hybrid_property` 被用来创建一个虚拟的 `title` 属性:
12 |
13 | ```python
14 | @hybrid_property
15 | def title(self):
16 | """Get primary title or first title as fallback"""
17 | primary = next((t for t in self.note_titles if t.is_primary), None)
18 | if primary:
19 | return primary.title
20 | return self.note_titles[0].title if self.note_titles else ""
21 | ```
22 |
23 | 这个属性的作用是:
24 | - 当你访问 `note.title` 时,它会检查关联的 `note_titles` 集合
25 | - 首先尝试找到一个被标记为主要的标题(`is_primary=True`)
26 | - 如果找到主要标题,返回它的内容
27 | - 如果没有主要标题,则返回第一个标题(如果有的话)
28 | - 如果没有任何标题,则返回空字符串
29 |
30 | 这样做的好处是,即使你移除了实际的 `title` 列,你的代码仍然可以像以前一样使用 `note.title` 这种写法,保持了 API 的一致性,同时支持了多标题的功能。
--------------------------------------------------------------------------------
/docs/screenshot2025-02-23.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/maxiee/RaySystem/ac35b8bf7201c167c7b493c6ae93e6eaee607b6e/docs/screenshot2025-02-23.png
--------------------------------------------------------------------------------
/emacs/main.el:
--------------------------------------------------------------------------------
1 | (let* ((current-file (or load-file-name buffer-file-name))
2 | (current-dir (file-name-directory current-file))
3 | (el-files (directory-files current-dir t "\\.el$")))
4 | (dolist (file el-files)
5 | (unless (equal file current-file)
6 | (load file))))
7 |
8 | ;; Still explicitly require any specific features needed
9 | (require 'ray-info)
10 |
--------------------------------------------------------------------------------
/raysystem/.gitignore:
--------------------------------------------------------------------------------
1 | .coverage
2 | logs/
--------------------------------------------------------------------------------
/raysystem/.python-version:
--------------------------------------------------------------------------------
1 | 3.13
2 |
--------------------------------------------------------------------------------
/raysystem/.vscode/settings.json:
--------------------------------------------------------------------------------
1 | {
2 | "python.analysis.typeCheckingMode": "standard",
3 | "python.analysis.autoImportCompletions": true,
4 | "python.testing.pytestArgs": [
5 | "tests"
6 | ],
7 | "python.testing.unittestEnabled": false,
8 | "python.testing.pytestEnabled": true
9 | }
--------------------------------------------------------------------------------
/raysystem/README.md:
--------------------------------------------------------------------------------
1 | # RaySystem
2 |
3 | A Python system monitoring and management tool.
4 |
5 | ## Features
6 |
7 | - System metrics monitoring (CPU, Memory, Disk, Network)
8 | - RESTful API interface
9 | - REPL command interface
10 | - OCR support
11 | - Browser automation
12 | - Task scheduling
13 | - File storage management
--------------------------------------------------------------------------------
/raysystem/make_migration.sh:
--------------------------------------------------------------------------------
1 | uv run alembic revision --autogenerate -m "RaySystem migration"
--------------------------------------------------------------------------------
/raysystem/migrations/README:
--------------------------------------------------------------------------------
1 | Generic single-database configuration.
--------------------------------------------------------------------------------
/raysystem/migrations/script.py.mako:
--------------------------------------------------------------------------------
1 | """${message}
2 |
3 | Revision ID: ${up_revision}
4 | Revises: ${down_revision | comma,n}
5 | Create Date: ${create_date}
6 |
7 | """
8 | from typing import Sequence, Union
9 |
10 | from alembic import op
11 | import sqlalchemy as sa
12 | ${imports if imports else ""}
13 |
14 | # revision identifiers, used by Alembic.
15 | revision: str = ${repr(up_revision)}
16 | down_revision: Union[str, None] = ${repr(down_revision)}
17 | branch_labels: Union[str, Sequence[str], None] = ${repr(branch_labels)}
18 | depends_on: Union[str, Sequence[str], None] = ${repr(depends_on)}
19 |
20 |
21 | def upgrade() -> None:
22 | ${upgrades if upgrades else "pass"}
23 |
24 |
25 | def downgrade() -> None:
26 | ${downgrades if downgrades else "pass"}
27 |
--------------------------------------------------------------------------------
/raysystem/migrations/versions/09a7180cb8b5_info_add_storage_html.py:
--------------------------------------------------------------------------------
1 | """[info] add storage_html
2 |
3 | Revision ID: 09a7180cb8b5
4 | Revises: 4ff507e26b13
5 | Create Date: 2025-01-12 11:34:24.688821
6 |
7 | """
8 | from typing import Sequence, Union
9 |
10 | from alembic import op
11 | import sqlalchemy as sa
12 |
13 |
14 | # revision identifiers, used by Alembic.
15 | revision: str = '09a7180cb8b5'
16 | down_revision: Union[str, None] = '4ff507e26b13'
17 | branch_labels: Union[str, Sequence[str], None] = None
18 | depends_on: Union[str, Sequence[str], None] = None
19 |
20 |
21 | def upgrade() -> None:
22 | # ### commands auto generated by Alembic - please adjust! ###
23 | op.add_column('info', sa.Column('storage_html', sa.String(), nullable=True))
24 | # ### end Alembic commands ###
25 |
26 |
27 | def downgrade() -> None:
28 | # ### commands auto generated by Alembic - please adjust! ###
29 | op.drop_column('info', 'storage_html')
30 | # ### end Alembic commands ###
31 |
--------------------------------------------------------------------------------
/raysystem/migrations/versions/1d2096bbfdff_raysystem_migration.py:
--------------------------------------------------------------------------------
1 | """RaySystem migration
2 |
3 | Revision ID: 1d2096bbfdff
4 | Revises: ce3a41c917b1
5 | Create Date: 2025-03-10 22:05:28.246978
6 |
7 | """
8 | from typing import Sequence, Union
9 |
10 | from alembic import op
11 | import sqlalchemy as sa
12 |
13 |
14 | # revision identifiers, used by Alembic.
15 | revision: str = '1d2096bbfdff'
16 | down_revision: Union[str, None] = 'ce3a41c917b1'
17 | branch_labels: Union[str, Sequence[str], None] = None
18 | depends_on: Union[str, Sequence[str], None] = None
19 |
20 |
21 | def upgrade() -> None:
22 | # ### commands auto generated by Alembic - please adjust! ###
23 | op.create_table('note',
24 | sa.Column('id', sa.Integer(), nullable=False),
25 | sa.Column('title', sa.String(), nullable=False),
26 | sa.Column('content_appflowy', sa.String(), nullable=False),
27 | sa.Column('created_at', sa.DateTime(), nullable=False),
28 | sa.Column('updated_at', sa.DateTime(), nullable=False),
29 | sa.PrimaryKeyConstraint('id')
30 | )
31 | op.create_index(op.f('ix_note_id'), 'note', ['id'], unique=False)
32 | op.create_index(op.f('ix_note_title'), 'note', ['title'], unique=False)
33 | # ### end Alembic commands ###
34 |
35 |
36 | def downgrade() -> None:
37 | # ### commands auto generated by Alembic - please adjust! ###
38 | op.drop_index(op.f('ix_note_title'), table_name='note')
39 | op.drop_index(op.f('ix_note_id'), table_name='note')
40 | op.drop_table('note')
41 | # ### end Alembic commands ###
42 |
--------------------------------------------------------------------------------
/raysystem/migrations/versions/4ff507e26b13_people_people_add_more_names.py:
--------------------------------------------------------------------------------
1 | """[people] people add more names
2 |
3 | Revision ID: 4ff507e26b13
4 | Revises:
5 | Create Date: 2025-01-08 18:58:18.475741
6 |
7 | """
8 | from typing import Sequence, Union
9 |
10 | from alembic import op
11 | import sqlalchemy as sa
12 |
13 |
14 | # revision identifiers, used by Alembic.
15 | revision: str = '4ff507e26b13'
16 | down_revision: Union[str, None] = None
17 | branch_labels: Union[str, Sequence[str], None] = None
18 | depends_on: Union[str, Sequence[str], None] = None
19 |
20 |
21 | def upgrade() -> None:
22 | # ### commands auto generated by Alembic - please adjust! ###
23 | op.add_column('people', sa.Column('name4', sa.String(), nullable=True))
24 | op.add_column('people', sa.Column('name5', sa.String(), nullable=True))
25 | op.create_index(op.f('ix_people_name4'), 'people', ['name4'], unique=False)
26 | op.create_index(op.f('ix_people_name5'), 'people', ['name5'], unique=False)
27 | # ### end Alembic commands ###
28 |
29 |
30 | def downgrade() -> None:
31 | # ### commands auto generated by Alembic - please adjust! ###
32 | op.drop_index(op.f('ix_people_name5'), table_name='people')
33 | op.drop_index(op.f('ix_people_name4'), table_name='people')
34 | op.drop_column('people', 'name5')
35 | op.drop_column('people', 'name4')
36 | # ### end Alembic commands ###
37 |
--------------------------------------------------------------------------------
/raysystem/migrations/versions/711ec8f2a63c_raysystem_migration.py:
--------------------------------------------------------------------------------
1 | """RaySystem migration
2 |
3 | Revision ID: 711ec8f2a63c
4 | Revises: 760764980ad9
5 | Create Date: 2025-03-27 00:28:23.538458
6 |
7 | """
8 | from typing import Sequence, Union
9 |
10 | from alembic import op
11 | import sqlalchemy as sa
12 |
13 |
14 | # revision identifiers, used by Alembic.
15 | revision: str = '711ec8f2a63c'
16 | down_revision: Union[str, None] = '760764980ad9'
17 | branch_labels: Union[str, Sequence[str], None] = None
18 | depends_on: Union[str, Sequence[str], None] = None
19 |
20 |
21 | def upgrade() -> None:
22 | # ### commands auto generated by Alembic - please adjust! ###
23 | with op.batch_alter_table('note', schema=None) as batch_op:
24 | batch_op.drop_index('ix_note_title')
25 | batch_op.drop_column('title')
26 |
27 | # ### end Alembic commands ###
28 |
29 |
30 | def downgrade() -> None:
31 | # ### commands auto generated by Alembic - please adjust! ###
32 | with op.batch_alter_table('note', schema=None) as batch_op:
33 | batch_op.add_column(sa.Column('title', sa.VARCHAR(), nullable=False))
34 | batch_op.create_index('ix_note_title', ['title'], unique=False)
35 |
36 | # ### end Alembic commands ###
37 |
--------------------------------------------------------------------------------
/raysystem/migrations/versions/ce3a41c917b1_raysystem_migration.py:
--------------------------------------------------------------------------------
1 | """RaySystem migration
2 |
3 | Revision ID: ce3a41c917b1
4 | Revises: 4918d64178d6
5 | Create Date: 2025-03-06 00:13:44.313800
6 |
7 | """
8 | from typing import Sequence, Union
9 |
10 | from alembic import op
11 | import sqlalchemy as sa
12 |
13 |
14 | # revision identifiers, used by Alembic.
15 | revision: str = 'ce3a41c917b1'
16 | down_revision: Union[str, None] = '4918d64178d6'
17 | branch_labels: Union[str, Sequence[str], None] = None
18 | depends_on: Union[str, Sequence[str], None] = None
19 |
20 |
21 | def upgrade() -> None:
22 | # ### commands auto generated by Alembic - please adjust! ###
23 | op.add_column('scheduled_task', sa.Column('schedule_type', sa.Enum('INTERVAL', 'CRON', 'EVENT', 'MANUAL', name='taskscheduletype'), server_default='interval', nullable=True))
24 | op.add_column('scheduled_task', sa.Column('cron_expression', sa.String(), nullable=True))
25 | op.add_column('scheduled_task', sa.Column('event_type', sa.String(), nullable=True))
26 | op.add_column('scheduled_task', sa.Column('enabled', sa.Boolean(), server_default='1', nullable=False))
27 | # ### end Alembic commands ###
28 |
29 |
30 | def downgrade() -> None:
31 | # ### commands auto generated by Alembic - please adjust! ###
32 | op.drop_column('scheduled_task', 'enabled')
33 | op.drop_column('scheduled_task', 'event_type')
34 | op.drop_column('scheduled_task', 'cron_expression')
35 | op.drop_column('scheduled_task', 'schedule_type')
36 | # ### end Alembic commands ###
37 |
--------------------------------------------------------------------------------
/raysystem/migrations/versions/e667c1aea8f1_site_rename_url_to_host.py:
--------------------------------------------------------------------------------
1 | """[site] rename url to host
2 |
3 | Revision ID: e667c1aea8f1
4 | Revises: 09a7180cb8b5
5 | Create Date: 2025-01-12 14:10:35.321234
6 |
7 | """
8 | from typing import Sequence, Union
9 |
10 | from alembic import op
11 | import sqlalchemy as sa
12 |
13 |
14 | # revision identifiers, used by Alembic.
15 | revision: str = 'e667c1aea8f1'
16 | down_revision: Union[str, None] = '09a7180cb8b5'
17 | branch_labels: Union[str, Sequence[str], None] = None
18 | depends_on: Union[str, Sequence[str], None] = None
19 |
20 |
21 | def upgrade() -> None:
22 | # ### commands auto generated by Alembic - please adjust! ###
23 | op.add_column('site', sa.Column('host', sa.String(), nullable=False))
24 | op.drop_index('ix_site_url', table_name='site')
25 | op.create_index(op.f('ix_site_host'), 'site', ['host'], unique=False)
26 | op.drop_column('site', 'url')
27 | # ### end Alembic commands ###
28 |
29 |
30 | def downgrade() -> None:
31 | # ### commands auto generated by Alembic - please adjust! ###
32 | op.add_column('site', sa.Column('url', sa.VARCHAR(), nullable=False))
33 | op.drop_index(op.f('ix_site_host'), table_name='site')
34 | op.create_index('ix_site_url', 'site', ['url'], unique=False)
35 | op.drop_column('site', 'host')
36 | # ### end Alembic commands ###
37 |
--------------------------------------------------------------------------------
/raysystem/migrations/versions/fc0446d32712_site_info_unique_for_host_and_url.py:
--------------------------------------------------------------------------------
1 | """[site & info] unique for host and url
2 |
3 | Revision ID: fc0446d32712
4 | Revises: e667c1aea8f1
5 | Create Date: 2025-01-12 16:25:27.552679
6 |
7 | """
8 | from typing import Sequence, Union
9 |
10 | from alembic import op
11 | import sqlalchemy as sa
12 |
13 |
14 | # revision identifiers, used by Alembic.
15 | revision: str = 'fc0446d32712'
16 | down_revision: Union[str, None] = 'e667c1aea8f1'
17 | branch_labels: Union[str, Sequence[str], None] = None
18 | depends_on: Union[str, Sequence[str], None] = None
19 |
20 |
21 | def upgrade() -> None:
22 | # ### commands auto generated by Alembic - please adjust! ###
23 | op.drop_index('ix_info_url', table_name='info')
24 | op.create_index(op.f('ix_info_url'), 'info', ['url'], unique=True)
25 | op.drop_index('ix_site_host', table_name='site')
26 | op.create_index(op.f('ix_site_host'), 'site', ['host'], unique=True)
27 | # ### end Alembic commands ###
28 |
29 |
30 | def downgrade() -> None:
31 | # ### commands auto generated by Alembic - please adjust! ###
32 | op.drop_index(op.f('ix_site_host'), table_name='site')
33 | op.create_index('ix_site_host', 'site', ['host'], unique=False)
34 | op.drop_index(op.f('ix_info_url'), table_name='info')
35 | op.create_index('ix_info_url', 'info', ['url'], unique=False)
36 | # ### end Alembic commands ###
37 |
--------------------------------------------------------------------------------
/raysystem/module/__init__.py:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/maxiee/RaySystem/ac35b8bf7201c167c7b493c6ae93e6eaee607b6e/raysystem/module/__init__.py
--------------------------------------------------------------------------------
/raysystem/module/base/__init__.py:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/maxiee/RaySystem/ac35b8bf7201c167c7b493c6ae93e6eaee607b6e/raysystem/module/base/__init__.py
--------------------------------------------------------------------------------
/raysystem/module/base/constants.py:
--------------------------------------------------------------------------------
1 | INFO_MODULE_NAME = "info"
2 | STORAGE_MODULE_NAME = "storage"
3 | DB_MODULE_NAME = "db"
4 |
--------------------------------------------------------------------------------
/raysystem/module/browser/__init__.py:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/maxiee/RaySystem/ac35b8bf7201c167c7b493c6ae93e6eaee607b6e/raysystem/module/browser/__init__.py
--------------------------------------------------------------------------------
/raysystem/module/crawler/__init__.py:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/maxiee/RaySystem/ac35b8bf7201c167c7b493c6ae93e6eaee607b6e/raysystem/module/crawler/__init__.py
--------------------------------------------------------------------------------
/raysystem/module/crawler/ddg/__init__.py:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/maxiee/RaySystem/ac35b8bf7201c167c7b493c6ae93e6eaee607b6e/raysystem/module/crawler/ddg/__init__.py
--------------------------------------------------------------------------------
/raysystem/module/crawler/rss/__init__.py:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/maxiee/RaySystem/ac35b8bf7201c167c7b493c6ae93e6eaee607b6e/raysystem/module/crawler/rss/__init__.py
--------------------------------------------------------------------------------
/raysystem/module/crawler/test/__init__.py:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/maxiee/RaySystem/ac35b8bf7201c167c7b493c6ae93e6eaee607b6e/raysystem/module/crawler/test/__init__.py
--------------------------------------------------------------------------------
/raysystem/module/crawler/test/test_crawler.py:
--------------------------------------------------------------------------------
1 | import asyncio
2 | import time
3 |
4 |
5 | async def crawler_test_task(**kwargs):
6 | print("Test crawler task executed at {}".format(time.time()))
7 | print(kwargs)
8 | await asyncio.sleep(1)
9 | print("Test crawler task finished at {}".format(time.time()))
10 |
--------------------------------------------------------------------------------
/raysystem/module/db/__init__.py:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/maxiee/RaySystem/ac35b8bf7201c167c7b493c6ae93e6eaee607b6e/raysystem/module/db/__init__.py
--------------------------------------------------------------------------------
/raysystem/module/db/base.py:
--------------------------------------------------------------------------------
1 | from sqlalchemy.orm import DeclarativeBase
2 |
3 | class Base(DeclarativeBase):
4 | pass
--------------------------------------------------------------------------------
/raysystem/module/db/db.py:
--------------------------------------------------------------------------------
1 | from pathlib import Path
2 | from typing import AsyncGenerator, Union
3 |
4 | from module.base.constants import DB_MODULE_NAME
5 | from module.db.base import Base
6 | from module.fs.fs import fs_get_module_data_path, fs_make_sure_module_data_path_exists
7 | from sqlalchemy.ext.asyncio import AsyncEngine, create_async_engine, async_sessionmaker
8 | from sqlalchemy.ext.asyncio import AsyncSession
9 |
10 |
11 | DB_ENGINE: Union[AsyncEngine, None] = None
12 |
13 | def db_get_db_path() -> Path:
14 | return fs_get_module_data_path(DB_MODULE_NAME) / "db.sqlite3"
15 |
16 | async def get_db_session() -> AsyncGenerator[AsyncSession, None]:
17 | session = db_async_session()
18 | try:
19 | yield session
20 | finally:
21 | await session.close()
22 |
23 | def db_async_session() -> AsyncSession:
24 | return async_sessionmaker(DB_ENGINE, class_=AsyncSession, expire_on_commit=False)()
25 |
26 |
27 | async def init_db():
28 | global DB_ENGINE
29 | # Create the data directory if it doesn't exist
30 | fs_make_sure_module_data_path_exists(DB_MODULE_NAME)
31 | DB_ENGINE = create_async_engine(f"sqlite+aiosqlite:///{db_get_db_path()}")
32 | async with DB_ENGINE.begin() as conn:
33 | await conn.run_sync(Base.metadata.create_all)
34 | print("DB module initialized")
35 | # async with db_async_session() as session:
36 | # site = Site(name="新浪微博", url="https://weibo.com")
37 | # session.add(site)
38 | # await session.commit()
39 | # print("Site added")
40 |
--------------------------------------------------------------------------------
/raysystem/module/early_sleeping/__init__.py:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/maxiee/RaySystem/ac35b8bf7201c167c7b493c6ae93e6eaee607b6e/raysystem/module/early_sleeping/__init__.py
--------------------------------------------------------------------------------
/raysystem/module/early_sleeping/early_sleeping.py:
--------------------------------------------------------------------------------
1 | from datetime import datetime
2 | import random
3 |
4 | def early_sleeping__gen_date():
5 | """get the date today in Chinese"""
6 | weekdays = ['一', '二', '三', '四', '五', '六', '日']
7 |
8 | now = datetime.now()
9 | weekday = weekdays[now.weekday()]
10 |
11 | return f"今天是 {now.month}月{now.day}日 星期{weekday}"
12 |
13 | def early_sleeping__stoic_question():
14 | questions = [
15 | "今天你是否被一些不受你控制的事情困扰?请记住,我们只能控制自己的态度和反应。",
16 | "如果今天是你生命的最后一天,你最想完成什么?",
17 | "今天你是否在追求真正重要的事情,还是被琐事分散了注意力?",
18 | "你今天的行动是否符合你的核心价值观?",
19 | "如果有人像你对待自己那样对待你的朋友,你会作何感想?",
20 | "今天的困境中,什么是你能够控制的,什么是无法控制的?",
21 | "你的幸福是否依赖于外部环境,而不是你的内在?",
22 | "今天的挫折如何帮助你成长?",
23 | "你是否在用理性还是情绪来回应今天的挑战?"
24 | ]
25 | return random.choice(questions)
26 |
27 | def early_sleeping_gen_diary():
28 | str = ''
29 | str += early_sleeping__gen_date() + '\n'
30 | str += '''
31 | 我有晚睡的坏习惯,我想请你帮助我改掉这个坏习惯,实现早睡早起。我为什么要早起?有两个核心原因:
32 |
33 | 1. 早上是我和孩子唯一的时间交集,我想早起陪伴孩子,这对孩子的成长和我和孩子之间的关系都是非常有益的。
34 | 2. 我的身体状况不是很好,如果再晚睡下去,我的身体会出大问题。
35 |
36 | 但是我有很多愁绪,阻止我入睡。接下来,我会列出阻止我入睡的原因,希望你能帮我解决这些问题。
37 |
38 | ## 阻止我入睡的原因
39 |
40 | ## 每日斯多葛
41 | ''' + early_sleeping__stoic_question() + '''
42 |
43 | 以上就是我今晚的愁绪,希望你能帮我解决这些问题,让我早睡早起,谢谢你!
44 | '''
45 | return str
--------------------------------------------------------------------------------
/raysystem/module/fs/README.md:
--------------------------------------------------------------------------------
1 | # Data Module
2 |
3 | The data module handles the data storage location management for RaySystem.
4 |
5 | ## Features
6 |
7 | - Manages the default data storage location (`~/RaySystem`)
8 | - Provides functions to get and set the data storage path
9 | - Ensures the data directory exists during initialization
10 |
11 | ## API Reference
12 |
13 | ### `data_path`
14 |
15 | The global variable that stores the current data storage path. By default, it points to `~/RaySystem`.
16 |
17 | ### `set_data_path(path: str)`
18 |
19 | Sets a custom data storage path.
20 |
21 | - `path`: A string representing the new data storage path
22 |
23 | ### `get_data_path() -> Path`
24 |
25 | Returns the current data storage path as a `Path` object.
26 |
27 | ### `init_data_module()`
28 |
29 | Initializes the data module by creating the data directory if it doesn't exist.
30 |
--------------------------------------------------------------------------------
/raysystem/module/fs/__init__.py:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/maxiee/RaySystem/ac35b8bf7201c167c7b493c6ae93e6eaee607b6e/raysystem/module/fs/__init__.py
--------------------------------------------------------------------------------
/raysystem/module/fs/fs.py:
--------------------------------------------------------------------------------
1 | from pathlib import Path
2 |
3 | # Where the data of RaySystem is stored
4 | # Default data path
5 | data_path = Path.home() / "RaySystem"
6 |
7 |
8 | def fs_set_data_path(path: str):
9 | global data_path
10 | data_path = Path(path).expanduser()
11 |
12 |
13 | def fs_get_data_path() -> Path:
14 | return data_path
15 |
16 |
17 | def fs_get_module_data_path(module_name: str) -> Path:
18 | return data_path / module_name
19 |
20 |
21 | def fs_make_sure_module_data_path_exists(module_name: str):
22 | module_data_path = fs_get_module_data_path(module_name)
23 | module_data_path.mkdir(exist_ok=True)
24 |
25 |
26 | def init_fs_module():
27 | # Create the data directory if it doesn't exist
28 | data_path.mkdir(exist_ok=True)
29 | print("Data module initialized")
30 |
--------------------------------------------------------------------------------
/raysystem/module/http/__init__.py:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/maxiee/RaySystem/ac35b8bf7201c167c7b493c6ae93e6eaee607b6e/raysystem/module/http/__init__.py
--------------------------------------------------------------------------------
/raysystem/module/http/http.py:
--------------------------------------------------------------------------------
1 | from fastapi import FastAPI
2 | from module.llm import llm_router
3 | from module.people import router as people_router
4 |
5 | APP = FastAPI()
6 |
7 | APP.include_router(llm_router)
8 | APP.include_router(people_router)
9 |
10 |
11 | @APP.get("/hello")
12 | async def heelo_world():
13 | return {"hello": "world"}
14 |
--------------------------------------------------------------------------------
/raysystem/module/info/__init__.py:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/maxiee/RaySystem/ac35b8bf7201c167c7b493c6ae93e6eaee607b6e/raysystem/module/info/__init__.py
--------------------------------------------------------------------------------
/raysystem/module/info/utils.py:
--------------------------------------------------------------------------------
1 | from urllib.parse import urlparse
2 |
3 |
4 | def info_extract_host_from_url(url: str) -> str:
5 | """
6 | 从 url 中提取 host,并去除 'www.' 前缀
7 | """
8 | parsed_url = urlparse(url)
9 | host = parsed_url.hostname
10 |
11 | if host is None:
12 | # Exception: Invalid url: /dict/search?q=flutter&FORM=BDVSP2&qpvt=flutter
13 | raise Exception("Invalid url: " + url)
14 |
15 | host = str(host)
16 |
17 | # 如果 host 以 'www.' 开头,则去除这个前缀
18 | if host.startswith("www."):
19 | host = host[4:]
20 |
21 | return host
--------------------------------------------------------------------------------
/raysystem/module/llm/__init__.py:
--------------------------------------------------------------------------------
1 | # filepath: raysystem/module/llm/__init__.py
2 | """
3 | LLM Module for interacting with OpenAI-compatible services.
4 | Provides FastAPI endpoints and core service logic.
5 | """
6 | from .api import router as llm_router
7 |
8 | __all__ = ["llm_router"]
9 |
10 | # Remember to include these routers in your main FastAPI application:
11 | #
12 | # from fastapi import FastAPI
13 | # from raysystem.module.llm import llm_router
14 | #
15 | # app = FastAPI()
16 | # app.include_router(llm_router)
17 | #
18 | # # ... other app setup
19 |
--------------------------------------------------------------------------------
/raysystem/module/llm/model.py:
--------------------------------------------------------------------------------
1 | from datetime import datetime
2 | from sqlalchemy import Integer, String, DateTime, ForeignKey, Boolean, select, func
3 | from sqlalchemy.orm import Mapped, mapped_column, relationship
4 | from module.db.base import Base
5 |
6 |
7 | class ChatSession(Base):
8 | """
9 | ChatSession - stores user chat conversations with LLM models
10 | """
11 |
12 | __tablename__ = "llm_chat_session"
13 |
14 | # Chat session ID (primary key)
15 | id: Mapped[int] = mapped_column(Integer, primary_key=True, index=True)
16 |
17 | # Session title
18 | title: Mapped[str] = mapped_column(String(255), index=True)
19 |
20 | # Model used for this chat session
21 | model_name: Mapped[str] = mapped_column(String(100), index=True)
22 |
23 | # Chat content in JSON format (stored as string)
24 | content_json: Mapped[str] = mapped_column(String)
25 |
26 | # Session creation timestamp
27 | created_at: Mapped[datetime] = mapped_column(DateTime, default=datetime.now)
28 |
29 | # Session last update timestamp
30 | updated_at: Mapped[datetime] = mapped_column(
31 | DateTime, default=datetime.now, onupdate=datetime.now
32 | )
33 |
--------------------------------------------------------------------------------
/raysystem/module/note/__init__.py:
--------------------------------------------------------------------------------
1 | from module.note.note import init_note
2 | from module.note.api import init_note_api
3 | from module.note.events import init_note_events
4 |
5 | def init():
6 | """Initialize the note module"""
7 | init_note()
8 | init_note_api()
9 | init_note_events()
10 |
--------------------------------------------------------------------------------
/raysystem/module/note/events.py:
--------------------------------------------------------------------------------
1 | from sqlalchemy import event, select, update, func
2 | from module.note.model import Note
3 |
4 | @event.listens_for(Note, 'after_insert')
5 | def update_parent_has_children_on_insert(mapper, connection, target):
6 | """Update parent's has_children flag when a note is inserted"""
7 | # Skip if no parent
8 | if target.parent_id is None:
9 | return
10 |
11 | # Update parent's has_children flag to True since we're adding a child
12 | connection.execute(
13 | update(Note).
14 | where(Note.id == target.parent_id).
15 | values(has_children=True)
16 | )
17 |
18 | @event.listens_for(Note, 'after_delete')
19 | def update_parent_has_children_on_delete(mapper, connection, target):
20 | """Update parent's has_children flag when a note is deleted"""
21 | # Skip if no parent
22 | if target.parent_id is None:
23 | return
24 |
25 | # Count remaining children for the parent
26 | stmt = select(func.count(Note.id)).where(Note.parent_id == target.parent_id)
27 | count = connection.execute(stmt).scalar()
28 |
29 | # Update parent's has_children flag based on remaining children count
30 | connection.execute(
31 | update(Note).
32 | where(Note.id == target.parent_id).
33 | values(has_children=(count > 0))
34 | )
35 |
36 | def init_note_events():
37 | """Initialize note event listeners"""
38 | print("Note event listeners initialized")
39 |
--------------------------------------------------------------------------------
/raysystem/module/note/schema.py:
--------------------------------------------------------------------------------
1 | # 标题
2 | from typing import List, Optional
3 | from pydantic import BaseModel
4 | from datetime import datetime
5 |
6 |
7 | class NoteTitleBase(BaseModel):
8 | title: str
9 | is_primary: bool = False
10 |
11 |
12 | class NoteTitleCreate(NoteTitleBase):
13 | pass
14 |
15 |
16 | class NoteTitleUpdate(NoteTitleBase):
17 | pass
18 |
19 |
20 | class NoteTitleResponse(NoteTitleBase):
21 | id: int
22 | note_id: int
23 | created_at: datetime
24 |
25 | class Config:
26 | from_attributes = True
27 |
28 |
29 | # 笔记
30 | class NoteBase(BaseModel):
31 | content_appflowy: str
32 | parent_id: Optional[int] = None
33 |
34 |
35 | class NoteCreate(NoteBase):
36 | titles: List[NoteTitleCreate] = [] # 创建时可以同时提供多个标题
37 |
38 |
39 | class NoteUpdate(NoteBase):
40 | pass
41 |
42 |
43 | class NoteResponse(NoteBase):
44 | id: int
45 | note_titles: List[NoteTitleResponse] # 返回标题列表
46 | has_children: bool
47 | created_at: datetime
48 | updated_at: datetime
49 |
50 | class Config:
51 | from_attributes = True
52 |
53 |
54 | class NotesListResponse(BaseModel):
55 | total: int
56 | items: List[NoteResponse]
57 |
58 |
59 | class NoteTreeResponse(BaseModel):
60 | total: int
61 | items: List[NoteResponse]
62 |
--------------------------------------------------------------------------------
/raysystem/module/ocr/__init__.py:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/maxiee/RaySystem/ac35b8bf7201c167c7b493c6ae93e6eaee607b6e/raysystem/module/ocr/__init__.py
--------------------------------------------------------------------------------
/raysystem/module/ocr/api.py:
--------------------------------------------------------------------------------
1 | from fastapi import File, UploadFile
2 | from PIL import Image
3 | from io import BytesIO
4 | from module.http.http import APP
5 | from module.ocr.ocr import ocr_text_from_image_path
6 |
7 | @APP.post("/ocr/recognize")
8 | async def recognize_text(file: UploadFile = File(...)):
9 | """
10 | 接收图片文件并进行 OCR 文字识别
11 |
12 | :param file: 上传的图片文件
13 | :return: 识别出的文字内容
14 | """
15 | try:
16 | # 读取上传的文件内容
17 | contents = await file.read()
18 |
19 | # 使用 PIL 创建图片对象
20 | image = Image.open(BytesIO(contents))
21 |
22 | # 调用 OCR 识别函数
23 | text = ocr_text_from_image_path(image)
24 |
25 | return {"text": text}
26 | except Exception as e:
27 | return {"error": str(e)}
28 |
29 | def init_ocr_api():
30 | print("OCR API initialized")
--------------------------------------------------------------------------------
/raysystem/module/ocr/ocr.py:
--------------------------------------------------------------------------------
1 | from ocrmac import ocrmac
2 |
3 |
4 | def ocr_text_from_image_path(image_path) -> str:
5 | ocr_ret = ocrmac.OCR(
6 | image_path,
7 | recognition_level="accurate",
8 | language_preference=["zh-Hans", "en-US"],
9 | ).recognize()
10 | return "\n".join([annotation[0] for annotation in ocr_ret])
11 |
--------------------------------------------------------------------------------
/raysystem/module/people/__init__.py:
--------------------------------------------------------------------------------
1 | from .api import router
2 |
--------------------------------------------------------------------------------
/raysystem/module/people/model.py:
--------------------------------------------------------------------------------
1 | from typing import Optional
2 | from sqlalchemy import Integer, String, Date, ForeignKey
3 | from module.db.base import Base
4 | from sqlalchemy.orm import Mapped, mapped_column, relationship
5 | from datetime import date
6 |
7 |
8 | class PeopleName(Base):
9 | """
10 | 人物名称表
11 | """
12 |
13 | __tablename__ = "people_name"
14 |
15 | id: Mapped[int] = mapped_column(Integer, primary_key=True, index=True)
16 | people_id: Mapped[int] = mapped_column(ForeignKey("people.id"), nullable=False)
17 | name: Mapped[str] = mapped_column(String, index=True, nullable=False)
18 |
19 | # Relationship with People
20 | people = relationship("People", back_populates="names")
21 |
22 |
23 | class People(Base):
24 | """
25 | 人物
26 | """
27 |
28 | __tablename__ = "people"
29 |
30 | id: Mapped[int] = mapped_column(Integer, primary_key=True, index=True)
31 | description: Mapped[Optional[str]] = mapped_column(String, nullable=True)
32 | avatar: Mapped[Optional[str]] = mapped_column(String, nullable=True)
33 | birth_date: Mapped[Optional[date]] = mapped_column(Date, nullable=True)
34 |
35 | # Relationship with PeopleName
36 | names = relationship(
37 | "PeopleName", back_populates="people", cascade="all, delete-orphan"
38 | )
39 |
--------------------------------------------------------------------------------
/raysystem/module/people/people.py:
--------------------------------------------------------------------------------
1 | from module.people.model import People
2 |
3 | def init_people_module():
4 | print("People module initialized")
--------------------------------------------------------------------------------
/raysystem/module/people/schemas.py:
--------------------------------------------------------------------------------
1 | from typing import List, Optional
2 | from pydantic import BaseModel, validator
3 | from datetime import date
4 |
5 |
6 | class PeopleNameBase(BaseModel):
7 | name: str
8 |
9 |
10 | class PeopleNameCreate(PeopleNameBase):
11 | pass
12 |
13 |
14 | class PeopleNameResponse(PeopleNameBase):
15 | id: int
16 | people_id: int
17 |
18 | class Config:
19 | from_attributes = True
20 |
21 |
22 | class PeopleBase(BaseModel):
23 | description: Optional[str] = None
24 | avatar: Optional[str] = None
25 | birth_date: Optional[date] = None
26 |
27 |
28 | class PeopleCreate(PeopleBase):
29 | pass
30 |
31 |
32 | class PeopleUpdate(PeopleBase):
33 | pass
34 |
35 |
36 | class PeopleResponse(PeopleBase):
37 | id: int
38 | names: List[PeopleNameResponse] = []
39 |
40 | class Config:
41 | from_attributes = True
42 |
43 |
44 | class PeopleListResponse(BaseModel):
45 | """分页人物列表响应"""
46 |
47 | items: List[PeopleResponse]
48 | total: int
49 | page: int
50 | page_size: int
51 | total_pages: int
52 |
53 | class Config:
54 | from_attributes = True
55 |
--------------------------------------------------------------------------------
/raysystem/module/repl/__init__.py:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/maxiee/RaySystem/ac35b8bf7201c167c7b493c6ae93e6eaee607b6e/raysystem/module/repl/__init__.py
--------------------------------------------------------------------------------
/raysystem/module/storage/README.md:
--------------------------------------------------------------------------------
1 | # Storage Module
2 |
3 | This module provides functionalities for storing and retrieving files using SHA256 hashes. It supports adding files from paths and byte arrays, retrieving files by SHA256ed filenames or URIs, and deleting files.
4 |
5 | ## Functions
6 |
7 | ### `storage_add_file_from_path(file_path: str, bucket="default") -> str`
8 |
9 | Adds a file to the storage from a file path.
10 |
11 | ### `storage_add_file_from_path_protocol(file_path: str, bucket="default")`
12 |
13 | Adds a file to the storage from a file path and returns a URI.
14 |
15 | ### `storage_add_file_from_bytes(data: bytes, bucket="default", extension=".bin") -> str`
16 |
17 | Adds a file to the storage from a byte array.
18 |
19 | ### `storage_add_file_from_bytes_protocol(data: bytes, bucket="default", extension=".bin")`
20 |
21 | Adds a file to the storage from a byte array and returns a URI.
22 |
23 | ### `storage_get_file_by_sha256ed_filename(sha256ed_filename: str, bucket="default")`
24 |
25 | Retrieves a file from storage by its SHA256ed filename.
26 |
27 | ### `storage_get_file_by_protocol(uri: str)`
28 |
29 | Retrieves a file using the `storage://bucket:sha256.extension` protocol.
30 |
31 | ### `storage_delete_file_by_sha256ed_filename(sha256ed_filename: str, bucket="default")`
32 |
33 | Deletes a file from storage by its SHA256ed filename.
34 |
35 | ### `storgae_delete_file_by_protocol(uri: str)`
36 |
37 | Deletes a file using the `storage://bucket:sha256.extension` protocol.
38 |
39 | ### `init_storage_module()`
40 |
41 | Initializes the storage module by ensuring the module data path exists.
42 |
43 | ## Usage
44 |
45 | 1. **Initialize the storage module:**
46 |
--------------------------------------------------------------------------------
/raysystem/module/storage/__init__.py:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/maxiee/RaySystem/ac35b8bf7201c167c7b493c6ae93e6eaee607b6e/raysystem/module/storage/__init__.py
--------------------------------------------------------------------------------
/raysystem/module/system/__init__.py:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/maxiee/RaySystem/ac35b8bf7201c167c7b493c6ae93e6eaee607b6e/raysystem/module/system/__init__.py
--------------------------------------------------------------------------------
/raysystem/module/system/api.py:
--------------------------------------------------------------------------------
1 | from fastapi import APIRouter
2 | from module.http.http import APP
3 | from module.system.system import get_system_metrics, SystemMetrics
4 | from typing import Dict, Union
5 |
6 |
7 | @APP.get("/system/metrics")
8 | async def get_metrics() -> Union[SystemMetrics, Dict[str, str]]:
9 | """
10 | Get current system metrics including:
11 | - CPU usage
12 | - Memory usage (including swap)
13 | - Disk usage and IO speeds
14 | - Network speeds
15 |
16 | :return: SystemMetrics object containing all system metrics
17 | """
18 | try:
19 | metrics = get_system_metrics()
20 | # print("\n=== System Metrics ===")
21 | # print(f"{metrics}")
22 | return metrics
23 | except Exception as e:
24 | return {"error": str(e)}
25 |
26 |
27 | def init_system_api():
28 | print("System monitoring API initialized")
29 |
--------------------------------------------------------------------------------
/raysystem/module/task_queue/__init__.py:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/maxiee/RaySystem/ac35b8bf7201c167c7b493c6ae93e6eaee607b6e/raysystem/module/task_queue/__init__.py
--------------------------------------------------------------------------------
/raysystem/module/task_scheduler/__init__.py:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/maxiee/RaySystem/ac35b8bf7201c167c7b493c6ae93e6eaee607b6e/raysystem/module/task_scheduler/__init__.py
--------------------------------------------------------------------------------
/raysystem/open_config.sh:
--------------------------------------------------------------------------------
1 | code-insiders ~/.RaySystemConfig.yaml
--------------------------------------------------------------------------------
/raysystem/pyproject.toml:
--------------------------------------------------------------------------------
1 | [project]
2 | name = "raysystem"
3 | version = "0.1.0"
4 | description = "A Python system monitoring and management tool"
5 | readme = "README.md"
6 | requires-python = ">=3.13"
7 | dependencies = [
8 | "aiohttp>=3.11.11",
9 | "aiosqlite>=0.20.0",
10 | "alembic>=1.14.0",
11 | "croniter>=6.0.0",
12 | "duckduckgo-search>=7.4.2",
13 | "fastapi>=0.115.6",
14 | "feedparser>=6.0.11",
15 | "greenlet>=3.1.1",
16 | "markdownify>=0.14.1",
17 | "ocrmac>=1.0.0",
18 | "openai>=1.72.0",
19 | "pagesnap>=0.0.2",
20 | "playwright>=1.49.1",
21 | "psutil>=5.9.8",
22 | "pytest>=8.3.4",
23 | "python-multipart>=0.0.20",
24 | "pyyaml>=6.0.2",
25 | "sqlalchemy>=2.0.36",
26 | "uvicorn>=0.34.0",
27 | ]
28 |
29 | [tool.setuptools]
30 | packages = ["module", "migrations"]
31 |
32 | [tool.pytest.ini_options]
33 | asyncio_default_fixture_loop_scope = "session"
34 |
--------------------------------------------------------------------------------
/raysystem/raysystem.egg-info/requires.txt:
--------------------------------------------------------------------------------
1 | aiohttp>=3.11.11
2 | aiosqlite>=0.20.0
3 | alembic>=1.14.0
4 | fastapi>=0.115.6
5 | feedparser>=6.0.11
6 | greenlet>=3.1.1
7 | markdownify>=0.14.1
8 | ocrmac>=1.0.0
9 | pagesnap>=0.0.2
10 | playwright>=1.49.1
11 | psutil>=5.9.8
12 | pytest>=8.3.4
13 | python-multipart>=0.0.20
14 | pyyaml>=6.0.2
15 | sqlalchemy>=2.0.36
16 | uvicorn>=0.34.0
17 |
--------------------------------------------------------------------------------
/raysystem/run_migrate.sh:
--------------------------------------------------------------------------------
1 | uv run alembic upgrade head
--------------------------------------------------------------------------------
/raysystem/run_tests.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 | # Run pytest with coverage and output results
3 | pytest --cov=module --cov-report=term-missing --maxfail=3 --disable-warnings "$@"
--------------------------------------------------------------------------------
/raysystem/tests/__init__.py:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/maxiee/RaySystem/ac35b8bf7201c167c7b493c6ae93e6eaee607b6e/raysystem/tests/__init__.py
--------------------------------------------------------------------------------
/raysystem/tests/module/__init__.py:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/maxiee/RaySystem/ac35b8bf7201c167c7b493c6ae93e6eaee607b6e/raysystem/tests/module/__init__.py
--------------------------------------------------------------------------------
/raysystem/tests/module/info/__init__.py:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/maxiee/RaySystem/ac35b8bf7201c167c7b493c6ae93e6eaee607b6e/raysystem/tests/module/info/__init__.py
--------------------------------------------------------------------------------
/raysystem/tests/module/info/test_utils.py:
--------------------------------------------------------------------------------
1 | import re
2 | import pytest
3 | from module.info.utils import info_extract_host_from_url
4 |
5 | def test_info_extract_host_from_url_with_www():
6 | url = "http://www.example.com"
7 | expected_host = "example.com"
8 | assert info_extract_host_from_url(url) == expected_host
9 |
10 | def test_info_extract_host_from_url_without_www():
11 | url = "http://example.com"
12 | expected_host = "example.com"
13 | assert info_extract_host_from_url(url) == expected_host
14 |
15 | def test_info_extract_host_from_url_with_subdomain():
16 | url = "http://blog.example.com"
17 | expected_host = "blog.example.com"
18 | assert info_extract_host_from_url(url) == expected_host
19 |
20 | def test_info_extract_host_from_url_invalid_url():
21 | url = "/dict/search?q=flutter&FORM=BDVSP2&qpvt=flutter"
22 | with pytest.raises(Exception, match=re.escape("Invalid url: " + url)):
23 | info_extract_host_from_url(url)
24 |
25 | def test_info_extract_host_from_url_with_https():
26 | url = "https://www.example.com"
27 | expected_host = "example.com"
28 | assert info_extract_host_from_url(url) == expected_host
29 |
30 | def test_info_extract_host_from_url_with_port():
31 | url = "http://www.example.com:8080"
32 | expected_host = "example.com"
33 | assert info_extract_host_from_url(url) == expected_host
--------------------------------------------------------------------------------
/raysystem/tests/module/note/__init__.py:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/maxiee/RaySystem/ac35b8bf7201c167c7b493c6ae93e6eaee607b6e/raysystem/tests/module/note/__init__.py
--------------------------------------------------------------------------------
/raysystem/utils/__init__.py:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/maxiee/RaySystem/ac35b8bf7201c167c7b493c6ae93e6eaee607b6e/raysystem/utils/__init__.py
--------------------------------------------------------------------------------
/raysystem/utils/config.py:
--------------------------------------------------------------------------------
1 | import yaml
2 | import os.path
3 |
4 |
5 | def load_config_file() -> dict:
6 | """Load configuration from ~/.RaySystemConfig.yaml"""
7 | config_path = os.path.expanduser("~/.RaySystemConfig.yaml")
8 | try:
9 | with open(config_path, "r") as f:
10 | return yaml.safe_load(f)
11 | except FileNotFoundError:
12 | return {}
13 | except yaml.YAMLError as e:
14 | print(f"Error parsing config file: {e}")
15 | return {}
16 |
--------------------------------------------------------------------------------
/raysystem/utils/file.py:
--------------------------------------------------------------------------------
1 | import hashlib
2 |
3 |
4 | def compute_sha256_from_file(file_path: str) -> str:
5 | """
6 | Compute the SHA256 hash of a file.
7 |
8 | :param file_path: Path to the file.
9 | :return: SHA256 hash as a hex string.
10 | """
11 | sha256 = hashlib.sha256()
12 | with open(file_path, "rb") as f:
13 | for byte_block in iter(lambda: f.read(4096), b""):
14 | sha256.update(byte_block)
15 | return sha256.hexdigest()
16 |
17 |
18 | def compute_sha256_from_bytes(data: bytes) -> str:
19 | """
20 | Compute the SHA256 hash of a byte array.
21 |
22 | :param data: Byte array.
23 | :return: SHA256 hash as a hex string.
24 | """
25 | sha256 = hashlib.sha256()
26 | sha256.update(data)
27 | return sha256.hexdigest()
28 |
29 |
30 | def get_file_extension_from_path(file_path: str) -> str:
31 | """
32 | Get the file extension from a file path.
33 |
34 | :param file_path: Path to the file.
35 | :return: File extension.
36 | """
37 | return file_path.split(".")[-1]
38 |
--------------------------------------------------------------------------------
/raysystem_flutter/.gitignore:
--------------------------------------------------------------------------------
1 | # Miscellaneous
2 | *.class
3 | *.log
4 | *.pyc
5 | *.swp
6 | .DS_Store
7 | .atom/
8 | .build/
9 | .buildlog/
10 | .history
11 | .svn/
12 | .swiftpm/
13 | migrate_working_dir/
14 |
15 | # IntelliJ related
16 | *.iml
17 | *.ipr
18 | *.iws
19 | .idea/
20 |
21 | # The .vscode folder contains launch configuration and tasks you configure in
22 | # VS Code which you may wish to be included in version control, so this line
23 | # is commented out by default.
24 | #.vscode/
25 |
26 | # Flutter/Dart/Pub related
27 | **/doc/api/
28 | **/ios/Flutter/.last_build_id
29 | .dart_tool/
30 | .flutter-plugins
31 | .flutter-plugins-dependencies
32 | .pub-cache/
33 | .pub/
34 | /build/
35 |
36 | # Symbolication related
37 | app.*.symbols
38 |
39 | # Obfuscation related
40 | app.*.map.json
41 |
42 | # Android Studio will place build artifacts here
43 | /android/app/debug
44 | /android/app/profile
45 | /android/app/release
46 |
--------------------------------------------------------------------------------
/raysystem_flutter/.vscode/launch.json:
--------------------------------------------------------------------------------
1 | {
2 | // Use IntelliSense to learn about possible attributes.
3 | // Hover to view descriptions of existing attributes.
4 | // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
5 | "version": "0.2.0",
6 | "configurations": [
7 |
8 | {
9 | "name": "raysystem_flutter",
10 | "request": "launch",
11 | "type": "dart"
12 | },
13 | {
14 | "name": "raysystem_flutter (profile mode)",
15 | "request": "launch",
16 | "type": "dart",
17 | "flutterMode": "profile"
18 | },
19 | {
20 | "name": "raysystem_flutter (release mode)",
21 | "request": "launch",
22 | "type": "dart",
23 | "flutterMode": "release"
24 | }
25 | ]
26 | }
--------------------------------------------------------------------------------
/raysystem_flutter/README.md:
--------------------------------------------------------------------------------
1 | # raysystem_flutter
2 |
3 | A new Flutter project.
4 |
5 | ## Getting Started
6 |
7 | This project is a starting point for a Flutter application.
8 |
9 | A few resources to get you started if this is your first Flutter project:
10 |
11 | - [Lab: Write your first Flutter app](https://docs.flutter.dev/get-started/codelab)
12 | - [Cookbook: Useful Flutter samples](https://docs.flutter.dev/cookbook)
13 |
14 | For help getting started with Flutter development, view the
15 | [online documentation](https://docs.flutter.dev/), which offers tutorials,
16 | samples, guidance on mobile development, and a full API reference.
17 |
--------------------------------------------------------------------------------
/raysystem_flutter/analysis_options.yaml:
--------------------------------------------------------------------------------
1 | # This file configures the analyzer, which statically analyzes Dart code to
2 | # check for errors, warnings, and lints.
3 | #
4 | # The issues identified by the analyzer are surfaced in the UI of Dart-enabled
5 | # IDEs (https://dart.dev/tools#ides-and-editors). The analyzer can also be
6 | # invoked from the command line by running `flutter analyze`.
7 |
8 | # The following line activates a set of recommended lints for Flutter apps,
9 | # packages, and plugins designed to encourage good coding practices.
10 | include: package:flutter_lints/flutter.yaml
11 |
12 | linter:
13 | # The lint rules applied to this project can be customized in the
14 | # section below to disable rules from the `package:flutter_lints/flutter.yaml`
15 | # included above or to enable additional rules. A list of all available lints
16 | # and their documentation is published at https://dart.dev/lints.
17 | #
18 | # Instead of disabling a lint rule for the entire project in the
19 | # section below, it can also be suppressed for a single line of code
20 | # or a specific dart file by using the `// ignore: name_of_lint` and
21 | # `// ignore_for_file: name_of_lint` syntax on the line or in the file
22 | # producing the lint.
23 | rules:
24 | # avoid_print: false # Uncomment to disable the `avoid_print` rule
25 | # prefer_single_quotes: true # Uncomment to enable the `prefer_single_quotes` rule
26 | analyzer:
27 | plugins:
28 | - custom_lint
29 | # Additional information about this file can be found at
30 | # https://dart.dev/guides/language/analysis-options
31 |
--------------------------------------------------------------------------------
/raysystem_flutter/android/.gitignore:
--------------------------------------------------------------------------------
1 | gradle-wrapper.jar
2 | /.gradle
3 | /captures/
4 | /gradlew
5 | /gradlew.bat
6 | /local.properties
7 | GeneratedPluginRegistrant.java
8 |
9 | # Remember to never publicly share your keystore.
10 | # See https://flutter.dev/to/reference-keystore
11 | key.properties
12 | **/*.keystore
13 | **/*.jks
14 |
--------------------------------------------------------------------------------
/raysystem_flutter/android/app/build.gradle:
--------------------------------------------------------------------------------
1 | plugins {
2 | id "com.android.application"
3 | id "kotlin-android"
4 | // The Flutter Gradle Plugin must be applied after the Android and Kotlin Gradle plugins.
5 | id "dev.flutter.flutter-gradle-plugin"
6 | }
7 |
8 | android {
9 | namespace = "com.example.raysystem_flutter"
10 | compileSdk = flutter.compileSdkVersion
11 | ndkVersion = flutter.ndkVersion
12 |
13 | compileOptions {
14 | sourceCompatibility = JavaVersion.VERSION_1_8
15 | targetCompatibility = JavaVersion.VERSION_1_8
16 | }
17 |
18 | kotlinOptions {
19 | jvmTarget = JavaVersion.VERSION_1_8
20 | }
21 |
22 | defaultConfig {
23 | // TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
24 | applicationId = "com.example.raysystem_flutter"
25 | // You can update the following values to match your application needs.
26 | // For more information, see: https://flutter.dev/to/review-gradle-config.
27 | minSdk = flutter.minSdkVersion
28 | targetSdk = flutter.targetSdkVersion
29 | versionCode = flutter.versionCode
30 | versionName = flutter.versionName
31 | }
32 |
33 | buildTypes {
34 | release {
35 | // TODO: Add your own signing config for the release build.
36 | // Signing with the debug keys for now, so `flutter run --release` works.
37 | signingConfig = signingConfigs.debug
38 | }
39 | }
40 | }
41 |
42 | flutter {
43 | source = "../.."
44 | }
45 |
--------------------------------------------------------------------------------
/raysystem_flutter/android/app/src/debug/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
2 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/raysystem_flutter/android/app/src/main/kotlin/com/example/raysystem_flutter/MainActivity.kt:
--------------------------------------------------------------------------------
1 | package com.example.raysystem_flutter
2 |
3 | import io.flutter.embedding.android.FlutterActivity
4 |
5 | class MainActivity: FlutterActivity()
6 |
--------------------------------------------------------------------------------
/raysystem_flutter/android/app/src/main/res/drawable-v21/launch_background.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
12 |
13 |
--------------------------------------------------------------------------------
/raysystem_flutter/android/app/src/main/res/drawable/launch_background.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
12 |
13 |
--------------------------------------------------------------------------------
/raysystem_flutter/android/app/src/main/res/mipmap-hdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/maxiee/RaySystem/ac35b8bf7201c167c7b493c6ae93e6eaee607b6e/raysystem_flutter/android/app/src/main/res/mipmap-hdpi/ic_launcher.png
--------------------------------------------------------------------------------
/raysystem_flutter/android/app/src/main/res/mipmap-mdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/maxiee/RaySystem/ac35b8bf7201c167c7b493c6ae93e6eaee607b6e/raysystem_flutter/android/app/src/main/res/mipmap-mdpi/ic_launcher.png
--------------------------------------------------------------------------------
/raysystem_flutter/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/maxiee/RaySystem/ac35b8bf7201c167c7b493c6ae93e6eaee607b6e/raysystem_flutter/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/raysystem_flutter/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/maxiee/RaySystem/ac35b8bf7201c167c7b493c6ae93e6eaee607b6e/raysystem_flutter/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/raysystem_flutter/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/maxiee/RaySystem/ac35b8bf7201c167c7b493c6ae93e6eaee607b6e/raysystem_flutter/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/raysystem_flutter/android/app/src/main/res/values-night/styles.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
9 |
15 |
18 |
19 |
--------------------------------------------------------------------------------
/raysystem_flutter/android/app/src/main/res/values/styles.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
9 |
15 |
18 |
19 |
--------------------------------------------------------------------------------
/raysystem_flutter/android/app/src/profile/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
2 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/raysystem_flutter/android/build.gradle:
--------------------------------------------------------------------------------
1 | allprojects {
2 | repositories {
3 | google()
4 | mavenCentral()
5 | }
6 | }
7 |
8 | rootProject.buildDir = "../build"
9 | subprojects {
10 | project.buildDir = "${rootProject.buildDir}/${project.name}"
11 | }
12 | subprojects {
13 | project.evaluationDependsOn(":app")
14 | }
15 |
16 | tasks.register("clean", Delete) {
17 | delete rootProject.buildDir
18 | }
19 |
--------------------------------------------------------------------------------
/raysystem_flutter/android/gradle.properties:
--------------------------------------------------------------------------------
1 | org.gradle.jvmargs=-Xmx4G -XX:MaxMetaspaceSize=2G -XX:+HeapDumpOnOutOfMemoryError
2 | android.useAndroidX=true
3 | android.enableJetifier=true
4 |
--------------------------------------------------------------------------------
/raysystem_flutter/android/gradle/wrapper/gradle-wrapper.properties:
--------------------------------------------------------------------------------
1 | distributionBase=GRADLE_USER_HOME
2 | distributionPath=wrapper/dists
3 | zipStoreBase=GRADLE_USER_HOME
4 | zipStorePath=wrapper/dists
5 | distributionUrl=https\://services.gradle.org/distributions/gradle-8.3-all.zip
6 |
--------------------------------------------------------------------------------
/raysystem_flutter/android/settings.gradle:
--------------------------------------------------------------------------------
1 | pluginManagement {
2 | def flutterSdkPath = {
3 | def properties = new Properties()
4 | file("local.properties").withInputStream { properties.load(it) }
5 | def flutterSdkPath = properties.getProperty("flutter.sdk")
6 | assert flutterSdkPath != null, "flutter.sdk not set in local.properties"
7 | return flutterSdkPath
8 | }()
9 |
10 | includeBuild("$flutterSdkPath/packages/flutter_tools/gradle")
11 |
12 | repositories {
13 | google()
14 | mavenCentral()
15 | gradlePluginPortal()
16 | }
17 | }
18 |
19 | plugins {
20 | id "dev.flutter.flutter-plugin-loader" version "1.0.0"
21 | id "com.android.application" version "8.1.0" apply false
22 | id "org.jetbrains.kotlin.android" version "1.8.22" apply false
23 | }
24 |
25 | include ":app"
26 |
--------------------------------------------------------------------------------
/raysystem_flutter/api/.gitignore:
--------------------------------------------------------------------------------
1 | # See https://dart.dev/guides/libraries/private-files
2 |
3 | # Files and directories created by pub
4 | .dart_tool/
5 | .buildlog
6 | .packages
7 | .project
8 | .pub/
9 | build/
10 | **/packages/
11 |
12 | # Files created by dart2js
13 | # (Most Dart developers will use pub build to compile Dart, use/modify these
14 | # rules if you intend to use dart2js directly
15 | # Convention is to use extension '.dart.js' for Dart compiled to Javascript to
16 | # differentiate from explicit Javascript files)
17 | *.dart.js
18 | *.part.js
19 | *.js.deps
20 | *.js.map
21 | *.info.json
22 |
23 | # Directory created by dartdoc
24 | doc/api/
25 |
26 | # Don't commit pubspec lock file
27 | # (Library packages only! Remove pattern if developing an application package)
28 | pubspec.lock
29 |
30 | # Don’t commit files and directories created by other development environments.
31 | # For example, if your development environment creates any of the following files,
32 | # consider putting them in a global ignore file:
33 |
34 | # IntelliJ
35 | *.iml
36 | *.ipr
37 | *.iws
38 | .idea/
39 |
40 | # Mac
41 | .DS_Store
42 |
--------------------------------------------------------------------------------
/raysystem_flutter/api/.openapi-generator-ignore:
--------------------------------------------------------------------------------
1 | # OpenAPI Generator Ignore
2 | # Generated by openapi-generator https://github.com/openapitools/openapi-generator
3 |
4 | # Use this file to prevent files from being overwritten by the generator.
5 | # The patterns follow closely to .gitignore or .dockerignore.
6 |
7 | # As an example, the C# client generator defines ApiClient.cs.
8 | # You can make changes and tell OpenAPI Generator to ignore just this file by uncommenting the following line:
9 | #ApiClient.cs
10 |
11 | # You can match any string of characters against a directory, file or extension with a single asterisk (*):
12 | #foo/*/qux
13 | # The above matches foo/bar/qux and foo/baz/qux, but not foo/bar/baz/qux
14 |
15 | # You can recursively match patterns against a directory, file or extension with a double asterisk (**):
16 | #foo/**/qux
17 | # This matches foo/bar/qux, foo/baz/qux, and foo/bar/baz/qux
18 |
19 | # You can also negate patterns with an exclamation (!).
20 | # For example, you can ignore all files in a docs folder with the file extension .md:
21 | #docs/*.md
22 | # Then explicitly reverse the ignore rule for a single file:
23 | #!docs/README.md
24 |
--------------------------------------------------------------------------------
/raysystem_flutter/api/.openapi-generator/VERSION:
--------------------------------------------------------------------------------
1 | 7.9.0
2 |
--------------------------------------------------------------------------------
/raysystem_flutter/api/analysis_options.yaml:
--------------------------------------------------------------------------------
1 | analyzer:
2 | language:
3 | strict-inference: true
4 | strict-raw-types: true
5 | strict-casts: false
6 | exclude:
7 | - test/*.dart
8 | errors:
9 | deprecated_member_use_from_same_package: ignore
10 |
--------------------------------------------------------------------------------
/raysystem_flutter/api/doc/ChatCompletionRequest.md:
--------------------------------------------------------------------------------
1 | # openapi.model.ChatCompletionRequest
2 |
3 | ## Load the model package
4 | ```dart
5 | import 'package:openapi/api.dart';
6 | ```
7 |
8 | ## Properties
9 | Name | Type | Description | Notes
10 | ------------ | ------------- | ------------- | -------------
11 | **messages** | [**BuiltList<ChatMessageInput>**](ChatMessageInput.md) | A list of messages comprising the conversation history. |
12 | **modelName** | **String** | | [optional]
13 |
14 | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
15 |
16 |
17 |
--------------------------------------------------------------------------------
/raysystem_flutter/api/doc/ChatCompletionResponse.md:
--------------------------------------------------------------------------------
1 | # openapi.model.ChatCompletionResponse
2 |
3 | ## Load the model package
4 | ```dart
5 | import 'package:openapi/api.dart';
6 | ```
7 |
8 | ## Properties
9 | Name | Type | Description | Notes
10 | ------------ | ------------- | ------------- | -------------
11 | **message** | [**ChatMessageOutput**](ChatMessageOutput.md) | The generated chat message from the assistant. |
12 | **modelUsed** | **String** | The name of the model used for this completion. |
13 |
14 | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
15 |
16 |
17 |
--------------------------------------------------------------------------------
/raysystem_flutter/api/doc/ChatMessageInput.md:
--------------------------------------------------------------------------------
1 | # openapi.model.ChatMessageInput
2 |
3 | ## Load the model package
4 | ```dart
5 | import 'package:openapi/api.dart';
6 | ```
7 |
8 | ## Properties
9 | Name | Type | Description | Notes
10 | ------------ | ------------- | ------------- | -------------
11 | **role** | **String** | Role of the message sender (e.g., 'user', 'assistant', 'system') |
12 | **content** | **String** | Content of the message |
13 |
14 | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
15 |
16 |
17 |
--------------------------------------------------------------------------------
/raysystem_flutter/api/doc/ChatMessageOutput.md:
--------------------------------------------------------------------------------
1 | # openapi.model.ChatMessageOutput
2 |
3 | ## Load the model package
4 | ```dart
5 | import 'package:openapi/api.dart';
6 | ```
7 |
8 | ## Properties
9 | Name | Type | Description | Notes
10 | ------------ | ------------- | ------------- | -------------
11 | **role** | **String** | Role of the message sender (usually 'assistant') |
12 | **content** | **String** | Content of the generated message |
13 |
14 | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
15 |
16 |
17 |
--------------------------------------------------------------------------------
/raysystem_flutter/api/doc/ChatSessionCreate.md:
--------------------------------------------------------------------------------
1 | # openapi.model.ChatSessionCreate
2 |
3 | ## Load the model package
4 | ```dart
5 | import 'package:openapi/api.dart';
6 | ```
7 |
8 | ## Properties
9 | Name | Type | Description | Notes
10 | ------------ | ------------- | ------------- | -------------
11 | **title** | **String** | |
12 | **modelName** | **String** | | [optional]
13 | **contentJson** | **String** | |
14 |
15 | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
16 |
17 |
18 |
--------------------------------------------------------------------------------
/raysystem_flutter/api/doc/ChatSessionResponse.md:
--------------------------------------------------------------------------------
1 | # openapi.model.ChatSessionResponse
2 |
3 | ## Load the model package
4 | ```dart
5 | import 'package:openapi/api.dart';
6 | ```
7 |
8 | ## Properties
9 | Name | Type | Description | Notes
10 | ------------ | ------------- | ------------- | -------------
11 | **title** | **String** | |
12 | **modelName** | **String** | | [optional]
13 | **contentJson** | **String** | |
14 | **id** | **int** | |
15 | **createdAt** | [**DateTime**](DateTime.md) | |
16 | **updatedAt** | [**DateTime**](DateTime.md) | |
17 |
18 | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
19 |
20 |
21 |
--------------------------------------------------------------------------------
/raysystem_flutter/api/doc/ChatSessionUpdate.md:
--------------------------------------------------------------------------------
1 | # openapi.model.ChatSessionUpdate
2 |
3 | ## Load the model package
4 | ```dart
5 | import 'package:openapi/api.dart';
6 | ```
7 |
8 | ## Properties
9 | Name | Type | Description | Notes
10 | ------------ | ------------- | ------------- | -------------
11 | **title** | **String** | | [optional]
12 | **modelName** | **String** | | [optional]
13 | **contentJson** | **String** | | [optional]
14 |
15 | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
16 |
17 |
18 |
--------------------------------------------------------------------------------
/raysystem_flutter/api/doc/ChatSessionsListResponse.md:
--------------------------------------------------------------------------------
1 | # openapi.model.ChatSessionsListResponse
2 |
3 | ## Load the model package
4 | ```dart
5 | import 'package:openapi/api.dart';
6 | ```
7 |
8 | ## Properties
9 | Name | Type | Description | Notes
10 | ------------ | ------------- | ------------- | -------------
11 | **total** | **int** | |
12 | **items** | [**BuiltList<ChatSessionResponse>**](ChatSessionResponse.md) | |
13 |
14 | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
15 |
16 |
17 |
--------------------------------------------------------------------------------
/raysystem_flutter/api/doc/DiskMetrics.md:
--------------------------------------------------------------------------------
1 | # openapi.model.DiskMetrics
2 |
3 | ## Load the model package
4 | ```dart
5 | import 'package:openapi/api.dart';
6 | ```
7 |
8 | ## Properties
9 | Name | Type | Description | Notes
10 | ------------ | ------------- | ------------- | -------------
11 | **device** | **String** | |
12 | **mountPoint** | **String** | |
13 | **volumeName** | **String** | |
14 | **totalGb** | **num** | |
15 | **usedGb** | **num** | |
16 | **freeGb** | **num** | |
17 | **usagePercent** | **num** | |
18 | **readSpeedMb** | **num** | |
19 | **writeSpeedMb** | **num** | |
20 |
21 | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
22 |
23 |
24 |
--------------------------------------------------------------------------------
/raysystem_flutter/api/doc/HTTPValidationError.md:
--------------------------------------------------------------------------------
1 | # openapi.model.HTTPValidationError
2 |
3 | ## Load the model package
4 | ```dart
5 | import 'package:openapi/api.dart';
6 | ```
7 |
8 | ## Properties
9 | Name | Type | Description | Notes
10 | ------------ | ------------- | ------------- | -------------
11 | **detail** | [**BuiltList<ValidationError>**](ValidationError.md) | | [optional]
12 |
13 | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
14 |
15 |
16 |
--------------------------------------------------------------------------------
/raysystem_flutter/api/doc/InfoList.md:
--------------------------------------------------------------------------------
1 | # openapi.model.InfoList
2 |
3 | ## Load the model package
4 | ```dart
5 | import 'package:openapi/api.dart';
6 | ```
7 |
8 | ## Properties
9 | Name | Type | Description | Notes
10 | ------------ | ------------- | ------------- | -------------
11 | **items** | [**BuiltList<InfoResponse>**](InfoResponse.md) | |
12 | **total** | **int** | |
13 | **hasMore** | **bool** | |
14 |
15 | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
16 |
17 |
18 |
--------------------------------------------------------------------------------
/raysystem_flutter/api/doc/InfoResponse.md:
--------------------------------------------------------------------------------
1 | # openapi.model.InfoResponse
2 |
3 | ## Load the model package
4 | ```dart
5 | import 'package:openapi/api.dart';
6 | ```
7 |
8 | ## Properties
9 | Name | Type | Description | Notes
10 | ------------ | ------------- | ------------- | -------------
11 | **id** | **int** | |
12 | **title** | **String** | |
13 | **url** | **String** | |
14 | **published** | [**DateTime**](DateTime.md) | | [optional]
15 | **createdAt** | [**DateTime**](DateTime.md) | |
16 | **description** | **String** | | [optional]
17 | **image** | **String** | | [optional]
18 | **isNew** | **bool** | |
19 | **isMark** | **bool** | |
20 | **siteId** | **int** | |
21 | **channelId** | **int** | | [optional]
22 | **subchannelId** | **int** | | [optional]
23 | **storageHtml** | **String** | | [optional]
24 |
25 | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
26 |
27 |
28 |
--------------------------------------------------------------------------------
/raysystem_flutter/api/doc/InfoStats.md:
--------------------------------------------------------------------------------
1 | # openapi.model.InfoStats
2 |
3 | ## Load the model package
4 | ```dart
5 | import 'package:openapi/api.dart';
6 | ```
7 |
8 | ## Properties
9 | Name | Type | Description | Notes
10 | ------------ | ------------- | ------------- | -------------
11 | **totalCount** | **int** | |
12 | **unreadCount** | **int** | |
13 | **markedCount** | **int** | |
14 |
15 | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
16 |
17 |
18 |
--------------------------------------------------------------------------------
/raysystem_flutter/api/doc/ListModelsResponse.md:
--------------------------------------------------------------------------------
1 | # openapi.model.ListModelsResponse
2 |
3 | ## Load the model package
4 | ```dart
5 | import 'package:openapi/api.dart';
6 | ```
7 |
8 | ## Properties
9 | Name | Type | Description | Notes
10 | ------------ | ------------- | ------------- | -------------
11 | **models** | [**BuiltList<ModelInfo>**](ModelInfo.md) | List of available models |
12 | **defaultModel** | **String** | The name of the default model |
13 |
14 | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
15 |
16 |
17 |
--------------------------------------------------------------------------------
/raysystem_flutter/api/doc/MemoryMetrics.md:
--------------------------------------------------------------------------------
1 | # openapi.model.MemoryMetrics
2 |
3 | ## Load the model package
4 | ```dart
5 | import 'package:openapi/api.dart';
6 | ```
7 |
8 | ## Properties
9 | Name | Type | Description | Notes
10 | ------------ | ------------- | ------------- | -------------
11 | **totalGb** | **num** | |
12 | **usedGb** | **num** | |
13 | **availableGb** | **num** | |
14 | **cachedGb** | **num** | |
15 | **percent** | **num** | |
16 | **swapTotalGb** | **num** | |
17 | **swapUsedGb** | **num** | |
18 | **swapFreeGb** | **num** | |
19 | **swapPercent** | **num** | |
20 |
21 | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
22 |
23 |
24 |
--------------------------------------------------------------------------------
/raysystem_flutter/api/doc/ModelInfo.md:
--------------------------------------------------------------------------------
1 | # openapi.model.ModelInfo
2 |
3 | ## Load the model package
4 | ```dart
5 | import 'package:openapi/api.dart';
6 | ```
7 |
8 | ## Properties
9 | Name | Type | Description | Notes
10 | ------------ | ------------- | ------------- | -------------
11 | **name** | **String** | The name of the model, used as identifier when requesting completions |
12 | **displayName** | **String** | User-friendly display name for the model |
13 | **description** | **String** | | [optional]
14 |
15 | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
16 |
17 |
18 |
--------------------------------------------------------------------------------
/raysystem_flutter/api/doc/NetworkMetrics.md:
--------------------------------------------------------------------------------
1 | # openapi.model.NetworkMetrics
2 |
3 | ## Load the model package
4 | ```dart
5 | import 'package:openapi/api.dart';
6 | ```
7 |
8 | ## Properties
9 | Name | Type | Description | Notes
10 | ------------ | ------------- | ------------- | -------------
11 | **uploadSpeedMb** | **num** | |
12 | **downloadSpeedMb** | **num** | |
13 |
14 | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
15 |
16 |
17 |
--------------------------------------------------------------------------------
/raysystem_flutter/api/doc/NoteCreate.md:
--------------------------------------------------------------------------------
1 | # openapi.model.NoteCreate
2 |
3 | ## Load the model package
4 | ```dart
5 | import 'package:openapi/api.dart';
6 | ```
7 |
8 | ## Properties
9 | Name | Type | Description | Notes
10 | ------------ | ------------- | ------------- | -------------
11 | **contentAppflowy** | **String** | |
12 | **parentId** | **int** | | [optional]
13 | **titles** | [**BuiltList<NoteTitleCreate>**](NoteTitleCreate.md) | | [optional] [default to ListBuilder()]
14 |
15 | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
16 |
17 |
18 |
--------------------------------------------------------------------------------
/raysystem_flutter/api/doc/NoteResponse.md:
--------------------------------------------------------------------------------
1 | # openapi.model.NoteResponse
2 |
3 | ## Load the model package
4 | ```dart
5 | import 'package:openapi/api.dart';
6 | ```
7 |
8 | ## Properties
9 | Name | Type | Description | Notes
10 | ------------ | ------------- | ------------- | -------------
11 | **contentAppflowy** | **String** | |
12 | **parentId** | **int** | | [optional]
13 | **id** | **int** | |
14 | **noteTitles** | [**BuiltList<NoteTitleResponse>**](NoteTitleResponse.md) | |
15 | **hasChildren** | **bool** | |
16 | **createdAt** | [**DateTime**](DateTime.md) | |
17 | **updatedAt** | [**DateTime**](DateTime.md) | |
18 |
19 | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
20 |
21 |
22 |
--------------------------------------------------------------------------------
/raysystem_flutter/api/doc/NoteTitleBase.md:
--------------------------------------------------------------------------------
1 | # openapi.model.NoteTitleBase
2 |
3 | ## Load the model package
4 | ```dart
5 | import 'package:openapi/api.dart';
6 | ```
7 |
8 | ## Properties
9 | Name | Type | Description | Notes
10 | ------------ | ------------- | ------------- | -------------
11 | **id** | **int** | |
12 | **title** | **String** | |
13 | **isPrimary** | **bool** | |
14 | **createdAt** | [**DateTime**](DateTime.md) | |
15 |
16 | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
17 |
18 |
19 |
--------------------------------------------------------------------------------
/raysystem_flutter/api/doc/NoteTitleCreate.md:
--------------------------------------------------------------------------------
1 | # openapi.model.NoteTitleCreate
2 |
3 | ## Load the model package
4 | ```dart
5 | import 'package:openapi/api.dart';
6 | ```
7 |
8 | ## Properties
9 | Name | Type | Description | Notes
10 | ------------ | ------------- | ------------- | -------------
11 | **title** | **String** | |
12 | **isPrimary** | **bool** | | [optional] [default to false]
13 |
14 | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
15 |
16 |
17 |
--------------------------------------------------------------------------------
/raysystem_flutter/api/doc/NoteTitleResponse.md:
--------------------------------------------------------------------------------
1 | # openapi.model.NoteTitleResponse
2 |
3 | ## Load the model package
4 | ```dart
5 | import 'package:openapi/api.dart';
6 | ```
7 |
8 | ## Properties
9 | Name | Type | Description | Notes
10 | ------------ | ------------- | ------------- | -------------
11 | **title** | **String** | |
12 | **isPrimary** | **bool** | | [optional] [default to false]
13 | **id** | **int** | |
14 | **noteId** | **int** | |
15 | **createdAt** | [**DateTime**](DateTime.md) | |
16 |
17 | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
18 |
19 |
20 |
--------------------------------------------------------------------------------
/raysystem_flutter/api/doc/NoteTitleUpdate.md:
--------------------------------------------------------------------------------
1 | # openapi.model.NoteTitleUpdate
2 |
3 | ## Load the model package
4 | ```dart
5 | import 'package:openapi/api.dart';
6 | ```
7 |
8 | ## Properties
9 | Name | Type | Description | Notes
10 | ------------ | ------------- | ------------- | -------------
11 | **title** | **String** | |
12 | **isPrimary** | **bool** | | [optional] [default to false]
13 |
14 | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
15 |
16 |
17 |
--------------------------------------------------------------------------------
/raysystem_flutter/api/doc/NoteTreeNode.md:
--------------------------------------------------------------------------------
1 | # openapi.model.NoteTreeNode
2 |
3 | ## Load the model package
4 | ```dart
5 | import 'package:openapi/api.dart';
6 | ```
7 |
8 | ## Properties
9 | Name | Type | Description | Notes
10 | ------------ | ------------- | ------------- | -------------
11 | **title** | **String** | |
12 | **contentAppflowy** | **String** | |
13 | **id** | **int** | |
14 | **parentId** | **int** | | [optional]
15 | **createdAt** | [**DateTime**](DateTime.md) | |
16 | **updatedAt** | [**DateTime**](DateTime.md) | |
17 | **hasChildren** | **bool** | |
18 |
19 | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
20 |
21 |
22 |
--------------------------------------------------------------------------------
/raysystem_flutter/api/doc/NoteTreeResponse.md:
--------------------------------------------------------------------------------
1 | # openapi.model.NoteTreeResponse
2 |
3 | ## Load the model package
4 | ```dart
5 | import 'package:openapi/api.dart';
6 | ```
7 |
8 | ## Properties
9 | Name | Type | Description | Notes
10 | ------------ | ------------- | ------------- | -------------
11 | **total** | **int** | |
12 | **items** | [**BuiltList<NoteResponse>**](NoteResponse.md) | |
13 |
14 | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
15 |
16 |
17 |
--------------------------------------------------------------------------------
/raysystem_flutter/api/doc/NoteUpdate.md:
--------------------------------------------------------------------------------
1 | # openapi.model.NoteUpdate
2 |
3 | ## Load the model package
4 | ```dart
5 | import 'package:openapi/api.dart';
6 | ```
7 |
8 | ## Properties
9 | Name | Type | Description | Notes
10 | ------------ | ------------- | ------------- | -------------
11 | **contentAppflowy** | **String** | |
12 | **parentId** | **int** | | [optional]
13 |
14 | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
15 |
16 |
17 |
--------------------------------------------------------------------------------
/raysystem_flutter/api/doc/NotesListResponse.md:
--------------------------------------------------------------------------------
1 | # openapi.model.NotesListResponse
2 |
3 | ## Load the model package
4 | ```dart
5 | import 'package:openapi/api.dart';
6 | ```
7 |
8 | ## Properties
9 | Name | Type | Description | Notes
10 | ------------ | ------------- | ------------- | -------------
11 | **total** | **int** | |
12 | **items** | [**BuiltList<NoteResponse>**](NoteResponse.md) | |
13 |
14 | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
15 |
16 |
17 |
--------------------------------------------------------------------------------
/raysystem_flutter/api/doc/PeopleCreate.md:
--------------------------------------------------------------------------------
1 | # openapi.model.PeopleCreate
2 |
3 | ## Load the model package
4 | ```dart
5 | import 'package:openapi/api.dart';
6 | ```
7 |
8 | ## Properties
9 | Name | Type | Description | Notes
10 | ------------ | ------------- | ------------- | -------------
11 | **description** | **String** | | [optional]
12 | **avatar** | **String** | | [optional]
13 | **birthDate** | [**Date**](Date.md) | | [optional]
14 |
15 | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
16 |
17 |
18 |
--------------------------------------------------------------------------------
/raysystem_flutter/api/doc/PeopleListResponse.md:
--------------------------------------------------------------------------------
1 | # openapi.model.PeopleListResponse
2 |
3 | ## Load the model package
4 | ```dart
5 | import 'package:openapi/api.dart';
6 | ```
7 |
8 | ## Properties
9 | Name | Type | Description | Notes
10 | ------------ | ------------- | ------------- | -------------
11 | **items** | [**BuiltList<PeopleResponse>**](PeopleResponse.md) | |
12 | **total** | **int** | |
13 | **page** | **int** | |
14 | **pageSize** | **int** | |
15 | **totalPages** | **int** | |
16 |
17 | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
18 |
19 |
20 |
--------------------------------------------------------------------------------
/raysystem_flutter/api/doc/PeopleNameCreate.md:
--------------------------------------------------------------------------------
1 | # openapi.model.PeopleNameCreate
2 |
3 | ## Load the model package
4 | ```dart
5 | import 'package:openapi/api.dart';
6 | ```
7 |
8 | ## Properties
9 | Name | Type | Description | Notes
10 | ------------ | ------------- | ------------- | -------------
11 | **name** | **String** | |
12 |
13 | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
14 |
15 |
16 |
--------------------------------------------------------------------------------
/raysystem_flutter/api/doc/PeopleNameResponse.md:
--------------------------------------------------------------------------------
1 | # openapi.model.PeopleNameResponse
2 |
3 | ## Load the model package
4 | ```dart
5 | import 'package:openapi/api.dart';
6 | ```
7 |
8 | ## Properties
9 | Name | Type | Description | Notes
10 | ------------ | ------------- | ------------- | -------------
11 | **name** | **String** | |
12 | **id** | **int** | |
13 | **peopleId** | **int** | |
14 |
15 | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
16 |
17 |
18 |
--------------------------------------------------------------------------------
/raysystem_flutter/api/doc/PeopleResponse.md:
--------------------------------------------------------------------------------
1 | # openapi.model.PeopleResponse
2 |
3 | ## Load the model package
4 | ```dart
5 | import 'package:openapi/api.dart';
6 | ```
7 |
8 | ## Properties
9 | Name | Type | Description | Notes
10 | ------------ | ------------- | ------------- | -------------
11 | **description** | **String** | | [optional]
12 | **avatar** | **String** | | [optional]
13 | **birthDate** | [**Date**](Date.md) | | [optional]
14 | **id** | **int** | |
15 | **names** | [**BuiltList<PeopleNameResponse>**](PeopleNameResponse.md) | | [optional] [default to ListBuilder()]
16 |
17 | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
18 |
19 |
20 |
--------------------------------------------------------------------------------
/raysystem_flutter/api/doc/PeopleUpdate.md:
--------------------------------------------------------------------------------
1 | # openapi.model.PeopleUpdate
2 |
3 | ## Load the model package
4 | ```dart
5 | import 'package:openapi/api.dart';
6 | ```
7 |
8 | ## Properties
9 | Name | Type | Description | Notes
10 | ------------ | ------------- | ------------- | -------------
11 | **description** | **String** | | [optional]
12 | **avatar** | **String** | | [optional]
13 | **birthDate** | [**Date**](Date.md) | | [optional]
14 |
15 | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
16 |
17 |
18 |
--------------------------------------------------------------------------------
/raysystem_flutter/api/doc/ResponseGetMetricsSystemMetricsGet.md:
--------------------------------------------------------------------------------
1 | # openapi.model.ResponseGetMetricsSystemMetricsGet
2 |
3 | ## Load the model package
4 | ```dart
5 | import 'package:openapi/api.dart';
6 | ```
7 |
8 | ## Properties
9 | Name | Type | Description | Notes
10 | ------------ | ------------- | ------------- | -------------
11 | **cpuPercent** | **num** | |
12 | **memory** | [**MemoryMetrics**](MemoryMetrics.md) | |
13 | **disks** | [**BuiltList<DiskMetrics>**](DiskMetrics.md) | |
14 | **network** | [**NetworkMetrics**](NetworkMetrics.md) | |
15 |
16 | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
17 |
18 |
19 |
--------------------------------------------------------------------------------
/raysystem_flutter/api/doc/ScheduledTaskResponse.md:
--------------------------------------------------------------------------------
1 | # openapi.model.ScheduledTaskResponse
2 |
3 | ## Load the model package
4 | ```dart
5 | import 'package:openapi/api.dart';
6 | ```
7 |
8 | ## Properties
9 | Name | Type | Description | Notes
10 | ------------ | ------------- | ------------- | -------------
11 | **id** | **String** | |
12 | **taskType** | **String** | |
13 | **scheduleType** | [**TaskScheduleType**](TaskScheduleType.md) | |
14 | **interval** | **int** | |
15 | **cronExpression** | **String** | | [optional]
16 | **eventType** | **String** | | [optional]
17 | **nextRun** | [**DateTime**](DateTime.md) | |
18 | **tag** | **String** | |
19 | **parameters** | [**JsonObject**](.md) | |
20 | **enabled** | **bool** | |
21 |
22 | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
23 |
24 |
25 |
--------------------------------------------------------------------------------
/raysystem_flutter/api/doc/Site.md:
--------------------------------------------------------------------------------
1 | # openapi.model.Site
2 |
3 | ## Load the model package
4 | ```dart
5 | import 'package:openapi/api.dart';
6 | ```
7 |
8 | ## Properties
9 | Name | Type | Description | Notes
10 | ------------ | ------------- | ------------- | -------------
11 | **name** | **String** | |
12 | **description** | **String** | | [optional]
13 | **host** | **String** | |
14 | **favicon** | **String** | | [optional]
15 | **rss** | **String** | | [optional]
16 | **id** | **int** | |
17 |
18 | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
19 |
20 |
21 |
--------------------------------------------------------------------------------
/raysystem_flutter/api/doc/SiteCreate.md:
--------------------------------------------------------------------------------
1 | # openapi.model.SiteCreate
2 |
3 | ## Load the model package
4 | ```dart
5 | import 'package:openapi/api.dart';
6 | ```
7 |
8 | ## Properties
9 | Name | Type | Description | Notes
10 | ------------ | ------------- | ------------- | -------------
11 | **name** | **String** | |
12 | **description** | **String** | | [optional]
13 | **host** | **String** | |
14 | **favicon** | **String** | | [optional]
15 | **rss** | **String** | | [optional]
16 |
17 | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
18 |
19 |
20 |
--------------------------------------------------------------------------------
/raysystem_flutter/api/doc/SystemMetrics.md:
--------------------------------------------------------------------------------
1 | # openapi.model.SystemMetrics
2 |
3 | ## Load the model package
4 | ```dart
5 | import 'package:openapi/api.dart';
6 | ```
7 |
8 | ## Properties
9 | Name | Type | Description | Notes
10 | ------------ | ------------- | ------------- | -------------
11 | **cpuPercent** | **num** | |
12 | **memory** | [**MemoryMetrics**](MemoryMetrics.md) | |
13 | **disks** | [**BuiltList<DiskMetrics>**](DiskMetrics.md) | |
14 | **network** | [**NetworkMetrics**](NetworkMetrics.md) | |
15 |
16 | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
17 |
18 |
19 |
--------------------------------------------------------------------------------
/raysystem_flutter/api/doc/TaskScheduleType.md:
--------------------------------------------------------------------------------
1 | # openapi.model.TaskScheduleType
2 |
3 | ## Load the model package
4 | ```dart
5 | import 'package:openapi/api.dart';
6 | ```
7 |
8 | ## Properties
9 | Name | Type | Description | Notes
10 | ------------ | ------------- | ------------- | -------------
11 |
12 | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
13 |
14 |
15 |
--------------------------------------------------------------------------------
/raysystem_flutter/api/doc/ValidationError.md:
--------------------------------------------------------------------------------
1 | # openapi.model.ValidationError
2 |
3 | ## Load the model package
4 | ```dart
5 | import 'package:openapi/api.dart';
6 | ```
7 |
8 | ## Properties
9 | Name | Type | Description | Notes
10 | ------------ | ------------- | ------------- | -------------
11 | **loc** | [**BuiltList<ValidationErrorLocInner>**](ValidationErrorLocInner.md) | |
12 | **msg** | **String** | |
13 | **type** | **String** | |
14 |
15 | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
16 |
17 |
18 |
--------------------------------------------------------------------------------
/raysystem_flutter/api/doc/ValidationErrorLocInner.md:
--------------------------------------------------------------------------------
1 | # openapi.model.ValidationErrorLocInner
2 |
3 | ## Load the model package
4 | ```dart
5 | import 'package:openapi/api.dart';
6 | ```
7 |
8 | ## Properties
9 | Name | Type | Description | Notes
10 | ------------ | ------------- | ------------- | -------------
11 |
12 | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
13 |
14 |
15 |
--------------------------------------------------------------------------------
/raysystem_flutter/api/lib/src/auth/api_key_auth.dart:
--------------------------------------------------------------------------------
1 | //
2 | // AUTO-GENERATED FILE, DO NOT MODIFY!
3 | //
4 |
5 | import 'package:dio/dio.dart';
6 | import 'package:openapi/src/auth/auth.dart';
7 |
8 | class ApiKeyAuthInterceptor extends AuthInterceptor {
9 | final Map apiKeys = {};
10 |
11 | @override
12 | void onRequest(RequestOptions options, RequestInterceptorHandler handler) {
13 | final authInfo =
14 | getAuthInfo(options, (secure) => secure['type'] == 'apiKey');
15 | for (final info in authInfo) {
16 | final authName = info['name'] as String;
17 | final authKeyName = info['keyName'] as String;
18 | final authWhere = info['where'] as String;
19 | final apiKey = apiKeys[authName];
20 | if (apiKey != null) {
21 | if (authWhere == 'query') {
22 | options.queryParameters[authKeyName] = apiKey;
23 | } else {
24 | options.headers[authKeyName] = apiKey;
25 | }
26 | }
27 | }
28 | super.onRequest(options, handler);
29 | }
30 | }
31 |
--------------------------------------------------------------------------------
/raysystem_flutter/api/lib/src/auth/auth.dart:
--------------------------------------------------------------------------------
1 | //
2 | // AUTO-GENERATED FILE, DO NOT MODIFY!
3 | //
4 |
5 | import 'package:dio/dio.dart';
6 |
7 | abstract class AuthInterceptor extends Interceptor {
8 | /// Get auth information on given route for the given type.
9 | /// Can return an empty list if type is not present on auth data or
10 | /// if route doesn't need authentication.
11 | List