Files

2.0 KiB

Platform Web Routes

First-party routes must be declared here before page implementation.

Required Navigation

  • /: 平台概览(平台管理员默认落地页).
  • /servers: 服务器管理(服主/服务器管理员默认落地页).
  • /servers/:serverId: 服务器详情 route(日常运维工作台:插件声明页面、管理、AI 助手、打开终端抽屉;终端聚合平台日志 SSE 与插件声明的受限命令通道,不暴露主机 shell、凭据、raw 配置或操作历史页).
  • /plugins: 插件市场.
  • /users: 用户管理.
  • /ai-providers: AI 提供商管理.
  • /maintenance: 系统维护(服务器异常与失败任务).
  • /plugin-pages/:pluginId/:routeKey?serverInstanceId=:serverId: platform-hosted plugin page route with optional server context; IDs are URL encoded and the route is not shown in primary navigation.

Role Scoping

Navigation entries are generated from the current user's capability set (contracts/workspace.ts):

  • Platform administrators see 平台概览、服务器管理、插件市场、用户管理、AI 提供商管理、系统维护.
  • Server owners and server administrators see only 服务器管理 and their server detail workspaces; unauthorized hashes redirect to the role default workspace.
  • Default landing: platform administrators land on /, server owners/administrators land on /servers.
  • Server creation opens inline from 服务器管理 (no separate /servers/new page).

Server and plugin detail flows must use routes, modals, or drawers. Do not build a fixed left-list/right-detail page.

Server Detail operations route

The serverDetail route owns the server operations workspace: plugin-declared pages, lifecycle controls, AI assistance, and terminal/log drawers. It is a detail workflow, not a permanent split pane; list pages remain full-width and destructive lifecycle commands use shared confirmation dialogs. Route state does not contain component secrets or Run session material.