@everfur/sdk 0.1.1 → 0.3.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 (187) hide show
  1. package/CHANGELOG.md +634 -0
  2. package/README.md +58 -23
  3. package/consent/package.json +8 -0
  4. package/dist/Chat-DPUD6dnc.d.cts +128 -0
  5. package/dist/Chat-DwAC2vhB.d.ts +128 -0
  6. package/dist/DepthViews-DNEM96Se.d.ts +16 -0
  7. package/dist/DepthViews-DP0R-DhB.d.cts +19 -0
  8. package/dist/DepthViews-D_3hl4xk.d.ts +19 -0
  9. package/dist/DepthViews-DbFhR4Du.d.cts +16 -0
  10. package/dist/ErrorPolicyPort-CNf4uQZP.d.cts +22 -0
  11. package/dist/ErrorPolicyPort-CwbfmxzJ.d.ts +22 -0
  12. package/dist/{EverfurResult-D92-uL82.d.cts → EverfurResult-DN9pL2Ab.d.cts} +11 -10
  13. package/dist/{EverfurResult-D92-uL82.d.ts → EverfurResult-DN9pL2Ab.d.ts} +11 -10
  14. package/dist/{PhotoController-BItt5M7u.d.cts → PhotoController-3l7MT9jA.d.cts} +1 -1
  15. package/dist/{PhotoController-D8zMTdcW.d.ts → PhotoController-vzY5bfY_.d.ts} +1 -1
  16. package/dist/animations/index.cjs +1 -1997
  17. package/dist/animations/index.d.cts +35 -35
  18. package/dist/animations/index.d.ts +35 -35
  19. package/dist/animations/index.js +1 -1972
  20. package/dist/attachments-5NeobOCd.d.ts +256 -0
  21. package/dist/attachments-Bw3iMQgu.d.ts +146 -0
  22. package/dist/attachments-CQgFrEQ7.d.cts +146 -0
  23. package/dist/attachments-D8T5re7e.d.cts +256 -0
  24. package/dist/casesRepository-ClLv6qMl.d.ts +188 -0
  25. package/dist/casesRepository-DHwtGRYY.d.cts +188 -0
  26. package/dist/chat/index.cjs +1 -1170
  27. package/dist/chat/index.d.cts +31 -53
  28. package/dist/chat/index.d.ts +31 -53
  29. package/dist/chat/index.js +1 -1167
  30. package/dist/client/index.cjs +9 -2315
  31. package/dist/client/index.d.cts +77 -15
  32. package/dist/client/index.d.ts +77 -15
  33. package/dist/client/index.js +9 -2215
  34. package/dist/{config-CiJ0PVBB.d.ts → config-CzTZGlfF.d.cts} +63 -25
  35. package/dist/{config-BSjBdxrZ.d.cts → config-DW60uRb9.d.ts} +63 -25
  36. package/dist/consent/index.cjs +1 -0
  37. package/dist/consent/index.d.cts +33 -0
  38. package/dist/consent/index.d.ts +33 -0
  39. package/dist/consent/index.js +1 -0
  40. package/dist/context-DXhqHlPU.d.ts +159 -0
  41. package/dist/context-XvTzq1tE.d.cts +159 -0
  42. package/dist/copy-Mjoo91aS.d.ts +198 -0
  43. package/dist/copy-bKDNigLb.d.cts +198 -0
  44. package/dist/core/index.cjs +13 -3178
  45. package/dist/core/index.d.cts +58 -12
  46. package/dist/core/index.d.ts +58 -12
  47. package/dist/core/index.js +13 -3166
  48. package/dist/depth-CErXCU8J.d.cts +502 -0
  49. package/dist/depth-DjDcJ6kH.d.ts +502 -0
  50. package/dist/entitlementRepository-DKdXFgTo.d.cts +698 -0
  51. package/dist/entitlementRepository-DSbzuyAW.d.ts +698 -0
  52. package/dist/{identity-DK9zORrG.d.ts → identity-BMx2SUOM.d.ts} +19 -6
  53. package/dist/{identity-Brl-lDd6.d.cts → identity-DI4eVx9S.d.cts} +19 -6
  54. package/dist/{ids-CJ1S6adf.d.cts → ids-B2GAAifq.d.cts} +1 -1
  55. package/dist/{ids-CJ1S6adf.d.ts → ids-B2GAAifq.d.ts} +1 -1
  56. package/dist/index.cjs +12 -4494
  57. package/dist/index.d.cts +29 -121
  58. package/dist/index.d.ts +29 -121
  59. package/dist/index.js +12 -4470
  60. package/dist/models-B-Uh2LTf.d.ts +214 -0
  61. package/dist/models-D2EUxPZY.d.cts +214 -0
  62. package/dist/notifications/index.cjs +2 -0
  63. package/dist/notifications/index.d.cts +17 -0
  64. package/dist/notifications/index.d.ts +17 -0
  65. package/dist/notifications/index.js +2 -0
  66. package/dist/pets-CtQdRpWo.d.ts +92 -0
  67. package/dist/pets-aB8q0JyX.d.cts +92 -0
  68. package/dist/photo/index.cjs +1 -2189
  69. package/dist/photo/index.d.cts +6 -6
  70. package/dist/photo/index.d.ts +6 -6
  71. package/dist/photo/index.js +1 -2186
  72. package/dist/ports-BN6RHF9W.d.cts +48 -0
  73. package/dist/ports-BN6RHF9W.d.ts +48 -0
  74. package/dist/ports-DEBzEhbp.d.cts +386 -0
  75. package/dist/ports-DMolTRzU.d.ts +386 -0
  76. package/dist/profile-CSs1wlXT.d.cts +93 -0
  77. package/dist/profile-CSs1wlXT.d.ts +93 -0
  78. package/dist/records/depth/index.cjs +2 -0
  79. package/dist/records/depth/index.d.cts +13 -0
  80. package/dist/records/depth/index.d.ts +13 -0
  81. package/dist/records/depth/index.js +2 -0
  82. package/dist/records/index.cjs +3 -2839
  83. package/dist/records/index.d.cts +137 -203
  84. package/dist/records/index.d.ts +137 -203
  85. package/dist/records/index.js +3 -2833
  86. package/dist/requestFunnel-CjW7uDuA.d.ts +87 -0
  87. package/dist/requestFunnel-L-BQfi0z.d.cts +87 -0
  88. package/dist/{resolve-Dq_4_agU.d.ts → resolve-D4Ywz5OS.d.cts} +10 -4
  89. package/dist/{resolve-Dq_4_agU.d.cts → resolve-D4Ywz5OS.d.ts} +10 -4
  90. package/dist/{runtime-Bvr8yqXm.d.cts → runtime-B8s-_hv8.d.cts} +121 -59
  91. package/dist/{runtime-BIYzf9cK.d.ts → runtime-BR9ysG0J.d.ts} +121 -59
  92. package/dist/server/events/index.cjs +2 -0
  93. package/dist/server/events/index.d.cts +550 -0
  94. package/dist/server/events/index.d.ts +550 -0
  95. package/dist/server/events/index.js +2 -0
  96. package/dist/server/index.cjs +2 -533
  97. package/dist/server/index.d.cts +73 -18
  98. package/dist/server/index.d.ts +73 -18
  99. package/dist/server/index.js +2 -530
  100. package/dist/species-BXAIMh7I.d.cts +9 -0
  101. package/dist/species-BXAIMh7I.d.ts +9 -0
  102. package/dist/televet/index.cjs +1 -0
  103. package/dist/televet/index.d.cts +60 -0
  104. package/dist/televet/index.d.ts +60 -0
  105. package/dist/televet/index.js +1 -0
  106. package/dist/testing/index.cjs +5 -823
  107. package/dist/testing/index.d.cts +17 -3
  108. package/dist/testing/index.d.ts +17 -3
  109. package/dist/testing/index.js +5 -820
  110. package/dist/testing/rn/index.cjs +1 -449
  111. package/dist/testing/rn/index.d.cts +17 -29
  112. package/dist/testing/rn/index.d.ts +17 -29
  113. package/dist/testing/rn/index.js +1 -444
  114. package/dist/testing/web/index.cjs +1 -0
  115. package/dist/testing/web/index.d.cts +131 -0
  116. package/dist/testing/web/index.d.ts +131 -0
  117. package/dist/testing/web/index.js +1 -0
  118. package/dist/timelineRows-CaohZzXS.d.cts +19 -0
  119. package/dist/timelineRows-DZed6dAM.d.ts +19 -0
  120. package/dist/typeStyle-0TydiZ1w.d.cts +19 -0
  121. package/dist/typeStyle-CWMsoe6b.d.ts +19 -0
  122. package/dist/uploadTransport-D0M0T4hN.d.ts +38 -0
  123. package/dist/uploadTransport-DKJHs3Yj.d.cts +38 -0
  124. package/dist/useRecordsDepth-BHBzJ76R.d.cts +237 -0
  125. package/dist/useRecordsDepth-BU-OhzH6.d.ts +237 -0
  126. package/dist/useVetVisit-Bc84hWUU.d.cts +187 -0
  127. package/dist/useVetVisit-CjmMa896.d.ts +187 -0
  128. package/dist/video/index.cjs +1 -1941
  129. package/dist/video/index.d.cts +4 -4
  130. package/dist/video/index.d.ts +4 -4
  131. package/dist/video/index.js +1 -1938
  132. package/dist/view-C3qPIXGX.d.cts +310 -0
  133. package/dist/view-DtSPYpKa.d.ts +310 -0
  134. package/dist/visitIntent-D7_yVp1I.d.cts +8 -0
  135. package/dist/visitIntent-D7_yVp1I.d.ts +8 -0
  136. package/dist/web/consent/index.cjs +1 -0
  137. package/dist/web/consent/index.d.cts +34 -0
  138. package/dist/web/consent/index.d.ts +34 -0
  139. package/dist/web/consent/index.js +1 -0
  140. package/dist/web/index.cjs +14 -0
  141. package/dist/web/index.d.cts +217 -0
  142. package/dist/web/index.d.ts +217 -0
  143. package/dist/web/index.js +14 -0
  144. package/dist/web/notifications/index.cjs +2 -0
  145. package/dist/web/notifications/index.d.cts +213 -0
  146. package/dist/web/notifications/index.d.ts +213 -0
  147. package/dist/web/notifications/index.js +2 -0
  148. package/dist/web/records/depth/index.cjs +2 -0
  149. package/dist/web/records/depth/index.d.cts +12 -0
  150. package/dist/web/records/depth/index.d.ts +12 -0
  151. package/dist/web/records/depth/index.js +2 -0
  152. package/dist/web/records/index.cjs +4 -0
  153. package/dist/web/records/index.d.cts +194 -0
  154. package/dist/web/records/index.d.ts +194 -0
  155. package/dist/web/records/index.js +4 -0
  156. package/dist/web/televet/index.cjs +1 -0
  157. package/dist/web/televet/index.d.cts +50 -0
  158. package/dist/web/televet/index.d.ts +50 -0
  159. package/dist/web/televet/index.js +1 -0
  160. package/notifications/package.json +8 -0
  161. package/package.json +197 -9
  162. package/records/depth/package.json +8 -0
  163. package/server/events/device-blocked.cjs +15 -0
  164. package/server/events/package.json +9 -0
  165. package/televet/package.json +8 -0
  166. package/testing/web/native-blocked.cjs +12 -0
  167. package/testing/web/package.json +8 -0
  168. package/web/consent/native-blocked.cjs +12 -0
  169. package/web/consent/package.json +8 -0
  170. package/web/native-blocked.cjs +12 -0
  171. package/web/notifications/native-blocked.cjs +12 -0
  172. package/web/notifications/package.json +8 -0
  173. package/web/package.json +8 -0
  174. package/web/records/depth/native-blocked.cjs +12 -0
  175. package/web/records/depth/package.json +8 -0
  176. package/web/records/native-blocked.cjs +12 -0
  177. package/web/records/package.json +8 -0
  178. package/web/televet/native-blocked.cjs +12 -0
  179. package/web/televet/package.json +8 -0
  180. package/dist/ChatController-CKdBvPj2.d.ts +0 -146
  181. package/dist/ChatController-CpUMvvZf.d.cts +0 -146
  182. package/dist/FilePort-BabWrv7I.d.cts +0 -22
  183. package/dist/FilePort-BabWrv7I.d.ts +0 -22
  184. package/dist/petsRepository-BEGb97M9.d.cts +0 -326
  185. package/dist/petsRepository-Bu18r2kK.d.ts +0 -326
  186. package/dist/requestFunnel-DuUH-kAe.d.cts +0 -28
  187. package/dist/requestFunnel-dio5OmR9.d.ts +0 -28
