@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,137 @@
1
+ import { z } from 'zod';
2
+ export declare const COMMUNICATION_DELIVERY_INTENT_SCHEMA_VERSION: '1.0.0';
3
+ export declare const CommunicationDeliveryContentProofV1Schema: z.ZodObject<{
4
+ sha256: z.ZodString;
5
+ contentRef: z.ZodString;
6
+ }, z.core.$strict>;
7
+ /** Opaque classification links only; consumers resolve no runtime authority. */
8
+ export declare const CommunicationDeliveryClassificationRefsV1Schema: z.ZodObject<{
9
+ eventRef: z.ZodOptional<z.ZodString>;
10
+ automationRef: z.ZodOptional<z.ZodString>;
11
+ featureRef: z.ZodOptional<z.ZodString>;
12
+ applicationRef: z.ZodOptional<z.ZodString>;
13
+ productRef: z.ZodOptional<z.ZodString>;
14
+ }, z.core.$strict>;
15
+ export declare const CommunicationDeliverySourceV1Schema: z.ZodObject<{
16
+ kind: z.ZodEnum<{
17
+ agent: "agent";
18
+ automation: "automation";
19
+ notification: "notification";
20
+ system: "system";
21
+ }>;
22
+ sourceRef: z.ZodString;
23
+ }, z.core.$strict>;
24
+ export declare const CommunicationDeliveryNoticeClassV1Schema: z.ZodEnum<{
25
+ mandatory_notice: "mandatory_notice";
26
+ user_selected: "user_selected";
27
+ }>;
28
+ /**
29
+ * Provider-neutral delivery intent. It carries references and content proof,
30
+ * but explicitly carries no authority to perform the external effect.
31
+ */
32
+ export declare const CommunicationDeliveryIntentV1Schema: z.ZodObject<{
33
+ schemaVersion: z.ZodLiteral<"1.0.0">;
34
+ deliveryRef: z.ZodString;
35
+ deliveryDigest: z.ZodString;
36
+ scope: z.ZodObject<{
37
+ tenantRef: z.ZodString;
38
+ workspaceRef: z.ZodOptional<z.ZodString>;
39
+ spaceRef: z.ZodOptional<z.ZodString>;
40
+ subjectRef: z.ZodString;
41
+ }, z.core.$strict>;
42
+ source: z.ZodObject<{
43
+ kind: z.ZodEnum<{
44
+ agent: "agent";
45
+ automation: "automation";
46
+ notification: "notification";
47
+ system: "system";
48
+ }>;
49
+ sourceRef: z.ZodString;
50
+ }, z.core.$strict>;
51
+ noticeClass: z.ZodOptional<z.ZodEnum<{
52
+ mandatory_notice: "mandatory_notice";
53
+ user_selected: "user_selected";
54
+ }>>;
55
+ profile: z.ZodObject<{
56
+ ref: z.ZodString;
57
+ digest: z.ZodString;
58
+ revision: z.ZodNumber;
59
+ }, z.core.$strict>;
60
+ semantic: z.ZodEnum<{
61
+ calendar_event: "calendar_event";
62
+ communication: "communication";
63
+ }>;
64
+ classificationRefs: z.ZodObject<{
65
+ eventRef: z.ZodOptional<z.ZodString>;
66
+ automationRef: z.ZodOptional<z.ZodString>;
67
+ featureRef: z.ZodOptional<z.ZodString>;
68
+ applicationRef: z.ZodOptional<z.ZodString>;
69
+ productRef: z.ZodOptional<z.ZodString>;
70
+ }, z.core.$strict>;
71
+ lifecycleLink: z.ZodOptional<z.ZodObject<{
72
+ schemaVersion: z.ZodLiteral<"1.0.0">;
73
+ linkRef: z.ZodString;
74
+ profile: z.ZodObject<{
75
+ ref: z.ZodString;
76
+ digest: z.ZodString;
77
+ revision: z.ZodNumber;
78
+ }, z.core.$strict>;
79
+ agentRef: z.ZodString;
80
+ applicationRef: z.ZodString;
81
+ scope: z.ZodObject<{
82
+ tenantRef: z.ZodString;
83
+ workspaceRef: z.ZodOptional<z.ZodString>;
84
+ spaceRef: z.ZodOptional<z.ZodString>;
85
+ subjectRef: z.ZodString;
86
+ }, z.core.$strict>;
87
+ runRef: z.ZodOptional<z.ZodString>;
88
+ taskRef: z.ZodOptional<z.ZodString>;
89
+ helpRequestRef: z.ZodOptional<z.ZodString>;
90
+ approvalRequestRef: z.ZodOptional<z.ZodString>;
91
+ backgroundResultRef: z.ZodOptional<z.ZodString>;
92
+ canonicalConversation: z.ZodOptional<z.ZodObject<{
93
+ ref: z.ZodString;
94
+ digest: z.ZodString;
95
+ }, z.core.$strict>>;
96
+ session: z.ZodOptional<z.ZodObject<{
97
+ ref: z.ZodString;
98
+ digest: z.ZodString;
99
+ revision: z.ZodNumber;
100
+ }, z.core.$strict>>;
101
+ correlationRef: z.ZodString;
102
+ evidenceRefs: z.ZodArray<z.ZodString>;
103
+ }, z.core.$strict>>;
104
+ recipientRefs: z.ZodArray<z.ZodString>;
105
+ contentProof: z.ZodObject<{
106
+ sha256: z.ZodString;
107
+ contentRef: z.ZodString;
108
+ }, z.core.$strict>;
109
+ requestedRoutes: z.ZodArray<z.ZodObject<{
110
+ ref: z.ZodString;
111
+ digest: z.ZodString;
112
+ revision: z.ZodNumber;
113
+ }, z.core.$strict>>;
114
+ preferenceSet: z.ZodObject<{
115
+ ref: z.ZodString;
116
+ digest: z.ZodString;
117
+ revision: z.ZodNumber;
118
+ }, z.core.$strict>;
119
+ preferenceResolution: z.ZodObject<{
120
+ ref: z.ZodString;
121
+ digest: z.ZodString;
122
+ }, z.core.$strict>;
123
+ consentRefs: z.ZodArray<z.ZodString>;
124
+ policyRefs: z.ZodArray<z.ZodString>;
125
+ approvalRequestRef: z.ZodOptional<z.ZodString>;
126
+ idempotencyKey: z.ZodString;
127
+ effectAuthority: z.ZodLiteral<"none">;
128
+ createdAt: z.ZodString;
129
+ expiresAt: z.ZodString;
130
+ evidenceRefs: z.ZodArray<z.ZodString>;
131
+ }, z.core.$strict>;
132
+ export type CommunicationDeliverySourceV1 = z.infer<typeof CommunicationDeliverySourceV1Schema>;
133
+ export type CommunicationDeliveryNoticeClassV1 = z.infer<typeof CommunicationDeliveryNoticeClassV1Schema>;
134
+ export type CommunicationDeliveryContentProofV1 = z.infer<typeof CommunicationDeliveryContentProofV1Schema>;
135
+ export type CommunicationDeliveryClassificationRefsV1 = z.infer<typeof CommunicationDeliveryClassificationRefsV1Schema>;
136
+ export type CommunicationDeliveryIntentV1 = z.infer<typeof CommunicationDeliveryIntentV1Schema>;
137
+ export { validateCommunicationDeliveryIntentBindingV1 } from './delivery-intent-validation.js';
@@ -0,0 +1,2 @@
1
+ // @bun
2
+ import{z as m}from"zod";import{z as f}from"zod";var F="1.0.0",H="1.0.0",ue={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"},s=f.string().trim().min(1),T=f.string().datetime({offset:!0}),g=f.string().regex(/^sha256:[a-f0-9]{64}$/),A=f.object({ref:s,digest:g}).strict(),h=A.extend({revision:f.number().int().positive()}).strict(),C=f.object({tenantRef:s,workspaceRef:s.optional(),spaceRef:s.optional(),subjectRef:s}).strict(),pe=f.object({schemaVersion:f.literal(F),profileRef:s,revision:f.number().int().positive(),agentRef:s,applicationRef:s,scope:C,routeBindings:f.array(h),connectionRefs:f.array(s),preferenceSet:h,policyRefs:f.array(s).min(1),evidenceRefs:f.array(s).min(1),createdAt:T,updatedAt:T,profileDigest:g}).strict().superRefine((e,n)=>{for(let o of["connectionRefs","policyRefs","evidenceRefs"])if(new Set(e[o]).size!==e[o].length)n.addIssue({code:f.ZodIssueCode.custom,path:[o],message:`${o} must be unique`});let t=e.routeBindings.map((o)=>o.ref);if(new Set(t).size!==t.length)n.addIssue({code:f.ZodIssueCode.custom,path:["routeBindings"],message:"route bindings must be unique"})}),D=f.object({schemaVersion:f.literal(H),linkRef:s,profile:h,agentRef:s,applicationRef:s,scope:C,runRef:s.optional(),taskRef:s.optional(),helpRequestRef:s.optional(),approvalRequestRef:s.optional(),backgroundResultRef:s.optional(),canonicalConversation:A.optional(),session:h.optional(),correlationRef:s,evidenceRefs:f.array(s).min(1)}).strict().superRefine((e,n)=>{if(new Set(e.evidenceRefs).size!==e.evidenceRefs.length)n.addIssue({code:f.ZodIssueCode.custom,path:["evidenceRefs"],message:"evidenceRefs must be unique"});if(!e.runRef&&!e.taskRef&&!e.helpRequestRef&&!e.approvalRequestRef&&!e.backgroundResultRef)n.addIssue({code:f.ZodIssueCode.custom,path:["runRef"],message:"at least one run, task, help request, approval request, or background result ref is required"})});function R(e,n){return e.tenantRef===n.tenantRef&&e.workspaceRef===n.workspaceRef&&e.spaceRef===n.spaceRef&&e.subjectRef===n.subjectRef}function O(e){let n=[];for(let t of["agentRef","applicationRef"])if(e.profile[t]!==e.lifecycleLink[t])n.push(`Lifecycle ${t} 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)n.push("Lifecycle profile binding does not match the agent profile");if(!R(e.profile.scope,e.lifecycleLink.scope))n.push("Lifecycle scope does not match the agent profile");return n}function le(e){let{intent:n,progress:t}=e,o=[];if(t.deliveryRef!==n.deliveryRef||t.intent.ref!==n.deliveryRef||t.intent.digest!==n.deliveryDigest)o.push("Progress delivery does not match the intent");if(!R(t.scope,n.scope))o.push("Progress scope does not match the intent");if(t.recipientRef!==n.recipientRefs[0])o.push("Progress recipient does not match the intent");let c=n.requestedRoutes.find((i)=>i.ref===t.route.ref);if(!c||c.revision!==t.route.revision||c.digest!==t.route.digest)o.push("Progress route was not requested by the intent");if(Date.parse(t.occurredAt)<Date.parse(n.createdAt)||Date.parse(t.occurredAt)>Date.parse(n.expiresAt))o.push("Progress occurred outside the intent validity window");return o}import{z as d}from"zod";var G="1.0.0",Y=["email","calendar","sms","slack","teams","discord","telegram","whatsapp","matrix","in_app","push","webhook","web_chat","internal_chat"],Q=d.string().trim().min(1),ye=d.enum(Y),x=d.enum(["communication","calendar_event"]),P=d.string().trim().min(1),he=d.object({schemaVersion:d.literal(G),routeRef:P,revision:d.number().int().positive(),scope:C,channel:Q,destinationRef:P,connectionRef:P.optional(),semantic:x,deliveryMode:d.enum(["direct","durable_in_app"]),capabilityRefs:d.array(P),evidenceRefs:d.array(P).min(1),routeDigest:g}).strict().superRefine((e,n)=>{if(e.channel==="calendar"!==(e.semantic==="calendar_event"))n.addIssue({code:d.ZodIssueCode.custom,path:["semantic"],message:"calendar routes require calendar_event semantics and calendar_event routes require the calendar channel"});for(let t of["capabilityRefs","evidenceRefs"])if(new Set(e[t]).size!==e[t].length)n.addIssue({code:d.ZodIssueCode.custom,path:[t],message:`${t} must be unique`})});import{z as r}from"zod";var p=r.string().min(1),_=r.string().datetime({offset:!0}),ve="1.0.0",Ie="communication.sequence-intent.v1|sequence,action-packet,recipient,content-proof,channel,side-effect,schedule,expiry,approval,policy|approval-bound,provider-neutral",Ve="sha256:7ef776396727b0e7ee015935d8f7d5f4605a08b815f6493aa737411490edc633",W="1.0.0",Pe="communicationSequenceApprovalTarget",Ae="communicationSequenceApprovalFingerprint",J="communication-sequence-approval:",b=r.object({contentRef:p,sha256:r.string().regex(/^[a-f0-9]{64}$/)}),X=r.object({body:r.string(),subject:r.string().optional(),htmlBody:r.string().optional(),replyToExternalMessageId:r.string().optional()}),k=r.object({notBefore:_,maxAttempts:r.number().int().positive(),retryDelayMs:r.number().int().nonnegative()}),w=r.object({policyRefs:r.array(p).min(1),consentRef:p,killSwitchRef:p}),ee=r.object({schemaVersion:r.literal(W),sequenceRef:p,sequenceVersion:p,tenantRef:p,recipientRefs:r.array(p).min(1),contentProof:b,channel:p,sideEffect:r.literal("send_reply"),schedulePolicyVersion:p,schedulePolicy:k,policyVersion:p,policy:w,expiresAt:_}).superRefine((e,n)=>{if(new Set(e.recipientRefs).size!==e.recipientRefs.length)n.addIssue({code:r.ZodIssueCode.custom,message:"recipientRefs must be unique",path:["recipientRefs"]});if(Date.parse(e.expiresAt)<=Date.parse(e.schedulePolicy.notBefore))n.addIssue({code:r.ZodIssueCode.custom,message:"expiresAt must be later than schedulePolicy.notBefore",path:["expiresAt"]})});function N(e){if(Array.isArray(e))return`[${e.map(N).join(",")}]`;if(e&&typeof e==="object")return`{${Object.entries(e).sort(([n],[t])=>n.localeCompare(t)).map(([n,t])=>`${JSON.stringify(n)}:${N(t)}`).join(",")}}`;return JSON.stringify(e)}async function L(e){let n=await crypto.subtle.digest("SHA-256",new TextEncoder().encode(N(e)));return Array.from(new Uint8Array(n),(t)=>t.toString(16).padStart(2,"0")).join("")}async function be(e){let n=X.parse(e);return L({body:n.body,htmlBody:n.htmlBody??null,replyToExternalMessageId:n.replyToExternalMessageId??null,subject:n.subject??null})}async function Ee(e){let n=ee.parse(e);return`sha256:${await L(n)}`}function xe(e){return`${J}${e}`}var Ne=r.object({sequenceRef:p,actionPacketRef:p,recipientRef:p,contentProof:b,channel:p,sideEffect:r.literal("send_reply"),schedulePolicy:k,expiresAt:_,approvalRequestId:p,approvalFingerprint:p,policy:w}).superRefine((e,n)=>{if(Date.parse(e.expiresAt)<=Date.parse(e.schedulePolicy.notBefore))n.addIssue({code:r.ZodIssueCode.custom,message:"expiresAt must be later than schedulePolicy.notBefore",path:["expiresAt"]})});import{z as u}from"zod";var ne="1.0.0",te="communication:preference-target:platform-default",De=[["event","automation"],["feature","application"],["product"],["space","person"],["platform_default"]],Oe=u.enum(["event","automation","feature","application","product","space","person","platform_default"]),V=u.string().trim().min(1);function S(e){return u.object({kind:u.literal(e),ref:V}).strict()}var B=u.discriminatedUnion("kind",[S("event"),S("automation"),S("feature"),S("application"),S("product"),S("space"),S("person"),u.object({kind:u.literal("platform_default"),ref:u.literal(te)}).strict()]),oe=u.object({preferenceSetRef:V,revision:u.number().int().positive(),digest:g,target:B}).strict(),ke=u.object({schemaVersion:u.literal(ne),resolutionRef:V,scope:C,subjectRef:V,evaluatedPreferenceSets:u.array(oe).min(1),winningPreferenceSetRef:V,winningTarget:B,authority:u.literal("preference_only"),effectAuthority:u.literal("none"),resolvedAt:u.string().datetime({offset:!0}),evidenceRefs:u.array(V).min(1),resolutionDigest:g}).strict().superRefine((e,n)=>{let t=e.evaluatedPreferenceSets.map((c)=>c.preferenceSetRef);if(new Set(t).size!==t.length)I(n,"evaluatedPreferenceSets","evaluated sets must be unique");if(new Set(e.evidenceRefs).size!==e.evidenceRefs.length)I(n,"evidenceRefs","evidenceRefs must be unique");for(let c=1;c<e.evaluatedPreferenceSets.length;c+=1){let i=e.evaluatedPreferenceSets[c-1],v=e.evaluatedPreferenceSets[c];if(i&&v&&M(i.target.kind)>M(v.target.kind)){I(n,"evaluatedPreferenceSets","evaluated sets must follow the preference resolution hierarchy");break}}let o=e.evaluatedPreferenceSets.find((c)=>c.preferenceSetRef===e.winningPreferenceSetRef);if(!o)I(n,"winningPreferenceSetRef","winning preference set must have been evaluated");else if(o.preferenceSetRef!==e.evaluatedPreferenceSets[0]?.preferenceSetRef)I(n,"winningPreferenceSetRef","winning preference set must be the most specific evaluated set");else if(o.target.kind!==e.winningTarget.kind||o.target.ref!==e.winningTarget.ref)I(n,"winningTarget","winning target must match the winning preference set")});function M(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 I(e,n,t){e.addIssue({code:u.ZodIssueCode.custom,path:[n],message:t})}function z(e){let{preferenceResolution:n,preferenceSet:t}=e,o=[];if(n.subjectRef!==t.scope.subjectRef||n.winningPreferenceSetRef!==t.preferenceSetRef)o.push("Preference resolution does not match its subject and set");if(!R(n.scope,t.scope))o.push("Preference resolution scope does not match its preference set");let c=n.evaluatedPreferenceSets.find((i)=>i.preferenceSetRef===t.preferenceSetRef);if(!c||c.revision!==t.revision||c.digest!==t.preferenceSetDigest)o.push("Preference resolution binding is stale");if(n.winningTarget.kind!==t.target.kind||n.winningTarget.ref!==t.target.ref)o.push("Preference resolution target does not match its preference set");return o}function ie(e){let{intent:n,profile:t,preferenceSet:o,preferenceResolution:c}=e,i=[];if(!R(n.scope,t.scope))i.push("Intent scope does not match the agent profile");if(!R(n.scope,o.scope))i.push("Intent scope does not match the preference set");if(n.lifecycleLink){if(i.push(...O({profile:t,lifecycleLink:n.lifecycleLink})),!R(n.scope,n.lifecycleLink.scope))i.push("Intent scope does not match the lifecycle link")}if(n.profile.ref!==t.profileRef||n.profile.revision!==t.revision||n.profile.digest!==t.profileDigest)i.push("Intent profile binding is stale");if(n.preferenceSet.ref!==o.preferenceSetRef||n.preferenceSet.revision!==o.revision||n.preferenceSet.digest!==o.preferenceSetDigest)i.push("Intent preference set does not match its preferences");let v=c.evaluatedPreferenceSets.find((a)=>a.preferenceSetRef===t.preferenceSet.ref);if(!v||v.revision!==t.preferenceSet.revision||v.digest!==t.preferenceSet.digest)i.push("Agent profile preference set was not evaluated");if(i.push(...z({preferenceResolution:c,preferenceSet:o})),n.preferenceResolution.ref!==c.resolutionRef||n.preferenceResolution.digest!==c.resolutionDigest)i.push("Intent preference resolution binding is stale");if(c.subjectRef!==n.scope.subjectRef)i.push("Preference resolution does not bind the intent subject");if(n.classificationRefs.applicationRef&&n.classificationRefs.applicationRef!==t.applicationRef)i.push("Intent application classification does not match the profile");if(n.policyRefs.some((a)=>!t.policyRefs.includes(a)))i.push("Intent policy is not bound to the agent profile");let U=new Map(e.routes.map((a)=>[a.routeRef,a])),K=new Map(o.routePreferences.map((a)=>[a.routeRef,a]));for(let a of n.requestedRoutes){let y=U.get(a.ref),E=t.routeBindings.find((Z)=>Z.ref===a.ref),q=K.get(a.ref);if(!y||!E){i.push(`Requested route ${a.ref} is not bound to the profile`);continue}if(a.revision!==y.revision||a.digest!==y.routeDigest||E.revision!==y.revision||E.digest!==y.routeDigest)i.push(`Requested route ${a.ref} binding is stale`);if(!R(n.scope,y.scope))i.push(`Requested route ${a.ref} scope does not match`);if(y.semantic!==n.semantic)i.push(`Requested route ${a.ref} has incompatible semantics`);if(!q||q.channel!==y.channel)i.push(`Requested route ${a.ref} is not configured by preferences`)}if(!o.globalEnabled&&n.noticeClass!=="mandatory_notice")i.push("Intent preference set is globally disabled");return i}var re="1.0.0",l=m.string().trim().min(1),j=m.string().datetime({offset:!0}),ce=b.extend({contentRef:l}).strict(),se=m.object({eventRef:l.optional(),automationRef:l.optional(),featureRef:l.optional(),applicationRef:l.optional(),productRef:l.optional()}).strict().superRefine((e,n)=>{if(!Object.values(e).some(Boolean))n.addIssue({code:m.ZodIssueCode.custom,message:"at least one delivery classification ref is required"})}),ae=m.object({kind:m.enum(["agent","notification","automation","system"]),sourceRef:l}).strict(),fe=m.enum(["user_selected","mandatory_notice"]),$e=m.object({schemaVersion:m.literal(re),deliveryRef:l,deliveryDigest:g,scope:C,source:ae,noticeClass:fe.optional(),profile:h,semantic:x,classificationRefs:se,lifecycleLink:D.optional(),recipientRefs:m.array(l).length(1),contentProof:ce,requestedRoutes:m.array(h).min(1),preferenceSet:h,preferenceResolution:A,consentRefs:m.array(l),policyRefs:m.array(l).min(1),approvalRequestRef:l.optional(),idempotencyKey:l,effectAuthority:m.literal("none"),createdAt:j,expiresAt:j,evidenceRefs:m.array(l).min(1)}).strict().superRefine((e,n)=>{if(e.source.kind==="agent"&&!e.lifecycleLink)n.addIssue({code:m.ZodIssueCode.custom,path:["lifecycleLink"],message:"agent delivery requires an agent lifecycle link"});for(let o of["recipientRefs","consentRefs","policyRefs","evidenceRefs"])if(new Set(e[o]).size!==e[o].length)n.addIssue({code:m.ZodIssueCode.custom,path:[o],message:`${o} must be unique`});let t=e.requestedRoutes.map((o)=>o.ref);if(new Set(t).size!==t.length)n.addIssue({code:m.ZodIssueCode.custom,path:["requestedRoutes"],message:"requested routes must be unique"});if(e.recipientRefs[0]!==e.scope.subjectRef)n.addIssue({code:m.ZodIssueCode.custom,path:["recipientRefs"],message:"V1 delivery requires exactly the scoped recipient"});if(Date.parse(e.expiresAt)<=Date.parse(e.createdAt))n.addIssue({code:m.ZodIssueCode.custom,path:["expiresAt"],message:"expiresAt must be later than createdAt"})});export{re as COMMUNICATION_DELIVERY_INTENT_SCHEMA_VERSION,se as CommunicationDeliveryClassificationRefsV1Schema,ce as CommunicationDeliveryContentProofV1Schema,$e as CommunicationDeliveryIntentV1Schema,fe as CommunicationDeliveryNoticeClassV1Schema,ae as CommunicationDeliverySourceV1Schema,ie as validateCommunicationDeliveryIntentBindingV1};
@@ -0,0 +1,61 @@
1
+ import { z } from 'zod';
2
+ export declare const COMMUNICATION_DELIVERY_PROGRESS_SCHEMA_VERSION: '1.0.0';
3
+ export declare const CommunicationDeliveryProgressStatusSchema: z.ZodEnum<{
4
+ ambiguous: "ambiguous";
5
+ cancelled: "cancelled";
6
+ delivered: "delivered";
7
+ dispatched: "dispatched";
8
+ failed: "failed";
9
+ policy_blocked: "policy_blocked";
10
+ provider_accepted: "provider_accepted";
11
+ queued: "queued";
12
+ read: "read";
13
+ }>;
14
+ /** A replayable observation, not a command or proof of broader authority. */
15
+ export declare const CommunicationDeliveryProgressV1Schema: z.ZodObject<{
16
+ schemaVersion: z.ZodLiteral<"1.0.0">;
17
+ progressRef: z.ZodString;
18
+ progressDigest: z.ZodString;
19
+ deliveryRef: z.ZodString;
20
+ intent: z.ZodObject<{
21
+ ref: z.ZodString;
22
+ digest: z.ZodString;
23
+ }, z.core.$strict>;
24
+ scope: z.ZodObject<{
25
+ tenantRef: z.ZodString;
26
+ workspaceRef: z.ZodOptional<z.ZodString>;
27
+ spaceRef: z.ZodOptional<z.ZodString>;
28
+ subjectRef: z.ZodString;
29
+ }, z.core.$strict>;
30
+ recipientRef: z.ZodString;
31
+ attemptRef: z.ZodString;
32
+ route: z.ZodObject<{
33
+ ref: z.ZodString;
34
+ digest: z.ZodString;
35
+ revision: z.ZodNumber;
36
+ }, z.core.$strict>;
37
+ status: z.ZodEnum<{
38
+ ambiguous: "ambiguous";
39
+ cancelled: "cancelled";
40
+ delivered: "delivered";
41
+ dispatched: "dispatched";
42
+ failed: "failed";
43
+ policy_blocked: "policy_blocked";
44
+ provider_accepted: "provider_accepted";
45
+ queued: "queued";
46
+ read: "read";
47
+ }>;
48
+ providerReceiptRef: z.ZodOptional<z.ZodString>;
49
+ deliveryReceiptRef: z.ZodOptional<z.ZodString>;
50
+ readReceiptRef: z.ZodOptional<z.ZodString>;
51
+ reconciliation: z.ZodOptional<z.ZodObject<{
52
+ ref: z.ZodString;
53
+ digest: z.ZodString;
54
+ }, z.core.$strict>>;
55
+ failureCode: z.ZodOptional<z.ZodString>;
56
+ effectAuthority: z.ZodLiteral<"none">;
57
+ occurredAt: z.ZodString;
58
+ evidenceRefs: z.ZodArray<z.ZodString>;
59
+ }, z.core.$strict>;
60
+ export type CommunicationDeliveryProgressStatus = z.infer<typeof CommunicationDeliveryProgressStatusSchema>;
61
+ export type CommunicationDeliveryProgressV1 = z.infer<typeof CommunicationDeliveryProgressV1Schema>;
@@ -0,0 +1,2 @@
1
+ // @bun
2
+ import{z as c}from"zod";import{z as o}from"zod";var g="1.0.0",v="1.0.0",V={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"},t=o.string().trim().min(1),l=o.string().datetime({offset:!0}),d=o.string().regex(/^sha256:[a-f0-9]{64}$/),p=o.object({ref:t,digest:d}).strict(),f=p.extend({revision:o.number().int().positive()}).strict(),m=o.object({tenantRef:t,workspaceRef:t.optional(),spaceRef:t.optional(),subjectRef:t}).strict(),A=o.object({schemaVersion:o.literal(g),profileRef:t,revision:o.number().int().positive(),agentRef:t,applicationRef:t,scope:m,routeBindings:o.array(f),connectionRefs:o.array(t),preferenceSet:f,policyRefs:o.array(t).min(1),evidenceRefs:o.array(t).min(1),createdAt:l,updatedAt:l,profileDigest:d}).strict().superRefine((e,i)=>{for(let r of["connectionRefs","policyRefs","evidenceRefs"])if(new Set(e[r]).size!==e[r].length)i.addIssue({code:o.ZodIssueCode.custom,path:[r],message:`${r} must be unique`});let n=e.routeBindings.map((r)=>r.ref);if(new Set(n).size!==n.length)i.addIssue({code:o.ZodIssueCode.custom,path:["routeBindings"],message:"route bindings must be unique"})}),b=o.object({schemaVersion:o.literal(v),linkRef:t,profile:f,agentRef:t,applicationRef:t,scope:m,runRef:t.optional(),taskRef:t.optional(),helpRequestRef:t.optional(),approvalRequestRef:t.optional(),backgroundResultRef:t.optional(),canonicalConversation:p.optional(),session:f.optional(),correlationRef:t,evidenceRefs:o.array(t).min(1)}).strict().superRefine((e,i)=>{if(new Set(e.evidenceRefs).size!==e.evidenceRefs.length)i.addIssue({code:o.ZodIssueCode.custom,path:["evidenceRefs"],message:"evidenceRefs must be unique"});if(!e.runRef&&!e.taskRef&&!e.helpRequestRef&&!e.approvalRequestRef&&!e.backgroundResultRef)i.addIssue({code:o.ZodIssueCode.custom,path:["runRef"],message:"at least one run, task, help request, approval request, or background result ref is required"})});function R(e,i){return e.tenantRef===i.tenantRef&&e.workspaceRef===i.workspaceRef&&e.spaceRef===i.spaceRef&&e.subjectRef===i.subjectRef}function I(e){let i=[];for(let n of["agentRef","applicationRef"])if(e.profile[n]!==e.lifecycleLink[n])i.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)i.push("Lifecycle profile binding does not match the agent profile");if(!R(e.profile.scope,e.lifecycleLink.scope))i.push("Lifecycle scope does not match the agent profile");return i}function D(e){let{intent:i,progress:n}=e,r=[];if(n.deliveryRef!==i.deliveryRef||n.intent.ref!==i.deliveryRef||n.intent.digest!==i.deliveryDigest)r.push("Progress delivery does not match the intent");if(!R(n.scope,i.scope))r.push("Progress scope does not match the intent");if(n.recipientRef!==i.recipientRefs[0])r.push("Progress recipient does not match the intent");let u=i.requestedRoutes.find((y)=>y.ref===n.route.ref);if(!u||u.revision!==n.route.revision||u.digest!==n.route.digest)r.push("Progress route was not requested by the intent");if(Date.parse(n.occurredAt)<Date.parse(i.createdAt)||Date.parse(n.occurredAt)>Date.parse(i.expiresAt))r.push("Progress occurred outside the intent validity window");return r}var h="1.0.0",C=c.enum(["queued","dispatched","provider_accepted","delivered","read","failed","ambiguous","cancelled","policy_blocked"]),s=c.string().trim().min(1),q=c.object({schemaVersion:c.literal(h),progressRef:s,progressDigest:d,deliveryRef:s,intent:p,scope:m,recipientRef:s,attemptRef:s,route:f,status:C,providerReceiptRef:s.optional(),deliveryReceiptRef:s.optional(),readReceiptRef:s.optional(),reconciliation:p.optional(),failureCode:c.string().trim().min(1).optional(),effectAuthority:c.literal("none"),occurredAt:c.string().datetime({offset:!0}),evidenceRefs:c.array(s).min(1)}).strict().superRefine((e,i)=>{if(new Set(e.evidenceRefs).size!==e.evidenceRefs.length)a(i,"evidenceRefs","evidenceRefs must be unique");if(e.status==="provider_accepted"){if(!e.providerReceiptRef)a(i,"providerReceiptRef","provider acceptance requires a receipt");if(e.deliveryReceiptRef||e.readReceiptRef)a(i,"deliveryReceiptRef","provider acceptance is not delivery or read confirmation")}if(e.status==="delivered"&&!e.deliveryReceiptRef)a(i,"deliveryReceiptRef","delivery requires a delivery receipt");if(e.deliveryReceiptRef&&e.status!=="delivered"&&e.status!=="read")a(i,"deliveryReceiptRef","delivery receipt is valid only for delivered or read progress");if(e.readReceiptRef&&e.status!=="read")a(i,"readReceiptRef","read receipt is valid only for read progress");if(e.status==="read"&&(!e.deliveryReceiptRef||!e.readReceiptRef))a(i,"readReceiptRef","read requires delivery and read receipts");if(e.status==="ambiguous"&&!e.reconciliation)a(i,"reconciliation","ambiguous progress requires a reconciliation ref")});function a(e,i,n){e.addIssue({code:c.ZodIssueCode.custom,path:[i],message:n})}export{h as COMMUNICATION_DELIVERY_PROGRESS_SCHEMA_VERSION,C as CommunicationDeliveryProgressStatusSchema,q as CommunicationDeliveryProgressV1Schema};
@@ -0,0 +1,405 @@
1
+ export declare const CommunityIntelligenceProjectionV1Model: import("@lssm/lib.schema").SchemaModel<{
2
+ id: {
3
+ type: import("@lssm/lib.schema").FieldType<string, string>;
4
+ isOptional: false;
5
+ };
6
+ sourceId: {
7
+ type: import("@lssm/lib.schema").FieldType<string, string>;
8
+ isOptional: true;
9
+ };
10
+ trustZone: {
11
+ type: import("@lssm/lib.schema").FieldType<string, string>;
12
+ isOptional: false;
13
+ };
14
+ kind: {
15
+ type: import("@lssm/lib.schema").FieldType<string, string>;
16
+ isOptional: false;
17
+ };
18
+ subjectRef: {
19
+ type: import("@lssm/lib.schema").FieldType<string, string>;
20
+ isOptional: true;
21
+ };
22
+ windowStart: {
23
+ type: import("@lssm/lib.schema").FieldType<Date, string>;
24
+ isOptional: false;
25
+ };
26
+ windowEnd: {
27
+ type: import("@lssm/lib.schema").FieldType<Date, string>;
28
+ isOptional: false;
29
+ };
30
+ confidence: {
31
+ type: import("@lssm/lib.schema").FieldType<number, number>;
32
+ isOptional: false;
33
+ };
34
+ evidenceRefs: {
35
+ type: import("@lssm/lib.schema").FieldType<string, string>;
36
+ isArray: true;
37
+ isOptional: false;
38
+ };
39
+ payload: {
40
+ type: import("@lssm/lib.schema").FieldType<Record<string, unknown>, Record<string, unknown>>;
41
+ isOptional: false;
42
+ };
43
+ policyVersion: {
44
+ type: import("@lssm/lib.schema").FieldType<string, string>;
45
+ isOptional: false;
46
+ };
47
+ createdAt: {
48
+ type: import("@lssm/lib.schema").FieldType<Date, string>;
49
+ isOptional: false;
50
+ };
51
+ }>;
52
+ export declare const GetDiscordGuildCoverageV1Query: import("@lssm/lib.contracts-spec").OperationSpec<import("@lssm/lib.schema").SchemaModel<{
53
+ sourceRefs: {
54
+ type: import("@lssm/lib.schema").FieldType<string, string>;
55
+ isArray: true;
56
+ isOptional: true;
57
+ };
58
+ windowStart: {
59
+ type: import("@lssm/lib.schema").FieldType<Date, string>;
60
+ isOptional: true;
61
+ };
62
+ windowEnd: {
63
+ type: import("@lssm/lib.schema").FieldType<Date, string>;
64
+ isOptional: true;
65
+ };
66
+ limit: {
67
+ type: import("@lssm/lib.schema").FieldType<number, number>;
68
+ isOptional: true;
69
+ };
70
+ }>, import("@lssm/lib.schema").SchemaModel<{
71
+ items: {
72
+ type: import("@lssm/lib.schema").SchemaModel<{
73
+ id: {
74
+ type: import("@lssm/lib.schema").FieldType<string, string>;
75
+ isOptional: false;
76
+ };
77
+ sourceId: {
78
+ type: import("@lssm/lib.schema").FieldType<string, string>;
79
+ isOptional: true;
80
+ };
81
+ trustZone: {
82
+ type: import("@lssm/lib.schema").FieldType<string, string>;
83
+ isOptional: false;
84
+ };
85
+ kind: {
86
+ type: import("@lssm/lib.schema").FieldType<string, string>;
87
+ isOptional: false;
88
+ };
89
+ subjectRef: {
90
+ type: import("@lssm/lib.schema").FieldType<string, string>;
91
+ isOptional: true;
92
+ };
93
+ windowStart: {
94
+ type: import("@lssm/lib.schema").FieldType<Date, string>;
95
+ isOptional: false;
96
+ };
97
+ windowEnd: {
98
+ type: import("@lssm/lib.schema").FieldType<Date, string>;
99
+ isOptional: false;
100
+ };
101
+ confidence: {
102
+ type: import("@lssm/lib.schema").FieldType<number, number>;
103
+ isOptional: false;
104
+ };
105
+ evidenceRefs: {
106
+ type: import("@lssm/lib.schema").FieldType<string, string>;
107
+ isArray: true;
108
+ isOptional: false;
109
+ };
110
+ payload: {
111
+ type: import("@lssm/lib.schema").FieldType<Record<string, unknown>, Record<string, unknown>>;
112
+ isOptional: false;
113
+ };
114
+ policyVersion: {
115
+ type: import("@lssm/lib.schema").FieldType<string, string>;
116
+ isOptional: false;
117
+ };
118
+ createdAt: {
119
+ type: import("@lssm/lib.schema").FieldType<Date, string>;
120
+ isOptional: false;
121
+ };
122
+ }>;
123
+ isArray: true;
124
+ isOptional: false;
125
+ };
126
+ }>, undefined>;
127
+ export declare const ListCommunityInsightsV1Query: import("@lssm/lib.contracts-spec").OperationSpec<import("@lssm/lib.schema").SchemaModel<{
128
+ sourceRefs: {
129
+ type: import("@lssm/lib.schema").FieldType<string, string>;
130
+ isArray: true;
131
+ isOptional: true;
132
+ };
133
+ windowStart: {
134
+ type: import("@lssm/lib.schema").FieldType<Date, string>;
135
+ isOptional: true;
136
+ };
137
+ windowEnd: {
138
+ type: import("@lssm/lib.schema").FieldType<Date, string>;
139
+ isOptional: true;
140
+ };
141
+ limit: {
142
+ type: import("@lssm/lib.schema").FieldType<number, number>;
143
+ isOptional: true;
144
+ };
145
+ }>, import("@lssm/lib.schema").SchemaModel<{
146
+ items: {
147
+ type: import("@lssm/lib.schema").SchemaModel<{
148
+ id: {
149
+ type: import("@lssm/lib.schema").FieldType<string, string>;
150
+ isOptional: false;
151
+ };
152
+ sourceId: {
153
+ type: import("@lssm/lib.schema").FieldType<string, string>;
154
+ isOptional: true;
155
+ };
156
+ trustZone: {
157
+ type: import("@lssm/lib.schema").FieldType<string, string>;
158
+ isOptional: false;
159
+ };
160
+ kind: {
161
+ type: import("@lssm/lib.schema").FieldType<string, string>;
162
+ isOptional: false;
163
+ };
164
+ subjectRef: {
165
+ type: import("@lssm/lib.schema").FieldType<string, string>;
166
+ isOptional: true;
167
+ };
168
+ windowStart: {
169
+ type: import("@lssm/lib.schema").FieldType<Date, string>;
170
+ isOptional: false;
171
+ };
172
+ windowEnd: {
173
+ type: import("@lssm/lib.schema").FieldType<Date, string>;
174
+ isOptional: false;
175
+ };
176
+ confidence: {
177
+ type: import("@lssm/lib.schema").FieldType<number, number>;
178
+ isOptional: false;
179
+ };
180
+ evidenceRefs: {
181
+ type: import("@lssm/lib.schema").FieldType<string, string>;
182
+ isArray: true;
183
+ isOptional: false;
184
+ };
185
+ payload: {
186
+ type: import("@lssm/lib.schema").FieldType<Record<string, unknown>, Record<string, unknown>>;
187
+ isOptional: false;
188
+ };
189
+ policyVersion: {
190
+ type: import("@lssm/lib.schema").FieldType<string, string>;
191
+ isOptional: false;
192
+ };
193
+ createdAt: {
194
+ type: import("@lssm/lib.schema").FieldType<Date, string>;
195
+ isOptional: false;
196
+ };
197
+ }>;
198
+ isArray: true;
199
+ isOptional: false;
200
+ };
201
+ }>, undefined>;
202
+ export declare const GetCommunityStaffScorecardV1Query: import("@lssm/lib.contracts-spec").OperationSpec<import("@lssm/lib.schema").SchemaModel<{
203
+ sourceRefs: {
204
+ type: import("@lssm/lib.schema").FieldType<string, string>;
205
+ isArray: true;
206
+ isOptional: true;
207
+ };
208
+ windowStart: {
209
+ type: import("@lssm/lib.schema").FieldType<Date, string>;
210
+ isOptional: true;
211
+ };
212
+ windowEnd: {
213
+ type: import("@lssm/lib.schema").FieldType<Date, string>;
214
+ isOptional: true;
215
+ };
216
+ limit: {
217
+ type: import("@lssm/lib.schema").FieldType<number, number>;
218
+ isOptional: true;
219
+ };
220
+ staffPrincipalRef: {
221
+ type: import("@lssm/lib.schema").FieldType<string, string>;
222
+ isOptional: false;
223
+ };
224
+ }>, import("@lssm/lib.schema").SchemaModel<{
225
+ id: {
226
+ type: import("@lssm/lib.schema").FieldType<string, string>;
227
+ isOptional: false;
228
+ };
229
+ sourceId: {
230
+ type: import("@lssm/lib.schema").FieldType<string, string>;
231
+ isOptional: true;
232
+ };
233
+ trustZone: {
234
+ type: import("@lssm/lib.schema").FieldType<string, string>;
235
+ isOptional: false;
236
+ };
237
+ kind: {
238
+ type: import("@lssm/lib.schema").FieldType<string, string>;
239
+ isOptional: false;
240
+ };
241
+ subjectRef: {
242
+ type: import("@lssm/lib.schema").FieldType<string, string>;
243
+ isOptional: true;
244
+ };
245
+ windowStart: {
246
+ type: import("@lssm/lib.schema").FieldType<Date, string>;
247
+ isOptional: false;
248
+ };
249
+ windowEnd: {
250
+ type: import("@lssm/lib.schema").FieldType<Date, string>;
251
+ isOptional: false;
252
+ };
253
+ confidence: {
254
+ type: import("@lssm/lib.schema").FieldType<number, number>;
255
+ isOptional: false;
256
+ };
257
+ evidenceRefs: {
258
+ type: import("@lssm/lib.schema").FieldType<string, string>;
259
+ isArray: true;
260
+ isOptional: false;
261
+ };
262
+ payload: {
263
+ type: import("@lssm/lib.schema").FieldType<Record<string, unknown>, Record<string, unknown>>;
264
+ isOptional: false;
265
+ };
266
+ policyVersion: {
267
+ type: import("@lssm/lib.schema").FieldType<string, string>;
268
+ isOptional: false;
269
+ };
270
+ createdAt: {
271
+ type: import("@lssm/lib.schema").FieldType<Date, string>;
272
+ isOptional: false;
273
+ };
274
+ }>, undefined>;
275
+ export declare const ListCommunityKaizenDigestsV1Query: import("@lssm/lib.contracts-spec").OperationSpec<import("@lssm/lib.schema").SchemaModel<{
276
+ sourceRefs: {
277
+ type: import("@lssm/lib.schema").FieldType<string, string>;
278
+ isArray: true;
279
+ isOptional: true;
280
+ };
281
+ windowStart: {
282
+ type: import("@lssm/lib.schema").FieldType<Date, string>;
283
+ isOptional: true;
284
+ };
285
+ windowEnd: {
286
+ type: import("@lssm/lib.schema").FieldType<Date, string>;
287
+ isOptional: true;
288
+ };
289
+ limit: {
290
+ type: import("@lssm/lib.schema").FieldType<number, number>;
291
+ isOptional: true;
292
+ };
293
+ }>, import("@lssm/lib.schema").SchemaModel<{
294
+ items: {
295
+ type: import("@lssm/lib.schema").SchemaModel<{
296
+ id: {
297
+ type: import("@lssm/lib.schema").FieldType<string, string>;
298
+ isOptional: false;
299
+ };
300
+ sourceId: {
301
+ type: import("@lssm/lib.schema").FieldType<string, string>;
302
+ isOptional: true;
303
+ };
304
+ trustZone: {
305
+ type: import("@lssm/lib.schema").FieldType<string, string>;
306
+ isOptional: false;
307
+ };
308
+ kind: {
309
+ type: import("@lssm/lib.schema").FieldType<string, string>;
310
+ isOptional: false;
311
+ };
312
+ subjectRef: {
313
+ type: import("@lssm/lib.schema").FieldType<string, string>;
314
+ isOptional: true;
315
+ };
316
+ windowStart: {
317
+ type: import("@lssm/lib.schema").FieldType<Date, string>;
318
+ isOptional: false;
319
+ };
320
+ windowEnd: {
321
+ type: import("@lssm/lib.schema").FieldType<Date, string>;
322
+ isOptional: false;
323
+ };
324
+ confidence: {
325
+ type: import("@lssm/lib.schema").FieldType<number, number>;
326
+ isOptional: false;
327
+ };
328
+ evidenceRefs: {
329
+ type: import("@lssm/lib.schema").FieldType<string, string>;
330
+ isArray: true;
331
+ isOptional: false;
332
+ };
333
+ payload: {
334
+ type: import("@lssm/lib.schema").FieldType<Record<string, unknown>, Record<string, unknown>>;
335
+ isOptional: false;
336
+ };
337
+ policyVersion: {
338
+ type: import("@lssm/lib.schema").FieldType<string, string>;
339
+ isOptional: false;
340
+ };
341
+ createdAt: {
342
+ type: import("@lssm/lib.schema").FieldType<Date, string>;
343
+ isOptional: false;
344
+ };
345
+ }>;
346
+ isArray: true;
347
+ isOptional: false;
348
+ };
349
+ }>, undefined>;
350
+ export declare const GetCommunityKaizenDigestV1Query: import("@lssm/lib.contracts-spec").OperationSpec<import("@lssm/lib.schema").SchemaModel<{
351
+ digestRef: {
352
+ type: import("@lssm/lib.schema").FieldType<string, string>;
353
+ isOptional: false;
354
+ };
355
+ }>, import("@lssm/lib.schema").SchemaModel<{
356
+ id: {
357
+ type: import("@lssm/lib.schema").FieldType<string, string>;
358
+ isOptional: false;
359
+ };
360
+ sourceId: {
361
+ type: import("@lssm/lib.schema").FieldType<string, string>;
362
+ isOptional: true;
363
+ };
364
+ trustZone: {
365
+ type: import("@lssm/lib.schema").FieldType<string, string>;
366
+ isOptional: false;
367
+ };
368
+ kind: {
369
+ type: import("@lssm/lib.schema").FieldType<string, string>;
370
+ isOptional: false;
371
+ };
372
+ subjectRef: {
373
+ type: import("@lssm/lib.schema").FieldType<string, string>;
374
+ isOptional: true;
375
+ };
376
+ windowStart: {
377
+ type: import("@lssm/lib.schema").FieldType<Date, string>;
378
+ isOptional: false;
379
+ };
380
+ windowEnd: {
381
+ type: import("@lssm/lib.schema").FieldType<Date, string>;
382
+ isOptional: false;
383
+ };
384
+ confidence: {
385
+ type: import("@lssm/lib.schema").FieldType<number, number>;
386
+ isOptional: false;
387
+ };
388
+ evidenceRefs: {
389
+ type: import("@lssm/lib.schema").FieldType<string, string>;
390
+ isArray: true;
391
+ isOptional: false;
392
+ };
393
+ payload: {
394
+ type: import("@lssm/lib.schema").FieldType<Record<string, unknown>, Record<string, unknown>>;
395
+ isOptional: false;
396
+ };
397
+ policyVersion: {
398
+ type: import("@lssm/lib.schema").FieldType<string, string>;
399
+ isOptional: false;
400
+ };
401
+ createdAt: {
402
+ type: import("@lssm/lib.schema").FieldType<Date, string>;
403
+ isOptional: false;
404
+ };
405
+ }>, undefined>;
@@ -0,0 +1,2 @@
1
+ // @bun
2
+ import{defineQuery as t,docId as y}from"@lssm/lib.contracts-spec";import{defineSchemaModel as n,ScalarTypeEnum as e}from"@lssm/lib.schema";import{z as i}from"zod";var m={id:"communication-os.discord-community-intelligence.v1",title:"Multi-guild Discord community intelligence",body:"Additive contracts for policy-scoped Discord guild monitoring, protected provider events, governed identity correlation, evidence-backed community insights, coaching scorecards, and Kaizen digests. Raw staff content never enters cross-guild projections.",kind:"reference",route:"/docs/communication-os/discord-community-intelligence-v1",visibility:"public"},d=i.enum(["staff","managed-community"]),g=i.enum(["pending","active","degraded","revoked"]),C=i.object({id:i.string().min(1),tenantId:i.string().min(1),workspaceId:i.string().min(1),spaceId:i.string().min(1),network:i.literal("discord"),guildId:i.string().min(1),name:i.string().min(1),specialtyKeys:i.array(i.string().min(1)),trustZone:d,status:g,policyRef:i.string().min(1),retentionPolicyRef:i.string().min(1),createdAt:i.string().datetime(),updatedAt:i.string().datetime()}).strict(),I=i.object({id:i.string().min(1),sourceId:i.string().min(1),guildId:i.string().min(1),applicationId:i.string().min(1),botUserId:i.string().min(1),credentialRef:i.string().min(1),declaredIntents:i.array(i.string().min(1)),verifiedPermissions:i.array(i.string().min(1)),allowedChannelIds:i.array(i.string().min(1)),excludedChannelIds:i.array(i.string().min(1)),backfillDays:i.number().int().min(0).max(90),health:i.enum(["pending","healthy","degraded","offline","revoked"]),installationEvidenceRefs:i.array(i.string().min(1)).min(1),lastVerifiedAt:i.string().datetime().optional()}).strict(),V=i.object({id:i.string().min(1),tenantId:i.string().min(1),provider:i.literal("discord"),providerUserId:i.string().min(1),canonicalPrincipalRef:i.string().min(1).optional(),guildMemberships:i.array(i.object({guildId:i.string().min(1),roleIds:i.array(i.string().min(1)),state:i.enum(["active","left","banned"]),observedAt:i.string().datetime()}).strict()),mergeEvidence:i.array(i.object({providerUserId:i.string().min(1),decision:i.literal("approved"),decidedByPrincipalRef:i.string().min(1),evidenceRef:i.string().min(1),decidedAt:i.string().datetime()}).strict())}).strict(),b=i.object({id:i.string().min(1),schemaVersion:i.literal("2.0.0"),sourceId:i.string().min(1),trustZone:d,guildId:i.string().min(1),channelId:i.string().min(1).optional(),threadId:i.string().min(1).optional(),actorProviderUserId:i.string().min(1).optional(),eventKind:i.string().min(1),gatewaySessionId:i.string().min(1).optional(),gatewaySequence:i.number().int().nonnegative().optional(),providerEventId:i.string().min(1),occurredAt:i.string().datetime(),protectedContent:i.object({ciphertextRef:i.string().min(1),digest:i.string().min(1),redactionStatus:i.enum(["pending","applied","not_required"])}).strict().optional(),metadata:i.record(i.string(),i.string()),evidenceRefs:i.array(i.string().min(1)).min(1)}).strict(),s=i.object({sourceIds:i.array(i.string().min(1)).min(1),windowStart:i.string().datetime(),windowEnd:i.string().datetime(),confidence:i.number().min(0).max(1),evidenceRefs:i.array(i.string().min(1)).min(1)}).strict(),x=s.extend({id:i.string().min(1),kind:i.enum(["recurring_question","pain_point","friction_trend","emerging_topic","response_gap","moderation_pattern"]),title:i.string().min(1),summary:i.string().min(1),specialtyKeys:i.array(i.string().min(1)),metricValue:i.number().optional()}).strict(),D=s.extend({id:i.string().min(1),staffPrincipalRef:i.string().min(1),visibility:i.literal("authorized_manager"),metrics:i.record(i.string(),i.number()),coachingObservations:i.array(i.string().min(1))}).strict(),z=s.extend({id:i.string().min(1),status:i.enum(["draft","published"]),insightRefs:i.array(i.string().min(1)),changes:i.array(i.string().min(1)),suggestedExperiments:i.array(i.string().min(1)),generatedAt:i.string().datetime()}).strict();var f=[y(m.id)],r=(u,l,p)=>({key:u,version:"1.0.0",stability:"experimental",owners:["platform.communication-os"],tags:["communication","discord",...p],description:l,goal:"Provide governed, evidence-backed multi-guild community intelligence",context:"Tenant, workspace, actor, and trust-zone authority are derived by the server",docId:f}),o=n({name:"DiscordCommunityWindowQueryV1",fields:{sourceRefs:{type:e.String_unsecure(),isArray:!0,isOptional:!0},windowStart:{type:e.DateTime(),isOptional:!0},windowEnd:{type:e.DateTime(),isOptional:!0},limit:{type:e.Int_unsecure(),isOptional:!0}}}),a=n({name:"CommunityIntelligenceProjectionV1",fields:{id:{type:e.String_unsecure(),isOptional:!1},sourceId:{type:e.String_unsecure(),isOptional:!0},trustZone:{type:e.String_unsecure(),isOptional:!1},kind:{type:e.String_unsecure(),isOptional:!1},subjectRef:{type:e.String_unsecure(),isOptional:!0},windowStart:{type:e.DateTime(),isOptional:!1},windowEnd:{type:e.DateTime(),isOptional:!1},confidence:{type:e.Float_unsecure(),isOptional:!1},evidenceRefs:{type:e.String_unsecure(),isArray:!0,isOptional:!1},payload:{type:e.JSONObject(),isOptional:!1},policyVersion:{type:e.String_unsecure(),isOptional:!1},createdAt:{type:e.DateTime(),isOptional:!1}}}),c=n({name:"DiscordCommunityEvidenceProjectionListV1",fields:{items:{type:a,isArray:!0,isOptional:!1}}}),v=n({name:"CommunityStaffScorecardQueryV1",fields:{...o.config.fields,staffPrincipalRef:{type:e.String_unsecure(),isOptional:!1}}}),S=n({name:"CommunityKaizenDigestDetailQueryV1",fields:{digestRef:{type:e.String_unsecure(),isOptional:!1}}}),_=t({meta:r("communication.discord-community.coverage","Read evidenced capture completeness for selected guild sources",["coverage","query"]),io:{input:o,output:c},policy:{auth:"user"}}),P=t({meta:r("communication.community-insight.list","List policy-approved guild or portfolio insights",["insight","query"]),io:{input:o,output:c},policy:{auth:"user"}}),j=t({meta:r("communication.community-staff-scorecard.get","Read an evidence-backed individual coaching scorecard",["staff","scorecard"]),io:{input:v,output:a},policy:{auth:"admin"}}),E=t({meta:r("communication.community-kaizen-digest.list","List evidence-backed Kaizen digests",["kaizen","digest"]),io:{input:o,output:c},policy:{auth:"user"}}),A=t({meta:r("communication.community-kaizen-digest.get","Read one evidence-backed Kaizen digest",["kaizen","digest","detail"]),io:{input:S,output:a},policy:{auth:"user"}});export{a as CommunityIntelligenceProjectionV1Model,A as GetCommunityKaizenDigestV1Query,j as GetCommunityStaffScorecardV1Query,_ as GetDiscordGuildCoverageV1Query,P as ListCommunityInsightsV1Query,E as ListCommunityKaizenDigestsV1Query};