2026-02-17 12:24:48 -06:00
|
|
|
import type { HeartbeatRun, HeartbeatRunEvent } from "@paperclip/shared";
|
Add detail pages, property panels, and restyle list pages
New pages: AgentDetail, GoalDetail, IssueDetail, ProjectDetail, Inbox,
MyIssues. New feature components: AgentProperties, GoalProperties,
IssueProperties, ProjectProperties, GoalTree, NewIssueDialog. Add
heartbeats API client. Restyle all list pages (Agents, Issues, Goals,
Projects, Dashboard, Costs, Activity, Org) with EntityRow, FilterBar,
and improved layouts. Add routing for detail views.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-17 09:57:06 -06:00
|
|
|
import { api } from "./client";
|
|
|
|
|
|
|
|
|
|
export const heartbeatsApi = {
|
|
|
|
|
list: (companyId: string, agentId?: string) => {
|
|
|
|
|
const params = agentId ? `?agentId=${agentId}` : "";
|
|
|
|
|
return api.get<HeartbeatRun[]>(`/companies/${companyId}/heartbeat-runs${params}`);
|
|
|
|
|
},
|
2026-02-17 12:24:48 -06:00
|
|
|
events: (runId: string, afterSeq = 0, limit = 200) =>
|
|
|
|
|
api.get<HeartbeatRunEvent[]>(
|
|
|
|
|
`/heartbeat-runs/${runId}/events?afterSeq=${encodeURIComponent(String(afterSeq))}&limit=${encodeURIComponent(String(limit))}`,
|
|
|
|
|
),
|
|
|
|
|
log: (runId: string, offset = 0, limitBytes = 256000) =>
|
|
|
|
|
api.get<{ runId: string; store: string; logRef: string; content: string; nextOffset?: number }>(
|
|
|
|
|
`/heartbeat-runs/${runId}/log?offset=${encodeURIComponent(String(offset))}&limitBytes=${encodeURIComponent(String(limitBytes))}`,
|
|
|
|
|
),
|
Add detail pages, property panels, and restyle list pages
New pages: AgentDetail, GoalDetail, IssueDetail, ProjectDetail, Inbox,
MyIssues. New feature components: AgentProperties, GoalProperties,
IssueProperties, ProjectProperties, GoalTree, NewIssueDialog. Add
heartbeats API client. Restyle all list pages (Agents, Issues, Goals,
Projects, Dashboard, Costs, Activity, Org) with EntityRow, FilterBar,
and improved layouts. Add routing for detail views.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-17 09:57:06 -06:00
|
|
|
};
|