+18


![dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>](/assets/img/avatar_default.png)

![autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>](/assets/img/avatar_default.png)




FFXN
GitHub
yyh
盐粒 Yanli
autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
Tianle
dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Yunlu Wen
zyssyz123
Claude Opus 4.7
chariri
Asuka Minato
Copilot Autofix powered by AI
Nian
非法操作
Carmen Fernández Ruiz
wangxiaolei
QuantumGhost
L1nSn0w
Evan
Escape0707
Jingyi
Amr Sherif
ZHOU ZHICHEN
unknown
JzoNg
Xiyuan Chen
-LAN-
107bba0116
Signed-off-by: dependabot[bot] <[email protected]> Signed-off-by: EvanYao826 <[email protected]> Co-authored-by: yyh <[email protected]> Co-authored-by: 盐粒 Yanli <[email protected]> Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com> Co-authored-by: Tianle <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Yunlu Wen <[email protected]> Co-authored-by: zyssyz123 <[email protected]> Co-authored-by: Claude Opus 4.7 (1M context) <[email protected]> Co-authored-by: chariri <[email protected]> Co-authored-by: Asuka Minato <[email protected]> Co-authored-by: Copilot Autofix powered by AI <[email protected]> Co-authored-by: Nian <[email protected]> Co-authored-by: 非法操作 <[email protected]> Co-authored-by: Carmen Fernández Ruiz <[email protected]> Co-authored-by: wangxiaolei <[email protected]> Co-authored-by: QuantumGhost <[email protected]> Co-authored-by: L1nSn0w <[email protected]> Co-authored-by: Evan <[email protected]> Co-authored-by: Escape0707 <[email protected]> Co-authored-by: Jingyi <[email protected]> Co-authored-by: Amr Sherif <[email protected]> Co-authored-by: ZHOU ZHICHEN <[email protected]> Co-authored-by: unknown <[email protected]> Co-authored-by: JzoNg <[email protected]> Co-authored-by: Xiyuan Chen <[email protected]> Co-authored-by: -LAN- <[email protected]>
233 lines
4.6 KiB
Python
233 lines
4.6 KiB
Python
from importlib import import_module
|
|
|
|
from flask import Blueprint
|
|
from flask_restx import Namespace
|
|
|
|
from libs.external_api import ExternalApi
|
|
|
|
bp = Blueprint("console", __name__, url_prefix="/console/api")
|
|
|
|
api = ExternalApi(
|
|
bp,
|
|
version="1.0",
|
|
title="Console API",
|
|
description="Console management APIs for app configuration, monitoring, and administration",
|
|
)
|
|
|
|
console_ns = Namespace("console", description="Console management API operations", path="/")
|
|
|
|
RESOURCE_MODULES = (
|
|
"controllers.console.app.app_import",
|
|
"controllers.console.explore.audio",
|
|
"controllers.console.explore.completion",
|
|
"controllers.console.explore.conversation",
|
|
"controllers.console.explore.message",
|
|
"controllers.console.explore.workflow",
|
|
"controllers.console.files",
|
|
"controllers.console.remote_files",
|
|
)
|
|
|
|
for module_name in RESOURCE_MODULES:
|
|
import_module(module_name)
|
|
|
|
# Ensure resource modules are imported so route decorators are evaluated.
|
|
# Import other controllers
|
|
from . import (
|
|
apikey,
|
|
extension,
|
|
feature,
|
|
human_input_form,
|
|
init_validate,
|
|
notification,
|
|
ping,
|
|
setup,
|
|
spec,
|
|
version,
|
|
)
|
|
from .agent import composer as agent_composer
|
|
from .agent import roster as agent_roster
|
|
|
|
# Import app controllers
|
|
from .app import (
|
|
advanced_prompt_template,
|
|
agent,
|
|
annotation,
|
|
app,
|
|
audio,
|
|
completion,
|
|
conversation,
|
|
conversation_variables,
|
|
generator,
|
|
mcp_server,
|
|
message,
|
|
model_config,
|
|
ops_trace,
|
|
site,
|
|
statistic,
|
|
workflow,
|
|
workflow_app_log,
|
|
workflow_comment,
|
|
workflow_draft_variable,
|
|
workflow_node_output_inspector,
|
|
workflow_run,
|
|
workflow_statistic,
|
|
workflow_trigger,
|
|
)
|
|
|
|
# Import auth controllers
|
|
from .auth import (
|
|
activate,
|
|
data_source_bearer_auth,
|
|
data_source_oauth,
|
|
email_register,
|
|
forgot_password,
|
|
login,
|
|
oauth,
|
|
oauth_server,
|
|
)
|
|
|
|
# Import billing controllers
|
|
from .billing import billing, compliance
|
|
|
|
# Import datasets controllers
|
|
from .datasets import (
|
|
data_source,
|
|
datasets,
|
|
datasets_document,
|
|
datasets_segments,
|
|
external,
|
|
hit_testing,
|
|
metadata,
|
|
website,
|
|
)
|
|
from .datasets.rag_pipeline import (
|
|
datasource_auth,
|
|
datasource_content_preview,
|
|
rag_pipeline,
|
|
rag_pipeline_datasets,
|
|
rag_pipeline_draft_variable,
|
|
rag_pipeline_import,
|
|
rag_pipeline_workflow,
|
|
)
|
|
|
|
# Import explore controllers
|
|
from .explore import (
|
|
banner,
|
|
installed_app,
|
|
parameter,
|
|
recommended_app,
|
|
saved_message,
|
|
trial,
|
|
)
|
|
from .snippets import snippet_workflow, snippet_workflow_draft_variable
|
|
from .socketio import workflow as socketio_workflow
|
|
|
|
# Import tag controllers
|
|
from .tag import tags
|
|
|
|
# Import workspace controllers
|
|
from .workspace import (
|
|
account,
|
|
agent_providers,
|
|
endpoint,
|
|
load_balancing_config,
|
|
members,
|
|
model_providers,
|
|
models,
|
|
plugin,
|
|
snippets,
|
|
tool_providers,
|
|
trigger_providers,
|
|
workspace,
|
|
)
|
|
|
|
api.add_namespace(console_ns)
|
|
|
|
__all__ = [
|
|
"account",
|
|
"activate",
|
|
"advanced_prompt_template",
|
|
"agent",
|
|
"agent_composer",
|
|
"agent_providers",
|
|
"agent_roster",
|
|
"annotation",
|
|
"api",
|
|
"apikey",
|
|
"app",
|
|
"audio",
|
|
"banner",
|
|
"billing",
|
|
"bp",
|
|
"completion",
|
|
"compliance",
|
|
"console_ns",
|
|
"conversation",
|
|
"conversation_variables",
|
|
"data_source",
|
|
"data_source_bearer_auth",
|
|
"data_source_oauth",
|
|
"datasets",
|
|
"datasets_document",
|
|
"datasets_segments",
|
|
"datasource_auth",
|
|
"datasource_content_preview",
|
|
"email_register",
|
|
"endpoint",
|
|
"extension",
|
|
"external",
|
|
"feature",
|
|
"forgot_password",
|
|
"generator",
|
|
"hit_testing",
|
|
"human_input_form",
|
|
"init_validate",
|
|
"installed_app",
|
|
"load_balancing_config",
|
|
"login",
|
|
"mcp_server",
|
|
"members",
|
|
"message",
|
|
"metadata",
|
|
"model_config",
|
|
"model_providers",
|
|
"models",
|
|
"notification",
|
|
"oauth",
|
|
"oauth_server",
|
|
"ops_trace",
|
|
"parameter",
|
|
"ping",
|
|
"plugin",
|
|
"rag_pipeline",
|
|
"rag_pipeline_datasets",
|
|
"rag_pipeline_draft_variable",
|
|
"rag_pipeline_import",
|
|
"rag_pipeline_workflow",
|
|
"recommended_app",
|
|
"saved_message",
|
|
"setup",
|
|
"site",
|
|
"snippet_workflow",
|
|
"snippet_workflow_draft_variable",
|
|
"snippets",
|
|
"socketio_workflow",
|
|
"spec",
|
|
"statistic",
|
|
"tags",
|
|
"tool_providers",
|
|
"trial",
|
|
"trigger_providers",
|
|
"version",
|
|
"website",
|
|
"workflow",
|
|
"workflow_app_log",
|
|
"workflow_comment",
|
|
"workflow_draft_variable",
|
|
"workflow_node_output_inspector",
|
|
"workflow_run",
|
|
"workflow_statistic",
|
|
"workflow_trigger",
|
|
"workspace",
|
|
]
|