@anonx3247/universal-agent-harness 0.1.1 → 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/db/index.d.ts +2 -1
- package/dist/db/index.d.ts.map +1 -1
- package/dist/db/schema.d.ts +5 -4
- package/dist/db/schema.d.ts.map +1 -1
- package/dist/lib/advisory.js +1 -1
- package/dist/models/anthropic.d.ts +1 -1
- package/dist/models/anthropic.js +3 -3
- package/dist/models/deepseek/index.d.ts +1 -1
- package/dist/models/deepseek/index.js +3 -3
- package/dist/models/gemini.d.ts +1 -1
- package/dist/models/gemini.js +3 -3
- package/dist/models/index.d.ts +1 -1
- package/dist/models/mistral.d.ts +10 -2
- package/dist/models/mistral.d.ts.map +1 -1
- package/dist/models/mistral.js +3 -3
- package/dist/models/moonshotai.d.ts +1 -1
- package/dist/models/moonshotai.js +3 -3
- package/dist/models/openai.d.ts +1 -1
- package/dist/models/openai.js +2 -2
- package/dist/models/provider.js +1 -1
- package/dist/models/redpill.d.ts +1 -1
- package/dist/models/redpill.js +3 -3
- package/dist/resources/advisory.d.ts +1 -1
- package/dist/resources/advisory.js +2 -2
- package/dist/resources/messages.d.ts +2 -2
- package/dist/resources/messages.js +2 -2
- package/dist/resources/run.d.ts +10 -3
- package/dist/resources/run.d.ts.map +1 -1
- package/dist/resources/run.js +4 -4
- package/dist/runner/index.d.ts +4 -4
- package/dist/runner/index.js +9 -9
- package/dist/tools/index.d.ts +0 -1
- package/dist/tools/index.js +1 -1
- package/package.json +3 -5
package/dist/db/index.d.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import Database from "better-sqlite3";
|
|
2
|
-
|
|
2
|
+
import * as schema from "./schema";
|
|
3
|
+
export declare const db: import("drizzle-orm/better-sqlite3").BetterSQLite3Database<typeof schema> & {
|
|
3
4
|
$client: Database.Database;
|
|
4
5
|
};
|
|
5
6
|
export type Tx = Parameters<Parameters<(typeof db)["transaction"]>[0]>[0];
|
package/dist/db/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/db/index.ts"],"names":[],"mappings":"AACA,OAAO,QAAQ,MAAM,gBAAgB,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/db/index.ts"],"names":[],"mappings":"AACA,OAAO,QAAQ,MAAM,gBAAgB,CAAC;AACtC,OAAO,KAAK,MAAM,MAAM,UAAU,CAAC;AAYnC,eAAO,MAAM,EAAE;;CAAsC,CAAC;AAEtD,MAAM,MAAM,EAAE,GAAG,UAAU,CAAC,UAAU,CAAC,CAAC,OAAO,EAAE,CAAC,CAAC,aAAa,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC"}
|
package/dist/db/schema.d.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { Model } from "../models/provider";
|
|
1
2
|
export declare const runs: import("drizzle-orm/sqlite-core").SQLiteTableWithColumns<{
|
|
2
3
|
name: "runs";
|
|
3
4
|
schema: undefined;
|
|
@@ -261,7 +262,7 @@ export declare const messages: import("drizzle-orm/sqlite-core").SQLiteTableWith
|
|
|
261
262
|
tableName: "messages";
|
|
262
263
|
dataType: "string";
|
|
263
264
|
columnType: "SQLiteText";
|
|
264
|
-
data:
|
|
265
|
+
data: "agent" | "user";
|
|
265
266
|
driverParam: string;
|
|
266
267
|
notNull: true;
|
|
267
268
|
hasDefault: false;
|
|
@@ -274,14 +275,14 @@ export declare const messages: import("drizzle-orm/sqlite-core").SQLiteTableWith
|
|
|
274
275
|
generated: undefined;
|
|
275
276
|
}, {}, {
|
|
276
277
|
length: number | undefined;
|
|
277
|
-
$type:
|
|
278
|
+
$type: "agent" | "user";
|
|
278
279
|
}>;
|
|
279
280
|
content: import("drizzle-orm/sqlite-core").SQLiteColumn<{
|
|
280
281
|
name: "content";
|
|
281
282
|
tableName: "messages";
|
|
282
283
|
dataType: "json";
|
|
283
284
|
columnType: "SQLiteTextJson";
|
|
284
|
-
data:
|
|
285
|
+
data: (import("../models").TextContent | import("../models").ToolUse | import("../models").ToolResult | import("../models").Thinking)[];
|
|
285
286
|
driverParam: string;
|
|
286
287
|
notNull: true;
|
|
287
288
|
hasDefault: false;
|
|
@@ -293,7 +294,7 @@ export declare const messages: import("drizzle-orm/sqlite-core").SQLiteTableWith
|
|
|
293
294
|
identity: undefined;
|
|
294
295
|
generated: undefined;
|
|
295
296
|
}, {}, {
|
|
296
|
-
$type:
|
|
297
|
+
$type: (import("../models").TextContent | import("../models").ToolUse | import("../models").ToolResult | import("../models").Thinking)[];
|
|
297
298
|
}>;
|
|
298
299
|
total_tokens: import("drizzle-orm/sqlite-core").SQLiteColumn<{
|
|
299
300
|
name: "total_tokens";
|
package/dist/db/schema.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"schema.d.ts","sourceRoot":"","sources":["../../src/db/schema.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"schema.d.ts","sourceRoot":"","sources":["../../src/db/schema.ts"],"names":[],"mappings":"AAQA,OAAO,EAAE,KAAK,EAAE,MAAM,sBAAsB,CAAC;AAE7C,eAAO,MAAM,IAAI;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAmBhB,CAAC;AAEF,eAAO,MAAM,QAAQ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA8BpB,CAAC;AAEF,eAAO,MAAM,UAAU;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAarB,CAAC"}
|
package/dist/lib/advisory.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { EventEmitter } from "events";
|
|
2
|
-
import { AdvisoryResource } from "
|
|
2
|
+
import { AdvisoryResource } from "../resources/advisory";
|
|
3
3
|
export class TypedEventEmitter extends EventEmitter {
|
|
4
4
|
on(event, listener) {
|
|
5
5
|
return super.on(event, listener);
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { MessageParam } from "@anthropic-ai/sdk/resources/messages";
|
|
2
2
|
import { LLM, ModelConfig, Message, Tool, TokenUsage } from "./index";
|
|
3
|
-
import { Result } from "
|
|
3
|
+
import { Result } from "../lib/error";
|
|
4
4
|
export type AnthropicModel = "claude-opus-4-5" | "claude-sonnet-4-5" | "claude-haiku-4-5";
|
|
5
5
|
export declare function isAnthropicModel(model: string): model is AnthropicModel;
|
|
6
6
|
export declare class AnthropicLLM extends LLM {
|
package/dist/models/anthropic.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { LLM } from "./index";
|
|
2
2
|
import Anthropic from "@anthropic-ai/sdk";
|
|
3
|
-
import { err, ok } from "
|
|
4
|
-
import { assertNever } from "
|
|
5
|
-
import { removeNulls } from "
|
|
3
|
+
import { err, ok } from "../lib/error";
|
|
4
|
+
import { assertNever } from "../lib/assert";
|
|
5
|
+
import { removeNulls } from "../lib/utils";
|
|
6
6
|
const DEFAULT_TIMEOUT = 600000 * 2; // 20 minutes (double the default)
|
|
7
7
|
const DEFAULT_MAX_TOKENS = 8192;
|
|
8
8
|
const DEFAULT_THINKING_TOKENS = 8192;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ChatCompletionMessageParam } from "openai/resources/chat";
|
|
2
2
|
import { LLM, ModelConfig, Message, Tool, TokenUsage } from "../index";
|
|
3
|
-
import { Result } from "
|
|
3
|
+
import { Result } from "../../lib/error";
|
|
4
4
|
export type DeepseekModel = "deepseek-chat" | "deepseek-reasoner";
|
|
5
5
|
export declare function isDeepseekModel(model: string): model is DeepseekModel;
|
|
6
6
|
export declare class DeepseekLLM extends LLM {
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { LLM, } from "../index";
|
|
2
2
|
import { PreTrainedTokenizer } from "@huggingface/transformers";
|
|
3
3
|
import OpenAI from "openai";
|
|
4
|
-
import { err, ok } from "
|
|
5
|
-
import { assertNever } from "
|
|
6
|
-
import { removeNulls } from "
|
|
4
|
+
import { err, ok } from "../../lib/error";
|
|
5
|
+
import { assertNever } from "../../lib/assert";
|
|
6
|
+
import { removeNulls } from "../../lib/utils";
|
|
7
7
|
export function isDeepseekModel(model) {
|
|
8
8
|
return ["deepseek-chat", "deepseek-reasoner"].includes(model);
|
|
9
9
|
}
|
package/dist/models/gemini.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Content } from "@google/genai";
|
|
2
2
|
import { LLM, ModelConfig, Message, Tool, TokenUsage } from "./index";
|
|
3
|
-
import { Result } from "
|
|
3
|
+
import { Result } from "../lib/error";
|
|
4
4
|
export type GeminiModel = "gemini-3-pro-preview" | "gemini-2.5-pro" | "gemini-2.5-flash" | "gemini-2.5-flash-lite";
|
|
5
5
|
export declare function isGeminiModel(model: string): model is GeminiModel;
|
|
6
6
|
export declare class GeminiLLM extends LLM {
|
package/dist/models/gemini.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { FunctionCallingConfigMode, GoogleGenAI, } from "@google/genai";
|
|
2
2
|
import { LLM, } from "./index";
|
|
3
|
-
import { err, ok } from "
|
|
4
|
-
import { assertNever } from "
|
|
5
|
-
import { removeNulls } from "
|
|
3
|
+
import { err, ok } from "../lib/error";
|
|
4
|
+
import { assertNever } from "../lib/assert";
|
|
5
|
+
import { removeNulls } from "../lib/utils";
|
|
6
6
|
export function isGeminiModel(model) {
|
|
7
7
|
return [
|
|
8
8
|
"gemini-3-pro-preview",
|
package/dist/models/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { JSONSchema7 as JSONSchema } from "json-schema";
|
|
2
|
-
import { Result } from "
|
|
2
|
+
import { Result } from "../lib/error";
|
|
3
3
|
import type { CallToolResult } from "@modelcontextprotocol/sdk/types.js";
|
|
4
4
|
import { provider } from "./provider";
|
|
5
5
|
export type ProviderData = Partial<Record<provider, any>>;
|
package/dist/models/mistral.d.ts
CHANGED
|
@@ -1,12 +1,20 @@
|
|
|
1
1
|
import { LLM, ModelConfig, Message, Tool, TokenUsage } from "./index";
|
|
2
|
-
import { Result } from "
|
|
2
|
+
import { Result } from "../lib/error";
|
|
3
3
|
export type MistralModel = "devstral-medium-latest" | "mistral-large-latest" | "mistral-small-latest" | "codestral-latest";
|
|
4
4
|
export declare function isMistralModel(model: string): model is MistralModel;
|
|
5
5
|
export declare class MistralLLM extends LLM {
|
|
6
6
|
private client;
|
|
7
7
|
private model;
|
|
8
8
|
constructor(config: ModelConfig, model?: MistralModel);
|
|
9
|
-
messages(messages: Message[]):
|
|
9
|
+
messages(messages: Message[]): ((import("@mistralai/mistralai/models/components").AssistantMessage & {
|
|
10
|
+
role: "assistant";
|
|
11
|
+
}) | (import("@mistralai/mistralai/models/components").SystemMessage & {
|
|
12
|
+
role: "system";
|
|
13
|
+
}) | (import("@mistralai/mistralai/models/components").ToolMessage & {
|
|
14
|
+
role: "tool";
|
|
15
|
+
}) | (import("@mistralai/mistralai/models/components").UserMessage & {
|
|
16
|
+
role: "user";
|
|
17
|
+
}))[];
|
|
10
18
|
generate(messages: Message[], prompt: string, tools: Tool[]): Promise<Result<{
|
|
11
19
|
message: Message;
|
|
12
20
|
tokenUsage?: TokenUsage;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mistral.d.ts","sourceRoot":"","sources":["../../src/models/mistral.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,GAAG,EACH,WAAW,EACX,OAAO,EACP,IAAI,EAIJ,UAAU,EACX,MAAM,SAAS,CAAC;AACjB,OAAO,EAAE,MAAM,EAAW,MAAM,gBAAgB,CAAC;AAmCjD,MAAM,MAAM,YAAY,GACpB,wBAAwB,GACxB,sBAAsB,GACtB,sBAAsB,GACtB,kBAAkB,CAAC;AAEvB,wBAAgB,cAAc,CAAC,KAAK,EAAE,MAAM,GAAG,KAAK,IAAI,YAAY,CAOnE;AAmBD,qBAAa,UAAW,SAAQ,GAAG;IACjC,OAAO,CAAC,MAAM,CAAU;IACxB,OAAO,CAAC,KAAK,CAAe;gBAG1B,MAAM,EAAE,WAAW,EACnB,KAAK,GAAE,YAAqC;IAO9C,QAAQ,CAAC,QAAQ,EAAE,OAAO,EAAE
|
|
1
|
+
{"version":3,"file":"mistral.d.ts","sourceRoot":"","sources":["../../src/models/mistral.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,GAAG,EACH,WAAW,EACX,OAAO,EACP,IAAI,EAIJ,UAAU,EACX,MAAM,SAAS,CAAC;AACjB,OAAO,EAAE,MAAM,EAAW,MAAM,gBAAgB,CAAC;AAmCjD,MAAM,MAAM,YAAY,GACpB,wBAAwB,GACxB,sBAAsB,GACtB,sBAAsB,GACtB,kBAAkB,CAAC;AAEvB,wBAAgB,cAAc,CAAC,KAAK,EAAE,MAAM,GAAG,KAAK,IAAI,YAAY,CAOnE;AAmBD,qBAAa,UAAW,SAAQ,GAAG;IACjC,OAAO,CAAC,MAAM,CAAU;IACxB,OAAO,CAAC,KAAK,CAAe;gBAG1B,MAAM,EAAE,WAAW,EACnB,KAAK,GAAE,YAAqC;IAO9C,QAAQ,CAAC,QAAQ,EAAE,OAAO,EAAE;;;;;;;;;IAmEtB,QAAQ,CACZ,QAAQ,EAAE,OAAO,EAAE,EACnB,MAAM,EAAE,MAAM,EACd,KAAK,EAAE,IAAI,EAAE,GACZ,OAAO,CAAC,MAAM,CAAC;QAAE,OAAO,EAAE,OAAO,CAAC;QAAC,UAAU,CAAC,EAAE,UAAU,CAAA;KAAE,CAAC,CAAC;IAsGjE,OAAO,CAAC,UAAU;IAUlB,SAAS,CAAC,iBAAiB,CAAC,UAAU,EAAE,UAAU,GAAG,MAAM;IAQrD,MAAM,CACV,QAAQ,EAAE,OAAO,EAAE,EACnB,OAAO,EAAE,MAAM,EACf,MAAM,EAAE,IAAI,EAAE,GACb,OAAO,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC;IAoC1B,SAAS,IAAI,MAAM;CAcpB"}
|
package/dist/models/mistral.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { LLM, } from "./index";
|
|
2
|
-
import { err, ok } from "
|
|
3
|
-
import { assertNever } from "
|
|
2
|
+
import { err, ok } from "../lib/error";
|
|
3
|
+
import { assertNever } from "../lib/assert";
|
|
4
4
|
import { Mistral } from "@mistralai/mistralai";
|
|
5
|
-
import { isString, removeNulls } from "
|
|
5
|
+
import { isString, removeNulls } from "../lib/utils";
|
|
6
6
|
function normalizeTokenPrices(costPerMillionInputTokens, costPerMillionOutputTokens) {
|
|
7
7
|
return {
|
|
8
8
|
input: costPerMillionInputTokens / 1_000_000,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ChatCompletionMessageParam } from "openai/resources/chat";
|
|
2
2
|
import { LLM, ModelConfig, Message, Tool, TokenUsage } from "./index";
|
|
3
|
-
import { Result } from "
|
|
3
|
+
import { Result } from "../lib/error";
|
|
4
4
|
export type MoonshotAIModel = "kimi-k2-thinking";
|
|
5
5
|
export declare function isMoonshotAIModel(model: string): model is MoonshotAIModel;
|
|
6
6
|
export declare class MoonshotAILLM extends LLM {
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { LLM } from "./index";
|
|
2
2
|
import OpenAI from "openai";
|
|
3
|
-
import { err, ok } from "
|
|
4
|
-
import { assertNever } from "
|
|
5
|
-
import { removeNulls } from "
|
|
3
|
+
import { err, ok } from "../lib/error";
|
|
4
|
+
import { assertNever } from "../lib/assert";
|
|
5
|
+
import { removeNulls } from "../lib/utils";
|
|
6
6
|
import { convertThinking } from "./openai";
|
|
7
7
|
export function isMoonshotAIModel(model) {
|
|
8
8
|
return ["kimi-k2-thinking"].includes(model);
|
package/dist/models/openai.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ResponseInputItem } from "openai/resources/responses/responses";
|
|
2
2
|
import { LLM, ModelConfig, Message, Tool, TokenUsage } from "./index";
|
|
3
|
-
import { Result } from "
|
|
3
|
+
import { Result } from "../lib/error";
|
|
4
4
|
export declare function convertThinking(thinking: boolean | undefined): "minimal" | "medium";
|
|
5
5
|
export type OpenAIModel = "gpt-5.2-pro" | "gpt-5.2" | "gpt-5.1" | "gpt-5.1-codex" | "gpt-5" | "gpt-5-codex" | "gpt-5-mini" | "gpt-5-nano" | "gpt-4.1";
|
|
6
6
|
export declare function isOpenAIModel(model: string): model is OpenAIModel;
|
package/dist/models/openai.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { LLM } from "./index";
|
|
2
2
|
import OpenAI from "openai";
|
|
3
|
-
import { err, ok } from "
|
|
4
|
-
import { assertNever } from "
|
|
3
|
+
import { err, ok } from "../lib/error";
|
|
4
|
+
import { assertNever } from "../lib/assert";
|
|
5
5
|
function normalizeTokenPrices(costPerMillionInputTokens, costPerMillionOutputTokens, costPerMillionCachedTokens) {
|
|
6
6
|
return {
|
|
7
7
|
input: costPerMillionInputTokens / 1_000_000,
|
package/dist/models/provider.js
CHANGED
package/dist/models/redpill.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ChatCompletionMessageParam } from "openai/resources/chat";
|
|
2
2
|
import { LLM, ModelConfig, Message, Tool, TokenUsage } from "./index";
|
|
3
|
-
import { Result } from "
|
|
3
|
+
import { Result } from "../lib/error";
|
|
4
4
|
export type RedPillModel = "kimi-k2.5" | "glm-4.7" | "llama-3.3-70b-instruct" | "qwen-2.5-7b-instruct";
|
|
5
5
|
export declare function isRedPillModel(model: string): model is RedPillModel;
|
|
6
6
|
export declare class RedPillLLM extends LLM {
|
package/dist/models/redpill.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { LLM, } from "./index";
|
|
2
2
|
import OpenAI from "openai";
|
|
3
|
-
import { err, ok } from "
|
|
4
|
-
import { assertNever } from "
|
|
5
|
-
import { removeNulls } from "
|
|
3
|
+
import { err, ok } from "../lib/error";
|
|
4
|
+
import { assertNever } from "../lib/assert";
|
|
5
|
+
import { removeNulls } from "../lib/utils";
|
|
6
6
|
export function isRedPillModel(model) {
|
|
7
7
|
return [
|
|
8
8
|
"kimi-k2.5",
|
package/dist/resources/run.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { runs } from "
|
|
2
|
-
import { Result } from "
|
|
1
|
+
import { runs } from "../db/schema";
|
|
2
|
+
import { Result } from "../lib/error";
|
|
3
3
|
import { InferInsertModel } from "drizzle-orm";
|
|
4
4
|
export declare class RunResource {
|
|
5
5
|
private data;
|
|
@@ -11,7 +11,14 @@ export declare class RunResource {
|
|
|
11
11
|
update(data: Partial<Omit<InferInsertModel<typeof runs>, "id" | "created">>): Promise<RunResource>;
|
|
12
12
|
delete(): Promise<void>;
|
|
13
13
|
toJSON(): {
|
|
14
|
-
|
|
14
|
+
name: string;
|
|
15
|
+
id: number;
|
|
16
|
+
created: Date;
|
|
17
|
+
updated: Date;
|
|
18
|
+
problem_id: string;
|
|
19
|
+
profile: string;
|
|
20
|
+
model: import("..").Model;
|
|
21
|
+
agent_count: number;
|
|
15
22
|
};
|
|
16
23
|
getAgentIndices(): number[];
|
|
17
24
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"run.d.ts","sourceRoot":"","sources":["../../src/resources/run.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,IAAI,EAAE,MAAM,gBAAgB,CAAC;AACtC,OAAO,EAAW,MAAM,EAAE,MAAM,gBAAgB,CAAC;AACjD,OAAO,EAAwB,gBAAgB,EAAE,MAAM,aAAa,CAAC;AAIrE,qBAAa,WAAW;IACtB,OAAO,CAAC,IAAI,CAAM;IAElB,OAAO;WAIM,UAAU,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,WAAW,CAAC,CAAC;WAYtD,QAAQ,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO,CAAC,WAAW,GAAG,IAAI,CAAC;WAUjD,MAAM,CACjB,IAAI,EAAE,IAAI,CACR,gBAAgB,CAAC,OAAO,IAAI,CAAC,EAC7B,IAAI,GAAG,SAAS,GAAG,SAAS,CAC7B,GACA,OAAO,CAAC,WAAW,CAAC;WAKV,GAAG,IAAI,OAAO,CAAC,WAAW,EAAE,CAAC;IAKpC,MAAM,CACV,IAAI,EAAE,OAAO,CAAC,IAAI,CAAC,gBAAgB,CAAC,OAAO,IAAI,CAAC,EAAE,IAAI,GAAG,SAAS,CAAC,CAAC,GACnE,OAAO,CAAC,WAAW,CAAC;IAWjB,MAAM,IAAI,OAAO,CAAC,IAAI,CAAC;IAI7B,MAAM
|
|
1
|
+
{"version":3,"file":"run.d.ts","sourceRoot":"","sources":["../../src/resources/run.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,IAAI,EAAE,MAAM,gBAAgB,CAAC;AACtC,OAAO,EAAW,MAAM,EAAE,MAAM,gBAAgB,CAAC;AACjD,OAAO,EAAwB,gBAAgB,EAAE,MAAM,aAAa,CAAC;AAIrE,qBAAa,WAAW;IACtB,OAAO,CAAC,IAAI,CAAM;IAElB,OAAO;WAIM,UAAU,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,WAAW,CAAC,CAAC;WAYtD,QAAQ,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO,CAAC,WAAW,GAAG,IAAI,CAAC;WAUjD,MAAM,CACjB,IAAI,EAAE,IAAI,CACR,gBAAgB,CAAC,OAAO,IAAI,CAAC,EAC7B,IAAI,GAAG,SAAS,GAAG,SAAS,CAC7B,GACA,OAAO,CAAC,WAAW,CAAC;WAKV,GAAG,IAAI,OAAO,CAAC,WAAW,EAAE,CAAC;IAKpC,MAAM,CACV,IAAI,EAAE,OAAO,CAAC,IAAI,CAAC,gBAAgB,CAAC,OAAO,IAAI,CAAC,EAAE,IAAI,GAAG,SAAS,CAAC,CAAC,GACnE,OAAO,CAAC,WAAW,CAAC;IAWjB,MAAM,IAAI,OAAO,CAAC,IAAI,CAAC;IAI7B,MAAM;;;;;;;;;;IAIN,eAAe,IAAI,MAAM,EAAE;CAG5B;AAED;;;GAGG;AACH,wBAAsB,QAAQ,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC,CAiBrE"}
|
package/dist/resources/run.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { db } from "
|
|
2
|
-
import { runs } from "
|
|
3
|
-
import { err, ok } from "
|
|
1
|
+
import { db } from "../db";
|
|
2
|
+
import { runs } from "../db/schema";
|
|
3
|
+
import { err, ok } from "../lib/error";
|
|
4
4
|
import { eq } from "drizzle-orm";
|
|
5
5
|
export class RunResource {
|
|
6
6
|
data;
|
|
@@ -64,7 +64,7 @@ export async function cleanRun(runName) {
|
|
|
64
64
|
const run = runRes.data;
|
|
65
65
|
const runId = run.toJSON().id;
|
|
66
66
|
// Delete messages first
|
|
67
|
-
const { messages } = await import("
|
|
67
|
+
const { messages } = await import("../db/schema");
|
|
68
68
|
db.delete(messages).where(eq(messages.run, runId)).run();
|
|
69
69
|
// Delete run
|
|
70
70
|
await run.delete();
|
package/dist/runner/index.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { LLM, Message, TextContent, Thinking, Tool, ToolResult, ToolUse } from "
|
|
2
|
-
import { RunResource } from "
|
|
1
|
+
import { LLM, Message, TextContent, Thinking, Tool, ToolResult, ToolUse } from "../models";
|
|
2
|
+
import { RunResource } from "../resources/run";
|
|
3
3
|
import { Client } from "@modelcontextprotocol/sdk/client/index.js";
|
|
4
|
-
import { Result } from "
|
|
5
|
-
import { MessageResource } from "
|
|
4
|
+
import { Result } from "../lib/error";
|
|
5
|
+
import { MessageResource } from "../resources/messages";
|
|
6
6
|
import { RunConfig } from "./config";
|
|
7
7
|
export declare class Runner {
|
|
8
8
|
private run;
|
package/dist/runner/index.js
CHANGED
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
import { withRetries, err, ok } from "
|
|
2
|
-
import { MessageResource } from "
|
|
1
|
+
import { withRetries, err, ok } from "../lib/error";
|
|
2
|
+
import { MessageResource } from "../resources/messages";
|
|
3
3
|
import assert from "assert";
|
|
4
|
-
import { errorToCallToolResult, createClientFromConfig } from "
|
|
5
|
-
import { loadProfileMCPConfig } from "
|
|
6
|
-
import { concurrentExecutor } from "
|
|
7
|
-
import { assertNever } from "
|
|
8
|
-
import { createLLM } from "
|
|
4
|
+
import { errorToCallToolResult, createClientFromConfig } from "../lib/mcp";
|
|
5
|
+
import { loadProfileMCPConfig } from "../lib/mcp-config";
|
|
6
|
+
import { concurrentExecutor } from "../lib/async";
|
|
7
|
+
import { assertNever } from "../lib/assert";
|
|
8
|
+
import { createLLM } from "../models/provider";
|
|
9
9
|
import { readFileSync } from "fs";
|
|
10
10
|
import { dirname } from "path";
|
|
11
11
|
import { fileURLToPath } from "url";
|
|
12
|
-
import { getProblemContent } from "
|
|
13
|
-
import { getProfilePath } from "
|
|
12
|
+
import { getProblemContent } from "../lib/problems";
|
|
13
|
+
import { getProfilePath } from "../lib/profiles";
|
|
14
14
|
const __filename = fileURLToPath(import.meta.url);
|
|
15
15
|
const __dirname = dirname(__filename);
|
|
16
16
|
function loadPromptForProfile(profile) {
|
package/dist/tools/index.d.ts
CHANGED
package/dist/tools/index.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@anonx3247/universal-agent-harness",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "1.0.0",
|
|
4
4
|
"description": "Universal multi-agent orchestration system with MCP server support",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -11,9 +11,6 @@
|
|
|
11
11
|
"types": "./dist/index.d.ts"
|
|
12
12
|
}
|
|
13
13
|
},
|
|
14
|
-
"imports": {
|
|
15
|
-
"@app/*": "./dist/*"
|
|
16
|
-
},
|
|
17
14
|
"bin": {
|
|
18
15
|
"agent-harness": "./dist/agent-harness.js"
|
|
19
16
|
},
|
|
@@ -25,7 +22,7 @@
|
|
|
25
22
|
"scripts": {
|
|
26
23
|
"typecheck": "tsc --noEmit",
|
|
27
24
|
"lint": "NODE_OPTIONS='--max-old-space-size=8192' eslint --cache --cache-location .eslintcache src/",
|
|
28
|
-
"build": "tsc",
|
|
25
|
+
"build": "tsc && tsc-alias",
|
|
29
26
|
"dev": "tsx src/agent-harness.ts"
|
|
30
27
|
},
|
|
31
28
|
"devDependencies": {
|
|
@@ -35,6 +32,7 @@
|
|
|
35
32
|
"@types/tar-stream": "^3.1.4",
|
|
36
33
|
"drizzle-kit": "^0.31.4",
|
|
37
34
|
"eslint": "^9.39.1",
|
|
35
|
+
"tsc-alias": "^1.8.16",
|
|
38
36
|
"tsx": "^4.0.0",
|
|
39
37
|
"typescript": "^5.8.3",
|
|
40
38
|
"typescript-eslint": "^8.46.3"
|