@theokit/agents 4.30.0 → 4.30.1
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/bridge.js +1 -1
- package/dist/{chunk-HFMH3AIP.js → chunk-LWF36KFK.js} +14 -7
- package/dist/chunk-LWF36KFK.js.map +1 -0
- package/dist/index.js +1 -1
- package/dist/persistence.d.ts +1 -1
- package/dist/persistence.js +2 -0
- package/dist/persistence.js.map +1 -1
- package/package.json +2 -2
- package/dist/chunk-HFMH3AIP.js.map +0 -1
package/dist/bridge.js
CHANGED
|
@@ -1189,6 +1189,18 @@ function buildSdkTools(compiledTools, defineTool, extraSdkTools = [], runContext
|
|
|
1189
1189
|
}
|
|
1190
1190
|
__name(buildSdkTools, "buildSdkTools");
|
|
1191
1191
|
var resolverApiKey = /* @__PURE__ */ __name(async (k) => typeof k === "function" ? await k() : k, "resolverApiKey");
|
|
1192
|
+
function eventoDeErroDoSdk(err) {
|
|
1193
|
+
const sdkErr = err;
|
|
1194
|
+
return {
|
|
1195
|
+
type: "error",
|
|
1196
|
+
code: sdkErr.code ?? "SDK_ERROR",
|
|
1197
|
+
message: err instanceof Error ? err.message : "SDK agent error",
|
|
1198
|
+
// O SDK computa `isRetryable` por classe de erro na construção; fixá-lo em `false` aqui
|
|
1199
|
+
// contradizia o próprio erro.
|
|
1200
|
+
retryable: sdkErr.isRetryable === true
|
|
1201
|
+
};
|
|
1202
|
+
}
|
|
1203
|
+
__name(eventoDeErroDoSdk, "eventoDeErroDoSdk");
|
|
1192
1204
|
function createSdkAgentStream(compiled, compiledTools, apiKey, overrides = {}) {
|
|
1193
1205
|
const model = overrides.model ?? compiled.model ?? "openai/gpt-4o-mini";
|
|
1194
1206
|
const reasoningEffort = overrides.reasoningEffort ?? compiled.reasoningEffort;
|
|
@@ -1240,12 +1252,7 @@ function createSdkAgentStream(compiled, compiledTools, apiKey, overrides = {}) {
|
|
|
1240
1252
|
t0
|
|
1241
1253
|
});
|
|
1242
1254
|
} catch (err) {
|
|
1243
|
-
yield
|
|
1244
|
-
type: "error",
|
|
1245
|
-
code: "SDK_ERROR",
|
|
1246
|
-
message: err instanceof Error ? err.message : "SDK agent error",
|
|
1247
|
-
retryable: false
|
|
1248
|
-
};
|
|
1255
|
+
yield eventoDeErroDoSdk(err);
|
|
1249
1256
|
}
|
|
1250
1257
|
}
|
|
1251
1258
|
}), "factory");
|
|
@@ -3540,4 +3547,4 @@ export {
|
|
|
3540
3547
|
generateAgentManifest,
|
|
3541
3548
|
agentsPlugin
|
|
3542
3549
|
};
|
|
3543
|
-
//# sourceMappingURL=chunk-
|
|
3550
|
+
//# sourceMappingURL=chunk-LWF36KFK.js.map
|