UNPKG

agentis

Version:

A TypeScript framework for building sophisticated multi-agent systems

24 lines (23 loc) 782 B
"use strict"; // src/logs/Logger.ts Object.defineProperty(exports, "__esModule", { value: true }); exports.Logger = exports.LogType = void 0; const SupabaseClient_1 = require("../utils/SupabaseClient"); var LogType; (function (LogType) { LogType["TOOL_CALL"] = "tool_call"; LogType["ERROR"] = "error"; LogType["STATUS_UPDATE"] = "status_update"; LogType["MESSAGE"] = "message"; })(LogType || (exports.LogType = LogType = {})); class Logger { static async log(agentId, logType, details) { const { error } = await SupabaseClient_1.supabase .from('logs') .insert([{ agent_id: agentId, log_type: logType, details }]); if (error) { console.error("Failed to log:", error); } } } exports.Logger = Logger;