-
Notifications
You must be signed in to change notification settings - Fork 159
feat: add voice transcript bridge and plugin dispatch infrastructure #1612
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from 2 commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -121,7 +121,7 @@ def _resolve_user_plugin_base() -> str: | |
| from fastapi.responses import JSONResponse, Response # noqa | ||
| from fastapi.staticfiles import StaticFiles # noqa | ||
| from main_logic import core as core, cross_server as cross_server # noqa | ||
| from main_logic.agent_event_bus import MainServerAgentBridge, notify_analyze_ack, set_main_bridge # noqa | ||
| from main_logic.agent_event_bus import MainServerAgentBridge, notify_analyze_ack, notify_voice_bridge_result, set_main_bridge # noqa | ||
| from fastapi.templating import Jinja2Templates # noqa | ||
| from dataclasses import dataclass # noqa | ||
| from typing import Any, Optional # noqa | ||
|
|
@@ -608,6 +608,13 @@ async def _handle_agent_event(event: dict): | |
| notify_analyze_ack(str(event.get("event_id") or "")) | ||
| return | ||
|
|
||
| if event_type == "voice_bridge_result": | ||
| notify_voice_bridge_result( | ||
| str(event.get("event_id") or ""), | ||
| event.get("result") if isinstance(event.get("result"), dict) else {}, | ||
| ) | ||
| return | ||
|
|
||
| # Agent status updates may be broadcast (lanlan_name omitted). | ||
| if event_type == "agent_status_update": | ||
| payload = { | ||
|
|
@@ -1641,7 +1648,6 @@ async def get_response(self, path, scope): | |
| from main_routers.workshop_router import router as workshop_router # noqa | ||
| from main_routers.cookies_login_router import router as cookies_login_router # noqa | ||
| from main_routers.game_router import router as game_router # noqa | ||
| from main_routers.card_assist_router import router as card_assist_router # noqa | ||
| from main_routers.debug_router import router as debug_router, start_watchdog as _start_debug_health_watchdog # noqa | ||
| from main_routers.shared_state import init_shared_state, set_steamworks_initializer # noqa | ||
|
|
||
|
|
@@ -1773,7 +1779,6 @@ async def proxy_user_plugin_market_bridge(request: Request, path: str = ""): | |
| app.include_router(music_router) | ||
| app.include_router(galgame_router) | ||
| app.include_router(game_router) | ||
| app.include_router(card_assist_router) | ||
| app.include_router(capture_router) | ||
|
Comment on lines
1786
to
1787
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
When the main app is started, the four Useful? React with 👍 / 👎. |
||
| app.include_router(cookies_login_router) # Cookies登录相关路由,放在最后以避免与其他API路由冲突 | ||
| app.include_router(debug_router) # 诊断观测:/api/debug/health(轻量、零侵入,详见 debug_router.py 头注释) | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In configurations where the voice/core side is free but the Agent model has been switched to a paid/custom model, this now reports
is_free_version: trueeven though the Agent path is not using the built-in free agent model.ConfigManager.is_agent_api_ready()documents that Agent free/quota UI state is supposed to come fromis_agent_free(), and the main router still usescfg.is_agent_free()for the same field, so this endpoint can re-enable the free-agent quota/warning behavior incorrectly for paid Agent setups.Useful? React with 👍 / 👎.