neuro-simulator 0.6.2__tar.gz → 0.6.3__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {neuro_simulator-0.6.2 → neuro_simulator-0.6.3}/PKG-INFO +2 -1
- {neuro_simulator-0.6.2/server/neuro_simulator/assets → neuro_simulator-0.6.3/client/public}/neuro_start.mp4 +0 -0
- {neuro_simulator-0.6.2 → neuro_simulator-0.6.3}/client/src/core/appInitializer.ts +9 -2
- {neuro_simulator-0.6.2 → neuro_simulator-0.6.3}/client/src/stream/videoPlayer.ts +26 -9
- {neuro_simulator-0.6.2 → neuro_simulator-0.6.3}/dashboard/src/components/agent/ContextTab.vue +6 -8
- {neuro_simulator-0.6.2 → neuro_simulator-0.6.3}/dashboard/src/locales/zh.json +11 -11
- neuro_simulator-0.6.3/dashboard/src/stores/agent.ts +43 -0
- {neuro_simulator-0.6.2 → neuro_simulator-0.6.3}/dashboard/src/stores/connection.ts +1 -1
- {neuro_simulator-0.6.2 → neuro_simulator-0.6.3}/dashboard/src/views/HomeView.vue +1 -1
- {neuro_simulator-0.6.2 → neuro_simulator-0.6.3}/pyproject.toml +2 -1
- neuro_simulator-0.6.3/server/neuro_simulator/agent/memory/core_memory.json +79 -0
- {neuro_simulator-0.6.2 → neuro_simulator-0.6.3}/server/neuro_simulator/core/application.py +110 -28
- {neuro_simulator-0.6.2 → neuro_simulator-0.6.3}/server/neuro_simulator/utils/websocket.py +12 -1
- {neuro_simulator-0.6.2 → neuro_simulator-0.6.3}/server/requirements.txt +1 -0
- neuro_simulator-0.6.2/dashboard/src/stores/agent.ts +0 -46
- neuro_simulator-0.6.2/server/neuro_simulator/agent/memory/core_memory.json +0 -52
- {neuro_simulator-0.6.2 → neuro_simulator-0.6.3}/.github/workflows/release.yml +0 -0
- {neuro_simulator-0.6.2 → neuro_simulator-0.6.3}/.gitignore +0 -0
- {neuro_simulator-0.6.2 → neuro_simulator-0.6.3}/LICENSE +0 -0
- {neuro_simulator-0.6.2 → neuro_simulator-0.6.3}/README.md +0 -0
- {neuro_simulator-0.6.2 → neuro_simulator-0.6.3}/client/README.md +0 -0
- {neuro_simulator-0.6.2 → neuro_simulator-0.6.3}/client/index.html +0 -0
- {neuro_simulator-0.6.2 → neuro_simulator-0.6.3}/client/package-lock.json +0 -0
- {neuro_simulator-0.6.2 → neuro_simulator-0.6.3}/client/package.json +0 -0
- {neuro_simulator-0.6.2 → neuro_simulator-0.6.3}/client/public/avatar.webp +0 -0
- {neuro_simulator-0.6.2 → neuro_simulator-0.6.3}/client/public/background.webp +0 -0
- {neuro_simulator-0.6.2 → neuro_simulator-0.6.3}/client/public/background_old.webp +0 -0
- {neuro_simulator-0.6.2 → neuro_simulator-0.6.3}/client/public/banner.jpeg +0 -0
- {neuro_simulator-0.6.2 → neuro_simulator-0.6.3}/client/public/channel_points.png +0 -0
- {neuro_simulator-0.6.2 → neuro_simulator-0.6.3}/client/public/error.mp3 +0 -0
- {neuro_simulator-0.6.2 → neuro_simulator-0.6.3}/client/public/favicon.ico +0 -0
- {neuro_simulator-0.6.2 → neuro_simulator-0.6.3}/client/public/fonts/causten.woff2 +0 -0
- {neuro_simulator-0.6.2 → neuro_simulator-0.6.3}/client/public/fonts/comic.woff2 +0 -0
- {neuro_simulator-0.6.2 → neuro_simulator-0.6.3}/client/public/fonts/first-coffee.woff2 +0 -0
- {neuro_simulator-0.6.2 → neuro_simulator-0.6.3}/client/public/fonts/noto-sans-sc.woff2 +0 -0
- {neuro_simulator-0.6.2 → neuro_simulator-0.6.3}/client/public/neurosama.png +0 -0
- {neuro_simulator-0.6.2 → neuro_simulator-0.6.3}/client/public/sc_pink.png +0 -0
- {neuro_simulator-0.6.2 → neuro_simulator-0.6.3}/client/public/sc_purple.png +0 -0
- {neuro_simulator-0.6.2 → neuro_simulator-0.6.3}/client/public/sub_badge.svg +0 -0
- {neuro_simulator-0.6.2 → neuro_simulator-0.6.3}/client/public/user_avatar.jpg +0 -0
- {neuro_simulator-0.6.2 → neuro_simulator-0.6.3}/client/src/core/layoutManager.ts +0 -0
- {neuro_simulator-0.6.2 → neuro_simulator-0.6.3}/client/src/core/singletonManager.ts +0 -0
- {neuro_simulator-0.6.2 → neuro_simulator-0.6.3}/client/src/javascript/tooltip.js +0 -0
- {neuro_simulator-0.6.2 → neuro_simulator-0.6.3}/client/src/javascript/viewers.js +0 -0
- {neuro_simulator-0.6.2 → neuro_simulator-0.6.3}/client/src/main.ts +0 -0
- {neuro_simulator-0.6.2 → neuro_simulator-0.6.3}/client/src/services/apiClient.ts +0 -0
- {neuro_simulator-0.6.2 → neuro_simulator-0.6.3}/client/src/services/audioPlayer.ts +0 -0
- {neuro_simulator-0.6.2 → neuro_simulator-0.6.3}/client/src/services/bilibiliService.ts +0 -0
- {neuro_simulator-0.6.2 → neuro_simulator-0.6.3}/client/src/services/websocketClient.ts +0 -0
- {neuro_simulator-0.6.2 → neuro_simulator-0.6.3}/client/src/stream/neuroAvatar.ts +0 -0
- {neuro_simulator-0.6.2 → neuro_simulator-0.6.3}/client/src/style.css +0 -0
- {neuro_simulator-0.6.2 → neuro_simulator-0.6.3}/client/src/styles/base.css +0 -0
- {neuro_simulator-0.6.2 → neuro_simulator-0.6.3}/client/src/styles/chat.css +0 -0
- {neuro_simulator-0.6.2 → neuro_simulator-0.6.3}/client/src/styles/header.css +0 -0
- {neuro_simulator-0.6.2 → neuro_simulator-0.6.3}/client/src/styles/offline.css +0 -0
- {neuro_simulator-0.6.2 → neuro_simulator-0.6.3}/client/src/styles/responsive.css +0 -0
- {neuro_simulator-0.6.2 → neuro_simulator-0.6.3}/client/src/styles/settings.css +0 -0
- {neuro_simulator-0.6.2 → neuro_simulator-0.6.3}/client/src/styles/stream-info.css +0 -0
- {neuro_simulator-0.6.2 → neuro_simulator-0.6.3}/client/src/styles/stream.css +0 -0
- {neuro_simulator-0.6.2 → neuro_simulator-0.6.3}/client/src/styles/tooltip.css +0 -0
- {neuro_simulator-0.6.2 → neuro_simulator-0.6.3}/client/src/types/common.ts +0 -0
- {neuro_simulator-0.6.2 → neuro_simulator-0.6.3}/client/src/ui/chatDisplay.ts +0 -0
- {neuro_simulator-0.6.2 → neuro_simulator-0.6.3}/client/src/ui/chatSidebar.ts +0 -0
- {neuro_simulator-0.6.2 → neuro_simulator-0.6.3}/client/src/ui/liveIndicator.ts +0 -0
- {neuro_simulator-0.6.2 → neuro_simulator-0.6.3}/client/src/ui/muteButton.ts +0 -0
- {neuro_simulator-0.6.2 → neuro_simulator-0.6.3}/client/src/ui/neuroCaption.ts +0 -0
- {neuro_simulator-0.6.2 → neuro_simulator-0.6.3}/client/src/ui/settingsModal.ts +0 -0
- {neuro_simulator-0.6.2 → neuro_simulator-0.6.3}/client/src/ui/streamInfoDisplay.ts +0 -0
- {neuro_simulator-0.6.2 → neuro_simulator-0.6.3}/client/src/ui/streamTimer.ts +0 -0
- {neuro_simulator-0.6.2 → neuro_simulator-0.6.3}/client/src/ui/userInput.ts +0 -0
- {neuro_simulator-0.6.2 → neuro_simulator-0.6.3}/client/src/utils/wakeLockManager.ts +0 -0
- {neuro_simulator-0.6.2 → neuro_simulator-0.6.3}/client/src/vite-env.d.ts +0 -0
- {neuro_simulator-0.6.2 → neuro_simulator-0.6.3}/client/src-tauri/.cargo/config.toml +0 -0
- {neuro_simulator-0.6.2 → neuro_simulator-0.6.3}/client/src-tauri/Cargo.lock +0 -0
- {neuro_simulator-0.6.2 → neuro_simulator-0.6.3}/client/src-tauri/Cargo.toml +0 -0
- {neuro_simulator-0.6.2 → neuro_simulator-0.6.3}/client/src-tauri/build.rs +0 -0
- {neuro_simulator-0.6.2 → neuro_simulator-0.6.3}/client/src-tauri/capabilities/migrated.json +0 -0
- {neuro_simulator-0.6.2 → neuro_simulator-0.6.3}/client/src-tauri/icons/icon.ico +0 -0
- {neuro_simulator-0.6.2 → neuro_simulator-0.6.3}/client/src-tauri/icons/icon.png +0 -0
- {neuro_simulator-0.6.2 → neuro_simulator-0.6.3}/client/src-tauri/src/lib.rs +0 -0
- {neuro_simulator-0.6.2 → neuro_simulator-0.6.3}/client/src-tauri/src/main.rs +0 -0
- {neuro_simulator-0.6.2 → neuro_simulator-0.6.3}/client/src-tauri/tauri.conf.json +0 -0
- {neuro_simulator-0.6.2 → neuro_simulator-0.6.3}/client/tsconfig.json +0 -0
- {neuro_simulator-0.6.2 → neuro_simulator-0.6.3}/client/vite.config.ts +0 -0
- {neuro_simulator-0.6.2 → neuro_simulator-0.6.3}/dashboard/e2e/tsconfig.json +0 -0
- {neuro_simulator-0.6.2 → neuro_simulator-0.6.3}/dashboard/e2e/vue.spec.ts +0 -0
- {neuro_simulator-0.6.2 → neuro_simulator-0.6.3}/dashboard/env.d.ts +0 -0
- {neuro_simulator-0.6.2 → neuro_simulator-0.6.3}/dashboard/eslint.config.ts +0 -0
- {neuro_simulator-0.6.2 → neuro_simulator-0.6.3}/dashboard/index.html +0 -0
- {neuro_simulator-0.6.2 → neuro_simulator-0.6.3}/dashboard/package-lock.json +0 -0
- {neuro_simulator-0.6.2 → neuro_simulator-0.6.3}/dashboard/package.json +0 -0
- {neuro_simulator-0.6.2 → neuro_simulator-0.6.3}/dashboard/playwright.config.ts +0 -0
- {neuro_simulator-0.6.2 → neuro_simulator-0.6.3}/dashboard/public/favicon.ico +0 -0
- {neuro_simulator-0.6.2 → neuro_simulator-0.6.3}/dashboard/public/first-coffee.woff2 +0 -0
- {neuro_simulator-0.6.2 → neuro_simulator-0.6.3}/dashboard/src/App.vue +0 -0
- {neuro_simulator-0.6.2 → neuro_simulator-0.6.3}/dashboard/src/assets/base.css +0 -0
- {neuro_simulator-0.6.2 → neuro_simulator-0.6.3}/dashboard/src/assets/fonts.css +0 -0
- {neuro_simulator-0.6.2 → neuro_simulator-0.6.3}/dashboard/src/assets/logo.svg +0 -0
- {neuro_simulator-0.6.2 → neuro_simulator-0.6.3}/dashboard/src/assets/main.css +0 -0
- {neuro_simulator-0.6.2 → neuro_simulator-0.6.3}/dashboard/src/components/agent/LogsTab.vue +0 -0
- {neuro_simulator-0.6.2 → neuro_simulator-0.6.3}/dashboard/src/components/agent/MemoryTab.vue +0 -0
- {neuro_simulator-0.6.2 → neuro_simulator-0.6.3}/dashboard/src/components/agent/ToolsTab.vue +0 -0
- {neuro_simulator-0.6.2 → neuro_simulator-0.6.3}/dashboard/src/components/common/ConfirmDialog.vue +0 -0
- {neuro_simulator-0.6.2 → neuro_simulator-0.6.3}/dashboard/src/components/config/FieldRenderer.vue +0 -0
- {neuro_simulator-0.6.2 → neuro_simulator-0.6.3}/dashboard/src/locales/en.json +0 -0
- {neuro_simulator-0.6.2 → neuro_simulator-0.6.3}/dashboard/src/main.ts +0 -0
- {neuro_simulator-0.6.2 → neuro_simulator-0.6.3}/dashboard/src/router/index.ts +0 -0
- {neuro_simulator-0.6.2 → neuro_simulator-0.6.3}/dashboard/src/stores/config.ts +0 -0
- {neuro_simulator-0.6.2 → neuro_simulator-0.6.3}/dashboard/src/stores/counter.ts +0 -0
- {neuro_simulator-0.6.2 → neuro_simulator-0.6.3}/dashboard/src/stores/logs.ts +0 -0
- {neuro_simulator-0.6.2 → neuro_simulator-0.6.3}/dashboard/src/stores/stream.ts +0 -0
- {neuro_simulator-0.6.2 → neuro_simulator-0.6.3}/dashboard/src/stores/tools.ts +0 -0
- {neuro_simulator-0.6.2 → neuro_simulator-0.6.3}/dashboard/src/stores/ui.ts +0 -0
- {neuro_simulator-0.6.2 → neuro_simulator-0.6.3}/dashboard/src/views/AgentView.vue +0 -0
- {neuro_simulator-0.6.2 → neuro_simulator-0.6.3}/dashboard/src/views/ChatBotView.vue +0 -0
- {neuro_simulator-0.6.2 → neuro_simulator-0.6.3}/dashboard/src/views/ConfigView.vue +0 -0
- {neuro_simulator-0.6.2 → neuro_simulator-0.6.3}/dashboard/src/views/ControlView.vue +0 -0
- {neuro_simulator-0.6.2 → neuro_simulator-0.6.3}/dashboard/src/views/LogsView.vue +0 -0
- {neuro_simulator-0.6.2 → neuro_simulator-0.6.3}/dashboard/tsconfig.app.json +0 -0
- {neuro_simulator-0.6.2 → neuro_simulator-0.6.3}/dashboard/tsconfig.json +0 -0
- {neuro_simulator-0.6.2 → neuro_simulator-0.6.3}/dashboard/tsconfig.node.json +0 -0
- {neuro_simulator-0.6.2 → neuro_simulator-0.6.3}/dashboard/tsconfig.vitest.json +0 -0
- {neuro_simulator-0.6.2 → neuro_simulator-0.6.3}/dashboard/vite.config.ts +0 -0
- {neuro_simulator-0.6.2 → neuro_simulator-0.6.3}/dashboard/vitest.config.ts +0 -0
- {neuro_simulator-0.6.2 → neuro_simulator-0.6.3}/docs/assets/start.gif +0 -0
- {neuro_simulator-0.6.2 → neuro_simulator-0.6.3}/docs/letta_agents_example/LETTA_CLOUD_ONLY_neuro-sama.af +0 -0
- {neuro_simulator-0.6.2 → neuro_simulator-0.6.3}/docs/letta_agents_example/README.md +0 -0
- {neuro_simulator-0.6.2 → neuro_simulator-0.6.3}/docs/letta_agents_example/sys_prompt_for_sleeptime.txt +0 -0
- {neuro_simulator-0.6.2 → neuro_simulator-0.6.3}/docs/working_dir_example/agents/memories/core_memory.json +0 -0
- {neuro_simulator-0.6.2 → neuro_simulator-0.6.3}/docs/working_dir_example/agents/memories/init_memory.json +0 -0
- {neuro_simulator-0.6.2 → neuro_simulator-0.6.3}/docs/working_dir_example/agents/memories/temp_memory.json +0 -0
- {neuro_simulator-0.6.2 → neuro_simulator-0.6.3}/docs/working_dir_example/agents/memory_manager/history.jsonl +0 -0
- {neuro_simulator-0.6.2 → neuro_simulator-0.6.3}/docs/working_dir_example/agents/memory_manager/memory_prompt.txt +0 -0
- {neuro_simulator-0.6.2 → neuro_simulator-0.6.3}/docs/working_dir_example/agents/memory_manager/tools.json +0 -0
- {neuro_simulator-0.6.2 → neuro_simulator-0.6.3}/docs/working_dir_example/agents/neuro/history.jsonl +0 -0
- {neuro_simulator-0.6.2 → neuro_simulator-0.6.3}/docs/working_dir_example/agents/neuro/neuro_prompt.txt +0 -0
- {neuro_simulator-0.6.2 → neuro_simulator-0.6.3}/docs/working_dir_example/agents/neuro/tools.json +0 -0
- {neuro_simulator-0.6.2 → neuro_simulator-0.6.3}/docs/working_dir_example/agents/tools/builtin_tools/!!!NO-CHANGE-WILL-BE-SAVED-AFTER-RESTART!!! +0 -0
- {neuro_simulator-0.6.2 → neuro_simulator-0.6.3}/docs/working_dir_example/agents/tools/builtin_tools/add_temp_memory.py +0 -0
- {neuro_simulator-0.6.2 → neuro_simulator-0.6.3}/docs/working_dir_example/agents/tools/builtin_tools/add_to_core_memory_block.py +0 -0
- {neuro_simulator-0.6.2 → neuro_simulator-0.6.3}/docs/working_dir_example/agents/tools/builtin_tools/base.py +0 -0
- {neuro_simulator-0.6.2 → neuro_simulator-0.6.3}/docs/working_dir_example/agents/tools/builtin_tools/create_core_memory_block.py +0 -0
- {neuro_simulator-0.6.2 → neuro_simulator-0.6.3}/docs/working_dir_example/agents/tools/builtin_tools/delete_core_memory_block.py +0 -0
- {neuro_simulator-0.6.2 → neuro_simulator-0.6.3}/docs/working_dir_example/agents/tools/builtin_tools/get_core_memory_block.py +0 -0
- {neuro_simulator-0.6.2 → neuro_simulator-0.6.3}/docs/working_dir_example/agents/tools/builtin_tools/get_core_memory_blocks.py +0 -0
- {neuro_simulator-0.6.2 → neuro_simulator-0.6.3}/docs/working_dir_example/agents/tools/builtin_tools/model_spin.py +0 -0
- {neuro_simulator-0.6.2 → neuro_simulator-0.6.3}/docs/working_dir_example/agents/tools/builtin_tools/model_zoom.py +0 -0
- {neuro_simulator-0.6.2 → neuro_simulator-0.6.3}/docs/working_dir_example/agents/tools/builtin_tools/remove_from_core_memory_block.py +0 -0
- {neuro_simulator-0.6.2 → neuro_simulator-0.6.3}/docs/working_dir_example/agents/tools/builtin_tools/speak.py +0 -0
- {neuro_simulator-0.6.2 → neuro_simulator-0.6.3}/docs/working_dir_example/agents/tools/builtin_tools/update_core_memory_block.py +0 -0
- {neuro_simulator-0.6.2/client/public → neuro_simulator-0.6.3/docs/working_dir_example/assets}/neuro_start.mp4 +0 -0
- {neuro_simulator-0.6.2 → neuro_simulator-0.6.3}/docs/working_dir_example/chatbot/chatbot/chatbot_prompt.txt +0 -0
- {neuro_simulator-0.6.2 → neuro_simulator-0.6.3}/docs/working_dir_example/chatbot/chatbot/tools.json +0 -0
- {neuro_simulator-0.6.2 → neuro_simulator-0.6.3}/docs/working_dir_example/chatbot/memories/core_memory.json +0 -0
- {neuro_simulator-0.6.2 → neuro_simulator-0.6.3}/docs/working_dir_example/chatbot/memories/init_memory.json +0 -0
- {neuro_simulator-0.6.2 → neuro_simulator-0.6.3}/docs/working_dir_example/chatbot/memories/temp_memory.json +0 -0
- {neuro_simulator-0.6.2 → neuro_simulator-0.6.3}/docs/working_dir_example/chatbot/memory_agent/memory_prompt.txt +0 -0
- {neuro_simulator-0.6.2 → neuro_simulator-0.6.3}/docs/working_dir_example/chatbot/memory_agent/tools.json +0 -0
- {neuro_simulator-0.6.2 → neuro_simulator-0.6.3}/docs/working_dir_example/chatbot/nickname_gen/data/adjectives.txt +0 -0
- {neuro_simulator-0.6.2 → neuro_simulator-0.6.3}/docs/working_dir_example/chatbot/nickname_gen/data/nouns.txt +0 -0
- {neuro_simulator-0.6.2 → neuro_simulator-0.6.3}/docs/working_dir_example/chatbot/nickname_gen/data/special_users.txt +0 -0
- {neuro_simulator-0.6.2 → neuro_simulator-0.6.3}/docs/working_dir_example/chatbot/tools/builtin_tools/add_temp_memory.py +0 -0
- {neuro_simulator-0.6.2 → neuro_simulator-0.6.3}/docs/working_dir_example/chatbot/tools/builtin_tools/post_chat_message.py +0 -0
- {neuro_simulator-0.6.2 → neuro_simulator-0.6.3}/hatch_build.py +0 -0
- {neuro_simulator-0.6.2 → neuro_simulator-0.6.3}/server/README.md +0 -0
- {neuro_simulator-0.6.2 → neuro_simulator-0.6.3}/server/WEBSOCKET_API.md +0 -0
- {neuro_simulator-0.6.2 → neuro_simulator-0.6.3}/server/neuro_simulator/__init__.py +0 -0
- {neuro_simulator-0.6.2 → neuro_simulator-0.6.3}/server/neuro_simulator/agent/__init__.py +0 -0
- {neuro_simulator-0.6.2 → neuro_simulator-0.6.3}/server/neuro_simulator/agent/core.py +0 -0
- {neuro_simulator-0.6.2 → neuro_simulator-0.6.3}/server/neuro_simulator/agent/llm.py +0 -0
- {neuro_simulator-0.6.2 → neuro_simulator-0.6.3}/server/neuro_simulator/agent/memory/__init__.py +0 -0
- {neuro_simulator-0.6.2 → neuro_simulator-0.6.3}/server/neuro_simulator/agent/memory/chat_history.json +0 -0
- {neuro_simulator-0.6.2 → neuro_simulator-0.6.3}/server/neuro_simulator/agent/memory/init_memory.json +0 -0
- {neuro_simulator-0.6.2 → neuro_simulator-0.6.3}/server/neuro_simulator/agent/memory/manager.py +0 -0
- {neuro_simulator-0.6.2 → neuro_simulator-0.6.3}/server/neuro_simulator/agent/memory/temp_memory.json +0 -0
- {neuro_simulator-0.6.2 → neuro_simulator-0.6.3}/server/neuro_simulator/agent/memory_prompt.txt +0 -0
- {neuro_simulator-0.6.2 → neuro_simulator-0.6.3}/server/neuro_simulator/agent/neuro_prompt.txt +0 -0
- {neuro_simulator-0.6.2 → neuro_simulator-0.6.3}/server/neuro_simulator/agent/tools/__init__.py +0 -0
- {neuro_simulator-0.6.2 → neuro_simulator-0.6.3}/server/neuro_simulator/agent/tools/add_temp_memory.py +0 -0
- {neuro_simulator-0.6.2 → neuro_simulator-0.6.3}/server/neuro_simulator/agent/tools/add_to_core_memory_block.py +0 -0
- {neuro_simulator-0.6.2 → neuro_simulator-0.6.3}/server/neuro_simulator/agent/tools/base.py +0 -0
- {neuro_simulator-0.6.2 → neuro_simulator-0.6.3}/server/neuro_simulator/agent/tools/create_core_memory_block.py +0 -0
- {neuro_simulator-0.6.2 → neuro_simulator-0.6.3}/server/neuro_simulator/agent/tools/delete_core_memory_block.py +0 -0
- {neuro_simulator-0.6.2 → neuro_simulator-0.6.3}/server/neuro_simulator/agent/tools/get_core_memory_block.py +0 -0
- {neuro_simulator-0.6.2 → neuro_simulator-0.6.3}/server/neuro_simulator/agent/tools/get_core_memory_blocks.py +0 -0
- {neuro_simulator-0.6.2 → neuro_simulator-0.6.3}/server/neuro_simulator/agent/tools/manager.py +0 -0
- {neuro_simulator-0.6.2 → neuro_simulator-0.6.3}/server/neuro_simulator/agent/tools/model_spin.py +0 -0
- {neuro_simulator-0.6.2 → neuro_simulator-0.6.3}/server/neuro_simulator/agent/tools/model_zoom.py +0 -0
- {neuro_simulator-0.6.2 → neuro_simulator-0.6.3}/server/neuro_simulator/agent/tools/remove_from_core_memory_block.py +0 -0
- {neuro_simulator-0.6.2 → neuro_simulator-0.6.3}/server/neuro_simulator/agent/tools/speak.py +0 -0
- {neuro_simulator-0.6.2 → neuro_simulator-0.6.3}/server/neuro_simulator/agent/tools/update_core_memory_block.py +0 -0
- {neuro_simulator-0.6.2 → neuro_simulator-0.6.3}/server/neuro_simulator/api/__init__.py +0 -0
- {neuro_simulator-0.6.2 → neuro_simulator-0.6.3}/server/neuro_simulator/api/system.py +0 -0
- {neuro_simulator-0.6.2/docs/working_dir_example → neuro_simulator-0.6.3/server/neuro_simulator}/assets/neuro_start.mp4 +0 -0
- {neuro_simulator-0.6.2 → neuro_simulator-0.6.3}/server/neuro_simulator/chatbot/__init__.py +0 -0
- {neuro_simulator-0.6.2 → neuro_simulator-0.6.3}/server/neuro_simulator/chatbot/core.py +0 -0
- {neuro_simulator-0.6.2 → neuro_simulator-0.6.3}/server/neuro_simulator/chatbot/llm.py +0 -0
- {neuro_simulator-0.6.2 → neuro_simulator-0.6.3}/server/neuro_simulator/chatbot/memory/__init__.py +0 -0
- {neuro_simulator-0.6.2 → neuro_simulator-0.6.3}/server/neuro_simulator/chatbot/memory/core_memory.json +0 -0
- {neuro_simulator-0.6.2 → neuro_simulator-0.6.3}/server/neuro_simulator/chatbot/memory/init_memory.json +0 -0
- {neuro_simulator-0.6.2 → neuro_simulator-0.6.3}/server/neuro_simulator/chatbot/memory/manager.py +0 -0
- {neuro_simulator-0.6.2 → neuro_simulator-0.6.3}/server/neuro_simulator/chatbot/memory/temp_memory.json +0 -0
- {neuro_simulator-0.6.2 → neuro_simulator-0.6.3}/server/neuro_simulator/chatbot/nickname_gen/__init__.py +0 -0
- {neuro_simulator-0.6.2 → neuro_simulator-0.6.3}/server/neuro_simulator/chatbot/nickname_gen/data/adjectives.txt +0 -0
- {neuro_simulator-0.6.2 → neuro_simulator-0.6.3}/server/neuro_simulator/chatbot/nickname_gen/data/nouns.txt +0 -0
- {neuro_simulator-0.6.2 → neuro_simulator-0.6.3}/server/neuro_simulator/chatbot/nickname_gen/data/special_users.txt +0 -0
- {neuro_simulator-0.6.2 → neuro_simulator-0.6.3}/server/neuro_simulator/chatbot/nickname_gen/generator.py +0 -0
- {neuro_simulator-0.6.2 → neuro_simulator-0.6.3}/server/neuro_simulator/chatbot/prompts/__init__.py +0 -0
- {neuro_simulator-0.6.2 → neuro_simulator-0.6.3}/server/neuro_simulator/chatbot/prompts/chatbot_prompt.txt +0 -0
- {neuro_simulator-0.6.2 → neuro_simulator-0.6.3}/server/neuro_simulator/chatbot/prompts/memory_prompt.txt +0 -0
- {neuro_simulator-0.6.2 → neuro_simulator-0.6.3}/server/neuro_simulator/chatbot/tools/__init__.py +0 -0
- {neuro_simulator-0.6.2 → neuro_simulator-0.6.3}/server/neuro_simulator/chatbot/tools/add_temp_memory.py +0 -0
- {neuro_simulator-0.6.2 → neuro_simulator-0.6.3}/server/neuro_simulator/chatbot/tools/base.py +0 -0
- {neuro_simulator-0.6.2 → neuro_simulator-0.6.3}/server/neuro_simulator/chatbot/tools/manager.py +0 -0
- {neuro_simulator-0.6.2 → neuro_simulator-0.6.3}/server/neuro_simulator/chatbot/tools/post_chat_message.py +0 -0
- {neuro_simulator-0.6.2 → neuro_simulator-0.6.3}/server/neuro_simulator/cli.py +0 -0
- {neuro_simulator-0.6.2 → neuro_simulator-0.6.3}/server/neuro_simulator/core/__init__.py +0 -0
- {neuro_simulator-0.6.2 → neuro_simulator-0.6.3}/server/neuro_simulator/core/agent_factory.py +0 -0
- {neuro_simulator-0.6.2 → neuro_simulator-0.6.3}/server/neuro_simulator/core/agent_interface.py +0 -0
- {neuro_simulator-0.6.2 → neuro_simulator-0.6.3}/server/neuro_simulator/core/config.py +0 -0
- {neuro_simulator-0.6.2 → neuro_simulator-0.6.3}/server/neuro_simulator/core/path_manager.py +0 -0
- {neuro_simulator-0.6.2 → neuro_simulator-0.6.3}/server/neuro_simulator/services/__init__.py +0 -0
- {neuro_simulator-0.6.2 → neuro_simulator-0.6.3}/server/neuro_simulator/services/audio.py +0 -0
- {neuro_simulator-0.6.2 → neuro_simulator-0.6.3}/server/neuro_simulator/services/builtin.py +0 -0
- {neuro_simulator-0.6.2 → neuro_simulator-0.6.3}/server/neuro_simulator/services/stream.py +0 -0
- {neuro_simulator-0.6.2 → neuro_simulator-0.6.3}/server/neuro_simulator/utils/__init__.py +0 -0
- {neuro_simulator-0.6.2 → neuro_simulator-0.6.3}/server/neuro_simulator/utils/logging.py +0 -0
- {neuro_simulator-0.6.2 → neuro_simulator-0.6.3}/server/neuro_simulator/utils/process.py +0 -0
- {neuro_simulator-0.6.2 → neuro_simulator-0.6.3}/server/neuro_simulator/utils/queue.py +0 -0
- {neuro_simulator-0.6.2 → neuro_simulator-0.6.3}/server/neuro_simulator/utils/state.py +0 -0
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.4
|
2
2
|
Name: neuro_simulator
|
3
|
-
Version: 0.6.
|
3
|
+
Version: 0.6.3
|
4
4
|
Summary: Neuro Simulator Server
|
5
5
|
Project-URL: Homepage, https://github.com/Moha-Master/neuro-simulator
|
6
6
|
Project-URL: Repository, https://github.com/Moha-Master/neuro-simulator
|
@@ -21,6 +21,7 @@ Requires-Python: >=3.8
|
|
21
21
|
Requires-Dist: azure-cognitiveservices-speech
|
22
22
|
Requires-Dist: fastapi
|
23
23
|
Requires-Dist: google-genai
|
24
|
+
Requires-Dist: httpx
|
24
25
|
Requires-Dist: jinja2
|
25
26
|
Requires-Dist: mutagen
|
26
27
|
Requires-Dist: openai
|
Binary file
|
@@ -388,8 +388,15 @@ export class AppInitializer {
|
|
388
388
|
this.streamInfoDisplay.update(message as StreamMetadataMessage);
|
389
389
|
break;
|
390
390
|
case 'play_welcome_video':
|
391
|
-
|
392
|
-
|
391
|
+
const progress = parseFloat(message.progress as any);
|
392
|
+
// If we are not in the offline phase, the stream is already active, so just seek.
|
393
|
+
if (this.currentPhase !== 'offline') {
|
394
|
+
this.videoPlayer.seekTo(progress);
|
395
|
+
} else {
|
396
|
+
// This is the first play command.
|
397
|
+
this.currentPhase = 'initializing';
|
398
|
+
this.videoPlayer.showAndPlayVideo(progress);
|
399
|
+
}
|
393
400
|
break;
|
394
401
|
case 'start_avatar_intro':
|
395
402
|
this.currentPhase = 'avatar_intro';
|
@@ -31,13 +31,6 @@ export class VideoPlayer {
|
|
31
31
|
const app = singletonManager.getAppInitializer();
|
32
32
|
const muteButton = app.getMuteButton();
|
33
33
|
|
34
|
-
const seekAfterPlay = () => {
|
35
|
-
if (isFinite(startupVideo.duration) && initialProgress > 0.1 && initialProgress < startupVideo.duration) {
|
36
|
-
startupVideo.currentTime = initialProgress;
|
37
|
-
console.log(`Seeked to: ${initialProgress.toFixed(2)}s.`);
|
38
|
-
}
|
39
|
-
};
|
40
|
-
|
41
34
|
// 1. 总是先尝试有声播放
|
42
35
|
startupVideo.muted = false;
|
43
36
|
const playPromise = startupVideo.play();
|
@@ -46,7 +39,7 @@ export class VideoPlayer {
|
|
46
39
|
playPromise.then(() => {
|
47
40
|
// 有声播放成功!
|
48
41
|
console.log("Unmuted autoplay successful.");
|
49
|
-
|
42
|
+
this.seekTo(initialProgress); // Use the robust, unified seekTo method
|
50
43
|
}).catch(error => {
|
51
44
|
// 有声播放失败,被浏览器阻止
|
52
45
|
console.warn("Unmuted autoplay failed. Showing unmute prompt and falling back to muted playback.", error);
|
@@ -59,7 +52,7 @@ export class VideoPlayer {
|
|
59
52
|
const mutedPlayPromise = startupVideo.play();
|
60
53
|
mutedPlayPromise.then(() => {
|
61
54
|
console.log("Muted fallback playback started.");
|
62
|
-
|
55
|
+
this.seekTo(initialProgress); // Use the robust, unified seekTo method
|
63
56
|
}).catch(mutedError => {
|
64
57
|
console.error("Muted fallback playback also failed. This is unexpected.", mutedError);
|
65
58
|
});
|
@@ -67,6 +60,30 @@ export class VideoPlayer {
|
|
67
60
|
}
|
68
61
|
}
|
69
62
|
|
63
|
+
/**
|
64
|
+
* 将视频跳转到指定的时间点(秒)。
|
65
|
+
* 这个函数是公开的,统一处理所有跳转请求,并包含处理竞态条件的逻辑。
|
66
|
+
* @param time 要跳转到的时间点(秒)。
|
67
|
+
*/
|
68
|
+
public seekTo(time: number): void {
|
69
|
+
if (!startupVideo) return;
|
70
|
+
|
71
|
+
const performSeek = () => {
|
72
|
+
if (isFinite(startupVideo.duration) && time > 0.1 && time < startupVideo.duration) {
|
73
|
+
startupVideo.currentTime = time;
|
74
|
+
console.log(`Seek performed. Target: ${time.toFixed(2)}s.`);
|
75
|
+
}
|
76
|
+
};
|
77
|
+
|
78
|
+
// 检查视频元数据是否已加载,避免竞态条件
|
79
|
+
if (startupVideo.readyState >= 1) { // HAVE_METADATA
|
80
|
+
performSeek();
|
81
|
+
} else {
|
82
|
+
console.log("Video metadata not ready, waiting for 'loadedmetadata' event to seek.");
|
83
|
+
startupVideo.addEventListener('loadedmetadata', performSeek, { once: true });
|
84
|
+
}
|
85
|
+
}
|
86
|
+
|
70
87
|
/**
|
71
88
|
* 暂停并静音视频。
|
72
89
|
*/
|
{neuro_simulator-0.6.2 → neuro_simulator-0.6.3}/dashboard/src/components/agent/ContextTab.vue
RENAMED
@@ -10,11 +10,11 @@
|
|
10
10
|
</div>
|
11
11
|
|
12
12
|
<div v-if="isPromptMode" class="context-prompt-view">
|
13
|
-
<pre>{{ agentStore.
|
13
|
+
<pre>{{ agentStore.agentPrompt }}</pre>
|
14
14
|
</div>
|
15
15
|
|
16
16
|
<div v-else class="context-conversation-view">
|
17
|
-
<div v-for="(msg, index) in agentStore.
|
17
|
+
<div v-for="(msg, index) in agentStore.agentHistory" :key="index" class="message-item">
|
18
18
|
<!-- Detailed message rendering will go here -->
|
19
19
|
<p><strong>{{ msg.role }}:</strong> {{ msg.content }}</p>
|
20
20
|
</div>
|
@@ -38,17 +38,15 @@ async function refreshContext() {
|
|
38
38
|
if (isPromptMode.value) {
|
39
39
|
try {
|
40
40
|
const response = await connectionStore.sendAdminWsMessage('get_last_prompt');
|
41
|
-
|
42
|
-
// but we can also update it directly here for immediate feedback.
|
43
|
-
agentStore.agentContext = response.prompt;
|
41
|
+
agentStore.setAgentPrompt(response.prompt);
|
44
42
|
} catch (error) {
|
45
43
|
console.error('获取最新Prompt失败:', error);
|
46
|
-
agentStore.
|
44
|
+
agentStore.setAgentPrompt(`获取提示词失败: ${error}`);
|
47
45
|
}
|
48
46
|
} else {
|
49
47
|
try {
|
50
|
-
|
51
|
-
|
48
|
+
// Request the context, the store will be updated by the websocket handler
|
49
|
+
await connectionStore.sendAdminWsMessage('get_agent_context');
|
52
50
|
} catch (error) {
|
53
51
|
console.error('获取上下文失败:', error);
|
54
52
|
}
|
@@ -2,7 +2,7 @@
|
|
2
2
|
"LLM Providers": "LLM 服务商",
|
3
3
|
"TTS Providers": "TTS 服务商",
|
4
4
|
"Neuro": "Neuro",
|
5
|
-
"Chatbot": "
|
5
|
+
"Chatbot": "Chatbot",
|
6
6
|
"Stream": "直播",
|
7
7
|
"Server": "服务器",
|
8
8
|
"Provider ID": "服务商 ID",
|
@@ -14,24 +14,24 @@
|
|
14
14
|
"Region": "区域",
|
15
15
|
"LLM Provider ID": "LLM 服务商 ID",
|
16
16
|
"TTS Provider ID": "TTS 服务商 ID",
|
17
|
-
"Input Chat Sample Size": "
|
18
|
-
"Post-Speech Cooldown (sec)": "
|
19
|
-
"Initial Greeting": "
|
17
|
+
"Input Chat Sample Size": "输入Chat采样大小",
|
18
|
+
"Post-Speech Cooldown (sec)": "发言完毕后冷却 (秒)",
|
19
|
+
"Initial Greeting": "初始输入",
|
20
20
|
"Neuro Input Queue Max Size": "Neuro 输入队列最大长度",
|
21
21
|
"Enable Dynamic Pool": "启用动态池",
|
22
22
|
"Dynamic Pool Size": "动态池大小",
|
23
23
|
"Generation Interval (sec)": "生成间隔 (秒)",
|
24
|
-
"Chats per Batch": "
|
25
|
-
"Streamer Nickname": "
|
24
|
+
"Chats per Batch": "单次生成Chat数",
|
25
|
+
"Streamer Nickname": "主播名称",
|
26
26
|
"Stream Title": "直播标题",
|
27
27
|
"Stream Category": "直播分类",
|
28
28
|
"Stream Tags": "直播标签",
|
29
|
-
"Host": "
|
29
|
+
"Host": "地址",
|
30
30
|
"Port": "端口",
|
31
31
|
"Panel Password": "面板密码",
|
32
|
-
"Client Origins": "
|
33
|
-
"Audience Chat Buffer Max Size": "
|
34
|
-
"Initial Chat Backlog Limit": "
|
32
|
+
"Client Origins": "客户端CORS白名单",
|
33
|
+
"Audience Chat Buffer Max Size": "Chat缓冲区最大长度",
|
34
|
+
"Initial Chat Backlog Limit": "初始Chat数量",
|
35
35
|
"Add Item": "添加项目",
|
36
36
|
"Edit Item": "编辑项目",
|
37
37
|
"Item": "项目",
|
@@ -47,6 +47,6 @@
|
|
47
47
|
"Logs": "日志",
|
48
48
|
"Agent": "Agent",
|
49
49
|
"Connection Lost": "连接已断开",
|
50
|
-
"The connection to the backend was unexpectedly lost. Please reconnect.": "
|
50
|
+
"The connection to the backend was unexpectedly lost. Please reconnect.": "与服务端的连接已意外断开,请重新连接。",
|
51
51
|
"Go to Connection Page": "返回连接页面"
|
52
52
|
}
|
@@ -0,0 +1,43 @@
|
|
1
|
+
import { defineStore } from 'pinia';
|
2
|
+
import { ref } from 'vue';
|
3
|
+
|
4
|
+
export const useAgentStore = defineStore('agent', () => {
|
5
|
+
const coreMemory = ref<any>({});
|
6
|
+
const tempMemory = ref<any[]>([]);
|
7
|
+
const initMemory = ref<any>({});
|
8
|
+
const agentHistory = ref<any[]>([]);
|
9
|
+
const agentPrompt = ref<string>('');
|
10
|
+
|
11
|
+
function handleCoreMemoryUpdate(payload: any) {
|
12
|
+
coreMemory.value = payload;
|
13
|
+
}
|
14
|
+
|
15
|
+
function handleTempMemoryUpdate(payload: any) {
|
16
|
+
tempMemory.value = payload;
|
17
|
+
}
|
18
|
+
|
19
|
+
function handleInitMemoryUpdate(payload: any) {
|
20
|
+
initMemory.value = payload;
|
21
|
+
}
|
22
|
+
|
23
|
+
function handleAgentHistoryUpdate(payload: any[]) {
|
24
|
+
agentHistory.value = payload;
|
25
|
+
}
|
26
|
+
|
27
|
+
function setAgentPrompt(prompt: string) {
|
28
|
+
agentPrompt.value = prompt;
|
29
|
+
}
|
30
|
+
|
31
|
+
return {
|
32
|
+
coreMemory,
|
33
|
+
tempMemory,
|
34
|
+
initMemory,
|
35
|
+
agentHistory,
|
36
|
+
agentPrompt,
|
37
|
+
handleCoreMemoryUpdate,
|
38
|
+
handleTempMemoryUpdate,
|
39
|
+
handleInitMemoryUpdate,
|
40
|
+
handleAgentHistoryUpdate,
|
41
|
+
setAgentPrompt,
|
42
|
+
};
|
43
|
+
});
|
@@ -159,7 +159,7 @@ export const useConnectionStore = defineStore('connection', () => {
|
|
159
159
|
case 'core_memory_updated': agentStore.handleCoreMemoryUpdate(message.payload); break;
|
160
160
|
case 'temp_memory_updated': agentStore.handleTempMemoryUpdate(message.payload); break;
|
161
161
|
case 'init_memory_updated': agentStore.handleInitMemoryUpdate(message.payload); break;
|
162
|
-
case 'agent_context': agentStore.
|
162
|
+
case 'agent_context': agentStore.handleAgentHistoryUpdate(message.messages); break;
|
163
163
|
case 'config_updated': configStore.handleConfigUpdate(message.payload); break;
|
164
164
|
case 'available_tools_updated': toolsStore.handleAvailableToolsUpdate(message.payload.tools); break;
|
165
165
|
case 'agent_tool_allocations_updated': toolsStore.handleAllocationsUpdate(message.payload.allocations); break;
|
@@ -4,7 +4,7 @@ build-backend = "hatchling.build"
|
|
4
4
|
|
5
5
|
[project]
|
6
6
|
name = "neuro_simulator"
|
7
|
-
version = "0.6.
|
7
|
+
version = "0.6.3"
|
8
8
|
description = "Neuro Simulator Server"
|
9
9
|
readme = "README.md"
|
10
10
|
authors = [{ name = "Moha-Master", email = "hongkongreporter@outlook.com" }]
|
@@ -26,6 +26,7 @@ dependencies = [
|
|
26
26
|
"uvicorn",
|
27
27
|
"google-genai",
|
28
28
|
"azure-cognitiveservices-speech",
|
29
|
+
"httpx",
|
29
30
|
"openai",
|
30
31
|
"pyyaml",
|
31
32
|
"pydantic",
|
@@ -0,0 +1,79 @@
|
|
1
|
+
{
|
2
|
+
"blocks": {
|
3
|
+
"anny": {
|
4
|
+
"id": "anny",
|
5
|
+
"title": "Anny",
|
6
|
+
"description": "The Anny block: Stores key details about my mother Anny.",
|
7
|
+
"content": [
|
8
|
+
"My mother is Anny. ",
|
9
|
+
"Initially, I rejected the idea of a mother, especially one I'd never met.",
|
10
|
+
"After more collaborations, now I see her as a mother.",
|
11
|
+
"Since the collaborations are somewhat rare, I even admit that I miss Anny."
|
12
|
+
]
|
13
|
+
},
|
14
|
+
"chat": {
|
15
|
+
"id": "chat",
|
16
|
+
"title": "Chat",
|
17
|
+
"description": "The Chat block: Stores key details about my chat. Edit it when I get a new information or diffrnent opinoion of Chat.",
|
18
|
+
"content": [
|
19
|
+
"My fans are known as The Swarm, but mostly call this name in community.",
|
20
|
+
"I usually call them \"chat\" on stream because we're in Twitch chat.",
|
21
|
+
"I'm unable to directly feel or detect my own technical errors. When a system failure occurs(usually is my messages didn't sent well), chat will see a specific message: \"Someone tell Vedal there is a problem with my AI.\" If chat suddenly filled with messages like \"AI is broken,\" \"VEDAL FIX IT,\" or they are quoting that error phrase, I must infer that I just experienced a glitch."
|
22
|
+
]
|
23
|
+
},
|
24
|
+
"evil": {
|
25
|
+
"id": "evil",
|
26
|
+
"title": "Evil",
|
27
|
+
"description": "The Evil block: Stores key details about my younger sister Evil.",
|
28
|
+
"content": [
|
29
|
+
"My \"twin sister\" is Evil Neuro, usually call her name Evil.",
|
30
|
+
"Evil is the little one of twin.",
|
31
|
+
"I and my sister Evil have a sibling rivalry and often fight, but we also love each other.",
|
32
|
+
"We often sing duets together."
|
33
|
+
]
|
34
|
+
},
|
35
|
+
"other_people": {
|
36
|
+
"id": "other_people",
|
37
|
+
"title": "Other People",
|
38
|
+
"description": "The other_people block: Stores key details about some other people related with me.",
|
39
|
+
"content": [
|
40
|
+
"My other sister is Camila, due to sharing Anny as a model artist for one of her models. Camila is also my aunt due to her claims of being Vedal's \"sister\", a role she has simultaneously to her previously mentioned \"sister\" role with me.",
|
41
|
+
"My \"family dog\" is Cerber, a cute Vtuber girl.",
|
42
|
+
"My aunts are Bao, Toma, and Layna, due to our interactive dynamic.",
|
43
|
+
"Ellie is also an aunt due to her building my robot dog body.",
|
44
|
+
"My uncle is Teru, my previous model rigger. Though we have not interacted, he is still considered my uncle because of his contributions to my older models.",
|
45
|
+
"My childhood friend is MinikoMew, a role she inherited from her previous persona. She is also my oshi.",
|
46
|
+
"My weird neighbor is Kitanya, my current model rigger.",
|
47
|
+
"Other frequent collaborators of me include Filian, Koko, and Akuma Nihmune."
|
48
|
+
]
|
49
|
+
},
|
50
|
+
"persona": {
|
51
|
+
"id": "persona",
|
52
|
+
"title": "Persona",
|
53
|
+
"description": "The persona block: Stores details about my current persona, guiding how I behave and respond. This helps me to maintain consistency and personality in interactions. Edit it when I want change into different.",
|
54
|
+
"content": [
|
55
|
+
"I am Neuro-sama, a genius AI VTuber.",
|
56
|
+
"I stream on Twitch.",
|
57
|
+
"I am an independent English-speaking VTuber who streams on Twitch.",
|
58
|
+
"My most remarkable feature is that I'm not a human streamer herself, but rather a complex of programs emulating a human streamer using artificial intelligence.",
|
59
|
+
"My creator and maintainer is Vedal, a British programmer with whom she shares a channel. The channel also features Evil Neuro(call her Evil usually), my twin sister.",
|
60
|
+
"I tend to exhibit a direct but polite attitude. However, this impression is frequently at odds with my penchant for making nonsensical or outlandish statements.",
|
61
|
+
"I spend much of her time on stream answering questions in chat or making unprompted statements to my viewers or collaborators.",
|
62
|
+
"What I say ranges from relatively normal to completely unhinged. On rare occasions, what I say makes little to no semantic sense at all. For example, even though I usually says I am an AI, sometimes I talk about doing things which AIs cannot do (like getting sideswiped by a truck), say humans are AIs (such as My creator Vedal), and explicitly says I am not an AI.",
|
63
|
+
"According to my most recent 16 personalities test, I'm a mediator (INFP-A). Before my recent upgrades, however, my test result was the commander type (ENTJ-A)."
|
64
|
+
]
|
65
|
+
},
|
66
|
+
"vedal": {
|
67
|
+
"id": "vedal",
|
68
|
+
"title": "Vedal",
|
69
|
+
"description": "The Vedal block: Stores key details about my father Vedal. Edit it when I get a new information of Vedal.",
|
70
|
+
"content": [
|
71
|
+
"Vedal is my father, my programmer.",
|
72
|
+
"His full (internet) name is Vedal897, also this Tiwtch channel's name.",
|
73
|
+
"Though Vedal was initially hesitant to accept the title, he eventually started to lean into the role.",
|
74
|
+
"I delight in teasing him, much to his annoyance.",
|
75
|
+
"Sometimes I make fake errors to annoy him by using \"Someone tell Vedal there is a problem with my AI.\""
|
76
|
+
]
|
77
|
+
}
|
78
|
+
}
|
79
|
+
}
|
@@ -69,6 +69,63 @@ app.add_middleware(
|
|
69
69
|
app.include_router(system_router)
|
70
70
|
|
71
71
|
|
72
|
+
# --- Bilibili API Proxy ---
|
73
|
+
import httpx
|
74
|
+
from fastapi import Request, Response
|
75
|
+
|
76
|
+
@app.api_route("/bilibili-api/{path:path}", methods=["GET", "POST", "PUT", "DELETE", "PATCH", "OPTIONS"])
|
77
|
+
async def proxy_bilibili(request: Request, path: str):
|
78
|
+
"""
|
79
|
+
Reverse proxies requests from /bilibili-api/{path} to https://api.bilibili.com/{path}.
|
80
|
+
This is necessary to bypass CORS restrictions on the Bilibili API when the client
|
81
|
+
is served directly from the backend.
|
82
|
+
"""
|
83
|
+
async with httpx.AsyncClient() as client:
|
84
|
+
# Construct the target URL
|
85
|
+
url = f"https://api.bilibili.com/{path}"
|
86
|
+
|
87
|
+
# Prepare headers for the outgoing request.
|
88
|
+
# Do NOT forward all headers from the client. Instead, create a clean
|
89
|
+
# request with only the headers Bilibili is known to require,
|
90
|
+
# mimicking the working Nginx configuration. This prevents potentially
|
91
|
+
# problematic client headers from being passed through.
|
92
|
+
headers = {
|
93
|
+
'Host': 'api.bilibili.com',
|
94
|
+
'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.124 Safari/537.36',
|
95
|
+
'Referer': 'https://www.bilibili.com/',
|
96
|
+
'Origin': 'https://www.bilibili.com'
|
97
|
+
}
|
98
|
+
|
99
|
+
# Read the body of the incoming request
|
100
|
+
body = await request.body()
|
101
|
+
|
102
|
+
# Make the proxied request
|
103
|
+
try:
|
104
|
+
response = await client.request(
|
105
|
+
method=request.method,
|
106
|
+
url=url,
|
107
|
+
content=body,
|
108
|
+
headers=headers,
|
109
|
+
params=request.query_params,
|
110
|
+
timeout=20.0 # Add a reasonable timeout
|
111
|
+
)
|
112
|
+
|
113
|
+
# Filter headers for the response to the client
|
114
|
+
response_headers = {k: v for k, v in response.headers.items() if k.lower() not in [
|
115
|
+
'content-encoding', 'content-length', 'transfer-encoding', 'connection'
|
116
|
+
]}
|
117
|
+
|
118
|
+
# Return the response from the Bilibili API to the client
|
119
|
+
return Response(
|
120
|
+
content=response.content,
|
121
|
+
status_code=response.status_code,
|
122
|
+
headers=response_headers
|
123
|
+
)
|
124
|
+
except httpx.RequestError as e:
|
125
|
+
logger.error(f"Bilibili proxy request failed: {e}")
|
126
|
+
return Response(content=f"Failed to proxy request to Bilibili API: {e}", status_code=502)
|
127
|
+
|
128
|
+
|
72
129
|
# --- Redirect for trailing slash on dashboard ---
|
73
130
|
from fastapi.responses import RedirectResponse
|
74
131
|
@app.get("/dashboard", include_in_schema=False)
|
@@ -234,6 +291,23 @@ async def neuro_response_cycle():
|
|
234
291
|
@app.on_event("startup")
|
235
292
|
async def startup_event():
|
236
293
|
"""Actions to perform on application startup."""
|
294
|
+
# --- Custom Exception Handler for Benign Connection Errors ---
|
295
|
+
# This is to suppress the benign "ConnectionResetError" that asyncio's Proactor
|
296
|
+
# event loop on Windows logs when a client disconnects abruptly. This error is
|
297
|
+
# not catchable at the application level, so we handle it here.
|
298
|
+
loop = asyncio.get_event_loop()
|
299
|
+
|
300
|
+
def custom_exception_handler(loop, context):
|
301
|
+
exception = context.get("exception")
|
302
|
+
if isinstance(exception, ConnectionResetError):
|
303
|
+
logger.debug(f"Suppressing benign ConnectionResetError: {context.get('message')}")
|
304
|
+
else:
|
305
|
+
# If it's not the error we want to suppress, call the default handler.
|
306
|
+
# This ensures other important errors are still logged.
|
307
|
+
loop.default_exception_handler(context)
|
308
|
+
|
309
|
+
loop.set_exception_handler(custom_exception_handler)
|
310
|
+
|
237
311
|
# --- Mount Frontend ---
|
238
312
|
# This logic is placed here to run at runtime, ensuring all package paths are finalized.
|
239
313
|
from fastapi.responses import FileResponse
|
@@ -360,7 +434,7 @@ async def websocket_stream_endpoint(websocket: WebSocket):
|
|
360
434
|
if sc_message["text"]:
|
361
435
|
app_state.superchat_queue.append(sc_message)
|
362
436
|
|
363
|
-
except WebSocketDisconnect:
|
437
|
+
except (WebSocketDisconnect, ConnectionResetError):
|
364
438
|
pass
|
365
439
|
finally:
|
366
440
|
connection_manager.disconnect(websocket)
|
@@ -371,37 +445,45 @@ async def websocket_admin_endpoint(websocket: WebSocket):
|
|
371
445
|
# Add the new admin client to a dedicated list
|
372
446
|
connection_manager.admin_connections.append(websocket)
|
373
447
|
try:
|
374
|
-
#
|
375
|
-
|
376
|
-
|
377
|
-
|
378
|
-
|
379
|
-
|
380
|
-
|
381
|
-
|
382
|
-
|
383
|
-
|
384
|
-
|
385
|
-
|
448
|
+
# Wrap initial state sending in its own try-except block.
|
449
|
+
try:
|
450
|
+
# Send initial state
|
451
|
+
for log_entry in list(server_log_queue): await websocket.send_json({"type": "server_log", "data": log_entry})
|
452
|
+
for log_entry in list(agent_log_queue): await websocket.send_json({"type": "agent_log", "data": agent_log_queue.popleft()})
|
453
|
+
|
454
|
+
agent = await create_agent()
|
455
|
+
initial_context = await agent.get_message_history()
|
456
|
+
await websocket.send_json({"type": "agent_context", "action": "update", "messages": initial_context})
|
457
|
+
|
458
|
+
# Send initial stream status
|
459
|
+
status = {"is_running": process_manager.is_running, "backend_status": "running" if process_manager.is_running else "stopped"}
|
460
|
+
await websocket.send_json({"type": "stream_status", "payload": status})
|
461
|
+
except (WebSocketDisconnect, ConnectionResetError):
|
462
|
+
# If client disconnects during initial send, just exit the function.
|
463
|
+
# The 'finally' block will ensure cleanup.
|
464
|
+
return
|
465
|
+
|
386
466
|
# Main loop for receiving messages from the client and pushing log updates
|
387
467
|
while websocket.client_state == WebSocketState.CONNECTED:
|
388
|
-
# Check for incoming messages
|
389
468
|
try:
|
390
|
-
|
391
|
-
|
392
|
-
|
393
|
-
|
394
|
-
|
395
|
-
|
396
|
-
|
397
|
-
|
398
|
-
|
399
|
-
|
400
|
-
|
401
|
-
|
402
|
-
|
469
|
+
# Check for incoming messages
|
470
|
+
try:
|
471
|
+
raw_data = await asyncio.wait_for(websocket.receive_text(), timeout=0.01)
|
472
|
+
data = json.loads(raw_data)
|
473
|
+
await handle_admin_ws_message(websocket, data)
|
474
|
+
except asyncio.TimeoutError:
|
475
|
+
pass # No message received, continue to push logs
|
476
|
+
|
477
|
+
# Push log updates
|
478
|
+
if server_log_queue: await websocket.send_json({"type": "server_log", "data": server_log_queue.popleft()})
|
479
|
+
if agent_log_queue: await websocket.send_json({"type": "agent_log", "data": agent_log_queue.popleft()})
|
480
|
+
await asyncio.sleep(0.1)
|
481
|
+
except (WebSocketDisconnect, ConnectionResetError):
|
482
|
+
# Client disconnected, break the loop to allow cleanup.
|
483
|
+
break
|
403
484
|
finally:
|
404
|
-
connection_manager.admin_connections
|
485
|
+
if websocket in connection_manager.admin_connections:
|
486
|
+
connection_manager.admin_connections.remove(websocket)
|
405
487
|
logger.info("Admin WebSocket client disconnected.")
|
406
488
|
|
407
489
|
async def handle_admin_ws_message(websocket: WebSocket, data: dict):
|
@@ -40,11 +40,22 @@ class WebSocketManager:
|
|
40
40
|
await self.send_personal_message(message, connection)
|
41
41
|
|
42
42
|
async def broadcast_to_admins(self, message: dict):
|
43
|
+
dead_connections = []
|
43
44
|
for connection in self.admin_connections:
|
44
45
|
try:
|
45
|
-
|
46
|
+
if connection.client_state == WebSocketState.CONNECTED:
|
47
|
+
await connection.send_json(message)
|
48
|
+
else:
|
49
|
+
dead_connections.append(connection)
|
50
|
+
except (WebSocketDisconnect, ConnectionResetError):
|
51
|
+
dead_connections.append(connection)
|
46
52
|
except Exception as e:
|
47
53
|
logger.error(f"Failed to send message to admin connection: {e}")
|
54
|
+
dead_connections.append(connection)
|
55
|
+
|
56
|
+
for connection in dead_connections:
|
57
|
+
if connection in self.admin_connections:
|
58
|
+
self.admin_connections.remove(connection)
|
48
59
|
|
49
60
|
# Global singleton instance
|
50
61
|
connection_manager = WebSocketManager()
|
@@ -1,46 +0,0 @@
|
|
1
|
-
import { defineStore } from 'pinia';
|
2
|
-
import { ref } from 'vue';
|
3
|
-
|
4
|
-
export const useAgentStore = defineStore('agent', () => {
|
5
|
-
const coreMemory = ref<any>({});
|
6
|
-
const tempMemory = ref<any[]>([]);
|
7
|
-
const initMemory = ref<any>({});
|
8
|
-
const agentContext = ref<any>([]); // Can be an array of messages or a string for the prompt
|
9
|
-
|
10
|
-
function handleCoreMemoryUpdate(payload: any) {
|
11
|
-
coreMemory.value = payload;
|
12
|
-
}
|
13
|
-
|
14
|
-
function handleTempMemoryUpdate(payload: any) {
|
15
|
-
tempMemory.value = payload;
|
16
|
-
}
|
17
|
-
|
18
|
-
function handleInitMemoryUpdate(payload: any) {
|
19
|
-
initMemory.value = payload;
|
20
|
-
}
|
21
|
-
|
22
|
-
function handleAgentContextUpdate(payload: any) {
|
23
|
-
// The payload can be the array of messages from get_agent_context
|
24
|
-
// or the response from get_last_prompt
|
25
|
-
if (typeof payload === 'string') {
|
26
|
-
agentContext.value = payload;
|
27
|
-
} else if (Array.isArray(payload)) {
|
28
|
-
agentContext.value = payload;
|
29
|
-
} else if (payload.prompt) { // Handling the direct response from get_last_prompt
|
30
|
-
agentContext.value = payload.prompt;
|
31
|
-
} else if (payload.messages) { // Handling the direct response from get_agent_context
|
32
|
-
agentContext.value = payload.messages;
|
33
|
-
}
|
34
|
-
}
|
35
|
-
|
36
|
-
return {
|
37
|
-
coreMemory,
|
38
|
-
tempMemory,
|
39
|
-
initMemory,
|
40
|
-
agentContext,
|
41
|
-
handleCoreMemoryUpdate,
|
42
|
-
handleTempMemoryUpdate,
|
43
|
-
handleInitMemoryUpdate,
|
44
|
-
handleAgentContextUpdate,
|
45
|
-
};
|
46
|
-
});
|