@inkeep/agents-core 0.14.8 → 0.14.9
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.cjs +5 -6
- package/dist/index.d.cts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +5 -6
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -5736,14 +5736,13 @@ var noopTracer = {
|
|
|
5736
5736
|
}
|
|
5737
5737
|
};
|
|
5738
5738
|
function setSpanWithError(span, error, logger12, logMessage) {
|
|
5739
|
-
const errorMessage = error instanceof Error ? error.message : String(error);
|
|
5740
5739
|
span.recordException(error);
|
|
5741
5740
|
span.setStatus({
|
|
5742
5741
|
code: api.SpanStatusCode.ERROR,
|
|
5743
|
-
message:
|
|
5742
|
+
message: error.message
|
|
5744
5743
|
});
|
|
5745
5744
|
if (logger12 && logMessage) {
|
|
5746
|
-
logger12.error({ error:
|
|
5745
|
+
logger12.error({ error: error.message }, logMessage);
|
|
5747
5746
|
}
|
|
5748
5747
|
}
|
|
5749
5748
|
function getTracer(serviceName, serviceVersion) {
|
|
@@ -8946,7 +8945,7 @@ var ContextResolver = class {
|
|
|
8946
8945
|
return result;
|
|
8947
8946
|
} catch (error) {
|
|
8948
8947
|
const durationMs = Date.now() - startTime;
|
|
8949
|
-
setSpanWithError(parentSpan, error);
|
|
8948
|
+
setSpanWithError(parentSpan, error instanceof Error ? error : new Error(String(error)));
|
|
8950
8949
|
logger7.error(
|
|
8951
8950
|
{
|
|
8952
8951
|
contextConfigId: contextConfig2.id,
|
|
@@ -9026,7 +9025,7 @@ var ContextResolver = class {
|
|
|
9026
9025
|
});
|
|
9027
9026
|
return data;
|
|
9028
9027
|
} catch (error) {
|
|
9029
|
-
setSpanWithError(parentSpan, error);
|
|
9028
|
+
setSpanWithError(parentSpan, error instanceof Error ? error : new Error(String(error)));
|
|
9030
9029
|
throw error;
|
|
9031
9030
|
} finally {
|
|
9032
9031
|
parentSpan.end();
|
|
@@ -9938,7 +9937,7 @@ async function handleContextResolution({
|
|
|
9938
9937
|
"context.final_status": "failed",
|
|
9939
9938
|
"context.error_message": errorMessage
|
|
9940
9939
|
});
|
|
9941
|
-
setSpanWithError(parentSpan, error);
|
|
9940
|
+
setSpanWithError(parentSpan, error instanceof Error ? error : new Error(String(error)));
|
|
9942
9941
|
logger10.error(
|
|
9943
9942
|
{
|
|
9944
9943
|
error: errorMessage,
|
package/dist/index.d.cts
CHANGED
|
@@ -3975,7 +3975,7 @@ declare function getRequestExecutionContext(c: Context): ExecutionContext;
|
|
|
3975
3975
|
* Helper function to handle span errors consistently
|
|
3976
3976
|
* Records the exception, sets error status, and optionally logs
|
|
3977
3977
|
*/
|
|
3978
|
-
declare function setSpanWithError(span: Span, error:
|
|
3978
|
+
declare function setSpanWithError(span: Span, error: Error, logger?: {
|
|
3979
3979
|
error: (obj: any, msg?: string) => void;
|
|
3980
3980
|
}, logMessage?: string): void;
|
|
3981
3981
|
/**
|
package/dist/index.d.ts
CHANGED
|
@@ -3975,7 +3975,7 @@ declare function getRequestExecutionContext(c: Context): ExecutionContext;
|
|
|
3975
3975
|
* Helper function to handle span errors consistently
|
|
3976
3976
|
* Records the exception, sets error status, and optionally logs
|
|
3977
3977
|
*/
|
|
3978
|
-
declare function setSpanWithError(span: Span, error:
|
|
3978
|
+
declare function setSpanWithError(span: Span, error: Error, logger?: {
|
|
3979
3979
|
error: (obj: any, msg?: string) => void;
|
|
3980
3980
|
}, logMessage?: string): void;
|
|
3981
3981
|
/**
|
package/dist/index.js
CHANGED
|
@@ -4119,14 +4119,13 @@ var noopTracer = {
|
|
|
4119
4119
|
}
|
|
4120
4120
|
};
|
|
4121
4121
|
function setSpanWithError(span, error, logger12, logMessage) {
|
|
4122
|
-
const errorMessage = error instanceof Error ? error.message : String(error);
|
|
4123
4122
|
span.recordException(error);
|
|
4124
4123
|
span.setStatus({
|
|
4125
4124
|
code: SpanStatusCode.ERROR,
|
|
4126
|
-
message:
|
|
4125
|
+
message: error.message
|
|
4127
4126
|
});
|
|
4128
4127
|
if (logger12 && logMessage) {
|
|
4129
|
-
logger12.error({ error:
|
|
4128
|
+
logger12.error({ error: error.message }, logMessage);
|
|
4130
4129
|
}
|
|
4131
4130
|
}
|
|
4132
4131
|
function getTracer(serviceName, serviceVersion) {
|
|
@@ -7329,7 +7328,7 @@ var ContextResolver = class {
|
|
|
7329
7328
|
return result;
|
|
7330
7329
|
} catch (error) {
|
|
7331
7330
|
const durationMs = Date.now() - startTime;
|
|
7332
|
-
setSpanWithError(parentSpan, error);
|
|
7331
|
+
setSpanWithError(parentSpan, error instanceof Error ? error : new Error(String(error)));
|
|
7333
7332
|
logger7.error(
|
|
7334
7333
|
{
|
|
7335
7334
|
contextConfigId: contextConfig2.id,
|
|
@@ -7409,7 +7408,7 @@ var ContextResolver = class {
|
|
|
7409
7408
|
});
|
|
7410
7409
|
return data;
|
|
7411
7410
|
} catch (error) {
|
|
7412
|
-
setSpanWithError(parentSpan, error);
|
|
7411
|
+
setSpanWithError(parentSpan, error instanceof Error ? error : new Error(String(error)));
|
|
7413
7412
|
throw error;
|
|
7414
7413
|
} finally {
|
|
7415
7414
|
parentSpan.end();
|
|
@@ -8321,7 +8320,7 @@ async function handleContextResolution({
|
|
|
8321
8320
|
"context.final_status": "failed",
|
|
8322
8321
|
"context.error_message": errorMessage
|
|
8323
8322
|
});
|
|
8324
|
-
setSpanWithError(parentSpan, error);
|
|
8323
|
+
setSpanWithError(parentSpan, error instanceof Error ? error : new Error(String(error)));
|
|
8325
8324
|
logger10.error(
|
|
8326
8325
|
{
|
|
8327
8326
|
error: errorMessage,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@inkeep/agents-core",
|
|
3
|
-
"version": "0.14.
|
|
3
|
+
"version": "0.14.9",
|
|
4
4
|
"description": "Agents Core contains the database schema, types, and validation schemas for Inkeep Agent Framework, along with core components.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "SEE LICENSE IN LICENSE.md",
|