@@ -1,16 +1,21 @@
1
- import { a as EverfurErrorCode } from '../EverfurResult-D92-uL82.cjs';
2
- export { A as AUTO_RETRYABLE_CODES, B as BACKOFF_BASE_MS, b as BACKOFF_CAP_MS, c as EVERFUR_ERROR_CATEGORIES, d as EVERFUR_ERROR_CODES, e as EverfurConfigError, f as EverfurError, g as EverfurErrorCategory, E as EverfurResult, h as EverfurThrownError, M as MAX_RETRY_ATTEMPTS, i as MakeEverfurErrorOptions, R as RETRYABLE_CONTRACT_CODES, j as backoffDelayMs, k as canRecreateOnNotFound, l as categoryFor, m as err, n as fromHttpStatus, o as fromWire, p as isAutoRetryable, q as isErr, r as isOk, s as isRetryableCode, t as makeEverfurError, u as ok, v as shouldRetry, w as unwrap, x as userFacingError } from '../EverfurResult-D92-uL82.cjs';
3
- export { A as AcceptedFrame, b as AnalysisCompleteFrame, c as AnalysisStartedFrame, B as ByteSource, C as ClientConfigFailure, d as ClientConfigFailureReason, e as ClientConfigOutcome, D as DEFAULT_CONTRACT_VERSION, f as DeltaFrame, g as DoneFrame, h as EMPTY_FRAME_ARRAYS, i as ENV_API_BASE_URL, j as ErrorFrame, k as EventSourceFactory, l as EventSourceInit, m as EventSourceLike, n as EventSourceMessage, o as EverfurConfig, E as EverfurRequest, p as EverfurRequestBase, q as FetchInit, a as FetchLike, r as FetchResponseLike, F as Frame, s as FrameBase, t as FrameKind, H as HeartbeatFrame, u as HttpMethod, M as MultipartBody, R as RawResponse, v as ReadableStreamLike, w as ResolvedClientConfig, S as SDK_PLATFORM, x as SDK_VERSION, y as ServerRequestIdSource, z as TransportDeps, T as TransportPort, U as UnknownFrame, G as UrgencyLevel, I as acceptedFrame, J as analysisCompleteFrame, K as analysisStartedFrame, L as assertNever, N as bufferedTextByteSource, O as buildBaseHeaders, P as checkPublishableKey, Q as createHttpTransport, V as deltaFrame, W as doneFrame, X as errorFrame, Y as errorFromResponse, Z as eventSourceByteSource, _ as eventSourceRequestId, $ as fetchByteSource, a0 as getGlobalFetch, a1 as heartbeatFrame, a2 as networkError, a3 as parseSse, a4 as requestIdOf, a5 as requestJson, a6 as requestRaw, a7 as resolveApiBaseUrl, a8 as resolveClientConfig, a9 as tryResolveApiBaseUrl, aa as tryResolveClientConfig, ab as unknownFrame } from '../config-BSjBdxrZ.cjs';
4
- export { B as Brand, C as ClientId, a as ConversationId, D as DocumentId, J as JobId, P as PetRef, R as RecordsRequestId, b as ResponseId, U as UserRef, _ as __brand, c as conversationId, p as petRef, u as unsafeClientId, d as unsafeConversationId, e as unsafeDocumentId, f as unsafeJobId, g as unsafePetRef, h as unsafeRecordsRequestId, i as unsafeResponseId, j as unsafeUserRef, k as userRef } from '../ids-CJ1S6adf.cjs';
5
- export { A as AuthContext, D as DeviceAuth, I as IdentityProvider, T as TokenProvider, a as authHeaders, b as authedSend, c as createIdentityProvider, n as newSessionId, w as withAuthHeaders } from '../identity-Brl-lDd6.cjs';
6
- export { C as CapabilityDecision, a as CapabilityDisabled, b as CapabilityName, D as DecideOptions, c as DisabledLevel, E as EntitlementDecision, L as LevelGrant, R as ResolvedEntitlements, d as decideCapability, e as deniedDecisionsFor, r as requires, f as resolveEntitlements } from '../resolve-Dq_4_agU.cjs';
7
- export { C as ClientBranding, E as ENTITLEMENTS_PATH, a as EVERFUR_DARK, b as EVERFUR_LIGHT, c as EntitlementResolution, d as EverfurColorTokens, e as EverfurFontWeight, f as EverfurLetterSpacingTokens, g as EverfurLineHeightTokens, h as EverfurMotionDurationTokens, i as EverfurMotionTokens, j as EverfurRadiusTokens, k as EverfurSpaceTokens, l as EverfurSpringToken, m as EverfurTextColorTokens, n as EverfurTheme, o as EverfurThemeMeta, p as EverfurTypeSizeTokens, q as EverfurTypeTokens, r as EverfurWeightTokens, F as FetchEntitlementsArgs, P as PET_AGE_YEARS_MAX, s as PET_BREED_MAX, t as PET_NAME_MAX, u as PET_SPECIES_MAX, v as PET_WEIGHT_KG_MAX, w as PetProfileInput, x as PetsRepository, R as RegisteredPet, y as ResolveThemeInput, z as createPetsRepository, A as deepFreeze, B as fetchEntitlements, D as hardenHttpsUrl, G as isEmptyBranding, H as parseClientBranding, I as parseColor, J as readableOn, K as resolveTheme, L as withServerBranding } from '../petsRepository-BEGb97M9.cjs';
8
- import '../requestFunnel-DuUH-kAe.cjs';
1
+ import { b as EverfurErrorCode } from '../EverfurResult-DN9pL2Ab.cjs';
2
+ export { A as AUTO_RETRYABLE_CODES, B as BACKOFF_BASE_MS, k as BACKOFF_CAP_MS, l as EVERFUR_ERROR_CATEGORIES, m as EVERFUR_ERROR_CODES, d as EverfurConfigError, E as EverfurError, a as EverfurErrorCategory, c as EverfurResult, e as EverfurThrownError, M as MAX_RETRY_ATTEMPTS, n as MakeEverfurErrorOptions, R as RETRYABLE_CONTRACT_CODES, o as backoffDelayMs, p as canRecreateOnNotFound, f as categoryFor, q as err, r as fromHttpStatus, s as fromWire, t as isAutoRetryable, i as isErr, g as isOk, h as isRetryableCode, v as makeEverfurError, w as ok, x as shouldRetry, u as unwrap, j as userFacingError } from '../EverfurResult-DN9pL2Ab.cjs';
3
+ export { A as AcceptedFrame, a as AnalysisCompleteFrame, b as AnalysisStartedFrame, B as ByteSource, C as ClientConfigFailure, k as ClientConfigFailureReason, l as ClientConfigOutcome, m as DEFAULT_CONTRACT_VERSION, D as DeltaFrame, c as DoneFrame, n as EMPTY_FRAME_ARRAYS, o as ENV_API_BASE_URL, E as ErrorFrame, p as EventSourceFactory, q as EventSourceInit, r as EventSourceLike, s as EventSourceMessage, t as EverfurConfig, d as EverfurRequest, e as EverfurRequestBase, u as FetchInit, j as FetchLike, v as FetchResponseLike, F as Frame, f as FrameBase, g as FrameKind, H as HeartbeatFrame, h as HttpMethod, M as MultipartBody, R as RawResponse, w as ReadableStreamLike, x as ResolveClientConfigOptions, y as ResolvedClientConfig, S as SDK_PLATFORM, z as SDK_VERSION, G as SdkPlatform, I as ServerRequestIdSource, J as TransportDeps, T as TransportPort, U as UnknownFrame, i as UrgencyLevel, K as acceptedFrame, L as analysisCompleteFrame, N as analysisStartedFrame, O as assertNever, P as bufferedTextByteSource, Q as buildBaseHeaders, V as checkPublishableKey, W as createHttpTransport, X as deltaFrame, Y as doneFrame, Z as errorFrame, _ as errorFromResponse, $ as eventSourceByteSource, a0 as eventSourceRequestId, a1 as fetchByteSource, a2 as getGlobalFetch, a3 as heartbeatFrame, a4 as networkError, a5 as parseSse, a6 as requestIdOf, a7 as requestJson, a8 as requestRaw, a9 as resolveApiBaseUrl, aa as resolveClientConfig, ab as tryResolveApiBaseUrl, ac as tryResolveClientConfig, ad as unknownFrame } from '../config-CzTZGlfF.cjs';
4
+ export { B as Brand, a as ClientId, C as ConversationId, D as DocumentId, J as JobId, P as PetRef, R as RecordsRequestId, b as ResponseId, U as UserRef, _ as __brand, c as conversationId, p as petRef, d as unsafeClientId, e as unsafeConversationId, f as unsafeDocumentId, g as unsafeJobId, h as unsafePetRef, i as unsafeRecordsRequestId, j as unsafeResponseId, k as unsafeUserRef, u as userRef } from '../ids-B2GAAifq.cjs';
5
+ export { A as AuthContext, D as DeviceAuth, I as IdentityProvider, M as MintedToken, T as TokenProvider, a as authHeaders, b as authedSend, c as createIdentityProvider, n as newSessionId, w as withAuthHeaders } from '../identity-DI4eVx9S.cjs';
6
+ export { a as CapabilityDecision, b as CapabilityDisabled, C as CapabilityName, c as DecideOptions, D as DisabledLevel, E as EntitlementDecision, L as LevelGrant, R as ResolvedEntitlements, d as decideCapability, e as deniedDecisionsFor, r as requires, f as resolveEntitlements } from '../resolve-D4Ywz5OS.cjs';
7
+ import { a as EverfurTheme } from '../entitlementRepository-DKdXFgTo.cjs';
8
+ export { C as ClientBranding, D as DEFAULT_MAX_FONT_SCALE, F as EASING_CURVES, G as ENTITLEMENTS_PATH, H as EVERFUR_DARK, I as EVERFUR_LIGHT, J as EntitlementResolution, d as EverfurColorTokens, K as EverfurEasingCurve, b as EverfurFontFaceKey, e as EverfurFontFamilies, E as EverfurFontWeight, f as EverfurLetterSpacingTokens, g as EverfurLineHeightTokens, h as EverfurMotionDurationTokens, i as EverfurMotionTokens, j as EverfurRadiusTokens, k as EverfurSpaceTokens, l as EverfurSpringToken, m as EverfurTextColorTokens, L as EverfurTextScaleTier, n as EverfurThemeFontFaceKey, o as EverfurThemeFontUrlsInput, p as EverfurThemeFontsInput, c as EverfurThemeInput, q as EverfurThemeMeta, r as EverfurThemeSlot, s as EverfurThemeSlotInput, t as EverfurThemeSlotKey, u as EverfurThemeSlotName, v as EverfurThemeSlots, w as EverfurThemeSlotsInput, x as EverfurTypeSizeTokens, y as EverfurTypeTokens, z as EverfurWeightTokens, M as FetchEntitlementsArgs, N as LOCKABLE_THEME_FIELDS, O as LockableThemeField, P as MAX_FONT_SCALE_CEILING, R as RadiusScale, Q as ResolveThemeInput, U as SLOT_LOCK_PREFIX, V as SLOT_MIN_BORDER_CONTRAST, W as SLOT_MIN_CONTRAST, X as SYSTEM_FONT_FAMILY, Y as SYSTEM_MONO_FAMILY, Z as SlotGrounds, _ as SlotLockName, S as SurfaceStyle, $ as TEXT_SCALE_FLOOR, a0 as TEXT_SCALE_TIER_CAPS, a1 as THEME_SCHEMA_VERSIONS, T as THEME_SLOT_KEYS, A as THEME_SLOT_NAMES, a2 as ThemeLockName, a3 as cssCubicBezier, a4 as deepFreeze, a5 as fetchEntitlements, a6 as guardSlotContrast, a7 as hardenHttpsUrl, a8 as isEmptyBranding, a9 as isKnownBrandingSchema, aa as lockedFieldsOf, ab as mergeThemeSlots, ac as parseClientBranding, ad as parseThemeSlots, B as previewTheme, ae as resolveTheme, af as withServerBranding } from '../entitlementRepository-DKdXFgTo.cjs';
9
+ export { F as FunnelSendOptions, R as RequestFunnel, a as RequestFunnelDeps, c as createRequestFunnel } from '../requestFunnel-L-BQfi0z.cjs';
10
+ export { E as EverfurFaceStyle, f as face } from '../typeStyle-0TydiZ1w.cjs';
11
+ export { e as CHECKIN_ANSWERS, f as CasesRepository, C as CheckinAnswer, a as CheckinOutcome, g as PET_AGE_YEARS_MAX, h as PET_BREED_MAX, i as PET_NAME_MAX, j as PET_SPECIES_MAX, k as PET_WEIGHT_KG_MAX, P as PetProfileInput, c as PetProfilePatch, l as PetsRepository, R as RegisteredPet, W as WatchCase, b as WidgetPet, m as createCasesRepository, n as createPetsRepository, w as widgetPetFromWire } from '../casesRepository-DHwtGRYY.cjs';
12
+ import '../ErrorPolicyPort-CNf4uQZP.cjs';
13
+ import '../profile-CSs1wlXT.cjs';
9
14
 
