@pingroom/sdk 0.7.1 → 0.9.0

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.
Files changed (191) hide show
  1. package/README.md +288 -44
  2. package/dist/client.d.ts +27 -312
  3. package/dist/client.d.ts.map +1 -1
  4. package/dist/client.js +33 -1154
  5. package/dist/client.js.map +1 -1
  6. package/dist/errors.d.ts +40 -6
  7. package/dist/errors.d.ts.map +1 -1
  8. package/dist/errors.js +56 -4
  9. package/dist/errors.js.map +1 -1
  10. package/dist/http.d.ts +12 -1
  11. package/dist/http.d.ts.map +1 -1
  12. package/dist/http.js +47 -18
  13. package/dist/http.js.map +1 -1
  14. package/dist/index.d.ts +3 -5
  15. package/dist/index.d.ts.map +1 -1
  16. package/dist/index.js +1 -2
  17. package/dist/index.js.map +1 -1
  18. package/dist/internal/async.d.ts +2 -0
  19. package/dist/internal/async.d.ts.map +1 -1
  20. package/dist/internal/async.js +6 -0
  21. package/dist/internal/async.js.map +1 -1
  22. package/dist/internal/guards.d.ts +16 -0
  23. package/dist/internal/guards.d.ts.map +1 -1
  24. package/dist/internal/guards.js +22 -1
  25. package/dist/internal/guards.js.map +1 -1
  26. package/dist/internal/request.d.ts +41 -0
  27. package/dist/internal/request.d.ts.map +1 -0
  28. package/dist/internal/request.js +78 -0
  29. package/dist/internal/request.js.map +1 -0
  30. package/dist/internal/retry.d.ts +65 -0
  31. package/dist/internal/retry.d.ts.map +1 -0
  32. package/dist/internal/retry.js +126 -0
  33. package/dist/internal/retry.js.map +1 -0
  34. package/dist/internal/url.d.ts +9 -0
  35. package/dist/internal/url.d.ts.map +1 -1
  36. package/dist/internal/url.js +25 -0
  37. package/dist/internal/url.js.map +1 -1
  38. package/dist/internal/validate.d.ts +13 -0
  39. package/dist/internal/validate.d.ts.map +1 -0
  40. package/dist/internal/validate.js +36 -0
  41. package/dist/internal/validate.js.map +1 -0
  42. package/dist/linkPing.d.ts.map +1 -1
  43. package/dist/linkPing.js +6 -2
  44. package/dist/linkPing.js.map +1 -1
  45. package/dist/liveStatus.d.ts +106 -11
  46. package/dist/liveStatus.d.ts.map +1 -1
  47. package/dist/liveStatus.js +20 -3
  48. package/dist/liveStatus.js.map +1 -1
  49. package/dist/mcp.d.ts.map +1 -1
  50. package/dist/mcp.js +40 -10
  51. package/dist/mcp.js.map +1 -1
  52. package/dist/namespaces/actions.d.ts +50 -0
  53. package/dist/namespaces/actions.d.ts.map +1 -0
  54. package/dist/namespaces/actions.js +219 -0
  55. package/dist/namespaces/actions.js.map +1 -0
  56. package/dist/namespaces/approvals.d.ts +23 -0
  57. package/dist/namespaces/approvals.d.ts.map +1 -0
  58. package/dist/namespaces/approvals.js +78 -0
  59. package/dist/namespaces/approvals.js.map +1 -0
  60. package/dist/namespaces/attachments.d.ts +37 -0
  61. package/dist/namespaces/attachments.d.ts.map +1 -0
  62. package/dist/namespaces/attachments.js +91 -0
  63. package/dist/namespaces/attachments.js.map +1 -0
  64. package/dist/namespaces/auth.d.ts +58 -0
  65. package/dist/namespaces/auth.d.ts.map +1 -0
  66. package/dist/namespaces/auth.js +242 -0
  67. package/dist/namespaces/auth.js.map +1 -0
  68. package/dist/namespaces/directory.d.ts +10 -0
  69. package/dist/namespaces/directory.d.ts.map +1 -0
  70. package/dist/namespaces/directory.js +19 -0
  71. package/dist/namespaces/directory.js.map +1 -0
  72. package/dist/namespaces/handoffs.d.ts +47 -0
  73. package/dist/namespaces/handoffs.d.ts.map +1 -0
  74. package/dist/namespaces/handoffs.js +126 -0
  75. package/dist/namespaces/handoffs.js.map +1 -0
  76. package/dist/namespaces/inbox.d.ts +17 -0
  77. package/dist/namespaces/inbox.d.ts.map +1 -0
  78. package/dist/namespaces/inbox.js +192 -0
  79. package/dist/namespaces/inbox.js.map +1 -0
  80. package/dist/namespaces/live.d.ts +57 -0
  81. package/dist/namespaces/live.d.ts.map +1 -0
  82. package/dist/namespaces/live.js +116 -0
  83. package/dist/namespaces/live.js.map +1 -0
  84. package/dist/namespaces/notifications.d.ts +25 -0
  85. package/dist/namespaces/notifications.d.ts.map +1 -0
  86. package/dist/namespaces/notifications.js +128 -0
  87. package/dist/namespaces/notifications.js.map +1 -0
  88. package/dist/namespaces/profile.d.ts +19 -0
  89. package/dist/namespaces/profile.d.ts.map +1 -0
  90. package/dist/namespaces/profile.js +22 -0
  91. package/dist/namespaces/profile.js.map +1 -0
  92. package/dist/namespaces/questions.d.ts +41 -0
  93. package/dist/namespaces/questions.d.ts.map +1 -0
  94. package/dist/namespaces/questions.js +107 -0
  95. package/dist/namespaces/questions.js.map +1 -0
  96. package/dist/namespaces/rooms.d.ts +13 -0
  97. package/dist/namespaces/rooms.d.ts.map +1 -0
  98. package/dist/namespaces/rooms.js +41 -0
  99. package/dist/namespaces/rooms.js.map +1 -0
  100. package/dist/namespaces/webhooks.d.ts +11 -0
  101. package/dist/namespaces/webhooks.d.ts.map +1 -0
  102. package/dist/namespaces/webhooks.js +32 -0
  103. package/dist/namespaces/webhooks.js.map +1 -0
  104. package/dist/types/approvals.d.ts +62 -0
  105. package/dist/types/approvals.d.ts.map +1 -0
  106. package/dist/types/approvals.js +2 -0
  107. package/dist/types/approvals.js.map +1 -0
  108. package/dist/types/auth.d.ts +185 -0
  109. package/dist/types/auth.d.ts.map +1 -0
  110. package/dist/types/auth.js +2 -0
  111. package/dist/types/auth.js.map +1 -0
  112. package/dist/types/common.d.ts +43 -0
  113. package/dist/types/common.d.ts.map +1 -0
  114. package/dist/types/common.js +2 -0
  115. package/dist/types/common.js.map +1 -0
  116. package/dist/types/handoffs.d.ts +121 -0
  117. package/dist/types/handoffs.d.ts.map +1 -0
  118. package/dist/types/handoffs.js +2 -0
  119. package/dist/types/handoffs.js.map +1 -0
  120. package/dist/types/inbox.d.ts +51 -0
  121. package/dist/types/inbox.d.ts.map +1 -0
  122. package/dist/types/inbox.js +2 -0
  123. package/dist/types/inbox.js.map +1 -0
  124. package/dist/types/notifications.d.ts +376 -0
  125. package/dist/types/notifications.d.ts.map +1 -0
  126. package/dist/types/notifications.js +2 -0
  127. package/dist/types/notifications.js.map +1 -0
  128. package/dist/types/profile.d.ts +30 -0
  129. package/dist/types/profile.d.ts.map +1 -0
  130. package/dist/types/profile.js +3 -0
  131. package/dist/types/profile.js.map +1 -0
  132. package/dist/types/questions.d.ts +210 -0
  133. package/dist/types/questions.d.ts.map +1 -0
  134. package/dist/types/questions.js +2 -0
  135. package/dist/types/questions.js.map +1 -0
  136. package/dist/types/rooms.d.ts +163 -0
  137. package/dist/types/rooms.d.ts.map +1 -0
  138. package/dist/types/rooms.js +3 -0
  139. package/dist/types/rooms.js.map +1 -0
  140. package/dist/types.d.ts +9 -1035
  141. package/dist/types.d.ts.map +1 -1
  142. package/dist/version.d.ts +1 -1
  143. package/dist/version.js +1 -1
  144. package/dist/webhooks.d.ts +32 -5
  145. package/dist/webhooks.d.ts.map +1 -1
  146. package/dist/webhooks.js +44 -14
  147. package/dist/webhooks.js.map +1 -1
  148. package/package.json +4 -2
  149. package/src/client.ts +115 -0
  150. package/src/errors.ts +291 -0
  151. package/src/http.ts +225 -0
  152. package/src/index.ts +97 -0
  153. package/src/internal/async.ts +54 -0
  154. package/src/internal/guards.ts +129 -0
  155. package/src/internal/request.ts +97 -0
  156. package/src/internal/retry.ts +157 -0
  157. package/src/internal/url.ts +78 -0
  158. package/src/internal/validate.ts +42 -0
  159. package/src/linkPing.ts +56 -0
  160. package/src/liveStatus.ts +337 -0
  161. package/src/locationPing.ts +101 -0
  162. package/src/mcp.ts +161 -0
  163. package/src/namespaces/actions.ts +234 -0
  164. package/src/namespaces/approvals.ts +104 -0
  165. package/src/namespaces/attachments.ts +106 -0
  166. package/src/namespaces/auth.ts +284 -0
  167. package/src/namespaces/directory.ts +21 -0
  168. package/src/namespaces/handoffs.ts +160 -0
  169. package/src/namespaces/inbox.ts +253 -0
  170. package/src/namespaces/live.ts +134 -0
  171. package/src/namespaces/notifications.ts +152 -0
  172. package/src/namespaces/profile.ts +24 -0
  173. package/src/namespaces/questions.ts +133 -0
  174. package/src/namespaces/rooms.ts +53 -0
  175. package/src/namespaces/webhooks.ts +38 -0
  176. package/src/types/approvals.ts +67 -0
  177. package/src/types/auth.ts +202 -0
  178. package/src/types/common.ts +74 -0
  179. package/src/types/handoffs.ts +148 -0
  180. package/src/types/inbox.ts +64 -0
  181. package/src/types/notifications.ts +393 -0
  182. package/src/types/profile.ts +37 -0
  183. package/src/types/questions.ts +226 -0
  184. package/src/types/rooms.ts +169 -0
  185. package/src/types.ts +17 -0
  186. package/src/version.ts +2 -0
  187. package/src/webhooks.ts +373 -0
  188. package/dist/liveActivity.d.ts +0 -101
  189. package/dist/liveActivity.d.ts.map +0 -1
  190. package/dist/liveActivity.js +0 -83
  191. package/dist/liveActivity.js.map +0 -1
