@elizaos/ui 2.0.0-alpha.380 → 2.0.0-alpha.382
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.
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"intent-sync.d.ts","sourceRoot":"","sources":["../../../../../../../apps/app-lifeops/src/actions/intent-sync.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"intent-sync.d.ts","sourceRoot":"","sources":["../../../../../../../apps/app-lifeops/src/actions/intent-sync.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EACV,MAAM,EAMP,MAAM,eAAe,CAAC;AAqGvB,eAAO,MAAM,gBAAgB,EAAE,MAAM,GAAG;IACtC,8BAA8B,CAAC,EAAE,OAAO,CAAC;CA6S1C,CAAC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { extractActionParamsViaLlm, hasAdminAccess } from "@elizaos/agent";
|
|
2
|
-
import {
|
|
2
|
+
import { acknowledgeIntent, broadcastIntent, LIFE_INTENT_KINDS, LIFE_INTENT_PRIORITIES, LIFE_INTENT_TARGETS, pruneExpiredIntents, receivePendingIntents, } from "../lifeops/intent-sync.js";
|
|
3
3
|
const ACTION_NAME = "INTENT_SYNC";
|
|
4
4
|
const SUBACTIONS = [
|
|
5
5
|
"broadcast",
|
|
@@ -48,6 +48,15 @@ function normalizeParams(raw) {
|
|
|
48
48
|
return {};
|
|
49
49
|
return raw;
|
|
50
50
|
}
|
|
51
|
+
function withStructuredBroadcastDefault(params) {
|
|
52
|
+
if (coerceString(params.subaction) ||
|
|
53
|
+
coerceString(params.mode) ||
|
|
54
|
+
coerceString(params.action) ||
|
|
55
|
+
!coerceString(params.kind)) {
|
|
56
|
+
return params;
|
|
57
|
+
}
|
|
58
|
+
return { ...params, subaction: "broadcast" };
|
|
59
|
+
}
|
|
51
60
|
function validationTerminate(error, message, extra = {}) {
|
|
52
61
|
return {
|
|
53
62
|
text: message,
|
|
@@ -194,7 +203,7 @@ export const intentSyncAction = {
|
|
|
194
203
|
return fail("PERMISSION_DENIED");
|
|
195
204
|
}
|
|
196
205
|
const rawParameters = options?.parameters;
|
|
197
|
-
const normalized = normalizeParams(rawParameters);
|
|
206
|
+
const normalized = withStructuredBroadcastDefault(normalizeParams(rawParameters));
|
|
198
207
|
const params = (await extractActionParamsViaLlm({
|
|
199
208
|
runtime,
|
|
200
209
|
message,
|