@elizaos/shared 2.0.0-alpha.442 → 2.0.0-alpha.502

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.
@@ -147,7 +147,7 @@ export interface LifeOpsSchedulingProposal {
147
147
  createdAt: string;
148
148
  updatedAt: string;
149
149
  }
150
- export declare const LIFEOPS_CONNECTOR_PROVIDERS: readonly ["google", "x", "telegram", "discord", "twilio", "signal", "whatsapp", "imessage"];
150
+ export declare const LIFEOPS_CONNECTOR_PROVIDERS: readonly ["google", "x", "telegram", "discord", "twilio", "signal", "whatsapp", "imessage", "strava", "fitbit", "withings", "oura"];
151
151
  export type LifeOpsConnectorProvider = (typeof LIFEOPS_CONNECTOR_PROVIDERS)[number];
152
152
  export declare const LIFEOPS_CONNECTOR_MODES: readonly ["local", "remote", "cloud_managed"];
153
153
  export type LifeOpsConnectorMode = (typeof LIFEOPS_CONNECTOR_MODES)[number];
@@ -161,6 +161,12 @@ export declare const LIFEOPS_GOOGLE_CAPABILITIES: readonly ["google.basic_identi
161
161
  export type LifeOpsGoogleCapability = (typeof LIFEOPS_GOOGLE_CAPABILITIES)[number];
162
162
  export declare const LIFEOPS_X_CAPABILITIES: readonly ["x.read", "x.write", "x.dm.read", "x.dm.write"];
163
163
  export type LifeOpsXCapability = (typeof LIFEOPS_X_CAPABILITIES)[number];
164
+ export declare const LIFEOPS_HEALTH_CONNECTOR_PROVIDERS: readonly ["strava", "fitbit", "withings", "oura"];
165
+ export type LifeOpsHealthConnectorProvider = (typeof LIFEOPS_HEALTH_CONNECTOR_PROVIDERS)[number];
166
+ export declare const LIFEOPS_HEALTH_CONNECTOR_CAPABILITIES: readonly ["health.activity.read", "health.workouts.read", "health.sleep.read", "health.readiness.read", "health.body.read", "health.vitals.read"];
167
+ export type LifeOpsHealthConnectorCapability = (typeof LIFEOPS_HEALTH_CONNECTOR_CAPABILITIES)[number];
168
+ export declare const LIFEOPS_HEALTH_METRICS: readonly ["steps", "active_minutes", "sleep_hours", "sleep_score", "readiness_score", "heart_rate", "resting_heart_rate", "heart_rate_variability", "calories", "distance_meters", "weight_kg", "body_fat_percent", "blood_pressure_systolic", "blood_pressure_diastolic", "blood_oxygen_percent", "respiratory_rate", "body_temperature_celsius"];
169
+ export type LifeOpsHealthMetric = (typeof LIFEOPS_HEALTH_METRICS)[number];
164
170
  export declare const LIFEOPS_SIGNAL_CAPABILITIES: readonly ["signal.read", "signal.send"];
165
171
  export type LifeOpsSignalCapability = (typeof LIFEOPS_SIGNAL_CAPABILITIES)[number];
166
172
  export declare const LIFEOPS_DISCORD_CAPABILITIES: readonly ["discord.read", "discord.send"];
@@ -531,6 +537,9 @@ export type LifeOpsWorkflowAction = (LifeOpsWorkflowActionBase & {
531
537
  }) | (LifeOpsWorkflowActionBase & {
532
538
  kind: "get_gmail_unresponded";
533
539
  request?: GetLifeOpsGmailUnrespondedRequest;
540
+ }) | (LifeOpsWorkflowActionBase & {
541
+ kind: "get_health_summary";
542
+ request?: GetLifeOpsHealthSummaryRequest;
534
543
  }) | (LifeOpsWorkflowActionBase & {
535
544
  kind: "dispatch_n8n_workflow";
536
545
  workflowId: string;
@@ -570,6 +579,7 @@ export interface LifeOpsConnectorGrant {
570
579
  provider: LifeOpsConnectorProvider;
571
580
  side: LifeOpsConnectorSide;
572
581
  identity: Record<string, unknown>;
582
+ identityEmail?: string | null;
573
583
  grantedScopes: string[];
574
584
  capabilities: string[];
575
585
  tokenRef: string | null;
@@ -601,7 +611,7 @@ export declare const LIFEOPS_ACTIVITY_SIGNAL_SOURCES: readonly ["app_lifecycle",
601
611
  export type LifeOpsActivitySignalSource = (typeof LIFEOPS_ACTIVITY_SIGNAL_SOURCES)[number];
602
612
  export declare const LIFEOPS_ACTIVITY_SIGNAL_STATES: readonly ["active", "idle", "background", "locked", "sleeping"];
603
613
  export type LifeOpsActivitySignalState = (typeof LIFEOPS_ACTIVITY_SIGNAL_STATES)[number];
604
- export declare const LIFEOPS_HEALTH_SIGNAL_SOURCES: readonly ["healthkit", "health_connect"];
614
+ export declare const LIFEOPS_HEALTH_SIGNAL_SOURCES: readonly ["healthkit", "health_connect", "strava", "fitbit", "withings", "oura"];
605
615
  export type LifeOpsHealthSignalSource = (typeof LIFEOPS_HEALTH_SIGNAL_SOURCES)[number];
606
616
  export interface LifeOpsHealthSignalSleepSummary {
607
617
  available: boolean;
@@ -629,6 +639,181 @@ export interface LifeOpsHealthSignal {
629
639
  biometrics: LifeOpsHealthSignalBiometrics;
630
640
  warnings: string[];
631
641
  }
642
+ export declare const LIFEOPS_HEALTH_CONNECTOR_REASONS: readonly ["connected", "disconnected", "config_missing", "needs_reauth", "sync_failed"];
643
+ export type LifeOpsHealthConnectorReason = (typeof LIFEOPS_HEALTH_CONNECTOR_REASONS)[number];
644
+ export interface LifeOpsHealthConnectorStatus {
645
+ provider: LifeOpsHealthConnectorProvider;
646
+ side: LifeOpsConnectorSide;
647
+ mode: LifeOpsConnectorMode;
648
+ defaultMode: LifeOpsConnectorMode;
649
+ availableModes: LifeOpsConnectorMode[];
650
+ executionTarget: LifeOpsConnectorExecutionTarget;
651
+ sourceOfTruth: LifeOpsConnectorSourceOfTruth;
652
+ configured: boolean;
653
+ connected: boolean;
654
+ reason: LifeOpsHealthConnectorReason;
655
+ identity: Record<string, unknown> | null;
656
+ grantedCapabilities: LifeOpsHealthConnectorCapability[];
657
+ grantedScopes: string[];
658
+ expiresAt: string | null;
659
+ hasRefreshToken: boolean;
660
+ lastSyncAt: string | null;
661
+ grant: LifeOpsConnectorGrant | null;
662
+ degradations?: LifeOpsConnectorDegradation[];
663
+ }
664
+ export interface LifeOpsHealthMetricSample {
665
+ id: string;
666
+ agentId: string;
667
+ provider: LifeOpsHealthConnectorProvider;
668
+ grantId: string;
669
+ metric: LifeOpsHealthMetric;
670
+ value: number;
671
+ unit: string;
672
+ startAt: string;
673
+ endAt: string;
674
+ localDate: string;
675
+ sourceExternalId: string;
676
+ metadata: Record<string, unknown>;
677
+ createdAt: string;
678
+ updatedAt: string;
679
+ }
680
+ export interface LifeOpsHealthWorkout {
681
+ id: string;
682
+ agentId: string;
683
+ provider: LifeOpsHealthConnectorProvider;
684
+ grantId: string;
685
+ sourceExternalId: string;
686
+ workoutType: string;
687
+ title: string;
688
+ startAt: string;
689
+ endAt: string | null;
690
+ durationSeconds: number;
691
+ distanceMeters: number | null;
692
+ calories: number | null;
693
+ averageHeartRate: number | null;
694
+ maxHeartRate: number | null;
695
+ metadata: Record<string, unknown>;
696
+ createdAt: string;
697
+ updatedAt: string;
698
+ }
699
+ export interface LifeOpsHealthSyncState {
700
+ id: string;
701
+ agentId: string;
702
+ provider: LifeOpsHealthConnectorProvider;
703
+ grantId: string;
704
+ cursor: string | null;
705
+ lastSyncedAt: string | null;
706
+ lastSyncStartedAt: string | null;
707
+ lastSyncError: string | null;
708
+ metadata: Record<string, unknown>;
709
+ updatedAt: string;
710
+ }
711
+ export declare const LIFEOPS_HEALTH_SLEEP_STAGES: readonly ["awake", "light", "deep", "rem", "restless", "unknown"];
712
+ export type LifeOpsHealthSleepStage = (typeof LIFEOPS_HEALTH_SLEEP_STAGES)[number];
713
+ export interface LifeOpsHealthSleepStageSample {
714
+ stage: LifeOpsHealthSleepStage;
715
+ startAt: string;
716
+ endAt: string;
717
+ confidence: number | null;
718
+ providerCode: string | null;
719
+ }
720
+ export interface LifeOpsHealthSleepEpisode {
721
+ id: string;
722
+ agentId: string;
723
+ provider: LifeOpsHealthConnectorProvider;
724
+ grantId: string;
725
+ sourceExternalId: string;
726
+ localDate: string;
727
+ timezone: string | null;
728
+ startAt: string;
729
+ endAt: string;
730
+ isMainSleep: boolean;
731
+ sleepType: string | null;
732
+ durationSeconds: number;
733
+ timeInBedSeconds: number | null;
734
+ efficiency: number | null;
735
+ latencySeconds: number | null;
736
+ awakeSeconds: number | null;
737
+ lightSleepSeconds: number | null;
738
+ deepSleepSeconds: number | null;
739
+ remSleepSeconds: number | null;
740
+ sleepScore: number | null;
741
+ readinessScore: number | null;
742
+ averageHeartRate: number | null;
743
+ lowestHeartRate: number | null;
744
+ averageHrvMs: number | null;
745
+ respiratoryRate: number | null;
746
+ bloodOxygenPercent: number | null;
747
+ stageSamples: LifeOpsHealthSleepStageSample[];
748
+ metadata: Record<string, unknown>;
749
+ createdAt: string;
750
+ updatedAt: string;
751
+ }
752
+ export interface LifeOpsHealthDailySummary {
753
+ date: string;
754
+ provider: LifeOpsHealthConnectorProvider | "healthkit" | "google-fit";
755
+ steps: number;
756
+ activeMinutes: number;
757
+ sleepHours: number;
758
+ calories: number | null;
759
+ distanceMeters: number | null;
760
+ heartRateAvg: number | null;
761
+ restingHeartRate: number | null;
762
+ hrvMs: number | null;
763
+ sleepScore: number | null;
764
+ readinessScore: number | null;
765
+ weightKg: number | null;
766
+ bloodPressureSystolic: number | null;
767
+ bloodPressureDiastolic: number | null;
768
+ bloodOxygenPercent: number | null;
769
+ }
770
+ export interface GetLifeOpsHealthSummaryRequest {
771
+ provider?: LifeOpsHealthConnectorProvider | null;
772
+ mode?: LifeOpsConnectorMode;
773
+ side?: LifeOpsConnectorSide;
774
+ days?: number;
775
+ startDate?: string | null;
776
+ endDate?: string | null;
777
+ metrics?: LifeOpsHealthMetric[];
778
+ forceSync?: boolean;
779
+ }
780
+ export interface LifeOpsHealthSummaryResponse {
781
+ providers: LifeOpsHealthConnectorStatus[];
782
+ summaries: LifeOpsHealthDailySummary[];
783
+ samples: LifeOpsHealthMetricSample[];
784
+ workouts: LifeOpsHealthWorkout[];
785
+ sleepEpisodes: LifeOpsHealthSleepEpisode[];
786
+ syncedAt: string;
787
+ }
788
+ export interface StartLifeOpsHealthConnectorRequest {
789
+ provider: LifeOpsHealthConnectorProvider;
790
+ side?: LifeOpsConnectorSide;
791
+ mode?: LifeOpsConnectorMode;
792
+ redirectUrl?: string;
793
+ capabilities?: LifeOpsHealthConnectorCapability[];
794
+ }
795
+ export interface StartLifeOpsHealthConnectorResponse {
796
+ provider: LifeOpsHealthConnectorProvider;
797
+ side: LifeOpsConnectorSide;
798
+ mode: LifeOpsConnectorMode;
799
+ requestedCapabilities: LifeOpsHealthConnectorCapability[];
800
+ redirectUri: string;
801
+ authUrl: string | null;
802
+ }
803
+ export interface DisconnectLifeOpsHealthConnectorRequest {
804
+ provider: LifeOpsHealthConnectorProvider;
805
+ side?: LifeOpsConnectorSide;
806
+ mode?: LifeOpsConnectorMode;
807
+ grantId?: string;
808
+ }
809
+ export interface SyncLifeOpsHealthConnectorRequest {
810
+ provider?: LifeOpsHealthConnectorProvider | null;
811
+ side?: LifeOpsConnectorSide;
812
+ mode?: LifeOpsConnectorMode;
813
+ startDate?: string | null;
814
+ endDate?: string | null;
815
+ days?: number;
816
+ }
632
817
  export interface LifeOpsActivitySignal {
633
818
  id: string;
634
819
  agentId: string;
@@ -1035,9 +1220,9 @@ export interface LifeOpsCalendarEvent {
1035
1220
  updatedAt: string;
1036
1221
  /** Set on merged feeds so the UI can show which calendar an event came from. */
1037
1222
  calendarSummary?: string;
1038
- /** Set when aggregating across multiple Google accounts. */
1223
+ /** Google grant that owns this Gmail message cache row. */
1039
1224
  grantId?: string;
1040
- /** Set when aggregating across multiple Google accounts. */
1225
+ /** Email address for the owning Google account when known. */
1041
1226
  accountEmail?: string;
1042
1227
  }
1043
1228
  export interface LifeOpsCalendarFeed {
@@ -1562,13 +1747,6 @@ export interface CreateLifeOpsCalendarEventRequest {
1562
1747
  durationMinutes?: number;
1563
1748
  windowPreset?: LifeOpsCalendarWindowPreset;
1564
1749
  attendees?: CreateLifeOpsCalendarEventAttendee[];
1565
- /**
1566
- * RFC 5545 RRULE strings (without the leading "RRULE:" prefix), e.g.
1567
- * `["FREQ=WEEKLY;BYDAY=MO"]`. Forwarded to Google Calendar's
1568
- * `recurrence` array when creating the event.
1569
- */
1570
- recurrence?: string[];
1571
- reminders?: LifeOpsCalendarEventReminderOverride[];
1572
1750
  }
1573
1751
  export interface LifeOpsNextCalendarEventContext {
1574
1752
  event: LifeOpsCalendarEvent | null;
@@ -1583,11 +1761,9 @@ export interface LifeOpsNextCalendarEventContext {
1583
1761
  linkedMailError: string | null;
1584
1762
  linkedMail: Array<Pick<LifeOpsGmailMessageSummary, "id" | "subject" | "from" | "receivedAt" | "snippet" | "htmlLink">>;
1585
1763
  }
1586
- export interface LifeOpsCalendarEventReminderOverride {
1587
- minutesBefore: number;
1588
- }
1589
1764
  export interface LifeOpsCalendarEventUpdate {
1590
1765
  side?: LifeOpsConnectorSide;
1766
+ mode?: LifeOpsConnectorMode;
1591
1767
  grantId?: string;
1592
1768
  calendarId?: string;
1593
1769
  title?: string;
@@ -1597,12 +1773,6 @@ export interface LifeOpsCalendarEventUpdate {
1597
1773
  notes?: string;
1598
1774
  location?: string;
1599
1775
  attendees?: CreateLifeOpsCalendarEventAttendee[];
1600
- /**
1601
- * RFC 5545 RRULE strings (without the leading "RRULE:" prefix). Forwarded
1602
- * to Google Calendar's `recurrence` array on patch when supplied.
1603
- */
1604
- recurrence?: string[];
1605
- reminders?: LifeOpsCalendarEventReminderOverride[];
1606
1776
  }
1607
1777
  export interface LifeOpsCalendarEventMutationResult {
1608
1778
  event: LifeOpsCalendarEvent;
@@ -1790,6 +1960,18 @@ export interface LifeOpsSignalConnectorStatus {
1790
1960
  grant: LifeOpsConnectorGrant | null;
1791
1961
  degradations?: LifeOpsConnectorDegradation[];
1792
1962
  }
1963
+ export interface SendLifeOpsSignalMessageRequest {
1964
+ side?: LifeOpsConnectorSide;
1965
+ recipient: string;
1966
+ text: string;
1967
+ }
1968
+ export interface SendLifeOpsSignalMessageResponse {
1969
+ provider: "signal";
1970
+ side: LifeOpsConnectorSide;
1971
+ recipient: string;
1972
+ ok: true;
1973
+ timestamp: number;
1974
+ }
1793
1975
  /**
1794
1976
  * A single inbound Signal message as returned by {@link readSignalInbound} and
1795
1977
  * the signal-local-client reader.
@@ -1826,6 +2008,13 @@ export interface LifeOpsSignalInboundMessage {
1826
2008
  /** True when the message was received in a group conversation. */
1827
2009
  isGroup: boolean;
1828
2010
  }
2011
+ export interface GetLifeOpsSignalMessagesRequest {
2012
+ limit?: number;
2013
+ }
2014
+ export interface GetLifeOpsSignalMessagesResponse {
2015
+ count: number;
2016
+ messages: LifeOpsSignalInboundMessage[];
2017
+ }
1829
2018
  export interface LifeOpsDiscordDmPreview {
1830
2019
  channelId: string | null;
1831
2020
  href: string | null;
@@ -1894,11 +2083,9 @@ export type LifeOpsTelegramAuthState = (typeof LIFEOPS_TELEGRAM_AUTH_STATES)[num
1894
2083
  export interface LifeOpsWhatsAppConnectorStatus {
1895
2084
  provider: "whatsapp";
1896
2085
  /**
1897
- * `connected` here means LifeOps can see either WhatsApp Business Cloud API
1898
- * credentials or a local QR-paired auth state. It does not imply a live
1899
- * network probe has been performed. A live send can still fail if the
1900
- * upstream token/session has been revoked. Callers that need true liveness
1901
- * must catch errors from the actual send/receive methods.
2086
+ * `connected` means at least one WhatsApp transport is live enough for
2087
+ * inbound or outbound work. A local auth file by itself is not connected until
2088
+ * the Baileys runtime service is actually online.
1902
2089
  */
1903
2090
  connected: boolean;
1904
2091
  /**
@@ -1907,6 +2094,13 @@ export interface LifeOpsWhatsAppConnectorStatus {
1907
2094
  */
1908
2095
  inbound: true;
1909
2096
  phoneNumberId?: string;
2097
+ phoneNumber?: string | null;
2098
+ localAuthAvailable?: boolean;
2099
+ localAuthRegistered?: boolean | null;
2100
+ serviceConnected?: boolean;
2101
+ outboundReady?: boolean;
2102
+ inboundReady?: boolean;
2103
+ transport?: "cloudapi" | "baileys" | "unconfigured";
1910
2104
  lastCheckedAt: string;
1911
2105
  degradations?: LifeOpsConnectorDegradation[];
1912
2106
  }
@@ -1980,6 +2174,41 @@ export interface StartLifeOpsDiscordConnectorRequest {
1980
2174
  side?: LifeOpsConnectorSide;
1981
2175
  source?: LifeOpsOwnerBrowserAccessSource;
1982
2176
  }
2177
+ export interface SendLifeOpsDiscordMessageRequest {
2178
+ side?: LifeOpsConnectorSide;
2179
+ channelId?: string;
2180
+ text: string;
2181
+ }
2182
+ export interface SendLifeOpsDiscordMessageResponse {
2183
+ provider: "discord";
2184
+ side: LifeOpsConnectorSide;
2185
+ channelId: string;
2186
+ ok: true;
2187
+ deliveryStatus: "sent" | "sending" | "failed" | "unknown";
2188
+ }
2189
+ export interface VerifyLifeOpsDiscordConnectorRequest {
2190
+ side?: LifeOpsConnectorSide;
2191
+ channelId?: string;
2192
+ sendMessage?: string;
2193
+ }
2194
+ export interface VerifyLifeOpsDiscordConnectorResponse {
2195
+ provider: "discord";
2196
+ side: LifeOpsConnectorSide;
2197
+ verifiedAt: string;
2198
+ status: LifeOpsDiscordConnectorStatus;
2199
+ send: {
2200
+ ok: boolean;
2201
+ error: string | null;
2202
+ channelId: string | null;
2203
+ message: string;
2204
+ deliveryStatus: "sent" | "sending" | "failed" | "unknown" | null;
2205
+ };
2206
+ }
2207
+ export interface SendLifeOpsWhatsAppMessageRequest {
2208
+ to: string;
2209
+ text: string;
2210
+ replyToMessageId?: string;
2211
+ }
1983
2212
  export interface StartLifeOpsTelegramAuthRequest {
1984
2213
  side?: LifeOpsConnectorSide;
1985
2214
  phone: string;
@@ -2006,6 +2235,8 @@ export interface StartLifeOpsGoogleConnectorRequest {
2006
2235
  mode?: LifeOpsConnectorMode;
2007
2236
  /** Re-authenticate an existing account by grant ID (multi-account). */
2008
2237
  grantId?: string;
2238
+ /** Create an additional account grant instead of reusing the side/mode grant. */
2239
+ createNewGrant?: boolean;
2009
2240
  capabilities?: LifeOpsGoogleCapability[];
2010
2241
  redirectUrl?: string;
2011
2242
  }
@@ -2024,6 +2255,7 @@ export interface SelectLifeOpsGoogleConnectorPreferenceRequest {
2024
2255
  export interface DisconnectLifeOpsGoogleConnectorRequest {
2025
2256
  side?: LifeOpsConnectorSide;
2026
2257
  mode?: LifeOpsConnectorMode;
2258
+ grantId?: string;
2027
2259
  }
2028
2260
  export interface UpsertLifeOpsXConnectorRequest {
2029
2261
  side?: LifeOpsConnectorSide;
@@ -2451,8 +2683,16 @@ export interface LifeOpsSleepHistoryEpisode {
2451
2683
  source: LifeOpsSleepCycleEvidenceSource | "manual";
2452
2684
  confidence: number;
2453
2685
  }
2686
+ export interface LifeOpsSleepHistorySummary {
2687
+ cycleCount: number;
2688
+ averageDurationMin: number | null;
2689
+ overnightCount: number;
2690
+ napCount: number;
2691
+ openCount: number;
2692
+ }
2454
2693
  export interface LifeOpsSleepHistoryResponse {
2455
2694
  episodes: LifeOpsSleepHistoryEpisode[];
2695
+ summary: LifeOpsSleepHistorySummary;
2456
2696
  windowDays: number;
2457
2697
  includeNaps: boolean;
2458
2698
  }