@elizaos/agent 2.0.0-alpha.192 → 2.0.0-alpha.196
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 +1 -0
- 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,6 +1,8 @@
|
|
|
1
1
|
import crypto from "node:crypto";
|
|
2
2
|
import { logger } from "@elizaos/core";
|
|
3
|
-
|
|
3
|
+
function getXBaseUrl() {
|
|
4
|
+
return process.env.MILADY_MOCK_X_BASE ?? "https://api.twitter.com";
|
|
5
|
+
}
|
|
4
6
|
export class XReadError extends Error {
|
|
5
7
|
status;
|
|
6
8
|
category;
|
|
@@ -167,7 +169,7 @@ function parseTweet(tweet, handleIndex) {
|
|
|
167
169
|
*/
|
|
168
170
|
export async function readXDms(credentials, options = {}) {
|
|
169
171
|
const limit = clampLimit(options.limit);
|
|
170
|
-
const url = `${
|
|
172
|
+
const url = `${getXBaseUrl()}/2/dm_events`;
|
|
171
173
|
const queryParams = {
|
|
172
174
|
max_results: String(limit),
|
|
173
175
|
"dm_event.fields": "id,event_type,text,sender_id,dm_conversation_id,created_at",
|
|
@@ -216,7 +218,7 @@ export async function pullXFeed(credentials, feedType, options = {}) {
|
|
|
216
218
|
category: "unknown",
|
|
217
219
|
});
|
|
218
220
|
}
|
|
219
|
-
url = `${
|
|
221
|
+
url = `${getXBaseUrl()}/2/users/${encodeURIComponent(credentials.userId)}/timelines/reverse_chronological`;
|
|
220
222
|
}
|
|
221
223
|
else if (feedType === "mentions") {
|
|
222
224
|
if (!credentials.userId) {
|
|
@@ -225,7 +227,7 @@ export async function pullXFeed(credentials, feedType, options = {}) {
|
|
|
225
227
|
category: "unknown",
|
|
226
228
|
});
|
|
227
229
|
}
|
|
228
|
-
url = `${
|
|
230
|
+
url = `${getXBaseUrl()}/2/users/${encodeURIComponent(credentials.userId)}/mentions`;
|
|
229
231
|
}
|
|
230
232
|
else {
|
|
231
233
|
const query = (options.query ?? "").trim();
|
|
@@ -235,7 +237,7 @@ export async function pullXFeed(credentials, feedType, options = {}) {
|
|
|
235
237
|
category: "unknown",
|
|
236
238
|
});
|
|
237
239
|
}
|
|
238
|
-
url = `${
|
|
240
|
+
url = `${getXBaseUrl()}/2/tweets/search/recent`;
|
|
239
241
|
baseQuery.query = query;
|
|
240
242
|
}
|
|
241
243
|
const payload = await xFetch({
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"plugin.d.ts","sourceRoot":"","sources":["../../../../../../apps/app-lifeops/src/plugin.ts"],"names":[],"mappings":"AAAA,OAAO,EAA8B,KAAK,MAAM,EAAE,MAAM,eAAe,CAAC;AAGxE,OAAO,EAAE,0BAA0B,EAAE,MAAM,aAAa,CAAC;AACzD,OAAO,EAAE,sBAAsB,EAAE,MAAM,eAAe,CAAC;AACvD,OAAO,EAAE,2BAA2B,EAAE,MAAM,cAAc,CAAC;
|
|
1
|
+
{"version":3,"file":"plugin.d.ts","sourceRoot":"","sources":["../../../../../../apps/app-lifeops/src/plugin.ts"],"names":[],"mappings":"AAAA,OAAO,EAA8B,KAAK,MAAM,EAAE,MAAM,eAAe,CAAC;AAGxE,OAAO,EAAE,0BAA0B,EAAE,MAAM,aAAa,CAAC;AACzD,OAAO,EAAE,sBAAsB,EAAE,MAAM,eAAe,CAAC;AACvD,OAAO,EAAE,2BAA2B,EAAE,MAAM,cAAc,CAAC;AA6Y3D,eAAO,MAAM,gBAAgB,EAAE,MAA4B,CAAC;AAE5D,eAAO,MAAM,oBAAoB,QAAmB,CAAC;AAErD,OAAO,EACL,2BAA2B,EAC3B,sBAAsB,EACtB,0BAA0B,GAC3B,CAAC;AAGF,OAAO,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;AACvD,OAAO,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AACjD,OAAO,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AACjD,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAC/C,OAAO,EAAE,wBAAwB,EAAE,MAAM,mCAAmC,CAAC;AAC7E,OAAO,EACL,uBAAuB,EACvB,yBAAyB,EACzB,gBAAgB,EAChB,8BAA8B,GAC/B,MAAM,yBAAyB,CAAC;AACjC,OAAO,EAAE,mBAAmB,EAAE,MAAM,6BAA6B,CAAC;AAClE,OAAO,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAC;AAGzD,OAAO,EACL,uBAAuB,EACvB,qBAAqB,GACtB,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EAAE,cAAc,EAAE,MAAM,sCAAsC,CAAC;AACtE,YAAY,EACV,WAAW,EACX,aAAa,EACb,eAAe,EACf,YAAY,EACZ,WAAW,EACX,SAAS,EACT,4BAA4B,EAC5B,iBAAiB,GAClB,MAAM,4BAA4B,CAAC;AACpC,OAAO,EAAE,sBAAsB,EAAE,MAAM,wCAAwC,CAAC;AAChF,YAAY,EAAE,eAAe,EAAE,MAAM,wCAAwC,CAAC;AAG9E,OAAO,EAAE,mBAAmB,EAAE,MAAM,4BAA4B,CAAC;AACjE,YAAY,EAAE,mBAAmB,EAAE,MAAM,4BAA4B,CAAC;AACtE,OAAO,EAAE,0BAA0B,EAAE,MAAM,oCAAoC,CAAC;AAChF,YAAY,EAAE,0BAA0B,EAAE,MAAM,oCAAoC,CAAC;AAGrF,OAAO,EACL,0BAA0B,EAC1B,yBAAyB,EACzB,2BAA2B,EAC3B,4BAA4B,EAC5B,iBAAiB,EACjB,iBAAiB,EACjB,wBAAwB,EACxB,sBAAsB,GACvB,MAAM,sBAAsB,CAAC;AAE9B,cAAc,6BAA6B,CAAC;AAG5C,OAAO,EAAE,eAAe,EAAE,iBAAiB,EAAE,uBAAuB,EAAE,MAAM,0BAA0B,CAAC;AACvG,OAAO,EAAE,kBAAkB,EAAE,MAAM,4BAA4B,CAAC;AAChE,OAAO,EACL,mBAAmB,EACnB,yBAAyB,EACzB,4BAA4B,EAC5B,2BAA2B,EAC3B,gBAAgB,EAChB,qBAAqB,EACrB,aAAa,EACb,YAAY,GACb,MAAM,yBAAyB,CAAC;AAGjC,OAAO,EACL,0BAA0B,EAC1B,sBAAsB,EACtB,0BAA0B,EAC1B,6BAA6B,EAC7B,sBAAsB,EACtB,uBAAuB,EACvB,wBAAwB,EACxB,wBAAwB,EACxB,0BAA0B,EAC1B,0BAA0B,EAC1B,4BAA4B,EAC5B,+BAA+B,EAC/B,qBAAqB,GACtB,MAAM,qBAAqB,CAAC;AAC7B,YAAY,EACV,aAAa,EACb,eAAe,GAChB,MAAM,qBAAqB,CAAC;AAE7B,eAAe,gBAAgB,CAAC"}
|
|
@@ -46,6 +46,7 @@ import { generateDossierAction } from "./dossier/action.js";
|
|
|
46
46
|
// T8a — travel-time awareness (plan §6.9).
|
|
47
47
|
import { computeTravelBufferAction } from "./travel-time/action.js";
|
|
48
48
|
import { healthAction } from "./actions/health.js";
|
|
49
|
+
import { subscriptionsAction } from "./actions/subscriptions.js";
|
|
49
50
|
// T8e — browser extension bridge actions (plan §6.13).
|
|
50
51
|
import { fetchBrowserActivityAction, registerBrowserSessionAction, } from "./actions/browser-extension.js";
|
|
51
52
|
// LifeOps core providers
|
|
@@ -80,6 +81,19 @@ async function ensureTaskWithRetries(args) {
|
|
|
80
81
|
}
|
|
81
82
|
}
|
|
82
83
|
}
|
|
84
|
+
function isDisabledByEnv(disableKey, enableKey) {
|
|
85
|
+
const disableValue = (process.env[disableKey] ?? "").trim().toLowerCase();
|
|
86
|
+
if (disableValue === "1" ||
|
|
87
|
+
disableValue === "true" ||
|
|
88
|
+
disableValue === "yes") {
|
|
89
|
+
return true;
|
|
90
|
+
}
|
|
91
|
+
if (!enableKey) {
|
|
92
|
+
return false;
|
|
93
|
+
}
|
|
94
|
+
const enableValue = (process.env[enableKey] ?? "").trim().toLowerCase();
|
|
95
|
+
return enableValue === "0" || enableValue === "false";
|
|
96
|
+
}
|
|
83
97
|
function scheduleTaskEnsureAfterRuntimeInit(args) {
|
|
84
98
|
void args.runtime.initPromise
|
|
85
99
|
.then(async () => {
|
|
@@ -147,6 +161,7 @@ const rawAppLifeOpsPlugin = {
|
|
|
147
161
|
generateDossierAction,
|
|
148
162
|
computeTravelBufferAction,
|
|
149
163
|
healthAction,
|
|
164
|
+
subscriptionsAction,
|
|
150
165
|
registerBrowserSessionAction,
|
|
151
166
|
fetchBrowserActivityAction,
|
|
152
167
|
],
|
|
@@ -184,20 +199,7 @@ const rawAppLifeOpsPlugin = {
|
|
|
184
199
|
logger.warn(`[selfcontrol] Plugin loaded, but local website blocking is unavailable: ${status.reason ?? "unknown reason"}`);
|
|
185
200
|
}
|
|
186
201
|
// Register the proactive agent (activity-profile: GM/GN/nudges)
|
|
187
|
-
const proactiveAgentDisabled = (
|
|
188
|
-
const disableValue = (process.env.ELIZA_DISABLE_PROACTIVE_AGENT ?? "")
|
|
189
|
-
.trim()
|
|
190
|
-
.toLowerCase();
|
|
191
|
-
if (disableValue === "1" ||
|
|
192
|
-
disableValue === "true" ||
|
|
193
|
-
disableValue === "yes") {
|
|
194
|
-
return true;
|
|
195
|
-
}
|
|
196
|
-
const enableValue = (process.env.ENABLE_PROACTIVE_AGENT ?? "")
|
|
197
|
-
.trim()
|
|
198
|
-
.toLowerCase();
|
|
199
|
-
return enableValue === "0" || enableValue === "false";
|
|
200
|
-
})();
|
|
202
|
+
const proactiveAgentDisabled = isDisabledByEnv("ELIZA_DISABLE_PROACTIVE_AGENT", "ENABLE_PROACTIVE_AGENT");
|
|
201
203
|
if (!proactiveAgentDisabled) {
|
|
202
204
|
registerProactiveTaskWorker(runtime);
|
|
203
205
|
scheduleTaskEnsureAfterRuntimeInit({
|
|
@@ -217,16 +219,21 @@ const rawAppLifeOpsPlugin = {
|
|
|
217
219
|
registerFollowupTrackerWorker(runtime);
|
|
218
220
|
// T7g — Register the website blocker chat integration reconciler.
|
|
219
221
|
registerBlockRuleReconcilerWorker(runtime);
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
222
|
+
const lifeOpsSchedulerDisabled = isDisabledByEnv("ELIZA_DISABLE_LIFEOPS_SCHEDULER", "ENABLE_LIFEOPS_SCHEDULER");
|
|
223
|
+
if (!lifeOpsSchedulerDisabled) {
|
|
224
|
+
registerLifeOpsTaskWorker(runtime);
|
|
225
|
+
scheduleTaskEnsureAfterRuntimeInit({
|
|
226
|
+
runtime,
|
|
227
|
+
prefix: "[lifeops]",
|
|
228
|
+
label: "scheduler task",
|
|
229
|
+
ensure: async () => {
|
|
230
|
+
await ensureLifeOpsSchedulerTask(runtime);
|
|
231
|
+
},
|
|
232
|
+
});
|
|
233
|
+
}
|
|
234
|
+
else {
|
|
235
|
+
runtime.logger?.info("[lifeops] Scheduler task skipped — ELIZA_DISABLE_LIFEOPS_SCHEDULER=1");
|
|
236
|
+
}
|
|
230
237
|
},
|
|
231
238
|
/**
|
|
232
239
|
* Tear down everything `init` registered so `runtime.unloadPlugin(...)`
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"provider.d.ts","sourceRoot":"","sources":["../../../../../../apps/app-lifeops/src/provider.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"provider.d.ts","sourceRoot":"","sources":["../../../../../../apps/app-lifeops/src/provider.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAGV,QAAQ,EAGT,MAAM,eAAe,CAAC;AAgCvB,eAAO,MAAM,sBAAsB,EAAE,QAkEpC,CAAC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { LifeOpsService } from "./lifeops/service.js";
|
|
2
1
|
import { hasAdminAccess } from "@elizaos/agent/security/access";
|
|
2
|
+
import { LifeOpsService } from "./lifeops/service.js";
|
|
3
3
|
function formatSettingsLine(settings) {
|
|
4
4
|
const status = settings.enabled ? settings.trackingMode : "off";
|
|
5
5
|
const control = settings.allowBrowserControl ? "control on" : "control off";
|
|
@@ -20,8 +20,8 @@ function formatTabLine(tab) {
|
|
|
20
20
|
}
|
|
21
21
|
export const lifeOpsBrowserProvider = {
|
|
22
22
|
name: "lifeops_browser",
|
|
23
|
-
description: "Owner/admin-only context for the user's
|
|
24
|
-
descriptionCompressed: "Owner: Chrome/Safari
|
|
23
|
+
description: "Owner/admin-only context for the user's real Chrome and Safari browsers connected through LifeOps Browser. Separate from Milady Desktop Browser.",
|
|
24
|
+
descriptionCompressed: "Owner: real Chrome/Safari browser context.",
|
|
25
25
|
dynamic: true,
|
|
26
26
|
position: 13,
|
|
27
27
|
async get(runtime, message, _state) {
|
|
@@ -41,7 +41,7 @@ export const lifeOpsBrowserProvider = {
|
|
|
41
41
|
session.status === "running");
|
|
42
42
|
const lines = [
|
|
43
43
|
"## LifeOps Browser",
|
|
44
|
-
"This is the user's
|
|
44
|
+
"This is the user's real browser profile connected through LifeOps Browser, not Milady Desktop Browser.",
|
|
45
45
|
formatSettingsLine(settings),
|
|
46
46
|
`Companions: ${companions.length}. Active sessions: ${activeSessions.length}.`,
|
|
47
47
|
];
|
|
@@ -10,8 +10,8 @@ export const inboxTriageProvider = {
|
|
|
10
10
|
name: "inboxTriage",
|
|
11
11
|
description: "Injects pending inbox triage items into admin context. Shows urgent messages, " +
|
|
12
12
|
"items needing reply, and recent auto-replies across all channels including email. " +
|
|
13
|
-
"Use
|
|
14
|
-
"Use
|
|
13
|
+
"Use INBOX for cross-channel triage, digest, and respond workflows. " +
|
|
14
|
+
"Use GMAIL_ACTION instead when the request is explicitly Gmail-only, about unread emails, or about drafting/sending a specific email reply.",
|
|
15
15
|
descriptionCompressed: "Pending inbox triage items across all channels incl email.",
|
|
16
16
|
dynamic: true,
|
|
17
17
|
position: 14, // after lifeops (12), before escalation (15)
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"lifeops.d.ts","sourceRoot":"","sources":["../../../../../../../apps/app-lifeops/src/providers/lifeops.ts"],"names":[],"mappings":"AAAA,OAAO,EAGL,KAAK,QAAQ,EAId,MAAM,eAAe,CAAC;AAkFvB,eAAO,MAAM,eAAe,EAAE,
|
|
1
|
+
{"version":3,"file":"lifeops.d.ts","sourceRoot":"","sources":["../../../../../../../apps/app-lifeops/src/providers/lifeops.ts"],"names":[],"mappings":"AAAA,OAAO,EAGL,KAAK,QAAQ,EAId,MAAM,eAAe,CAAC;AAkFvB,eAAO,MAAM,eAAe,EAAE,QAiL7B,CAAC"}
|
|
@@ -65,7 +65,7 @@ function summarizeOwnerProfile(profile) {
|
|
|
65
65
|
}
|
|
66
66
|
export const lifeOpsProvider = {
|
|
67
67
|
name: "lifeops",
|
|
68
|
-
description: "Owner, explicitly granted users, and the agent only. Provides
|
|
68
|
+
description: "Owner, explicitly granted users, and the agent only. Provides LifeOps overview plus live calendar and Gmail context. Route executable personal follow-through like todos, habits, goals, reminders, alarms, and live todo-status questions to LIFE; live schedule and event requests to CALENDAR_ACTION; Gmail and email-specific work to GMAIL_ACTION; cross-channel inbox triage, digests, and reply workflows to INBOX; subscription audits, cancellations, and cancellation-status checks to SUBSCRIPTIONS; meeting-prep and person-background briefs to DOSSIER; X/Twitter reads and search to X_READ; fixed-duration or generic focus blocks to BLOCK_WEBSITES; task-gated focus blocks only to BLOCK_UNTIL_TASK_COMPLETE; stable owner profile or travel preferences only to UPDATE_OWNER_PROFILE. Available in private owner or granted conversations, including Discord.",
|
|
69
69
|
descriptionCompressed: "LifeOps overview, upcoming calendar, email triage. Owner/granted only.",
|
|
70
70
|
dynamic: true,
|
|
71
71
|
position: 12,
|
|
@@ -133,20 +133,29 @@ export const lifeOpsProvider = {
|
|
|
133
133
|
return {
|
|
134
134
|
text: [
|
|
135
135
|
"## Life Ops",
|
|
136
|
-
"Use LIFE
|
|
137
|
-
"Use CALENDAR_ACTION for calendar
|
|
138
|
-
"Use GMAIL_ACTION for
|
|
139
|
-
"Use INBOX for executive-assistant inbox work:
|
|
136
|
+
"Use LIFE for executable personal follow-through: todos, habits, goals, reminders, alarms, escalation, and live status questions like 'what's on my todo list today?'. Examples: 'add a todo', 'remember to call mom on Sunday', 'track my gym sessions three times a week', 'set a goal to save $5,000'. Do not use REPLY, UPDATE_ENTITY, or UPDATE_OWNER_PROFILE for these.",
|
|
137
|
+
"Use CALENDAR_ACTION for live calendar reads and writes. Examples: 'what's my next meeting?', 'show me my calendar for today', 'what does my week look like?', 'schedule a dentist appointment next Tuesday at 3pm'. Do not answer these from provider context alone.",
|
|
138
|
+
"Use GMAIL_ACTION for Gmail and email-specific work. Examples: 'triage my Gmail inbox', 'summarize my unread emails', 'draft a reply to Sarah's latest email', 'send a reply to the last email from finance'. If the request explicitly says Gmail, email, unread emails, sender, subject, or reply to an email, prefer GMAIL_ACTION over INBOX. If the owner is only venting or making an observation like 'I hate email', stay in chat instead of calling GMAIL_ACTION.",
|
|
139
|
+
"Use INBOX for cross-channel executive-assistant inbox work: 'triage my inbox', 'give me my inbox digest', 'respond to the messages that need an answer in my inbox', daily briefs, drafts awaiting sign-off, missed-call repair, and group-chat handoff. If the request is Gmail-only, use GMAIL_ACTION instead. Do not use INBOX just because the user mentioned email or messages while venting.",
|
|
140
|
+
"Use PASSWORD_MANAGER for credential lookup and saved-login requests. Examples: 'look up my GitHub password', 'show me my saved logins for github.com', 'copy my AWS password to clipboard'. Do not surface raw secrets in chat.",
|
|
141
|
+
"Use RELATIONSHIP for Rolodex contacts, follow-ups, and days-since-contact questions. Examples: 'who are my closest contacts?', 'remind me to follow up with David next week', 'how long has it been since I talked to David?'.",
|
|
142
|
+
"Use SCREEN_TIME for quantitative device/app/website usage questions. Examples: 'how much screen time have I used today?', 'break down my screen time by app this week', 'what websites did I spend the most time on?'. If the owner is only reflecting or venting like 'I spend too much time on my phone', stay in chat instead of calling SCREEN_TIME.",
|
|
143
|
+
"Use BLOCK_APPS for phone app blocking requests. Examples: 'block all games on my phone until 6pm', 'block the Slack app while I focus on deep work'. Use BLOCK_WEBSITES for websites like reddit.com or youtube.com, not phone apps.",
|
|
144
|
+
"Use SUBSCRIPTIONS for subscription audits, recurring membership reviews, cancellation requests, and cancellation-status checks. Examples: 'audit my subscriptions', 'cancel my Google Play subscription', 'unsubscribe from Netflix', 'what happened with that subscription cancellation?'. Use this instead of generic browser automation when the user is asking for subscription-specific work.",
|
|
140
145
|
"Use SEARCH_ACROSS_CHANNELS when the owner wants cross-platform context or a person/topic searched across Gmail, chat connectors, calendar, and memory.",
|
|
141
|
-
"Use DOSSIER for meeting
|
|
146
|
+
"Use DOSSIER for meeting-prep and person-background briefs. Examples: 'pull up a dossier on Satya Nadella', 'give me the background on the person I'm meeting next: Julia Chen', 'brief me for my next meeting'. Do not answer these from ENTITIES or memory alone when the user explicitly wants a brief or dossier.",
|
|
142
147
|
"Use PROPOSE_MEETING_TIMES when the request is to find options, bundle people into shared slots, or propose times without a fixed meeting already chosen.",
|
|
143
148
|
"Use UPDATE_MEETING_PREFERENCES for durable scheduling rules like sleep windows, no-call hours, blackout windows, or preferred hours.",
|
|
144
|
-
"Use UPDATE_OWNER_PROFILE
|
|
145
|
-
"Use
|
|
146
|
-
"Use
|
|
149
|
+
"Use UPDATE_OWNER_PROFILE only for stable owner-only profile details and reusable travel-preference checklists. Do not use it for goals, todos, reminders, temporary plans, or live task state.",
|
|
150
|
+
"Use X_READ for X/Twitter reads and search: DMs, timeline, mentions, and topic search. Do not reply that X/Twitter access is unavailable when this action is available.",
|
|
151
|
+
"Use BLOCK_WEBSITES for fixed-duration or generic focus blocks like 'block twitter and reddit for 2 hours' or 'turn on a focus block for all social media sites'. Use BLOCK_UNTIL_TASK_COMPLETE only when the unblock condition is finishing a task, workout, or todo, like 'block x.com until I finish my workout'.",
|
|
152
|
+
"Use PUBLISH_DEVICE_INTENT for multi-device reminders, push ladders, document-signing nudges, and device-level warnings. Use LIFEOPS_COMPUTER_USE for portal uploads, Finder/Desktop work like taking screenshots or creating folders, browser workflows, and file-handling tasks on the owner's machine.",
|
|
153
|
+
"Use REMOTE_DESKTOP to start, list, check, or end a remote desktop session so the owner can connect from a phone. Requests like 'start a remote desktop session' or 'let me connect from my phone' belong here even if the action needs confirmation or a pairing step.",
|
|
154
|
+
"Use CALL_USER or CALL_EXTERNAL for phone-call escalation or booking calls. These actions can draft or request confirmation first; they do not require the dial to happen on the first turn. Requests like 'call the dentist and reschedule my appointment' or 'phone my cable company about the outage' belong to CALL_EXTERNAL, not CALENDAR_ACTION, LIFE, or CROSS_CHANNEL_SEND.",
|
|
155
|
+
"When the owner is only making an observation or venting like 'my calendar has been crazy this quarter', 'I hate email', or 'I think I spend too much time on my phone', stay in REPLY instead of calling a LifeOps action unless they actually ask you to do something.",
|
|
147
156
|
"Treat owner instructions phrased as standing policies, triggers, or conditionals like 'if this happens, do x' or 'when that arrives, handle it' as executable requests, not hypotheticals.",
|
|
148
157
|
"When the owner clearly asks for one of these LifeOps executive-assistant operations, call the best-fit action instead of staying in advice-only chat. If details are missing, let the action ask the minimum follow-up question.",
|
|
149
|
-
"Route examples: sleep/no-call windows -> UPDATE_MEETING_PREFERENCES; daily brief additions, missed-call repair, or group-chat handoff -> INBOX; travel preference memory -> UPDATE_OWNER_PROFILE; clinic-doc reminders or multi-device meeting ladders -> PUBLISH_DEVICE_INTENT; portal upload or browser filing -> LIFEOPS_COMPUTER_USE; if the agent gets stuck and should phone the owner -> CALL_USER.",
|
|
158
|
+
"Route examples: sleep/no-call windows -> UPDATE_MEETING_PREFERENCES; daily brief additions, missed-call repair, or group-chat handoff -> INBOX; subscription audits or cancellations -> SUBSCRIPTIONS; travel preference memory -> UPDATE_OWNER_PROFILE; clinic-doc reminders or multi-device meeting ladders -> PUBLISH_DEVICE_INTENT; portal upload or browser filing -> LIFEOPS_COMPUTER_USE; if the agent gets stuck and should phone the owner -> CALL_USER.",
|
|
150
159
|
"When the owner asks about their stable personal details for LifeOps, answer from the stored owner profile values below. If a field is not n/a, treat it as known instead of saying it is missing.",
|
|
151
160
|
"Owner life-ops are private to the owner, explicitly granted users, and the agent. Agent ops are internal and should stay separated unless explicitly requested.",
|
|
152
161
|
...summarizeOwnerProfile(ownerProfile),
|
|
@@ -2,7 +2,7 @@ import { getSelfControlAccess } from "../website-blocker/access.js";
|
|
|
2
2
|
import { getCachedSelfControlStatus } from "../website-blocker/engine.js";
|
|
3
3
|
export const websiteBlockerProvider = {
|
|
4
4
|
name: "websiteBlocker",
|
|
5
|
-
description: "Admin-only provider for the local hosts-file website blocker integration",
|
|
5
|
+
description: "Admin-only provider for the local hosts-file website blocker integration. Use BLOCK_WEBSITES for timed or generic focus blocks, and BLOCK_UNTIL_TASK_COMPLETE only when the unblock condition is finishing a task.",
|
|
6
6
|
descriptionCompressed: "Admin: hosts-file website blocker.",
|
|
7
7
|
dynamic: true,
|
|
8
8
|
get: async (runtime, message, _state) => {
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
export { lifeopsPlugin } from "./routes/plugin.js";
|
|
2
|
+
export { getLifeOpsBrowserCompanionPackageStatus } from "./routes/lifeops-browser-packaging.js";
|
|
3
|
+
export { getSelfControlPermissionState, openSelfControlPermissionLocation, requestSelfControlPermission, selfControlBlockWebsitesAction, selfControlRequestPermissionAction, } from "./website-blocker/public.js";
|
|
4
|
+
//# sourceMappingURL=public.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"public.d.ts","sourceRoot":"","sources":["../../../../../../apps/app-lifeops/src/public.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AACnD,OAAO,EAAE,uCAAuC,EAAE,MAAM,uCAAuC,CAAC;AAChG,OAAO,EACL,6BAA6B,EAC7B,iCAAiC,EACjC,4BAA4B,EAC5B,8BAA8B,EAC9B,kCAAkC,GACnC,MAAM,6BAA6B,CAAC"}
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
export { lifeopsPlugin } from "./routes/plugin.js";
|
|
2
|
+
export { getLifeOpsBrowserCompanionPackageStatus } from "./routes/lifeops-browser-packaging.js";
|
|
3
|
+
export { getSelfControlPermissionState, openSelfControlPermissionLocation, requestSelfControlPermission, selfControlBlockWebsitesAction, selfControlRequestPermissionAction, } from "./website-blocker/public.js";
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* LifeOps plugin — registers LifeOps and website-blocker routes with the
|
|
3
|
+
* elizaOS runtime plugin route system.
|
|
4
|
+
*
|
|
5
|
+
* Unlike Vincent/Shopify/Steward (which have a handful of routes each),
|
|
6
|
+
* LifeOps has 60+ routes with many dynamic segments. Rather than
|
|
7
|
+
* duplicating every path pattern, we register a small set of catch-all
|
|
8
|
+
* entries per HTTP method and delegate to the existing monolithic
|
|
9
|
+
* `handleLifeOpsRoutes` / `handleWebsiteBlockerRoutes` handlers.
|
|
10
|
+
*
|
|
11
|
+
* The plugin route bridge in runtime-plugin-routes.ts matches exact path
|
|
12
|
+
* segments, so we register one route per (method × prefix) combination.
|
|
13
|
+
* Each handler builds the LifeOpsRouteContext or WebsiteBlockerRouteContext
|
|
14
|
+
* that the underlying handlers expect, then delegates.
|
|
15
|
+
*/
|
|
16
|
+
import type { Plugin } from "@elizaos/core";
|
|
17
|
+
export declare const lifeopsPlugin: Plugin;
|
|
18
|
+
//# sourceMappingURL=plugin.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"plugin.d.ts","sourceRoot":"","sources":["../../../../../../../apps/app-lifeops/src/routes/plugin.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAGH,OAAO,KAAK,EAAgB,MAAM,EAAS,MAAM,eAAe,CAAC;AAsTjE,eAAO,MAAM,aAAa,EAAE,MAK3B,CAAC"}
|
|
@@ -0,0 +1,270 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* LifeOps plugin — registers LifeOps and website-blocker routes with the
|
|
3
|
+
* elizaOS runtime plugin route system.
|
|
4
|
+
*
|
|
5
|
+
* Unlike Vincent/Shopify/Steward (which have a handful of routes each),
|
|
6
|
+
* LifeOps has 60+ routes with many dynamic segments. Rather than
|
|
7
|
+
* duplicating every path pattern, we register a small set of catch-all
|
|
8
|
+
* entries per HTTP method and delegate to the existing monolithic
|
|
9
|
+
* `handleLifeOpsRoutes` / `handleWebsiteBlockerRoutes` handlers.
|
|
10
|
+
*
|
|
11
|
+
* The plugin route bridge in runtime-plugin-routes.ts matches exact path
|
|
12
|
+
* segments, so we register one route per (method × prefix) combination.
|
|
13
|
+
* Each handler builds the LifeOpsRouteContext or WebsiteBlockerRouteContext
|
|
14
|
+
* that the underlying handlers expect, then delegates.
|
|
15
|
+
*/
|
|
16
|
+
import { sendJson as httpSendJson, sendJsonError as httpSendJsonError, readJsonBody as httpReadJsonBody, } from "@elizaos/agent/api/http-helpers";
|
|
17
|
+
import { decodePathComponent as httpDecodePathComponent } from "@elizaos/agent/api/server-helpers";
|
|
18
|
+
import { handleLifeOpsRoutes } from "./lifeops-routes.js";
|
|
19
|
+
import { handleWebsiteBlockerRoutes } from "./website-blocker-routes.js";
|
|
20
|
+
// ---------------------------------------------------------------------------
|
|
21
|
+
// Context builders — bridge plugin route (req, res, runtime) to the context
|
|
22
|
+
// objects the LifeOps handlers expect.
|
|
23
|
+
// ---------------------------------------------------------------------------
|
|
24
|
+
function json(res, data, status = 200) {
|
|
25
|
+
httpSendJson(res, data, status);
|
|
26
|
+
}
|
|
27
|
+
function error(res, message, status = 400) {
|
|
28
|
+
httpSendJsonError(res, message, status);
|
|
29
|
+
}
|
|
30
|
+
function firstHeaderValue(value) {
|
|
31
|
+
if (Array.isArray(value)) {
|
|
32
|
+
return firstHeaderValue(value[0]);
|
|
33
|
+
}
|
|
34
|
+
if (typeof value !== "string") {
|
|
35
|
+
return null;
|
|
36
|
+
}
|
|
37
|
+
const normalized = value.split(",")[0]?.trim();
|
|
38
|
+
return normalized ? normalized : null;
|
|
39
|
+
}
|
|
40
|
+
function requestBaseUrl(req) {
|
|
41
|
+
const headers = req.headers ?? {};
|
|
42
|
+
const protocol = firstHeaderValue(headers["x-forwarded-proto"]) ??
|
|
43
|
+
((req.socket?.encrypted ?? false)
|
|
44
|
+
? "https"
|
|
45
|
+
: "http");
|
|
46
|
+
const host = firstHeaderValue(headers["x-forwarded-host"]) ??
|
|
47
|
+
firstHeaderValue(headers.host) ??
|
|
48
|
+
"localhost";
|
|
49
|
+
return `${protocol}://${host}`;
|
|
50
|
+
}
|
|
51
|
+
function buildLifeOpsContext(req, res, runtime) {
|
|
52
|
+
const method = (req.method ?? "GET").toUpperCase();
|
|
53
|
+
const url = new URL(req.url ?? "/", requestBaseUrl(req));
|
|
54
|
+
return {
|
|
55
|
+
req,
|
|
56
|
+
res,
|
|
57
|
+
method,
|
|
58
|
+
pathname: url.pathname,
|
|
59
|
+
url,
|
|
60
|
+
state: {
|
|
61
|
+
runtime,
|
|
62
|
+
adminEntityId: null,
|
|
63
|
+
},
|
|
64
|
+
json,
|
|
65
|
+
error,
|
|
66
|
+
readJsonBody: httpReadJsonBody,
|
|
67
|
+
decodePathComponent: httpDecodePathComponent,
|
|
68
|
+
};
|
|
69
|
+
}
|
|
70
|
+
function buildWebsiteBlockerContext(req, res, runtime) {
|
|
71
|
+
const method = (req.method ?? "GET").toUpperCase();
|
|
72
|
+
const url = new URL(req.url ?? "/", requestBaseUrl(req));
|
|
73
|
+
return {
|
|
74
|
+
req,
|
|
75
|
+
res,
|
|
76
|
+
method,
|
|
77
|
+
pathname: url.pathname,
|
|
78
|
+
runtime: runtime ?? undefined,
|
|
79
|
+
readJsonBody: httpReadJsonBody,
|
|
80
|
+
json,
|
|
81
|
+
error,
|
|
82
|
+
};
|
|
83
|
+
}
|
|
84
|
+
// ---------------------------------------------------------------------------
|
|
85
|
+
// All static LifeOps routes (exact-path matches)
|
|
86
|
+
// ---------------------------------------------------------------------------
|
|
87
|
+
const LIFEOPS_STATIC_ROUTES = [
|
|
88
|
+
{ type: "GET", path: "/api/lifeops/app-state" },
|
|
89
|
+
{ type: "PUT", path: "/api/lifeops/app-state" },
|
|
90
|
+
{ type: "GET", path: "/api/lifeops/calendar/feed" },
|
|
91
|
+
{ type: "GET", path: "/api/lifeops/calendar/next-context" },
|
|
92
|
+
{ type: "GET", path: "/api/lifeops/gmail/triage" },
|
|
93
|
+
{ type: "GET", path: "/api/lifeops/gmail/search" },
|
|
94
|
+
{ type: "GET", path: "/api/lifeops/gmail/needs-response" },
|
|
95
|
+
{ type: "POST", path: "/api/lifeops/calendar/events" },
|
|
96
|
+
{ type: "POST", path: "/api/lifeops/gmail/reply-drafts" },
|
|
97
|
+
{ type: "POST", path: "/api/lifeops/gmail/batch-reply-drafts" },
|
|
98
|
+
{ type: "POST", path: "/api/lifeops/gmail/reply-send" },
|
|
99
|
+
{ type: "POST", path: "/api/lifeops/gmail/message-send" },
|
|
100
|
+
{ type: "POST", path: "/api/lifeops/gmail/batch-reply-send" },
|
|
101
|
+
{ type: "GET", path: "/api/lifeops/connectors/google/status" },
|
|
102
|
+
{ type: "POST", path: "/api/lifeops/connectors/google/start" },
|
|
103
|
+
{ type: "POST", path: "/api/lifeops/connectors/google/preference" },
|
|
104
|
+
{ type: "GET", path: "/api/lifeops/connectors/google/callback", public: true },
|
|
105
|
+
{ type: "GET", path: "/api/lifeops/connectors/google/success", public: true },
|
|
106
|
+
{ type: "GET", path: "/api/lifeops/connectors/google/accounts" },
|
|
107
|
+
{ type: "POST", path: "/api/lifeops/connectors/google/disconnect" },
|
|
108
|
+
{ type: "GET", path: "/api/lifeops/connectors/x/status" },
|
|
109
|
+
{ type: "POST", path: "/api/lifeops/connectors/x" },
|
|
110
|
+
{ type: "POST", path: "/api/lifeops/x/posts" },
|
|
111
|
+
// iMessage
|
|
112
|
+
{ type: "GET", path: "/api/lifeops/connectors/imessage/status" },
|
|
113
|
+
{ type: "GET", path: "/api/lifeops/connectors/imessage/chats" },
|
|
114
|
+
{ type: "GET", path: "/api/lifeops/connectors/imessage/messages" },
|
|
115
|
+
{ type: "POST", path: "/api/lifeops/connectors/imessage/send" },
|
|
116
|
+
// Telegram
|
|
117
|
+
{ type: "GET", path: "/api/lifeops/connectors/telegram/status" },
|
|
118
|
+
{ type: "POST", path: "/api/lifeops/connectors/telegram/start" },
|
|
119
|
+
{ type: "POST", path: "/api/lifeops/connectors/telegram/submit" },
|
|
120
|
+
{ type: "POST", path: "/api/lifeops/connectors/telegram/cancel" },
|
|
121
|
+
{ type: "POST", path: "/api/lifeops/connectors/telegram/disconnect" },
|
|
122
|
+
{ type: "POST", path: "/api/lifeops/connectors/telegram/verify" },
|
|
123
|
+
// Signal
|
|
124
|
+
{ type: "GET", path: "/api/lifeops/connectors/signal/status" },
|
|
125
|
+
{ type: "POST", path: "/api/lifeops/connectors/signal/pair" },
|
|
126
|
+
{ type: "GET", path: "/api/lifeops/connectors/signal/pairing-status" },
|
|
127
|
+
{ type: "POST", path: "/api/lifeops/connectors/signal/stop" },
|
|
128
|
+
{ type: "POST", path: "/api/lifeops/connectors/signal/disconnect" },
|
|
129
|
+
// Discord
|
|
130
|
+
{ type: "GET", path: "/api/lifeops/connectors/discord/status" },
|
|
131
|
+
{ type: "POST", path: "/api/lifeops/connectors/discord/connect" },
|
|
132
|
+
{ type: "POST", path: "/api/lifeops/connectors/discord/disconnect" },
|
|
133
|
+
{ type: "GET", path: "/api/lifeops/channel-policies" },
|
|
134
|
+
{ type: "POST", path: "/api/lifeops/channel-policies" },
|
|
135
|
+
{ type: "POST", path: "/api/lifeops/channels/phone-consent" },
|
|
136
|
+
{ type: "GET", path: "/api/lifeops/activity-signals" },
|
|
137
|
+
{ type: "POST", path: "/api/lifeops/activity-signals" },
|
|
138
|
+
{ type: "POST", path: "/api/lifeops/reminders/process" },
|
|
139
|
+
{ type: "GET", path: "/api/lifeops/reminder-preferences" },
|
|
140
|
+
{ type: "POST", path: "/api/lifeops/reminder-preferences" },
|
|
141
|
+
{ type: "POST", path: "/api/lifeops/reminders/acknowledge" },
|
|
142
|
+
{ type: "POST", path: "/api/lifeops/website-access/relock" },
|
|
143
|
+
{ type: "GET", path: "/api/lifeops/reminders/inspection" },
|
|
144
|
+
{ type: "GET", path: "/api/lifeops/workflows" },
|
|
145
|
+
{ type: "POST", path: "/api/lifeops/workflows" },
|
|
146
|
+
{ type: "GET", path: "/api/lifeops/browser/sessions" },
|
|
147
|
+
{ type: "GET", path: "/api/lifeops/browser/settings" },
|
|
148
|
+
{ type: "POST", path: "/api/lifeops/browser/settings" },
|
|
149
|
+
{ type: "POST", path: "/api/lifeops/browser/companions/pair" },
|
|
150
|
+
{ type: "POST", path: "/api/lifeops/browser/companions/auto-pair" },
|
|
151
|
+
{ type: "GET", path: "/api/lifeops/browser/companions" },
|
|
152
|
+
{ type: "GET", path: "/api/lifeops/browser/packages" },
|
|
153
|
+
{ type: "POST", path: "/api/lifeops/browser/companions/sync" },
|
|
154
|
+
{ type: "GET", path: "/api/lifeops/browser/tabs" },
|
|
155
|
+
{ type: "GET", path: "/api/lifeops/browser/current-page" },
|
|
156
|
+
{ type: "POST", path: "/api/lifeops/browser/sync" },
|
|
157
|
+
{ type: "POST", path: "/api/lifeops/browser/sessions" },
|
|
158
|
+
{ type: "GET", path: "/api/lifeops/overview" },
|
|
159
|
+
{ type: "GET", path: "/api/lifeops/seed-templates" },
|
|
160
|
+
{ type: "POST", path: "/api/lifeops/seed" },
|
|
161
|
+
{ type: "GET", path: "/api/lifeops/definitions" },
|
|
162
|
+
{ type: "POST", path: "/api/lifeops/definitions" },
|
|
163
|
+
{ type: "GET", path: "/api/lifeops/goals" },
|
|
164
|
+
{ type: "POST", path: "/api/lifeops/goals" },
|
|
165
|
+
];
|
|
166
|
+
// ---------------------------------------------------------------------------
|
|
167
|
+
// Dynamic LifeOps routes (param-based matches)
|
|
168
|
+
// ---------------------------------------------------------------------------
|
|
169
|
+
const LIFEOPS_DYNAMIC_ROUTES = [
|
|
170
|
+
// /api/lifeops/definitions/:id
|
|
171
|
+
{ type: "GET", path: "/api/lifeops/definitions/:id" },
|
|
172
|
+
{ type: "PUT", path: "/api/lifeops/definitions/:id" },
|
|
173
|
+
{ type: "DELETE", path: "/api/lifeops/definitions/:id" },
|
|
174
|
+
// /api/lifeops/goals/:id
|
|
175
|
+
{ type: "GET", path: "/api/lifeops/goals/:id" },
|
|
176
|
+
{ type: "PUT", path: "/api/lifeops/goals/:id" },
|
|
177
|
+
{ type: "DELETE", path: "/api/lifeops/goals/:id" },
|
|
178
|
+
// /api/lifeops/goals/:id/review
|
|
179
|
+
{ type: "GET", path: "/api/lifeops/goals/:id/review" },
|
|
180
|
+
// /api/lifeops/workflows/:id
|
|
181
|
+
{ type: "GET", path: "/api/lifeops/workflows/:id" },
|
|
182
|
+
{ type: "PUT", path: "/api/lifeops/workflows/:id" },
|
|
183
|
+
// /api/lifeops/workflows/:id/run
|
|
184
|
+
{ type: "POST", path: "/api/lifeops/workflows/:id/run" },
|
|
185
|
+
// /api/lifeops/browser/sessions/:id
|
|
186
|
+
{ type: "GET", path: "/api/lifeops/browser/sessions/:id" },
|
|
187
|
+
// /api/lifeops/browser/sessions/:id/confirm
|
|
188
|
+
{ type: "POST", path: "/api/lifeops/browser/sessions/:id/confirm" },
|
|
189
|
+
// /api/lifeops/browser/sessions/:id/complete
|
|
190
|
+
{ type: "POST", path: "/api/lifeops/browser/sessions/:id/complete" },
|
|
191
|
+
// /api/lifeops/browser/companions/sessions/:id/progress
|
|
192
|
+
{ type: "POST", path: "/api/lifeops/browser/companions/sessions/:id/progress" },
|
|
193
|
+
// /api/lifeops/browser/companions/sessions/:id/complete
|
|
194
|
+
{ type: "POST", path: "/api/lifeops/browser/companions/sessions/:id/complete" },
|
|
195
|
+
// /api/lifeops/browser/packages/:browser/build
|
|
196
|
+
{ type: "POST", path: "/api/lifeops/browser/packages/:browser/build" },
|
|
197
|
+
// /api/lifeops/browser/packages/:browser/download
|
|
198
|
+
{ type: "GET", path: "/api/lifeops/browser/packages/:browser/download" },
|
|
199
|
+
// /api/lifeops/occurrences/:id/explanation
|
|
200
|
+
{ type: "GET", path: "/api/lifeops/occurrences/:id/explanation" },
|
|
201
|
+
// /api/lifeops/occurrences/:id/complete
|
|
202
|
+
{ type: "POST", path: "/api/lifeops/occurrences/:id/complete" },
|
|
203
|
+
// /api/lifeops/occurrences/:id/skip
|
|
204
|
+
{ type: "POST", path: "/api/lifeops/occurrences/:id/skip" },
|
|
205
|
+
// /api/lifeops/occurrences/:id/snooze
|
|
206
|
+
{ type: "POST", path: "/api/lifeops/occurrences/:id/snooze" },
|
|
207
|
+
// /api/lifeops/website-access/callbacks/:key/resolve
|
|
208
|
+
{ type: "POST", path: "/api/lifeops/website-access/callbacks/:key/resolve" },
|
|
209
|
+
];
|
|
210
|
+
// ---------------------------------------------------------------------------
|
|
211
|
+
// Website-blocker routes
|
|
212
|
+
// ---------------------------------------------------------------------------
|
|
213
|
+
const WEBSITE_BLOCKER_ROUTES = [
|
|
214
|
+
{ type: "GET", path: "/api/website-blocker" },
|
|
215
|
+
{ type: "GET", path: "/api/website-blocker/status" },
|
|
216
|
+
{ type: "POST", path: "/api/website-blocker" },
|
|
217
|
+
{ type: "PUT", path: "/api/website-blocker" },
|
|
218
|
+
{ type: "DELETE", path: "/api/website-blocker" },
|
|
219
|
+
];
|
|
220
|
+
// ---------------------------------------------------------------------------
|
|
221
|
+
// Build Plugin Route arrays
|
|
222
|
+
// ---------------------------------------------------------------------------
|
|
223
|
+
function lifeOpsRouteHandler() {
|
|
224
|
+
return async (req, res, runtime) => {
|
|
225
|
+
const httpReq = req;
|
|
226
|
+
const httpRes = res;
|
|
227
|
+
const ctx = buildLifeOpsContext(httpReq, httpRes, runtime ?? null);
|
|
228
|
+
await handleLifeOpsRoutes(ctx);
|
|
229
|
+
};
|
|
230
|
+
}
|
|
231
|
+
function websiteBlockerRouteHandler() {
|
|
232
|
+
return async (req, res, runtime) => {
|
|
233
|
+
const httpReq = req;
|
|
234
|
+
const httpRes = res;
|
|
235
|
+
const ctx = buildWebsiteBlockerContext(httpReq, httpRes, runtime ?? null);
|
|
236
|
+
await handleWebsiteBlockerRoutes(ctx);
|
|
237
|
+
};
|
|
238
|
+
}
|
|
239
|
+
const lifeOpsPluginRoutes = [
|
|
240
|
+
// Static LifeOps routes
|
|
241
|
+
...LIFEOPS_STATIC_ROUTES.map((r) => ({
|
|
242
|
+
type: r.type,
|
|
243
|
+
path: r.path,
|
|
244
|
+
rawPath: true,
|
|
245
|
+
...(r.public ? { public: true } : {}),
|
|
246
|
+
handler: lifeOpsRouteHandler(),
|
|
247
|
+
})),
|
|
248
|
+
// Dynamic LifeOps routes
|
|
249
|
+
...LIFEOPS_DYNAMIC_ROUTES.map((r) => ({
|
|
250
|
+
type: r.type,
|
|
251
|
+
path: r.path,
|
|
252
|
+
rawPath: true,
|
|
253
|
+
handler: lifeOpsRouteHandler(),
|
|
254
|
+
})),
|
|
255
|
+
// Website blocker routes
|
|
256
|
+
...WEBSITE_BLOCKER_ROUTES.map((r) => ({
|
|
257
|
+
type: r.type,
|
|
258
|
+
path: r.path,
|
|
259
|
+
rawPath: true,
|
|
260
|
+
handler: websiteBlockerRouteHandler(),
|
|
261
|
+
})),
|
|
262
|
+
];
|
|
263
|
+
// ---------------------------------------------------------------------------
|
|
264
|
+
// Plugin export
|
|
265
|
+
// ---------------------------------------------------------------------------
|
|
266
|
+
export const lifeopsPlugin = {
|
|
267
|
+
name: "@elizaos/app-lifeops-routes",
|
|
268
|
+
description: "LifeOps dashboard, Google Workspace, browser companion, website blocker, and scheduling routes",
|
|
269
|
+
routes: lifeOpsPluginRoutes,
|
|
270
|
+
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"blockUntilTaskComplete.d.ts","sourceRoot":"","sources":["../../../../../../../../../apps/app-lifeops/src/website-blocker/chat-integration/actions/blockUntilTaskComplete.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,MAAM,EAKP,MAAM,eAAe,CAAC;AAwHvB,eAAO,MAAM,4BAA4B,EAAE,
|
|
1
|
+
{"version":3,"file":"blockUntilTaskComplete.d.ts","sourceRoot":"","sources":["../../../../../../../../../apps/app-lifeops/src/website-blocker/chat-integration/actions/blockUntilTaskComplete.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,MAAM,EAKP,MAAM,eAAe,CAAC;AAwHvB,eAAO,MAAM,4BAA4B,EAAE,MA8I1C,CAAC"}
|