agentv 3.2.2 → 3.2.3
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/{agentv-provider-5CJVBBGG-2XVZBW7L.js → agentv-provider-5CJVBBGG-CWG26WRA.js} +2 -2
- package/dist/{chunk-QHH6QXNY.js → chunk-3S5ABGLC.js} +86 -8
- package/dist/chunk-3S5ABGLC.js.map +1 -0
- package/dist/{chunk-6GSYTMXD.js → chunk-6BA56F67.js} +1493 -10347
- package/dist/chunk-6BA56F67.js.map +1 -0
- package/dist/{chunk-IUNL3OJU.js → chunk-HSLVKD7U.js} +22 -4
- package/dist/chunk-HSLVKD7U.js.map +1 -0
- package/dist/{chunk-LNRX7YV5.js → chunk-WW3AL6CM.js} +4 -4
- package/dist/cli.js +4 -4
- package/dist/{dist-NOJMJ5CF.js → dist-4QBXVHRX.js} +3 -3
- package/dist/index.js +4 -4
- package/dist/{interactive-LMQO2QAX.js → interactive-TLLJMCWK.js} +4 -4
- package/package.json +3 -2
- package/dist/chunk-6GSYTMXD.js.map +0 -1
- package/dist/chunk-IUNL3OJU.js.map +0 -1
- package/dist/chunk-QHH6QXNY.js.map +0 -1
- /package/dist/{agentv-provider-5CJVBBGG-2XVZBW7L.js.map → agentv-provider-5CJVBBGG-CWG26WRA.js.map} +0 -0
- /package/dist/{chunk-LNRX7YV5.js.map → chunk-WW3AL6CM.js.map} +0 -0
- /package/dist/{dist-NOJMJ5CF.js.map → dist-4QBXVHRX.js.map} +0 -0
- /package/dist/{interactive-LMQO2QAX.js.map → interactive-TLLJMCWK.js.map} +0 -0
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { createRequire } from 'node:module'; const require = createRequire(import.meta.url);
|
|
2
2
|
import {
|
|
3
3
|
AgentvProvider
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-6BA56F67.js";
|
|
5
5
|
import "./chunk-5H446C7X.js";
|
|
6
6
|
export {
|
|
7
7
|
AgentvProvider
|
|
8
8
|
};
|
|
9
|
-
//# sourceMappingURL=agentv-provider-5CJVBBGG-
|
|
9
|
+
//# sourceMappingURL=agentv-provider-5CJVBBGG-CWG26WRA.js.map
|
|
@@ -140,7 +140,7 @@ import {
|
|
|
140
140
|
withUserAgentSuffix,
|
|
141
141
|
withoutTrailingSlash,
|
|
142
142
|
zodSchema
|
|
143
|
-
} from "./chunk-
|
|
143
|
+
} from "./chunk-6BA56F67.js";
|
|
144
144
|
import {
|
|
145
145
|
SpanStatusCode,
|
|
146
146
|
init_esm,
|
|
@@ -287,7 +287,7 @@ var require_dist = __commonJS({
|
|
|
287
287
|
}
|
|
288
288
|
});
|
|
289
289
|
|
|
290
|
-
// ../../packages/core/dist/chunk-
|
|
290
|
+
// ../../packages/core/dist/chunk-4QLFE2LY.js
|
|
291
291
|
import { constants } from "node:fs";
|
|
292
292
|
import { access, readFile } from "node:fs/promises";
|
|
293
293
|
import path from "node:path";
|
|
@@ -405,7 +405,7 @@ __export(external_exports2, {
|
|
|
405
405
|
void: () => voidType
|
|
406
406
|
});
|
|
407
407
|
|
|
408
|
-
// ../../packages/core/dist/chunk-
|
|
408
|
+
// ../../packages/core/dist/chunk-4QLFE2LY.js
|
|
409
409
|
var TEST_MESSAGE_ROLE_VALUES = ["system", "user", "assistant", "tool"];
|
|
410
410
|
var TEST_MESSAGE_ROLES = TEST_MESSAGE_ROLE_VALUES;
|
|
411
411
|
var TEST_MESSAGE_ROLE_SET = new Set(TEST_MESSAGE_ROLE_VALUES);
|
|
@@ -775,6 +775,7 @@ var BASE_TARGET_SCHEMA = external_exports2.object({
|
|
|
775
775
|
workspaceTemplate: external_exports2.string().optional()
|
|
776
776
|
}).passthrough();
|
|
777
777
|
var DEFAULT_AZURE_API_VERSION = "2024-12-01-preview";
|
|
778
|
+
var DEFAULT_OPENAI_BASE_URL = "https://api.openai.com/v1";
|
|
778
779
|
function normalizeAzureApiVersion(value) {
|
|
779
780
|
if (!value) {
|
|
780
781
|
return DEFAULT_AZURE_API_VERSION;
|
|
@@ -830,6 +831,15 @@ function resolveTargetDefinition(definition, env = process.env, evalFilePath) {
|
|
|
830
831
|
parsed.provider_batching ?? parsed.providerBatching
|
|
831
832
|
);
|
|
832
833
|
switch (provider) {
|
|
834
|
+
case "openai":
|
|
835
|
+
return {
|
|
836
|
+
kind: "openai",
|
|
837
|
+
name: parsed.name,
|
|
838
|
+
graderTarget: parsed.grader_target ?? parsed.judge_target,
|
|
839
|
+
workers: parsed.workers,
|
|
840
|
+
providerBatching,
|
|
841
|
+
config: resolveOpenAIConfig(parsed, env)
|
|
842
|
+
};
|
|
833
843
|
case "azure":
|
|
834
844
|
case "azure-openai":
|
|
835
845
|
return {
|
|
@@ -985,6 +995,16 @@ function resolveTargetDefinition(definition, env = process.env, evalFilePath) {
|
|
|
985
995
|
};
|
|
986
996
|
}
|
|
987
997
|
}
|
|
998
|
+
function normalizeOpenAIBaseUrl(value) {
|
|
999
|
+
if (!value) {
|
|
1000
|
+
return DEFAULT_OPENAI_BASE_URL;
|
|
1001
|
+
}
|
|
1002
|
+
const trimmed = value.trim().replace(/\/+$/, "");
|
|
1003
|
+
if (trimmed.length === 0) {
|
|
1004
|
+
return DEFAULT_OPENAI_BASE_URL;
|
|
1005
|
+
}
|
|
1006
|
+
return trimmed.endsWith("/v1") ? trimmed : `${trimmed}/v1`;
|
|
1007
|
+
}
|
|
988
1008
|
function resolveAzureConfig(target, env) {
|
|
989
1009
|
const endpointSource = target.endpoint ?? target.resource ?? target.resourceName;
|
|
990
1010
|
const apiKeySource = target.api_key ?? target.apiKey;
|
|
@@ -1017,6 +1037,30 @@ function resolveAzureConfig(target, env) {
|
|
|
1017
1037
|
retry
|
|
1018
1038
|
};
|
|
1019
1039
|
}
|
|
1040
|
+
function resolveOpenAIConfig(target, env) {
|
|
1041
|
+
const endpointSource = target.endpoint ?? target.base_url ?? target.baseUrl;
|
|
1042
|
+
const apiKeySource = target.api_key ?? target.apiKey;
|
|
1043
|
+
const modelSource = target.model ?? target.deployment ?? target.variant;
|
|
1044
|
+
const temperatureSource = target.temperature;
|
|
1045
|
+
const maxTokensSource = target.max_output_tokens ?? target.maxTokens;
|
|
1046
|
+
const baseURL = normalizeOpenAIBaseUrl(
|
|
1047
|
+
resolveOptionalString(endpointSource, env, `${target.name} endpoint`, {
|
|
1048
|
+
allowLiteral: true,
|
|
1049
|
+
optionalEnv: true
|
|
1050
|
+
})
|
|
1051
|
+
);
|
|
1052
|
+
const apiKey = resolveString(apiKeySource, env, `${target.name} api key`);
|
|
1053
|
+
const model = resolveString(modelSource, env, `${target.name} model`);
|
|
1054
|
+
const retry = resolveRetryConfig(target);
|
|
1055
|
+
return {
|
|
1056
|
+
baseURL,
|
|
1057
|
+
apiKey,
|
|
1058
|
+
model,
|
|
1059
|
+
temperature: resolveOptionalNumber(temperatureSource, `${target.name} temperature`),
|
|
1060
|
+
maxOutputTokens: resolveOptionalNumber(maxTokensSource, `${target.name} max output tokens`),
|
|
1061
|
+
retry
|
|
1062
|
+
};
|
|
1063
|
+
}
|
|
1020
1064
|
function resolveAnthropicConfig(target, env) {
|
|
1021
1065
|
const apiKeySource = target.api_key ?? target.apiKey;
|
|
1022
1066
|
const modelSource = target.model ?? target.deployment ?? target.variant;
|
|
@@ -1736,6 +1780,7 @@ var AGENT_PROVIDER_KINDS = [
|
|
|
1736
1780
|
"vscode-insiders"
|
|
1737
1781
|
];
|
|
1738
1782
|
var KNOWN_PROVIDERS = [
|
|
1783
|
+
"openai",
|
|
1739
1784
|
"azure",
|
|
1740
1785
|
"anthropic",
|
|
1741
1786
|
"gemini",
|
|
@@ -1770,8 +1815,6 @@ var PROVIDER_ALIASES = [
|
|
|
1770
1815
|
// alias for "pi-coding-agent"
|
|
1771
1816
|
"claude-code",
|
|
1772
1817
|
// alias for "claude" (legacy)
|
|
1773
|
-
"openai",
|
|
1774
|
-
// legacy/future support
|
|
1775
1818
|
"bedrock",
|
|
1776
1819
|
// legacy/future support
|
|
1777
1820
|
"vertex"
|
|
@@ -1828,6 +1871,7 @@ import path8 from "node:path";
|
|
|
1828
1871
|
import { readFileSync } from "node:fs";
|
|
1829
1872
|
import path10 from "node:path";
|
|
1830
1873
|
import { parse as parse3 } from "yaml";
|
|
1874
|
+
import { createOpenAI } from "@ai-sdk/openai";
|
|
1831
1875
|
|
|
1832
1876
|
// ../../node_modules/.bun/@ai-sdk+gateway@2.0.21+27912429049419a2/node_modules/@ai-sdk/gateway/dist/index.mjs
|
|
1833
1877
|
var import_oidc = __toESM(require_dist(), 1);
|
|
@@ -10928,6 +10972,40 @@ function getOutputFilenames(result) {
|
|
|
10928
10972
|
return names;
|
|
10929
10973
|
}
|
|
10930
10974
|
var DEFAULT_SYSTEM_PROMPT = "You are a careful assistant. Follow all provided instructions and do not fabricate results.";
|
|
10975
|
+
var OpenAIProvider = class {
|
|
10976
|
+
constructor(targetName, config) {
|
|
10977
|
+
this.config = config;
|
|
10978
|
+
this.id = `openai:${targetName}`;
|
|
10979
|
+
this.targetName = targetName;
|
|
10980
|
+
this.defaults = {
|
|
10981
|
+
temperature: config.temperature,
|
|
10982
|
+
maxOutputTokens: config.maxOutputTokens
|
|
10983
|
+
};
|
|
10984
|
+
this.retryConfig = config.retry;
|
|
10985
|
+
const openai = createOpenAI({
|
|
10986
|
+
apiKey: config.apiKey,
|
|
10987
|
+
baseURL: config.baseURL
|
|
10988
|
+
});
|
|
10989
|
+
this.model = openai(config.model);
|
|
10990
|
+
}
|
|
10991
|
+
id;
|
|
10992
|
+
kind = "openai";
|
|
10993
|
+
targetName;
|
|
10994
|
+
model;
|
|
10995
|
+
defaults;
|
|
10996
|
+
retryConfig;
|
|
10997
|
+
async invoke(request) {
|
|
10998
|
+
return invokeModel({
|
|
10999
|
+
model: this.model,
|
|
11000
|
+
request,
|
|
11001
|
+
defaults: this.defaults,
|
|
11002
|
+
retryConfig: this.retryConfig
|
|
11003
|
+
});
|
|
11004
|
+
}
|
|
11005
|
+
asLanguageModel() {
|
|
11006
|
+
return this.model;
|
|
11007
|
+
}
|
|
11008
|
+
};
|
|
10931
11009
|
var AzureProvider = class {
|
|
10932
11010
|
constructor(targetName, config) {
|
|
10933
11011
|
this.config = config;
|
|
@@ -16607,7 +16685,7 @@ async function discoverProviders(registry, baseDir) {
|
|
|
16607
16685
|
}
|
|
16608
16686
|
function createBuiltinProviderRegistry() {
|
|
16609
16687
|
const registry = new ProviderRegistry();
|
|
16610
|
-
registry.register("azure", (t) => new AzureProvider(t.name, t.config)).register("anthropic", (t) => new AnthropicProvider(t.name, t.config)).register("gemini", (t) => new GeminiProvider(t.name, t.config)).register("cli", (t) => new CliProvider(t.name, t.config)).register("codex", (t) => new CodexProvider(t.name, t.config)).register("copilot-sdk", (t) => new CopilotSdkProvider(t.name, t.config)).register("copilot-cli", (t) => new CopilotCliProvider(t.name, t.config)).register("pi-coding-agent", (t) => new PiCodingAgentProvider(t.name, t.config)).register("pi-agent-sdk", (t) => new PiAgentSdkProvider(t.name, t.config)).register("claude-cli", (t) => new ClaudeCliProvider(t.name, t.config)).register("claude", (t) => new ClaudeCliProvider(t.name, t.config)).register("claude-sdk", (t) => new ClaudeSdkProvider(t.name, t.config)).register("mock", (t) => new MockProvider(t.name, t.config)).register("agentv", (t) => new AgentvProvider(t.name, t.config)).register("vscode", (t) => new VSCodeProvider(t.name, t.config, "vscode")).register(
|
|
16688
|
+
registry.register("openai", (t) => new OpenAIProvider(t.name, t.config)).register("azure", (t) => new AzureProvider(t.name, t.config)).register("anthropic", (t) => new AnthropicProvider(t.name, t.config)).register("gemini", (t) => new GeminiProvider(t.name, t.config)).register("cli", (t) => new CliProvider(t.name, t.config)).register("codex", (t) => new CodexProvider(t.name, t.config)).register("copilot-sdk", (t) => new CopilotSdkProvider(t.name, t.config)).register("copilot-cli", (t) => new CopilotCliProvider(t.name, t.config)).register("pi-coding-agent", (t) => new PiCodingAgentProvider(t.name, t.config)).register("pi-agent-sdk", (t) => new PiAgentSdkProvider(t.name, t.config)).register("claude-cli", (t) => new ClaudeCliProvider(t.name, t.config)).register("claude", (t) => new ClaudeCliProvider(t.name, t.config)).register("claude-sdk", (t) => new ClaudeSdkProvider(t.name, t.config)).register("mock", (t) => new MockProvider(t.name, t.config)).register("agentv", (t) => new AgentvProvider(t.name, t.config)).register("vscode", (t) => new VSCodeProvider(t.name, t.config, "vscode")).register(
|
|
16611
16689
|
"vscode-insiders",
|
|
16612
16690
|
(t) => new VSCodeProvider(t.name, t.config, "vscode-insiders")
|
|
16613
16691
|
);
|
|
@@ -21616,7 +21694,7 @@ async function runEvaluation(options) {
|
|
|
21616
21694
|
if (!cliModel) {
|
|
21617
21695
|
throw new Error('--grader-target "agentv" requires --model (e.g., "openai:gpt-5-mini")');
|
|
21618
21696
|
}
|
|
21619
|
-
const { AgentvProvider: AgentvProvider2 } = await import("./agentv-provider-5CJVBBGG-
|
|
21697
|
+
const { AgentvProvider: AgentvProvider2 } = await import("./agentv-provider-5CJVBBGG-CWG26WRA.js");
|
|
21620
21698
|
return new AgentvProvider2("agentv", { model: cliModel, temperature: 0 });
|
|
21621
21699
|
}
|
|
21622
21700
|
const overrideTarget = resolveTargetByName(cliGraderTarget);
|
|
@@ -24377,4 +24455,4 @@ export {
|
|
|
24377
24455
|
OtelStreamingObserver,
|
|
24378
24456
|
createAgentKernel
|
|
24379
24457
|
};
|
|
24380
|
-
//# sourceMappingURL=chunk-
|
|
24458
|
+
//# sourceMappingURL=chunk-3S5ABGLC.js.map
|