@elizaos/agent 2.0.0-alpha.193 → 2.0.0-alpha.197
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/apps/app-lifeops/src/action.d.ts.map +1 -1
- package/apps/app-lifeops/src/action.js +21 -2
- package/apps/app-lifeops/src/actions/app-blocker.d.ts +3 -1
- package/apps/app-lifeops/src/actions/app-blocker.d.ts.map +1 -1
- package/apps/app-lifeops/src/actions/app-blocker.js +2 -0
- package/apps/app-lifeops/src/actions/calendar.d.ts.map +1 -1
- package/apps/app-lifeops/src/actions/calendar.js +140 -7
- package/apps/app-lifeops/src/actions/computer-use.d.ts.map +1 -1
- package/apps/app-lifeops/src/actions/computer-use.js +248 -17
- package/apps/app-lifeops/src/actions/cross-channel-send.d.ts +3 -1
- package/apps/app-lifeops/src/actions/cross-channel-send.d.ts.map +1 -1
- package/apps/app-lifeops/src/actions/cross-channel-send.js +1 -0
- package/apps/app-lifeops/src/actions/dossier.d.ts.map +1 -1
- package/apps/app-lifeops/src/actions/dossier.js +51 -34
- package/apps/app-lifeops/src/actions/gmail.d.ts.map +1 -1
- package/apps/app-lifeops/src/actions/gmail.js +5 -0
- package/apps/app-lifeops/src/actions/inbox.d.ts.map +1 -1
- package/apps/app-lifeops/src/actions/inbox.js +8 -1
- package/apps/app-lifeops/src/actions/life.d.ts.map +1 -1
- package/apps/app-lifeops/src/actions/life.extractor.d.ts.map +1 -1
- package/apps/app-lifeops/src/actions/life.extractor.js +103 -4
- package/apps/app-lifeops/src/actions/life.js +8 -0
- package/apps/app-lifeops/src/actions/non-actionable-request.d.ts +6 -0
- package/apps/app-lifeops/src/actions/non-actionable-request.d.ts.map +1 -0
- package/apps/app-lifeops/src/actions/non-actionable-request.js +33 -0
- package/apps/app-lifeops/src/actions/password-manager.d.ts.map +1 -1
- package/apps/app-lifeops/src/actions/password-manager.js +11 -2
- package/apps/app-lifeops/src/actions/relationships.d.ts +3 -1
- package/apps/app-lifeops/src/actions/relationships.d.ts.map +1 -1
- package/apps/app-lifeops/src/actions/relationships.js +167 -11
- package/apps/app-lifeops/src/actions/remote-desktop.js +1 -1
- package/apps/app-lifeops/src/actions/screen-time.d.ts.map +1 -1
- package/apps/app-lifeops/src/actions/screen-time.js +8 -2
- package/apps/app-lifeops/src/actions/start-remote-session.js +1 -1
- package/apps/app-lifeops/src/actions/subscriptions.d.ts +5 -0
- package/apps/app-lifeops/src/actions/subscriptions.d.ts.map +1 -0
- package/apps/app-lifeops/src/actions/subscriptions.js +251 -0
- package/apps/app-lifeops/src/actions/twilio-call.d.ts.map +1 -1
- package/apps/app-lifeops/src/actions/twilio-call.js +48 -3
- package/apps/app-lifeops/src/actions/update-owner-profile.d.ts.map +1 -1
- package/apps/app-lifeops/src/actions/update-owner-profile.js +2 -1
- package/apps/app-lifeops/src/actions/website-blocker.d.ts +6 -2
- package/apps/app-lifeops/src/actions/website-blocker.d.ts.map +1 -1
- package/apps/app-lifeops/src/actions/website-blocker.js +38 -0
- package/apps/app-lifeops/src/actions/x-read.d.ts.map +1 -1
- package/apps/app-lifeops/src/actions/x-read.js +27 -3
- package/apps/app-lifeops/src/dossier/action.d.ts.map +1 -1
- package/apps/app-lifeops/src/dossier/action.js +8 -7
- package/apps/app-lifeops/src/followup/actions/listOverdueFollowups.d.ts.map +1 -1
- package/apps/app-lifeops/src/followup/actions/listOverdueFollowups.js +1 -0
- package/apps/app-lifeops/src/followup/actions/markFollowupDone.d.ts.map +1 -1
- package/apps/app-lifeops/src/followup/actions/markFollowupDone.js +2 -1
- package/apps/app-lifeops/src/followup/actions/setFollowupThreshold.d.ts.map +1 -1
- package/apps/app-lifeops/src/followup/actions/setFollowupThreshold.js +2 -1
- package/apps/app-lifeops/src/lifeops/calendly-client.d.ts.map +1 -1
- package/apps/app-lifeops/src/lifeops/calendly-client.js +4 -2
- package/apps/app-lifeops/src/lifeops/discord-browser-scraper.d.ts.map +1 -1
- package/apps/app-lifeops/src/lifeops/discord-browser-scraper.js +6 -5
- package/apps/app-lifeops/src/lifeops/password-manager-bridge.d.ts +1 -1
- package/apps/app-lifeops/src/lifeops/password-manager-bridge.d.ts.map +1 -1
- package/apps/app-lifeops/src/lifeops/password-manager-bridge.js +84 -6
- package/apps/app-lifeops/src/lifeops/remote-desktop.d.ts.map +1 -1
- package/apps/app-lifeops/src/lifeops/remote-desktop.js +30 -0
- package/apps/app-lifeops/src/lifeops/repository.d.ts +15 -0
- package/apps/app-lifeops/src/lifeops/repository.d.ts.map +1 -1
- package/apps/app-lifeops/src/lifeops/repository.js +330 -1
- package/apps/app-lifeops/src/lifeops/service-mixin-discord.js +222 -42
- package/apps/app-lifeops/src/lifeops/service-mixin-subscriptions.d.ts +2 -0
- package/apps/app-lifeops/src/lifeops/service-mixin-subscriptions.d.ts.map +1 -0
- package/apps/app-lifeops/src/lifeops/service-mixin-subscriptions.js +763 -0
- package/apps/app-lifeops/src/lifeops/service.d.ts +63 -0
- package/apps/app-lifeops/src/lifeops/service.d.ts.map +1 -1
- package/apps/app-lifeops/src/lifeops/service.js +2 -1
- package/apps/app-lifeops/src/lifeops/subscriptions-playbooks.d.ts +54 -0
- package/apps/app-lifeops/src/lifeops/subscriptions-playbooks.d.ts.map +1 -0
- package/apps/app-lifeops/src/lifeops/subscriptions-playbooks.js +213 -0
- package/apps/app-lifeops/src/lifeops/subscriptions-types.d.ts +80 -0
- package/apps/app-lifeops/src/lifeops/subscriptions-types.d.ts.map +1 -0
- package/apps/app-lifeops/src/lifeops/twilio.d.ts.map +1 -1
- package/apps/app-lifeops/src/lifeops/twilio.js +4 -2
- package/apps/app-lifeops/src/lifeops/whatsapp-client.d.ts.map +1 -1
- package/apps/app-lifeops/src/lifeops/whatsapp-client.js +4 -2
- package/apps/app-lifeops/src/lifeops/x-poster.d.ts.map +1 -1
- package/apps/app-lifeops/src/lifeops/x-poster.js +12 -6
- package/apps/app-lifeops/src/lifeops/x-reader.d.ts.map +1 -1
- package/apps/app-lifeops/src/lifeops/x-reader.js +7 -5
- package/apps/app-lifeops/src/plugin.d.ts.map +1 -1
- package/apps/app-lifeops/src/plugin.js +31 -24
- package/apps/app-lifeops/src/provider.d.ts.map +1 -1
- package/apps/app-lifeops/src/provider.js +4 -4
- package/apps/app-lifeops/src/providers/inbox-triage.js +2 -2
- package/apps/app-lifeops/src/providers/lifeops.d.ts.map +1 -1
- package/apps/app-lifeops/src/providers/lifeops.js +19 -10
- package/apps/app-lifeops/src/providers/website-blocker.js +1 -1
- package/apps/app-lifeops/src/public.d.ts +4 -0
- package/apps/app-lifeops/src/public.d.ts.map +1 -0
- package/apps/app-lifeops/src/public.js +3 -0
- package/apps/app-lifeops/src/routes/plugin.d.ts +18 -0
- package/apps/app-lifeops/src/routes/plugin.d.ts.map +1 -0
- package/apps/app-lifeops/src/routes/plugin.js +270 -0
- package/apps/app-lifeops/src/website-blocker/chat-integration/actions/blockUntilTaskComplete.d.ts.map +1 -1
- package/apps/app-lifeops/src/website-blocker/chat-integration/actions/blockUntilTaskComplete.js +18 -2
- package/apps/app-training/src/core/training-orchestrator.d.ts.map +1 -1
- package/apps/app-training/src/core/training-orchestrator.js +4 -0
- package/apps/app-training/src/services/training-trigger.d.ts +32 -18
- package/apps/app-training/src/services/training-trigger.d.ts.map +1 -1
- package/apps/app-training/src/services/training-trigger.js +10 -1
- package/package.json +4 -4
- package/packages/agent/src/actions/browser-session.d.ts +3 -0
- package/packages/agent/src/actions/browser-session.d.ts.map +1 -0
- package/packages/agent/src/actions/browser-session.js +207 -0
- package/packages/agent/src/actions/context-signal.d.ts +1 -1
- package/packages/agent/src/actions/context-signal.d.ts.map +1 -1
- package/packages/agent/src/actions/context-signal.js +1 -1
- package/packages/agent/src/actions/extract-page.d.ts +3 -0
- package/packages/agent/src/actions/extract-page.d.ts.map +1 -0
- package/packages/agent/src/actions/extract-page.js +124 -0
- package/packages/agent/src/actions/grounded-action-reply.js +1 -1
- package/packages/agent/src/actions/recent-conversation-texts.d.ts +9 -0
- package/packages/agent/src/actions/recent-conversation-texts.d.ts.map +1 -0
- package/packages/agent/src/actions/recent-conversation-texts.js +81 -0
- package/packages/agent/src/actions/set-user-name.js +1 -1
- package/packages/agent/src/actions/web-search.d.ts +4 -10
- package/packages/agent/src/actions/web-search.d.ts.map +1 -1
- package/packages/agent/src/actions/web-search.js +89 -19
- package/packages/agent/src/api/binance-skill-helpers.d.ts.map +1 -1
- package/packages/agent/src/api/binance-skill-helpers.js +1 -1
- package/packages/agent/src/api/chat-augmentation.d.ts +1 -20
- package/packages/agent/src/api/chat-augmentation.d.ts.map +1 -1
- package/packages/agent/src/api/chat-augmentation.js +2 -110
- package/packages/agent/src/api/conversation-metadata.d.ts +9 -0
- package/packages/agent/src/api/conversation-metadata.d.ts.map +1 -0
- package/packages/agent/src/api/conversation-metadata.js +98 -0
- package/packages/agent/src/api/conversation-routes.d.ts.map +1 -1
- package/packages/agent/src/api/conversation-routes.js +40 -9
- package/packages/agent/src/api/lifeops-browser-packaging.d.ts +1 -1
- package/packages/agent/src/api/lifeops-browser-packaging.d.ts.map +1 -1
- package/packages/agent/src/api/lifeops-browser-packaging.js +1 -1
- package/packages/agent/src/api/permissions-routes.js +1 -1
- package/packages/agent/src/api/server-helpers-auth.js +1 -1
- package/packages/agent/src/api/server-helpers.d.ts +2 -1
- package/packages/agent/src/api/server-helpers.d.ts.map +1 -1
- package/packages/agent/src/api/server-helpers.js +2 -110
- package/packages/agent/src/api/server-types.d.ts +14 -0
- package/packages/agent/src/api/server-types.d.ts.map +1 -1
- package/packages/agent/src/api/server.d.ts.map +1 -1
- package/packages/agent/src/api/server.js +3 -13
- package/packages/agent/src/api/workbench-routes.d.ts.map +1 -1
- package/packages/agent/src/api/workbench-routes.js +0 -14
- package/packages/agent/src/auth/credentials.d.ts.map +1 -1
- package/packages/agent/src/auth/credentials.js +8 -0
- package/packages/agent/src/config/zod-schema.d.ts +2 -2
- package/packages/agent/src/config/zod-schema.providers-core.d.ts +3 -3
- package/packages/agent/src/providers/automation-terminal-bridge.d.ts +3 -0
- package/packages/agent/src/providers/automation-terminal-bridge.d.ts.map +1 -0
- package/packages/agent/src/providers/automation-terminal-bridge.js +71 -0
- package/packages/agent/src/providers/index.d.ts +1 -0
- package/packages/agent/src/providers/index.d.ts.map +1 -1
- package/packages/agent/src/providers/index.js +1 -0
- package/packages/agent/src/providers/recent-conversations.d.ts.map +1 -1
- package/packages/agent/src/providers/recent-conversations.js +5 -0
- package/packages/agent/src/providers/relevant-conversations.d.ts.map +1 -1
- package/packages/agent/src/providers/relevant-conversations.js +5 -0
- package/packages/agent/src/providers/user-name.d.ts.map +1 -1
- package/packages/agent/src/providers/user-name.js +1 -1
- package/packages/agent/src/runtime/eliza-plugin.d.ts.map +1 -1
- package/packages/agent/src/runtime/eliza-plugin.js +6 -0
- package/packages/agent/src/runtime/plugin-resolver.d.ts.map +1 -1
- package/packages/agent/src/runtime/plugin-resolver.js +115 -0
- package/packages/agent/src/services/browser-workspace-types.d.ts +5 -1
- package/packages/agent/src/services/browser-workspace-types.d.ts.map +1 -1
- package/packages/agent/src/services/browser-workspace.d.ts.map +1 -1
- package/packages/agent/src/services/browser-workspace.js +178 -7
- package/packages/agent/src/services/coding-agent-context.d.ts +4 -4
- package/packages/agent/src/services/escalation.d.ts +0 -11
- package/packages/agent/src/services/escalation.d.ts.map +1 -1
- package/packages/agent/src/services/escalation.js +19 -58
- package/packages/agent/src/services/hosted-tools.d.ts +70 -0
- package/packages/agent/src/services/hosted-tools.d.ts.map +1 -0
- package/packages/agent/src/services/hosted-tools.js +87 -0
- package/packages/agent/src/services/owner-name.d.ts +4 -0
- package/packages/agent/src/services/owner-name.d.ts.map +1 -0
- package/packages/agent/src/services/owner-name.js +46 -0
- package/packages/agent/src/services/registry-client-queries.d.ts +1 -1
- package/packages/agent/src/services/registry-client-queries.js +1 -1
- package/packages/agent/src/services/registry-client-types.d.ts +1 -1
- package/packages/agent/src/services/stream-manager.d.ts +1 -1
- package/packages/app-core/src/config/boot-config-store.d.ts +1 -1
- package/packages/app-core/src/config/boot-config-store.d.ts.map +1 -1
- package/packages/shared/src/contracts/lifeops.d.ts +26 -0
- package/packages/shared/src/contracts/lifeops.d.ts.map +1 -1
- package/packages/shared/src/contracts/lifeops.js +28 -0
- package/packages/typescript/src/actions.d.ts.map +1 -1
- package/packages/typescript/src/actions.js +12 -0
- package/packages/typescript/src/features/advanced-capabilities/actions/scheduleFollowUp.d.ts.map +1 -1
- package/packages/typescript/src/features/advanced-capabilities/actions/scheduleFollowUp.js +8 -2
- package/packages/typescript/src/features/advanced-capabilities/providers/settings.d.ts.map +1 -1
- package/packages/typescript/src/features/advanced-capabilities/providers/settings.js +11 -3
- package/packages/typescript/src/features/basic-capabilities/providers/actions.d.ts.map +1 -1
- package/packages/typescript/src/features/basic-capabilities/providers/actions.js +23 -1
- package/packages/typescript/src/features/basic-capabilities/providers/non-actionable-chatter.d.ts +5 -0
- package/packages/typescript/src/features/basic-capabilities/providers/non-actionable-chatter.d.ts.map +1 -0
- package/packages/typescript/src/features/basic-capabilities/providers/non-actionable-chatter.js +22 -0
- package/packages/typescript/src/features/basic-capabilities/providers/providers.d.ts.map +1 -1
- package/packages/typescript/src/features/basic-capabilities/providers/providers.js +10 -5
- package/packages/typescript/src/features/knowledge/documents-provider.d.ts.map +1 -1
- package/packages/typescript/src/features/knowledge/documents-provider.js +1 -0
- package/packages/typescript/src/features/shared/schedule-follow-up-response.d.ts +10 -0
- package/packages/typescript/src/features/shared/schedule-follow-up-response.d.ts.map +1 -0
- package/packages/typescript/src/features/shared/schedule-follow-up-response.js +49 -0
- package/packages/typescript/src/features/trajectories/TrajectoriesService.d.ts +1 -0
- package/packages/typescript/src/features/trajectories/TrajectoriesService.d.ts.map +1 -1
- package/packages/typescript/src/features/trajectories/TrajectoriesService.js +21 -2
- package/packages/typescript/src/features/trust/providers/settings.d.ts.map +1 -1
- package/packages/typescript/src/features/trust/providers/settings.js +11 -1
- package/packages/typescript/src/prompts.d.ts +4 -4
- package/packages/typescript/src/prompts.d.ts.map +1 -1
- package/packages/typescript/src/prompts.js +10 -2
- package/packages/typescript/src/schemas/character.d.ts +3 -3
- package/packages/typescript/src/services/message.d.ts +1 -0
- package/packages/typescript/src/services/message.d.ts.map +1 -1
- package/packages/typescript/src/services/message.js +483 -18
- package/packages/typescript/src/types/components.d.ts +6 -0
- package/packages/typescript/src/types/components.d.ts.map +1 -1
- package/packages/typescript/src/utils/context-routing.d.ts.map +1 -1
- package/packages/typescript/src/utils/context-routing.js +5 -1
- package/packages/typescript/src/utils/toon.d.ts.map +1 -1
- package/packages/typescript/src/utils/toon.js +23 -2
- package/packages/typescript/src/utils.d.ts +1 -0
- package/packages/typescript/src/utils.d.ts.map +1 -1
- package/packages/typescript/src/utils.js +4 -3
- package/apps/app-lifeops/src/types/app-blocker-settings-card.d.ts +0 -2
- package/apps/app-lifeops/src/types/app-blocker-settings-card.d.ts.map +0 -1
- package/apps/app-lifeops/src/types/index.d.ts +0 -3
- package/apps/app-lifeops/src/types/index.d.ts.map +0 -1
- package/apps/app-lifeops/src/types/index.js +0 -1
- package/apps/app-lifeops/src/types/website-blocker-settings-card.d.ts +0 -2
- package/apps/app-lifeops/src/types/website-blocker-settings-card.d.ts.map +0 -1
- package/apps/app-lifeops/src/types/website-blocker-settings-card.js +0 -1
- /package/apps/app-lifeops/src/{types/app-blocker-settings-card.js → lifeops/subscriptions-types.js} +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"action.d.ts","sourceRoot":"","sources":["../../../../../../apps/app-lifeops/src/action.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"action.d.ts","sourceRoot":"","sources":["../../../../../../apps/app-lifeops/src/action.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EACV,MAAM,EAMP,MAAM,eAAe,CAAC;AAgXvB,eAAO,MAAM,0BAA0B,EAAE,MAmFxC,CAAC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { LifeOpsService, LifeOpsServiceError, } from "./lifeops/service.js";
|
|
2
1
|
import { hasAdminAccess } from "@elizaos/agent/security/access";
|
|
2
|
+
import { LifeOpsService, LifeOpsServiceError } from "./lifeops/service.js";
|
|
3
3
|
const URL_RE = /https?:\/\/[^\s)]+/i;
|
|
4
4
|
function getMessageText(message) {
|
|
5
5
|
return typeof message.content?.text === "string" ? message.content.text : "";
|
|
@@ -52,6 +52,8 @@ function inferCommandFromMessage(text) {
|
|
|
52
52
|
}
|
|
53
53
|
function commandToActionKind(command) {
|
|
54
54
|
switch (command) {
|
|
55
|
+
case "start":
|
|
56
|
+
return "open";
|
|
55
57
|
case "open":
|
|
56
58
|
case "navigate":
|
|
57
59
|
case "focus_tab":
|
|
@@ -69,11 +71,16 @@ function commandToActionKind(command) {
|
|
|
69
71
|
throw new Error(`Unsupported browser command ${command}`);
|
|
70
72
|
}
|
|
71
73
|
}
|
|
74
|
+
function isDesktopOnlyAlias(command) {
|
|
75
|
+
return command === "finder" || command === "open_finder";
|
|
76
|
+
}
|
|
72
77
|
function actionLabel(command, params) {
|
|
73
78
|
if (params.title?.trim()) {
|
|
74
79
|
return params.title.trim();
|
|
75
80
|
}
|
|
76
81
|
switch (command) {
|
|
82
|
+
case "start":
|
|
83
|
+
return "Start browser session";
|
|
77
84
|
case "open":
|
|
78
85
|
return "Open URL in personal browser";
|
|
79
86
|
case "navigate":
|
|
@@ -222,6 +229,18 @@ async function runCommand(runtime, params) {
|
|
|
222
229
|
data: { session },
|
|
223
230
|
};
|
|
224
231
|
}
|
|
232
|
+
case "finder":
|
|
233
|
+
case "open_finder": {
|
|
234
|
+
return {
|
|
235
|
+
success: false,
|
|
236
|
+
text: "Finder and other desktop workflows should use LIFEOPS_COMPUTER_USE, not MANAGE_LIFEOPS_BROWSER.",
|
|
237
|
+
data: {
|
|
238
|
+
error: "DESKTOP_WORKFLOW",
|
|
239
|
+
command,
|
|
240
|
+
suggestedAction: "LIFEOPS_COMPUTER_USE",
|
|
241
|
+
},
|
|
242
|
+
};
|
|
243
|
+
}
|
|
225
244
|
default: {
|
|
226
245
|
const actionKind = commandToActionKind(command);
|
|
227
246
|
const request = {
|
|
@@ -259,7 +278,7 @@ async function runCommand(runtime, params) {
|
|
|
259
278
|
export const manageLifeOpsBrowserAction = {
|
|
260
279
|
name: "MANAGE_LIFEOPS_BROWSER",
|
|
261
280
|
similes: ["PERSONAL_BROWSER", "LIFEOPS_BROWSER", "MANAGE_PERSONAL_BROWSER"],
|
|
262
|
-
description: "Read and control the user's
|
|
281
|
+
description: "Read and control the user's real Chrome and Safari browsers connected through LifeOps Browser. This is not Milady Desktop Browser. Use LIFEOPS_COMPUTER_USE instead for Finder/Desktop automation, screenshots, folder creation, or local file workflows on this machine.",
|
|
263
282
|
validate: async (runtime, message) => hasAdminAccess(runtime, message),
|
|
264
283
|
handler: async (runtime, message, _state, options) => {
|
|
265
284
|
if (!(await hasAdminAccess(runtime, message))) {
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import type { Action } from "@elizaos/core";
|
|
2
|
-
export declare const blockAppsAction: Action
|
|
2
|
+
export declare const blockAppsAction: Action & {
|
|
3
|
+
suppressPostActionContinuation?: boolean;
|
|
4
|
+
};
|
|
3
5
|
export declare const unblockAppsAction: Action;
|
|
4
6
|
export declare const getAppBlockStatusAction: Action;
|
|
5
7
|
//# sourceMappingURL=app-blocker.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"app-blocker.d.ts","sourceRoot":"","sources":["../../../../../../../apps/app-lifeops/src/actions/app-blocker.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,MAAM,EAKP,MAAM,eAAe,CAAC;AAwMvB,eAAO,MAAM,eAAe,EAAE,
|
|
1
|
+
{"version":3,"file":"app-blocker.d.ts","sourceRoot":"","sources":["../../../../../../../apps/app-lifeops/src/actions/app-blocker.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,MAAM,EAKP,MAAM,eAAe,CAAC;AAwMvB,eAAO,MAAM,eAAe,EAAE,MAAM,GAAG;IACrC,8BAA8B,CAAC,EAAE,OAAO,CAAC;CAmN1C,CAAC;AAEF,eAAO,MAAM,iBAAiB,EAAE,MA6D/B,CAAC;AAEF,eAAO,MAAM,uBAAuB,EAAE,MA2ErC,CAAC"}
|
|
@@ -153,8 +153,10 @@ export const blockAppsAction = {
|
|
|
153
153
|
],
|
|
154
154
|
description: "Admin-only. Block selected apps on the user's phone using native OS controls. " +
|
|
155
155
|
"On iPhone, uses Family Controls to shield apps. On Android, uses Usage Access to detect and overlay blocked apps. " +
|
|
156
|
+
"Use this for requests like 'block all games on my phone until 6pm' or 'block the Slack app while I focus on deep work'. " +
|
|
156
157
|
"Pass app package names (Android) or previously selected app tokens (iPhone) to block.",
|
|
157
158
|
descriptionCompressed: "Admin: block phone apps via native OS controls (Family Controls/Usage Access).",
|
|
159
|
+
suppressPostActionContinuation: true,
|
|
158
160
|
validate: async (runtime, message) => {
|
|
159
161
|
const access = await getAppBlockerAccess(runtime, message);
|
|
160
162
|
return access.allowed;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"calendar.d.ts","sourceRoot":"","sources":["../../../../../../../apps/app-lifeops/src/actions/calendar.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,MAAM,EAKN,aAAa,EACb,MAAM,EACN,KAAK,EACN,MAAM,eAAe,CAAC;
|
|
1
|
+
{"version":3,"file":"calendar.d.ts","sourceRoot":"","sources":["../../../../../../../apps/app-lifeops/src/actions/calendar.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,MAAM,EAKN,aAAa,EACb,MAAM,EACN,KAAK,EACN,MAAM,eAAe,CAAC;AAyCvB,KAAK,iBAAiB,GAClB,MAAM,GACN,YAAY,GACZ,eAAe,GACf,cAAc,GACd,cAAc,GACd,cAAc,GACd,aAAa,CAAC;AAuBlB,MAAM,MAAM,eAAe,GAAG;IAC5B,SAAS,EAAE,iBAAiB,GAAG,IAAI,CAAC;IACpC,OAAO,EAAE,MAAM,EAAE,CAAC;IAClB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,SAAS,CAAC,EAAE,OAAO,GAAG,IAAI,CAAC;IAC3B,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB,CAAC;AAg0CF,wBAAsB,0BAA0B,CAC9C,OAAO,EAAE,aAAa,EACtB,OAAO,EAAE,MAAM,EACf,KAAK,EAAE,KAAK,GAAG,SAAS,EACxB,MAAM,EAAE,MAAM,EACd,QAAQ,SAA2B,GAClC,OAAO,CAAC,eAAe,CAAC,CA6J1B;AAu8BD,eAAO,MAAM,cAAc,EAAE,MAAM,GAAG;IACpC,8BAA8B,CAAC,EAAE,OAAO,CAAC;CA6jC1C,CAAC"}
|
|
@@ -4,6 +4,7 @@ import { LifeOpsService, LifeOpsServiceError } from "../lifeops/service.js";
|
|
|
4
4
|
import { addDaysToLocalDate, buildUtcDateFromLocalParts, getWeekdayForLocalDate, getZonedDateParts, } from "../lifeops/time.js";
|
|
5
5
|
import { renderGroundedActionReply } from "@elizaos/agent/actions/grounded-action-reply";
|
|
6
6
|
import { calendarReadUnavailableMessage, calendarWriteUnavailableMessage, detailArray, detailBoolean, detailNumber, detailString, formatCalendarEventDateTime, formatCalendarFeed, formatNextEventContext, getGoogleCapabilityStatus, hasLifeOpsAccess, INTERNAL_URL, messageText, toActionData, } from "./lifeops-google-helpers.js";
|
|
7
|
+
import { looksLikeCalendarObservation } from "./non-actionable-request.js";
|
|
7
8
|
const CALENDAR_SUBACTION_VALUES = [
|
|
8
9
|
"feed",
|
|
9
10
|
"next_event",
|
|
@@ -98,11 +99,11 @@ function normalizeCalendarSubaction(value) {
|
|
|
98
99
|
}
|
|
99
100
|
}
|
|
100
101
|
function buildCalendarPlanFromParsed(parsed) {
|
|
101
|
-
const
|
|
102
|
+
const subaction = normalizeCalendarSubaction(parsed.subaction);
|
|
103
|
+
const shouldAct = normalizeShouldAct(parsed.shouldAct) ?? (subaction ? true : null);
|
|
102
104
|
if (shouldAct === null) {
|
|
103
105
|
return null;
|
|
104
106
|
}
|
|
105
|
-
const subaction = normalizeCalendarSubaction(parsed.subaction);
|
|
106
107
|
if (shouldAct && subaction === null) {
|
|
107
108
|
return null;
|
|
108
109
|
}
|
|
@@ -217,6 +218,125 @@ function buildCalendarReplyOnlyFallback(subaction) {
|
|
|
217
218
|
return "What do you want to do on your calendar — check your schedule, find an event, or create one?";
|
|
218
219
|
}
|
|
219
220
|
}
|
|
221
|
+
function normalizeCalendarReadSubaction(value) {
|
|
222
|
+
if (value === "feed" ||
|
|
223
|
+
value === "next_event" ||
|
|
224
|
+
value === "search_events" ||
|
|
225
|
+
value === "trip_window") {
|
|
226
|
+
return value;
|
|
227
|
+
}
|
|
228
|
+
return null;
|
|
229
|
+
}
|
|
230
|
+
function normalizeCalendarReadResolution(parsed) {
|
|
231
|
+
if (!parsed) {
|
|
232
|
+
return null;
|
|
233
|
+
}
|
|
234
|
+
const subaction = normalizeCalendarReadSubaction(parsed.subaction);
|
|
235
|
+
const tripLocation = typeof parsed.tripLocation === "string" &&
|
|
236
|
+
parsed.tripLocation.trim().length > 0
|
|
237
|
+
? parsed.tripLocation.trim()
|
|
238
|
+
: undefined;
|
|
239
|
+
return { subaction, tripLocation };
|
|
240
|
+
}
|
|
241
|
+
function shouldDisambiguateCalendarReadPlan(plan) {
|
|
242
|
+
if (plan === null) {
|
|
243
|
+
return true;
|
|
244
|
+
}
|
|
245
|
+
return (plan.subaction === null ||
|
|
246
|
+
plan.subaction === "feed" ||
|
|
247
|
+
plan.subaction === "next_event" ||
|
|
248
|
+
plan.subaction === "search_events");
|
|
249
|
+
}
|
|
250
|
+
async function disambiguateCalendarReadPlanWithLlm(args) {
|
|
251
|
+
const prompt = [
|
|
252
|
+
"Resolve this calendar read intent.",
|
|
253
|
+
"The user may speak in any language.",
|
|
254
|
+
"Choose exactly one subaction: feed, next_event, search_events, trip_window, or null.",
|
|
255
|
+
"feed means a schedule or agenda view over today, tomorrow, this week, or another time window.",
|
|
256
|
+
"next_event means only the single next upcoming meeting or appointment.",
|
|
257
|
+
"search_events means find calendar events by title, attendee, location, date, or keyword, including flights and appointments.",
|
|
258
|
+
"trip_window means show what is happening while the user is in a place or during a trip/stay in that place.",
|
|
259
|
+
"Use null only when the request is not asking for a calendar read lookup.",
|
|
260
|
+
"If you choose trip_window, also return tripLocation when the place is recoverable from the request or recent conversation.",
|
|
261
|
+
"",
|
|
262
|
+
"Examples:",
|
|
263
|
+
' "What\'s on my calendar today?" -> {"subaction":"feed"}',
|
|
264
|
+
' "今日の予定は何ですか?" -> {"subaction":"feed"}',
|
|
265
|
+
' "What\'s my next meeting?" -> {"subaction":"next_event"}',
|
|
266
|
+
' "¿Cuál es mi próxima reunión?" -> {"subaction":"next_event"}',
|
|
267
|
+
' "find my return flight" -> {"subaction":"search_events"}',
|
|
268
|
+
' "東京にいる間、何がありますか?" -> {"subaction":"trip_window","tripLocation":"東京"}',
|
|
269
|
+
' "Can you help me with my calendar?" -> {"subaction":null}',
|
|
270
|
+
"",
|
|
271
|
+
"Return ONLY valid JSON with exactly these fields:",
|
|
272
|
+
" subaction: feed, next_event, search_events, trip_window, or null",
|
|
273
|
+
" tripLocation: optional string",
|
|
274
|
+
"",
|
|
275
|
+
`Current request: ${JSON.stringify(args.currentMessage)}`,
|
|
276
|
+
`Resolved intent: ${JSON.stringify(args.intent)}`,
|
|
277
|
+
`Recent conversation: ${JSON.stringify(args.recentConversation)}`,
|
|
278
|
+
`Current planner candidate: ${JSON.stringify(args.candidateSubaction)}`,
|
|
279
|
+
].join("\n");
|
|
280
|
+
try {
|
|
281
|
+
const result = await args.runtime.useModel(ModelType.TEXT_LARGE, {
|
|
282
|
+
prompt,
|
|
283
|
+
});
|
|
284
|
+
const raw = typeof result === "string" ? result : "";
|
|
285
|
+
const parsed = parseKeyValueXml(raw) ??
|
|
286
|
+
parseJSONObjectFromText(raw);
|
|
287
|
+
return normalizeCalendarReadResolution(parsed);
|
|
288
|
+
}
|
|
289
|
+
catch (error) {
|
|
290
|
+
args.runtime.logger?.warn?.({
|
|
291
|
+
src: "action:calendar",
|
|
292
|
+
error: error instanceof Error ? error.message : String(error),
|
|
293
|
+
}, "Calendar read disambiguation model call failed");
|
|
294
|
+
return null;
|
|
295
|
+
}
|
|
296
|
+
}
|
|
297
|
+
async function finalizeCalendarPlan(args) {
|
|
298
|
+
const { runtime, currentMessage, intent, recentConversation, plan } = args;
|
|
299
|
+
if (!shouldDisambiguateCalendarReadPlan(plan)) {
|
|
300
|
+
return (plan ?? {
|
|
301
|
+
subaction: null,
|
|
302
|
+
queries: [],
|
|
303
|
+
shouldAct: null,
|
|
304
|
+
});
|
|
305
|
+
}
|
|
306
|
+
const resolvedReadPlan = await disambiguateCalendarReadPlanWithLlm({
|
|
307
|
+
runtime,
|
|
308
|
+
currentMessage,
|
|
309
|
+
intent,
|
|
310
|
+
recentConversation,
|
|
311
|
+
candidateSubaction: plan?.subaction ?? null,
|
|
312
|
+
});
|
|
313
|
+
if (resolvedReadPlan === null || resolvedReadPlan.subaction === null) {
|
|
314
|
+
return (plan ?? {
|
|
315
|
+
subaction: null,
|
|
316
|
+
queries: [],
|
|
317
|
+
shouldAct: null,
|
|
318
|
+
});
|
|
319
|
+
}
|
|
320
|
+
if (plan) {
|
|
321
|
+
return {
|
|
322
|
+
...plan,
|
|
323
|
+
subaction: resolvedReadPlan.subaction,
|
|
324
|
+
tripLocation: resolvedReadPlan.tripLocation ?? plan.tripLocation,
|
|
325
|
+
queries: dedupeCalendarQueries([
|
|
326
|
+
...plan.queries,
|
|
327
|
+
resolvedReadPlan.tripLocation,
|
|
328
|
+
]),
|
|
329
|
+
shouldAct: true,
|
|
330
|
+
response: undefined,
|
|
331
|
+
};
|
|
332
|
+
}
|
|
333
|
+
return {
|
|
334
|
+
subaction: resolvedReadPlan.subaction,
|
|
335
|
+
queries: dedupeCalendarQueries([resolvedReadPlan.tripLocation]),
|
|
336
|
+
shouldAct: true,
|
|
337
|
+
tripLocation: resolvedReadPlan.tripLocation,
|
|
338
|
+
};
|
|
339
|
+
}
|
|
220
340
|
function buildCalendarServiceErrorFallback(error, intent) {
|
|
221
341
|
const normalized = normalizeText(error.message);
|
|
222
342
|
if (normalized.includes("utc 'z' suffix") ||
|
|
@@ -939,6 +1059,7 @@ export async function extractCalendarPlanWithLlm(runtime, message, state, intent
|
|
|
939
1059
|
"",
|
|
940
1060
|
"Examples:",
|
|
941
1061
|
' "what\'s on my calendar tomorrow" → {"subaction":"feed","shouldAct":true,"response":null}',
|
|
1062
|
+
' "今日の予定は何ですか?" → {"subaction":"feed","shouldAct":true,"response":null}',
|
|
942
1063
|
' "schedule a meeting with Alex at 3pm" → {"subaction":"create_event","shouldAct":true,"response":null,"title":"Meeting with Alex"}',
|
|
943
1064
|
' "find my return flight" → {"subaction":"search_events","shouldAct":true,"response":null,"queries":["return flight"]}',
|
|
944
1065
|
' "what do I have while I\'m in Tokyo" → {"subaction":"trip_window","shouldAct":true,"response":null,"queries":["tokyo"],"tripLocation":"Tokyo"}',
|
|
@@ -991,7 +1112,13 @@ export async function extractCalendarPlanWithLlm(runtime, message, state, intent
|
|
|
991
1112
|
}
|
|
992
1113
|
const parsedPlan = parseResponse(rawResponse);
|
|
993
1114
|
if (parsedPlan) {
|
|
994
|
-
return
|
|
1115
|
+
return finalizeCalendarPlan({
|
|
1116
|
+
runtime,
|
|
1117
|
+
currentMessage,
|
|
1118
|
+
intent,
|
|
1119
|
+
recentConversation,
|
|
1120
|
+
plan: parsedPlan,
|
|
1121
|
+
});
|
|
995
1122
|
}
|
|
996
1123
|
try {
|
|
997
1124
|
const repairResult = await runtime.useModel(ModelType.TEXT_LARGE, {
|
|
@@ -1006,10 +1133,12 @@ export async function extractCalendarPlanWithLlm(runtime, message, state, intent
|
|
|
1006
1133
|
}),
|
|
1007
1134
|
});
|
|
1008
1135
|
const repairedRaw = typeof repairResult === "string" ? repairResult : "";
|
|
1009
|
-
return (
|
|
1010
|
-
|
|
1011
|
-
|
|
1012
|
-
|
|
1136
|
+
return finalizeCalendarPlan({
|
|
1137
|
+
runtime,
|
|
1138
|
+
currentMessage,
|
|
1139
|
+
intent,
|
|
1140
|
+
recentConversation,
|
|
1141
|
+
plan: parseResponse(repairedRaw),
|
|
1013
1142
|
});
|
|
1014
1143
|
}
|
|
1015
1144
|
catch (error) {
|
|
@@ -1755,12 +1884,16 @@ export const calendarAction = {
|
|
|
1755
1884
|
"requests like 'what's my next meeting?', 'show me my calendar for today', 'what does my week look like?', or 'schedule a dentist appointment next Tuesday at 3pm'; " +
|
|
1756
1885
|
"querying travel itineraries, flights, hotel stays, trip windows, reserving recurring time blocks, and rebooking or moving calendar-backed commitments. " +
|
|
1757
1886
|
"These are live calendar reads and writes, so do not answer them from provider context alone and do not fall back to NONE or REPLY when this action is available. " +
|
|
1887
|
+
"DO NOT use this action when the user is only making an observation like 'my calendar has been crazy this quarter' unless they actually ask you to inspect or change calendar state. " +
|
|
1758
1888
|
"DO NOT use this action for email inbox work, drafting or sending emails — use GMAIL_ACTION instead. " +
|
|
1759
1889
|
"DO NOT use this action for personal habits, goals, routines, or reminders — use LIFE instead. " +
|
|
1760
1890
|
"This action provides the final grounded reply; do not pair it with a speculative REPLY action.",
|
|
1761
1891
|
descriptionCompressed: "Google Calendar via LifeOps: view schedule, search events, create events, query travel. Not for email or habits.",
|
|
1762
1892
|
suppressPostActionContinuation: true,
|
|
1763
1893
|
validate: async (runtime, message) => {
|
|
1894
|
+
if (looksLikeCalendarObservation(messageText(message))) {
|
|
1895
|
+
return false;
|
|
1896
|
+
}
|
|
1764
1897
|
return hasLifeOpsAccess(runtime, message);
|
|
1765
1898
|
},
|
|
1766
1899
|
handler: async (runtime, message, state, options, callback) => {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"computer-use.d.ts","sourceRoot":"","sources":["../../../../../../../apps/app-lifeops/src/actions/computer-use.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,KAAK,EACV,MAAM,
|
|
1
|
+
{"version":3,"file":"computer-use.d.ts","sourceRoot":"","sources":["../../../../../../../apps/app-lifeops/src/actions/computer-use.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,KAAK,EACV,MAAM,EAMP,MAAM,eAAe,CAAC;AA8OvB,eAAO,MAAM,wBAAwB,EAAE,MAAM,GAAG;IAC9C,8BAA8B,CAAC,EAAE,OAAO,CAAC;CA6L1C,CAAC"}
|
|
@@ -17,30 +17,169 @@ var __rewriteRelativeImportExtension = (this && this.__rewriteRelativeImportExte
|
|
|
17
17
|
};
|
|
18
18
|
import { hasOwnerAccess } from "@elizaos/agent/security/access";
|
|
19
19
|
const ACTION_NAME = "LIFEOPS_COMPUTER_USE";
|
|
20
|
+
const ACTION_NAMES = {
|
|
21
|
+
desktop: "USE_COMPUTER",
|
|
22
|
+
browser: "BROWSER_ACTION",
|
|
23
|
+
window: "MANAGE_WINDOW",
|
|
24
|
+
file: "FILE_ACTION",
|
|
25
|
+
terminal: "TERMINAL_ACTION",
|
|
26
|
+
};
|
|
27
|
+
const DESKTOP_COMMAND_ALIASES = new Set([
|
|
28
|
+
"finder",
|
|
29
|
+
"open_finder",
|
|
30
|
+
"create_folder",
|
|
31
|
+
"new_folder",
|
|
32
|
+
"desktop_screenshot",
|
|
33
|
+
"take_screenshot",
|
|
34
|
+
"capture_screen",
|
|
35
|
+
"screenshot",
|
|
36
|
+
]);
|
|
20
37
|
function isComputerUseEnabled() {
|
|
21
38
|
return process.env.ELIZA_LIFEOPS_COMPUTER_USE_ENABLED !== "0";
|
|
22
39
|
}
|
|
23
|
-
|
|
40
|
+
function resolveWrapperParams(message, options) {
|
|
41
|
+
const params = {
|
|
42
|
+
...(options?.parameters ??
|
|
43
|
+
{}),
|
|
44
|
+
};
|
|
45
|
+
if (message.content && typeof message.content === "object") {
|
|
46
|
+
for (const [key, value] of Object.entries(message.content)) {
|
|
47
|
+
if (params[key] === undefined) {
|
|
48
|
+
params[key] = value;
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
return params;
|
|
53
|
+
}
|
|
54
|
+
function inferSurface(params) {
|
|
55
|
+
const explicitSurface = typeof params.surface === "string"
|
|
56
|
+
? params.surface.trim().toLowerCase()
|
|
57
|
+
: null;
|
|
58
|
+
if (explicitSurface === "desktop" ||
|
|
59
|
+
explicitSurface === "browser" ||
|
|
60
|
+
explicitSurface === "window" ||
|
|
61
|
+
explicitSurface === "file" ||
|
|
62
|
+
explicitSurface === "terminal") {
|
|
63
|
+
return explicitSurface;
|
|
64
|
+
}
|
|
65
|
+
const action = typeof params.action === "string" ? params.action.trim().toLowerCase() : "";
|
|
66
|
+
const command = typeof params.command === "string"
|
|
67
|
+
? params.command.trim().toLowerCase()
|
|
68
|
+
: "";
|
|
69
|
+
if (DESKTOP_COMMAND_ALIASES.has(action) || DESKTOP_COMMAND_ALIASES.has(command)) {
|
|
70
|
+
return "desktop";
|
|
71
|
+
}
|
|
72
|
+
if (params.path !== undefined ||
|
|
73
|
+
params.filepath !== undefined ||
|
|
74
|
+
params.dirpath !== undefined ||
|
|
75
|
+
params.oldText !== undefined ||
|
|
76
|
+
params.newText !== undefined ||
|
|
77
|
+
params.old_text !== undefined ||
|
|
78
|
+
params.new_text !== undefined ||
|
|
79
|
+
params.find !== undefined ||
|
|
80
|
+
params.replace !== undefined ||
|
|
81
|
+
action === "write" ||
|
|
82
|
+
action === "append" ||
|
|
83
|
+
action === "delete" ||
|
|
84
|
+
action === "exists" ||
|
|
85
|
+
action === "list" ||
|
|
86
|
+
action === "delete_directory" ||
|
|
87
|
+
action === "upload" ||
|
|
88
|
+
action === "download" ||
|
|
89
|
+
action === "list_downloads") {
|
|
90
|
+
return "file";
|
|
91
|
+
}
|
|
92
|
+
if (params.command !== undefined ||
|
|
93
|
+
params.sessionId !== undefined ||
|
|
94
|
+
params.session_id !== undefined ||
|
|
95
|
+
action === "execute" ||
|
|
96
|
+
action === "execute_command" ||
|
|
97
|
+
action === "read" ||
|
|
98
|
+
action === "clear") {
|
|
99
|
+
return "terminal";
|
|
100
|
+
}
|
|
101
|
+
if (params.windowId !== undefined ||
|
|
102
|
+
params.windowTitle !== undefined ||
|
|
103
|
+
params.window !== undefined ||
|
|
104
|
+
params.title !== undefined ||
|
|
105
|
+
params.arrangement !== undefined ||
|
|
106
|
+
action === "focus" ||
|
|
107
|
+
action === "switch" ||
|
|
108
|
+
action === "arrange" ||
|
|
109
|
+
action === "move" ||
|
|
110
|
+
action === "minimize" ||
|
|
111
|
+
action === "maximize" ||
|
|
112
|
+
action === "restore" ||
|
|
113
|
+
action === "close") {
|
|
114
|
+
return "window";
|
|
115
|
+
}
|
|
116
|
+
if (params.url !== undefined ||
|
|
117
|
+
params.selector !== undefined ||
|
|
118
|
+
params.tabId !== undefined ||
|
|
119
|
+
params.tab_index !== undefined ||
|
|
120
|
+
params.index !== undefined ||
|
|
121
|
+
params.code !== undefined ||
|
|
122
|
+
params.timeout !== undefined ||
|
|
123
|
+
params.direction !== undefined ||
|
|
124
|
+
action === "open" ||
|
|
125
|
+
action === "connect" ||
|
|
126
|
+
action === "navigate" ||
|
|
127
|
+
action === "dom" ||
|
|
128
|
+
action === "get_dom" ||
|
|
129
|
+
action === "clickables" ||
|
|
130
|
+
action === "get_clickables" ||
|
|
131
|
+
action === "execute" ||
|
|
132
|
+
action === "state" ||
|
|
133
|
+
action === "info" ||
|
|
134
|
+
action === "context" ||
|
|
135
|
+
action === "wait" ||
|
|
136
|
+
action === "list_tabs" ||
|
|
137
|
+
action === "open_tab" ||
|
|
138
|
+
action === "close_tab" ||
|
|
139
|
+
action === "switch_tab") {
|
|
140
|
+
return "browser";
|
|
141
|
+
}
|
|
142
|
+
return "desktop";
|
|
143
|
+
}
|
|
144
|
+
async function loadComputerUseActions() {
|
|
24
145
|
try {
|
|
25
146
|
// Dynamic import so a missing peer dependency does not break plugin load.
|
|
26
147
|
const mod = (await import(__rewriteRelativeImportExtension(
|
|
27
148
|
/* @vite-ignore */ "@elizaos/plugin-computeruse")));
|
|
28
|
-
if (mod.useComputerAction)
|
|
29
|
-
return mod.useComputerAction;
|
|
30
149
|
const plugin = mod.computerUsePlugin ?? mod.default;
|
|
31
|
-
|
|
32
|
-
|
|
150
|
+
if (!plugin?.actions?.length) {
|
|
151
|
+
return null;
|
|
152
|
+
}
|
|
153
|
+
const byName = new Map(plugin.actions.map((action) => [action.name, action]));
|
|
154
|
+
return {
|
|
155
|
+
desktop: byName.get(ACTION_NAMES.desktop) ?? null,
|
|
156
|
+
browser: byName.get(ACTION_NAMES.browser) ?? null,
|
|
157
|
+
window: byName.get(ACTION_NAMES.window) ?? null,
|
|
158
|
+
file: byName.get(ACTION_NAMES.file) ?? null,
|
|
159
|
+
terminal: byName.get(ACTION_NAMES.terminal) ?? null,
|
|
160
|
+
};
|
|
33
161
|
}
|
|
34
162
|
catch {
|
|
35
163
|
return null;
|
|
36
164
|
}
|
|
37
165
|
}
|
|
38
|
-
let
|
|
39
|
-
async function
|
|
40
|
-
if (
|
|
41
|
-
|
|
166
|
+
let cachedActions;
|
|
167
|
+
async function getLoadedActions() {
|
|
168
|
+
if (cachedActions === undefined) {
|
|
169
|
+
cachedActions = await loadComputerUseActions();
|
|
42
170
|
}
|
|
43
|
-
return
|
|
171
|
+
return cachedActions;
|
|
172
|
+
}
|
|
173
|
+
function selectDelegateAction(actions, message, options) {
|
|
174
|
+
const params = resolveWrapperParams(message, options);
|
|
175
|
+
const preferredSurface = inferSurface(params);
|
|
176
|
+
return (actions[preferredSurface] ??
|
|
177
|
+
actions.desktop ??
|
|
178
|
+
actions.browser ??
|
|
179
|
+
actions.window ??
|
|
180
|
+
actions.file ??
|
|
181
|
+
actions.terminal ??
|
|
182
|
+
null);
|
|
44
183
|
}
|
|
45
184
|
const stubExamples = [
|
|
46
185
|
[
|
|
@@ -63,11 +202,20 @@ export const lifeOpsComputerUseAction = {
|
|
|
63
202
|
"DESKTOP_AUTOMATION",
|
|
64
203
|
"COMPUTER_USE",
|
|
65
204
|
"CONTROL_DESKTOP",
|
|
205
|
+
"FINDER",
|
|
206
|
+
"OPEN_FINDER",
|
|
207
|
+
"CREATE_FOLDER",
|
|
208
|
+
"NEW_FOLDER",
|
|
209
|
+
"TAKE_SCREENSHOT",
|
|
210
|
+
"CAPTURE_SCREEN",
|
|
66
211
|
"PORTAL_UPLOAD",
|
|
67
212
|
"UPLOAD_DECK",
|
|
68
213
|
],
|
|
69
214
|
tags: [
|
|
70
215
|
"always-include",
|
|
216
|
+
"finder",
|
|
217
|
+
"desktop screenshot",
|
|
218
|
+
"create folder",
|
|
71
219
|
"portal upload",
|
|
72
220
|
"upload deck",
|
|
73
221
|
"speaker portal",
|
|
@@ -76,7 +224,8 @@ export const lifeOpsComputerUseAction = {
|
|
|
76
224
|
],
|
|
77
225
|
description: "Control the owner's desktop (screenshots, mouse, keyboard, browser, " +
|
|
78
226
|
"windows, files, terminal) via @elizaos/plugin-computeruse. Use this for " +
|
|
79
|
-
"portal uploads,
|
|
227
|
+
"portal uploads, Finder/Desktop tasks like creating folders or taking " +
|
|
228
|
+
"screenshots, browser form-filling, and other on-machine workflows the " +
|
|
80
229
|
"assistant should perform directly, including standing instructions like " +
|
|
81
230
|
"'when I send the file, upload it to the portal for me.' Owner-only. " +
|
|
82
231
|
"Disabled when ELIZA_LIFEOPS_COMPUTER_USE_ENABLED=0.",
|
|
@@ -86,16 +235,95 @@ export const lifeOpsComputerUseAction = {
|
|
|
86
235
|
return false;
|
|
87
236
|
if (!(await hasOwnerAccess(runtime, message)))
|
|
88
237
|
return false;
|
|
89
|
-
const
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
238
|
+
const actions = await getLoadedActions();
|
|
239
|
+
const base = actions
|
|
240
|
+
? selectDelegateAction(actions, message)
|
|
241
|
+
: null;
|
|
242
|
+
if (!base?.validate)
|
|
93
243
|
return true;
|
|
94
244
|
return base.validate(runtime, message, undefined);
|
|
95
245
|
},
|
|
96
|
-
parameters: [
|
|
246
|
+
parameters: [
|
|
247
|
+
{
|
|
248
|
+
name: "surface",
|
|
249
|
+
description: "Computer-use surface to route to. Use browser, file, terminal, window, or desktop when the operation is ambiguous.",
|
|
250
|
+
required: false,
|
|
251
|
+
schema: {
|
|
252
|
+
type: "string",
|
|
253
|
+
enum: ["desktop", "browser", "window", "file", "terminal"],
|
|
254
|
+
},
|
|
255
|
+
},
|
|
256
|
+
{
|
|
257
|
+
name: "action",
|
|
258
|
+
description: "Underlying computer-use action name, such as screenshot, navigate, read, execute, or focus.",
|
|
259
|
+
required: false,
|
|
260
|
+
schema: { type: "string" },
|
|
261
|
+
},
|
|
262
|
+
{
|
|
263
|
+
name: "url",
|
|
264
|
+
description: "Browser target URL.",
|
|
265
|
+
required: false,
|
|
266
|
+
schema: { type: "string" },
|
|
267
|
+
},
|
|
268
|
+
{
|
|
269
|
+
name: "selector",
|
|
270
|
+
description: "Browser selector for click/type/wait.",
|
|
271
|
+
required: false,
|
|
272
|
+
schema: { type: "string" },
|
|
273
|
+
},
|
|
274
|
+
{
|
|
275
|
+
name: "path",
|
|
276
|
+
description: "Filesystem path for file operations.",
|
|
277
|
+
required: false,
|
|
278
|
+
schema: { type: "string" },
|
|
279
|
+
},
|
|
280
|
+
{
|
|
281
|
+
name: "command",
|
|
282
|
+
description: "Terminal command for shell execution.",
|
|
283
|
+
required: false,
|
|
284
|
+
schema: { type: "string" },
|
|
285
|
+
},
|
|
286
|
+
{
|
|
287
|
+
name: "windowId",
|
|
288
|
+
description: "Window target for window-management operations.",
|
|
289
|
+
required: false,
|
|
290
|
+
schema: { type: "string" },
|
|
291
|
+
},
|
|
292
|
+
{
|
|
293
|
+
name: "coordinate",
|
|
294
|
+
description: "Desktop or browser coordinate [x, y].",
|
|
295
|
+
required: false,
|
|
296
|
+
schema: { type: "array", items: { type: "number" } },
|
|
297
|
+
},
|
|
298
|
+
{
|
|
299
|
+
name: "text",
|
|
300
|
+
description: "Text payload for typing, OCR, or browser waits.",
|
|
301
|
+
required: false,
|
|
302
|
+
schema: { type: "string" },
|
|
303
|
+
},
|
|
304
|
+
{
|
|
305
|
+
name: "key",
|
|
306
|
+
description: "Desktop key or key combo.",
|
|
307
|
+
required: false,
|
|
308
|
+
schema: { type: "string" },
|
|
309
|
+
},
|
|
310
|
+
],
|
|
97
311
|
examples: [
|
|
98
312
|
...stubExamples,
|
|
313
|
+
[
|
|
314
|
+
{
|
|
315
|
+
name: "{{name1}}",
|
|
316
|
+
content: {
|
|
317
|
+
text: "Open Finder and create a new folder called Q2-Reports on my desktop.",
|
|
318
|
+
},
|
|
319
|
+
},
|
|
320
|
+
{
|
|
321
|
+
name: "{{agentName}}",
|
|
322
|
+
content: {
|
|
323
|
+
text: "I'll handle that on your Mac with computer use.",
|
|
324
|
+
},
|
|
325
|
+
},
|
|
326
|
+
],
|
|
99
327
|
[
|
|
100
328
|
{
|
|
101
329
|
name: "{{name1}}",
|
|
@@ -126,7 +354,10 @@ export const lifeOpsComputerUseAction = {
|
|
|
126
354
|
data: { actionName: ACTION_NAME },
|
|
127
355
|
};
|
|
128
356
|
}
|
|
129
|
-
const
|
|
357
|
+
const actions = await getLoadedActions();
|
|
358
|
+
const base = actions
|
|
359
|
+
? selectDelegateAction(actions, message, options)
|
|
360
|
+
: null;
|
|
130
361
|
if (!base) {
|
|
131
362
|
return {
|
|
132
363
|
text: "The @elizaos/plugin-computeruse package is not installed. Install it and restart the agent to enable desktop automation.",
|
|
@@ -18,5 +18,7 @@
|
|
|
18
18
|
import type { Action } from "@elizaos/core";
|
|
19
19
|
export declare const CROSS_CHANNEL_SEND_CHANNELS: readonly ["email", "telegram", "discord", "signal", "sms", "twilio_voice", "imessage", "whatsapp", "notifications", "calendly", "x_dm"];
|
|
20
20
|
export type CrossChannelSendChannel = (typeof CROSS_CHANNEL_SEND_CHANNELS)[number];
|
|
21
|
-
export declare const crossChannelSendAction: Action
|
|
21
|
+
export declare const crossChannelSendAction: Action & {
|
|
22
|
+
suppressPostActionContinuation?: boolean;
|
|
23
|
+
};
|
|
22
24
|
//# sourceMappingURL=cross-channel-send.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cross-channel-send.d.ts","sourceRoot":"","sources":["../../../../../../../apps/app-lifeops/src/actions/cross-channel-send.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,KAAK,EACV,MAAM,EAMP,MAAM,eAAe,CAAC;AAyBvB,eAAO,MAAM,2BAA2B,yIAY9B,CAAC;AACX,MAAM,MAAM,uBAAuB,GAAG,CAAC,OAAO,2BAA2B,CAAC,CAAC,MAAM,CAAC,CAAC;AAwZnF,eAAO,MAAM,sBAAsB,EAAE,
|
|
1
|
+
{"version":3,"file":"cross-channel-send.d.ts","sourceRoot":"","sources":["../../../../../../../apps/app-lifeops/src/actions/cross-channel-send.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,KAAK,EACV,MAAM,EAMP,MAAM,eAAe,CAAC;AAyBvB,eAAO,MAAM,2BAA2B,yIAY9B,CAAC;AACX,MAAM,MAAM,uBAAuB,GAAG,CAAC,OAAO,2BAA2B,CAAC,CAAC,MAAM,CAAC,CAAC;AAwZnF,eAAO,MAAM,sBAAsB,EAAE,MAAM,GAAG;IAC5C,8BAA8B,CAAC,EAAE,OAAO,CAAC;CAsM1C,CAAC"}
|
|
@@ -394,6 +394,7 @@ export const crossChannelSendAction = {
|
|
|
394
394
|
description: "Draft or send a message across any connected channel (email, telegram, " +
|
|
395
395
|
"discord, signal, sms, twilio_voice, imessage, whatsapp, notifications). Always " +
|
|
396
396
|
"drafts first; caller must re-invoke with confirmed: true to dispatch.",
|
|
397
|
+
suppressPostActionContinuation: true,
|
|
397
398
|
validate: async (runtime, message) => hasAdminAccess(runtime, message),
|
|
398
399
|
parameters: [
|
|
399
400
|
{
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dossier.d.ts","sourceRoot":"","sources":["../../../../../../../apps/app-lifeops/src/actions/dossier.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,MAAM,EAOP,MAAM,eAAe,CAAC;AAmCvB,eAAO,MAAM,aAAa,EAAE,MAAM,GAAG;IACnC,8BAA8B,CAAC,EAAE,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"dossier.d.ts","sourceRoot":"","sources":["../../../../../../../apps/app-lifeops/src/actions/dossier.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,MAAM,EAOP,MAAM,eAAe,CAAC;AAmCvB,eAAO,MAAM,aAAa,EAAE,MAAM,GAAG;IACnC,8BAA8B,CAAC,EAAE,OAAO,CAAC;CAsN1C,CAAC"}
|