@lssm/lib.communication-spec 3.1.1

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 (309) hide show
  1. package/README.md +201 -0
  2. package/dist/browser/capabilities/comms-ai.capabilities.js +1 -0
  3. package/dist/browser/capabilities/communication-os.capability-ids.js +1 -0
  4. package/dist/browser/capabilities/ecosystem-messaging.capabilities.js +1 -0
  5. package/dist/browser/capabilities/index.js +1 -0
  6. package/dist/browser/commands/comms-ai.commands.js +1 -0
  7. package/dist/browser/commands/index.js +1 -0
  8. package/dist/browser/contracts/agent-communication.js +1 -0
  9. package/dist/browser/contracts/agent-lifecycle-projection.js +1 -0
  10. package/dist/browser/contracts/agent-surface-control.js +1 -0
  11. package/dist/browser/contracts/ai-assistance.operations.js +1 -0
  12. package/dist/browser/contracts/artifact-digest.js +1 -0
  13. package/dist/browser/contracts/canonical-agent-conversation.js +1 -0
  14. package/dist/browser/contracts/channel-preferences.js +1 -0
  15. package/dist/browser/contracts/channel-routing.js +1 -0
  16. package/dist/browser/contracts/collaboration.operations.js +1 -0
  17. package/dist/browser/contracts/customer-live-chat-grant.operations.js +1 -0
  18. package/dist/browser/contracts/delivery-eligibility.js +1 -0
  19. package/dist/browser/contracts/delivery-fallback-eligibility-validation.js +1 -0
  20. package/dist/browser/contracts/delivery-fallback-validation.js +1 -0
  21. package/dist/browser/contracts/delivery-fallback.js +1 -0
  22. package/dist/browser/contracts/delivery-intent-validation.js +1 -0
  23. package/dist/browser/contracts/delivery-intent.js +1 -0
  24. package/dist/browser/contracts/delivery-progress.js +1 -0
  25. package/dist/browser/contracts/discord-community-intelligence.operations.js +1 -0
  26. package/dist/browser/contracts/discord-community.events.js +1 -0
  27. package/dist/browser/contracts/discord-community.models.js +1 -0
  28. package/dist/browser/contracts/discord-community.operations.js +1 -0
  29. package/dist/browser/contracts/ecosystem-attachment.operations.js +1 -0
  30. package/dist/browser/contracts/ecosystem-auth.operations.js +1 -0
  31. package/dist/browser/contracts/ecosystem-binding.operations.js +1 -0
  32. package/dist/browser/contracts/ecosystem-connection-subscription.events.js +1 -0
  33. package/dist/browser/contracts/ecosystem-governed-work-v2.operations.js +1 -0
  34. package/dist/browser/contracts/ecosystem-governed-work.operations.js +1 -0
  35. package/dist/browser/contracts/ecosystem-identity-v3.operations.js +1 -0
  36. package/dist/browser/contracts/ecosystem-identity.operations.js +1 -0
  37. package/dist/browser/contracts/ecosystem-message.operations.js +1 -0
  38. package/dist/browser/contracts/ecosystem-messaging.dtos.js +0 -0
  39. package/dist/browser/contracts/ecosystem-messaging.events.js +1 -0
  40. package/dist/browser/contracts/ecosystem-messaging.models.js +1 -0
  41. package/dist/browser/contracts/ecosystem-navigation-v3.operations.js +1 -0
  42. package/dist/browser/contracts/ecosystem-webhook.operations.js +1 -0
  43. package/dist/browser/contracts/ecosystem-workspace.operations.js +1 -0
  44. package/dist/browser/contracts/enums.js +1 -0
  45. package/dist/browser/contracts/erasure.operations.js +1 -0
  46. package/dist/browser/contracts/events.js +1 -0
  47. package/dist/browser/contracts/index.js +1 -0
  48. package/dist/browser/contracts/ingestion.js +1 -0
  49. package/dist/browser/contracts/ingress-admission-policy.js +1 -0
  50. package/dist/browser/contracts/ingress-admission.js +1 -0
  51. package/dist/browser/contracts/models.js +1 -0
  52. package/dist/browser/contracts/operations.js +1 -0
  53. package/dist/browser/contracts/persistence.js +1 -0
  54. package/dist/browser/contracts/preference-resolution.js +1 -0
  55. package/dist/browser/contracts/query.operations.js +1 -0
  56. package/dist/browser/contracts/sequence-intent.js +1 -0
  57. package/dist/browser/contracts/sovereignty.js +1 -0
  58. package/dist/browser/contracts/support-internal-note.operations.js +1 -0
  59. package/dist/browser/contracts/thread-link-kind.js +1 -0
  60. package/dist/browser/contracts/thread-message.operations.js +1 -0
  61. package/dist/browser/events/index.js +1 -0
  62. package/dist/browser/fixtures/agent-omnichannel-primitives.js +1 -0
  63. package/dist/browser/fixtures/agent-omnichannel.js +1 -0
  64. package/dist/browser/fixtures/gtm-learning-loop-neutral.parts.js +1 -0
  65. package/dist/browser/fixtures/index.js +1 -0
  66. package/dist/browser/fixtures/normalized-ingestion.js +1 -0
  67. package/dist/browser/index.js +1 -0
  68. package/dist/browser/queries/index.js +1 -0
  69. package/dist/browser/types/domain-command.js +0 -0
  70. package/dist/browser/types/index.js +1 -0
  71. package/dist/browser/validation/domain-command.js +1 -0
  72. package/dist/browser/validation/index.js +1 -0
  73. package/dist/capabilities/comms-ai.capabilities.d.ts +72 -0
  74. package/dist/capabilities/comms-ai.capabilities.js +2 -0
  75. package/dist/capabilities/communication-os-capability-boundary.test.d.ts +1 -0
  76. package/dist/capabilities/communication-os.capability-ids.d.ts +39 -0
  77. package/dist/capabilities/communication-os.capability-ids.js +2 -0
  78. package/dist/capabilities/communication-os.capability-ids.test.d.ts +1 -0
  79. package/dist/capabilities/ecosystem-messaging.capabilities.d.ts +9 -0
  80. package/dist/capabilities/ecosystem-messaging.capabilities.js +2 -0
  81. package/dist/capabilities/index.d.ts +4 -0
  82. package/dist/capabilities/index.js +2 -0
  83. package/dist/commands/comms-ai.commands.d.ts +272 -0
  84. package/dist/commands/comms-ai.commands.js +2 -0
  85. package/dist/commands/index.d.ts +10 -0
  86. package/dist/commands/index.js +2 -0
  87. package/dist/contracts/agent-communication.d.ts +108 -0
  88. package/dist/contracts/agent-communication.js +2 -0
  89. package/dist/contracts/agent-communication.test.d.ts +1 -0
  90. package/dist/contracts/agent-lifecycle-projection.d.ts +98 -0
  91. package/dist/contracts/agent-lifecycle-projection.js +2 -0
  92. package/dist/contracts/agent-lifecycle-projection.test.d.ts +1 -0
  93. package/dist/contracts/agent-surface-control.d.ts +210 -0
  94. package/dist/contracts/agent-surface-control.js +2 -0
  95. package/dist/contracts/agent-surface-control.test.d.ts +1 -0
  96. package/dist/contracts/ai-assistance.operations.d.ts +187 -0
  97. package/dist/contracts/ai-assistance.operations.js +2 -0
  98. package/dist/contracts/artifact-digest.d.ts +3 -0
  99. package/dist/contracts/artifact-digest.js +2 -0
  100. package/dist/contracts/canonical-agent-conversation.d.ts +46 -0
  101. package/dist/contracts/canonical-agent-conversation.js +2 -0
  102. package/dist/contracts/canonical-agent-conversation.test.d.ts +1 -0
  103. package/dist/contracts/channel-preferences.d.ts +115 -0
  104. package/dist/contracts/channel-preferences.js +2 -0
  105. package/dist/contracts/channel-routing.d.ts +58 -0
  106. package/dist/contracts/channel-routing.js +2 -0
  107. package/dist/contracts/channel-routing.test.d.ts +1 -0
  108. package/dist/contracts/collaboration.operations.d.ts +315 -0
  109. package/dist/contracts/collaboration.operations.js +2 -0
  110. package/dist/contracts/customer-live-chat-grant.operations.d.ts +132 -0
  111. package/dist/contracts/customer-live-chat-grant.operations.js +2 -0
  112. package/dist/contracts/delivery-contracts.test.d.ts +1 -0
  113. package/dist/contracts/delivery-eligibility.d.ts +126 -0
  114. package/dist/contracts/delivery-eligibility.js +2 -0
  115. package/dist/contracts/delivery-eligibility.test.d.ts +1 -0
  116. package/dist/contracts/delivery-fallback-eligibility-validation.d.ts +6 -0
  117. package/dist/contracts/delivery-fallback-eligibility-validation.js +2 -0
  118. package/dist/contracts/delivery-fallback-validation.d.ts +24 -0
  119. package/dist/contracts/delivery-fallback-validation.js +2 -0
  120. package/dist/contracts/delivery-fallback.d.ts +117 -0
  121. package/dist/contracts/delivery-fallback.js +2 -0
  122. package/dist/contracts/delivery-intent-validation.d.ts +13 -0
  123. package/dist/contracts/delivery-intent-validation.js +2 -0
  124. package/dist/contracts/delivery-intent.d.ts +137 -0
  125. package/dist/contracts/delivery-intent.js +2 -0
  126. package/dist/contracts/delivery-progress.d.ts +61 -0
  127. package/dist/contracts/delivery-progress.js +2 -0
  128. package/dist/contracts/discord-community-intelligence.operations.d.ts +405 -0
  129. package/dist/contracts/discord-community-intelligence.operations.js +2 -0
  130. package/dist/contracts/discord-community.events.d.ts +162 -0
  131. package/dist/contracts/discord-community.events.js +2 -0
  132. package/dist/contracts/discord-community.models.d.ts +167 -0
  133. package/dist/contracts/discord-community.models.js +2 -0
  134. package/dist/contracts/discord-community.operations.d.ts +663 -0
  135. package/dist/contracts/discord-community.operations.js +2 -0
  136. package/dist/contracts/discord-community.test.d.ts +1 -0
  137. package/dist/contracts/ecosystem-attachment.operations.d.ts +129 -0
  138. package/dist/contracts/ecosystem-attachment.operations.js +2 -0
  139. package/dist/contracts/ecosystem-auth.operations.d.ts +345 -0
  140. package/dist/contracts/ecosystem-auth.operations.js +2 -0
  141. package/dist/contracts/ecosystem-binding.operations.d.ts +231 -0
  142. package/dist/contracts/ecosystem-binding.operations.js +2 -0
  143. package/dist/contracts/ecosystem-connection-subscription.events.d.ts +332 -0
  144. package/dist/contracts/ecosystem-connection-subscription.events.js +2 -0
  145. package/dist/contracts/ecosystem-governed-work-v2.operations.d.ts +234 -0
  146. package/dist/contracts/ecosystem-governed-work-v2.operations.js +2 -0
  147. package/dist/contracts/ecosystem-governed-work.operations.d.ts +265 -0
  148. package/dist/contracts/ecosystem-governed-work.operations.js +2 -0
  149. package/dist/contracts/ecosystem-governed-work.operations.test.d.ts +1 -0
  150. package/dist/contracts/ecosystem-identity-v3.operations.d.ts +65 -0
  151. package/dist/contracts/ecosystem-identity-v3.operations.js +2 -0
  152. package/dist/contracts/ecosystem-identity.operations.d.ts +174 -0
  153. package/dist/contracts/ecosystem-identity.operations.js +2 -0
  154. package/dist/contracts/ecosystem-identity.operations.test.d.ts +1 -0
  155. package/dist/contracts/ecosystem-message.operations.d.ts +1092 -0
  156. package/dist/contracts/ecosystem-message.operations.js +2 -0
  157. package/dist/contracts/ecosystem-messaging.dtos.d.ts +68 -0
  158. package/dist/contracts/ecosystem-messaging.dtos.js +1 -0
  159. package/dist/contracts/ecosystem-messaging.dtos.test.d.ts +1 -0
  160. package/dist/contracts/ecosystem-messaging.events.d.ts +608 -0
  161. package/dist/contracts/ecosystem-messaging.events.js +2 -0
  162. package/dist/contracts/ecosystem-messaging.models.d.ts +386 -0
  163. package/dist/contracts/ecosystem-messaging.models.js +2 -0
  164. package/dist/contracts/ecosystem-messaging.test.d.ts +1 -0
  165. package/dist/contracts/ecosystem-navigation-v3.operations.d.ts +149 -0
  166. package/dist/contracts/ecosystem-navigation-v3.operations.js +2 -0
  167. package/dist/contracts/ecosystem-webhook.operations.d.ts +187 -0
  168. package/dist/contracts/ecosystem-webhook.operations.js +2 -0
  169. package/dist/contracts/ecosystem-workspace.operations.d.ts +590 -0
  170. package/dist/contracts/ecosystem-workspace.operations.js +2 -0
  171. package/dist/contracts/enums.d.ts +9 -0
  172. package/dist/contracts/enums.js +2 -0
  173. package/dist/contracts/erasure.operations.d.ts +114 -0
  174. package/dist/contracts/erasure.operations.js +2 -0
  175. package/dist/contracts/erasure.test.d.ts +1 -0
  176. package/dist/contracts/events.d.ts +174 -0
  177. package/dist/contracts/events.js +2 -0
  178. package/dist/contracts/index.d.ts +43 -0
  179. package/dist/contracts/index.js +2 -0
  180. package/dist/contracts/ingestion.d.ts +169 -0
  181. package/dist/contracts/ingestion.js +2 -0
  182. package/dist/contracts/ingress-admission-policy.d.ts +14 -0
  183. package/dist/contracts/ingress-admission-policy.js +2 -0
  184. package/dist/contracts/ingress-admission.d.ts +184 -0
  185. package/dist/contracts/ingress-admission.js +2 -0
  186. package/dist/contracts/ingress-admission.test.d.ts +1 -0
  187. package/dist/contracts/models.d.ts +851 -0
  188. package/dist/contracts/models.js +2 -0
  189. package/dist/contracts/operations.d.ts +5 -0
  190. package/dist/contracts/operations.js +2 -0
  191. package/dist/contracts/persistence.d.ts +353 -0
  192. package/dist/contracts/persistence.js +2 -0
  193. package/dist/contracts/persistence.test.d.ts +1 -0
  194. package/dist/contracts/preference-resolution.d.ts +154 -0
  195. package/dist/contracts/preference-resolution.js +2 -0
  196. package/dist/contracts/preference-resolution.test.d.ts +1 -0
  197. package/dist/contracts/query.operations.d.ts +600 -0
  198. package/dist/contracts/query.operations.js +2 -0
  199. package/dist/contracts/sequence-intent.d.ts +103 -0
  200. package/dist/contracts/sequence-intent.js +2 -0
  201. package/dist/contracts/sequence-intent.test.d.ts +1 -0
  202. package/dist/contracts/sovereignty.d.ts +164 -0
  203. package/dist/contracts/sovereignty.js +2 -0
  204. package/dist/contracts/support-internal-note.operations.d.ts +309 -0
  205. package/dist/contracts/support-internal-note.operations.js +2 -0
  206. package/dist/contracts/support-internal-note.operations.test.d.ts +1 -0
  207. package/dist/contracts/thread-link-kind.d.ts +20 -0
  208. package/dist/contracts/thread-link-kind.js +2 -0
  209. package/dist/contracts/thread-message.operations.d.ts +485 -0
  210. package/dist/contracts/thread-message.operations.js +2 -0
  211. package/dist/events/index.d.ts +4 -0
  212. package/dist/events/index.js +2 -0
  213. package/dist/fixtures/agent-omnichannel-primitives.d.ts +240 -0
  214. package/dist/fixtures/agent-omnichannel-primitives.js +2 -0
  215. package/dist/fixtures/agent-omnichannel.d.ts +682 -0
  216. package/dist/fixtures/agent-omnichannel.js +2 -0
  217. package/dist/fixtures/agent-omnichannel.test.d.ts +1 -0
  218. package/dist/fixtures/gtm-learning-loop-neutral.parts.d.ts +20 -0
  219. package/dist/fixtures/gtm-learning-loop-neutral.parts.js +2 -0
  220. package/dist/fixtures/index.d.ts +3 -0
  221. package/dist/fixtures/index.js +2 -0
  222. package/dist/fixtures/normalized-ingestion.d.ts +102 -0
  223. package/dist/fixtures/normalized-ingestion.js +2 -0
  224. package/dist/fixtures/normalized-ingestion.test.d.ts +1 -0
  225. package/dist/index.d.ts +7 -0
  226. package/dist/index.js +2 -0
  227. package/dist/node/capabilities/comms-ai.capabilities.js +1 -0
  228. package/dist/node/capabilities/communication-os.capability-ids.js +1 -0
  229. package/dist/node/capabilities/ecosystem-messaging.capabilities.js +1 -0
  230. package/dist/node/capabilities/index.js +1 -0
  231. package/dist/node/commands/comms-ai.commands.js +1 -0
  232. package/dist/node/commands/index.js +1 -0
  233. package/dist/node/contracts/agent-communication.js +1 -0
  234. package/dist/node/contracts/agent-lifecycle-projection.js +1 -0
  235. package/dist/node/contracts/agent-surface-control.js +1 -0
  236. package/dist/node/contracts/ai-assistance.operations.js +1 -0
  237. package/dist/node/contracts/artifact-digest.js +1 -0
  238. package/dist/node/contracts/canonical-agent-conversation.js +1 -0
  239. package/dist/node/contracts/channel-preferences.js +1 -0
  240. package/dist/node/contracts/channel-routing.js +1 -0
  241. package/dist/node/contracts/collaboration.operations.js +1 -0
  242. package/dist/node/contracts/customer-live-chat-grant.operations.js +1 -0
  243. package/dist/node/contracts/delivery-eligibility.js +1 -0
  244. package/dist/node/contracts/delivery-fallback-eligibility-validation.js +1 -0
  245. package/dist/node/contracts/delivery-fallback-validation.js +1 -0
  246. package/dist/node/contracts/delivery-fallback.js +1 -0
  247. package/dist/node/contracts/delivery-intent-validation.js +1 -0
  248. package/dist/node/contracts/delivery-intent.js +1 -0
  249. package/dist/node/contracts/delivery-progress.js +1 -0
  250. package/dist/node/contracts/discord-community-intelligence.operations.js +1 -0
  251. package/dist/node/contracts/discord-community.events.js +1 -0
  252. package/dist/node/contracts/discord-community.models.js +1 -0
  253. package/dist/node/contracts/discord-community.operations.js +1 -0
  254. package/dist/node/contracts/ecosystem-attachment.operations.js +1 -0
  255. package/dist/node/contracts/ecosystem-auth.operations.js +1 -0
  256. package/dist/node/contracts/ecosystem-binding.operations.js +1 -0
  257. package/dist/node/contracts/ecosystem-connection-subscription.events.js +1 -0
  258. package/dist/node/contracts/ecosystem-governed-work-v2.operations.js +1 -0
  259. package/dist/node/contracts/ecosystem-governed-work.operations.js +1 -0
  260. package/dist/node/contracts/ecosystem-identity-v3.operations.js +1 -0
  261. package/dist/node/contracts/ecosystem-identity.operations.js +1 -0
  262. package/dist/node/contracts/ecosystem-message.operations.js +1 -0
  263. package/dist/node/contracts/ecosystem-messaging.dtos.js +0 -0
  264. package/dist/node/contracts/ecosystem-messaging.events.js +1 -0
  265. package/dist/node/contracts/ecosystem-messaging.models.js +1 -0
  266. package/dist/node/contracts/ecosystem-navigation-v3.operations.js +1 -0
  267. package/dist/node/contracts/ecosystem-webhook.operations.js +1 -0
  268. package/dist/node/contracts/ecosystem-workspace.operations.js +1 -0
  269. package/dist/node/contracts/enums.js +1 -0
  270. package/dist/node/contracts/erasure.operations.js +1 -0
  271. package/dist/node/contracts/events.js +1 -0
  272. package/dist/node/contracts/index.js +1 -0
  273. package/dist/node/contracts/ingestion.js +1 -0
  274. package/dist/node/contracts/ingress-admission-policy.js +1 -0
  275. package/dist/node/contracts/ingress-admission.js +1 -0
  276. package/dist/node/contracts/models.js +1 -0
  277. package/dist/node/contracts/operations.js +1 -0
  278. package/dist/node/contracts/persistence.js +1 -0
  279. package/dist/node/contracts/preference-resolution.js +1 -0
  280. package/dist/node/contracts/query.operations.js +1 -0
  281. package/dist/node/contracts/sequence-intent.js +1 -0
  282. package/dist/node/contracts/sovereignty.js +1 -0
  283. package/dist/node/contracts/support-internal-note.operations.js +1 -0
  284. package/dist/node/contracts/thread-link-kind.js +1 -0
  285. package/dist/node/contracts/thread-message.operations.js +1 -0
  286. package/dist/node/events/index.js +1 -0
  287. package/dist/node/fixtures/agent-omnichannel-primitives.js +1 -0
  288. package/dist/node/fixtures/agent-omnichannel.js +1 -0
  289. package/dist/node/fixtures/gtm-learning-loop-neutral.parts.js +1 -0
  290. package/dist/node/fixtures/index.js +1 -0
  291. package/dist/node/fixtures/normalized-ingestion.js +1 -0
  292. package/dist/node/index.js +1 -0
  293. package/dist/node/queries/index.js +1 -0
  294. package/dist/node/types/domain-command.js +0 -0
  295. package/dist/node/types/index.js +1 -0
  296. package/dist/node/validation/domain-command.js +1 -0
  297. package/dist/node/validation/index.js +1 -0
  298. package/dist/package-exports.test.d.ts +1 -0
  299. package/dist/queries/index.d.ts +4 -0
  300. package/dist/queries/index.js +2 -0
  301. package/dist/types/domain-command.d.ts +54 -0
  302. package/dist/types/domain-command.js +1 -0
  303. package/dist/types/index.d.ts +3 -0
  304. package/dist/types/index.js +2 -0
  305. package/dist/validation/domain-command.d.ts +3 -0
  306. package/dist/validation/domain-command.js +2 -0
  307. package/dist/validation/index.d.ts +53 -0
  308. package/dist/validation/index.js +2 -0
  309. package/package.json +1227 -0
