refactor: rename agent group→application across entire codebase
Complete the group→application terminology rename in the agent registry subsystem: - AgentInfo: field group → application, all wither methods updated - AgentRegistryService: findByGroup → findByApplication - AgentInstanceResponse: field group → application (API response) - AgentRegistrationRequest: field group → application (API request) - JwtServiceImpl: parameter names group → application (JWT claim string "group" preserved for token backward compatibility) - All controllers, lifecycle monitor, command controller updated - Integration tests: JSON request bodies "group" → "application" - Frontend: schema.d.ts, openapi.json, agent queries, AgentHealth RBAC group references (groups table, GroupAdminController, etc.) are NOT affected — they are a separate domain concept. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
File diff suppressed because one or more lines are too long
@@ -3,12 +3,12 @@ import { api } from '../client';
|
||||
import { config } from '../../config';
|
||||
import { useAuthStore } from '../../auth/auth-store';
|
||||
|
||||
export function useAgents(status?: string, group?: string) {
|
||||
export function useAgents(status?: string, application?: string) {
|
||||
return useQuery({
|
||||
queryKey: ['agents', status, group],
|
||||
queryKey: ['agents', status, application],
|
||||
queryFn: async () => {
|
||||
const { data, error } = await api.GET('/agents', {
|
||||
params: { query: { ...(status ? { status } : {}), ...(group ? { group } : {}) } },
|
||||
params: { query: { ...(status ? { status } : {}), ...(application ? { application } : {}) } },
|
||||
});
|
||||
if (error) throw new Error('Failed to load agents');
|
||||
return data!;
|
||||
|
||||
@@ -28,7 +28,7 @@ export function useDiagramByRoute(application: string | undefined, routeId: stri
|
||||
queryKey: ['diagrams', 'byRoute', application, routeId],
|
||||
queryFn: async () => {
|
||||
const { data, error } = await api.GET('/diagrams', {
|
||||
params: { query: { group: application!, routeId: routeId! } },
|
||||
params: { query: { application: application!, routeId: routeId! } },
|
||||
});
|
||||
if (error) throw new Error('Failed to load diagram for route');
|
||||
return data!;
|
||||
|
||||
20
ui/src/api/schema.d.ts
vendored
20
ui/src/api/schema.d.ts
vendored
@@ -625,10 +625,10 @@ export interface paths {
|
||||
cookie?: never;
|
||||
};
|
||||
/**
|
||||
* Find diagram by application group and route ID
|
||||
* @description Resolves group to agent IDs and finds the latest diagram for the route
|
||||
* Find diagram by application and route ID
|
||||
* @description Resolves application to agent IDs and finds the latest diagram for the route
|
||||
*/
|
||||
get: operations["findByGroupAndRoute"];
|
||||
get: operations["findByApplicationAndRoute"];
|
||||
put?: never;
|
||||
post?: never;
|
||||
delete?: never;
|
||||
@@ -683,7 +683,7 @@ export interface paths {
|
||||
};
|
||||
/**
|
||||
* List all agents
|
||||
* @description Returns all registered agents with runtime metrics, optionally filtered by status and/or group
|
||||
* @description Returns all registered agents with runtime metrics, optionally filtered by status and/or application
|
||||
*/
|
||||
get: operations["listAgents"];
|
||||
put?: never;
|
||||
@@ -1158,7 +1158,7 @@ export interface components {
|
||||
agentId: string;
|
||||
name: string;
|
||||
/** @default default */
|
||||
group: string;
|
||||
application: string;
|
||||
version?: string;
|
||||
routeIds?: string[];
|
||||
capabilities?: {
|
||||
@@ -1384,7 +1384,7 @@ export interface components {
|
||||
AgentInstanceResponse: {
|
||||
id: string;
|
||||
name: string;
|
||||
group: string;
|
||||
application: string;
|
||||
status: string;
|
||||
routeIds: string[];
|
||||
/** Format: date-time */
|
||||
@@ -3133,10 +3133,10 @@ export interface operations {
|
||||
};
|
||||
};
|
||||
};
|
||||
findByGroupAndRoute: {
|
||||
findByApplicationAndRoute: {
|
||||
parameters: {
|
||||
query: {
|
||||
group: string;
|
||||
application: string;
|
||||
routeId: string;
|
||||
};
|
||||
header?: never;
|
||||
@@ -3154,7 +3154,7 @@ export interface operations {
|
||||
"*/*": components["schemas"]["DiagramLayout"];
|
||||
};
|
||||
};
|
||||
/** @description No diagram found for the given group and route */
|
||||
/** @description No diagram found for the given application and route */
|
||||
404: {
|
||||
headers: {
|
||||
[name: string]: unknown;
|
||||
@@ -3239,7 +3239,7 @@ export interface operations {
|
||||
parameters: {
|
||||
query?: {
|
||||
status?: string;
|
||||
group?: string;
|
||||
application?: string;
|
||||
};
|
||||
header?: never;
|
||||
path?: never;
|
||||
|
||||
Reference in New Issue
Block a user