@elizaos/server 1.2.1 → 1.2.2
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/{index-L_LUe3H2.js → index-CSGjxUG_.js} +371 -194
- package/dist/client/assets/index-CSGjxUG_.js.br +0 -0
- package/dist/client/assets/{index-L_LUe3H2.js.map → index-CSGjxUG_.js.map} +1 -1
- package/dist/client/assets/index-CuhlDCnv.css +1 -0
- package/dist/client/assets/index-CuhlDCnv.css.br +0 -0
- package/dist/client/assets/{index-BGTKVdHh.js → index-DS--BeyD.js} +2 -2
- package/dist/client/assets/index-DS--BeyD.js.br +0 -0
- package/dist/client/assets/{index-BGTKVdHh.js.map → index-DS--BeyD.js.map} +1 -1
- package/dist/client/index.html +2 -2
- package/dist/index.js +4 -4
- package/dist/index.js.map +1 -1
- package/package.json +4 -4
- package/dist/client/assets/index-BGTKVdHh.js.br +0 -0
- package/dist/client/assets/index-L_LUe3H2.js.br +0 -0
- package/dist/client/assets/index-UDF1h0cx.css +0 -1
- package/dist/client/assets/index-UDF1h0cx.css.br +0 -0
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/index-
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/index-DS--BeyD.js","assets/vendor-Dp9Dttv5.js"])))=>i.map(i=>d[i]);
|
|
2
2
|
import { r as requireReact, a as requireReactDom, d as distExports, b as reactExports, g as getDefaultExportFromCjs, c as reactDomExports, R as React, e as ReactDOM, f as React$1, h as requireBufferPolyfill, i as requireBase64Js, u as useNavigate, j as useLocation, N as NavLink, k as useParams, L as Link, l as useSearchParams, B as BrowserRouter, m as Routes, n as Route } from './vendor-Dp9Dttv5.js';
|
|
3
3
|
|
|
4
4
|
true &&(function polyfill() {
|
|
@@ -23697,7 +23697,8 @@ var QueryObserver = class extends Subscribable {
|
|
|
23697
23697
|
isRefetchError: isError && hasData,
|
|
23698
23698
|
isStale: isStale(query, options),
|
|
23699
23699
|
refetch: this.refetch,
|
|
23700
|
-
promise: this.#currentThenable
|
|
23700
|
+
promise: this.#currentThenable,
|
|
23701
|
+
isEnabled: resolveEnabled(options.enabled, query) !== false
|
|
23701
23702
|
};
|
|
23702
23703
|
const nextResult = result;
|
|
23703
23704
|
if (this.options.experimental_prefetchInRender) {
|
|
@@ -29205,12 +29206,12 @@ function require_if () {
|
|
|
29205
29206
|
return _if.exports;
|
|
29206
29207
|
}
|
|
29207
29208
|
|
|
29208
|
-
var log$
|
|
29209
|
+
var log$3 = {exports: {}};
|
|
29209
29210
|
|
|
29210
29211
|
var hasRequiredLog;
|
|
29211
29212
|
|
|
29212
29213
|
function requireLog () {
|
|
29213
|
-
if (hasRequiredLog) return log$
|
|
29214
|
+
if (hasRequiredLog) return log$3.exports;
|
|
29214
29215
|
hasRequiredLog = 1;
|
|
29215
29216
|
(function (module, exports) {
|
|
29216
29217
|
|
|
@@ -29238,8 +29239,8 @@ function requireLog () {
|
|
|
29238
29239
|
|
|
29239
29240
|
module.exports = exports['default'];
|
|
29240
29241
|
|
|
29241
|
-
} (log$
|
|
29242
|
-
return log$
|
|
29242
|
+
} (log$3, log$3.exports));
|
|
29243
|
+
return log$3.exports;
|
|
29243
29244
|
}
|
|
29244
29245
|
|
|
29245
29246
|
var lookup$2 = {exports: {}};
|
|
@@ -93050,7 +93051,7 @@ const GLOBAL_OBJ = globalThis;
|
|
|
93050
93051
|
|
|
93051
93052
|
// This is a magic string replaced by rollup
|
|
93052
93053
|
|
|
93053
|
-
const SDK_VERSION = "9.
|
|
93054
|
+
const SDK_VERSION = "9.38.0" ;
|
|
93054
93055
|
|
|
93055
93056
|
function getMainCarrier() {
|
|
93056
93057
|
getSentryCarrier(GLOBAL_OBJ);
|
|
@@ -93067,8 +93068,7 @@ function getGlobalSingleton(name, creator, obj = GLOBAL_OBJ) {
|
|
|
93067
93068
|
return carrier[name] || (carrier[name] = creator());
|
|
93068
93069
|
}
|
|
93069
93070
|
|
|
93070
|
-
/**
|
|
93071
|
-
const PREFIX = 'Sentry Logger ';
|
|
93071
|
+
/** A Sentry Logger instance. */
|
|
93072
93072
|
|
|
93073
93073
|
const CONSOLE_LEVELS = [
|
|
93074
93074
|
'debug',
|
|
@@ -93080,13 +93080,14 @@ const CONSOLE_LEVELS = [
|
|
|
93080
93080
|
'trace',
|
|
93081
93081
|
] ;
|
|
93082
93082
|
|
|
93083
|
+
/** Prefix for logging strings */
|
|
93084
|
+
const PREFIX = 'Sentry Logger ';
|
|
93085
|
+
|
|
93083
93086
|
/** This may be mutated by the console instrumentation. */
|
|
93084
93087
|
const originalConsoleMethods
|
|
93085
93088
|
|
|
93086
93089
|
= {};
|
|
93087
93090
|
|
|
93088
|
-
/** A Sentry Logger instance. */
|
|
93089
|
-
|
|
93090
93091
|
/**
|
|
93091
93092
|
* Temporarily disable sentry console instrumentations.
|
|
93092
93093
|
*
|
|
@@ -93105,9 +93106,9 @@ function consoleSandbox(callback) {
|
|
|
93105
93106
|
|
|
93106
93107
|
// Restore all wrapped console methods
|
|
93107
93108
|
wrappedLevels.forEach(level => {
|
|
93108
|
-
const originalConsoleMethod = originalConsoleMethods[level]
|
|
93109
|
+
const originalConsoleMethod = originalConsoleMethods[level];
|
|
93109
93110
|
wrappedFuncs[level] = console[level] ;
|
|
93110
|
-
console[level] = originalConsoleMethod;
|
|
93111
|
+
console[level] = originalConsoleMethod ;
|
|
93111
93112
|
});
|
|
93112
93113
|
|
|
93113
93114
|
try {
|
|
@@ -93120,42 +93121,110 @@ function consoleSandbox(callback) {
|
|
|
93120
93121
|
}
|
|
93121
93122
|
}
|
|
93122
93123
|
|
|
93123
|
-
function
|
|
93124
|
-
|
|
93125
|
-
|
|
93126
|
-
enable: () => {
|
|
93127
|
-
enabled = true;
|
|
93128
|
-
},
|
|
93129
|
-
disable: () => {
|
|
93130
|
-
enabled = false;
|
|
93131
|
-
},
|
|
93132
|
-
isEnabled: () => enabled,
|
|
93133
|
-
};
|
|
93124
|
+
function enable() {
|
|
93125
|
+
_getLoggerSettings().enabled = true;
|
|
93126
|
+
}
|
|
93134
93127
|
|
|
93135
|
-
|
|
93136
|
-
|
|
93137
|
-
|
|
93138
|
-
|
|
93139
|
-
|
|
93140
|
-
|
|
93141
|
-
|
|
93142
|
-
|
|
93143
|
-
|
|
93144
|
-
|
|
93145
|
-
|
|
93146
|
-
|
|
93147
|
-
|
|
93128
|
+
function disable$1() {
|
|
93129
|
+
_getLoggerSettings().enabled = false;
|
|
93130
|
+
}
|
|
93131
|
+
|
|
93132
|
+
function isEnabled() {
|
|
93133
|
+
return _getLoggerSettings().enabled;
|
|
93134
|
+
}
|
|
93135
|
+
|
|
93136
|
+
function log$2(...args) {
|
|
93137
|
+
_maybeLog('log', ...args);
|
|
93138
|
+
}
|
|
93139
|
+
|
|
93140
|
+
function info(...args) {
|
|
93141
|
+
_maybeLog('info', ...args);
|
|
93142
|
+
}
|
|
93143
|
+
|
|
93144
|
+
function warn(...args) {
|
|
93145
|
+
_maybeLog('warn', ...args);
|
|
93146
|
+
}
|
|
93147
|
+
|
|
93148
|
+
function error(...args) {
|
|
93149
|
+
_maybeLog('error', ...args);
|
|
93150
|
+
}
|
|
93151
|
+
|
|
93152
|
+
function _debug(...args) {
|
|
93153
|
+
_maybeLog('debug', ...args);
|
|
93154
|
+
}
|
|
93155
|
+
|
|
93156
|
+
function assert$2(...args) {
|
|
93157
|
+
_maybeLog('assert', ...args);
|
|
93158
|
+
}
|
|
93159
|
+
|
|
93160
|
+
function trace(...args) {
|
|
93161
|
+
_maybeLog('trace', ...args);
|
|
93162
|
+
}
|
|
93163
|
+
|
|
93164
|
+
function _maybeLog(level, ...args) {
|
|
93165
|
+
if (!DEBUG_BUILD$2) {
|
|
93166
|
+
return;
|
|
93167
|
+
}
|
|
93168
|
+
|
|
93169
|
+
if (isEnabled()) {
|
|
93170
|
+
consoleSandbox(() => {
|
|
93171
|
+
GLOBAL_OBJ.console[level](`${PREFIX}[${level}]:`, ...args);
|
|
93148
93172
|
});
|
|
93149
93173
|
}
|
|
93174
|
+
}
|
|
93150
93175
|
|
|
93151
|
-
|
|
93176
|
+
function _getLoggerSettings() {
|
|
93177
|
+
if (!DEBUG_BUILD$2) {
|
|
93178
|
+
return { enabled: false };
|
|
93179
|
+
}
|
|
93180
|
+
|
|
93181
|
+
return getGlobalSingleton('loggerSettings', () => ({ enabled: false }));
|
|
93152
93182
|
}
|
|
93153
93183
|
|
|
93154
93184
|
/**
|
|
93155
93185
|
* This is a logger singleton which either logs things or no-ops if logging is not enabled.
|
|
93156
93186
|
* The logger is a singleton on the carrier, to ensure that a consistent logger is used throughout the SDK.
|
|
93157
93187
|
*/
|
|
93158
|
-
const logger$1 =
|
|
93188
|
+
const logger$1 = {
|
|
93189
|
+
/** Enable logging. */
|
|
93190
|
+
enable,
|
|
93191
|
+
/** Disable logging. */
|
|
93192
|
+
disable: disable$1,
|
|
93193
|
+
/** Check if logging is enabled. */
|
|
93194
|
+
isEnabled,
|
|
93195
|
+
/** Log a message. */
|
|
93196
|
+
log: log$2,
|
|
93197
|
+
/** Log level info */
|
|
93198
|
+
info,
|
|
93199
|
+
/** Log a warning. */
|
|
93200
|
+
warn,
|
|
93201
|
+
/** Log an error. */
|
|
93202
|
+
error,
|
|
93203
|
+
/** Log a debug message. */
|
|
93204
|
+
debug: _debug,
|
|
93205
|
+
/** Log an assertion. */
|
|
93206
|
+
assert: assert$2,
|
|
93207
|
+
/** Log a trace. */
|
|
93208
|
+
trace,
|
|
93209
|
+
} ;
|
|
93210
|
+
|
|
93211
|
+
/**
|
|
93212
|
+
* This is a logger singleton which either logs things or no-ops if logging is not enabled.
|
|
93213
|
+
*/
|
|
93214
|
+
const debug = {
|
|
93215
|
+
/** Enable logging. */
|
|
93216
|
+
enable,
|
|
93217
|
+
/** Disable logging. */
|
|
93218
|
+
disable: disable$1,
|
|
93219
|
+
/** Check if logging is enabled. */
|
|
93220
|
+
isEnabled,
|
|
93221
|
+
/** Log a message. */
|
|
93222
|
+
log: log$2,
|
|
93223
|
+
/** Log a warning. */
|
|
93224
|
+
warn,
|
|
93225
|
+
/** Log an error. */
|
|
93226
|
+
error,
|
|
93227
|
+
} ;
|
|
93159
93228
|
|
|
93160
93229
|
const STACKTRACE_FRAME_LIMIT = 50;
|
|
93161
93230
|
const UNKNOWN_FUNCTION = '?';
|
|
@@ -93332,7 +93401,7 @@ function maybeInstrument(type, instrumentFn) {
|
|
|
93332
93401
|
try {
|
|
93333
93402
|
instrumentFn();
|
|
93334
93403
|
} catch (e) {
|
|
93335
|
-
DEBUG_BUILD$2 &&
|
|
93404
|
+
DEBUG_BUILD$2 && debug.error(`Error while instrumenting ${type}`, e);
|
|
93336
93405
|
}
|
|
93337
93406
|
}
|
|
93338
93407
|
}
|
|
@@ -93345,7 +93414,7 @@ function triggerHandlers(type, data) {
|
|
|
93345
93414
|
try {
|
|
93346
93415
|
handler(data);
|
|
93347
93416
|
} catch (e) {
|
|
93348
|
-
DEBUG_BUILD$2 &&
|
|
93417
|
+
DEBUG_BUILD$2 && debug.error(
|
|
93349
93418
|
`Error while triggering instrumentation handler.
|
|
93350
93419
|
Type: ${type}
|
|
93351
93420
|
Name: ${getFunctionName(handler)}
|
|
@@ -93900,7 +93969,7 @@ function fill(source, name, replacementFactory) {
|
|
|
93900
93969
|
try {
|
|
93901
93970
|
source[name] = wrapped;
|
|
93902
93971
|
} catch {
|
|
93903
|
-
DEBUG_BUILD$2 &&
|
|
93972
|
+
DEBUG_BUILD$2 && debug.log(`Failed to replace method "${name}" in object`, source);
|
|
93904
93973
|
}
|
|
93905
93974
|
}
|
|
93906
93975
|
|
|
@@ -93920,7 +93989,7 @@ function addNonEnumerableProperty(obj, name, value) {
|
|
|
93920
93989
|
configurable: true,
|
|
93921
93990
|
});
|
|
93922
93991
|
} catch (o_O) {
|
|
93923
|
-
DEBUG_BUILD$2 &&
|
|
93992
|
+
DEBUG_BUILD$2 && debug.log(`Failed to add non-enumerable property "${name}" to object`, obj);
|
|
93924
93993
|
}
|
|
93925
93994
|
}
|
|
93926
93995
|
|
|
@@ -94153,14 +94222,13 @@ function dateTimestampInSeconds() {
|
|
|
94153
94222
|
*/
|
|
94154
94223
|
function createUnixTimestampInSecondsFunc() {
|
|
94155
94224
|
const { performance } = GLOBAL_OBJ ;
|
|
94156
|
-
|
|
94225
|
+
// Some browser and environments don't have a performance or timeOrigin, so we fallback to
|
|
94226
|
+
// using Date.now() to compute the starting time.
|
|
94227
|
+
if (!performance?.now || !performance.timeOrigin) {
|
|
94157
94228
|
return dateTimestampInSeconds;
|
|
94158
94229
|
}
|
|
94159
94230
|
|
|
94160
|
-
|
|
94161
|
-
// using Date.now() to compute the starting time.
|
|
94162
|
-
const approxStartingTimeOrigin = Date.now() - performance.now();
|
|
94163
|
-
const timeOrigin = performance.timeOrigin == undefined ? approxStartingTimeOrigin : performance.timeOrigin;
|
|
94231
|
+
const timeOrigin = performance.timeOrigin;
|
|
94164
94232
|
|
|
94165
94233
|
// performance.now() is a monotonic clock, which means it starts at 0 when the process begins. To get the current
|
|
94166
94234
|
// wall clock time (actual UNIX timestamp), we need to add the starting time origin and the current time elapsed.
|
|
@@ -94176,6 +94244,8 @@ function createUnixTimestampInSecondsFunc() {
|
|
|
94176
94244
|
};
|
|
94177
94245
|
}
|
|
94178
94246
|
|
|
94247
|
+
let _cachedTimestampInSeconds;
|
|
94248
|
+
|
|
94179
94249
|
/**
|
|
94180
94250
|
* Returns a timestamp in seconds since the UNIX epoch using either the Performance or Date APIs, depending on the
|
|
94181
94251
|
* availability of the Performance API.
|
|
@@ -94185,7 +94255,11 @@ function createUnixTimestampInSecondsFunc() {
|
|
|
94185
94255
|
* skew can grow to arbitrary amounts like days, weeks or months.
|
|
94186
94256
|
* See https://github.com/getsentry/sentry-javascript/issues/2590.
|
|
94187
94257
|
*/
|
|
94188
|
-
|
|
94258
|
+
function timestampInSeconds() {
|
|
94259
|
+
// We store this in a closure so that we don't have to create a new function every time this is called.
|
|
94260
|
+
const func = _cachedTimestampInSeconds ?? (_cachedTimestampInSeconds = createUnixTimestampInSecondsFunc());
|
|
94261
|
+
return func();
|
|
94262
|
+
}
|
|
94189
94263
|
|
|
94190
94264
|
/**
|
|
94191
94265
|
* Creates a new `Session` object by setting certain default parameters. If optional @param context
|
|
@@ -94800,7 +94874,7 @@ let Scope$1 = class Scope {
|
|
|
94800
94874
|
captureException(exception, hint) {
|
|
94801
94875
|
const eventId = hint?.event_id || uuid4();
|
|
94802
94876
|
if (!this._client) {
|
|
94803
|
-
|
|
94877
|
+
DEBUG_BUILD$2 && debug.warn("No client configured on scope - will not capture exception!");
|
|
94804
94878
|
return eventId;
|
|
94805
94879
|
}
|
|
94806
94880
|
const syntheticException = new Error("Sentry syntheticException");
|
|
@@ -94824,7 +94898,7 @@ let Scope$1 = class Scope {
|
|
|
94824
94898
|
captureMessage(message, level, hint) {
|
|
94825
94899
|
const eventId = hint?.event_id || uuid4();
|
|
94826
94900
|
if (!this._client) {
|
|
94827
|
-
|
|
94901
|
+
DEBUG_BUILD$2 && debug.warn("No client configured on scope - will not capture message!");
|
|
94828
94902
|
return eventId;
|
|
94829
94903
|
}
|
|
94830
94904
|
const syntheticException = new Error(message);
|
|
@@ -94849,7 +94923,7 @@ let Scope$1 = class Scope {
|
|
|
94849
94923
|
captureEvent(event, hint) {
|
|
94850
94924
|
const eventId = hint?.event_id || uuid4();
|
|
94851
94925
|
if (!this._client) {
|
|
94852
|
-
|
|
94926
|
+
DEBUG_BUILD$2 && debug.warn("No client configured on scope - will not capture event!");
|
|
94853
94927
|
return eventId;
|
|
94854
94928
|
}
|
|
94855
94929
|
this._client.captureEvent(event, { ...hint, event_id: eventId }, this);
|
|
@@ -95526,7 +95600,7 @@ function validateDsn(dsn) {
|
|
|
95526
95600
|
const requiredComponents = ['protocol', 'publicKey', 'host', 'projectId'];
|
|
95527
95601
|
const hasMissingRequiredComponent = requiredComponents.find(component => {
|
|
95528
95602
|
if (!dsn[component]) {
|
|
95529
|
-
|
|
95603
|
+
debug.error(`Invalid Sentry Dsn: ${component} missing`);
|
|
95530
95604
|
return true;
|
|
95531
95605
|
}
|
|
95532
95606
|
return false;
|
|
@@ -95537,17 +95611,17 @@ function validateDsn(dsn) {
|
|
|
95537
95611
|
}
|
|
95538
95612
|
|
|
95539
95613
|
if (!projectId.match(/^\d+$/)) {
|
|
95540
|
-
|
|
95614
|
+
debug.error(`Invalid Sentry Dsn: Invalid projectId ${projectId}`);
|
|
95541
95615
|
return false;
|
|
95542
95616
|
}
|
|
95543
95617
|
|
|
95544
95618
|
if (!isValidProtocol(protocol)) {
|
|
95545
|
-
|
|
95619
|
+
debug.error(`Invalid Sentry Dsn: Invalid protocol ${protocol}`);
|
|
95546
95620
|
return false;
|
|
95547
95621
|
}
|
|
95548
95622
|
|
|
95549
95623
|
if (port && isNaN(parseInt(port, 10))) {
|
|
95550
|
-
|
|
95624
|
+
debug.error(`Invalid Sentry Dsn: Invalid port ${port}`);
|
|
95551
95625
|
return false;
|
|
95552
95626
|
}
|
|
95553
95627
|
|
|
@@ -96085,16 +96159,9 @@ function createEventEnvelope(
|
|
|
96085
96159
|
/* eslint-disable @typescript-eslint/no-explicit-any */
|
|
96086
96160
|
|
|
96087
96161
|
/** SyncPromise internal states */
|
|
96088
|
-
|
|
96089
|
-
|
|
96090
|
-
|
|
96091
|
-
/** Resolved / OK */
|
|
96092
|
-
const RESOLVED = 1; States[States["RESOLVED"] = RESOLVED] = "RESOLVED";
|
|
96093
|
-
/** Rejected / Error */
|
|
96094
|
-
const REJECTED = 2; States[States["REJECTED"] = REJECTED] = "REJECTED";
|
|
96095
|
-
})(States || (States = {}));
|
|
96096
|
-
|
|
96097
|
-
// Overloads so we can call resolvedSyncPromise without arguments and generic argument
|
|
96162
|
+
const STATE_PENDING = 0;
|
|
96163
|
+
const STATE_RESOLVED = 1;
|
|
96164
|
+
const STATE_REJECTED = 2;
|
|
96098
96165
|
|
|
96099
96166
|
/**
|
|
96100
96167
|
* Creates a resolved sync promise.
|
|
@@ -96127,7 +96194,7 @@ function rejectedSyncPromise(reason) {
|
|
|
96127
96194
|
class SyncPromise {
|
|
96128
96195
|
|
|
96129
96196
|
constructor(executor) {
|
|
96130
|
-
this._state =
|
|
96197
|
+
this._state = STATE_PENDING;
|
|
96131
96198
|
this._handlers = [];
|
|
96132
96199
|
|
|
96133
96200
|
this._runExecutor(executor);
|
|
@@ -96211,7 +96278,7 @@ class SyncPromise {
|
|
|
96211
96278
|
|
|
96212
96279
|
/** Excute the resolve/reject handlers. */
|
|
96213
96280
|
_executeHandlers() {
|
|
96214
|
-
if (this._state ===
|
|
96281
|
+
if (this._state === STATE_PENDING) {
|
|
96215
96282
|
return;
|
|
96216
96283
|
}
|
|
96217
96284
|
|
|
@@ -96223,11 +96290,11 @@ class SyncPromise {
|
|
|
96223
96290
|
return;
|
|
96224
96291
|
}
|
|
96225
96292
|
|
|
96226
|
-
if (this._state ===
|
|
96293
|
+
if (this._state === STATE_RESOLVED) {
|
|
96227
96294
|
handler[1](this._value );
|
|
96228
96295
|
}
|
|
96229
96296
|
|
|
96230
|
-
if (this._state ===
|
|
96297
|
+
if (this._state === STATE_REJECTED) {
|
|
96231
96298
|
handler[2](this._value);
|
|
96232
96299
|
}
|
|
96233
96300
|
|
|
@@ -96238,7 +96305,7 @@ class SyncPromise {
|
|
|
96238
96305
|
/** Run the executor for the SyncPromise. */
|
|
96239
96306
|
_runExecutor(executor) {
|
|
96240
96307
|
const setResult = (state, value) => {
|
|
96241
|
-
if (this._state !==
|
|
96308
|
+
if (this._state !== STATE_PENDING) {
|
|
96242
96309
|
return;
|
|
96243
96310
|
}
|
|
96244
96311
|
|
|
@@ -96254,11 +96321,11 @@ class SyncPromise {
|
|
|
96254
96321
|
};
|
|
96255
96322
|
|
|
96256
96323
|
const resolve = (value) => {
|
|
96257
|
-
setResult(
|
|
96324
|
+
setResult(STATE_RESOLVED, value);
|
|
96258
96325
|
};
|
|
96259
96326
|
|
|
96260
96327
|
const reject = (reason) => {
|
|
96261
|
-
setResult(
|
|
96328
|
+
setResult(STATE_REJECTED, reason);
|
|
96262
96329
|
};
|
|
96263
96330
|
|
|
96264
96331
|
try {
|
|
@@ -96285,7 +96352,7 @@ function notifyEventProcessors(
|
|
|
96285
96352
|
} else {
|
|
96286
96353
|
const result = processor({ ...event }, hint) ;
|
|
96287
96354
|
|
|
96288
|
-
DEBUG_BUILD$2 && processor.id && result === null &&
|
|
96355
|
+
DEBUG_BUILD$2 && processor.id && result === null && debug.log(`Event processor "${processor.id}" dropped event`);
|
|
96289
96356
|
|
|
96290
96357
|
if (isThenable(result)) {
|
|
96291
96358
|
void result
|
|
@@ -97034,7 +97101,7 @@ function afterSetupIntegrations(client, integrations) {
|
|
|
97034
97101
|
/** Setup a single integration. */
|
|
97035
97102
|
function setupIntegration(client, integration, integrationIndex) {
|
|
97036
97103
|
if (integrationIndex[integration.name]) {
|
|
97037
|
-
DEBUG_BUILD$2 &&
|
|
97104
|
+
DEBUG_BUILD$2 && debug.log(`Integration skipped because it was already installed: ${integration.name}`);
|
|
97038
97105
|
return;
|
|
97039
97106
|
}
|
|
97040
97107
|
integrationIndex[integration.name] = integration;
|
|
@@ -97065,7 +97132,7 @@ function setupIntegration(client, integration, integrationIndex) {
|
|
|
97065
97132
|
client.addEventProcessor(processor);
|
|
97066
97133
|
}
|
|
97067
97134
|
|
|
97068
|
-
DEBUG_BUILD$2 &&
|
|
97135
|
+
DEBUG_BUILD$2 && debug.log(`Integration installed: ${integration.name}`);
|
|
97069
97136
|
}
|
|
97070
97137
|
|
|
97071
97138
|
/**
|
|
@@ -97264,7 +97331,7 @@ class Client {
|
|
|
97264
97331
|
if (options.dsn) {
|
|
97265
97332
|
this._dsn = makeDsn(options.dsn);
|
|
97266
97333
|
} else {
|
|
97267
|
-
DEBUG_BUILD$2 &&
|
|
97334
|
+
DEBUG_BUILD$2 && debug.warn('No DSN provided, client will not send events.');
|
|
97268
97335
|
}
|
|
97269
97336
|
|
|
97270
97337
|
if (this._dsn) {
|
|
@@ -97292,7 +97359,7 @@ class Client {
|
|
|
97292
97359
|
|
|
97293
97360
|
// ensure we haven't captured this very object before
|
|
97294
97361
|
if (checkOrSetAlreadyCaught(exception)) {
|
|
97295
|
-
DEBUG_BUILD$2 &&
|
|
97362
|
+
DEBUG_BUILD$2 && debug.log(ALREADY_SEEN_ERROR);
|
|
97296
97363
|
return eventId;
|
|
97297
97364
|
}
|
|
97298
97365
|
|
|
@@ -97347,7 +97414,7 @@ class Client {
|
|
|
97347
97414
|
|
|
97348
97415
|
// ensure we haven't captured this very object before
|
|
97349
97416
|
if (hint?.originalException && checkOrSetAlreadyCaught(hint.originalException)) {
|
|
97350
|
-
DEBUG_BUILD$2 &&
|
|
97417
|
+
DEBUG_BUILD$2 && debug.log(ALREADY_SEEN_ERROR);
|
|
97351
97418
|
return eventId;
|
|
97352
97419
|
}
|
|
97353
97420
|
|
|
@@ -97538,7 +97605,7 @@ class Client {
|
|
|
97538
97605
|
if ('aggregates' in session) {
|
|
97539
97606
|
const sessionAttrs = session.attrs || {};
|
|
97540
97607
|
if (!sessionAttrs.release && !clientReleaseOption) {
|
|
97541
|
-
DEBUG_BUILD$2 &&
|
|
97608
|
+
DEBUG_BUILD$2 && debug.warn(MISSING_RELEASE_FOR_SESSION_ERROR);
|
|
97542
97609
|
return;
|
|
97543
97610
|
}
|
|
97544
97611
|
sessionAttrs.release = sessionAttrs.release || clientReleaseOption;
|
|
@@ -97546,7 +97613,7 @@ class Client {
|
|
|
97546
97613
|
session.attrs = sessionAttrs;
|
|
97547
97614
|
} else {
|
|
97548
97615
|
if (!session.release && !clientReleaseOption) {
|
|
97549
|
-
DEBUG_BUILD$2 &&
|
|
97616
|
+
DEBUG_BUILD$2 && debug.warn(MISSING_RELEASE_FOR_SESSION_ERROR);
|
|
97550
97617
|
return;
|
|
97551
97618
|
}
|
|
97552
97619
|
session.release = session.release || clientReleaseOption;
|
|
@@ -97574,7 +97641,7 @@ class Client {
|
|
|
97574
97641
|
// would be `Partial<Record<SentryRequestType, Partial<Record<Outcome, number>>>>`
|
|
97575
97642
|
// With typescript 4.1 we could even use template literal types
|
|
97576
97643
|
const key = `${reason}:${category}`;
|
|
97577
|
-
DEBUG_BUILD$2 &&
|
|
97644
|
+
DEBUG_BUILD$2 && debug.log(`Recording outcome: "${key}"${count > 1 ? ` (${count} times)` : ''}`);
|
|
97578
97645
|
this._outcomes[key] = (this._outcomes[key] || 0) + count;
|
|
97579
97646
|
}
|
|
97580
97647
|
}
|
|
@@ -97628,12 +97695,12 @@ class Client {
|
|
|
97628
97695
|
|
|
97629
97696
|
if (this._isEnabled() && this._transport) {
|
|
97630
97697
|
return this._transport.send(envelope).then(null, reason => {
|
|
97631
|
-
DEBUG_BUILD$2 &&
|
|
97698
|
+
DEBUG_BUILD$2 && debug.error('Error while sending envelope:', reason);
|
|
97632
97699
|
return reason;
|
|
97633
97700
|
});
|
|
97634
97701
|
}
|
|
97635
97702
|
|
|
97636
|
-
DEBUG_BUILD$2 &&
|
|
97703
|
+
DEBUG_BUILD$2 && debug.error('Transport disabled');
|
|
97637
97704
|
|
|
97638
97705
|
return resolvedSyncPromise({});
|
|
97639
97706
|
}
|
|
@@ -97783,7 +97850,7 @@ class Client {
|
|
|
97783
97850
|
isolationScope = getIsolationScope(),
|
|
97784
97851
|
) {
|
|
97785
97852
|
if (DEBUG_BUILD$2 && isErrorEvent(event)) {
|
|
97786
|
-
|
|
97853
|
+
debug.log(`Captured error event \`${getPossibleEventMessages(event)[0] || '<unknown>'}\``);
|
|
97787
97854
|
}
|
|
97788
97855
|
|
|
97789
97856
|
return this._processEvent(event, hint, currentScope, isolationScope).then(
|
|
@@ -97793,11 +97860,11 @@ class Client {
|
|
|
97793
97860
|
reason => {
|
|
97794
97861
|
if (DEBUG_BUILD$2) {
|
|
97795
97862
|
if (_isDoNotSendEventError(reason)) {
|
|
97796
|
-
|
|
97863
|
+
debug.log(reason.message);
|
|
97797
97864
|
} else if (_isInternalError(reason)) {
|
|
97798
|
-
|
|
97865
|
+
debug.warn(reason.message);
|
|
97799
97866
|
} else {
|
|
97800
|
-
|
|
97867
|
+
debug.warn(reason);
|
|
97801
97868
|
}
|
|
97802
97869
|
}
|
|
97803
97870
|
return undefined;
|
|
@@ -97958,22 +98025,22 @@ class Client {
|
|
|
97958
98025
|
* Sends client reports as an envelope.
|
|
97959
98026
|
*/
|
|
97960
98027
|
_flushOutcomes() {
|
|
97961
|
-
DEBUG_BUILD$2 &&
|
|
98028
|
+
DEBUG_BUILD$2 && debug.log('Flushing outcomes...');
|
|
97962
98029
|
|
|
97963
98030
|
const outcomes = this._clearOutcomes();
|
|
97964
98031
|
|
|
97965
98032
|
if (outcomes.length === 0) {
|
|
97966
|
-
DEBUG_BUILD$2 &&
|
|
98033
|
+
DEBUG_BUILD$2 && debug.log('No outcomes to send');
|
|
97967
98034
|
return;
|
|
97968
98035
|
}
|
|
97969
98036
|
|
|
97970
98037
|
// This is really the only place where we want to check for a DSN and only send outcomes then
|
|
97971
98038
|
if (!this._dsn) {
|
|
97972
|
-
DEBUG_BUILD$2 &&
|
|
98039
|
+
DEBUG_BUILD$2 && debug.log('No dsn provided, will not send outcomes');
|
|
97973
98040
|
return;
|
|
97974
98041
|
}
|
|
97975
98042
|
|
|
97976
|
-
DEBUG_BUILD$2 &&
|
|
98043
|
+
DEBUG_BUILD$2 && debug.log('Sending outcomes:', outcomes);
|
|
97977
98044
|
|
|
97978
98045
|
const envelope = createClientReportEnvelope(outcomes, this._options.tunnel && dsnToString(this._dsn));
|
|
97979
98046
|
|
|
@@ -98165,9 +98232,9 @@ function initAndBind(
|
|
|
98165
98232
|
) {
|
|
98166
98233
|
if (options.debug === true) {
|
|
98167
98234
|
if (DEBUG_BUILD$2) {
|
|
98168
|
-
|
|
98235
|
+
debug.enable();
|
|
98169
98236
|
} else {
|
|
98170
|
-
// use `console.warn` rather than `
|
|
98237
|
+
// use `console.warn` rather than `debug.warn` since by non-debug bundles have all `debug.x` statements stripped
|
|
98171
98238
|
consoleSandbox(() => {
|
|
98172
98239
|
// eslint-disable-next-line no-console
|
|
98173
98240
|
console.warn('[Sentry] Cannot initialize SDK with `debug` option using a non-debug bundle.');
|
|
@@ -98443,7 +98510,7 @@ function createTransport(
|
|
|
98443
98510
|
response => {
|
|
98444
98511
|
// We don't want to throw on NOK responses, but we want to at least log them
|
|
98445
98512
|
if (response.statusCode !== undefined && (response.statusCode < 200 || response.statusCode >= 300)) {
|
|
98446
|
-
DEBUG_BUILD$2 &&
|
|
98513
|
+
DEBUG_BUILD$2 && debug.warn(`Sentry responded with status code ${response.statusCode} to sent event.`);
|
|
98447
98514
|
}
|
|
98448
98515
|
|
|
98449
98516
|
rateLimits = updateRateLimits(rateLimits, response);
|
|
@@ -98451,7 +98518,7 @@ function createTransport(
|
|
|
98451
98518
|
},
|
|
98452
98519
|
error => {
|
|
98453
98520
|
recordEnvelopeLoss('network_error');
|
|
98454
|
-
DEBUG_BUILD$2 &&
|
|
98521
|
+
DEBUG_BUILD$2 && debug.error('Encountered error running transport request:', error);
|
|
98455
98522
|
throw error;
|
|
98456
98523
|
},
|
|
98457
98524
|
);
|
|
@@ -98460,7 +98527,7 @@ function createTransport(
|
|
|
98460
98527
|
result => result,
|
|
98461
98528
|
error => {
|
|
98462
98529
|
if (error === SENTRY_BUFFER_FULL_ERROR) {
|
|
98463
|
-
DEBUG_BUILD$2 &&
|
|
98530
|
+
DEBUG_BUILD$2 && debug.error('Skipped sending event because buffer is full.');
|
|
98464
98531
|
recordEnvelopeLoss('queue_overflow');
|
|
98465
98532
|
return resolvedSyncPromise({});
|
|
98466
98533
|
} else {
|
|
@@ -98717,14 +98784,14 @@ function _shouldDropEvent$1(event, options) {
|
|
|
98717
98784
|
// Filter errors
|
|
98718
98785
|
if (_isIgnoredError(event, options.ignoreErrors)) {
|
|
98719
98786
|
DEBUG_BUILD$2 &&
|
|
98720
|
-
|
|
98787
|
+
debug.warn(
|
|
98721
98788
|
`Event dropped due to being matched by \`ignoreErrors\` option.\nEvent: ${getEventDescription(event)}`,
|
|
98722
98789
|
);
|
|
98723
98790
|
return true;
|
|
98724
98791
|
}
|
|
98725
98792
|
if (_isUselessError(event)) {
|
|
98726
98793
|
DEBUG_BUILD$2 &&
|
|
98727
|
-
|
|
98794
|
+
debug.warn(
|
|
98728
98795
|
`Event dropped due to not having an error message, error type or stacktrace.\nEvent: ${getEventDescription(
|
|
98729
98796
|
event,
|
|
98730
98797
|
)}`,
|
|
@@ -98733,7 +98800,7 @@ function _shouldDropEvent$1(event, options) {
|
|
|
98733
98800
|
}
|
|
98734
98801
|
if (_isDeniedUrl(event, options.denyUrls)) {
|
|
98735
98802
|
DEBUG_BUILD$2 &&
|
|
98736
|
-
|
|
98803
|
+
debug.warn(
|
|
98737
98804
|
`Event dropped due to being matched by \`denyUrls\` option.\nEvent: ${getEventDescription(
|
|
98738
98805
|
event,
|
|
98739
98806
|
)}.\nUrl: ${_getEventFilterUrl(event)}`,
|
|
@@ -98742,7 +98809,7 @@ function _shouldDropEvent$1(event, options) {
|
|
|
98742
98809
|
}
|
|
98743
98810
|
if (!_isAllowedUrl(event, options.allowUrls)) {
|
|
98744
98811
|
DEBUG_BUILD$2 &&
|
|
98745
|
-
|
|
98812
|
+
debug.warn(
|
|
98746
98813
|
`Event dropped due to not being matched by \`allowUrls\` option.\nEvent: ${getEventDescription(
|
|
98747
98814
|
event,
|
|
98748
98815
|
)}.\nUrl: ${_getEventFilterUrl(event)}`,
|
|
@@ -98754,7 +98821,7 @@ function _shouldDropEvent$1(event, options) {
|
|
|
98754
98821
|
|
|
98755
98822
|
if (_isIgnoredTransaction(event, options.ignoreTransactions)) {
|
|
98756
98823
|
DEBUG_BUILD$2 &&
|
|
98757
|
-
|
|
98824
|
+
debug.warn(
|
|
98758
98825
|
`Event dropped due to being matched by \`ignoreTransactions\` option.\nEvent: ${getEventDescription(event)}`,
|
|
98759
98826
|
);
|
|
98760
98827
|
return true;
|
|
@@ -98818,7 +98885,7 @@ function _getEventFilterUrl(event) {
|
|
|
98818
98885
|
const frames = rootException?.stacktrace?.frames;
|
|
98819
98886
|
return frames ? _getLastValidUrl(frames) : null;
|
|
98820
98887
|
} catch (oO) {
|
|
98821
|
-
DEBUG_BUILD$2 &&
|
|
98888
|
+
DEBUG_BUILD$2 && debug.error(`Cannot extract url for event ${getEventDescription(event)}`);
|
|
98822
98889
|
return null;
|
|
98823
98890
|
}
|
|
98824
98891
|
}
|
|
@@ -99025,7 +99092,7 @@ const _dedupeIntegration = (() => {
|
|
|
99025
99092
|
// Juuust in case something goes wrong
|
|
99026
99093
|
try {
|
|
99027
99094
|
if (_shouldDropEvent(currentEvent, previousEvent)) {
|
|
99028
|
-
DEBUG_BUILD$2 &&
|
|
99095
|
+
DEBUG_BUILD$2 && debug.warn('Event dropped due to being a duplicate of previously captured event.');
|
|
99029
99096
|
return null;
|
|
99030
99097
|
}
|
|
99031
99098
|
} catch (_oO) {} // eslint-disable-line no-empty
|
|
@@ -99289,8 +99356,7 @@ function supportsNativeFetch() {
|
|
|
99289
99356
|
}
|
|
99290
99357
|
doc.head.removeChild(sandbox);
|
|
99291
99358
|
} catch (err) {
|
|
99292
|
-
DEBUG_BUILD$2 &&
|
|
99293
|
-
logger$1.warn('Could not create sandbox iframe for pure fetch check, bailing to window.fetch: ', err);
|
|
99359
|
+
DEBUG_BUILD$2 && debug.warn('Could not create sandbox iframe for pure fetch check, bailing to window.fetch: ', err);
|
|
99294
99360
|
}
|
|
99295
99361
|
}
|
|
99296
99362
|
|
|
@@ -102199,7 +102265,7 @@ var createStream = async () => {
|
|
|
102199
102265
|
if (raw) {
|
|
102200
102266
|
return void 0;
|
|
102201
102267
|
}
|
|
102202
|
-
const pretty = await __vitePreload(() => import('./index-
|
|
102268
|
+
const pretty = await __vitePreload(() => import('./index-DS--BeyD.js').then(n => n.i),true ?__vite__mapDeps([0,1]):void 0);
|
|
102203
102269
|
return pretty.default(createPrettyConfig());
|
|
102204
102270
|
};
|
|
102205
102271
|
var options = {
|
|
@@ -104688,7 +104754,7 @@ var AgentRuntime = class {
|
|
|
104688
104754
|
await this.createRooms(roomObjsToCreate);
|
|
104689
104755
|
}
|
|
104690
104756
|
const entityIds = entities.map((e) => e.id);
|
|
104691
|
-
const entityExistsCheck = await this.adapter.
|
|
104757
|
+
const entityExistsCheck = await this.adapter.getEntitiesByIds(entityIds);
|
|
104692
104758
|
const entitiesToUpdate = entityExistsCheck.map((e) => e.id);
|
|
104693
104759
|
const entitiesToCreate = entities.filter((e) => !entitiesToUpdate.includes(e.id));
|
|
104694
104760
|
const r = {
|
|
@@ -105295,12 +105361,12 @@ var AgentRuntime = class {
|
|
|
105295
105361
|
return newAgent;
|
|
105296
105362
|
}
|
|
105297
105363
|
async getEntityById(entityId) {
|
|
105298
|
-
const entities = await this.adapter.
|
|
105364
|
+
const entities = await this.adapter.getEntitiesByIds([entityId]);
|
|
105299
105365
|
if (!entities?.length) return null;
|
|
105300
105366
|
return entities[0];
|
|
105301
105367
|
}
|
|
105302
|
-
async
|
|
105303
|
-
return await this.adapter.
|
|
105368
|
+
async getEntitiesByIds(entityIds) {
|
|
105369
|
+
return await this.adapter.getEntitiesByIds(entityIds);
|
|
105304
105370
|
}
|
|
105305
105371
|
async getEntitiesForRoom(roomId, includeComponents) {
|
|
105306
105372
|
return await this.adapter.getEntitiesForRoom(roomId, includeComponents);
|
|
@@ -106855,8 +106921,8 @@ var AgentRuntime2 = class {
|
|
|
106855
106921
|
async getEntityById(entityId) {
|
|
106856
106922
|
return this._runtime.getEntityById(entityId);
|
|
106857
106923
|
}
|
|
106858
|
-
async
|
|
106859
|
-
return this._runtime.
|
|
106924
|
+
async getEntitiesByIds(entityIds) {
|
|
106925
|
+
return this._runtime.getEntitiesByIds(entityIds);
|
|
106860
106926
|
}
|
|
106861
106927
|
async getEntitiesForRoom(roomId, includeComponents) {
|
|
106862
106928
|
return this._runtime.getEntitiesForRoom(roomId, includeComponents);
|
|
@@ -108486,6 +108552,152 @@ function updateApiClientApiKey(newApiKey) {
|
|
|
108486
108552
|
resetElizaClient();
|
|
108487
108553
|
}
|
|
108488
108554
|
|
|
108555
|
+
const REGISTRY_ORG = "elizaos-plugins";
|
|
108556
|
+
const REGISTRY_REPO = "registry";
|
|
108557
|
+
const REGISTRY_URL = `https://raw.githubusercontent.com/${REGISTRY_ORG}/${REGISTRY_REPO}/refs/heads/main/generated-registry.json`;
|
|
108558
|
+
function usePlugins() {
|
|
108559
|
+
return useQuery({
|
|
108560
|
+
queryKey: ["plugins"],
|
|
108561
|
+
queryFn: async () => {
|
|
108562
|
+
try {
|
|
108563
|
+
const elizaClient = createElizaClient();
|
|
108564
|
+
const [registryResponse, agentsResponse] = await Promise.all([
|
|
108565
|
+
fetch(REGISTRY_URL),
|
|
108566
|
+
elizaClient.agents.listAgents()
|
|
108567
|
+
]);
|
|
108568
|
+
const registryData = await registryResponse.json();
|
|
108569
|
+
const registryPlugins = Object.entries(registryData.registry || {}).filter(([name, data]) => {
|
|
108570
|
+
const isPlugin = name.includes("plugin");
|
|
108571
|
+
const hasV1Support = data.supports.v1 === true;
|
|
108572
|
+
const hasV1Version = data.npm.v1 !== null || data.git.v1.version !== null && data.git.v1.branch !== null;
|
|
108573
|
+
return isPlugin && hasV1Support && hasV1Version;
|
|
108574
|
+
}).map(([name]) => name.replace(/^@elizaos-plugins\//, "@elizaos/")).sort();
|
|
108575
|
+
let agentPlugins = [];
|
|
108576
|
+
try {
|
|
108577
|
+
if (agentsResponse?.length > 0) {
|
|
108578
|
+
const activeAgent = agentsResponse.find((agent) => agent.status === "active");
|
|
108579
|
+
if (activeAgent && activeAgent.id) {
|
|
108580
|
+
const agentDetailResponse = await elizaClient.agents.getAgent(activeAgent.id);
|
|
108581
|
+
if (agentDetailResponse?.plugins) {
|
|
108582
|
+
agentPlugins = agentDetailResponse.plugins;
|
|
108583
|
+
}
|
|
108584
|
+
}
|
|
108585
|
+
}
|
|
108586
|
+
} catch (agentError) {
|
|
108587
|
+
clientLogger.warn("Could not fetch agent plugins:", agentError);
|
|
108588
|
+
}
|
|
108589
|
+
const allPlugins = [.../* @__PURE__ */ new Set([...registryPlugins, ...agentPlugins])];
|
|
108590
|
+
return allPlugins.sort();
|
|
108591
|
+
} catch (error) {
|
|
108592
|
+
clientLogger.error("Failed to fetch from registry, falling back to basic list:", error);
|
|
108593
|
+
return [
|
|
108594
|
+
"@elizaos/plugin-bootstrap",
|
|
108595
|
+
"@elizaos/plugin-evm",
|
|
108596
|
+
"@elizaos/plugin-discord",
|
|
108597
|
+
"@elizaos/plugin-elevenlabs",
|
|
108598
|
+
"@elizaos/plugin-anthropic",
|
|
108599
|
+
"@elizaos/plugin-browser",
|
|
108600
|
+
"@elizaos/plugin-farcaster",
|
|
108601
|
+
"@elizaos/plugin-groq"
|
|
108602
|
+
].filter((name) => name.includes("plugin")).sort();
|
|
108603
|
+
}
|
|
108604
|
+
}
|
|
108605
|
+
});
|
|
108606
|
+
}
|
|
108607
|
+
|
|
108608
|
+
const PROVIDER_PLUGIN_MAPPINGS = {
|
|
108609
|
+
google: "@elizaos/plugin-google-genai",
|
|
108610
|
+
llama_local: "@elizaos/plugin-local-ai"
|
|
108611
|
+
// extend as needed
|
|
108612
|
+
};
|
|
108613
|
+
const CLIENT_PLUGIN_MAPPINGS = {
|
|
108614
|
+
// add as needed
|
|
108615
|
+
};
|
|
108616
|
+
const ESSENTIAL_PLUGINS$1 = ["@elizaos/plugin-sql", "@elizaos/plugin-bootstrap"];
|
|
108617
|
+
function useConvertCharacter() {
|
|
108618
|
+
const { data: availablePlugins = [] } = usePlugins();
|
|
108619
|
+
const matchPlugins = (v1) => {
|
|
108620
|
+
const matched = /* @__PURE__ */ new Set();
|
|
108621
|
+
if (Array.isArray(v1.clients)) {
|
|
108622
|
+
for (const client of v1.clients) {
|
|
108623
|
+
const lower = client.toLowerCase();
|
|
108624
|
+
const mapped = CLIENT_PLUGIN_MAPPINGS[lower];
|
|
108625
|
+
if (mapped && availablePlugins.includes(mapped)) {
|
|
108626
|
+
matched.add(mapped);
|
|
108627
|
+
} else {
|
|
108628
|
+
const constructed = `@elizaos/plugin-${lower}`;
|
|
108629
|
+
if (availablePlugins.includes(constructed)) {
|
|
108630
|
+
matched.add(constructed);
|
|
108631
|
+
}
|
|
108632
|
+
}
|
|
108633
|
+
}
|
|
108634
|
+
}
|
|
108635
|
+
let providerMatched = false;
|
|
108636
|
+
if (typeof v1.modelProvider === "string") {
|
|
108637
|
+
const lower = v1.modelProvider.toLowerCase();
|
|
108638
|
+
const mapped = PROVIDER_PLUGIN_MAPPINGS[lower];
|
|
108639
|
+
if (mapped && availablePlugins.includes(mapped)) {
|
|
108640
|
+
matched.add(mapped);
|
|
108641
|
+
providerMatched = true;
|
|
108642
|
+
} else {
|
|
108643
|
+
const constructed = `@elizaos/plugin-${lower}`;
|
|
108644
|
+
if (availablePlugins.includes(constructed)) {
|
|
108645
|
+
matched.add(constructed);
|
|
108646
|
+
providerMatched = true;
|
|
108647
|
+
}
|
|
108648
|
+
}
|
|
108649
|
+
if (!providerMatched) {
|
|
108650
|
+
if (availablePlugins.includes("@elizaos/plugin-openai")) {
|
|
108651
|
+
matched.add("@elizaos/plugin-openai");
|
|
108652
|
+
}
|
|
108653
|
+
}
|
|
108654
|
+
} else {
|
|
108655
|
+
if (availablePlugins.includes("@elizaos/plugin-openai")) {
|
|
108656
|
+
matched.add("@elizaos/plugin-openai");
|
|
108657
|
+
}
|
|
108658
|
+
}
|
|
108659
|
+
for (const plugin of ESSENTIAL_PLUGINS$1) {
|
|
108660
|
+
if (availablePlugins.includes(plugin)) {
|
|
108661
|
+
matched.add(plugin);
|
|
108662
|
+
}
|
|
108663
|
+
}
|
|
108664
|
+
return Array.from(matched).sort();
|
|
108665
|
+
};
|
|
108666
|
+
function isV1MessageExampleFormat(example) {
|
|
108667
|
+
return typeof example === "object" && example !== null && "user" in example;
|
|
108668
|
+
}
|
|
108669
|
+
const convertCharacter = (v1) => {
|
|
108670
|
+
const bio = [...Array.isArray(v1.bio) ? v1.bio : v1.bio ? [v1.bio] : [], ...v1.lore ?? []];
|
|
108671
|
+
const messageExamples = (v1.messageExamples ?? []).map(
|
|
108672
|
+
(thread) => thread.map((msg) => {
|
|
108673
|
+
if (isV1MessageExampleFormat(msg)) {
|
|
108674
|
+
return {
|
|
108675
|
+
name: msg.user,
|
|
108676
|
+
content: msg.content
|
|
108677
|
+
};
|
|
108678
|
+
}
|
|
108679
|
+
return msg;
|
|
108680
|
+
})
|
|
108681
|
+
) ?? [];
|
|
108682
|
+
const plugins = matchPlugins(v1);
|
|
108683
|
+
const v2 = {
|
|
108684
|
+
name: v1.name,
|
|
108685
|
+
username: v1.username,
|
|
108686
|
+
system: v1.system,
|
|
108687
|
+
settings: v1.settings,
|
|
108688
|
+
plugins,
|
|
108689
|
+
bio,
|
|
108690
|
+
topics: v1.topics,
|
|
108691
|
+
style: v1.style,
|
|
108692
|
+
adjectives: v1.adjectives,
|
|
108693
|
+
messageExamples,
|
|
108694
|
+
postExamples: v1.postExamples
|
|
108695
|
+
};
|
|
108696
|
+
return v2;
|
|
108697
|
+
};
|
|
108698
|
+
return { convertCharacter };
|
|
108699
|
+
}
|
|
108700
|
+
|
|
108489
108701
|
const useContainerWidth = (threshold = 768) => {
|
|
108490
108702
|
const containerRef = reactExports.useRef(null);
|
|
108491
108703
|
const [showLabels, setShowLabels] = reactExports.useState(true);
|
|
@@ -108560,6 +108772,7 @@ function CharacterForm({
|
|
|
108560
108772
|
const [globalEnvs, setGlobalEnvs] = reactExports.useState({});
|
|
108561
108773
|
const enabledPlugins = reactExports.useMemo(() => characterValue?.plugins || [], [characterValue?.plugins]);
|
|
108562
108774
|
const { requiredSecrets } = useRequiredSecrets(enabledPlugins);
|
|
108775
|
+
const { convertCharacter } = useConvertCharacter();
|
|
108563
108776
|
reactExports.useEffect(() => {
|
|
108564
108777
|
const fetchGlobalEnvs = async () => {
|
|
108565
108778
|
try {
|
|
@@ -108960,12 +109173,18 @@ function CharacterForm({
|
|
|
108960
109173
|
const handleExportJSON = () => {
|
|
108961
109174
|
exportCharacterAsJson(characterValue, toast);
|
|
108962
109175
|
};
|
|
109176
|
+
function isV1Character(char) {
|
|
109177
|
+
return typeof char === "object" && char !== null && ("lore" in char || "clients" in char || "modelProvider" in char);
|
|
109178
|
+
}
|
|
108963
109179
|
const handleImportJSON = async (event) => {
|
|
108964
109180
|
const file = event.target.files?.[0];
|
|
108965
109181
|
if (!file) return;
|
|
108966
109182
|
try {
|
|
108967
109183
|
const text = await file.text();
|
|
108968
|
-
|
|
109184
|
+
let json = JSON.parse(text);
|
|
109185
|
+
if (isV1Character(json)) {
|
|
109186
|
+
json = convertCharacter(json);
|
|
109187
|
+
}
|
|
108969
109188
|
const missingFields = Object.keys(FIELD_REQUIREMENTS).filter((field) => {
|
|
108970
109189
|
if (FIELD_REQUIREMENTS[field] !== FIELD_REQUIREMENT_TYPE.REQUIRED) return false;
|
|
108971
109190
|
const parts = field.split(".");
|
|
@@ -109421,59 +109640,6 @@ const DialogDescription = reactExports.forwardRef(({ className, ...props }, ref)
|
|
|
109421
109640
|
));
|
|
109422
109641
|
DialogDescription.displayName = Description$1.displayName;
|
|
109423
109642
|
|
|
109424
|
-
const REGISTRY_ORG = "elizaos-plugins";
|
|
109425
|
-
const REGISTRY_REPO = "registry";
|
|
109426
|
-
const REGISTRY_URL = `https://raw.githubusercontent.com/${REGISTRY_ORG}/${REGISTRY_REPO}/refs/heads/main/generated-registry.json`;
|
|
109427
|
-
function usePlugins() {
|
|
109428
|
-
return useQuery({
|
|
109429
|
-
queryKey: ["plugins"],
|
|
109430
|
-
queryFn: async () => {
|
|
109431
|
-
try {
|
|
109432
|
-
const elizaClient = createElizaClient();
|
|
109433
|
-
const [registryResponse, agentsResponse] = await Promise.all([
|
|
109434
|
-
fetch(REGISTRY_URL),
|
|
109435
|
-
elizaClient.agents.listAgents()
|
|
109436
|
-
]);
|
|
109437
|
-
const registryData = await registryResponse.json();
|
|
109438
|
-
const registryPlugins = Object.entries(registryData.registry || {}).filter(([name, data]) => {
|
|
109439
|
-
const isPlugin = name.includes("plugin");
|
|
109440
|
-
const hasV1Support = data.supports.v1 === true;
|
|
109441
|
-
const hasV1Version = data.npm.v1 !== null || data.git.v1.version !== null && data.git.v1.branch !== null;
|
|
109442
|
-
return isPlugin && hasV1Support && hasV1Version;
|
|
109443
|
-
}).map(([name]) => name.replace(/^@elizaos-plugins\//, "@elizaos/")).sort();
|
|
109444
|
-
let agentPlugins = [];
|
|
109445
|
-
try {
|
|
109446
|
-
if (agentsResponse?.length > 0) {
|
|
109447
|
-
const activeAgent = agentsResponse.find((agent) => agent.status === "active");
|
|
109448
|
-
if (activeAgent && activeAgent.id) {
|
|
109449
|
-
const agentDetailResponse = await elizaClient.agents.getAgent(activeAgent.id);
|
|
109450
|
-
if (agentDetailResponse?.plugins) {
|
|
109451
|
-
agentPlugins = agentDetailResponse.plugins;
|
|
109452
|
-
}
|
|
109453
|
-
}
|
|
109454
|
-
}
|
|
109455
|
-
} catch (agentError) {
|
|
109456
|
-
clientLogger.warn("Could not fetch agent plugins:", agentError);
|
|
109457
|
-
}
|
|
109458
|
-
const allPlugins = [.../* @__PURE__ */ new Set([...registryPlugins, ...agentPlugins])];
|
|
109459
|
-
return allPlugins.sort();
|
|
109460
|
-
} catch (error) {
|
|
109461
|
-
clientLogger.error("Failed to fetch from registry, falling back to basic list:", error);
|
|
109462
|
-
return [
|
|
109463
|
-
"@elizaos/plugin-bootstrap",
|
|
109464
|
-
"@elizaos/plugin-evm",
|
|
109465
|
-
"@elizaos/plugin-discord",
|
|
109466
|
-
"@elizaos/plugin-elevenlabs",
|
|
109467
|
-
"@elizaos/plugin-anthropic",
|
|
109468
|
-
"@elizaos/plugin-browser",
|
|
109469
|
-
"@elizaos/plugin-farcaster",
|
|
109470
|
-
"@elizaos/plugin-groq"
|
|
109471
|
-
].filter((name) => name.includes("plugin")).sort();
|
|
109472
|
-
}
|
|
109473
|
-
}
|
|
109474
|
-
});
|
|
109475
|
-
}
|
|
109476
|
-
|
|
109477
109643
|
const ESSENTIAL_PLUGINS = {
|
|
109478
109644
|
"@elizaos/plugin-sql": {
|
|
109479
109645
|
title: "Essential Plugin: SQL",
|
|
@@ -158362,20 +158528,39 @@ function AgentSidebar({ agentId, agentName, channelId }) {
|
|
|
158362
158528
|
);
|
|
158363
158529
|
}
|
|
158364
158530
|
|
|
158531
|
+
const MAX_HEIGHT = 160;
|
|
158365
158532
|
const ChatInput = reactExports.forwardRef(
|
|
158366
|
-
({ className, ...props }, ref) =>
|
|
158367
|
-
|
|
158368
|
-
{
|
|
158369
|
-
|
|
158370
|
-
ref
|
|
158371
|
-
|
|
158372
|
-
|
|
158373
|
-
|
|
158374
|
-
|
|
158375
|
-
)
|
|
158376
|
-
|
|
158377
|
-
|
|
158378
|
-
|
|
158533
|
+
({ className, ...props }, ref) => {
|
|
158534
|
+
const internalRef = reactExports.useRef(null);
|
|
158535
|
+
const combinedRef = (node) => {
|
|
158536
|
+
if (typeof ref === "function") ref(node);
|
|
158537
|
+
else if (ref) ref.current = node;
|
|
158538
|
+
internalRef.current = node;
|
|
158539
|
+
};
|
|
158540
|
+
const resizeTextarea = () => {
|
|
158541
|
+
const textarea = internalRef.current;
|
|
158542
|
+
if (textarea) {
|
|
158543
|
+
textarea.style.height = "auto";
|
|
158544
|
+
textarea.style.height = Math.min(textarea.scrollHeight, MAX_HEIGHT) + "px";
|
|
158545
|
+
}
|
|
158546
|
+
};
|
|
158547
|
+
reactExports.useEffect(() => {
|
|
158548
|
+
resizeTextarea();
|
|
158549
|
+
}, [props.value]);
|
|
158550
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
158551
|
+
Textarea,
|
|
158552
|
+
{
|
|
158553
|
+
autoComplete: "off",
|
|
158554
|
+
ref: combinedRef,
|
|
158555
|
+
name: "message",
|
|
158556
|
+
className: cn(
|
|
158557
|
+
"px-4 py-3 bg-background text-sm placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring disabled:cursor-not-allowed disabled:opacity-50 w-full rounded-md flex items-center h-16 resize-none",
|
|
158558
|
+
className
|
|
158559
|
+
),
|
|
158560
|
+
...props
|
|
158561
|
+
}
|
|
158562
|
+
);
|
|
158563
|
+
}
|
|
158379
158564
|
);
|
|
158380
158565
|
ChatInput.displayName = "ChatInput";
|
|
158381
158566
|
|
|
@@ -158619,7 +158804,7 @@ const ChatInputArea = ({
|
|
|
158619
158804
|
{
|
|
158620
158805
|
ref: formRef,
|
|
158621
158806
|
onSubmit: handleSendMessage,
|
|
158622
|
-
className: "relative rounded-md border bg-card",
|
|
158807
|
+
className: "relative rounded-md border bg-card p-2 sm:p-3",
|
|
158623
158808
|
children: [
|
|
158624
158809
|
selectedFiles.length > 0 && /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "flex flex-wrap gap-2 sm:gap-3 p-2 sm:p-3 pb-0 max-h-32 sm:max-h-40 overflow-y-auto", children: selectedFiles.map((fileData) => {
|
|
158625
158810
|
const blobUrl = fileData.blobUrl || URL.createObjectURL(fileData.file);
|
|
@@ -158658,12 +158843,12 @@ const ChatInputArea = ({
|
|
|
158658
158843
|
value: input,
|
|
158659
158844
|
onChange: ({ target }) => setInput(target.value),
|
|
158660
158845
|
placeholder: inputDisabled ? chatType === ChannelType2.DM && targetAgentData ? `${targetAgentData.name} is thinking...` : "Agent is processing..." : chatType === ChannelType2.DM ? "Type your message here..." : "Message group...",
|
|
158661
|
-
className: "min-h-12 resize-none rounded-
|
|
158846
|
+
className: "min-h-12 resize-none rounded-none bg-card border-0 px-0 py-0 shadow-none focus-visible:ring-0 text-sm sm:text-base",
|
|
158662
158847
|
disabled: inputDisabled || chatType === ChannelType2.DM && targetAgentData?.status === "inactive",
|
|
158663
158848
|
"data-testid": "chat-input"
|
|
158664
158849
|
}
|
|
158665
158850
|
),
|
|
158666
|
-
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex items-center
|
|
158851
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex items-center pt-0 gap-1", children: [
|
|
158667
158852
|
/* @__PURE__ */ jsxRuntimeExports.jsxs(Tooltip, { children: [
|
|
158668
158853
|
/* @__PURE__ */ jsxRuntimeExports.jsx(TooltipTrigger, { asChild: true, children: /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { children: [
|
|
158669
158854
|
/* @__PURE__ */ jsxRuntimeExports.jsxs(
|
|
@@ -161694,16 +161879,8 @@ function AgentSettingsRoute() {
|
|
|
161694
161879
|
style: agentData.data.style ?? { all: [], chat: [], post: [] },
|
|
161695
161880
|
settings: agentData.data.settings ?? { secrets: {} }
|
|
161696
161881
|
};
|
|
161697
|
-
return /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "flex w-full justify-center px-4 sm:px-6 overflow-y-auto", children: /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "w-full md:max-w-4xl py-6", children: /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
161698
|
-
|
|
161699
|
-
{
|
|
161700
|
-
agent,
|
|
161701
|
-
agentId,
|
|
161702
|
-
onSaveComplete: () => {
|
|
161703
|
-
navigate("/");
|
|
161704
|
-
}
|
|
161705
|
-
}
|
|
161706
|
-
) }) });
|
|
161882
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "flex w-full justify-center px-4 sm:px-6 overflow-y-auto", children: /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "w-full md:max-w-4xl py-6", children: /* @__PURE__ */ jsxRuntimeExports.jsx(AgentSettings, { agent, agentId, onSaveComplete: () => {
|
|
161883
|
+
} }) }) });
|
|
161707
161884
|
}
|
|
161708
161885
|
|
|
161709
161886
|
const queryClient = new QueryClient({
|
|
@@ -161855,4 +162032,4 @@ clientExports.createRoot(rootElement).render(
|
|
|
161855
162032
|
);
|
|
161856
162033
|
|
|
161857
162034
|
export { requireString_decoder as a, requireUtil$2 as b, requireShams$1 as c, requireCallBound as d, requireEsObjectAtoms as e, requireCallBind as f, requireGetIntrinsic as g, requireDefineDataProperty as h, requireHasPropertyDescriptors as i, requireEvents as j, requireStreamBrowserify as r };
|
|
161858
|
-
//# sourceMappingURL=index-
|
|
162035
|
+
//# sourceMappingURL=index-CSGjxUG_.js.map
|