@elizaos/ui 2.0.0-alpha.378 → 2.0.0-alpha.379
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":"owner-website-block.d.ts","sourceRoot":"","sources":["../../../../../../../apps/app-lifeops/src/actions/owner-website-block.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;
|
|
1
|
+
{"version":3,"file":"owner-website-block.d.ts","sourceRoot":"","sources":["../../../../../../../apps/app-lifeops/src/actions/owner-website-block.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAGH,OAAO,KAAK,EACV,MAAM,EAOP,MAAM,eAAe,CAAC;AAiTvB,eAAO,MAAM,uBAAuB,EAAE,MAAM,GAAG;IAC7C,8BAA8B,CAAC,EAAE,OAAO,CAAC;CAgP1C,CAAC"}
|
|
@@ -5,8 +5,8 @@
|
|
|
5
5
|
* request_permission) into a single owner-only action dispatched by a required
|
|
6
6
|
* `subaction` parameter. Routes to the existing handlers in website-blocker.ts.
|
|
7
7
|
*/
|
|
8
|
-
import { ModelType, parseJSONObjectFromText, parseKeyValueXml, } from "@elizaos/core";
|
|
9
8
|
import { extractActionParamsViaLlm } from "@elizaos/agent";
|
|
9
|
+
import { ModelType, parseJSONObjectFromText, parseKeyValueXml, } from "@elizaos/core";
|
|
10
10
|
import { getSelfControlAccess, SELFCONTROL_ACCESS_ERROR, } from "../website-blocker/access.js";
|
|
11
11
|
import { recentConversationTexts as collectRecentConversationTexts } from "./life-recent-context.js";
|
|
12
12
|
import { blockWebsitesAction, getWebsiteBlockStatusAction, requestWebsiteBlockingPermissionAction, unblockWebsitesAction, } from "./website-blocker.js";
|
|
@@ -358,17 +358,31 @@ export const ownerWebsiteBlockAction = {
|
|
|
358
358
|
}
|
|
359
359
|
const rawParams = (options?.parameters ??
|
|
360
360
|
{});
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
361
|
+
let params = rawParams;
|
|
362
|
+
let subaction = coerceSubaction(rawParams.subaction);
|
|
363
|
+
if (!subaction) {
|
|
364
|
+
const recentConversationLines = await collectRecentConversationTexts({
|
|
365
|
+
runtime,
|
|
366
|
+
message,
|
|
367
|
+
state,
|
|
368
|
+
limit: 8,
|
|
369
|
+
});
|
|
370
|
+
subaction =
|
|
371
|
+
inferRecentSubaction(getMessageText(message), recentConversationLines) ?? undefined;
|
|
372
|
+
}
|
|
373
|
+
if (!subaction) {
|
|
374
|
+
params = (await extractActionParamsViaLlm({
|
|
375
|
+
runtime,
|
|
376
|
+
message,
|
|
377
|
+
state,
|
|
378
|
+
actionName: ACTION_NAME,
|
|
379
|
+
actionDescription: ownerWebsiteBlockAction.description ?? "",
|
|
380
|
+
paramSchema: ownerWebsiteBlockAction.parameters ?? [],
|
|
381
|
+
existingParams: rawParams,
|
|
382
|
+
requiredFields: ["subaction"],
|
|
383
|
+
}));
|
|
384
|
+
subaction = coerceSubaction(params.subaction);
|
|
385
|
+
}
|
|
372
386
|
if (!subaction) {
|
|
373
387
|
const plan = await resolveOwnerWebsiteBlockPlanWithLlm({
|
|
374
388
|
runtime,
|