@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.
- package/README.md +201 -0
- package/dist/browser/capabilities/comms-ai.capabilities.js +1 -0
- package/dist/browser/capabilities/communication-os.capability-ids.js +1 -0
- package/dist/browser/capabilities/ecosystem-messaging.capabilities.js +1 -0
- package/dist/browser/capabilities/index.js +1 -0
- package/dist/browser/commands/comms-ai.commands.js +1 -0
- package/dist/browser/commands/index.js +1 -0
- package/dist/browser/contracts/agent-communication.js +1 -0
- package/dist/browser/contracts/agent-lifecycle-projection.js +1 -0
- package/dist/browser/contracts/agent-surface-control.js +1 -0
- package/dist/browser/contracts/ai-assistance.operations.js +1 -0
- package/dist/browser/contracts/artifact-digest.js +1 -0
- package/dist/browser/contracts/canonical-agent-conversation.js +1 -0
- package/dist/browser/contracts/channel-preferences.js +1 -0
- package/dist/browser/contracts/channel-routing.js +1 -0
- package/dist/browser/contracts/collaboration.operations.js +1 -0
- package/dist/browser/contracts/customer-live-chat-grant.operations.js +1 -0
- package/dist/browser/contracts/delivery-eligibility.js +1 -0
- package/dist/browser/contracts/delivery-fallback-eligibility-validation.js +1 -0
- package/dist/browser/contracts/delivery-fallback-validation.js +1 -0
- package/dist/browser/contracts/delivery-fallback.js +1 -0
- package/dist/browser/contracts/delivery-intent-validation.js +1 -0
- package/dist/browser/contracts/delivery-intent.js +1 -0
- package/dist/browser/contracts/delivery-progress.js +1 -0
- package/dist/browser/contracts/discord-community-intelligence.operations.js +1 -0
- package/dist/browser/contracts/discord-community.events.js +1 -0
- package/dist/browser/contracts/discord-community.models.js +1 -0
- package/dist/browser/contracts/discord-community.operations.js +1 -0
- package/dist/browser/contracts/ecosystem-attachment.operations.js +1 -0
- package/dist/browser/contracts/ecosystem-auth.operations.js +1 -0
- package/dist/browser/contracts/ecosystem-binding.operations.js +1 -0
- package/dist/browser/contracts/ecosystem-connection-subscription.events.js +1 -0
- package/dist/browser/contracts/ecosystem-governed-work-v2.operations.js +1 -0
- package/dist/browser/contracts/ecosystem-governed-work.operations.js +1 -0
- package/dist/browser/contracts/ecosystem-identity-v3.operations.js +1 -0
- package/dist/browser/contracts/ecosystem-identity.operations.js +1 -0
- package/dist/browser/contracts/ecosystem-message.operations.js +1 -0
- package/dist/browser/contracts/ecosystem-messaging.dtos.js +0 -0
- package/dist/browser/contracts/ecosystem-messaging.events.js +1 -0
- package/dist/browser/contracts/ecosystem-messaging.models.js +1 -0
- package/dist/browser/contracts/ecosystem-navigation-v3.operations.js +1 -0
- package/dist/browser/contracts/ecosystem-webhook.operations.js +1 -0
- package/dist/browser/contracts/ecosystem-workspace.operations.js +1 -0
- package/dist/browser/contracts/enums.js +1 -0
- package/dist/browser/contracts/erasure.operations.js +1 -0
- package/dist/browser/contracts/events.js +1 -0
- package/dist/browser/contracts/index.js +1 -0
- package/dist/browser/contracts/ingestion.js +1 -0
- package/dist/browser/contracts/ingress-admission-policy.js +1 -0
- package/dist/browser/contracts/ingress-admission.js +1 -0
- package/dist/browser/contracts/models.js +1 -0
- package/dist/browser/contracts/operations.js +1 -0
- package/dist/browser/contracts/persistence.js +1 -0
- package/dist/browser/contracts/preference-resolution.js +1 -0
- package/dist/browser/contracts/query.operations.js +1 -0
- package/dist/browser/contracts/sequence-intent.js +1 -0
- package/dist/browser/contracts/sovereignty.js +1 -0
- package/dist/browser/contracts/support-internal-note.operations.js +1 -0
- package/dist/browser/contracts/thread-link-kind.js +1 -0
- package/dist/browser/contracts/thread-message.operations.js +1 -0
- package/dist/browser/events/index.js +1 -0
- package/dist/browser/fixtures/agent-omnichannel-primitives.js +1 -0
- package/dist/browser/fixtures/agent-omnichannel.js +1 -0
- package/dist/browser/fixtures/gtm-learning-loop-neutral.parts.js +1 -0
- package/dist/browser/fixtures/index.js +1 -0
- package/dist/browser/fixtures/normalized-ingestion.js +1 -0
- package/dist/browser/index.js +1 -0
- package/dist/browser/queries/index.js +1 -0
- package/dist/browser/types/domain-command.js +0 -0
- package/dist/browser/types/index.js +1 -0
- package/dist/browser/validation/domain-command.js +1 -0
- package/dist/browser/validation/index.js +1 -0
- package/dist/capabilities/comms-ai.capabilities.d.ts +72 -0
- package/dist/capabilities/comms-ai.capabilities.js +2 -0
- package/dist/capabilities/communication-os-capability-boundary.test.d.ts +1 -0
- package/dist/capabilities/communication-os.capability-ids.d.ts +39 -0
- package/dist/capabilities/communication-os.capability-ids.js +2 -0
- package/dist/capabilities/communication-os.capability-ids.test.d.ts +1 -0
- package/dist/capabilities/ecosystem-messaging.capabilities.d.ts +9 -0
- package/dist/capabilities/ecosystem-messaging.capabilities.js +2 -0
- package/dist/capabilities/index.d.ts +4 -0
- package/dist/capabilities/index.js +2 -0
- package/dist/commands/comms-ai.commands.d.ts +272 -0
- package/dist/commands/comms-ai.commands.js +2 -0
- package/dist/commands/index.d.ts +10 -0
- package/dist/commands/index.js +2 -0
- package/dist/contracts/agent-communication.d.ts +108 -0
- package/dist/contracts/agent-communication.js +2 -0
- package/dist/contracts/agent-communication.test.d.ts +1 -0
- package/dist/contracts/agent-lifecycle-projection.d.ts +98 -0
- package/dist/contracts/agent-lifecycle-projection.js +2 -0
- package/dist/contracts/agent-lifecycle-projection.test.d.ts +1 -0
- package/dist/contracts/agent-surface-control.d.ts +210 -0
- package/dist/contracts/agent-surface-control.js +2 -0
- package/dist/contracts/agent-surface-control.test.d.ts +1 -0
- package/dist/contracts/ai-assistance.operations.d.ts +187 -0
- package/dist/contracts/ai-assistance.operations.js +2 -0
- package/dist/contracts/artifact-digest.d.ts +3 -0
- package/dist/contracts/artifact-digest.js +2 -0
- package/dist/contracts/canonical-agent-conversation.d.ts +46 -0
- package/dist/contracts/canonical-agent-conversation.js +2 -0
- package/dist/contracts/canonical-agent-conversation.test.d.ts +1 -0
- package/dist/contracts/channel-preferences.d.ts +115 -0
- package/dist/contracts/channel-preferences.js +2 -0
- package/dist/contracts/channel-routing.d.ts +58 -0
- package/dist/contracts/channel-routing.js +2 -0
- package/dist/contracts/channel-routing.test.d.ts +1 -0
- package/dist/contracts/collaboration.operations.d.ts +315 -0
- package/dist/contracts/collaboration.operations.js +2 -0
- package/dist/contracts/customer-live-chat-grant.operations.d.ts +132 -0
- package/dist/contracts/customer-live-chat-grant.operations.js +2 -0
- package/dist/contracts/delivery-contracts.test.d.ts +1 -0
- package/dist/contracts/delivery-eligibility.d.ts +126 -0
- package/dist/contracts/delivery-eligibility.js +2 -0
- package/dist/contracts/delivery-eligibility.test.d.ts +1 -0
- package/dist/contracts/delivery-fallback-eligibility-validation.d.ts +6 -0
- package/dist/contracts/delivery-fallback-eligibility-validation.js +2 -0
- package/dist/contracts/delivery-fallback-validation.d.ts +24 -0
- package/dist/contracts/delivery-fallback-validation.js +2 -0
- package/dist/contracts/delivery-fallback.d.ts +117 -0
- package/dist/contracts/delivery-fallback.js +2 -0
- package/dist/contracts/delivery-intent-validation.d.ts +13 -0
- package/dist/contracts/delivery-intent-validation.js +2 -0
- package/dist/contracts/delivery-intent.d.ts +137 -0
- package/dist/contracts/delivery-intent.js +2 -0
- package/dist/contracts/delivery-progress.d.ts +61 -0
- package/dist/contracts/delivery-progress.js +2 -0
- package/dist/contracts/discord-community-intelligence.operations.d.ts +405 -0
- package/dist/contracts/discord-community-intelligence.operations.js +2 -0
- package/dist/contracts/discord-community.events.d.ts +162 -0
- package/dist/contracts/discord-community.events.js +2 -0
- package/dist/contracts/discord-community.models.d.ts +167 -0
- package/dist/contracts/discord-community.models.js +2 -0
- package/dist/contracts/discord-community.operations.d.ts +663 -0
- package/dist/contracts/discord-community.operations.js +2 -0
- package/dist/contracts/discord-community.test.d.ts +1 -0
- package/dist/contracts/ecosystem-attachment.operations.d.ts +129 -0
- package/dist/contracts/ecosystem-attachment.operations.js +2 -0
- package/dist/contracts/ecosystem-auth.operations.d.ts +345 -0
- package/dist/contracts/ecosystem-auth.operations.js +2 -0
- package/dist/contracts/ecosystem-binding.operations.d.ts +231 -0
- package/dist/contracts/ecosystem-binding.operations.js +2 -0
- package/dist/contracts/ecosystem-connection-subscription.events.d.ts +332 -0
- package/dist/contracts/ecosystem-connection-subscription.events.js +2 -0
- package/dist/contracts/ecosystem-governed-work-v2.operations.d.ts +234 -0
- package/dist/contracts/ecosystem-governed-work-v2.operations.js +2 -0
- package/dist/contracts/ecosystem-governed-work.operations.d.ts +265 -0
- package/dist/contracts/ecosystem-governed-work.operations.js +2 -0
- package/dist/contracts/ecosystem-governed-work.operations.test.d.ts +1 -0
- package/dist/contracts/ecosystem-identity-v3.operations.d.ts +65 -0
- package/dist/contracts/ecosystem-identity-v3.operations.js +2 -0
- package/dist/contracts/ecosystem-identity.operations.d.ts +174 -0
- package/dist/contracts/ecosystem-identity.operations.js +2 -0
- package/dist/contracts/ecosystem-identity.operations.test.d.ts +1 -0
- package/dist/contracts/ecosystem-message.operations.d.ts +1092 -0
- package/dist/contracts/ecosystem-message.operations.js +2 -0
- package/dist/contracts/ecosystem-messaging.dtos.d.ts +68 -0
- package/dist/contracts/ecosystem-messaging.dtos.js +1 -0
- package/dist/contracts/ecosystem-messaging.dtos.test.d.ts +1 -0
- package/dist/contracts/ecosystem-messaging.events.d.ts +608 -0
- package/dist/contracts/ecosystem-messaging.events.js +2 -0
- package/dist/contracts/ecosystem-messaging.models.d.ts +386 -0
- package/dist/contracts/ecosystem-messaging.models.js +2 -0
- package/dist/contracts/ecosystem-messaging.test.d.ts +1 -0
- package/dist/contracts/ecosystem-navigation-v3.operations.d.ts +149 -0
- package/dist/contracts/ecosystem-navigation-v3.operations.js +2 -0
- package/dist/contracts/ecosystem-webhook.operations.d.ts +187 -0
- package/dist/contracts/ecosystem-webhook.operations.js +2 -0
- package/dist/contracts/ecosystem-workspace.operations.d.ts +590 -0
- package/dist/contracts/ecosystem-workspace.operations.js +2 -0
- package/dist/contracts/enums.d.ts +9 -0
- package/dist/contracts/enums.js +2 -0
- package/dist/contracts/erasure.operations.d.ts +114 -0
- package/dist/contracts/erasure.operations.js +2 -0
- package/dist/contracts/erasure.test.d.ts +1 -0
- package/dist/contracts/events.d.ts +174 -0
- package/dist/contracts/events.js +2 -0
- package/dist/contracts/index.d.ts +43 -0
- package/dist/contracts/index.js +2 -0
- package/dist/contracts/ingestion.d.ts +169 -0
- package/dist/contracts/ingestion.js +2 -0
- package/dist/contracts/ingress-admission-policy.d.ts +14 -0
- package/dist/contracts/ingress-admission-policy.js +2 -0
- package/dist/contracts/ingress-admission.d.ts +184 -0
- package/dist/contracts/ingress-admission.js +2 -0
- package/dist/contracts/ingress-admission.test.d.ts +1 -0
- package/dist/contracts/models.d.ts +851 -0
- package/dist/contracts/models.js +2 -0
- package/dist/contracts/operations.d.ts +5 -0
- package/dist/contracts/operations.js +2 -0
- package/dist/contracts/persistence.d.ts +353 -0
- package/dist/contracts/persistence.js +2 -0
- package/dist/contracts/persistence.test.d.ts +1 -0
- package/dist/contracts/preference-resolution.d.ts +154 -0
- package/dist/contracts/preference-resolution.js +2 -0
- package/dist/contracts/preference-resolution.test.d.ts +1 -0
- package/dist/contracts/query.operations.d.ts +600 -0
- package/dist/contracts/query.operations.js +2 -0
- package/dist/contracts/sequence-intent.d.ts +103 -0
- package/dist/contracts/sequence-intent.js +2 -0
- package/dist/contracts/sequence-intent.test.d.ts +1 -0
- package/dist/contracts/sovereignty.d.ts +164 -0
- package/dist/contracts/sovereignty.js +2 -0
- package/dist/contracts/support-internal-note.operations.d.ts +309 -0
- package/dist/contracts/support-internal-note.operations.js +2 -0
- package/dist/contracts/support-internal-note.operations.test.d.ts +1 -0
- package/dist/contracts/thread-link-kind.d.ts +20 -0
- package/dist/contracts/thread-link-kind.js +2 -0
- package/dist/contracts/thread-message.operations.d.ts +485 -0
- package/dist/contracts/thread-message.operations.js +2 -0
- package/dist/events/index.d.ts +4 -0
- package/dist/events/index.js +2 -0
- package/dist/fixtures/agent-omnichannel-primitives.d.ts +240 -0
- package/dist/fixtures/agent-omnichannel-primitives.js +2 -0
- package/dist/fixtures/agent-omnichannel.d.ts +682 -0
- package/dist/fixtures/agent-omnichannel.js +2 -0
- package/dist/fixtures/agent-omnichannel.test.d.ts +1 -0
- package/dist/fixtures/gtm-learning-loop-neutral.parts.d.ts +20 -0
- package/dist/fixtures/gtm-learning-loop-neutral.parts.js +2 -0
- package/dist/fixtures/index.d.ts +3 -0
- package/dist/fixtures/index.js +2 -0
- package/dist/fixtures/normalized-ingestion.d.ts +102 -0
- package/dist/fixtures/normalized-ingestion.js +2 -0
- package/dist/fixtures/normalized-ingestion.test.d.ts +1 -0
- package/dist/index.d.ts +7 -0
- package/dist/index.js +2 -0
- package/dist/node/capabilities/comms-ai.capabilities.js +1 -0
- package/dist/node/capabilities/communication-os.capability-ids.js +1 -0
- package/dist/node/capabilities/ecosystem-messaging.capabilities.js +1 -0
- package/dist/node/capabilities/index.js +1 -0
- package/dist/node/commands/comms-ai.commands.js +1 -0
- package/dist/node/commands/index.js +1 -0
- package/dist/node/contracts/agent-communication.js +1 -0
- package/dist/node/contracts/agent-lifecycle-projection.js +1 -0
- package/dist/node/contracts/agent-surface-control.js +1 -0
- package/dist/node/contracts/ai-assistance.operations.js +1 -0
- package/dist/node/contracts/artifact-digest.js +1 -0
- package/dist/node/contracts/canonical-agent-conversation.js +1 -0
- package/dist/node/contracts/channel-preferences.js +1 -0
- package/dist/node/contracts/channel-routing.js +1 -0
- package/dist/node/contracts/collaboration.operations.js +1 -0
- package/dist/node/contracts/customer-live-chat-grant.operations.js +1 -0
- package/dist/node/contracts/delivery-eligibility.js +1 -0
- package/dist/node/contracts/delivery-fallback-eligibility-validation.js +1 -0
- package/dist/node/contracts/delivery-fallback-validation.js +1 -0
- package/dist/node/contracts/delivery-fallback.js +1 -0
- package/dist/node/contracts/delivery-intent-validation.js +1 -0
- package/dist/node/contracts/delivery-intent.js +1 -0
- package/dist/node/contracts/delivery-progress.js +1 -0
- package/dist/node/contracts/discord-community-intelligence.operations.js +1 -0
- package/dist/node/contracts/discord-community.events.js +1 -0
- package/dist/node/contracts/discord-community.models.js +1 -0
- package/dist/node/contracts/discord-community.operations.js +1 -0
- package/dist/node/contracts/ecosystem-attachment.operations.js +1 -0
- package/dist/node/contracts/ecosystem-auth.operations.js +1 -0
- package/dist/node/contracts/ecosystem-binding.operations.js +1 -0
- package/dist/node/contracts/ecosystem-connection-subscription.events.js +1 -0
- package/dist/node/contracts/ecosystem-governed-work-v2.operations.js +1 -0
- package/dist/node/contracts/ecosystem-governed-work.operations.js +1 -0
- package/dist/node/contracts/ecosystem-identity-v3.operations.js +1 -0
- package/dist/node/contracts/ecosystem-identity.operations.js +1 -0
- package/dist/node/contracts/ecosystem-message.operations.js +1 -0
- package/dist/node/contracts/ecosystem-messaging.dtos.js +0 -0
- package/dist/node/contracts/ecosystem-messaging.events.js +1 -0
- package/dist/node/contracts/ecosystem-messaging.models.js +1 -0
- package/dist/node/contracts/ecosystem-navigation-v3.operations.js +1 -0
- package/dist/node/contracts/ecosystem-webhook.operations.js +1 -0
- package/dist/node/contracts/ecosystem-workspace.operations.js +1 -0
- package/dist/node/contracts/enums.js +1 -0
- package/dist/node/contracts/erasure.operations.js +1 -0
- package/dist/node/contracts/events.js +1 -0
- package/dist/node/contracts/index.js +1 -0
- package/dist/node/contracts/ingestion.js +1 -0
- package/dist/node/contracts/ingress-admission-policy.js +1 -0
- package/dist/node/contracts/ingress-admission.js +1 -0
- package/dist/node/contracts/models.js +1 -0
- package/dist/node/contracts/operations.js +1 -0
- package/dist/node/contracts/persistence.js +1 -0
- package/dist/node/contracts/preference-resolution.js +1 -0
- package/dist/node/contracts/query.operations.js +1 -0
- package/dist/node/contracts/sequence-intent.js +1 -0
- package/dist/node/contracts/sovereignty.js +1 -0
- package/dist/node/contracts/support-internal-note.operations.js +1 -0
- package/dist/node/contracts/thread-link-kind.js +1 -0
- package/dist/node/contracts/thread-message.operations.js +1 -0
- package/dist/node/events/index.js +1 -0
- package/dist/node/fixtures/agent-omnichannel-primitives.js +1 -0
- package/dist/node/fixtures/agent-omnichannel.js +1 -0
- package/dist/node/fixtures/gtm-learning-loop-neutral.parts.js +1 -0
- package/dist/node/fixtures/index.js +1 -0
- package/dist/node/fixtures/normalized-ingestion.js +1 -0
- package/dist/node/index.js +1 -0
- package/dist/node/queries/index.js +1 -0
- package/dist/node/types/domain-command.js +0 -0
- package/dist/node/types/index.js +1 -0
- package/dist/node/validation/domain-command.js +1 -0
- package/dist/node/validation/index.js +1 -0
- package/dist/package-exports.test.d.ts +1 -0
- package/dist/queries/index.d.ts +4 -0
- package/dist/queries/index.js +2 -0
- package/dist/types/domain-command.d.ts +54 -0
- package/dist/types/domain-command.js +1 -0
- package/dist/types/index.d.ts +3 -0
- package/dist/types/index.js +2 -0
- package/dist/validation/domain-command.d.ts +3 -0
- package/dist/validation/domain-command.js +2 -0
- package/dist/validation/index.d.ts +53 -0
- package/dist/validation/index.js +2 -0
- 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};
|