diff --git a/mateclaw-server/src/main/java/vip/mate/agent/runtime/AgentRuntimeAggregator.java b/mateclaw-server/src/main/java/vip/mate/agent/runtime/AgentRuntimeAggregator.java index 22fc5ef9..5c68bf7d 100644 --- a/mateclaw-server/src/main/java/vip/mate/agent/runtime/AgentRuntimeAggregator.java +++ b/mateclaw-server/src/main/java/vip/mate/agent/runtime/AgentRuntimeAggregator.java @@ -19,7 +19,7 @@ import java.util.stream.Collectors; /** * Joins the live in-memory views ({@link ChatStreamTracker}, {@link SubagentRegistry}) - * with agent metadata so the admin Backstage UI can render one card per + * with agent metadata so the admin Live view can render one card per * working agent without making the frontend traverse three independent * services. * diff --git a/mateclaw-server/src/main/java/vip/mate/agent/runtime/AgentRuntimeController.java b/mateclaw-server/src/main/java/vip/mate/agent/runtime/AgentRuntimeController.java index f6248fc6..362fc89b 100644 --- a/mateclaw-server/src/main/java/vip/mate/agent/runtime/AgentRuntimeController.java +++ b/mateclaw-server/src/main/java/vip/mate/agent/runtime/AgentRuntimeController.java @@ -21,14 +21,14 @@ import java.util.Map; import vip.mate.workspace.core.annotation.RequireGlobalAdmin; /** - * Admin-only Backstage surface: the global view of every in-flight agent + * Admin-only live runtime surface: the global view of every in-flight agent * turn plus the controls to friendly-stop, force-recycle, or sweep stuck * runs. Distinct from {@code /api/v1/subagents/...} which is per-conversation * owner-scoped — this controller is intentionally cross-tenant for the * operator role. */ @Slf4j -@Tag(name = "Agent Runtime (Backstage)") +@Tag(name = "Agent Runtime (Live)") @RestController @RequestMapping("/api/v1/admin/agent-runtime") @RequiredArgsConstructor diff --git a/mateclaw-server/src/main/java/vip/mate/channel/web/ChatStreamTracker.java b/mateclaw-server/src/main/java/vip/mate/channel/web/ChatStreamTracker.java index 640334c7..d5eb5a7a 100644 --- a/mateclaw-server/src/main/java/vip/mate/channel/web/ChatStreamTracker.java +++ b/mateclaw-server/src/main/java/vip/mate/channel/web/ChatStreamTracker.java @@ -1563,7 +1563,7 @@ public class ChatStreamTracker { } } - // ===== Runtime snapshot surface (admin Backstage) ===== + // ===== Runtime snapshot surface (admin Live view) ===== /** * Bind the resolved agent + owner to the active run so the runtime @@ -1603,7 +1603,7 @@ public class ChatStreamTracker { ) {} /** - * Snapshot every active run. Used by the admin Backstage to render the + * Snapshot every active run. Used by the admin Live view to render the * global "what are my agents doing right now" view. Returned list is a * defensive copy — callers may freely sort / filter it. */ @@ -1640,7 +1640,7 @@ public class ChatStreamTracker { } /** - * Force a wedged run to terminate. Used by the admin Backstage's + * Force a wedged run to terminate. Used by the admin Live view's * "End it" action when the friendly stop has been observed not to take * effect (model wedged in a tool call beyond the timeout). Sequence * matches what {@link #onShutdown()} does for individual runs. diff --git a/mateclaw-ui/src/api/index.ts b/mateclaw-ui/src/api/index.ts index 1348575a..4da7abcb 100644 --- a/mateclaw-ui/src/api/index.ts +++ b/mateclaw-ui/src/api/index.ts @@ -229,8 +229,8 @@ export const activityApi = { http.get('/activity/feed', { params }), } -// ==================== Backstage (admin runtime view) ==================== -export interface BackstageRunCard { +// ==================== Live (admin runtime view) ==================== +export interface LiveRunCard { conversationId: string agentId: number | null agentName: string | null @@ -252,7 +252,7 @@ export interface BackstageRunCard { subagentCount: number } -export interface BackstageSubagentCard { +export interface LiveSubagentCard { subagentId: string parentConversationId: string | null childConversationId: string | null @@ -267,7 +267,7 @@ export interface BackstageSubagentCard { ageMs: number } -export interface BackstageSummary { +export interface LiveSummary { running: number stuck: number orphan: number @@ -275,15 +275,15 @@ export interface BackstageSummary { subagentsActive: number } -export interface BackstageSnapshot { - summary: BackstageSummary - runs: BackstageRunCard[] - subagents: BackstageSubagentCard[] +export interface LiveSnapshot { + summary: LiveSummary + runs: LiveRunCard[] + subagents: LiveSubagentCard[] timestamp: number } -export const backstageApi = { - snapshot: () => http.get<{ data: BackstageSnapshot }>('/admin/agent-runtime/snapshot'), +export const liveApi = { + snapshot: () => http.get<{ data: LiveSnapshot }>('/admin/agent-runtime/snapshot'), stop: (conversationId: string) => http.post(`/admin/agent-runtime/runs/${encodeURIComponent(conversationId)}/stop`), recycle: (conversationId: string) => diff --git a/mateclaw-ui/src/components/backstage/BackstageFocusPanel.vue b/mateclaw-ui/src/components/live/LiveFocusPanel.vue similarity index 95% rename from mateclaw-ui/src/components/backstage/BackstageFocusPanel.vue rename to mateclaw-ui/src/components/live/LiveFocusPanel.vue index af492e94..32b2de08 100644 --- a/mateclaw-ui/src/components/backstage/BackstageFocusPanel.vue +++ b/mateclaw-ui/src/components/live/LiveFocusPanel.vue @@ -6,7 +6,7 @@
@@ -129,20 +129,20 @@ import { onMounted, onBeforeUnmount, watch } from 'vue' import { useI18n } from 'vue-i18n' import SkillIcon from '@/components/common/SkillIcon.vue' -import { useBackstageAgent } from '@/composables/useBackstageAgent' -import type { BackstageRunCard, BackstageSubagentCard } from '@/api' +import { useLiveAgent } from '@/composables/useLiveAgent' +import type { LiveRunCard, LiveSubagentCard } from '@/api' const props = defineProps<{ open: boolean - run: BackstageRunCard | null - subagents: BackstageSubagentCard[] + run: LiveRunCard | null + subagents: LiveSubagentCard[] }>() const emit = defineEmits<{ close: [] - stop: [run: BackstageRunCard] - recycle: [run: BackstageRunCard] - 'interrupt-sub': [sub: BackstageSubagentCard] + stop: [run: LiveRunCard] + recycle: [run: LiveRunCard] + 'interrupt-sub': [sub: LiveSubagentCard] }>() const { t } = useI18n() @@ -154,7 +154,7 @@ const { humanSentence, stuckCallout, formatAge, -} = useBackstageAgent() +} = useLiveAgent() // SVG ring geometry: r=54 gives a circumference of ~339.292. // Map the agent's age over a 5-minute window to a stroke-dashoffset so the diff --git a/mateclaw-ui/src/views/Backstage.vue b/mateclaw-ui/src/components/live/LivePanel.vue similarity index 61% rename from mateclaw-ui/src/views/Backstage.vue rename to mateclaw-ui/src/components/live/LivePanel.vue index 78a0662d..5584bdf4 100644 --- a/mateclaw-ui/src/views/Backstage.vue +++ b/mateclaw-ui/src/components/live/LivePanel.vue @@ -1,164 +1,147 @@