1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
//! Account-bound integrations for Common Agent Runtime: Calendar, Contacts,
//! Mail.
//!
//! The logical capabilities are the same on every OS; the backends are
//! not. v1 defines the release contract — stable return shapes that carry
//! explicit `available` + `backend` fields so downstream apps can branch
//! cleanly while backends light up incrementally.
//!
//! # Backends (target)
//!
//! | OS | Calendar | Contacts | Mail |
//! |---------|---------------------------|---------------------------|------------------------------|
//! | macOS | EventKit (EKEventStore) | Contacts.framework | IMAP/SMTP + AppleScript hint |
//! | Windows | MS Graph + Outlook MAPI | Windows.Contacts + Graph | MS Graph + MAPI |
//! | Linux | Evolution DS + CalDAV | Evolution DS + CardDAV | Evolution DS + IMAP/SMTP |
//!
//! v1 wires the API only. Backends return Unavailable-with-reason so the
//! release surface is stable before any one adapter is complete.
//!
//! # Dependencies (and honest gaps)
//!
//! Full operation needs:
//! - **car-secrets** — where credentials and tokens live
//! - **car-accounts** — to know which account the call should be bound to
//! - **car-permissions** — to preflight OS consent before the side effect
//!
//! These are wired as runtime deps but not yet composed inside any
//! backend implementation.
use ;
use Error;
/// Availability envelope — returned from every list-ish method so callers
/// can branch on `available` instead of assuming a populated list.
///
/// **Flatten caution.** This struct is `#[serde(flatten)]`ed into every
/// listing payload (see `CalendarListing`, `ContactListing`, etc.). Do not
/// add fields with names that collide with payload fields. `#[non_exhaustive]`
/// to keep future additions additive.