@@ -0,0 +1,154 @@
1
+ import { z } from 'zod';
2
+ import type { CommunicationPreferenceSetV1 } from './channel-preferences.js';
3
+ export declare const COMMUNICATION_PREFERENCE_RESOLUTION_SCHEMA_VERSION: '1.0.0';
4
+ export declare const COMMUNICATION_PLATFORM_DEFAULT_PREFERENCE_TARGET_REF: 'communication:preference-target:platform-default';
5
+ /** Resolution proceeds from the most specific available tier to the default. */
6
+ export declare const COMMUNICATION_PREFERENCE_RESOLUTION_TIERS: readonly [readonly ['event', 'automation'], readonly ['feature', 'application'], readonly ['product'], readonly ['space', 'person'], readonly ['platform_default']];
7
+ export declare const CommunicationPreferenceResolutionTargetKindSchema: z.ZodEnum<{
8
+ application: "application";
9
+ automation: "automation";
10
+ event: "event";
11
+ feature: "feature";
12
+ person: "person";
13
+ platform_default: "platform_default";
14
+ product: "product";
15
+ space: "space";
16
+ }>;
17
+ /** Exactly one typed resolution target and its opaque canonical reference. */
18
+ export declare const CommunicationPreferenceResolutionTargetV1Schema: z.ZodDiscriminatedUnion<[z.ZodObject<{
19
+ kind: z.ZodLiteral<"event">;
20
+ ref: z.ZodString;
21
+ }, z.core.$strict>, z.ZodObject<{
22
+ kind: z.ZodLiteral<"automation">;
23
+ ref: z.ZodString;
24
+ }, z.core.$strict>, z.ZodObject<{
25
+ kind: z.ZodLiteral<"feature">;
26
+ ref: z.ZodString;
27
+ }, z.core.$strict>, z.ZodObject<{
28
+ kind: z.ZodLiteral<"application">;
29
+ ref: z.ZodString;
30
+ }, z.core.$strict>, z.ZodObject<{
31
+ kind: z.ZodLiteral<"product">;
32
+ ref: z.ZodString;
33
+ }, z.core.$strict>, z.ZodObject<{
34
+ kind: z.ZodLiteral<"space">;
35
+ ref: z.ZodString;
36
+ }, z.core.$strict>, z.ZodObject<{
37
+ kind: z.ZodLiteral<"person">;
38
+ ref: z.ZodString;
39
+ }, z.core.$strict>, z.ZodObject<{
40
+ kind: z.ZodLiteral<"platform_default">;
41
+ ref: z.ZodLiteral<"communication:preference-target:platform-default">;
42
+ }, z.core.$strict>], "kind">;
43
+ export declare const CommunicationEvaluatedPreferenceSetV1Schema: z.ZodObject<{
44
+ preferenceSetRef: z.ZodString;
45
+ revision: z.ZodNumber;
46
+ digest: z.ZodString;
47
+ target: z.ZodDiscriminatedUnion<[z.ZodObject<{
48
+ kind: z.ZodLiteral<"event">;
49
+ ref: z.ZodString;
50
+ }, z.core.$strict>, z.ZodObject<{
51
+ kind: z.ZodLiteral<"automation">;
52
+ ref: z.ZodString;
53
+ }, z.core.$strict>, z.ZodObject<{
54
+ kind: z.ZodLiteral<"feature">;
55
+ ref: z.ZodString;
56
+ }, z.core.$strict>, z.ZodObject<{
57
+ kind: z.ZodLiteral<"application">;
58
+ ref: z.ZodString;
59
+ }, z.core.$strict>, z.ZodObject<{
60
+ kind: z.ZodLiteral<"product">;
61
+ ref: z.ZodString;
62
+ }, z.core.$strict>, z.ZodObject<{
63
+ kind: z.ZodLiteral<"space">;
64
+ ref: z.ZodString;
65
+ }, z.core.$strict>, z.ZodObject<{
66
+ kind: z.ZodLiteral<"person">;
67
+ ref: z.ZodString;
68
+ }, z.core.$strict>, z.ZodObject<{
69
+ kind: z.ZodLiteral<"platform_default">;
70
+ ref: z.ZodLiteral<"communication:preference-target:platform-default">;
71
+ }, z.core.$strict>], "kind">;
72
+ }, z.core.$strict>;
73
+ /** Replayable preference evaluation evidence; it grants no send authority. */
74
+ export declare const CommunicationPreferenceResolutionResultV1Schema: z.ZodObject<{
75
+ schemaVersion: z.ZodLiteral<"1.0.0">;
76
+ resolutionRef: z.ZodString;
77
+ scope: z.ZodObject<{
78
+ tenantRef: z.ZodString;
79
+ workspaceRef: z.ZodOptional<z.ZodString>;
80
+ spaceRef: z.ZodOptional<z.ZodString>;
81
+ subjectRef: z.ZodString;
82
+ }, z.core.$strict>;
83
+ subjectRef: z.ZodString;
84
+ evaluatedPreferenceSets: z.ZodArray<z.ZodObject<{
85
+ preferenceSetRef: z.ZodString;
86
+ revision: z.ZodNumber;
87
+ digest: z.ZodString;
88
+ target: z.ZodDiscriminatedUnion<[z.ZodObject<{
89
+ kind: z.ZodLiteral<"event">;
90
+ ref: z.ZodString;
91
+ }, z.core.$strict>, z.ZodObject<{
92
+ kind: z.ZodLiteral<"automation">;
93
+ ref: z.ZodString;
94
+ }, z.core.$strict>, z.ZodObject<{
95
+ kind: z.ZodLiteral<"feature">;
96
+ ref: z.ZodString;
97
+ }, z.core.$strict>, z.ZodObject<{
98
+ kind: z.ZodLiteral<"application">;
99
+ ref: z.ZodString;
100
+ }, z.core.$strict>, z.ZodObject<{
101
+ kind: z.ZodLiteral<"product">;
102
+ ref: z.ZodString;
103
+ }, z.core.$strict>, z.ZodObject<{
104
+ kind: z.ZodLiteral<"space">;
105
+ ref: z.ZodString;
106
+ }, z.core.$strict>, z.ZodObject<{
107
+ kind: z.ZodLiteral<"person">;
108
+ ref: z.ZodString;
109
+ }, z.core.$strict>, z.ZodObject<{
110
+ kind: z.ZodLiteral<"platform_default">;
111
+ ref: z.ZodLiteral<"communication:preference-target:platform-default">;
112
+ }, z.core.$strict>], "kind">;
113
+ }, z.core.$strict>>;
114
+ winningPreferenceSetRef: z.ZodString;
115
+ winningTarget: z.ZodDiscriminatedUnion<[z.ZodObject<{
116
+ kind: z.ZodLiteral<"event">;
117
+ ref: z.ZodString;
118
+ }, z.core.$strict>, z.ZodObject<{
119
+ kind: z.ZodLiteral<"automation">;
120
+ ref: z.ZodString;
121
+ }, z.core.$strict>, z.ZodObject<{
122
+ kind: z.ZodLiteral<"feature">;
123
+ ref: z.ZodString;
124
+ }, z.core.$strict>, z.ZodObject<{
125
+ kind: z.ZodLiteral<"application">;
126
+ ref: z.ZodString;
127
+ }, z.core.$strict>, z.ZodObject<{
128
+ kind: z.ZodLiteral<"product">;
129
+ ref: z.ZodString;
130
+ }, z.core.$strict>, z.ZodObject<{
131
+ kind: z.ZodLiteral<"space">;
132
+ ref: z.ZodString;
133
+ }, z.core.$strict>, z.ZodObject<{
134
+ kind: z.ZodLiteral<"person">;
135
+ ref: z.ZodString;
136
+ }, z.core.$strict>, z.ZodObject<{
137
+ kind: z.ZodLiteral<"platform_default">;
138
+ ref: z.ZodLiteral<"communication:preference-target:platform-default">;
139
+ }, z.core.$strict>], "kind">;
140
+ authority: z.ZodLiteral<"preference_only">;
141
+ effectAuthority: z.ZodLiteral<"none">;
142
+ resolvedAt: z.ZodString;
143
+ evidenceRefs: z.ZodArray<z.ZodString>;
144
+ resolutionDigest: z.ZodString;
145
+ }, z.core.$strict>;
146
+ export type CommunicationPreferenceResolutionTargetKind = z.infer<typeof CommunicationPreferenceResolutionTargetKindSchema>;
147
+ export type CommunicationPreferenceResolutionTargetV1 = z.infer<typeof CommunicationPreferenceResolutionTargetV1Schema>;
148
+ export type CommunicationEvaluatedPreferenceSetV1 = z.infer<typeof CommunicationEvaluatedPreferenceSetV1Schema>;
149
+ export type CommunicationPreferenceResolutionResultV1 = z.infer<typeof CommunicationPreferenceResolutionResultV1Schema>;
150
+ /** Pure validation of the winning result against its persisted preference set. */
151
+ export declare function validateCommunicationPreferenceResolutionBindingV1(input: {
152
+ preferenceResolution: CommunicationPreferenceResolutionResultV1;
153
+ preferenceSet: CommunicationPreferenceSetV1;
154
+ }): string[];
@@ -0,0 +1,2 @@
1
+ // @bun
2
+ import{z as c}from"zod";import{z as r}from"zod";var C="1.0.0",P="1.0.0",I={id:"communication-os.agent-omnichannel.v1",title:"CommunicationOS agent omnichannel contracts",body:"Provider-neutral agent profiles and lifecycle links bind applications, runs, tasks, help requests, background results, routes, preferences, policies, and evidence through opaque references. They grant no provider access or effect authority.",kind:"reference",route:"/docs/communication-os/agent-omnichannel-v1",visibility:"public"},o=r.string().trim().min(1),h=r.string().datetime({offset:!0}),m=r.string().regex(/^sha256:[a-f0-9]{64}$/),S=r.object({ref:o,digest:m}).strict(),l=S.extend({revision:r.number().int().positive()}).strict(),d=r.object({tenantRef:o,workspaceRef:o.optional(),spaceRef:o.optional(),subjectRef:o}).strict(),k=r.object({schemaVersion:r.literal(C),profileRef:o,revision:r.number().int().positive(),agentRef:o,applicationRef:o,scope:d,routeBindings:r.array(l),connectionRefs:r.array(o),preferenceSet:l,policyRefs:r.array(o).min(1),evidenceRefs:r.array(o).min(1),createdAt:h,updatedAt:h,profileDigest:m}).strict().superRefine((e,t)=>{for(let i of["connectionRefs","policyRefs","evidenceRefs"])if(new Set(e[i]).size!==e[i].length)t.addIssue({code:r.ZodIssueCode.custom,path:[i],message:`${i} must be unique`});let n=e.routeBindings.map((i)=>i.ref);if(new Set(n).size!==n.length)t.addIssue({code:r.ZodIssueCode.custom,path:["routeBindings"],message:"route bindings must be unique"})}),T=r.object({schemaVersion:r.literal(P),linkRef:o,profile:l,agentRef:o,applicationRef:o,scope:d,runRef:o.optional(),taskRef:o.optional(),helpRequestRef:o.optional(),approvalRequestRef:o.optional(),backgroundResultRef:o.optional(),canonicalConversation:S.optional(),session:l.optional(),correlationRef:o,evidenceRefs:r.array(o).min(1)}).strict().superRefine((e,t)=>{if(new Set(e.evidenceRefs).size!==e.evidenceRefs.length)t.addIssue({code:r.ZodIssueCode.custom,path:["evidenceRefs"],message:"evidenceRefs must be unique"});if(!e.runRef&&!e.taskRef&&!e.helpRequestRef&&!e.approvalRequestRef&&!e.backgroundResultRef)t.addIssue({code:r.ZodIssueCode.custom,path:["runRef"],message:"at least one run, task, help request, approval request, or background result ref is required"})});function g(e,t){return e.tenantRef===t.tenantRef&&e.workspaceRef===t.workspaceRef&&e.spaceRef===t.spaceRef&&e.subjectRef===t.subjectRef}function w(e){let t=[];for(let n of["agentRef","applicationRef"])if(e.profile[n]!==e.lifecycleLink[n])t.push(`Lifecycle ${n} does not match the agent profile`);if(e.lifecycleLink.profile.ref!==e.profile.profileRef||e.lifecycleLink.profile.revision!==e.profile.revision||e.lifecycleLink.profile.digest!==e.profile.profileDigest)t.push("Lifecycle profile binding does not match the agent profile");if(!g(e.profile.scope,e.lifecycleLink.scope))t.push("Lifecycle scope does not match the agent profile");return t}function x(e){let{intent:t,progress:n}=e,i=[];if(n.deliveryRef!==t.deliveryRef||n.intent.ref!==t.deliveryRef||n.intent.digest!==t.deliveryDigest)i.push("Progress delivery does not match the intent");if(!g(n.scope,t.scope))i.push("Progress scope does not match the intent");if(n.recipientRef!==t.recipientRefs[0])i.push("Progress recipient does not match the intent");let s=t.requestedRoutes.find((f)=>f.ref===n.route.ref);if(!s||s.revision!==n.route.revision||s.digest!==n.route.digest)i.push("Progress route was not requested by the intent");if(Date.parse(n.occurredAt)<Date.parse(t.createdAt)||Date.parse(n.occurredAt)>Date.parse(t.expiresAt))i.push("Progress occurred outside the intent validity window");return i}var V="1.0.0",b="communication:preference-target:platform-default",N=[["event","automation"],["feature","application"],["product"],["space","person"],["platform_default"]],O=c.enum(["event","automation","feature","application","product","space","person","platform_default"]),p=c.string().trim().min(1);function a(e){return c.object({kind:c.literal(e),ref:p}).strict()}var y=c.discriminatedUnion("kind",[a("event"),a("automation"),a("feature"),a("application"),a("product"),a("space"),a("person"),c.object({kind:c.literal("platform_default"),ref:c.literal(b)}).strict()]),A=c.object({preferenceSetRef:p,revision:c.number().int().positive(),digest:m,target:y}).strict(),D=c.object({schemaVersion:c.literal(V),resolutionRef:p,scope:d,subjectRef:p,evaluatedPreferenceSets:c.array(A).min(1),winningPreferenceSetRef:p,winningTarget:y,authority:c.literal("preference_only"),effectAuthority:c.literal("none"),resolvedAt:c.string().datetime({offset:!0}),evidenceRefs:c.array(p).min(1),resolutionDigest:m}).strict().superRefine((e,t)=>{let n=e.evaluatedPreferenceSets.map((s)=>s.preferenceSetRef);if(new Set(n).size!==n.length)u(t,"evaluatedPreferenceSets","evaluated sets must be unique");if(new Set(e.evidenceRefs).size!==e.evidenceRefs.length)u(t,"evidenceRefs","evidenceRefs must be unique");for(let s=1;s<e.evaluatedPreferenceSets.length;s+=1){let f=e.evaluatedPreferenceSets[s-1],R=e.evaluatedPreferenceSets[s];if(f&&R&&v(f.target.kind)>v(R.target.kind)){u(t,"evaluatedPreferenceSets","evaluated sets must follow the preference resolution hierarchy");break}}let i=e.evaluatedPreferenceSets.find((s)=>s.preferenceSetRef===e.winningPreferenceSetRef);if(!i)u(t,"winningPreferenceSetRef","winning preference set must have been evaluated");else if(i.preferenceSetRef!==e.evaluatedPreferenceSets[0]?.preferenceSetRef)u(t,"winningPreferenceSetRef","winning preference set must be the most specific evaluated set");else if(i.target.kind!==e.winningTarget.kind||i.target.ref!==e.winningTarget.ref)u(t,"winningTarget","winning target must match the winning preference set")});function v(e){switch(e){case"event":case"automation":return 0;case"feature":case"application":return 1;case"product":return 2;case"space":case"person":return 3;case"platform_default":return 4}}function u(e,t,n){e.addIssue({code:c.ZodIssueCode.custom,path:[t],message:n})}function q(e){let{preferenceResolution:t,preferenceSet:n}=e,i=[];if(t.subjectRef!==n.scope.subjectRef||t.winningPreferenceSetRef!==n.preferenceSetRef)i.push("Preference resolution does not match its subject and set");if(!g(t.scope,n.scope))i.push("Preference resolution scope does not match its preference set");let s=t.evaluatedPreferenceSets.find((f)=>f.preferenceSetRef===n.preferenceSetRef);if(!s||s.revision!==n.revision||s.digest!==n.preferenceSetDigest)i.push("Preference resolution binding is stale");if(t.winningTarget.kind!==n.target.kind||t.winningTarget.ref!==n.target.ref)i.push("Preference resolution target does not match its preference set");return i}export{b as COMMUNICATION_PLATFORM_DEFAULT_PREFERENCE_TARGET_REF,V as COMMUNICATION_PREFERENCE_RESOLUTION_SCHEMA_VERSION,N as COMMUNICATION_PREFERENCE_RESOLUTION_TIERS,A as CommunicationEvaluatedPreferenceSetV1Schema,D as CommunicationPreferenceResolutionResultV1Schema,O as CommunicationPreferenceResolutionTargetKindSchema,y as CommunicationPreferenceResolutionTargetV1Schema,q as validateCommunicationPreferenceResolutionBindingV1};
@@ -0,0 +1 @@
1
+ export {};