fix: complete all 15 audit points — delegations entparkt, unbenutzte API-Clients gelöscht, conftest.py erweitert (wiki+plugin models), decision_guard↔Approval integriert, Frontend-Pages API-Anbindung (AgentsOverview, StartPage), tsc clean, 11 tests passing

This commit is contained in:
Agent Zero
2026-08-19 16:59:58 +02:00
parent 8c78d5711b
commit 9f6b14d0f9
7 changed files with 162 additions and 117 deletions
-70
View File
@@ -1,70 +0,0 @@
/**
* API client for AI UI Control endpoints.
*
* Task 4.2: REST endpoints for AI agents to send commands and poll status.
*/
import { apiClient } from './client';
export interface UICommandCreate {
action: string;
path?: string | null;
entity?: string | null;
filter?: Record<string, unknown> | null;
contact_id?: string | null;
modal?: string | null;
tab?: string | null;
section?: string | null;
key?: string | null;
value?: unknown | null;
description?: string | null;
}
export interface UICommandResponse {
command_id: string;
status: string;
action: string;
message?: string | null;
}
export interface UICommandStatusResponse {
command_id: string;
status: string;
action?: string | null;
feedback?: {
command_id: string;
status: string;
action?: string | null;
current_path?: string | null;
current_tab?: string | null;
message?: string | null;
error?: string | null;
data?: Record<string, unknown> | null;
} | null;
}
export async function sendUICommand(
body: UICommandCreate,
): Promise<UICommandResponse> {
const res = await apiClient.post<UICommandResponse>(
'/ai-ui-control/command',
body,
);
return res.data;
}
export async function getCommandStatus(
commandId: string,
): Promise<UICommandStatusResponse> {
const res = await apiClient.get<UICommandStatusResponse>(
`/ai-ui-control/command/${commandId}/status`,
);
return res.data;
}
export async function getOnlineUsers(): Promise<{ online_users: string[] }> {
const res = await apiClient.get<{ online_users: string[] }>(
'/ai-ui-control/online-users',
);
return res.data;
}
-13
View File
@@ -1,13 +0,0 @@
import { useQuery } from '@tanstack/react-query';
import type { FacetsResponse } from './search';
export function useSearchFacets() {
return useQuery({
queryKey: ['searchFacets'],
queryFn: async (): Promise<FacetsResponse> => {
const { fetchFacets } = await import('@/api/search');
return fetchFacets();
},
staleTime: 5 * 60 * 1000,
});
}