@elizaos/server 1.6.2-alpha.17 → 1.6.2-alpha.19
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/client/assets/{main-myuWCetT.js → main-9u9VkYV9.js} +15 -15
- package/dist/client/assets/{main-myuWCetT.js.map → main-9u9VkYV9.js.map} +1 -1
- package/dist/client/assets/{main-BCuV_hET.js → main-Da6JKS5j.js} +3 -3
- package/dist/client/assets/{main-BCuV_hET.js.map → main-Da6JKS5j.js.map} +1 -1
- package/dist/client/assets/{react-vendor-GEfuWOcs.js → react-vendor-DPGVcrXi.js} +3 -3
- package/dist/client/assets/react-vendor-DPGVcrXi.js.map +1 -0
- package/dist/client/index.html +1 -1
- package/dist/index.js +219 -223
- package/package.json +5 -5
- package/dist/client/assets/react-vendor-GEfuWOcs.js.map +0 -1
package/dist/client/index.html
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
|
6
6
|
<link rel="icon" type="image/x-icon" href="/favicon.ico" />
|
|
7
7
|
<title>ElizaOS - Client</title>
|
|
8
|
-
<script type="module" crossorigin src="/assets/main-
|
|
8
|
+
<script type="module" crossorigin src="/assets/main-Da6JKS5j.js"></script>
|
|
9
9
|
</head>
|
|
10
10
|
<body>
|
|
11
11
|
<div id="root"></div>
|
package/dist/index.js
CHANGED
|
@@ -28856,7 +28856,7 @@ import express30 from "express";
|
|
|
28856
28856
|
// package.json
|
|
28857
28857
|
var package_default = {
|
|
28858
28858
|
name: "@elizaos/server",
|
|
28859
|
-
version: "1.6.2-alpha.
|
|
28859
|
+
version: "1.6.2-alpha.19",
|
|
28860
28860
|
description: "ElizaOS Server - Core server infrastructure for ElizaOS agents",
|
|
28861
28861
|
publishConfig: {
|
|
28862
28862
|
access: "public",
|
|
@@ -30413,7 +30413,7 @@ var DEBUG_BUILD = typeof __SENTRY_DEBUG__ === "undefined" || __SENTRY_DEBUG__;
|
|
|
30413
30413
|
var GLOBAL_OBJ = globalThis;
|
|
30414
30414
|
|
|
30415
30415
|
// ../../node_modules/@sentry/core/build/esm/utils/version.js
|
|
30416
|
-
var SDK_VERSION = "10.
|
|
30416
|
+
var SDK_VERSION = "10.20.0";
|
|
30417
30417
|
|
|
30418
30418
|
// ../../node_modules/@sentry/core/build/esm/carrier.js
|
|
30419
30419
|
function getMainCarrier() {
|
|
@@ -33594,40 +33594,55 @@ function applyFingerprintToEvent(event, fingerprint) {
|
|
|
33594
33594
|
|
|
33595
33595
|
// ../../node_modules/@sentry/core/build/esm/utils/debug-ids.js
|
|
33596
33596
|
var parsedStackResults;
|
|
33597
|
-
var
|
|
33597
|
+
var lastSentryKeysCount;
|
|
33598
|
+
var lastNativeKeysCount;
|
|
33598
33599
|
var cachedFilenameDebugIds;
|
|
33599
33600
|
function getFilenameToDebugIdMap(stackParser) {
|
|
33600
|
-
const
|
|
33601
|
-
|
|
33601
|
+
const sentryDebugIdMap = GLOBAL_OBJ._sentryDebugIds;
|
|
33602
|
+
const nativeDebugIdMap = GLOBAL_OBJ._debugIds;
|
|
33603
|
+
if (!sentryDebugIdMap && !nativeDebugIdMap) {
|
|
33602
33604
|
return {};
|
|
33603
33605
|
}
|
|
33604
|
-
const
|
|
33605
|
-
|
|
33606
|
+
const sentryDebugIdKeys = sentryDebugIdMap ? Object.keys(sentryDebugIdMap) : [];
|
|
33607
|
+
const nativeDebugIdKeys = nativeDebugIdMap ? Object.keys(nativeDebugIdMap) : [];
|
|
33608
|
+
if (cachedFilenameDebugIds && sentryDebugIdKeys.length === lastSentryKeysCount && nativeDebugIdKeys.length === lastNativeKeysCount) {
|
|
33606
33609
|
return cachedFilenameDebugIds;
|
|
33607
33610
|
}
|
|
33608
|
-
|
|
33609
|
-
|
|
33610
|
-
|
|
33611
|
-
|
|
33612
|
-
}
|
|
33613
|
-
|
|
33614
|
-
|
|
33615
|
-
|
|
33616
|
-
|
|
33617
|
-
const
|
|
33618
|
-
|
|
33619
|
-
|
|
33620
|
-
|
|
33621
|
-
|
|
33622
|
-
|
|
33623
|
-
|
|
33624
|
-
|
|
33625
|
-
|
|
33611
|
+
lastSentryKeysCount = sentryDebugIdKeys.length;
|
|
33612
|
+
lastNativeKeysCount = nativeDebugIdKeys.length;
|
|
33613
|
+
cachedFilenameDebugIds = {};
|
|
33614
|
+
if (!parsedStackResults) {
|
|
33615
|
+
parsedStackResults = {};
|
|
33616
|
+
}
|
|
33617
|
+
const processDebugIds = (debugIdKeys, debugIdMap) => {
|
|
33618
|
+
for (const key of debugIdKeys) {
|
|
33619
|
+
const debugId = debugIdMap[key];
|
|
33620
|
+
const result = parsedStackResults?.[key];
|
|
33621
|
+
if (result && cachedFilenameDebugIds && debugId) {
|
|
33622
|
+
cachedFilenameDebugIds[result[0]] = debugId;
|
|
33623
|
+
if (parsedStackResults) {
|
|
33624
|
+
parsedStackResults[key] = [result[0], debugId];
|
|
33625
|
+
}
|
|
33626
|
+
} else if (debugId) {
|
|
33627
|
+
const parsedStack = stackParser(key);
|
|
33628
|
+
for (let i = parsedStack.length - 1;i >= 0; i--) {
|
|
33629
|
+
const stackFrame = parsedStack[i];
|
|
33630
|
+
const filename = stackFrame?.filename;
|
|
33631
|
+
if (filename && cachedFilenameDebugIds && parsedStackResults) {
|
|
33632
|
+
cachedFilenameDebugIds[filename] = debugId;
|
|
33633
|
+
parsedStackResults[key] = [filename, debugId];
|
|
33634
|
+
break;
|
|
33635
|
+
}
|
|
33626
33636
|
}
|
|
33627
33637
|
}
|
|
33628
33638
|
}
|
|
33629
|
-
|
|
33630
|
-
|
|
33639
|
+
};
|
|
33640
|
+
if (sentryDebugIdMap) {
|
|
33641
|
+
processDebugIds(sentryDebugIdKeys, sentryDebugIdMap);
|
|
33642
|
+
}
|
|
33643
|
+
if (nativeDebugIdMap) {
|
|
33644
|
+
processDebugIds(nativeDebugIdKeys, nativeDebugIdMap);
|
|
33645
|
+
}
|
|
33631
33646
|
return cachedFilenameDebugIds;
|
|
33632
33647
|
}
|
|
33633
33648
|
|
|
@@ -33972,6 +33987,111 @@ function defineIntegration(fn) {
|
|
|
33972
33987
|
return fn;
|
|
33973
33988
|
}
|
|
33974
33989
|
|
|
33990
|
+
// ../../node_modules/@sentry/core/build/esm/utils/trace-info.js
|
|
33991
|
+
function _getTraceInfoFromScope(client, scope) {
|
|
33992
|
+
if (!scope) {
|
|
33993
|
+
return [undefined, undefined];
|
|
33994
|
+
}
|
|
33995
|
+
return withScope2(scope, () => {
|
|
33996
|
+
const span = getActiveSpan();
|
|
33997
|
+
const traceContext = span ? spanToTraceContext(span) : getTraceContextFromScope(scope);
|
|
33998
|
+
const dynamicSamplingContext = span ? getDynamicSamplingContextFromSpan(span) : getDynamicSamplingContextFromScope(client, scope);
|
|
33999
|
+
return [dynamicSamplingContext, traceContext];
|
|
34000
|
+
});
|
|
34001
|
+
}
|
|
34002
|
+
|
|
34003
|
+
// ../../node_modules/@sentry/core/build/esm/logs/envelope.js
|
|
34004
|
+
function createLogContainerEnvelopeItem(items) {
|
|
34005
|
+
return [
|
|
34006
|
+
{
|
|
34007
|
+
type: "log",
|
|
34008
|
+
item_count: items.length,
|
|
34009
|
+
content_type: "application/vnd.sentry.items.log+json"
|
|
34010
|
+
},
|
|
34011
|
+
{
|
|
34012
|
+
items
|
|
34013
|
+
}
|
|
34014
|
+
];
|
|
34015
|
+
}
|
|
34016
|
+
function createLogEnvelope(logs, metadata, tunnel, dsn) {
|
|
34017
|
+
const headers = {};
|
|
34018
|
+
if (metadata?.sdk) {
|
|
34019
|
+
headers.sdk = {
|
|
34020
|
+
name: metadata.sdk.name,
|
|
34021
|
+
version: metadata.sdk.version
|
|
34022
|
+
};
|
|
34023
|
+
}
|
|
34024
|
+
if (!!tunnel && !!dsn) {
|
|
34025
|
+
headers.dsn = dsnToString(dsn);
|
|
34026
|
+
}
|
|
34027
|
+
return createEnvelope(headers, [createLogContainerEnvelopeItem(logs)]);
|
|
34028
|
+
}
|
|
34029
|
+
|
|
34030
|
+
// ../../node_modules/@sentry/core/build/esm/logs/internal.js
|
|
34031
|
+
function _INTERNAL_flushLogsBuffer(client, maybeLogBuffer) {
|
|
34032
|
+
const logBuffer = maybeLogBuffer ?? _INTERNAL_getLogBuffer(client) ?? [];
|
|
34033
|
+
if (logBuffer.length === 0) {
|
|
34034
|
+
return;
|
|
34035
|
+
}
|
|
34036
|
+
const clientOptions = client.getOptions();
|
|
34037
|
+
const envelope = createLogEnvelope(logBuffer, clientOptions._metadata, clientOptions.tunnel, client.getDsn());
|
|
34038
|
+
_getBufferMap().set(client, []);
|
|
34039
|
+
client.emit("flushLogs");
|
|
34040
|
+
client.sendEnvelope(envelope);
|
|
34041
|
+
}
|
|
34042
|
+
function _INTERNAL_getLogBuffer(client) {
|
|
34043
|
+
return _getBufferMap().get(client);
|
|
34044
|
+
}
|
|
34045
|
+
function _getBufferMap() {
|
|
34046
|
+
return getGlobalSingleton("clientToLogBufferMap", () => new WeakMap);
|
|
34047
|
+
}
|
|
34048
|
+
|
|
34049
|
+
// ../../node_modules/@sentry/core/build/esm/metrics/envelope.js
|
|
34050
|
+
function createMetricContainerEnvelopeItem(items) {
|
|
34051
|
+
return [
|
|
34052
|
+
{
|
|
34053
|
+
type: "trace_metric",
|
|
34054
|
+
item_count: items.length,
|
|
34055
|
+
content_type: "application/vnd.sentry.items.trace-metric+json"
|
|
34056
|
+
},
|
|
34057
|
+
{
|
|
34058
|
+
items
|
|
34059
|
+
}
|
|
34060
|
+
];
|
|
34061
|
+
}
|
|
34062
|
+
function createMetricEnvelope(metrics, metadata, tunnel, dsn) {
|
|
34063
|
+
const headers = {};
|
|
34064
|
+
if (metadata?.sdk) {
|
|
34065
|
+
headers.sdk = {
|
|
34066
|
+
name: metadata.sdk.name,
|
|
34067
|
+
version: metadata.sdk.version
|
|
34068
|
+
};
|
|
34069
|
+
}
|
|
34070
|
+
if (!!tunnel && !!dsn) {
|
|
34071
|
+
headers.dsn = dsnToString(dsn);
|
|
34072
|
+
}
|
|
34073
|
+
return createEnvelope(headers, [createMetricContainerEnvelopeItem(metrics)]);
|
|
34074
|
+
}
|
|
34075
|
+
|
|
34076
|
+
// ../../node_modules/@sentry/core/build/esm/metrics/internal.js
|
|
34077
|
+
function _INTERNAL_flushMetricsBuffer(client, maybeMetricBuffer) {
|
|
34078
|
+
const metricBuffer = maybeMetricBuffer ?? _INTERNAL_getMetricBuffer(client) ?? [];
|
|
34079
|
+
if (metricBuffer.length === 0) {
|
|
34080
|
+
return;
|
|
34081
|
+
}
|
|
34082
|
+
const clientOptions = client.getOptions();
|
|
34083
|
+
const envelope = createMetricEnvelope(metricBuffer, clientOptions._metadata, clientOptions.tunnel, client.getDsn());
|
|
34084
|
+
_getBufferMap2().set(client, []);
|
|
34085
|
+
client.emit("flushMetrics");
|
|
34086
|
+
client.sendEnvelope(envelope);
|
|
34087
|
+
}
|
|
34088
|
+
function _INTERNAL_getMetricBuffer(client) {
|
|
34089
|
+
return _getBufferMap2().get(client);
|
|
34090
|
+
}
|
|
34091
|
+
function _getBufferMap2() {
|
|
34092
|
+
return getGlobalSingleton("clientToMetricBufferMap", () => new WeakMap);
|
|
34093
|
+
}
|
|
34094
|
+
|
|
33975
34095
|
// ../../node_modules/@sentry/core/build/esm/utils/clientreport.js
|
|
33976
34096
|
function createClientReportEnvelope(discarded_events, dsn, timestamp) {
|
|
33977
34097
|
const clientReportItem = [
|
|
@@ -34052,6 +34172,7 @@ var ALREADY_SEEN_ERROR = "Not capturing exception because it's already been capt
|
|
|
34052
34172
|
var MISSING_RELEASE_FOR_SESSION_ERROR = "Discarded session because of missing or non-string release";
|
|
34053
34173
|
var INTERNAL_ERROR_SYMBOL = Symbol.for("SentryInternalError");
|
|
34054
34174
|
var DO_NOT_SEND_EVENT_SYMBOL = Symbol.for("SentryDoNotSendEventError");
|
|
34175
|
+
var DEFAULT_FLUSH_INTERVAL = 5000;
|
|
34055
34176
|
function _makeInternalError(message) {
|
|
34056
34177
|
return {
|
|
34057
34178
|
message,
|
|
@@ -34070,6 +34191,28 @@ function _isInternalError(error2) {
|
|
|
34070
34191
|
function _isDoNotSendEventError(error2) {
|
|
34071
34192
|
return !!error2 && typeof error2 === "object" && DO_NOT_SEND_EVENT_SYMBOL in error2;
|
|
34072
34193
|
}
|
|
34194
|
+
function setupWeightBasedFlushing(client, afterCaptureHook, flushHook, estimateSizeFn, flushFn) {
|
|
34195
|
+
let weight = 0;
|
|
34196
|
+
let flushTimeout;
|
|
34197
|
+
client.on(flushHook, () => {
|
|
34198
|
+
weight = 0;
|
|
34199
|
+
clearTimeout(flushTimeout);
|
|
34200
|
+
});
|
|
34201
|
+
client.on(afterCaptureHook, (item) => {
|
|
34202
|
+
weight += estimateSizeFn(item);
|
|
34203
|
+
if (weight >= 800000) {
|
|
34204
|
+
flushFn(client);
|
|
34205
|
+
} else {
|
|
34206
|
+
clearTimeout(flushTimeout);
|
|
34207
|
+
flushTimeout = setTimeout(() => {
|
|
34208
|
+
flushFn(client);
|
|
34209
|
+
}, DEFAULT_FLUSH_INTERVAL);
|
|
34210
|
+
}
|
|
34211
|
+
});
|
|
34212
|
+
client.on("flush", () => {
|
|
34213
|
+
flushFn(client);
|
|
34214
|
+
});
|
|
34215
|
+
}
|
|
34073
34216
|
|
|
34074
34217
|
class Client {
|
|
34075
34218
|
constructor(options) {
|
|
@@ -34093,6 +34236,12 @@ class Client {
|
|
|
34093
34236
|
url
|
|
34094
34237
|
});
|
|
34095
34238
|
}
|
|
34239
|
+
if (this._options.enableLogs) {
|
|
34240
|
+
setupWeightBasedFlushing(this, "afterCaptureLog", "flushLogs", estimateLogSizeInBytes, _INTERNAL_flushLogsBuffer);
|
|
34241
|
+
}
|
|
34242
|
+
if (this._options._experiments?.enableMetrics) {
|
|
34243
|
+
setupWeightBasedFlushing(this, "afterCaptureMetric", "flushMetrics", estimateMetricSizeInBytes, _INTERNAL_flushMetricsBuffer);
|
|
34244
|
+
}
|
|
34096
34245
|
}
|
|
34097
34246
|
captureException(exception, hint, scope) {
|
|
34098
34247
|
const eventId = uuid4();
|
|
@@ -34534,16 +34683,50 @@ function isErrorEvent2(event) {
|
|
|
34534
34683
|
function isTransactionEvent(event) {
|
|
34535
34684
|
return event.type === "transaction";
|
|
34536
34685
|
}
|
|
34537
|
-
function
|
|
34538
|
-
|
|
34539
|
-
|
|
34686
|
+
function estimateMetricSizeInBytes(metric) {
|
|
34687
|
+
let weight = 0;
|
|
34688
|
+
if (metric.name) {
|
|
34689
|
+
weight += metric.name.length * 2;
|
|
34540
34690
|
}
|
|
34541
|
-
|
|
34542
|
-
|
|
34543
|
-
|
|
34544
|
-
|
|
34545
|
-
|
|
34691
|
+
if (typeof metric.value === "string") {
|
|
34692
|
+
weight += metric.value.length * 2;
|
|
34693
|
+
} else {
|
|
34694
|
+
weight += 8;
|
|
34695
|
+
}
|
|
34696
|
+
return weight + estimateAttributesSizeInBytes(metric.attributes);
|
|
34697
|
+
}
|
|
34698
|
+
function estimateLogSizeInBytes(log2) {
|
|
34699
|
+
let weight = 0;
|
|
34700
|
+
if (log2.message) {
|
|
34701
|
+
weight += log2.message.length * 2;
|
|
34702
|
+
}
|
|
34703
|
+
return weight + estimateAttributesSizeInBytes(log2.attributes);
|
|
34704
|
+
}
|
|
34705
|
+
function estimateAttributesSizeInBytes(attributes) {
|
|
34706
|
+
if (!attributes) {
|
|
34707
|
+
return 0;
|
|
34708
|
+
}
|
|
34709
|
+
let weight = 0;
|
|
34710
|
+
Object.values(attributes).forEach((value) => {
|
|
34711
|
+
if (Array.isArray(value)) {
|
|
34712
|
+
weight += value.length * estimatePrimitiveSizeInBytes(value[0]);
|
|
34713
|
+
} else if (isPrimitive(value)) {
|
|
34714
|
+
weight += estimatePrimitiveSizeInBytes(value);
|
|
34715
|
+
} else {
|
|
34716
|
+
weight += 100;
|
|
34717
|
+
}
|
|
34546
34718
|
});
|
|
34719
|
+
return weight;
|
|
34720
|
+
}
|
|
34721
|
+
function estimatePrimitiveSizeInBytes(value) {
|
|
34722
|
+
if (typeof value === "string") {
|
|
34723
|
+
return value.length * 2;
|
|
34724
|
+
} else if (typeof value === "number") {
|
|
34725
|
+
return 8;
|
|
34726
|
+
} else if (typeof value === "boolean") {
|
|
34727
|
+
return 4;
|
|
34728
|
+
}
|
|
34729
|
+
return 0;
|
|
34547
34730
|
}
|
|
34548
34731
|
|
|
34549
34732
|
// ../../node_modules/@sentry/core/build/esm/checkin.js
|
|
@@ -34573,98 +34756,6 @@ function createCheckInEnvelopeItem(checkIn) {
|
|
|
34573
34756
|
return [checkInHeaders, checkIn];
|
|
34574
34757
|
}
|
|
34575
34758
|
|
|
34576
|
-
// ../../node_modules/@sentry/core/build/esm/logs/envelope.js
|
|
34577
|
-
function createLogContainerEnvelopeItem(items) {
|
|
34578
|
-
return [
|
|
34579
|
-
{
|
|
34580
|
-
type: "log",
|
|
34581
|
-
item_count: items.length,
|
|
34582
|
-
content_type: "application/vnd.sentry.items.log+json"
|
|
34583
|
-
},
|
|
34584
|
-
{
|
|
34585
|
-
items
|
|
34586
|
-
}
|
|
34587
|
-
];
|
|
34588
|
-
}
|
|
34589
|
-
function createLogEnvelope(logs, metadata, tunnel, dsn) {
|
|
34590
|
-
const headers = {};
|
|
34591
|
-
if (metadata?.sdk) {
|
|
34592
|
-
headers.sdk = {
|
|
34593
|
-
name: metadata.sdk.name,
|
|
34594
|
-
version: metadata.sdk.version
|
|
34595
|
-
};
|
|
34596
|
-
}
|
|
34597
|
-
if (!!tunnel && !!dsn) {
|
|
34598
|
-
headers.dsn = dsnToString(dsn);
|
|
34599
|
-
}
|
|
34600
|
-
return createEnvelope(headers, [createLogContainerEnvelopeItem(logs)]);
|
|
34601
|
-
}
|
|
34602
|
-
|
|
34603
|
-
// ../../node_modules/@sentry/core/build/esm/logs/internal.js
|
|
34604
|
-
function _INTERNAL_flushLogsBuffer(client, maybeLogBuffer) {
|
|
34605
|
-
const logBuffer = maybeLogBuffer ?? _INTERNAL_getLogBuffer(client) ?? [];
|
|
34606
|
-
if (logBuffer.length === 0) {
|
|
34607
|
-
return;
|
|
34608
|
-
}
|
|
34609
|
-
const clientOptions = client.getOptions();
|
|
34610
|
-
const envelope = createLogEnvelope(logBuffer, clientOptions._metadata, clientOptions.tunnel, client.getDsn());
|
|
34611
|
-
_getBufferMap().set(client, []);
|
|
34612
|
-
client.emit("flushLogs");
|
|
34613
|
-
client.sendEnvelope(envelope);
|
|
34614
|
-
}
|
|
34615
|
-
function _INTERNAL_getLogBuffer(client) {
|
|
34616
|
-
return _getBufferMap().get(client);
|
|
34617
|
-
}
|
|
34618
|
-
function _getBufferMap() {
|
|
34619
|
-
return getGlobalSingleton("clientToLogBufferMap", () => new WeakMap);
|
|
34620
|
-
}
|
|
34621
|
-
|
|
34622
|
-
// ../../node_modules/@sentry/core/build/esm/metrics/envelope.js
|
|
34623
|
-
function createMetricContainerEnvelopeItem(items) {
|
|
34624
|
-
return [
|
|
34625
|
-
{
|
|
34626
|
-
type: "trace_metric",
|
|
34627
|
-
item_count: items.length,
|
|
34628
|
-
content_type: "application/vnd.sentry.items.trace-metric+json"
|
|
34629
|
-
},
|
|
34630
|
-
{
|
|
34631
|
-
items
|
|
34632
|
-
}
|
|
34633
|
-
];
|
|
34634
|
-
}
|
|
34635
|
-
function createMetricEnvelope(metrics, metadata, tunnel, dsn) {
|
|
34636
|
-
const headers = {};
|
|
34637
|
-
if (metadata?.sdk) {
|
|
34638
|
-
headers.sdk = {
|
|
34639
|
-
name: metadata.sdk.name,
|
|
34640
|
-
version: metadata.sdk.version
|
|
34641
|
-
};
|
|
34642
|
-
}
|
|
34643
|
-
if (!!tunnel && !!dsn) {
|
|
34644
|
-
headers.dsn = dsnToString(dsn);
|
|
34645
|
-
}
|
|
34646
|
-
return createEnvelope(headers, [createMetricContainerEnvelopeItem(metrics)]);
|
|
34647
|
-
}
|
|
34648
|
-
|
|
34649
|
-
// ../../node_modules/@sentry/core/build/esm/metrics/internal.js
|
|
34650
|
-
function _INTERNAL_flushMetricsBuffer(client, maybeMetricBuffer) {
|
|
34651
|
-
const metricBuffer = maybeMetricBuffer ?? _INTERNAL_getMetricBuffer(client) ?? [];
|
|
34652
|
-
if (metricBuffer.length === 0) {
|
|
34653
|
-
return;
|
|
34654
|
-
}
|
|
34655
|
-
const clientOptions = client.getOptions();
|
|
34656
|
-
const envelope = createMetricEnvelope(metricBuffer, clientOptions._metadata, clientOptions.tunnel, client.getDsn());
|
|
34657
|
-
_getBufferMap2().set(client, []);
|
|
34658
|
-
client.emit("flushMetrics");
|
|
34659
|
-
client.sendEnvelope(envelope);
|
|
34660
|
-
}
|
|
34661
|
-
function _INTERNAL_getMetricBuffer(client) {
|
|
34662
|
-
return _getBufferMap2().get(client);
|
|
34663
|
-
}
|
|
34664
|
-
function _getBufferMap2() {
|
|
34665
|
-
return getGlobalSingleton("clientToMetricBufferMap", () => new WeakMap);
|
|
34666
|
-
}
|
|
34667
|
-
|
|
34668
34759
|
// ../../node_modules/@sentry/core/build/esm/utils/eventbuilder.js
|
|
34669
34760
|
function parseStackFrames(stackParser, error2) {
|
|
34670
34761
|
return stackParser(error2.stack || "", 1);
|
|
@@ -34789,54 +34880,10 @@ function eventFromMessage(stackParser, message, level = "info", hint, attachStac
|
|
|
34789
34880
|
}
|
|
34790
34881
|
|
|
34791
34882
|
// ../../node_modules/@sentry/core/build/esm/server-runtime-client.js
|
|
34792
|
-
var DEFAULT_LOG_FLUSH_INTERVAL = 5000;
|
|
34793
|
-
|
|
34794
34883
|
class ServerRuntimeClient extends Client {
|
|
34795
34884
|
constructor(options) {
|
|
34796
34885
|
registerSpanErrorInstrumentation();
|
|
34797
34886
|
super(options);
|
|
34798
|
-
this._logWeight = 0;
|
|
34799
|
-
this._metricWeight = 0;
|
|
34800
|
-
if (this._options.enableLogs) {
|
|
34801
|
-
const client = this;
|
|
34802
|
-
client.on("flushLogs", () => {
|
|
34803
|
-
client._logWeight = 0;
|
|
34804
|
-
clearTimeout(client._logFlushIdleTimeout);
|
|
34805
|
-
});
|
|
34806
|
-
client.on("afterCaptureLog", (log2) => {
|
|
34807
|
-
client._logWeight += estimateLogSizeInBytes(log2);
|
|
34808
|
-
if (client._logWeight >= 800000) {
|
|
34809
|
-
_INTERNAL_flushLogsBuffer(client);
|
|
34810
|
-
} else {
|
|
34811
|
-
client._logFlushIdleTimeout = setTimeout(() => {
|
|
34812
|
-
_INTERNAL_flushLogsBuffer(client);
|
|
34813
|
-
}, DEFAULT_LOG_FLUSH_INTERVAL);
|
|
34814
|
-
}
|
|
34815
|
-
});
|
|
34816
|
-
client.on("flush", () => {
|
|
34817
|
-
_INTERNAL_flushLogsBuffer(client);
|
|
34818
|
-
});
|
|
34819
|
-
}
|
|
34820
|
-
if (this._options._experiments?.enableMetrics) {
|
|
34821
|
-
const client = this;
|
|
34822
|
-
client.on("flushMetrics", () => {
|
|
34823
|
-
client._metricWeight = 0;
|
|
34824
|
-
clearTimeout(client._metricFlushIdleTimeout);
|
|
34825
|
-
});
|
|
34826
|
-
client.on("afterCaptureMetric", (metric) => {
|
|
34827
|
-
client._metricWeight += estimateMetricSizeInBytes(metric);
|
|
34828
|
-
if (client._metricWeight >= 800000) {
|
|
34829
|
-
_INTERNAL_flushMetricsBuffer(client);
|
|
34830
|
-
} else {
|
|
34831
|
-
client._metricFlushIdleTimeout = setTimeout(() => {
|
|
34832
|
-
_INTERNAL_flushMetricsBuffer(client);
|
|
34833
|
-
}, DEFAULT_LOG_FLUSH_INTERVAL);
|
|
34834
|
-
}
|
|
34835
|
-
});
|
|
34836
|
-
client.on("flush", () => {
|
|
34837
|
-
_INTERNAL_flushMetricsBuffer(client);
|
|
34838
|
-
});
|
|
34839
|
-
}
|
|
34840
34887
|
}
|
|
34841
34888
|
eventFromException(exception, hint) {
|
|
34842
34889
|
const event = eventFromUnknownInput(this, this._options.stackParser, exception, hint);
|
|
@@ -34923,57 +34970,6 @@ function setCurrentRequestSessionErroredOrCrashed(eventHint) {
|
|
|
34923
34970
|
}
|
|
34924
34971
|
}
|
|
34925
34972
|
}
|
|
34926
|
-
function estimateMetricSizeInBytes(metric) {
|
|
34927
|
-
let weight = 0;
|
|
34928
|
-
if (metric.name) {
|
|
34929
|
-
weight += metric.name.length * 2;
|
|
34930
|
-
}
|
|
34931
|
-
if (typeof metric.value === "string") {
|
|
34932
|
-
weight += metric.value.length * 2;
|
|
34933
|
-
} else {
|
|
34934
|
-
weight += 8;
|
|
34935
|
-
}
|
|
34936
|
-
if (metric.attributes) {
|
|
34937
|
-
Object.values(metric.attributes).forEach((value) => {
|
|
34938
|
-
if (Array.isArray(value)) {
|
|
34939
|
-
weight += value.length * estimatePrimitiveSizeInBytes(value[0]);
|
|
34940
|
-
} else if (isPrimitive(value)) {
|
|
34941
|
-
weight += estimatePrimitiveSizeInBytes(value);
|
|
34942
|
-
} else {
|
|
34943
|
-
weight += 100;
|
|
34944
|
-
}
|
|
34945
|
-
});
|
|
34946
|
-
}
|
|
34947
|
-
return weight;
|
|
34948
|
-
}
|
|
34949
|
-
function estimateLogSizeInBytes(log2) {
|
|
34950
|
-
let weight = 0;
|
|
34951
|
-
if (log2.message) {
|
|
34952
|
-
weight += log2.message.length * 2;
|
|
34953
|
-
}
|
|
34954
|
-
if (log2.attributes) {
|
|
34955
|
-
Object.values(log2.attributes).forEach((value) => {
|
|
34956
|
-
if (Array.isArray(value)) {
|
|
34957
|
-
weight += value.length * estimatePrimitiveSizeInBytes(value[0]);
|
|
34958
|
-
} else if (isPrimitive(value)) {
|
|
34959
|
-
weight += estimatePrimitiveSizeInBytes(value);
|
|
34960
|
-
} else {
|
|
34961
|
-
weight += 100;
|
|
34962
|
-
}
|
|
34963
|
-
});
|
|
34964
|
-
}
|
|
34965
|
-
return weight;
|
|
34966
|
-
}
|
|
34967
|
-
function estimatePrimitiveSizeInBytes(value) {
|
|
34968
|
-
if (typeof value === "string") {
|
|
34969
|
-
return value.length * 2;
|
|
34970
|
-
} else if (typeof value === "number") {
|
|
34971
|
-
return 8;
|
|
34972
|
-
} else if (typeof value === "boolean") {
|
|
34973
|
-
return 4;
|
|
34974
|
-
}
|
|
34975
|
-
return 0;
|
|
34976
|
-
}
|
|
34977
34973
|
// ../../node_modules/@sentry/core/build/esm/utils/promisebuffer.js
|
|
34978
34974
|
var SENTRY_BUFFER_FULL_ERROR = Symbol.for("SentryBufferFullError");
|
|
34979
34975
|
function makePromiseBuffer(limit = 100) {
|
|
@@ -40345,7 +40341,7 @@ function functionNamesMatch(a, b) {
|
|
|
40345
40341
|
}
|
|
40346
40342
|
|
|
40347
40343
|
// ../../node_modules/@sentry/node-core/build/esm/integrations/local-variables/local-variables-async.js
|
|
40348
|
-
var base64WorkerScript = "
|
|
40344
|
+
var base64WorkerScript = "LyohIEBzZW50cnkvbm9kZS1jb3JlIDEwLjIwLjAgKGIzYzcxNDEpIHwgaHR0cHM6Ly9naXRodWIuY29tL2dldHNlbnRyeS9zZW50cnktamF2YXNjcmlwdCAqLwppbXBvcnR7U2Vzc2lvbiBhcyBlfWZyb20ibm9kZTppbnNwZWN0b3IvcHJvbWlzZXMiO2ltcG9ydHt3b3JrZXJEYXRhIGFzIHR9ZnJvbSJub2RlOndvcmtlcl90aHJlYWRzIjtjb25zdCBuPWdsb2JhbFRoaXMsaT17fTtjb25zdCBvPSJfX1NFTlRSWV9FUlJPUl9MT0NBTF9WQVJJQUJMRVNfXyI7Y29uc3QgYT10O2Z1bmN0aW9uIHMoLi4uZSl7YS5kZWJ1ZyYmZnVuY3Rpb24oZSl7aWYoISgiY29uc29sZSJpbiBuKSlyZXR1cm4gZSgpO2NvbnN0IHQ9bi5jb25zb2xlLG89e30sYT1PYmplY3Qua2V5cyhpKTthLmZvckVhY2goZT0+e2NvbnN0IG49aVtlXTtvW2VdPXRbZV0sdFtlXT1ufSk7dHJ5e3JldHVybiBlKCl9ZmluYWxseXthLmZvckVhY2goZT0+e3RbZV09b1tlXX0pfX0oKCk9PmNvbnNvbGUubG9nKCJbTG9jYWxWYXJpYWJsZXMgV29ya2VyXSIsLi4uZSkpfWFzeW5jIGZ1bmN0aW9uI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Wl0IGV4Y2VlZGVkLiBEaXNhYmxpbmcgY2FwdHVyaW5nIG9mIGNhdWdodCBleGNlcHRpb25zIGZvciAke2V9IHNlY29uZHMuYCksYXdhaXQgdC5wb3N0KCJEZWJ1Z2dlci5zZXRQYXVzZU9uRXhjZXB0aW9ucyIse3N0YXRlOiJ1bmNhdWdodCJ9KX0pfX0pKCkuY2F0Y2goZT0+e3MoIkZhaWxlZCB0byBzdGFydCBkZWJ1Z2dlciIsZSl9KSxzZXRJbnRlcnZhbCgoKT0+e30sMWU0KTs=";
|
|
40349
40345
|
function log2(...args) {
|
|
40350
40346
|
debug.log("[LocalVariables]", ...args);
|
|
40351
40347
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@elizaos/server",
|
|
3
|
-
"version": "1.6.2-alpha.
|
|
3
|
+
"version": "1.6.2-alpha.19",
|
|
4
4
|
"description": "ElizaOS Server - Core server infrastructure for ElizaOS agents",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"access": "public",
|
|
@@ -44,7 +44,7 @@
|
|
|
44
44
|
"dev": "bun run build.ts --watch"
|
|
45
45
|
},
|
|
46
46
|
"devDependencies": {
|
|
47
|
-
"@elizaos/client": "1.6.2-alpha.
|
|
47
|
+
"@elizaos/client": "1.6.2-alpha.19",
|
|
48
48
|
"@types/node": "^24.0.1",
|
|
49
49
|
"prettier": "3.6.2",
|
|
50
50
|
"tsx": "4.20.6",
|
|
@@ -52,10 +52,10 @@
|
|
|
52
52
|
"which": "^5.0.0",
|
|
53
53
|
"ws": "^8.18.0"
|
|
54
54
|
},
|
|
55
|
-
"gitHead": "
|
|
55
|
+
"gitHead": "8a3177f8e189bfebccbe54d4c1dcf756cc4d1c72",
|
|
56
56
|
"dependencies": {
|
|
57
|
-
"@elizaos/core": "1.6.2-alpha.
|
|
58
|
-
"@elizaos/plugin-sql": "1.6.2-alpha.
|
|
57
|
+
"@elizaos/core": "1.6.2-alpha.19",
|
|
58
|
+
"@elizaos/plugin-sql": "1.6.2-alpha.19",
|
|
59
59
|
"@sentry/node": "^10.16.0",
|
|
60
60
|
"@types/express": "^5.0.2",
|
|
61
61
|
"@types/helmet": "^4.0.0",
|