From 43acacd25a7fe5b02261dc35ddc949d1c4fa5179 Mon Sep 17 00:00:00 2001 From: David Blass Date: Thu, 20 Nov 2025 16:09:55 -0500 Subject: [PATCH] improve types --- agents/shared.ts | 4 ++-- play.ts | 5 ++--- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/agents/shared.ts b/agents/shared.ts index a60e757..381d052 100644 --- a/agents/shared.ts +++ b/agents/shared.ts @@ -12,8 +12,8 @@ import { log } from "../utils/cli.ts"; */ export interface AgentResult { success: boolean; - output?: string; - error?: string; + output?: string | undefined; + error?: string | undefined; metadata?: Record; } diff --git a/play.ts b/play.ts index c7b7a26..e04074a 100644 --- a/play.ts +++ b/play.ts @@ -6,15 +6,14 @@ import { flatMorph } from "@ark/util"; import arg from "arg"; import { config } from "dotenv"; import { agents } from "./agents/index.ts"; +import type { AgentResult } from "./agents/shared.ts"; import { type Inputs, main } from "./main.ts"; import { log } from "./utils/cli.ts"; import { setupTestRepo } from "./utils/setup.ts"; config(); -export async function run( - prompt: string -): Promise<{ success: boolean; output?: string | undefined; error?: string | undefined }> { +export async function run(prompt: string): Promise { try { const tempDir = join(process.cwd(), ".temp"); setupTestRepo({ tempDir, forceClean: true });