Files
mcp-paperclip/src/tools/heartbeat-runs.ts
T
ealmeida 2753360787 feat: mcp-paperclip v1.0.0 — 165 tools para Paperclip AI
Triple transport (STDIO + StreamableHTTP + SSE porta 3175).
24 modulos: agents, issues, approvals, routines, goals, projects,
costs, activity, skills, secrets, plugins, assets, settings, access.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-07 02:56:45 +01:00

90 lines
3.1 KiB
TypeScript

import { PaperclipClient } from '../client.js';
import { PaperclipTool } from '../types.js';
const client = new PaperclipClient();
export const heartbeatRunTools: PaperclipTool[] = [
{
name: 'list_heartbeat_runs',
description: 'Listar todas as execucoes de heartbeat da empresa',
inputSchema: { type: 'object', properties: {} },
handler: async () => {
const result = await client.get(client.companyPath('/heartbeat-runs'));
return { content: [{ type: 'text', text: JSON.stringify(result, null, 2) }] };
},
},
{
name: 'list_live_runs',
description: 'Listar execucoes em curso (live runs) da empresa',
inputSchema: { type: 'object', properties: {} },
handler: async () => {
const result = await client.get(client.companyPath('/live-runs'));
return { content: [{ type: 'text', text: JSON.stringify(result, null, 2) }] };
},
},
{
name: 'get_heartbeat_run',
description: 'Obter detalhes de uma execucao de heartbeat pelo ID',
inputSchema: {
type: 'object',
properties: {
run_id: { type: 'string', description: 'ID da execucao de heartbeat' },
},
required: ['run_id'],
},
handler: async (args) => {
const { run_id } = args as { run_id: string; [k: string]: unknown };
const result = await client.get(`/heartbeat-runs/${run_id}`);
return { content: [{ type: 'text', text: JSON.stringify(result, null, 2) }] };
},
},
{
name: 'get_heartbeat_run_events',
description: 'Obter eventos de uma execucao de heartbeat',
inputSchema: {
type: 'object',
properties: {
run_id: { type: 'string', description: 'ID da execucao de heartbeat' },
},
required: ['run_id'],
},
handler: async (args) => {
const { run_id } = args as { run_id: string; [k: string]: unknown };
const result = await client.get(`/heartbeat-runs/${run_id}/events`);
return { content: [{ type: 'text', text: JSON.stringify(result, null, 2) }] };
},
},
{
name: 'get_heartbeat_run_log',
description: 'Obter log de uma execucao de heartbeat',
inputSchema: {
type: 'object',
properties: {
run_id: { type: 'string', description: 'ID da execucao de heartbeat' },
},
required: ['run_id'],
},
handler: async (args) => {
const { run_id } = args as { run_id: string; [k: string]: unknown };
const result = await client.get(`/heartbeat-runs/${run_id}/log`);
return { content: [{ type: 'text', text: JSON.stringify(result, null, 2) }] };
},
},
{
name: 'cancel_heartbeat_run',
description: 'Cancelar uma execucao de heartbeat em curso',
inputSchema: {
type: 'object',
properties: {
run_id: { type: 'string', description: 'ID da execucao de heartbeat' },
},
required: ['run_id'],
},
handler: async (args) => {
const { run_id, ...body } = args as { run_id: string; [k: string]: unknown };
const result = await client.post(`/heartbeat-runs/${run_id}/cancel`, body);
return { content: [{ type: 'text', text: JSON.stringify(result, null, 2) }] };
},
},
];