吸收数字员工安全服务重启入口

This commit is contained in:
baiyanyun
2026-06-09 23:10:01 +08:00
parent 0d2008b35c
commit 91540dec0c
13 changed files with 717 additions and 155 deletions

View File

@@ -26,6 +26,7 @@ import type {
IngressRouteResponse,
GovernanceCommandRequest,
GovernanceCommandResponse,
DigitalEmployeeManagedService,
DigitalEmployeeWorkdayProjection,
DigitalEmployeeWorkdayActionRequest,
PlanDispatchResponse,
@@ -613,6 +614,26 @@ export function postDigitalEmployeeWorkdayAction(
});
}
export function restartManagedService(
serviceId: string,
body: { reason?: string; actor?: string } = {},
): Promise<{
ok: boolean;
service_id: string;
action: 'restart';
status: 'success' | 'failed' | 'rejected';
message?: string;
error?: string;
managed_service?: DigitalEmployeeManagedService | null;
event_id?: string | null;
}> {
return apiFetch(`/api/digital-employee/managed-services/${encodeURIComponent(serviceId)}/restart`, {
method: 'POST',
body: JSON.stringify(body),
timeoutMs: DIGITAL_EMPLOYEE_WORKDAY_TIMEOUT_MS,
});
}
export function dispatchPlanNow(planId: string): Promise<PlanDispatchResponse> {
return apiFetch<PlanDispatchResponse>(`/api/debug/plan/${encodeURIComponent(planId)}/dispatch`, {
method: 'POST',