Integrate SCUM real ops workflows

This commit is contained in:
npc0-hue
2026-08-10 21:12:53 +08:00
parent 1063330710
commit a770bc6250
88 changed files with 6375 additions and 2719 deletions
+2 -2
View File
@@ -2,7 +2,7 @@
## Shared Visual Contract
All first-party pages inherit the platform_web game-operations style with black-mecha default materials and a selectable magical-girl theme. Page implementations must use shared theme tokens and surface classes so 首页、服务器管理、插件市场、用户管理、AI 提供商管理、系统维护, server details, drawers, dialogs, logs, diffs, plugin-declared pages, and operation history all feel like one console.
All first-party pages inherit the platform_web game-operations style with black-mecha default materials and a selectable magical-girl theme. Page implementations must use shared theme tokens and surface classes so 首页、服务器管理、插件市场、用户管理、AI 提供商管理、系统维护, server details, drawers, dialogs, safe diffs, plugin-declared pages, and workflow/status surfaces all feel like one console.
- Major surfaces remain transparent jelly/glass panels with visible background desktop, icy rim light, diamond borders, shine sweeps, and candy-color accents.
- Built-in magical desktops and user-uploaded backgrounds render behind readable contrast surfaces.
@@ -23,7 +23,7 @@ Default landing page for server owners and server administrators. Shows searchab
## 服务器详情
Daily operations hub for one server. Status header shows online state, player count, TPS, latency, CPU/memory/disk progress, metric freshness, confirmed start/stop lifecycle actions, and direct live-log/management-terminal entry points. Plugin-declared pages render as first-class server tabs before platform sections, so each game owns its menu surface. Built-in sections: 日志 (level/keyword/time/source filters + log detail drawer with diagnostics), 管理终端 (platform-mediated plugin command surface), 配置 (deployment status, metadata, administrators, and config edit with reviewable diff before any write job), AI 助手 (LLM suggestions produce recommendation/diff; write jobs require explicit diff confirmation; no raw AI keys reach the frontend), 操作历史 (operation/job IDs, status, timestamps, target, requester, error reasons). Generic runtime-binding and generic plugin-control tabs must not be exposed in server detail.
Daily operations hub for one server. Status header shows online state, player count, TPS, latency, CPU/memory/disk progress, metric freshness, and confirmed start/stop lifecycle actions. Plugin-declared pages render as first-class server tabs before platform sections, so each game owns its safe menu surface; SCUM pages use projection-backed users, squads, map, gifts, and workflows. Built-in sections are 管理 (deployment status, metadata, administrators) and AI 助手 (LLM suggestions produce reviewable config diffs or typed workflow drafts; no raw AI keys reach the frontend). Raw logs, management terminal/RCON input, arbitrary config workbench, generic operation history, runtime-binding, and generic plugin-control tabs must not be exposed in server detail.
## 插件市场
+12 -24
View File
@@ -1,26 +1,14 @@
export interface PluginPageFileRequestResult {
status: string;
message: string;
jobId?: string;
}
export interface PluginPageFileReadSnapshot {
serverInstanceId: string;
pluginId: string;
key: string;
state: "ready" | "pending" | "not-read" | "unavailable" | string;
content?: string;
version?: number;
checksum?: string;
sizeBytes?: number;
jobId?: string;
readAt?: string;
reason?: string;
}
export interface PluginPageWorkspaceActions {
refreshWorkspace?: () => Promise<unknown>;
requestFile?: (fileKey: string) => Promise<PluginPageFileRequestResult>;
getFileSnapshot?: (fileKey: string) => Promise<PluginPageFileReadSnapshot>;
writeFile?: (fileKey: string, content: string, options?: { expectedChecksum?: string }) => Promise<PluginPageFileRequestResult>;
listSCUMPlayers?: () => Promise<unknown>;
listSCUMSquads?: () => Promise<unknown>;
listSCUMSquadMembers?: () => Promise<unknown>;
listSCUMVehicles?: () => Promise<unknown>;
listSCUMFlags?: () => Promise<unknown>;
listSCUMPositions?: () => Promise<unknown>;
listSCUMOperations?: () => Promise<unknown>;
createSCUMOperation?: (request: unknown) => Promise<unknown>;
approveSCUMOperation?: (operationId: string) => Promise<unknown>;
listSCUMWorkflows?: () => Promise<unknown>;
createSCUMWorkflow?: (request: unknown) => Promise<unknown>;
listSCUMWorkflowSteps?: (workflowId?: string) => Promise<unknown>;
}
+4 -7
View File
@@ -144,14 +144,11 @@ export interface PlatformOverviewSignal {
at: string;
}
export type ServerDetailSection = "logs" | "terminal" | "config" | "llm" | "history" | `plugin:${string}`;
export type ServerDetailSection = "manage" | "llm" | `plugin:${string}`;
export const serverDetailSections: Array<{ id: ServerDetailSection; label: string }> = [
{ id: "logs", label: "日志" },
{ id: "terminal", label: "管理终端" },
{ id: "config", label: "配置" },
{ id: "llm", label: "AI 助手" },
{ id: "history", label: "操作历史" }
{ id: "manage", label: "管理" },
{ id: "llm", label: "AI 助手" }
];
export interface DiffLine {
@@ -177,5 +174,5 @@ export interface LlmSuggestionView {
recommendation: string;
diffId?: string;
expiresAt?: string;
diff?: ConfigDiffView;
diffSummary?: string;
}