@@ -0,0 +1,185 @@
1
+ import type { ScopeInput } from './common.js';
2
+ export type AgentRegisterType = 'identity_assertion' | 'anonymous';
3
+ export type AgentAssertionType = 'urn:ietf:params:oauth:token-type:id-jag' | 'verified_email';
4
+ export interface RegisterParams {
5
+ type: AgentRegisterType;
6
+ assertion_type?: AgentAssertionType;
7
+ assertion?: string;
8
+ scopes?: ScopeInput[];
9
+ agent_label?: string;
10
+ }
11
+ /**
12
+ * How wide the human made this agent's room grant.
13
+ *
14
+ * `'all'` — every room the account is in; the grant lists none, while `room`
15
+ * may identify one eligible private delivery destination. `'selected'` —
16
+ * exactly the rooms in `rooms`.
17
+ */
18
+ export type AgentRoomAccess = 'all' | 'selected';
19
+ /** One room inside an agent's grant. */
20
+ export interface AgentAccessRoom {
21
+ id: string;
22
+ invite_code: string;
23
+ name: string;
24
+ }
25
+ /** The delivery room: where handoffs and questions land. */
26
+ export interface AgentDeliveryRoom {
27
+ invite_code: string;
28
+ name?: string | null;
29
+ }
30
+ /** Stable, non-credential URLs returned with an approved agent connection. */
31
+ export interface AgentCredentialLinks {
32
+ /** REST endpoint for the agent's latest visible pings. Authenticate normally. */
33
+ latest_pings: string;
34
+ /** Token-free smart link for installing PingRoom on iOS or Android. */
35
+ install_app?: string;
36
+ }
37
+ /** Public robot identity provisioned before a person approves pairing. */
38
+ export interface AgentProfile {
39
+ display_name: string | null;
40
+ handle: string | null;
41
+ avatar_id: string | null;
42
+ avatar_url: string | null;
43
+ }
44
+ /** Agent wrapper used by pairing v2. Older servers omit it entirely. */
45
+ export interface PairingAgent {
46
+ id?: string;
47
+ label?: string | null;
48
+ handle?: string | null;
49
+ profile?: AgentProfile;
50
+ }
51
+ /** Human who claimed the robot. Present only after approval. */
52
+ export interface PairingOwner {
53
+ name: string | null;
54
+ }
55
+ /** Visible home-room membership, distinct from the wider room-access grant. */
56
+ export interface AgentRoomMembership {
57
+ status: 'active' | 'removed';
58
+ joined_at: string | null;
59
+ removed_at: string | null;
60
+ /** True for the robot's home room. Sent by `auth.connection()`. */
61
+ is_home?: boolean;
62
+ room: AgentDeliveryRoom | null;
63
+ }
64
+ /** Additive pairing-v2 identity metadata; every field is optional for old servers. */
65
+ export interface PairingIdentityMetadata {
66
+ flow_version?: 2;
67
+ claim_mode?: 'agent_identity';
68
+ agent?: PairingAgent;
69
+ owner?: PairingOwner;
70
+ /** Alias of legacy `room`: the robot's Question/Handoff delivery room. */
71
+ home_room?: AgentDeliveryRoom | null;
72
+ room_membership?: AgentRoomMembership | null;
73
+ }
74
+ export interface Credential extends PairingIdentityMetadata {
75
+ credential: string;
76
+ credential_type: 'pre_claim' | 'active';
77
+ expires_in: number | null;
78
+ scopes: string[];
79
+ handle?: string;
80
+ claim?: {
81
+ start_uri: string;
82
+ complete_uri: string;
83
+ };
84
+ account?: {
85
+ name?: string | null;
86
+ } | null;
87
+ /** The delivery room, or null when the human pinned none. */
88
+ room?: AgentDeliveryRoom | null;
89
+ room_access?: AgentRoomAccess | null;
90
+ /** The full grant. Empty under `room_access: 'all'`. */
91
+ rooms?: AgentAccessRoom[];
92
+ /** Server-authoritative endpoints associated with this connection. */
93
+ links?: AgentCredentialLinks;
94
+ }
95
+ /** The human a connection belongs to, as `auth.connection()` and `auth.disconnect()` report it. */
96
+ export interface AgentConnectionOwner {
97
+ /** Public user id. Match it to the account you approved before sending. */
98
+ id: string;
99
+ name: string;
100
+ }
101
+ /** `auth.connection()`: what this credential is connected to. */
102
+ export interface AgentConnectionInfo {
103
+ flow_version: 2;
104
+ claim_mode: 'agent_identity';
105
+ status: 'active';
106
+ handle: string | null;
107
+ agent: PairingAgent;
108
+ owner: AgentConnectionOwner;
109
+ /** The robot's Question/Handoff delivery room, or null when none is designated. */
110
+ home_room: AgentAccessRoom | null;
111
+ /** The robot's membership of its home room. */
112
+ room_membership: AgentRoomMembership | null;
113
+ /** Every active room membership, home room first. */
114
+ room_memberships: AgentRoomMembership[];
115
+ room_access: AgentRoomAccess | null;
116
+ links: AgentCredentialLinks;
117
+ [key: string]: unknown;
118
+ }
119
+ /** `auth.disconnect()`: the calling credential and its refresh credentials are revoked. */
120
+ export interface AgentDisconnectResult {
121
+ status: 'revoked';
122
+ handle: string | null;
123
+ owner: AgentConnectionOwner;
124
+ /** Reconnect guidance for the human. */
125
+ message: string;
126
+ [key: string]: unknown;
127
+ }
128
+ export interface ClaimStartParams {
129
+ email: string;
130
+ }
131
+ export interface ClaimCompleteParams {
132
+ email: string;
133
+ otp: string;
134
+ scopes?: ScopeInput[];
135
+ }
136
+ /** Start an app-approved pairing without copying an API token or room code. */
137
+ export interface StartPairingParams {
138
+ /**
139
+ * @deprecated Pairing grants are server-authoritative. This value is ignored
140
+ * and retained only so existing TypeScript callers continue to compile.
141
+ */
142
+ scopes?: ScopeInput[];
143
+ agent_label?: string;
144
+ }
145
+ /** Short-lived browser and native-app links returned when pairing starts. */
146
+ export interface PairingStart extends PairingIdentityMetadata {
147
+ pair_token: string;
148
+ /** Legacy approval link, kept QR-compatible for existing clients. */
149
+ pair_url: string;
150
+ /** Browser approval page. Fall back to `pair_url` on older servers. */
151
+ pair_browser_url?: string;
152
+ /** Native app universal link for QR renderers. Falls back to `pair_url` on older servers. */
153
+ pair_qr_url?: string;
154
+ /** Token-free smart install link. Never append `pair_token` to it. */
155
+ app_install_url?: string;
156
+ expires_in: number;
157
+ poll_interval_ms: number;
158
+ }
159
+ export type PairedCredential = Omit<Credential, 'credential_type' | 'scopes'> & {
160
+ credential_type: 'active';
161
+ /**
162
+ * The selected/deterministic private delivery room. Null remains valid when
163
+ * the account has no eligible private room (and for older servers).
164
+ */
165
+ room: AgentDeliveryRoom | null;
166
+ room_access: AgentRoomAccess;
167
+ /** The full grant. Empty under `room_access: 'all'`. */
168
+ rooms: AgentAccessRoom[];
169
+ };
170
+ export type PairingStatus = (PairingIdentityMetadata & {
171
+ status: 'pending';
172
+ }) | (PairingIdentityMetadata & {
173
+ status: 'expired';
174
+ }) | (PairedCredential & {
175
+ status: 'active';
176
+ /** Legacy server metadata accepted on input and omitted from the result. */
177
+ scopes?: string[];
178
+ });
179
+ export interface WaitForPairingOptions {
180
+ /** Stop waiting without consuming the pairing session. */
181
+ signal?: AbortSignal;
182
+ /** Override the server-suggested polling interval (clamped to 1–10 seconds). */
183
+ pollIntervalMs?: number;
184
+ }
185
+ //# sourceMappingURL=auth.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"auth.d.ts","sourceRoot":"","sources":["../../src/types/auth.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AAI9C,MAAM,MAAM,iBAAiB,GAAG,oBAAoB,GAAG,WAAW,CAAC;AACnE,MAAM,MAAM,kBAAkB,GAAG,yCAAyC,GAAG,gBAAgB,CAAC;AAE9F,MAAM,WAAW,cAAc;IAC7B,IAAI,EAAE,iBAAiB,CAAC;IACxB,cAAc,CAAC,EAAE,kBAAkB,CAAC;IACpC,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,MAAM,CAAC,EAAE,UAAU,EAAE,CAAC;IACtB,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB;AAED;;;;;;GAMG;AACH,MAAM,MAAM,eAAe,GAAG,KAAK,GAAG,U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zB,UAAU,EAAE,MAAM,CAAC;IACnB,gBAAgB,EAAE,MAAM,CAAC;CAC1B;AAED,MAAM,MAAM,gBAAgB,GAAG,IAAI,CAAC,UAAU,EAAE,iBAAiB,GAAG,QAAQ,CAAC,GAAG;IAC9E,eAAe,EAAE,QAAQ,CAAC;IAC1B;;;OAGG;IACH,IAAI,EAAE,iBAAiB,GAAG,IAAI,CAAC;IAC/B,WAAW,EAAE,eAAe,CAAC;IAC7B,wDAAwD;IACxD,KAAK,EAAE,eAAe,EAAE,CAAC;CAC1B,CAAC;AAEF,MAAM,MAAM,aAAa,GACrB,CAAC,uBAAuB,GAAG;IAAE,MAAM,EAAE,SAAS,CAAA;CAAE,CAAC,GACjD,CAAC,uBAAuB,GAAG;IAAE,MAAM,EAAE,SAAS,CAAA;CAAE,CAAC,GACjD,CAAC,gBAAgB,GAAG;IAClB,MAAM,EAAE,QAAQ,CAAC;IACjB,4EAA4E;IAC5E,MAAM,CAAC,EAAE,MAAM,EAAE,CAAC;CACnB,CAAC,CAAC;AAEP,MAAM,WAAW,qBAAqB;IACpC,0DAA0D;IAC1D,MAAM,CAAC,EAAE,WAAW,CAAC;IACrB,gFAAgF;IAChF,cAAc,CAAC,EAAE,MAAM,CAAC;CACzB"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=auth.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"auth.js","sourceRoot":"","sources":["../../src/types/auth.ts"],"names":[],"mappings":""}
@@ -0,0 +1,43 @@
1
+ /** A plain JSON object — the shape the API accepts for structured `data`. */
2
+ export type JsonObject = Record<string, unknown>;
3
+ /** Minimal fetch signature the SDK depends on (Node >= 18, browsers, workers, Deno, Bun). */
4
+ export type FetchLike = (input: string, init?: RequestInit) => Promise<Response>;
5
+ /** The scopes an agent credential can hold. */
6
+ export type AgentScope = 'pingroom:full' | 'pingroom:rooms:read' | 'pingroom:rooms:write' | 'pingroom:rooms:publish' | 'pingroom:rooms:join' | 'pingroom:actions:write' | 'pingroom:actions:trigger' | 'pingroom:broadcast:send' | 'pingroom:attachments:write' | 'pingroom:notifications:read' | 'pingroom:webhooks:read' | 'pingroom:webhooks:write' | 'pingroom:webhooks:delete' | 'pingroom:agents:ping' | 'pingroom:approvals:request' | 'pingroom:questions:ask' | 'pingroom:handoffs:create' | 'pingroom:live:write' | 'pingroom:profile:write' | 'pingroom:codes:redeem';
7
+ /** A known scope, or any forward-compatible string (keeps autocomplete on the knowns). */
8
+ export type ScopeInput = AgentScope | (string & {});
9
+ export interface PingRoomOptions {
10
+ /** Agent credential (Bearer JWT). Optional — public reads (directory) work without it. */
11
+ token?: string | null;
12
+ /** API base URL. Defaults to env PINGROOM_API_URL/PINGROOM_BASE_URL, else https://api.pingroom.io. */
13
+ baseUrl?: string;
14
+ /** Default per-request timeout in ms (long-poll calls extend this automatically). Default 30000. */
15
+ timeoutMs?: number;
16
+ /** Custom fetch implementation (for tests or non-global-fetch runtimes). */
17
+ fetch?: FetchLike;
18
+ /** Override the User-Agent header. */
19
+ userAgent?: string;
20
+ /** Allow plain-http base URLs to non-loopback hosts. Off by default — credentials require https. */
21
+ allowInsecure?: boolean;
22
+ }
23
+ /** Pro entitlement applied to the human who authorized this agent. */
24
+ export interface RedeemCodeResult {
25
+ message: string;
26
+ kind: 'gift' | 'redeem';
27
+ reward_days: number | null;
28
+ package: string | null;
29
+ lifetime: boolean;
30
+ plan: 'pro';
31
+ plan_expires_at: string | null;
32
+ }
33
+ export interface Paginated<T> {
34
+ current_page: number;
35
+ data: T[];
36
+ per_page: number;
37
+ total: number;
38
+ last_page: number;
39
+ next_page_url: string | null;
40
+ prev_page_url: string | null;
41
+ [key: string]: unknown;
42
+ }
43
+ //# sourceMappingURL=common.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"common.d.ts","sourceRoot":"","sources":["../../src/types/common.ts"],"names":[],"mappings":"AAAA,6EAA6E;AAC7E,MAAM,MAAM,UAAU,GAAG,MAAM,CAAC,MAAM,EAA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G,IAAI,CAAC;CAChC;AAID,MAAM,WAAW,SAAS,CAAC,CAAC;IAC1B,YAAY,EAAE,MAAM,CAAC;IACrB,IAAI,EAAE,CAAC,EAAE,CAAC;IACV,QAAQ,EAAE,MAAM,CAAC;IACjB,KAAK,EAAE,MAAM,CAAC;IACd,SAAS,EAAE,MAAM,CAAC;IAClB,aAAa,EAAE,MAAM,GAAG,IAAI,CAAC;IAC7B,aAAa,EAAE,MAAM,GAAG,IAAI,CAAC;IAC7B,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC;CACxB"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=common.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"common.js","sourceRoot":"","sources":["../../src/types/common.ts"],"names":[],"mappings":""}
@@ -0,0 +1,121 @@
1
+ import type { JsonObject } from './common.js';
2
+ import type { QuestionResponder } from './questions.js';
3
+ /** Which primitive backs a handoff: an acknowledgement or a multi-option question. */
4
+ export type HandoffKind = 'ack' | 'question';
5
+ /** The lifecycle states of an `ack` handoff. Terminal: `acked`, `expired`. */
6
+ export type HandoffAckState = 'open' | 'acked' | 'expired';
7
+ /** The lifecycle states of a `question` handoff. Terminal: `answered`, `expired`, `cancelled`. */
8
+ export type HandoffQuestionState = 'answered' | 'expired' | 'cancelled' | 'pending';
9
+ /** The full handoff state space (union of ack + question states). */
10
+ export type HandoffState = HandoffAckState | HandoffQuestionState;
11
+ /**
12
+ * Whether the ping was enqueued, remains pending dispatch, or exhausted its
13
+ * retry budget (`failed`). Only populated on create; null on reads.
14
+ */
15
+ export type HandoffDeliveryState = 'enqueued' | 'pending' | 'failed';
16
+ /** One option offered on a `question` handoff. A bare string is shorthand for `{ value, label: value }`. */
17
+ export interface HandoffOptionInput {
18
+ /** Stable machine token returned as the answer. */
19
+ value: string;
20
+ /** Human text on the button (defaults to `value`). */
21
+ label?: string;
22
+ /** Presentation hint: `primary` = affirmative, `danger` = cancel/negative. */
23
+ style?: 'primary' | 'danger' | 'default';
24
+ }
25
+ export type HandoffOptionSpec = string | HandoffOptionInput;
26
+ /** A resolved option on the handoff wire shape. */
27
+ export interface HandoffOption {
28
+ value: string;
29
+ label: string;
30
+ [key: string]: unknown;
31
+ }
32
+ /** The human who acknowledged an `ack` handoff (present once `state === 'acked'`). */
33
+ export interface HandoffAcker {
34
+ /** Null when the actor is redacted (reader-privacy). */
35
+ id: string | null;
36
+ display_name: string | null;
37
+ }
38
+ /** The resolution of a `question` handoff (present once `state === 'answered'`). */
39
+ export interface HandoffAnswer {
40
+ /** The chosen option's `value`, or null for a text-only answer. */
41
+ value: string | null;
42
+ /** The chosen option's `label`. */
43
+ label: string | null;
44
+ /** The typed answer, when the question invited one. */
45
+ text: string | null;
46
+ /** The authenticated human who answered. */
47
+ responder: QuestionResponder | null;
48
+ answered_at: string | null;
49
+ }
50
+ /**
51
+ * The public handoff wire shape — identical across create / get / wait / list.
52
+ * `options`/`answer` appear on question handoffs; `acked_by`/`acked_at` on ack
53
+ * handoffs.
54
+ */
55
+ export interface Handoff {
56
+ id: string;
57
+ kind: HandoffKind;
58
+ prompt: string;
59
+ state: HandoffState;
60
+ /** Delivery status, populated only on create; null on reads. */
61
+ delivery_state: HandoffDeliveryState | null;
62
+ correlation_id: string | null;
63
+ reply_to: string | null;
64
+ data: JsonObject | null;
65
+ expires_at: string | null;
66
+ created_at: string | null;
67
+ /** ack handoff: the human who acknowledged (once `state === 'acked'`). */
68
+ acked_by?: HandoffAcker | null;
69
+ /** ack handoff: when it was acknowledged. */
70
+ acked_at?: string | null;
71
+ /** question handoff: the offered options. */
72
+ options?: HandoffOption[];
73
+ /** question handoff: the resolution (once `state === 'answered'`). */
74
+ answer?: HandoffAnswer | null;
75
+ /**
76
+ * Question handoffs used for Agent Inbox onboarding expose whether the
77
+ * server recorded the exact delivery + answer + agent-observation event.
78
+ */
79
+ activation_completed?: boolean;
80
+ [key: string]: unknown;
81
+ }
82
+ /** Ask a human to acknowledge (the ack handoff). Resolves on the first acknowledgement. */
83
+ export interface RequestAckInput {
84
+ /** What the human reads (required, ≤ 500 chars). */
85
+ prompt: string;
86
+ /**
87
+ * Who to reach: `me`, the bound human (the default). The bound human's own
88
+ * user id is accepted as an alias; any other id is refused with 403
89
+ * `target_not_permitted`.
90
+ */
91
+ target?: string;
92
+ /** Seconds until expiry. Clamped server-side to 120–86400; default 900. */
93
+ expiresIn?: number;
94
+ /** Interruption level — `active` (default) or `passive`. */
95
+ urgency?: 'active' | 'passive';
96
+ correlationId?: string;
97
+ replyTo?: string;
98
+ data?: JsonObject;
99
+ /**
100
+ * Idempotency key — same key + same body replays the original resource; a
101
+ * different body for the same key returns a 409 `idempotency_conflict`.
102
+ * Reuse it verbatim on network retries. 1–255 printable ASCII characters
103
+ * (spaces allowed); an empty string sends no key.
104
+ */
105
+ idempotencyKey?: string;
106
+ }
107
+ /** Ask a human a multi-option question (the question handoff). Resolves on the first tapped answer. */
108
+ export interface AskInput extends RequestAckInput {
109
+ /** 2–4 options. A bare string is shorthand for `{ value, label: value }`. */
110
+ options: HandoffOptionSpec[];
111
+ }
112
+ export interface WaitHandoffInput {
113
+ /** Seconds the server holds the connection (server caps at 25s; default 20). */
114
+ timeout?: number;
115
+ signal?: AbortSignal;
116
+ }
117
+ export interface ListHandoffsInput {
118
+ /** `open` for unresolved work, or `all` for recent history (up to 200 per kind). */
119
+ state?: 'open' | 'all';
120
+ }
121
+ //# sourceMappingURL=handoffs.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"handoffs.d.ts","sourceRoot":"","sources":["../../src/types/handoffs.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AAC9C,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,gBAAgB,CAAC;AAexD,sFAAsF;AACtF,MAAM,MAAM,WAAW,GAAG,KAAK,GAAG,UAAU,CAAC;AAE7C,8EAA8E;AAC9E,MAAM,MAAM,eAAe,GAAG,MAAM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AAE,iBAAiB,EAAE,CAAC;CAC9B;AAED,MAAM,WAAW,gBAAgB;IAC/B,gFAAgF;IAChF,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,MAAM,CAAC,EAAE,WAAW,CAAC;CACtB;AAED,MAAM,WAAW,iBAAiB;IAChC,oFAAoF;IACpF,KAAK,CAAC,EAAE,MAAM,GAAG,KAAK,CAAC;CACxB"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=handoffs.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"handoffs.js","sourceRoot":"","sources":["../../src/types/handoffs.ts"],"names":[],"mappings":""}
@@ -0,0 +1,51 @@
1
+ import type { HandoffQuestionState, HandoffOption, HandoffAnswer, Handoff, WaitHandoffInput } from './handoffs.js';
2
+ /** Idempotent first-connect result from POST /api/agent/inbox/ensure. */
3
+ export interface AgentInboxEnsureResult {
4
+ onboarded: true;
5
+ replayed: boolean;
6
+ room: {
7
+ id: string;
8
+ name: string;
9
+ invite_code: string;
10
+ is_agent_inbox: boolean;
11
+ };
12
+ question: {
13
+ id: string;
14
+ kind: 'question';
15
+ prompt: string;
16
+ options: HandoffOption[];
17
+ state: HandoffQuestionState;
18
+ expires_at: string | null;
19
+ created_at: string | null;
20
+ };
21
+ }
22
+ /** Cancellation for the idempotent Agent Inbox ensure request. */
23
+ export interface AgentInboxEnsureInput {
24
+ signal?: AbortSignal;
25
+ }
26
+ /**
27
+ * Controls the activation handoff wait. `timeout` is the duration of each
28
+ * bounded server hold; a still-pending response is polled again until the
29
+ * server confirms activation, the Question expires/cancels, the overall
30
+ * deadline elapses, or `signal` is aborted.
31
+ */
32
+ export interface AgentInboxActivateInput extends WaitHandoffInput {
33
+ /**
34
+ * Wall-clock limit for ensure + every pending long-poll combined. Defaults
35
+ * to 120000 (two minutes). Distinct from `timeout`, which controls one hold.
36
+ */
37
+ overallTimeoutMs?: number;
38
+ }
39
+ /** The terminal question returned by a completed Agent Inbox activation. */
40
+ export type AgentInboxActivationQuestion = Handoff & {
41
+ kind: 'question';
42
+ state: 'answered';
43
+ answer: HandoffAnswer;
44
+ activation_completed: true;
45
+ };
46
+ /** `ensure` metadata plus the terminal, fully resolved onboarding handoff. */
47
+ export type AgentInboxActivationResult = Omit<AgentInboxEnsureResult, 'question'> & {
48
+ activation_completed: true;
49
+ question: AgentInboxActivationQuestion;
50
+ };
51
+ //# sourceMappingURL=inbox.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"inbox.d.ts","sourceRoot":"","sources":["../../src/types/inbox.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,oBAAoB,EACpB,aAAa,EACb,aAAa,EACb,OAAO,EACP,gBAAgB,EACjB,MAAM,eAAe,CAAC;AAIvB,yEAAyE;AACzE,MAAM,WAAW,sBAAsB;IACrC,SAAS,EAAE,IAAI,CAAC;IAChB,QAAQ,EAAE,OAAO,CAAC;IAClB,IAAI,EAAE;QACJ,EAAE,EAAE,MAAM,CAAC;QACX,IAAI,EAAE,MAAM,CAAC;QACb,WAAW,EAAE,MAAM,CAAC;QACpB,cAAc,EAAE,OAAO,CAAC;KACzB,CAAC;IACF,QAAQ,EAAE;QACR,EAAE,EAAE,MAAM,CAAC;QACX,IAAI,EAAE,UAAU,CAAC;QACjB,MAAM,EAAE,MAAM,CAAC;QACf,OAAO,EAAE,aAAa,EAAE,CAAC;QACzB,KAAK,EAAE,oBAAoB,CAAC;QAC5B,UAAU,EAAE,MAAM,GAAG,IAAI,CAAC;QAC1B,UAAU,EAAE,MAAM,GAAG,IAAI,CAAC;KAC3B,CAAC;CACH;AAED,kEAAkE;AAClE,MAAM,WAAW,qBAAqB;IACpC,MAAM,CAAC,EAAE,WAAW,CAAC;CACtB;AAED;;;;;GAKG;AACH,MAAM,WAAW,uBAAwB,SAAQ,gBAAgB;IAC/D;;;OAGG;IACH,gBAAgB,CAAC,EAAE,MAAM,CAAC;CAC3B;AAED,4EAA4E;AAC5E,MAAM,MAAM,4BAA4B,GACtC,OAAO,GAAG;IACR,IAAI,EAAE,UAAU,CAAC;IACjB,KAAK,EAAE,UAAU,CAAC;IAClB,MAAM,EAAE,aAAa,CAAC;IACtB,oBAAoB,EAAE,IAAI,CAAC;CAC5B,CAAC;AAEJ,8EAA8E;AAC9E,MAAM,MAAM,0BAA0B,GAAG,IAAI,CAAC,sBAAsB,EAAE,UAAU,CAAC,GAAG;IAClF,oBAAoB,EAAE,IAAI,CAAC;IAC3B,QAAQ,EAAE,4BAA4B,CAAC;CACxC,CAAC"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=inbox.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"inbox.js","sourceRoot":"","sources":["../../src/types/inbox.ts"],"names":[],"mappings":""}