feat(FN-1298): add stop-agent-run flow across engine and dashboard
- Add heartbeat stopRun support in the engine and wire it into the dashboard server lifecycle - Add an agent run stop API route and client helper with route-level test coverage - Add stop controls in AgentDetailView and AgentRunHistory with updated UI tests - Add a changeset for @gsxdsm/fusion documenting the new stop run feature
This commit is contained in:
@@ -2110,6 +2110,19 @@ export function startAgentRun(
|
||||
});
|
||||
}
|
||||
|
||||
/** Stop an active heartbeat run for an agent */
|
||||
export function stopAgentRun(
|
||||
agentId: string,
|
||||
projectId?: string,
|
||||
): Promise<{ ok: boolean; runId?: string; message?: string }> {
|
||||
return api<{ ok: boolean; runId?: string; message?: string }>(
|
||||
withProjectId(`/agents/${encodeURIComponent(agentId)}/runs/stop`, projectId),
|
||||
{
|
||||
method: "POST",
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
/** Fetch aggregate agent stats */
|
||||
export function fetchAgentStats(projectId?: string): Promise<AgentStats> {
|
||||
return api<AgentStats>(withProjectId("/agents/stats", projectId));
|
||||
|
||||
Reference in New Issue
Block a user