improve types

This commit is contained in:
David Blass
2025-11-20 16:09:55 -05:00
parent 975eaa9a64
commit 43acacd25a
2 changed files with 4 additions and 5 deletions
+2 -2
View File
@@ -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<string, unknown>;
}
+2 -3
View File
@@ -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<AgentResult> {
try {
const tempDir = join(process.cwd(), ".temp");
setupTestRepo({ tempDir, forceClean: true });