Add eval runner and tool orchestration

This commit is contained in:
dahyeon committed 2026-04-17 00:47:02 -07:00
1 parent 4294f3c92e
commit 5579db54da
66 files changed
+6162 -242

No files matched your search

+8 -1
View File
@@ -6,7 +6,11 @@ import { getLogger } from "@obs/logger";
import { withSkillSpan, withSpan } from "@obs/spans";
import type { Skill } from "@skills/skill";
import type { AgentRequest, AgentResponse } from "./types.js";
import { getRequestSubject } from "../config.js";
import {
getAgentRequestTimeoutMs,
getRequestSubject,
getSafetyMarginMs,
} from "../config.js";
function isValidRequest(data: unknown): data is AgentRequest {
if (typeof data !== "object" || data === null) return false;
@@ -64,6 +68,9 @@ export class Agent {
await runWithContext(
{
chatroomId: request.chatroomId,
deadlineAt: new Date(
Date.now() + getAgentRequestTimeoutMs() - getSafetyMarginMs(),
).toISOString(),
requestId: request.requestId,
skill: request.skill,
startedAt: new Date().toISOString(),