@elizaos/shared 2.0.0-alpha.223 → 2.0.0-alpha.334

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.
@@ -24,7 +24,7 @@ export type LifeOpsWorkflowTriggerType = (typeof LIFEOPS_WORKFLOW_TRIGGER_TYPES)
24
24
  * publishes matching occurrences to `runDueEventWorkflows`, and — optionally —
25
25
  * a filter shape under {@link LifeOpsEventFilters}.
26
26
  */
27
- export declare const LIFEOPS_EVENT_KINDS: readonly ["calendar.event.ended"];
27
+ export declare const LIFEOPS_EVENT_KINDS: readonly ["calendar.event.ended", "gmail.message.received", "gmail.thread.needs_response", "lifeops.sleep.onset_candidate", "lifeops.sleep.detected", "lifeops.sleep.ended", "lifeops.wake.observed", "lifeops.wake.confirmed", "lifeops.nap.detected", "lifeops.bedtime.imminent", "lifeops.regularity.changed"];
28
28
  export type LifeOpsEventKind = (typeof LIFEOPS_EVENT_KINDS)[number];
29
29
  export interface LifeOpsCalendarEventEndedFilters {
30
30
  /** Only fire for events on these calendar ids (e.g. "primary"). */
@@ -36,9 +36,80 @@ export interface LifeOpsCalendarEventEndedFilters {
36
36
  /** Only fire when one attendee email contains one of these substrings. */
37
37
  attendeeEmailIncludesAny?: string[];
38
38
  }
39
+ export interface LifeOpsGmailEventFilters {
40
+ /** Only fire for these Google connector grant ids. */
41
+ grantIds?: string[];
42
+ /** Only fire when the sender email/display contains one of these substrings. */
43
+ fromIncludesAny?: string[];
44
+ /** Only fire when the subject contains one of these case-insensitive substrings. */
45
+ subjectIncludesAny?: string[];
46
+ /** Only fire when at least one Gmail label id is present. */
47
+ labelIds?: string[];
48
+ /** Only fire when LifeOps classified the message/thread as needing a reply. */
49
+ requiresReplyNeeded?: boolean;
50
+ }
51
+ export interface LifeOpsSleepOnsetCandidateFilters {
52
+ minConfidence?: number;
53
+ }
54
+ export interface LifeOpsSleepDetectedFilters {
55
+ minConfidence?: number;
56
+ }
57
+ export interface LifeOpsSleepEndedFilters {
58
+ minConfidence?: number;
59
+ }
60
+ export interface LifeOpsWakeObservedFilters {
61
+ offsetMinutes?: number;
62
+ minConfidence?: number;
63
+ }
64
+ export interface LifeOpsWakeConfirmedFilters {
65
+ offsetMinutes?: number;
66
+ minConfidence?: number;
67
+ }
68
+ export interface LifeOpsNapDetectedFilters {
69
+ minConfidence?: number;
70
+ maxDurationMinutes?: number;
71
+ }
72
+ export interface LifeOpsBedtimeImminentFilters {
73
+ minutesBefore?: number;
74
+ minConfidence?: number;
75
+ }
76
+ export interface LifeOpsRegularityChangedFilters {
77
+ /** Fires when regularity class transitions into this value. */
78
+ becomes?: LifeOpsRegularityClass;
79
+ }
39
80
  export type LifeOpsEventFilters = {
40
81
  kind: "calendar.event.ended";
41
82
  filters?: LifeOpsCalendarEventEndedFilters;
83
+ } | {
84
+ kind: "gmail.message.received";
85
+ filters?: LifeOpsGmailEventFilters;
86
+ } | {
87
+ kind: "gmail.thread.needs_response";
88
+ filters?: LifeOpsGmailEventFilters;
89
+ } | {
90
+ kind: "lifeops.sleep.onset_candidate";
91
+ filters?: LifeOpsSleepOnsetCandidateFilters;
92
+ } | {
93
+ kind: "lifeops.sleep.detected";
94
+ filters?: LifeOpsSleepDetectedFilters;
95
+ } | {
96
+ kind: "lifeops.sleep.ended";
97
+ filters?: LifeOpsSleepEndedFilters;
98
+ } | {
99
+ kind: "lifeops.wake.observed";
100
+ filters?: LifeOpsWakeObservedFilters;
101
+ } | {
102
+ kind: "lifeops.wake.confirmed";
103
+ filters?: LifeOpsWakeConfirmedFilters;
104
+ } | {
105
+ kind: "lifeops.nap.detected";
106
+ filters?: LifeOpsNapDetectedFilters;
107
+ } | {
108
+ kind: "lifeops.bedtime.imminent";
109
+ filters?: LifeOpsBedtimeImminentFilters;
110
+ } | {
111
+ kind: "lifeops.regularity.changed";
112
+ filters?: LifeOpsRegularityChangedFilters;
42
113
  };
43
114
  export declare const LIFEOPS_NEGOTIATION_STATES: readonly ["initiated", "proposals_sent", "awaiting_response", "confirmed", "cancelled"];
44
115
  export type LifeOpsNegotiationState = (typeof LIFEOPS_NEGOTIATION_STATES)[number];
@@ -85,7 +156,7 @@ export declare const LIFEOPS_CONNECTOR_SOURCES_OF_TRUTH: readonly ["local_storag
85
156
  export type LifeOpsConnectorSourceOfTruth = (typeof LIFEOPS_CONNECTOR_SOURCES_OF_TRUTH)[number];
86
157
  export declare const LIFEOPS_GOOGLE_CAPABILITIES: readonly ["google.basic_identity", "google.calendar.read", "google.calendar.write", "google.gmail.triage", "google.gmail.send", "google.gmail.manage"];
87
158
  export type LifeOpsGoogleCapability = (typeof LIFEOPS_GOOGLE_CAPABILITIES)[number];
88
- export declare const LIFEOPS_X_CAPABILITIES: readonly ["x.read", "x.write"];
159
+ export declare const LIFEOPS_X_CAPABILITIES: readonly ["x.read", "x.write", "x.dm.read", "x.dm.write"];
89
160
  export type LifeOpsXCapability = (typeof LIFEOPS_X_CAPABILITIES)[number];
90
161
  export declare const LIFEOPS_SIGNAL_CAPABILITIES: readonly ["signal.read", "signal.send"];
91
162
  export type LifeOpsSignalCapability = (typeof LIFEOPS_SIGNAL_CAPABILITIES)[number];
@@ -94,9 +165,9 @@ export type LifeOpsDiscordCapability = (typeof LIFEOPS_DISCORD_CAPABILITIES)[num
94
165
  export declare const LIFEOPS_TELEGRAM_CAPABILITIES: readonly ["telegram.read", "telegram.send"];
95
166
  export type LifeOpsTelegramCapability = (typeof LIFEOPS_TELEGRAM_CAPABILITIES)[number];
96
167
  export declare function capabilitiesForSide<T extends string>(allCapabilities: readonly T[], side: LifeOpsConnectorSide): T[];
97
- export declare const LIFEOPS_REMINDER_CHANNELS: readonly ["in_app", "sms", "voice", "telegram", "discord", "signal", "whatsapp", "imessage"];
168
+ export declare const LIFEOPS_REMINDER_CHANNELS: readonly ["in_app", "sms", "voice", "telegram", "discord", "signal", "whatsapp", "imessage", "email", "push"];
98
169
  export type LifeOpsReminderChannel = (typeof LIFEOPS_REMINDER_CHANNELS)[number];
99
- export declare const LIFEOPS_CHANNEL_TYPES: readonly ["in_app", "sms", "voice", "telegram", "discord", "signal", "whatsapp", "imessage", "x", "browser"];
170
+ export declare const LIFEOPS_CHANNEL_TYPES: readonly ["in_app", "sms", "voice", "telegram", "discord", "signal", "whatsapp", "imessage", "x", "browser", "email", "push"];
100
171
  export type LifeOpsChannelType = (typeof LIFEOPS_CHANNEL_TYPES)[number];
101
172
  export declare const LIFEOPS_PRIVACY_CLASSES: readonly ["private", "shared", "public"];
102
173
  export type LifeOpsPrivacyClass = (typeof LIFEOPS_PRIVACY_CLASSES)[number];
@@ -117,9 +188,9 @@ export type LifeOpsReminderIntensityCompatibility = (typeof LIFEOPS_REMINDER_INT
117
188
  export type LifeOpsReminderIntensityInput = LifeOpsReminderIntensity | LifeOpsReminderIntensityCompatibility;
118
189
  export declare const LIFEOPS_REMINDER_PREFERENCE_SOURCES: readonly ["default", "global_policy", "definition_metadata"];
119
190
  export type LifeOpsReminderPreferenceSource = (typeof LIFEOPS_REMINDER_PREFERENCE_SOURCES)[number];
120
- export declare const LIFEOPS_OWNER_TYPES: readonly ["definition", "occurrence", "goal", "workflow", "calendar_event", "gmail_message", "connector", "channel_policy", "browser_session"];
191
+ export declare const LIFEOPS_OWNER_TYPES: readonly ["definition", "occurrence", "goal", "workflow", "calendar_event", "gmail_message", "connector", "channel_policy", "browser_session", "circadian_state"];
121
192
  export type LifeOpsOwnerType = (typeof LIFEOPS_OWNER_TYPES)[number];
122
- export declare const LIFEOPS_AUDIT_EVENT_TYPES: readonly ["definition_created", "definition_updated", "definition_deleted", "occurrence_generated", "occurrence_completed", "occurrence_skipped", "occurrence_snoozed", "goal_created", "goal_updated", "goal_deleted", "goal_reviewed", "calendar_event_created", "calendar_event_updated", "calendar_event_deleted", "gmail_triage_synced", "gmail_reply_drafted", "gmail_reply_sent", "gmail_message_sent", "reminder_due", "reminder_delivered", "reminder_blocked", "reminder_escalation_started", "reminder_escalation_resolved", "workflow_created", "workflow_updated", "workflow_run", "connector_grant_updated", "channel_policy_updated", "browser_session_created", "browser_session_updated", "x_post_sent", "seeding_offered"];
193
+ export declare const LIFEOPS_AUDIT_EVENT_TYPES: readonly ["definition_created", "definition_updated", "definition_deleted", "occurrence_generated", "occurrence_completed", "occurrence_skipped", "occurrence_snoozed", "goal_created", "goal_updated", "goal_deleted", "goal_reviewed", "calendar_event_created", "calendar_event_updated", "calendar_event_deleted", "gmail_triage_synced", "gmail_reply_drafted", "gmail_reply_sent", "gmail_message_sent", "reminder_due", "reminder_delivered", "reminder_blocked", "reminder_escalation_started", "reminder_escalation_resolved", "workflow_created", "workflow_updated", "workflow_run", "connector_grant_updated", "channel_policy_updated", "browser_session_created", "browser_session_updated", "x_post_sent", "seeding_offered", "circadian_event_emitted", "manual_override_accepted"];
123
194
  export type LifeOpsAuditEventType = (typeof LIFEOPS_AUDIT_EVENT_TYPES)[number];
124
195
  export declare const LIFEOPS_ACTORS: readonly ["agent", "user", "workflow", "connector"];
125
196
  export type LifeOpsActor = (typeof LIFEOPS_ACTORS)[number];
@@ -356,6 +427,50 @@ export type LifeOpsWorkflowSchedule = {
356
427
  kind: "cron";
357
428
  cronExpression: string;
358
429
  timezone: string;
430
+ } | {
431
+ kind: "relative_to_wake";
432
+ /** Minutes offset from wake anchor (wake.confirmed). Negative = before. */
433
+ offsetMinutes: number;
434
+ timezone: string;
435
+ onDays?: number[];
436
+ /** Minimum regularity required before projecting an anchor. Default: `regular`. */
437
+ requireRegularityAtLeast?: LifeOpsRegularityClass;
438
+ /**
439
+ * Minutes of sustained awake state after `wake.observed` required before
440
+ * the workflow fires. When set, the resolver waits for a `wake.confirmed`
441
+ * event rather than using the raw wake anchor.
442
+ */
443
+ stabilityWindowMinutes?: number;
444
+ } | {
445
+ kind: "relative_to_bedtime";
446
+ offsetMinutes: number;
447
+ timezone: string;
448
+ onDays?: number[];
449
+ requireRegularityAtLeast?: LifeOpsRegularityClass;
450
+ } | {
451
+ /**
452
+ * Fires during the canonical "morning" window anchored on the latest
453
+ * wake.confirmed. The window starts at `wakeConfirmedAt` and ends
454
+ * `windowMinutesFromWake` later (default 240). Workflow scheduler emits
455
+ * exactly once per morning window when the workflow becomes eligible.
456
+ */
457
+ kind: "during_morning";
458
+ timezone: string;
459
+ windowMinutesFromWake?: number;
460
+ onDays?: number[];
461
+ requireRegularityAtLeast?: LifeOpsRegularityClass;
462
+ } | {
463
+ /**
464
+ * Fires during the canonical "night" window anchored on the projected
465
+ * bedtime target. The window starts `windowMinutesBeforeSleepTarget`
466
+ * before the bedtime target and ends at `sleep.detected`. Fires exactly
467
+ * once per night window when the workflow becomes eligible.
468
+ */
469
+ kind: "during_night";
470
+ timezone: string;
471
+ windowMinutesBeforeSleepTarget?: number;
472
+ onDays?: number[];
473
+ requireRegularityAtLeast?: LifeOpsRegularityClass;
359
474
  } | {
360
475
  kind: "event";
361
476
  eventKind: LifeOpsEventKind;
@@ -371,12 +486,6 @@ export interface LifeOpsWorkflowPermissionPolicy {
371
486
  }
372
487
  export declare const LIFEOPS_BROWSER_KINDS: readonly ["chrome", "safari"];
373
488
  export type LifeOpsBrowserKind = (typeof LIFEOPS_BROWSER_KINDS)[number];
374
- export declare const LIFEOPS_BROWSER_TRACKING_MODES: readonly ["off", "current_tab", "active_tabs"];
375
- export type LifeOpsBrowserTrackingMode = (typeof LIFEOPS_BROWSER_TRACKING_MODES)[number];
376
- export declare const LIFEOPS_BROWSER_SITE_ACCESS_MODES: readonly ["current_site_only", "granted_sites", "all_sites"];
377
- export type LifeOpsBrowserSiteAccessMode = (typeof LIFEOPS_BROWSER_SITE_ACCESS_MODES)[number];
378
- export declare const LIFEOPS_BROWSER_COMPANION_CONNECTION_STATES: readonly ["disconnected", "connected", "paused", "permission_blocked"];
379
- export type LifeOpsBrowserCompanionConnectionState = (typeof LIFEOPS_BROWSER_COMPANION_CONNECTION_STATES)[number];
380
489
  export declare const LIFEOPS_BROWSER_ACTION_KINDS: readonly ["open", "navigate", "focus_tab", "back", "forward", "reload", "click", "type", "submit", "read_page", "extract_links", "extract_forms"];
381
490
  export type LifeOpsBrowserActionKind = (typeof LIFEOPS_BROWSER_ACTION_KINDS)[number];
382
491
  export interface LifeOpsBrowserAction {
@@ -393,244 +502,6 @@ export interface LifeOpsBrowserAction {
393
502
  requiresConfirmation: boolean;
394
503
  metadata: Record<string, unknown>;
395
504
  }
396
- export interface LifeOpsBrowserPermissionState {
397
- tabs: boolean;
398
- scripting: boolean;
399
- activeTab: boolean;
400
- allOrigins: boolean;
401
- grantedOrigins: string[];
402
- incognitoEnabled: boolean;
403
- }
404
- export interface LifeOpsBrowserSettings {
405
- enabled: boolean;
406
- trackingMode: LifeOpsBrowserTrackingMode;
407
- allowBrowserControl: boolean;
408
- requireConfirmationForAccountAffecting: boolean;
409
- incognitoEnabled: boolean;
410
- siteAccessMode: LifeOpsBrowserSiteAccessMode;
411
- grantedOrigins: string[];
412
- blockedOrigins: string[];
413
- maxRememberedTabs: number;
414
- pauseUntil: string | null;
415
- metadata: Record<string, unknown>;
416
- updatedAt: string | null;
417
- }
418
- export interface UpdateLifeOpsBrowserSettingsRequest {
419
- enabled?: boolean;
420
- trackingMode?: LifeOpsBrowserTrackingMode;
421
- allowBrowserControl?: boolean;
422
- requireConfirmationForAccountAffecting?: boolean;
423
- incognitoEnabled?: boolean;
424
- siteAccessMode?: LifeOpsBrowserSiteAccessMode;
425
- grantedOrigins?: string[];
426
- blockedOrigins?: string[];
427
- maxRememberedTabs?: number;
428
- pauseUntil?: string | null;
429
- metadata?: Record<string, unknown>;
430
- }
431
- export interface LifeOpsBrowserCompanionStatus {
432
- id: string;
433
- agentId: string;
434
- browser: LifeOpsBrowserKind;
435
- profileId: string;
436
- profileLabel: string;
437
- label: string;
438
- extensionVersion: string | null;
439
- connectionState: LifeOpsBrowserCompanionConnectionState;
440
- permissions: LifeOpsBrowserPermissionState;
441
- lastSeenAt: string | null;
442
- pairedAt: string | null;
443
- metadata: Record<string, unknown>;
444
- createdAt: string;
445
- updatedAt: string;
446
- }
447
- export interface LifeOpsBrowserTabSummary {
448
- id: string;
449
- agentId: string;
450
- companionId: string | null;
451
- browser: LifeOpsBrowserKind;
452
- profileId: string;
453
- windowId: string;
454
- tabId: string;
455
- url: string;
456
- title: string;
457
- activeInWindow: boolean;
458
- focusedWindow: boolean;
459
- focusedActive: boolean;
460
- incognito: boolean;
461
- faviconUrl: string | null;
462
- lastSeenAt: string;
463
- lastFocusedAt: string | null;
464
- metadata: Record<string, unknown>;
465
- createdAt: string;
466
- updatedAt: string;
467
- }
468
- export interface LifeOpsBrowserPageContext {
469
- id: string;
470
- agentId: string;
471
- browser: LifeOpsBrowserKind;
472
- profileId: string;
473
- windowId: string;
474
- tabId: string;
475
- url: string;
476
- title: string;
477
- selectionText: string | null;
478
- mainText: string | null;
479
- headings: string[];
480
- links: Array<{
481
- text: string;
482
- href: string;
483
- }>;
484
- forms: Array<{
485
- action: string | null;
486
- fields: string[];
487
- }>;
488
- capturedAt: string;
489
- metadata: Record<string, unknown>;
490
- }
491
- export interface UpsertLifeOpsBrowserCompanionRequest {
492
- browser: LifeOpsBrowserKind;
493
- profileId: string;
494
- profileLabel?: string | null;
495
- label: string;
496
- extensionVersion?: string | null;
497
- connectionState?: LifeOpsBrowserCompanionConnectionState;
498
- permissions?: Partial<LifeOpsBrowserPermissionState>;
499
- lastSeenAt?: string | null;
500
- metadata?: Record<string, unknown>;
501
- }
502
- export interface SyncLifeOpsBrowserStateRequest {
503
- companion: UpsertLifeOpsBrowserCompanionRequest;
504
- tabs: Array<{
505
- browser: LifeOpsBrowserKind;
506
- profileId: string;
507
- windowId: string;
508
- tabId: string;
509
- url: string;
510
- title: string;
511
- activeInWindow: boolean;
512
- focusedWindow: boolean;
513
- focusedActive: boolean;
514
- incognito?: boolean;
515
- faviconUrl?: string | null;
516
- lastSeenAt?: string;
517
- lastFocusedAt?: string | null;
518
- metadata?: Record<string, unknown>;
519
- }>;
520
- pageContexts?: Array<{
521
- browser: LifeOpsBrowserKind;
522
- profileId: string;
523
- windowId: string;
524
- tabId: string;
525
- url: string;
526
- title: string;
527
- selectionText?: string | null;
528
- mainText?: string | null;
529
- headings?: string[];
530
- links?: Array<{
531
- text: string;
532
- href: string;
533
- }>;
534
- forms?: Array<{
535
- action: string | null;
536
- fields: string[];
537
- }>;
538
- capturedAt?: string;
539
- metadata?: Record<string, unknown>;
540
- }>;
541
- }
542
- export interface CreateLifeOpsBrowserCompanionPairingRequest {
543
- browser: LifeOpsBrowserKind;
544
- profileId: string;
545
- profileLabel?: string | null;
546
- label?: string | null;
547
- extensionVersion?: string | null;
548
- metadata?: Record<string, unknown>;
549
- }
550
- export interface LifeOpsBrowserCompanionPairingResponse {
551
- companion: LifeOpsBrowserCompanionStatus;
552
- pairingToken: string;
553
- }
554
- export interface LifeOpsBrowserCompanionConfig {
555
- apiBaseUrl: string;
556
- companionId: string;
557
- pairingToken: string;
558
- browser: LifeOpsBrowserKind;
559
- profileId: string;
560
- profileLabel: string;
561
- label: string;
562
- }
563
- export interface CreateLifeOpsBrowserCompanionAutoPairRequest {
564
- browser: LifeOpsBrowserKind;
565
- profileId?: string | null;
566
- profileLabel?: string | null;
567
- label?: string | null;
568
- extensionVersion?: string | null;
569
- metadata?: Record<string, unknown>;
570
- }
571
- export interface LifeOpsBrowserCompanionAutoPairResponse {
572
- companion: LifeOpsBrowserCompanionStatus;
573
- config: LifeOpsBrowserCompanionConfig;
574
- }
575
- export interface UpdateLifeOpsBrowserSessionProgressRequest {
576
- currentActionIndex?: number;
577
- result?: Record<string, unknown>;
578
- metadata?: Record<string, unknown>;
579
- }
580
- export interface LifeOpsBrowserCompanionSyncResponse {
581
- companion: LifeOpsBrowserCompanionStatus;
582
- tabs: LifeOpsBrowserTabSummary[];
583
- currentPage: LifeOpsBrowserPageContext | null;
584
- settings: LifeOpsBrowserSettings;
585
- session: LifeOpsBrowserSession | null;
586
- }
587
- export declare const LIFEOPS_BROWSER_PACKAGE_PATH_TARGETS: readonly ["extension_root", "chrome_build", "chrome_package", "safari_web_extension", "safari_app", "safari_package"];
588
- export type LifeOpsBrowserPackagePathTarget = (typeof LIFEOPS_BROWSER_PACKAGE_PATH_TARGETS)[number];
589
- export interface LifeOpsBrowserCompanionPackageStatus {
590
- extensionPath: string | null;
591
- chromeBuildPath: string | null;
592
- chromePackagePath: string | null;
593
- safariWebExtensionPath: string | null;
594
- safariAppPath: string | null;
595
- safariPackagePath: string | null;
596
- releaseManifest: LifeOpsBrowserCompanionReleaseManifest | null;
597
- }
598
- export interface LifeOpsBrowserCompanionReleaseAsset {
599
- fileName: string;
600
- downloadUrl: string | null;
601
- }
602
- export interface LifeOpsBrowserCompanionReleaseTarget {
603
- installKind: "chrome_web_store" | "apple_app_store" | "github_release" | "local_download";
604
- installUrl: string | null;
605
- storeListingUrl: string | null;
606
- asset: LifeOpsBrowserCompanionReleaseAsset;
607
- }
608
- export interface LifeOpsBrowserCompanionReleaseManifest {
609
- schema: "lifeops_browser_release_v2";
610
- releaseTag: string;
611
- releaseVersion: string;
612
- repository: string | null;
613
- releasePageUrl: string | null;
614
- chromeVersion: string;
615
- chromeVersionName: string;
616
- safariMarketingVersion: string;
617
- safariBuildVersion: string;
618
- chrome: LifeOpsBrowserCompanionReleaseTarget;
619
- safari: LifeOpsBrowserCompanionReleaseTarget;
620
- generatedAt: string;
621
- }
622
- export interface OpenLifeOpsBrowserCompanionPackagePathRequest {
623
- target: LifeOpsBrowserPackagePathTarget;
624
- revealOnly?: boolean;
625
- }
626
- export interface OpenLifeOpsBrowserCompanionPackagePathResponse {
627
- target: LifeOpsBrowserPackagePathTarget;
628
- path: string;
629
- revealOnly: boolean;
630
- }
631
- export interface OpenLifeOpsBrowserCompanionManagerResponse {
632
- browser: LifeOpsBrowserKind;
633
- }
634
505
  export interface LifeOpsWorkflowActionBase {
635
506
  id?: string;
636
507
  resultKey?: string;
@@ -654,6 +525,13 @@ export type LifeOpsWorkflowAction = (LifeOpsWorkflowActionBase & {
654
525
  }) | (LifeOpsWorkflowActionBase & {
655
526
  kind: "get_gmail_triage";
656
527
  request?: GetLifeOpsGmailTriageRequest;
528
+ }) | (LifeOpsWorkflowActionBase & {
529
+ kind: "get_gmail_unresponded";
530
+ request?: GetLifeOpsGmailUnrespondedRequest;
531
+ }) | (LifeOpsWorkflowActionBase & {
532
+ kind: "dispatch_n8n_workflow";
533
+ workflowId: string;
534
+ payload?: Record<string, unknown>;
657
535
  }) | (LifeOpsWorkflowActionBase & {
658
536
  kind: "summarize";
659
537
  sourceKey?: string;
@@ -716,7 +594,7 @@ export interface LifeOpsChannelPolicy {
716
594
  createdAt: string;
717
595
  updatedAt: string;
718
596
  }
719
- export declare const LIFEOPS_ACTIVITY_SIGNAL_SOURCES: readonly ["app_lifecycle", "page_visibility", "desktop_power", "mobile_device", "mobile_health"];
597
+ export declare const LIFEOPS_ACTIVITY_SIGNAL_SOURCES: readonly ["app_lifecycle", "page_visibility", "desktop_power", "desktop_interaction", "connector_activity", "imessage_outbound", "mobile_device", "mobile_health"];
720
598
  export type LifeOpsActivitySignalSource = (typeof LIFEOPS_ACTIVITY_SIGNAL_SOURCES)[number];
721
599
  export declare const LIFEOPS_ACTIVITY_SIGNAL_STATES: readonly ["active", "idle", "background", "locked", "sleeping"];
722
600
  export type LifeOpsActivitySignalState = (typeof LIFEOPS_ACTIVITY_SIGNAL_STATES)[number];
@@ -762,6 +640,113 @@ export interface LifeOpsActivitySignal {
762
640
  metadata: Record<string, unknown>;
763
641
  createdAt: string;
764
642
  }
643
+ export type LifeOpsDevicePlatform = "macos_desktop" | "macos_electrobun" | "ios_capacitor" | "ipados_capacitor" | "browser_web";
644
+ export interface LifeOpsDevicePresencePayload {
645
+ family: "device_presence_event";
646
+ platform: LifeOpsDevicePlatform;
647
+ state: LifeOpsActivitySignalState;
648
+ deviceId: string;
649
+ isTransition: boolean;
650
+ sequence: number;
651
+ }
652
+ export type LifeOpsDesktopPowerEventKind = "system_wake" | "system_sleep" | "screen_wake" | "screen_sleep" | "session_lock" | "session_unlock" | "ac_plug" | "ac_unplug";
653
+ export interface LifeOpsDesktopPowerPayload {
654
+ family: "desktop_power_event";
655
+ platform: "macos_desktop" | "macos_electrobun";
656
+ kind: LifeOpsDesktopPowerEventKind;
657
+ batteryPercent: number | null;
658
+ }
659
+ export interface LifeOpsDesktopIdleSamplePayload {
660
+ family: "desktop_idle_sample";
661
+ platform: "macos_desktop" | "macos_electrobun";
662
+ idleSeconds: number;
663
+ source: "iokit_hid" | "cgevent" | "collector_synthesized";
664
+ isThresholdCrossing: boolean;
665
+ }
666
+ export interface LifeOpsBrowserFocusPayload {
667
+ family: "browser_focus_window";
668
+ platform: "browser_web" | "macos_electrobun";
669
+ startAt: string;
670
+ endAt: string;
671
+ domain: string;
672
+ tabId: string;
673
+ focusedSeconds: number;
674
+ }
675
+ export interface LifeOpsMobileHealthPayload {
676
+ family: "mobile_health_snapshot";
677
+ platform: "ios_capacitor" | "ipados_capacitor";
678
+ signal: LifeOpsHealthSignal;
679
+ sampleId: string | null;
680
+ }
681
+ export type LifeOpsMobileDeviceTelemetrySource = "capacitor_mobile_signals" | "macos_continuity_probe";
682
+ export interface LifeOpsMobileDevicePayload {
683
+ family: "mobile_device_snapshot";
684
+ platform: "ios_capacitor" | "ipados_capacitor" | "macos_desktop";
685
+ source: LifeOpsMobileDeviceTelemetrySource;
686
+ locked: boolean;
687
+ idleTimeSeconds: number | null;
688
+ onBattery: boolean | null;
689
+ batteryPercent: number | null;
690
+ pairedDeviceId: string | null;
691
+ }
692
+ export type LifeOpsTelemetryMessageChannel = "gmail" | "x_dm" | "discord" | "telegram" | "signal" | "imessage" | "whatsapp" | "sms" | "milady_chat";
693
+ export type LifeOpsMessageDirection = "inbound" | "outbound_by_owner";
694
+ export interface LifeOpsMessageActivityPayload {
695
+ family: "message_activity_event";
696
+ platform: LifeOpsDevicePlatform;
697
+ channel: LifeOpsTelemetryMessageChannel;
698
+ direction: LifeOpsMessageDirection;
699
+ externalMessageId: string;
700
+ senderHash: string;
701
+ conversationHash: string;
702
+ }
703
+ export type LifeOpsStatusPlatform = "slack" | "discord" | "telegram" | "x";
704
+ export type LifeOpsStatusTransition = "online" | "offline" | "away" | "do_not_disturb" | "custom_set" | "custom_cleared";
705
+ export interface LifeOpsStatusActivityPayload {
706
+ family: "status_activity_event";
707
+ platform: LifeOpsStatusPlatform;
708
+ transition: LifeOpsStatusTransition;
709
+ }
710
+ export interface LifeOpsChargingPayload {
711
+ family: "charging_event";
712
+ platform: LifeOpsDevicePlatform;
713
+ connected: boolean;
714
+ batteryPercent: number;
715
+ }
716
+ export interface LifeOpsScreenTimePerAppUsage {
717
+ appBundleId: string;
718
+ minutesUsed: number;
719
+ }
720
+ export interface LifeOpsScreenTimeSummaryPayload {
721
+ family: "screen_time_summary";
722
+ platform: "ios_capacitor" | "ipados_capacitor" | "macos_desktop";
723
+ intervalStartAt: string;
724
+ intervalEndAt: string;
725
+ totalMinutesUsed: number;
726
+ apps: LifeOpsScreenTimePerAppUsage[];
727
+ }
728
+ export type LifeOpsManualOverrideTelemetryKind = "going_to_bed" | "just_woke_up";
729
+ export interface LifeOpsManualOverridePayload {
730
+ family: "manual_override_event";
731
+ platform: LifeOpsDevicePlatform;
732
+ kind: LifeOpsManualOverrideTelemetryKind;
733
+ note: string | null;
734
+ }
735
+ export type LifeOpsTelemetryPayload = LifeOpsDevicePresencePayload | LifeOpsDesktopPowerPayload | LifeOpsDesktopIdleSamplePayload | LifeOpsBrowserFocusPayload | LifeOpsMobileHealthPayload | LifeOpsMobileDevicePayload | LifeOpsMessageActivityPayload | LifeOpsStatusActivityPayload | LifeOpsChargingPayload | LifeOpsScreenTimeSummaryPayload | LifeOpsManualOverridePayload;
736
+ export type LifeOpsTelemetryFamily = LifeOpsTelemetryPayload["family"];
737
+ export declare const LIFEOPS_TELEMETRY_FAMILIES: readonly LifeOpsTelemetryFamily[];
738
+ export interface LifeOpsTelemetryEnvelope {
739
+ id: string;
740
+ agentId: string;
741
+ family: LifeOpsTelemetryFamily;
742
+ occurredAt: string;
743
+ ingestedAt: string;
744
+ dedupeKey: string;
745
+ sourceReliability: number;
746
+ }
747
+ export type LifeOpsTelemetryEvent = LifeOpsTelemetryEnvelope & {
748
+ payload: LifeOpsTelemetryPayload;
749
+ };
765
750
  export interface LifeOpsReminderPreferenceSetting {
766
751
  intensity: LifeOpsReminderIntensity;
767
752
  source: LifeOpsReminderPreferenceSource;
@@ -813,8 +798,108 @@ export interface LifeOpsOverviewSummary {
813
798
  activeReminderCount: number;
814
799
  activeGoalCount: number;
815
800
  }
816
- export type LifeOpsSchedulePhase = "sleeping" | "waking" | "morning" | "afternoon" | "evening" | "winding_down" | "offline";
801
+ export declare const LIFEOPS_CIRCADIAN_STATES: readonly ["awake", "winding_down", "sleeping", "waking", "napping", "unclear"];
802
+ export type LifeOpsCircadianState = (typeof LIFEOPS_CIRCADIAN_STATES)[number];
803
+ export declare const LIFEOPS_UNCLEAR_REASONS: readonly ["no_signals", "contradictory_signals", "insufficient_history", "permission_blocked", "signal_outage", "boot_cold_start", "stale_state"];
804
+ export type LifeOpsUnclearReason = (typeof LIFEOPS_UNCLEAR_REASONS)[number];
817
805
  export type LifeOpsScheduleSleepStatus = "sleeping_now" | "slept" | "likely_missed" | "unknown";
806
+ export type LifeOpsSleepCycleEvidenceSource = "health" | "activity_gap";
807
+ export type LifeOpsSleepCycleType = "nap" | "overnight" | "unknown";
808
+ export type LifeOpsRegularityClass = "very_regular" | "regular" | "irregular" | "very_irregular" | "insufficient_data";
809
+ export interface LifeOpsScheduleRegularity {
810
+ sri: number;
811
+ bedtimeStddevMin: number;
812
+ wakeStddevMin: number;
813
+ midSleepStddevMin: number;
814
+ regularityClass: LifeOpsRegularityClass;
815
+ sampleCount: number;
816
+ windowDays: number;
817
+ }
818
+ /**
819
+ * Personal baseline derived from persisted sleep episodes over `windowDays`.
820
+ * Medians are computed via circular mean (sin/cos projection) so bedtimes
821
+ * crossing midnight produce correct answers. Returned as `null` on
822
+ * `LifeOpsScheduleInsight` when `sampleCount < 5` — the scalar typical hours
823
+ * that previously existed are deleted from the contract.
824
+ */
825
+ export interface LifeOpsPersonalBaseline {
826
+ /** Local wake hour in [0, 24). Circular mean over episode end instants. */
827
+ medianWakeLocalHour: number;
828
+ /** Local bedtime hour in [12, 36) (normalized so evening hours are next-day). Circular mean. */
829
+ medianBedtimeLocalHour: number;
830
+ /** Median sleep episode duration in minutes. */
831
+ medianSleepDurationMin: number;
832
+ /** Circular stddev of bedtime in minutes. */
833
+ bedtimeStddevMin: number;
834
+ /** Circular stddev of wake time in minutes. */
835
+ wakeStddevMin: number;
836
+ /** Number of persisted episodes that fed the computation. */
837
+ sampleCount: number;
838
+ /** Size of the look-back window in days (default 28). */
839
+ windowDays: number;
840
+ }
841
+ export type LifeOpsAwakeProbabilitySource = LifeOpsActivitySignalSource | "prior" | "health" | "activity_gap";
842
+ export interface LifeOpsAwakeProbabilityContributor {
843
+ source: LifeOpsAwakeProbabilitySource;
844
+ logLikelihoodRatio: number;
845
+ }
846
+ export interface LifeOpsAwakeProbability {
847
+ pAwake: number;
848
+ pAsleep: number;
849
+ pUnknown: number;
850
+ contributingSources: LifeOpsAwakeProbabilityContributor[];
851
+ computedAt: string;
852
+ }
853
+ export interface LifeOpsSleepCycleEvidence {
854
+ startAt: string;
855
+ endAt: string | null;
856
+ source: LifeOpsSleepCycleEvidenceSource;
857
+ confidence: number;
858
+ }
859
+ export interface LifeOpsSleepCycle {
860
+ cycleType: LifeOpsSleepCycleType;
861
+ sleepStatus: LifeOpsScheduleSleepStatus;
862
+ isProbablySleeping: boolean;
863
+ sleepConfidence: number;
864
+ currentSleepStartedAt: string | null;
865
+ lastSleepStartedAt: string | null;
866
+ lastSleepEndedAt: string | null;
867
+ lastSleepDurationMinutes: number | null;
868
+ evidence: LifeOpsSleepCycleEvidence[];
869
+ }
870
+ export type LifeOpsDayBoundaryAnchor = "start_of_day" | "end_of_day" | "before_sleep";
871
+ export interface LifeOpsDayBoundary {
872
+ effectiveDayKey: string;
873
+ localDate: string;
874
+ timezone: string;
875
+ anchor: LifeOpsDayBoundaryAnchor;
876
+ startOfDayAt: string;
877
+ endOfDayAt: string;
878
+ beforeSleepAt: string | null;
879
+ confidence: number;
880
+ }
881
+ export type LifeOpsRelativeTimeAnchorSource = "sleep_cycle" | "activity" | "typical_sleep" | "day_boundary";
882
+ export interface LifeOpsRelativeTime {
883
+ computedAt: string;
884
+ localNowAt: string;
885
+ circadianState: LifeOpsCircadianState;
886
+ stateConfidence: number;
887
+ uncertaintyReason: LifeOpsUnclearReason | null;
888
+ awakeProbability: LifeOpsAwakeProbability;
889
+ wakeAnchorAt: string | null;
890
+ wakeAnchorSource: LifeOpsRelativeTimeAnchorSource | null;
891
+ minutesSinceWake: number | null;
892
+ minutesAwake: number | null;
893
+ bedtimeTargetAt: string | null;
894
+ bedtimeTargetSource: LifeOpsRelativeTimeAnchorSource | null;
895
+ minutesUntilBedtimeTarget: number | null;
896
+ minutesSinceBedtimeTarget: number | null;
897
+ dayBoundaryStartAt: string;
898
+ dayBoundaryEndAt: string;
899
+ minutesSinceDayBoundaryStart: number;
900
+ minutesUntilDayBoundaryEnd: number;
901
+ confidence: number;
902
+ }
818
903
  export type LifeOpsScheduleMealLabel = "breakfast" | "lunch" | "dinner";
819
904
  export type LifeOpsScheduleMealSource = "activity_gap" | "expected_window" | "health";
820
905
  export interface LifeOpsScheduleMealInsight {
@@ -823,21 +908,41 @@ export interface LifeOpsScheduleMealInsight {
823
908
  confidence: number;
824
909
  source: LifeOpsScheduleMealSource;
825
910
  }
911
+ /**
912
+ * A single rule firing from `scoreCircadianRules`. Persisted on the schedule
913
+ * insight so the inspection UI can explain *why* the state machine landed
914
+ * where it did without re-running inference.
915
+ */
916
+ export interface LifeOpsCircadianRuleFiring {
917
+ name: string;
918
+ contributes: LifeOpsCircadianState;
919
+ weight: number;
920
+ observedAt: string;
921
+ reason: string;
922
+ }
826
923
  export interface LifeOpsScheduleInsight {
827
924
  effectiveDayKey: string;
828
925
  localDate: string;
829
926
  timezone: string;
830
927
  inferredAt: string;
831
- phase: LifeOpsSchedulePhase;
928
+ circadianState: LifeOpsCircadianState;
929
+ stateConfidence: number;
930
+ uncertaintyReason: LifeOpsUnclearReason | null;
931
+ relativeTime: LifeOpsRelativeTime;
932
+ awakeProbability: LifeOpsAwakeProbability;
933
+ regularity: LifeOpsScheduleRegularity;
934
+ baseline: LifeOpsPersonalBaseline | null;
935
+ /**
936
+ * Named-rules evidence from the circadian scorer. Ordered by descending
937
+ * weight. Empty when `circadianState === "unclear"` and no rules fired.
938
+ */
939
+ circadianRuleFirings: LifeOpsCircadianRuleFiring[];
832
940
  sleepStatus: LifeOpsScheduleSleepStatus;
833
- isProbablySleeping: boolean;
834
941
  sleepConfidence: number;
835
942
  currentSleepStartedAt: string | null;
836
943
  lastSleepStartedAt: string | null;
837
944
  lastSleepEndedAt: string | null;
838
945
  lastSleepDurationMinutes: number | null;
839
- typicalWakeHour: number | null;
840
- typicalSleepHour: number | null;
841
946
  wakeAt: string | null;
842
947
  firstActiveAt: string | null;
843
948
  lastActiveAt: string | null;
@@ -848,6 +953,38 @@ export interface LifeOpsScheduleInsight {
848
953
  nextMealWindowEndAt: string | null;
849
954
  nextMealConfidence: number;
850
955
  }
956
+ export type LifeOpsCapabilityDomain = "core" | "schedule" | "reminders" | "activity" | "connectors" | "profile";
957
+ export type LifeOpsCapabilityState = "working" | "degraded" | "blocked" | "not_configured";
958
+ export interface LifeOpsCapabilityEvidence {
959
+ label: string;
960
+ state: LifeOpsCapabilityState;
961
+ detail: string | null;
962
+ observedAt: string | null;
963
+ }
964
+ export interface LifeOpsCapabilityStatus {
965
+ id: string;
966
+ domain: LifeOpsCapabilityDomain;
967
+ label: string;
968
+ state: LifeOpsCapabilityState;
969
+ summary: string;
970
+ confidence: number;
971
+ lastCheckedAt: string;
972
+ evidence: LifeOpsCapabilityEvidence[];
973
+ }
974
+ export interface LifeOpsCapabilitiesSummary {
975
+ totalCount: number;
976
+ workingCount: number;
977
+ degradedCount: number;
978
+ blockedCount: number;
979
+ notConfiguredCount: number;
980
+ }
981
+ export interface LifeOpsCapabilitiesStatus {
982
+ generatedAt: string;
983
+ appEnabled: boolean;
984
+ relativeTime: LifeOpsRelativeTime | null;
985
+ capabilities: LifeOpsCapabilityStatus[];
986
+ summary: LifeOpsCapabilitiesSummary;
987
+ }
851
988
  export interface LifeOpsOverviewSection {
852
989
  occurrences: LifeOpsOccurrenceView[];
853
990
  goals: LifeOpsGoalDefinition[];
@@ -984,6 +1121,7 @@ export interface GetLifeOpsGmailSearchRequest {
984
1121
  maxResults?: number;
985
1122
  query: string;
986
1123
  replyNeededOnly?: boolean;
1124
+ includeSpamTrash?: boolean;
987
1125
  grantId?: string;
988
1126
  }
989
1127
  export interface LifeOpsGmailSearchSummary {
@@ -999,6 +1137,176 @@ export interface LifeOpsGmailSearchFeed {
999
1137
  syncedAt: string | null;
1000
1138
  summary: LifeOpsGmailSearchSummary;
1001
1139
  }
1140
+ export declare const LIFEOPS_GMAIL_RECOMMENDATION_KINDS: readonly ["reply", "archive", "mark_read", "review_spam"];
1141
+ export type LifeOpsGmailRecommendationKind = (typeof LIFEOPS_GMAIL_RECOMMENDATION_KINDS)[number];
1142
+ export declare const LIFEOPS_GMAIL_BULK_OPERATIONS: readonly ["archive", "trash", "delete", "report_spam", "mark_read", "mark_unread", "apply_label", "remove_label"];
1143
+ export type LifeOpsGmailBulkOperation = (typeof LIFEOPS_GMAIL_BULK_OPERATIONS)[number];
1144
+ export interface ManageLifeOpsGmailMessagesRequest {
1145
+ side?: LifeOpsConnectorSide;
1146
+ mode?: LifeOpsConnectorMode;
1147
+ grantId?: string;
1148
+ operation: LifeOpsGmailBulkOperation;
1149
+ messageIds?: string[];
1150
+ query?: string;
1151
+ maxResults?: number;
1152
+ labelIds?: string[];
1153
+ confirmDestructive?: boolean;
1154
+ }
1155
+ export interface LifeOpsGmailManageResult {
1156
+ ok: true;
1157
+ operation: LifeOpsGmailBulkOperation;
1158
+ messageIds: string[];
1159
+ affectedCount: number;
1160
+ labelIds: string[];
1161
+ destructive: boolean;
1162
+ grantId?: string;
1163
+ accountEmail?: string;
1164
+ }
1165
+ export interface LifeOpsGmailRecommendationMessage {
1166
+ messageId: string;
1167
+ subject: string;
1168
+ from: string;
1169
+ fromEmail: string | null;
1170
+ receivedAt: string;
1171
+ snippet: string;
1172
+ labels: string[];
1173
+ }
1174
+ export interface LifeOpsGmailRecommendation {
1175
+ id: string;
1176
+ kind: LifeOpsGmailRecommendationKind;
1177
+ title: string;
1178
+ rationale: string;
1179
+ operation: LifeOpsGmailBulkOperation | null;
1180
+ messageIds: string[];
1181
+ query: string | null;
1182
+ labelIds: string[];
1183
+ affectedCount: number;
1184
+ destructive: boolean;
1185
+ requiresConfirmation: boolean;
1186
+ confidence: number;
1187
+ sampleMessages: LifeOpsGmailRecommendationMessage[];
1188
+ }
1189
+ export interface LifeOpsGmailRecommendationsSummary {
1190
+ totalCount: number;
1191
+ replyCount: number;
1192
+ archiveCount: number;
1193
+ markReadCount: number;
1194
+ spamReviewCount: number;
1195
+ destructiveCount: number;
1196
+ }
1197
+ export interface LifeOpsGmailRecommendationsFeed {
1198
+ recommendations: LifeOpsGmailRecommendation[];
1199
+ source: "cache" | "synced";
1200
+ syncedAt: string | null;
1201
+ summary: LifeOpsGmailRecommendationsSummary;
1202
+ }
1203
+ export interface GetLifeOpsGmailRecommendationsRequest {
1204
+ side?: LifeOpsConnectorSide;
1205
+ mode?: LifeOpsConnectorMode;
1206
+ grantId?: string;
1207
+ forceSync?: boolean;
1208
+ maxResults?: number;
1209
+ query?: string;
1210
+ replyNeededOnly?: boolean;
1211
+ includeSpamTrash?: boolean;
1212
+ }
1213
+ export declare const LIFEOPS_GMAIL_SPAM_REVIEW_STATUSES: readonly ["pending", "confirmed_spam", "not_spam", "dismissed"];
1214
+ export type LifeOpsGmailSpamReviewStatus = (typeof LIFEOPS_GMAIL_SPAM_REVIEW_STATUSES)[number];
1215
+ export interface LifeOpsGmailSpamReviewItem {
1216
+ id: string;
1217
+ agentId: string;
1218
+ provider: "google";
1219
+ side: LifeOpsConnectorSide;
1220
+ grantId: string;
1221
+ accountEmail: string | null;
1222
+ messageId: string;
1223
+ externalMessageId: string;
1224
+ threadId: string;
1225
+ subject: string;
1226
+ from: string;
1227
+ fromEmail: string | null;
1228
+ receivedAt: string;
1229
+ snippet: string;
1230
+ labels: string[];
1231
+ rationale: string;
1232
+ confidence: number;
1233
+ status: LifeOpsGmailSpamReviewStatus;
1234
+ createdAt: string;
1235
+ updatedAt: string;
1236
+ reviewedAt: string | null;
1237
+ }
1238
+ export interface LifeOpsGmailSpamReviewSummary {
1239
+ totalCount: number;
1240
+ pendingCount: number;
1241
+ confirmedSpamCount: number;
1242
+ notSpamCount: number;
1243
+ dismissedCount: number;
1244
+ }
1245
+ export interface LifeOpsGmailSpamReviewFeed {
1246
+ items: LifeOpsGmailSpamReviewItem[];
1247
+ summary: LifeOpsGmailSpamReviewSummary;
1248
+ }
1249
+ export interface GetLifeOpsGmailSpamReviewRequest {
1250
+ side?: LifeOpsConnectorSide;
1251
+ mode?: LifeOpsConnectorMode;
1252
+ grantId?: string;
1253
+ status?: LifeOpsGmailSpamReviewStatus;
1254
+ maxResults?: number;
1255
+ }
1256
+ export interface UpdateLifeOpsGmailSpamReviewItemRequest {
1257
+ status: LifeOpsGmailSpamReviewStatus;
1258
+ }
1259
+ export interface LifeOpsGmailUnrespondedThread {
1260
+ threadId: string;
1261
+ messageId: string;
1262
+ subject: string;
1263
+ to: string[];
1264
+ cc: string[];
1265
+ lastOutboundAt: string;
1266
+ lastInboundAt: string | null;
1267
+ daysWaiting: number;
1268
+ snippet: string;
1269
+ labels: string[];
1270
+ htmlLink: string | null;
1271
+ grantId?: string;
1272
+ accountEmail?: string;
1273
+ }
1274
+ export interface LifeOpsGmailUnrespondedSummary {
1275
+ totalCount: number;
1276
+ oldestDaysWaiting: number | null;
1277
+ }
1278
+ export interface LifeOpsGmailUnrespondedFeed {
1279
+ threads: LifeOpsGmailUnrespondedThread[];
1280
+ source: "synced";
1281
+ syncedAt: string;
1282
+ summary: LifeOpsGmailUnrespondedSummary;
1283
+ }
1284
+ export interface GetLifeOpsGmailUnrespondedRequest {
1285
+ side?: LifeOpsConnectorSide;
1286
+ mode?: LifeOpsConnectorMode;
1287
+ grantId?: string;
1288
+ olderThanDays?: number;
1289
+ maxResults?: number;
1290
+ }
1291
+ export interface IngestLifeOpsGmailEventRequest {
1292
+ side?: LifeOpsConnectorSide;
1293
+ mode?: LifeOpsConnectorMode;
1294
+ grantId?: string;
1295
+ messageId: string;
1296
+ eventKind?: "gmail.message.received" | "gmail.thread.needs_response";
1297
+ occurredAt?: string;
1298
+ maxWorkflowRuns?: number;
1299
+ }
1300
+ export interface LifeOpsGmailEventIngestResult {
1301
+ ok: true;
1302
+ event: {
1303
+ id: string;
1304
+ kind: "gmail.message.received" | "gmail.thread.needs_response";
1305
+ occurredAt: string;
1306
+ payload: Record<string, unknown>;
1307
+ };
1308
+ workflowRunIds: string[];
1309
+ }
1002
1310
  export declare const LIFEOPS_GMAIL_DRAFT_TONES: readonly ["brief", "neutral", "warm"];
1003
1311
  export type LifeOpsGmailDraftTone = (typeof LIFEOPS_GMAIL_DRAFT_TONES)[number];
1004
1312
  export interface CreateLifeOpsGmailReplyDraftRequest {
@@ -1128,6 +1436,59 @@ export interface LifeOpsNextCalendarEventContext {
1128
1436
  linkedMailError: string | null;
1129
1437
  linkedMail: Array<Pick<LifeOpsGmailMessageSummary, "id" | "subject" | "from" | "receivedAt" | "snippet" | "htmlLink">>;
1130
1438
  }
1439
+ export interface LifeOpsCalendarEventReminderOverride {
1440
+ minutesBefore: number;
1441
+ }
1442
+ export interface LifeOpsCalendarEventUpdate {
1443
+ title?: string;
1444
+ startAt?: string;
1445
+ endAt?: string;
1446
+ notes?: string;
1447
+ reminders?: LifeOpsCalendarEventReminderOverride[];
1448
+ }
1449
+ export interface LifeOpsCalendarEventMutationResult {
1450
+ event: LifeOpsCalendarEvent;
1451
+ }
1452
+ export declare const LIFEOPS_INBOX_CHANNELS: readonly ["gmail", "x_dm", "discord", "telegram", "signal", "imessage", "whatsapp", "sms"];
1453
+ export type LifeOpsInboxChannel = (typeof LIFEOPS_INBOX_CHANNELS)[number];
1454
+ export interface LifeOpsInboxMessageSender {
1455
+ id: string;
1456
+ displayName: string;
1457
+ avatarUrl: string | null;
1458
+ }
1459
+ export interface LifeOpsInboxMessageSourceRef {
1460
+ channel: LifeOpsInboxChannel;
1461
+ externalId: string;
1462
+ }
1463
+ export interface LifeOpsInboxMessage {
1464
+ /** Channel-prefixed, globally unique identifier. */
1465
+ id: string;
1466
+ channel: LifeOpsInboxChannel;
1467
+ sender: LifeOpsInboxMessageSender;
1468
+ /** Gmail-style subject; `null` for chat channels. */
1469
+ subject: string | null;
1470
+ snippet: string;
1471
+ /** ISO-8601 timestamp. */
1472
+ receivedAt: string;
1473
+ unread: boolean;
1474
+ deepLink: string | null;
1475
+ sourceRef: LifeOpsInboxMessageSourceRef;
1476
+ }
1477
+ export interface LifeOpsInboxChannelCount {
1478
+ total: number;
1479
+ unread: number;
1480
+ }
1481
+ export interface LifeOpsInbox {
1482
+ messages: LifeOpsInboxMessage[];
1483
+ channelCounts: Record<LifeOpsInboxChannel, LifeOpsInboxChannelCount>;
1484
+ fetchedAt: string;
1485
+ }
1486
+ export interface GetLifeOpsInboxRequest {
1487
+ /** Cap on the total number of messages returned. Defaults to 100. */
1488
+ limit?: number;
1489
+ /** If omitted, all connected channels are included. */
1490
+ channels?: LifeOpsInboxChannel[];
1491
+ }
1131
1492
  export declare const LIFEOPS_GOOGLE_CONNECTOR_REASONS: readonly ["connected", "disconnected", "config_missing", "token_missing", "needs_reauth"];
1132
1493
  export type LifeOpsGoogleConnectorReason = (typeof LIFEOPS_GOOGLE_CONNECTOR_REASONS)[number];
1133
1494
  export declare const LIFEOPS_CONNECTOR_DEGRADATION_AXES: readonly ["missing-scope", "rate-limited", "disconnected", "auth-expired", "session-revoked", "delivery-degraded", "helper-disconnected", "retry-idempotent", "hold-expired", "transport-offline", "blocked-resume"];
@@ -1161,17 +1522,30 @@ export interface LifeOpsGoogleConnectorStatus {
1161
1522
  }
1162
1523
  export interface LifeOpsXConnectorStatus {
1163
1524
  provider: "x";
1525
+ side?: LifeOpsConnectorSide;
1164
1526
  mode: LifeOpsConnectorMode;
1527
+ defaultMode?: LifeOpsConnectorMode;
1528
+ availableModes?: LifeOpsConnectorMode[];
1529
+ executionTarget?: LifeOpsConnectorExecutionTarget;
1530
+ sourceOfTruth?: LifeOpsConnectorSourceOfTruth;
1531
+ configured?: boolean;
1165
1532
  connected: boolean;
1533
+ reason?: "connected" | "disconnected" | "config_missing" | "needs_reauth";
1534
+ preferredByAgent?: boolean;
1535
+ cloudConnectionId?: string | null;
1166
1536
  grantedCapabilities: LifeOpsXCapability[];
1167
1537
  grantedScopes: string[];
1168
1538
  identity: Record<string, unknown> | null;
1169
1539
  hasCredentials: boolean;
1540
+ feedRead: boolean;
1541
+ feedWrite: boolean;
1542
+ dmRead: boolean;
1543
+ dmWrite: boolean;
1170
1544
  /**
1171
- * DM inbound read is supported when `x.read` capability is granted.
1545
+ * DM inbound read is supported when `x.dm.read` capability is granted.
1172
1546
  * Use `syncXDms()` to pull and persist, then `getXDms()` or
1173
1547
  * `readXInboundDms()` to retrieve.
1174
- */
1548
+ */
1175
1549
  dmInbound: boolean;
1176
1550
  grant: LifeOpsConnectorGrant | null;
1177
1551
  degradations?: LifeOpsConnectorDegradation[];
@@ -1414,13 +1788,32 @@ export interface DisconnectLifeOpsGoogleConnectorRequest {
1414
1788
  mode?: LifeOpsConnectorMode;
1415
1789
  }
1416
1790
  export interface UpsertLifeOpsXConnectorRequest {
1791
+ side?: LifeOpsConnectorSide;
1417
1792
  mode?: LifeOpsConnectorMode;
1418
1793
  capabilities: LifeOpsXCapability[];
1419
1794
  grantedScopes?: string[];
1420
1795
  identity?: Record<string, unknown>;
1421
1796
  metadata?: Record<string, unknown>;
1422
1797
  }
1798
+ export interface StartLifeOpsXConnectorRequest {
1799
+ side?: LifeOpsConnectorSide;
1800
+ mode?: LifeOpsConnectorMode;
1801
+ redirectUrl?: string;
1802
+ }
1803
+ export interface StartLifeOpsXConnectorResponse {
1804
+ provider: "x";
1805
+ side: LifeOpsConnectorSide;
1806
+ mode: LifeOpsConnectorMode;
1807
+ requestedCapabilities: LifeOpsXCapability[];
1808
+ redirectUri: string;
1809
+ authUrl: string;
1810
+ }
1811
+ export interface DisconnectLifeOpsXConnectorRequest {
1812
+ side?: LifeOpsConnectorSide;
1813
+ mode?: LifeOpsConnectorMode;
1814
+ }
1423
1815
  export interface CreateLifeOpsXPostRequest {
1816
+ side?: LifeOpsConnectorSide;
1424
1817
  mode?: LifeOpsConnectorMode;
1425
1818
  text: string;
1426
1819
  confirmPost?: boolean;
@@ -1430,7 +1823,7 @@ export interface LifeOpsXPostResponse {
1430
1823
  status: number | null;
1431
1824
  postId?: string;
1432
1825
  error?: string;
1433
- category: "success" | "auth" | "rate_limit" | "network" | "unknown";
1826
+ category: "success" | "auth" | "rate_limit" | "network" | "invalid" | "unknown";
1434
1827
  }
1435
1828
  export interface CreateLifeOpsDefinitionRequest {
1436
1829
  ownership?: LifeOpsOwnershipInput;
@@ -1539,6 +1932,47 @@ export interface LifeOpsGoalReview {
1539
1932
  semanticReviewedAt?: string | null;
1540
1933
  };
1541
1934
  }
1935
+ export interface LifeOpsGoalExperienceLoopSuggestion {
1936
+ sourceGoalId: string;
1937
+ definitionId: string | null;
1938
+ title: string;
1939
+ detail: string;
1940
+ }
1941
+ export interface LifeOpsGoalExperienceLoopMatch {
1942
+ goalId: string;
1943
+ title: string;
1944
+ description: string;
1945
+ score: number;
1946
+ status: LifeOpsGoalStatus;
1947
+ reviewState: LifeOpsGoalReviewState;
1948
+ linkedDefinitionCount: number;
1949
+ completedLast7Days: number;
1950
+ lastActivityAt: string | null;
1951
+ explanation: string;
1952
+ carryForwardSuggestions: LifeOpsGoalExperienceLoopSuggestion[];
1953
+ }
1954
+ export interface LifeOpsGoalExperienceLoop {
1955
+ referenceGoalId: string | null;
1956
+ referenceTitle: string;
1957
+ similarGoals: LifeOpsGoalExperienceLoopMatch[];
1958
+ suggestedCarryForward: LifeOpsGoalExperienceLoopSuggestion[];
1959
+ summary: string | null;
1960
+ }
1961
+ export interface LifeOpsWeeklyGoalReview {
1962
+ generatedAt: string;
1963
+ reviewWindow: "this_week";
1964
+ summary: {
1965
+ totalGoals: number;
1966
+ onTrackCount: number;
1967
+ atRiskCount: number;
1968
+ needsAttentionCount: number;
1969
+ idleCount: number;
1970
+ };
1971
+ onTrack: LifeOpsGoalReview[];
1972
+ atRisk: LifeOpsGoalReview[];
1973
+ needsAttention: LifeOpsGoalReview[];
1974
+ idle: LifeOpsGoalReview[];
1975
+ }
1542
1976
  export interface LifeOpsDefinitionPerformanceWindow {
1543
1977
  scheduledCount: number;
1544
1978
  completedCount: number;
@@ -1622,6 +2056,26 @@ export interface CaptureLifeOpsActivitySignalRequest {
1622
2056
  health?: LifeOpsHealthSignal | null;
1623
2057
  metadata?: Record<string, unknown>;
1624
2058
  }
2059
+ /**
2060
+ * User-attested circadian override. Emitted with maximum reliability weight;
2061
+ * force-transitions the state machine. See `sleep-wake-spec.md` §2 (manual
2062
+ * override row in the transition table).
2063
+ */
2064
+ export declare const LIFEOPS_MANUAL_OVERRIDE_KINDS: readonly ["going_to_bed", "just_woke_up"];
2065
+ export type LifeOpsManualOverrideKind = (typeof LIFEOPS_MANUAL_OVERRIDE_KINDS)[number];
2066
+ export interface CaptureLifeOpsManualOverrideRequest {
2067
+ kind: LifeOpsManualOverrideKind;
2068
+ occurredAt?: string;
2069
+ /** Optional user note capped at 500 chars. */
2070
+ note?: string;
2071
+ }
2072
+ export interface LifeOpsManualOverrideResult {
2073
+ accepted: true;
2074
+ kind: LifeOpsManualOverrideKind;
2075
+ occurredAt: string;
2076
+ circadianState: LifeOpsCircadianState;
2077
+ stateConfidence: number;
2078
+ }
1625
2079
  export interface ProcessLifeOpsRemindersRequest {
1626
2080
  now?: string;
1627
2081
  limit?: number;
@@ -1719,6 +2173,11 @@ export interface CreateLifeOpsBrowserSessionRequest {
1719
2173
  export interface ConfirmLifeOpsBrowserSessionRequest {
1720
2174
  confirmed: boolean;
1721
2175
  }
2176
+ export interface UpdateLifeOpsBrowserSessionProgressRequest {
2177
+ currentActionIndex?: number;
2178
+ result?: Record<string, unknown>;
2179
+ metadata?: Record<string, unknown>;
2180
+ }
1722
2181
  export interface CompleteLifeOpsBrowserSessionRequest {
1723
2182
  status?: Extract<LifeOpsBrowserSessionStatus, "done" | "failed">;
1724
2183
  result?: Record<string, unknown>;