10
15
  /** Which wire shape a code arrives in. The two envelopes are different objects, not casings. */
11
- type ContractErrorEnvelope = "http_envelope" | "sse_frame";
16
+ type ContractErrorEnvelope = "http_envelope" | "oauth_error" | "sse_frame";
12
17
  /** Every wire error code the contract declares, spelled EXACTLY as the server sends it. */
13
- type ContractWireErrorCode = "AccessDeniedException" | "AuthorizationException" | "ConflictException" | "DAILY_QUOTA_EXCEEDED" | "IDEMPOTENCY_KEY_IN_FLIGHT" | "IDEMPOTENCY_KEY_REUSED_DIFFERENT_REQUEST" | "InternalFailureException" | "NotImplementedException" | "PaymentRequiredException" | "ResourceNotFoundException" | "ServiceUnavailableException" | "TIER_UPGRADE_REQUIRED" | "ThrottlingException" | "ValidationException" | "accessDenied" | "authExpired" | "internal_error" | "invalidRequest" | "not_found" | "session_required" | "timeout" | "unavailable";
18
+ type ContractWireErrorCode = "AccessDeniedException" | "AuthorizationException" | "ConflictException" | "DAILY_QUOTA_EXCEEDED" | "FILE_TOO_LARGE" | "IDEMPOTENCY_KEY_IN_FLIGHT" | "IDEMPOTENCY_KEY_REUSED_DIFFERENT_REQUEST" | "INVALID_CONTENT_TYPE" | "InternalFailureException" | "MethodNotAllowedException" | "NotImplementedException" | "PaymentRequiredException" | "ResourceNotFoundException" | "ServiceUnavailableException" | "TIER_UPGRADE_REQUIRED" | "ThrottlingException" | "ValidationException" | "accessDenied" | "access_denied" | "attachment_unreadable" | "authExpired" | "authRejected" | "consent_invalid" | "consent_required" | "consent_scope_wrong_route" | "device_cipher_unavailable" | "email_invalid" | "event_cursor_invalid" | "event_filter_invalid" | "event_payload_invalid" | "event_type_not_available" | "event_type_unknown" | "idempotency_key_invalid" | "idempotency_key_required" | "idempotency_key_reused" | "insufficientCapability" | "insufficient_scope" | "internal_error" | "invalidRequest" | "invalid_client" | "invalid_client_metadata" | "invalid_grant" | "invalid_redirect_uri" | "invalid_request" | "invalid_scope" | "invalid_target" | "mcp_connection_not_found" | "mcp_request_conflict" | "mcp_request_gone" | "mcp_request_not_found" | "not_found" | "partner_visit_link_conflict" | "partner_visit_owner_only" | "partner_visit_pet_already_mapped" | "payload_too_large" | "petRefInUse" | "pet_health_list_removals_unconfirmed" | "pet_health_species_unsupported" | "pet_not_registered" | "provider_unsupported" | "rateLimited" | "record_species_unsupported" | "record_subject_not_found" | "record_upload_invalid" | "records_consent_required" | "sandbox_only" | "session_required" | "share_limit_reached" | "slow_down" | "species_unsupported" | "tenant_filter_invalid" | "tenant_has_no_capabilities" | "tenant_resource_not_found" | "tenant_surface_not_enabled" | "timeout" | "token_invalid" | "unavailable" | "unsupported_grant_type" | "unsupported_response_type" | "verify_mint_rate_limited" | "verify_mint_refused" | "verify_mint_unavailable" | "verify_user_ref_invalid" | "webhook_endpoint_update_empty" | "webhook_endpoint_update_invalid" | "webhook_url_rejected";
14
19
 
