@agentfield/sdk 0.1.144 → 0.1.145
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/index.js +12 -12
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1121,8 +1121,13 @@ __export(codeaf_exports, {
|
|
|
1121
1121
|
warnCodeafConfiguration: () => warnCodeafConfiguration
|
|
1122
1122
|
});
|
|
1123
1123
|
function resetCodeafAuthWarnings() {
|
|
1124
|
-
|
|
1125
|
-
|
|
1124
|
+
missingKeyWarned = false;
|
|
1125
|
+
}
|
|
1126
|
+
function warnMissingKeyOnce() {
|
|
1127
|
+
if (!missingKeyWarned) {
|
|
1128
|
+
missingKeyWarned = true;
|
|
1129
|
+
console.warn(CODEAF_MISSING_KEY_WARNING);
|
|
1130
|
+
}
|
|
1126
1131
|
}
|
|
1127
1132
|
function resolveCodeafMaxConcurrent() {
|
|
1128
1133
|
const value = process.env.CODEAF_MAX_CONCURRENT ?? process.env.AFORGE_MAX_CONCURRENT;
|
|
@@ -1295,14 +1300,13 @@ function warnCodeafConfiguration(config) {
|
|
|
1295
1300
|
const provider = resolveExecutionProvider(config);
|
|
1296
1301
|
if (provider !== "codeaf" && provider !== "aforge") return;
|
|
1297
1302
|
if (provider === "aforge" && (config.aforgeBin !== void 0 || process.env.AFORGE_BIN?.trim())) return;
|
|
1298
|
-
if (!hasModelKey({ ...process.env, ...childEnvironment({}, void 0) })
|
|
1299
|
-
|
|
1300
|
-
console.warn(CODEAF_MISSING_KEY_WARNING);
|
|
1303
|
+
if (!hasModelKey({ ...process.env, ...childEnvironment({ env: config.env }, void 0) })) {
|
|
1304
|
+
warnMissingKeyOnce();
|
|
1301
1305
|
}
|
|
1302
1306
|
} catch {
|
|
1303
1307
|
}
|
|
1304
1308
|
}
|
|
1305
|
-
var CODEAF_DEFAULT_MODEL, REASONING_VARIANTS2, ANSI_PATTERN2, CODEAF_MISSING_KEY_WARNING,
|
|
1309
|
+
var CODEAF_DEFAULT_MODEL, REASONING_VARIANTS2, ANSI_PATTERN2, CODEAF_MISSING_KEY_WARNING, missingKeyWarned, Semaphore2, codeafSemaphore, resolution, downloadError, aliasLogged, invalidCommandLogged, CodeafProvider;
|
|
1306
1310
|
var init_codeaf = __esm({
|
|
1307
1311
|
"src/harness/providers/codeaf.ts"() {
|
|
1308
1312
|
init_base();
|
|
@@ -1317,8 +1321,7 @@ var init_codeaf = __esm({
|
|
|
1317
1321
|
REASONING_VARIANTS2 = /* @__PURE__ */ new Set(["off", "low", "medium", "high"]);
|
|
1318
1322
|
ANSI_PATTERN2 = /\x1B\[[0-?]*[ -/]*[@-~]/g;
|
|
1319
1323
|
CODEAF_MISSING_KEY_WARNING = "CodeAF is the harness provider and no model key is configured, so harness calls will fail. Set OPENROUTER_API_KEY (https://openrouter.ai/keys), or choose another harness provider with the provider option or AGENTFIELD_HARNESS_PROVIDER.";
|
|
1320
|
-
|
|
1321
|
-
constructionWarningLogged = false;
|
|
1324
|
+
missingKeyWarned = false;
|
|
1322
1325
|
Semaphore2 = class {
|
|
1323
1326
|
constructor(limit) {
|
|
1324
1327
|
this.limit = limit;
|
|
@@ -1360,10 +1363,7 @@ var init_codeaf = __esm({
|
|
|
1360
1363
|
return { ...await new AforgeProvider(legacyPin).execute(prompt, options), provider: "aforge" };
|
|
1361
1364
|
}
|
|
1362
1365
|
if (!hasModelKey({ ...process.env, ...childEnvironment(options, void 0) })) {
|
|
1363
|
-
|
|
1364
|
-
missingKeyLogged = true;
|
|
1365
|
-
console.warn(CODEAF_MISSING_KEY_WARNING);
|
|
1366
|
-
}
|
|
1366
|
+
warnMissingKeyOnce();
|
|
1367
1367
|
throw new HarnessProviderNotConfigured(this.bin || process.env.CODEAF_BIN || "codeaf");
|
|
1368
1368
|
}
|
|
1369
1369
|
const started = performance.now();
|