Complete platform management workflows

This commit is contained in:
npc0-hue
2026-07-14 16:39:37 +08:00
parent 7e05d0a4e7
commit 4f33f761a3
106 changed files with 11313 additions and 460 deletions
@@ -45,6 +45,15 @@ describe("ServerDetailPage config write approval", () => {
expect(serverDetailPageSource).not.toContain('capability: "config.write"');
});
it("uses typed server metadata and archive APIs without local fallback mutation", () => {
expect(serverDetailPageSource).toContain("updateServerInstance(instance.id");
expect(serverDetailPageSource).toContain("archiveServerInstance(instance.id)");
expect(serverDetailPageSource).toContain("serverMetadataUpdateRequestFromForm");
expect(serverDetailPageSource).toContain("canArchiveServer(instance.state)");
expect(serverDetailPageSource).toContain("配置读取不可用");
expect(serverDetailPageSource).not.toContain("fallbackConfig");
});
it("does not locally mutate visible config after dispatching approval jobs", () => {
expect(serverDetailPageSource).not.toContain("setCurrentConfig(suggestion.diff.nextContent)");
expect(serverDetailPageSource).not.toContain("content: diff.nextContent");
@@ -60,6 +69,26 @@ describe("ServerDetailPage config write approval", () => {
expect(serverDetailPageSource).not.toContain("Bearer ");
});
it("surfaces run distribution and client-manager workflows through platform-mediated APIs", () => {
expect(serverDetailPageSource).toContain("getServerRuntimeActions");
expect(serverDetailPageSource).toContain("generateRunDistribution");
expect(serverDetailPageSource).toContain("downloadLatestRunDistribution");
expect(serverDetailPageSource).toContain("pushRunUpdate");
expect(serverDetailPageSource).toContain("generateClientManager");
expect(serverDetailPageSource).toContain("resetClientManagerKey");
expect(serverDetailPageSource).toContain("checkDependencies");
expect(serverDetailPageSource).toContain("installDependencies");
expect(serverDetailPageSource).toContain("listServerLiveLogs");
expect(serverDetailPageSource).toContain("requestLogBackfill");
expect(serverDetailPageSource).toContain("safeRuntimeRef");
expect(serverDetailPageSource).not.toContain("authKey");
expect(serverDetailPageSource).not.toContain("password=");
expect(serverDetailPageSource).not.toContain("unix://");
expect(serverDetailPageSource).not.toContain("tcp://");
expect(serverDetailPageSource).not.toContain("mysql://");
expect(serverDetailPageSource).not.toContain("sqlite://");
});
it("routes plugin lifecycle controls through platform lifecycle APIs instead of generic jobs", () => {
expect(serverDetailPageSource).toContain('action === "install" || action === "restart" || action === "status"');
expect(serverDetailPageSource).toContain('action !== "start" && action !== "stop"');