@agentv/core 4.7.0 → 4.8.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/{chunk-75RFVESM.js → chunk-VCVVKCC4.js} +54 -2
- package/dist/chunk-VCVVKCC4.js.map +1 -0
- package/dist/evaluation/validation/index.cjs +2 -1
- package/dist/evaluation/validation/index.cjs.map +1 -1
- package/dist/evaluation/validation/index.js +3 -2
- package/dist/evaluation/validation/index.js.map +1 -1
- package/dist/index.cjs +82 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +13 -0
- package/dist/index.d.ts +13 -0
- package/dist/index.js +30 -1
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/dist/chunk-75RFVESM.js.map +0 -1
package/dist/index.d.cts
CHANGED
|
@@ -265,6 +265,7 @@ interface TargetDefinition {
|
|
|
265
265
|
readonly cli_url?: string | unknown | undefined;
|
|
266
266
|
readonly cli_path?: string | unknown | undefined;
|
|
267
267
|
readonly github_token?: string | unknown | undefined;
|
|
268
|
+
readonly byok?: Record<string, unknown> | undefined;
|
|
268
269
|
readonly max_retries?: number | unknown | undefined;
|
|
269
270
|
readonly retry_initial_delay_ms?: number | unknown | undefined;
|
|
270
271
|
readonly retry_max_delay_ms?: number | unknown | undefined;
|
|
@@ -1806,6 +1807,18 @@ interface CopilotSdkResolvedConfig {
|
|
|
1806
1807
|
readonly logDir?: string;
|
|
1807
1808
|
readonly logFormat?: 'summary' | 'json';
|
|
1808
1809
|
readonly systemPrompt?: string;
|
|
1810
|
+
/** BYOK provider type: "azure", "openai", or "anthropic". */
|
|
1811
|
+
readonly byokType?: string;
|
|
1812
|
+
/** BYOK base URL for the provider endpoint. */
|
|
1813
|
+
readonly byokBaseUrl?: string;
|
|
1814
|
+
/** BYOK API key for authenticating with the provider. */
|
|
1815
|
+
readonly byokApiKey?: string;
|
|
1816
|
+
/** BYOK bearer token (takes precedence over apiKey when set). */
|
|
1817
|
+
readonly byokBearerToken?: string;
|
|
1818
|
+
/** BYOK Azure API version (e.g. "2024-10-21"). Only used when byokType is "azure". */
|
|
1819
|
+
readonly byokApiVersion?: string;
|
|
1820
|
+
/** BYOK wire API format: "completions" or "responses". */
|
|
1821
|
+
readonly byokWireApi?: string;
|
|
1809
1822
|
}
|
|
1810
1823
|
interface CopilotLogResolvedConfig {
|
|
1811
1824
|
/** Explicit path to a session directory containing events.jsonl. */
|
package/dist/index.d.ts
CHANGED
|
@@ -265,6 +265,7 @@ interface TargetDefinition {
|
|
|
265
265
|
readonly cli_url?: string | unknown | undefined;
|
|
266
266
|
readonly cli_path?: string | unknown | undefined;
|
|
267
267
|
readonly github_token?: string | unknown | undefined;
|
|
268
|
+
readonly byok?: Record<string, unknown> | undefined;
|
|
268
269
|
readonly max_retries?: number | unknown | undefined;
|
|
269
270
|
readonly retry_initial_delay_ms?: number | unknown | undefined;
|
|
270
271
|
readonly retry_max_delay_ms?: number | unknown | undefined;
|
|
@@ -1806,6 +1807,18 @@ interface CopilotSdkResolvedConfig {
|
|
|
1806
1807
|
readonly logDir?: string;
|
|
1807
1808
|
readonly logFormat?: 'summary' | 'json';
|
|
1808
1809
|
readonly systemPrompt?: string;
|
|
1810
|
+
/** BYOK provider type: "azure", "openai", or "anthropic". */
|
|
1811
|
+
readonly byokType?: string;
|
|
1812
|
+
/** BYOK base URL for the provider endpoint. */
|
|
1813
|
+
readonly byokBaseUrl?: string;
|
|
1814
|
+
/** BYOK API key for authenticating with the provider. */
|
|
1815
|
+
readonly byokApiKey?: string;
|
|
1816
|
+
/** BYOK bearer token (takes precedence over apiKey when set). */
|
|
1817
|
+
readonly byokBearerToken?: string;
|
|
1818
|
+
/** BYOK Azure API version (e.g. "2024-10-21"). Only used when byokType is "azure". */
|
|
1819
|
+
readonly byokApiVersion?: string;
|
|
1820
|
+
/** BYOK wire API format: "completions" or "responses". */
|
|
1821
|
+
readonly byokWireApi?: string;
|
|
1809
1822
|
}
|
|
1810
1823
|
interface CopilotLogResolvedConfig {
|
|
1811
1824
|
/** Explicit path to a session directory containing events.jsonl. */
|
package/dist/index.js
CHANGED
|
@@ -25,7 +25,7 @@ import {
|
|
|
25
25
|
resolveDelegatedTargetDefinition,
|
|
26
26
|
resolveFileReference,
|
|
27
27
|
resolveTargetDefinition
|
|
28
|
-
} from "./chunk-
|
|
28
|
+
} from "./chunk-VCVVKCC4.js";
|
|
29
29
|
import {
|
|
30
30
|
AgentvProvider
|
|
31
31
|
} from "./chunk-PRNXHNLF.js";
|
|
@@ -7134,6 +7134,25 @@ var CopilotSdkProvider = class {
|
|
|
7134
7134
|
content: systemPrompt
|
|
7135
7135
|
};
|
|
7136
7136
|
}
|
|
7137
|
+
if (this.config.byokBaseUrl) {
|
|
7138
|
+
const byokType = this.config.byokType ?? "openai";
|
|
7139
|
+
const provider = {
|
|
7140
|
+
type: byokType,
|
|
7141
|
+
baseUrl: normalizeByokBaseUrl(this.config.byokBaseUrl, byokType)
|
|
7142
|
+
};
|
|
7143
|
+
if (this.config.byokBearerToken) {
|
|
7144
|
+
provider.bearerToken = this.config.byokBearerToken;
|
|
7145
|
+
} else if (this.config.byokApiKey) {
|
|
7146
|
+
provider.apiKey = this.config.byokApiKey;
|
|
7147
|
+
}
|
|
7148
|
+
if (this.config.byokWireApi) {
|
|
7149
|
+
provider.wireApi = this.config.byokWireApi;
|
|
7150
|
+
}
|
|
7151
|
+
if (this.config.byokType === "azure" && this.config.byokApiVersion) {
|
|
7152
|
+
provider.azure = { apiVersion: this.config.byokApiVersion };
|
|
7153
|
+
}
|
|
7154
|
+
sessionOptions.provider = provider;
|
|
7155
|
+
}
|
|
7137
7156
|
let session;
|
|
7138
7157
|
try {
|
|
7139
7158
|
session = await client.createSession(sessionOptions);
|
|
@@ -7365,6 +7384,16 @@ function resolveSkillDirectories(cwd) {
|
|
|
7365
7384
|
];
|
|
7366
7385
|
return candidates.filter((dir) => existsSync2(dir));
|
|
7367
7386
|
}
|
|
7387
|
+
function normalizeByokBaseUrl(baseUrl, type) {
|
|
7388
|
+
const trimmed = baseUrl.trim().replace(/\/+$/, "");
|
|
7389
|
+
if (/^https?:\/\//i.test(trimmed)) {
|
|
7390
|
+
return trimmed;
|
|
7391
|
+
}
|
|
7392
|
+
if (type === "azure") {
|
|
7393
|
+
return `https://${trimmed}.openai.azure.com`;
|
|
7394
|
+
}
|
|
7395
|
+
return trimmed;
|
|
7396
|
+
}
|
|
7368
7397
|
function summarizeSdkEvent(eventType, data) {
|
|
7369
7398
|
if (!data || typeof data !== "object") {
|
|
7370
7399
|
return eventType;
|