15
20
  /** One registry row, reduced to the facts the SDK needs at runtime. */
16
21
  interface ContractErrorRow {
@@ -34,14 +39,23 @@ interface ContractErrorRow {
34
39
  * exhaustive, so a code added to the contract fails `tsc` here rather than silently becoming `unknown`.
35
40
  */
36
41
  declare const CONTRACT_ERROR_ROWS: readonly ContractErrorRow[];
37
- /** The registry row for a raw wire code, or undefined when the code is not in the contract. */
38
- declare function contractErrorFor(wireCode: string | null | undefined): ContractErrorRow | undefined;
42
+ /**
43
+ * The registry row for a raw wire code, or undefined when the code is not in the contract.
44
+ *
45
+ * A code can ride SEVERAL envelopes as one row each (`unavailable`: the 503 body and the SSE frame a partner chat
46
+ * turn ends with). Pass the envelope the code arrived in when it is known (an SSE frame passes `'sse_frame'`) so
47
+ * such a code resolves to its own row; without one the HTTP row answers, as it did before the second row existed,
48
+ * and then every other envelope is searched in a fixed order. A code registered on only one envelope resolves
49
+ * whichever envelope is passed.
50
+ */
51
+ declare function contractErrorFor(wireCode: string | null | undefined, envelope?: ContractErrorEnvelope): ContractErrorRow | undefined;
39
52
  /**
40
53
  * The registry's `doc_url` for a row. SITE-RELATIVE by construction: the contract records that there is
41
54
  * no confirmed public documentation host to prefix it with, so the SDK publishes the path and never
42
55
  * fabricates an origin. The SSE frames are namespaced (`#sse-timeout`) because a frame code and an HTTP
43
- * code can share a name; `tests/contract/errorRegistry.test.ts` asserts this derivation reproduces the
44
- * registry's own `doc_url` for all 22 rows, so the pattern cannot drift unnoticed.
56
+ * code can share a name, and the hosted MCP's OAuth codes the same way (`#oauth-invalid_grant`);
57
+ * `tests/contract/errorRegistry.test.ts` asserts this derivation reproduces the registry's own `doc_url`
58
+ * for every row, so the pattern cannot drift unnoticed.
45
59
  */
46
60
  declare function contractDocUrl(entry: ContractErrorRow): string;
47
61
  /**
@@ -62,4 +76,52 @@ declare const DOC_SITE_ORIGIN: string | null;
62
76
  /** The emitted `docUrl`, or null while no page exists to point at. */
63
77
  declare function publishedDocUrl(entry: ContractErrorRow): string | null;
64
78
 
65
- export { CONTRACT_ERROR_ROWS, type ContractErrorEnvelope, type ContractErrorRow, type ContractWireErrorCode, DOC_SITE_ORIGIN, EverfurErrorCode, contractDocUrl, contractErrorFor, publishedDocUrl };
79
+ /**
80
+ * Parse a permissive colour into a normalized string (`#RRGGBB` when opaque, else `rgba(r,g,b,a)`), or null.
81
+ * Accepts `#RGB`, `#RRGGBB`, `#AARRGGBB`, `0xAARRGGBB` (string), a 32-bit ARGB `int`, and `rgb()/rgba()`.
82
+ * An empty string, whitespace, or an unrecognized value yields null.
83
+ */
84
+ declare function parseColor(value: unknown): string | null;
85
+ /**
86
+ * Return the more legible of near-black / white for `background` (WCAG 2.x contrast). Ported from Flutter
87
+ * `_readableOn`. Falls back to white for an unparseable background (never throws).
88
+ */
89
+ declare function readableOn(background: string): string;
90
+ /**
91
+ * The WCAG contrast ratio between two colours (1..21). A translucent colour is composited onto the other before
92
+ * measuring, since that is what the eye sees. An unparseable colour measures as 1 (no contrast), never throws.
93
+ */
94
+ declare function contrastRatio(a: string, b: string): number;
95
+
96
+ /** The SDK's dark `surfaceCream` (EVERFUR_DARK.color.surfaceCream): what the variant must read on. */
97
+ declare const DARK_VARIANT_GROUND = "#23272C";
98
+ /** The ratio the variant must reach on that ground and under the better of the two SDK inks (WCAG AA). */
99
+ declare const DARK_VARIANT_TARGET_RATIO = 4.5;
100
+ /** The tint band the lightness is clamped into, and the step it climbs by (HSL lightness, 0..1). */
101
+ declare const DARK_VARIANT_LIGHTNESS_FLOOR = 0.6;
102
+ declare const DARK_VARIANT_LIGHTNESS_CEILING = 0.9;
103
+ declare const DARK_VARIANT_LIGHTNESS_STEP = 0.02;
104
+ /**
105
+ * The dark-scheme twin of a light branding colour. The algorithm, step for step (the backend docstring is the
106
+ * reference; tests/unit/fixtures/dark_variant_vectors.json is the acceptance test):
107
+ * 1. parse the colour (any form `parseColor` reads; the backend takes `#RRGGBB` only);
108
+ * 2. HSL; keep h and s;
109
+ * 3. clamp l into 0.60..0.90 (a dark brand colour is lifted to the floor; a mid or light one keeps its
110
+ * lightness, capped);
111
+ * 4. for l_i = l_dark + i * 0.02 while l_i <= 0.90, return the first candidate that reaches 4.5:1 on the dark
112
+ * surface AND 4.5:1 under the better of white / near-black;
113
+ * 5. else the colour at the ceiling.
114
+ * Uppercase `#RRGGBB`; null for an unparseable colour (the backend raises there). Idempotent.
115
+ */
116
+ declare function deriveDarkVariant(color: string): string | null;
117
+ /** The ratio text and borders are pushed toward under `prefers-contrast: more` (WCAG AAA body text). */
118
+ declare const HIGH_CONTRAST_TARGET_RATIO = 7;
119
+ /**
120
+ * The high-contrast derivation of a resolved theme. Text tokens and borders reach `HIGH_CONTRAST_TARGET_RATIO` on
121
+ * the palette's hardest surface (pushed toward black on light, white on dark); translucent washes become solid
122
+ * fills over `surface`. `onPrimary`/`onAccent` are left as the resolver computed them (already the legible pole).
123
+ * Pure: a new deeply-frozen theme with `highContrast: true`; the input is never mutated. Idempotent.
124
+ */
125
+ declare function deriveHighContrast(theme: EverfurTheme): EverfurTheme;
126
+
127
+ export { CONTRACT_ERROR_ROWS, type ContractErrorEnvelope, type ContractErrorRow, type ContractWireErrorCode, DARK_VARIANT_GROUND, DARK_VARIANT_LIGHTNESS_CEILING, DARK_VARIANT_LIGHTNESS_FLOOR, DARK_VARIANT_LIGHTNESS_STEP, DARK_VARIANT_TARGET_RATIO, DOC_SITE_ORIGIN, EverfurErrorCode, EverfurTheme, HIGH_CONTRAST_TARGET_RATIO, contractDocUrl, contractErrorFor, contrastRatio, deriveDarkVariant, deriveHighContrast, parseColor, publishedDocUrl, readableOn };
@@ -1,16 +1,21 @@
1
- import { a as EverfurErrorCode } from '../EverfurResult-D92-uL82.js';
2
- export { A as AUTO_RETRYABLE_CODES, B as BACKOFF_BASE_MS, b as BACKOFF_CAP_MS, c as EVERFUR_ERROR_CATEGORIES, d as EVERFUR_ERROR_CODES, e as EverfurConfigError, f as EverfurError, g as EverfurErrorCategory, E as EverfurResult, h as EverfurThrownError, M as MAX_RETRY_ATTEMPTS, i as MakeEverfurErrorOptions, R as RETRYABLE_CONTRACT_CODES, j as backoffDelayMs, k as canRecreateOnNotFound, l as categoryFor, m as err, n as fromHttpStatus, o as fromWire, p as isAutoRetryable, q as isErr, r as isOk, s as isRetryableCode, t as makeEverfurError, u as ok, v as shouldRetry, w as unwrap, x as userFacingError } from '../EverfurResult-D92-uL82.js';
3
- export { A as AcceptedFrame, b as AnalysisCompleteFrame, c as AnalysisStartedFrame, B as ByteSource, C as ClientConfigFailure, d as ClientConfigFailureReason, e as ClientConfigOutcome, D as DEFAULT_CONTRACT_VERSION, f as DeltaFrame, g as DoneFrame, h as EMPTY_FRAME_ARRAYS, i as ENV_API_BASE_URL, j as ErrorFrame, k as EventSourceFactory, l as EventSourceInit, m as EventSourceLike, n as EventSourceMessage, o as EverfurConfig, E as EverfurRequest, p as EverfurRequestBase, q as FetchInit, a as FetchLike, r as FetchResponseLike, F as Frame, s as FrameBase, t as FrameKind, H as HeartbeatFrame, u as HttpMethod, M as MultipartBody, R as RawResponse, v as ReadableStreamLike, w as ResolvedClientConfig, S as SDK_PLATFORM, x as SDK_VERSION, y as ServerRequestIdSource, z as TransportDeps, T as TransportPort, U as UnknownFrame, G as UrgencyLevel, I as acceptedFrame, J as analysisCompleteFrame, K as analysisStartedFrame, L as assertNever, N as bufferedTextByteSource, O as buildBaseHeaders, P as checkPublishableKey, Q as createHttpTransport, V as deltaFrame, W as doneFrame, X as errorFrame, Y as errorFromResponse, Z as eventSourceByteSource, _ as eventSourceRequestId, $ as fetchByteSource, a0 as getGlobalFetch, a1 as heartbeatFrame, a2 as networkError, a3 as parseSse, a4 as requestIdOf, a5 as requestJson, a6 as requestRaw, a7 as resolveApiBaseUrl, a8 as resolveClientConfig, a9 as tryResolveApiBaseUrl, aa as tryResolveClientConfig, ab as unknownFrame } from '../config-CiJ0PVBB.js';
4
- export { B as Brand, C as ClientId, a as ConversationId, D as DocumentId, J as JobId, P as PetRef, R as RecordsRequestId, b as ResponseId, U as UserRef, _ as __brand, c as conversationId, p as petRef, u as unsafeClientId, d as unsafeConversationId, e as unsafeDocumentId, f as unsafeJobId, g as unsafePetRef, h as unsafeRecordsRequestId, i as unsafeResponseId, j as unsafeUserRef, k as userRef } from '../ids-CJ1S6adf.js';
5
- export { A as AuthContext, D as DeviceAuth, I as IdentityProvider, T as TokenProvider, a as authHeaders, b as authedSend, c as createIdentityProvider, n as newSessionId, w as withAuthHeaders } from '../identity-DK9zORrG.js';
6
- export { C as CapabilityDecision, a as CapabilityDisabled, b as CapabilityName, D as DecideOptions, c as DisabledLevel, E as EntitlementDecision, L as LevelGrant, R as ResolvedEntitlements, d as decideCapability, e as deniedDecisionsFor, r as requires, f as resolveEntitlements } from '../resolve-Dq_4_agU.js';
7
- export { C as ClientBranding, E as ENTITLEMENTS_PATH, a as EVERFUR_DARK, b as EVERFUR_LIGHT, c as EntitlementResolution, d as EverfurColorTokens, e as EverfurFontWeight, f as EverfurLetterSpacingTokens, g as EverfurLineHeightTokens, h as EverfurMotionDurationTokens, i as EverfurMotionTokens, j as EverfurRadiusTokens, k as EverfurSpaceTokens, l as EverfurSpringToken, m as EverfurTextColorTokens, n as EverfurTheme, o as EverfurThemeMeta, p as EverfurTypeSizeTokens, q as EverfurTypeTokens, r as EverfurWeightTokens, F as FetchEntitlementsArgs, P as PET_AGE_YEARS_MAX, s as PET_BREED_MAX, t as PET_NAME_MAX, u as PET_SPECIES_MAX, v as PET_WEIGHT_KG_MAX, w as PetProfileInput, x as PetsRepository, R as RegisteredPet, y as ResolveThemeInput, z as createPetsRepository, A as deepFreeze, B as fetchEntitlements, D as hardenHttpsUrl, G as isEmptyBranding, H as parseClientBranding, I as parseColor, J as readableOn, K as resolveTheme, L as withServerBranding } from '../petsRepository-Bu18r2kK.js';
8
- import '../requestFunnel-dio5OmR9.js';
1
+ import { b as EverfurErrorCode } from '../EverfurResult-DN9pL2Ab.js';
2
+ export { A as AUTO_RETRYABLE_CODES, B as BACKOFF_BASE_MS, k as BACKOFF_CAP_MS, l as EVERFUR_ERROR_CATEGORIES, m as EVERFUR_ERROR_CODES, d as EverfurConfigError, E as EverfurError, a as EverfurErrorCategory, c as EverfurResult, e as EverfurThrownError, M as MAX_RETRY_ATTEMPTS, n as MakeEverfurErrorOptions, R as RETRYABLE_CONTRACT_CODES, o as backoffDelayMs, p as canRecreateOnNotFound, f as categoryFor, q as err, r as fromHttpStatus, s as fromWire, t as isAutoRetryable, i as isErr, g as isOk, h as isRetryableCode, v as makeEverfurError, w as ok, x as shouldRetry, u as unwrap, j as userFacingError } from '../EverfurResult-DN9pL2Ab.js';
3
+ export { A as AcceptedFrame, a as AnalysisCompleteFrame, b as AnalysisStartedFrame, B as ByteSource, C as ClientConfigFailure, k as ClientConfigFailureReason, l as ClientConfigOutcome, m as DEFAULT_CONTRACT_VERSION, D as DeltaFrame, c as DoneFrame, n as EMPTY_FRAME_ARRAYS, o as ENV_API_BASE_URL, E as ErrorFrame, p as EventSourceFactory, q as EventSourceInit, r as EventSourceLike, s as EventSourceMessage, t as EverfurConfig, d as EverfurRequest, e as EverfurRequestBase, u as FetchInit, j as FetchLike, v as FetchResponseLike, F as Frame, f as FrameBase, g as FrameKind, H as HeartbeatFrame, h as HttpMethod, M as MultipartBody, R as RawResponse, w as ReadableStreamLike, x as ResolveClientConfigOptions, y as ResolvedClientConfig, S as SDK_PLATFORM, z as SDK_VERSION, G as SdkPlatform, I as ServerRequestIdSource, J as TransportDeps, T as TransportPort, U as UnknownFrame, i as UrgencyLevel, K as acceptedFrame, L as analysisCompleteFrame, N as analysisStartedFrame, O as assertNever, P as bufferedTextByteSource, Q as buildBaseHeaders, V as checkPublishableKey, W as createHttpTransport, X as deltaFrame, Y as doneFrame, Z as errorFrame, _ as errorFromResponse, $ as eventSourceByteSource, a0 as eventSourceRequestId, a1 as fetchByteSource, a2 as getGlobalFetch, a3 as heartbeatFrame, a4 as networkError, a5 as parseSse, a6 as requestIdOf, a7 as requestJson, a8 as requestRaw, a9 as resolveApiBaseUrl, aa as resolveClientConfig, ab as tryResolveApiBaseUrl, ac as tryResolveClientConfig, ad as unknownFrame } from '../config-DW60uRb9.js';
4
+ export { B as Brand, a as ClientId, C as ConversationId, D as DocumentId, J as JobId, P as PetRef, R as RecordsRequestId, b as ResponseId, U as UserRef, _ as __brand, c as conversationId, p as petRef, d as unsafeClientId, e as unsafeConversationId, f as unsafeDocumentId, g as unsafeJobId, h as unsafePetRef, i as unsafeRecordsRequestId, j as unsafeResponseId, k as unsafeUserRef, u as userRef } from '../ids-B2GAAifq.js';
5
+ export { A as AuthContext, D as DeviceAuth, I as IdentityProvider, M as MintedToken, T as TokenProvider, a as authHeaders, b as authedSend, c as createIdentityProvider, n as newSessionId, w as withAuthHeaders } from '../identity-BMx2SUOM.js';
6
+ export { a as CapabilityDecision, b as CapabilityDisabled, C as CapabilityName, c as DecideOptions, D as DisabledLevel, E as EntitlementDecision, L as LevelGrant, R as ResolvedEntitlements, d as decideCapability, e as deniedDecisionsFor, r as requires, f as resolveEntitlements } from '../resolve-D4Ywz5OS.js';
7
+ import { a as EverfurTheme } from '../entitlementRepository-DSbzuyAW.js';
8
+ export { C as ClientBranding, D as DEFAULT_MAX_FONT_SCALE, F as EASING_CURVES, G as ENTITLEMENTS_PATH, H as EVERFUR_DARK, I as EVERFUR_LIGHT, J as EntitlementResolution, d as EverfurColorTokens, K as EverfurEasingCurve, b as EverfurFontFaceKey, e as EverfurFontFamilies, E as EverfurFontWeight, f as EverfurLetterSpacingTokens, g as EverfurLineHeightTokens, h as EverfurMotionDurationTokens, i as EverfurMotionTokens, j as EverfurRadiusTokens, k as EverfurSpaceTokens, l as EverfurSpringToken, m as EverfurTextColorTokens, L as EverfurTextScaleTier, n as EverfurThemeFontFaceKey, o as EverfurThemeFontUrlsInput, p as EverfurThemeFontsInput, c as EverfurThemeInput, q as EverfurThemeMeta, r as EverfurThemeSlot, s as EverfurThemeSlotInput, t as EverfurThemeSlotKey, u as EverfurThemeSlotName, v as EverfurThemeSlots, w as EverfurThemeSlotsInput, x as EverfurTypeSizeTokens, y as EverfurTypeTokens, z as EverfurWeightTokens, M as FetchEntitlementsArgs, N as LOCKABLE_THEME_FIELDS, O as LockableThemeField, P as MAX_FONT_SCALE_CEILING, R as RadiusScale, Q as ResolveThemeInput, U as SLOT_LOCK_PREFIX, V as SLOT_MIN_BORDER_CONTRAST, W as SLOT_MIN_CONTRAST, X as SYSTEM_FONT_FAMILY, Y as SYSTEM_MONO_FAMILY, Z as SlotGrounds, _ as SlotLockName, S as SurfaceStyle, $ as TEXT_SCALE_FLOOR, a0 as TEXT_SCALE_TIER_CAPS, a1 as THEME_SCHEMA_VERSIONS, T as THEME_SLOT_KEYS, A as THEME_SLOT_NAMES, a2 as ThemeLockName, a3 as cssCubicBezier, a4 as deepFreeze, a5 as fetchEntitlements, a6 as guardSlotContrast, a7 as hardenHttpsUrl, a8 as isEmptyBranding, a9 as isKnownBrandingSchema, aa as lockedFieldsOf, ab as mergeThemeSlots, ac as parseClientBranding, ad as parseThemeSlots, B as previewTheme, ae as resolveTheme, af as withServerBranding } from '../entitlementRepository-DSbzuyAW.js';
9
+ export { F as FunnelSendOptions, R as RequestFunnel, a as RequestFunnelDeps, c as createRequestFunnel } from '../requestFunnel-CjW7uDuA.js';
10
+ export { E as EverfurFaceStyle, f as face } from '../typeStyle-CWMsoe6b.js';
11
+ export { e as CHECKIN_ANSWERS, f as CasesRepository, C as CheckinAnswer, a as CheckinOutcome, g as PET_AGE_YEARS_MAX, h as PET_BREED_MAX, i as PET_NAME_MAX, j as PET_SPECIES_MAX, k as PET_WEIGHT_KG_MAX, P as PetProfileInput, c as PetProfilePatch, l as PetsRepository, R as RegisteredPet, W as WatchCase, b as WidgetPet, m as createCasesRepository, n as createPetsRepository, w as widgetPetFromWire } from '../casesRepository-ClLv6qMl.js';
12
+ import '../ErrorPolicyPort-CwbfmxzJ.js';
13
+ import '../profile-CSs1wlXT.js';
9
14
 
10
15
  /** Which wire shape a code arrives in. The two envelopes are different objects, not casings. */
11
- type ContractErrorEnvelope = "http_envelope" | "sse_frame";
16
+ type ContractErrorEnvelope = "http_envelope" | "oauth_error" | "sse_frame";
12
17
  /** Every wire error code the contract declares, spelled EXACTLY as the server sends it. */
13
- type ContractWireErrorCode = "AccessDeniedException" | "AuthorizationException" | "ConflictException" | "DAILY_QUOTA_EXCEEDED" | "IDEMPOTENCY_KEY_IN_FLIGHT" | "IDEMPOTENCY_KEY_REUSED_DIFFERENT_REQUEST" | "InternalFailureException" | "NotImplementedException" | "PaymentRequiredException" | "ResourceNotFoundException" | "ServiceUnavailableException" | "TIER_UPGRADE_REQUIRED" | "ThrottlingException" | "ValidationException" | "accessDenied" | "authExpired" | "internal_error" | "invalidRequest" | "not_found" | "session_required" | "timeout" | "unavailable";
18
+ type ContractWireErrorCode = "AccessDeniedException" | "AuthorizationException" | "ConflictException" | "DAILY_QUOTA_EXCEEDED" | "FILE_TOO_LARGE" | "IDEMPOTENCY_KEY_IN_FLIGHT" | "IDEMPOTENCY_KEY_REUSED_DIFFERENT_REQUEST" | "INVALID_CONTENT_TYPE" | "InternalFailureException" | "MethodNotAllowedException" | "NotImplementedException" | "PaymentRequiredException" | "ResourceNotFoundException" | "ServiceUnavailableException" | "TIER_UPGRADE_REQUIRED" | "ThrottlingException" | "ValidationException" | "accessDenied" | "access_denied" | "attachment_unreadable" | "authExpired" | "authRejected" | "consent_invalid" | "consent_required" | "consent_scope_wrong_route" | "device_cipher_unavailable" | "email_invalid" | "event_cursor_invalid" | "event_filter_invalid" | "event_payload_invalid" | "event_type_not_available" | "event_type_unknown" | "idempotency_key_invalid" | "idempotency_key_required" | "idempotency_key_reused" | "insufficientCapability" | "insufficient_scope" | "internal_error" | "invalidRequest" | "invalid_client" | "invalid_client_metadata" | "invalid_grant" | "invalid_redirect_uri" | "invalid_request" | "invalid_scope" | "invalid_target" | "mcp_connection_not_found" | "mcp_request_conflict" | "mcp_request_gone" | "mcp_request_not_found" | "not_found" | "partner_visit_link_conflict" | "partner_visit_owner_only" | "partner_visit_pet_already_mapped" | "payload_too_large" | "petRefInUse" | "pet_health_list_removals_unconfirmed" | "pet_health_species_unsupported" | "pet_not_registered" | "provider_unsupported" | "rateLimited" | "record_species_unsupported" | "record_subject_not_found" | "record_upload_invalid" | "records_consent_required" | "sandbox_only" | "session_required" | "share_limit_reached" | "slow_down" | "species_unsupported" | "tenant_filter_invalid" | "tenant_has_no_capabilities" | "tenant_resource_not_found" | "tenant_surface_not_enabled" | "timeout" | "token_invalid" | "unavailable" | "unsupported_grant_type" | "unsupported_response_type" | "verify_mint_rate_limited" | "verify_mint_refused" | "verify_mint_unavailable" | "verify_user_ref_invalid" | "webhook_endpoint_update_empty" | "webhook_endpoint_update_invalid" | "webhook_url_rejected";
14
19
 
15
20
  /** One registry row, reduced to the facts the SDK needs at runtime. */
16
21
  interface ContractErrorRow {
@@ -34,14 +39,23 @@ interface ContractErrorRow {
34
39
  * exhaustive, so a code added to the contract fails `tsc` here rather than silently becoming `unknown`.
35
40
  */
36
41
  declare const CONTRACT_ERROR_ROWS: readonly ContractErrorRow[];
37
- /** The registry row for a raw wire code, or undefined when the code is not in the contract. */
38
- declare function contractErrorFor(wireCode: string | null | undefined): ContractErrorRow | undefined;
42
+ /**
43
+ * The registry row for a raw wire code, or undefined when the code is not in the contract.
44
+ *
45
+ * A code can ride SEVERAL envelopes as one row each (`unavailable`: the 503 body and the SSE frame a partner chat
46
+ * turn ends with). Pass the envelope the code arrived in when it is known (an SSE frame passes `'sse_frame'`) so
47
+ * such a code resolves to its own row; without one the HTTP row answers, as it did before the second row existed,
48
+ * and then every other envelope is searched in a fixed order. A code registered on only one envelope resolves
49
+ * whichever envelope is passed.
50
+ */
51
+ declare function contractErrorFor(wireCode: string | null | undefined, envelope?: ContractErrorEnvelope): ContractErrorRow | undefined;
39
52
  /**
40
53
  * The registry's `doc_url` for a row. SITE-RELATIVE by construction: the contract records that there is
41
54
  * no confirmed public documentation host to prefix it with, so the SDK publishes the path and never
42
55
  * fabricates an origin. The SSE frames are namespaced (`#sse-timeout`) because a frame code and an HTTP
43
- * code can share a name; `tests/contract/errorRegistry.test.ts` asserts this derivation reproduces the
44
- * registry's own `doc_url` for all 22 rows, so the pattern cannot drift unnoticed.
56
+ * code can share a name, and the hosted MCP's OAuth codes the same way (`#oauth-invalid_grant`);
57
+ * `tests/contract/errorRegistry.test.ts` asserts this derivation reproduces the registry's own `doc_url`
58
+ * for every row, so the pattern cannot drift unnoticed.
45
59
  */
46
60
  declare function contractDocUrl(entry: ContractErrorRow): string;
47
61
  /**
@@ -62,4 +76,52 @@ declare const DOC_SITE_ORIGIN: string | null;
62
76
  /** The emitted `docUrl`, or null while no page exists to point at. */
63
77
  declare function publishedDocUrl(entry: ContractErrorRow): string | null;
64
78
 
65
- export { CONTRACT_ERROR_ROWS, type ContractErrorEnvelope, type ContractErrorRow, type ContractWireErrorCode, DOC_SITE_ORIGIN, EverfurErrorCode, contractDocUrl, contractErrorFor, publishedDocUrl };
79
+ /**
80
+ * Parse a permissive colour into a normalized string (`#RRGGBB` when opaque, else `rgba(r,g,b,a)`), or null.
81
+ * Accepts `#RGB`, `#RRGGBB`, `#AARRGGBB`, `0xAARRGGBB` (string), a 32-bit ARGB `int`, and `rgb()/rgba()`.
82
+ * An empty string, whitespace, or an unrecognized value yields null.
83
+ */
84
+ declare function parseColor(value: unknown): string | null;
85
+ /**
86
+ * Return the more legible of near-black / white for `background` (WCAG 2.x contrast). Ported from Flutter
87
+ * `_readableOn`. Falls back to white for an unparseable background (never throws).
88
+ */
89
+ declare function readableOn(background: string): string;
90
+ /**
91
+ * The WCAG contrast ratio between two colours (1..21). A translucent colour is composited onto the other before
92
+ * measuring, since that is what the eye sees. An unparseable colour measures as 1 (no contrast), never throws.
93
+ */
94
+ declare function contrastRatio(a: string, b: string): number;
95
+
96
+ /** The SDK's dark `surfaceCream` (EVERFUR_DARK.color.surfaceCream): what the variant must read on. */
97
+ declare const DARK_VARIANT_GROUND = "#23272C";
98
+ /** The ratio the variant must reach on that ground and under the better of the two SDK inks (WCAG AA). */
99
+ declare const DARK_VARIANT_TARGET_RATIO = 4.5;
100
+ /** The tint band the lightness is clamped into, and the step it climbs by (HSL lightness, 0..1). */
101
+ declare const DARK_VARIANT_LIGHTNESS_FLOOR = 0.6;
102
+ declare const DARK_VARIANT_LIGHTNESS_CEILING = 0.9;
103
+ declare const DARK_VARIANT_LIGHTNESS_STEP = 0.02;
104
+ /**
105
+ * The dark-scheme twin of a light branding colour. The algorithm, step for step (the backend docstring is the
106
+ * reference; tests/unit/fixtures/dark_variant_vectors.json is the acceptance test):
107
+ * 1. parse the colour (any form `parseColor` reads; the backend takes `#RRGGBB` only);
108
+ * 2. HSL; keep h and s;
109
+ * 3. clamp l into 0.60..0.90 (a dark brand colour is lifted to the floor; a mid or light one keeps its
110
+ * lightness, capped);
111
+ * 4. for l_i = l_dark + i * 0.02 while l_i <= 0.90, return the first candidate that reaches 4.5:1 on the dark
112
+ * surface AND 4.5:1 under the better of white / near-black;
113
+ * 5. else the colour at the ceiling.
114
+ * Uppercase `#RRGGBB`; null for an unparseable colour (the backend raises there). Idempotent.
115
+ */
116
+ declare function deriveDarkVariant(color: string): string | null;
117
+ /** The ratio text and borders are pushed toward under `prefers-contrast: more` (WCAG AAA body text). */
118
+ declare const HIGH_CONTRAST_TARGET_RATIO = 7;
119
+ /**
120
+ * The high-contrast derivation of a resolved theme. Text tokens and borders reach `HIGH_CONTRAST_TARGET_RATIO` on
121
+ * the palette's hardest surface (pushed toward black on light, white on dark); translucent washes become solid
122
+ * fills over `surface`. `onPrimary`/`onAccent` are left as the resolver computed them (already the legible pole).
123
+ * Pure: a new deeply-frozen theme with `highContrast: true`; the input is never mutated. Idempotent.
124
+ */
125
+ declare function deriveHighContrast(theme: EverfurTheme): EverfurTheme;
126
+
127
+ export { CONTRACT_ERROR_ROWS, type ContractErrorEnvelope, type ContractErrorRow, type ContractWireErrorCode, DARK_VARIANT_GROUND, DARK_VARIANT_LIGHTNESS_CEILING, DARK_VARIANT_LIGHTNESS_FLOOR, DARK_VARIANT_LIGHTNESS_STEP, DARK_VARIANT_TARGET_RATIO, DOC_SITE_ORIGIN, EverfurErrorCode, EverfurTheme, HIGH_CONTRAST_TARGET_RATIO, contractDocUrl, contractErrorFor, contrastRatio, deriveDarkVariant, deriveHighContrast, parseColor, publishedDocUrl, readableOn };