@elizaos/core 2.0.3-beta.5 → 2.0.3-beta.6
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/browser/index.browser.js +17 -15
- package/dist/browser/index.browser.js.map +4 -4
- package/dist/edge/index.edge.js +17 -15
- package/dist/edge/index.edge.js.map +4 -4
- package/dist/features/basic-capabilities/providers/runtimeModelContext.d.ts.map +1 -1
- package/dist/node/index.node.js +132 -130
- package/dist/node/index.node.js.map +6 -6
- package/dist/services/message.d.ts.map +1 -1
- package/package.json +5 -5
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"runtimeModelContext.d.ts","sourceRoot":"","sources":["../../../../src/features/basic-capabilities/providers/runtimeModelContext.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAIX,QAAQ,EACR,MAAM,yBAAyB,CAAC;
|
|
1
|
+
{"version":3,"file":"runtimeModelContext.d.ts","sourceRoot":"","sources":["../../../../src/features/basic-capabilities/providers/runtimeModelContext.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAIX,QAAQ,EACR,MAAM,yBAAyB,CAAC;AA+MjC,eAAO,MAAM,2BAA2B,EAAE,QAsHzC,CAAC"}
|
package/dist/node/index.node.js
CHANGED
|
@@ -182020,16 +182020,17 @@ function fallbackModelString(runtime2, modelType) {
|
|
|
182020
182020
|
return String(modelType);
|
|
182021
182021
|
}
|
|
182022
182022
|
function configuredModelString(runtime2, modelType) {
|
|
182023
|
-
const resolved = typeof runtime2.resolveProviderModelString === "function" ? runtime2.resolveProviderModelString(modelType) :
|
|
182024
|
-
if (
|
|
182025
|
-
|
|
182026
|
-
|
|
182027
|
-
|
|
182028
|
-
|
|
182029
|
-
|
|
182030
|
-
|
|
182023
|
+
const resolved = typeof runtime2.resolveProviderModelString === "function" ? runtime2.resolveProviderModelString(modelType) : undefined;
|
|
182024
|
+
if (resolved && resolved !== String(modelType))
|
|
182025
|
+
return resolved;
|
|
182026
|
+
const provider = registeredProviderFor(runtime2, modelType);
|
|
182027
|
+
if (provider === "codex-cli") {
|
|
182028
|
+
const codexModel = readSetting(runtime2, "CODEX_MODEL");
|
|
182029
|
+
if (codexModel)
|
|
182030
|
+
return codexModel;
|
|
182031
182031
|
}
|
|
182032
|
-
|
|
182032
|
+
const configured = fallbackModelString(runtime2, modelType);
|
|
182033
|
+
return configured && configured !== String(modelType) ? configured : undefined;
|
|
182033
182034
|
}
|
|
182034
182035
|
function registeredProviderFor(runtime2, modelType) {
|
|
182035
182036
|
for (const candidate of getModelFallbackChain(modelType)) {
|
|
@@ -182119,10 +182120,10 @@ var runtimeModelContextProvider = {
|
|
|
182119
182120
|
const lines = [
|
|
182120
182121
|
"# Runtime Model Context",
|
|
182121
182122
|
"Use these runtime facts when asked what model, provider, or coding agent is currently in use. Provider adapter names may identify compatibility layers; endpoint hosts identify the configured backend when present. Do not infer a different model or provider from training data or old chat history.",
|
|
182122
|
-
|
|
182123
|
-
|
|
182124
|
-
|
|
182125
|
-
|
|
182123
|
+
optionalLine("Response handler model", responseHandlerModel),
|
|
182124
|
+
optionalLine("Action planner model", actionPlannerModel),
|
|
182125
|
+
optionalLine("Large text model", textLargeModel),
|
|
182126
|
+
optionalLine("Small text model", textSmallModel),
|
|
182126
182127
|
optionalLine("Response handler provider adapter", responseHandlerProvider),
|
|
182127
182128
|
optionalLine("Response handler endpoint host", responseHandlerEndpointHost),
|
|
182128
182129
|
optionalLine("Action planner provider adapter", actionPlannerProvider),
|
|
@@ -195782,121 +195783,6 @@ class ComponentSecretStorage extends BaseSecretStorage {
|
|
|
195782
195783
|
return count;
|
|
195783
195784
|
}
|
|
195784
195785
|
}
|
|
195785
|
-
// src/features/secrets/storage/memory-store.ts
|
|
195786
|
-
class MemorySecretStorage extends BaseSecretStorage {
|
|
195787
|
-
storageType = "memory";
|
|
195788
|
-
store = new Map;
|
|
195789
|
-
async initialize() {}
|
|
195790
|
-
async exists(key, context) {
|
|
195791
|
-
const storageKey = this.generateStorageKey(key, context);
|
|
195792
|
-
return this.store.has(storageKey);
|
|
195793
|
-
}
|
|
195794
|
-
async get(key, context) {
|
|
195795
|
-
const storageKey = this.generateStorageKey(key, context);
|
|
195796
|
-
const entry = this.store.get(storageKey);
|
|
195797
|
-
if (!entry) {
|
|
195798
|
-
return null;
|
|
195799
|
-
}
|
|
195800
|
-
if (entry.config.expiresAt && entry.config.expiresAt < Date.now()) {
|
|
195801
|
-
this.store.delete(storageKey);
|
|
195802
|
-
return null;
|
|
195803
|
-
}
|
|
195804
|
-
return entry.value;
|
|
195805
|
-
}
|
|
195806
|
-
async set(key, value, context, config) {
|
|
195807
|
-
const storageKey = this.generateStorageKey(key, context);
|
|
195808
|
-
const existingEntry = this.store.get(storageKey);
|
|
195809
|
-
const fullConfig = this.createDefaultConfig(key, context, {
|
|
195810
|
-
...existingEntry?.config,
|
|
195811
|
-
...config
|
|
195812
|
-
});
|
|
195813
|
-
this.store.set(storageKey, {
|
|
195814
|
-
value,
|
|
195815
|
-
config: fullConfig
|
|
195816
|
-
});
|
|
195817
|
-
return true;
|
|
195818
|
-
}
|
|
195819
|
-
async delete(key, context) {
|
|
195820
|
-
const storageKey = this.generateStorageKey(key, context);
|
|
195821
|
-
return this.store.delete(storageKey);
|
|
195822
|
-
}
|
|
195823
|
-
async list(context) {
|
|
195824
|
-
const prefix = this.getContextPrefix(context);
|
|
195825
|
-
const metadata = {};
|
|
195826
|
-
for (const [storageKey, entry] of this.store) {
|
|
195827
|
-
if (storageKey.startsWith(prefix)) {
|
|
195828
|
-
const originalKey = this.extractOriginalKey(storageKey, context);
|
|
195829
|
-
if (originalKey) {
|
|
195830
|
-
if (entry.config.expiresAt && entry.config.expiresAt < Date.now()) {
|
|
195831
|
-
this.store.delete(storageKey);
|
|
195832
|
-
continue;
|
|
195833
|
-
}
|
|
195834
|
-
metadata[originalKey] = { ...entry.config };
|
|
195835
|
-
}
|
|
195836
|
-
}
|
|
195837
|
-
}
|
|
195838
|
-
return metadata;
|
|
195839
|
-
}
|
|
195840
|
-
async getConfig(key, context) {
|
|
195841
|
-
const storageKey = this.generateStorageKey(key, context);
|
|
195842
|
-
const entry = this.store.get(storageKey);
|
|
195843
|
-
if (!entry) {
|
|
195844
|
-
return null;
|
|
195845
|
-
}
|
|
195846
|
-
return { ...entry.config };
|
|
195847
|
-
}
|
|
195848
|
-
async updateConfig(key, context, config) {
|
|
195849
|
-
const storageKey = this.generateStorageKey(key, context);
|
|
195850
|
-
const entry = this.store.get(storageKey);
|
|
195851
|
-
if (!entry) {
|
|
195852
|
-
return false;
|
|
195853
|
-
}
|
|
195854
|
-
entry.config = {
|
|
195855
|
-
...entry.config,
|
|
195856
|
-
...config
|
|
195857
|
-
};
|
|
195858
|
-
this.store.set(storageKey, entry);
|
|
195859
|
-
return true;
|
|
195860
|
-
}
|
|
195861
|
-
generateStorageKey(key, context) {
|
|
195862
|
-
switch (context.level) {
|
|
195863
|
-
case "global":
|
|
195864
|
-
return `global:${context.agentId}:${key}`;
|
|
195865
|
-
case "world":
|
|
195866
|
-
return `world:${context.worldId}:${key}`;
|
|
195867
|
-
case "user":
|
|
195868
|
-
return `user:${context.userId}:${key}`;
|
|
195869
|
-
default:
|
|
195870
|
-
return `unknown:${key}`;
|
|
195871
|
-
}
|
|
195872
|
-
}
|
|
195873
|
-
getContextPrefix(context) {
|
|
195874
|
-
switch (context.level) {
|
|
195875
|
-
case "global":
|
|
195876
|
-
return `global:${context.agentId}:`;
|
|
195877
|
-
case "world":
|
|
195878
|
-
return `world:${context.worldId}:`;
|
|
195879
|
-
case "user":
|
|
195880
|
-
return `user:${context.userId}:`;
|
|
195881
|
-
default:
|
|
195882
|
-
return "";
|
|
195883
|
-
}
|
|
195884
|
-
}
|
|
195885
|
-
extractOriginalKey(storageKey, context) {
|
|
195886
|
-
const prefix = this.getContextPrefix(context);
|
|
195887
|
-
if (!storageKey.startsWith(prefix)) {
|
|
195888
|
-
return null;
|
|
195889
|
-
}
|
|
195890
|
-
return storageKey.slice(prefix.length);
|
|
195891
|
-
}
|
|
195892
|
-
clear() {
|
|
195893
|
-
this.store.clear();
|
|
195894
|
-
}
|
|
195895
|
-
size() {
|
|
195896
|
-
return this.store.size;
|
|
195897
|
-
}
|
|
195898
|
-
}
|
|
195899
|
-
|
|
195900
195786
|
// src/features/secrets/storage/world-store.ts
|
|
195901
195787
|
init_logger2();
|
|
195902
195788
|
init_types4();
|
|
@@ -196140,6 +196026,121 @@ class WorldMetadataStorage extends BaseSecretStorage {
|
|
|
196140
196026
|
this.worldCache.delete(worldId);
|
|
196141
196027
|
}
|
|
196142
196028
|
}
|
|
196029
|
+
// src/features/secrets/storage/memory-store.ts
|
|
196030
|
+
class MemorySecretStorage extends BaseSecretStorage {
|
|
196031
|
+
storageType = "memory";
|
|
196032
|
+
store = new Map;
|
|
196033
|
+
async initialize() {}
|
|
196034
|
+
async exists(key, context) {
|
|
196035
|
+
const storageKey = this.generateStorageKey(key, context);
|
|
196036
|
+
return this.store.has(storageKey);
|
|
196037
|
+
}
|
|
196038
|
+
async get(key, context) {
|
|
196039
|
+
const storageKey = this.generateStorageKey(key, context);
|
|
196040
|
+
const entry = this.store.get(storageKey);
|
|
196041
|
+
if (!entry) {
|
|
196042
|
+
return null;
|
|
196043
|
+
}
|
|
196044
|
+
if (entry.config.expiresAt && entry.config.expiresAt < Date.now()) {
|
|
196045
|
+
this.store.delete(storageKey);
|
|
196046
|
+
return null;
|
|
196047
|
+
}
|
|
196048
|
+
return entry.value;
|
|
196049
|
+
}
|
|
196050
|
+
async set(key, value, context, config) {
|
|
196051
|
+
const storageKey = this.generateStorageKey(key, context);
|
|
196052
|
+
const existingEntry = this.store.get(storageKey);
|
|
196053
|
+
const fullConfig = this.createDefaultConfig(key, context, {
|
|
196054
|
+
...existingEntry?.config,
|
|
196055
|
+
...config
|
|
196056
|
+
});
|
|
196057
|
+
this.store.set(storageKey, {
|
|
196058
|
+
value,
|
|
196059
|
+
config: fullConfig
|
|
196060
|
+
});
|
|
196061
|
+
return true;
|
|
196062
|
+
}
|
|
196063
|
+
async delete(key, context) {
|
|
196064
|
+
const storageKey = this.generateStorageKey(key, context);
|
|
196065
|
+
return this.store.delete(storageKey);
|
|
196066
|
+
}
|
|
196067
|
+
async list(context) {
|
|
196068
|
+
const prefix = this.getContextPrefix(context);
|
|
196069
|
+
const metadata = {};
|
|
196070
|
+
for (const [storageKey, entry] of this.store) {
|
|
196071
|
+
if (storageKey.startsWith(prefix)) {
|
|
196072
|
+
const originalKey = this.extractOriginalKey(storageKey, context);
|
|
196073
|
+
if (originalKey) {
|
|
196074
|
+
if (entry.config.expiresAt && entry.config.expiresAt < Date.now()) {
|
|
196075
|
+
this.store.delete(storageKey);
|
|
196076
|
+
continue;
|
|
196077
|
+
}
|
|
196078
|
+
metadata[originalKey] = { ...entry.config };
|
|
196079
|
+
}
|
|
196080
|
+
}
|
|
196081
|
+
}
|
|
196082
|
+
return metadata;
|
|
196083
|
+
}
|
|
196084
|
+
async getConfig(key, context) {
|
|
196085
|
+
const storageKey = this.generateStorageKey(key, context);
|
|
196086
|
+
const entry = this.store.get(storageKey);
|
|
196087
|
+
if (!entry) {
|
|
196088
|
+
return null;
|
|
196089
|
+
}
|
|
196090
|
+
return { ...entry.config };
|
|
196091
|
+
}
|
|
196092
|
+
async updateConfig(key, context, config) {
|
|
196093
|
+
const storageKey = this.generateStorageKey(key, context);
|
|
196094
|
+
const entry = this.store.get(storageKey);
|
|
196095
|
+
if (!entry) {
|
|
196096
|
+
return false;
|
|
196097
|
+
}
|
|
196098
|
+
entry.config = {
|
|
196099
|
+
...entry.config,
|
|
196100
|
+
...config
|
|
196101
|
+
};
|
|
196102
|
+
this.store.set(storageKey, entry);
|
|
196103
|
+
return true;
|
|
196104
|
+
}
|
|
196105
|
+
generateStorageKey(key, context) {
|
|
196106
|
+
switch (context.level) {
|
|
196107
|
+
case "global":
|
|
196108
|
+
return `global:${context.agentId}:${key}`;
|
|
196109
|
+
case "world":
|
|
196110
|
+
return `world:${context.worldId}:${key}`;
|
|
196111
|
+
case "user":
|
|
196112
|
+
return `user:${context.userId}:${key}`;
|
|
196113
|
+
default:
|
|
196114
|
+
return `unknown:${key}`;
|
|
196115
|
+
}
|
|
196116
|
+
}
|
|
196117
|
+
getContextPrefix(context) {
|
|
196118
|
+
switch (context.level) {
|
|
196119
|
+
case "global":
|
|
196120
|
+
return `global:${context.agentId}:`;
|
|
196121
|
+
case "world":
|
|
196122
|
+
return `world:${context.worldId}:`;
|
|
196123
|
+
case "user":
|
|
196124
|
+
return `user:${context.userId}:`;
|
|
196125
|
+
default:
|
|
196126
|
+
return "";
|
|
196127
|
+
}
|
|
196128
|
+
}
|
|
196129
|
+
extractOriginalKey(storageKey, context) {
|
|
196130
|
+
const prefix = this.getContextPrefix(context);
|
|
196131
|
+
if (!storageKey.startsWith(prefix)) {
|
|
196132
|
+
return null;
|
|
196133
|
+
}
|
|
196134
|
+
return storageKey.slice(prefix.length);
|
|
196135
|
+
}
|
|
196136
|
+
clear() {
|
|
196137
|
+
this.store.clear();
|
|
196138
|
+
}
|
|
196139
|
+
size() {
|
|
196140
|
+
return this.store.size;
|
|
196141
|
+
}
|
|
196142
|
+
}
|
|
196143
|
+
|
|
196143
196144
|
// src/features/secrets/storage/index.ts
|
|
196144
196145
|
var __bundle_safety_FEATURES_SECRETS_STORAGE_INDEX__ = [
|
|
196145
196146
|
CharacterSettingsStorage,
|
|
@@ -242504,7 +242505,8 @@ function parseSayLiteralInstruction(text5) {
|
|
|
242504
242505
|
const input = text5?.trim();
|
|
242505
242506
|
if (!input)
|
|
242506
242507
|
return null;
|
|
242507
|
-
const
|
|
242508
|
+
const body = input.replace(/^\s*(?:<@!?\d+>\s*|@\S+\s+|[^()\n]{0,80}\(@\d+\)\s*)/u, "").trim();
|
|
242509
|
+
const match2 = body.match(/^(?:(?:can|could|would|will)\s+you\s+|please\s+|just\s+|kindly\s+){0,3}(?:say|reply|respond|answer|output|return|write|type|echo|print)(?:\s+(?:with|back|the\s+word|the\s+phrase)){0,2}\s*:?\s*["'“”‘’]?([\p{L}\p{N}]{1,40})["'“”‘’]?\s*[.!?]*$/iu);
|
|
242508
242510
|
return match2 ? match2[1] : null;
|
|
242509
242511
|
}
|
|
242510
242512
|
function isTerseReplyWorthKeeping(args) {
|
|
@@ -262814,5 +262816,5 @@ export {
|
|
|
262814
262816
|
ACTION_CONFIRMATION_STATUS_VALUES
|
|
262815
262817
|
};
|
|
262816
262818
|
|
|
262817
|
-
//# debugId=
|
|
262819
|
+
//# debugId=835C97CF7A82F23664756E2164756E21
|
|
262818
262820
|
//# sourceMappingURL=index.node.js.map
|