@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,154 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import type { CommunicationPreferenceSetV1 } from './channel-preferences.js';
|
|
3
|
+
export declare const COMMUNICATION_PREFERENCE_RESOLUTION_SCHEMA_VERSION: '1.0.0';
|
|
4
|
+
export declare const COMMUNICATION_PLATFORM_DEFAULT_PREFERENCE_TARGET_REF: 'communication:preference-target:platform-default';
|
|
5
|
+
/** Resolution proceeds from the most specific available tier to the default. */
|
|
6
|
+
export declare const COMMUNICATION_PREFERENCE_RESOLUTION_TIERS: readonly [readonly ['event', 'automation'], readonly ['feature', 'application'], readonly ['product'], readonly ['space', 'person'], readonly ['platform_default']];
|
|
7
|
+
export declare const CommunicationPreferenceResolutionTargetKindSchema: z.ZodEnum<{
|
|
8
|
+
application: "application";
|
|
9
|
+
automation: "automation";
|
|
10
|
+
event: "event";
|
|
11
|
+
feature: "feature";
|
|
12
|
+
person: "person";
|
|
13
|
+
platform_default: "platform_default";
|
|
14
|
+
product: "product";
|
|
15
|
+
space: "space";
|
|
16
|
+
}>;
|
|
17
|
+
/** Exactly one typed resolution target and its opaque canonical reference. */
|
|
18
|
+
export declare const CommunicationPreferenceResolutionTargetV1Schema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
19
|
+
kind: z.ZodLiteral<"event">;
|
|
20
|
+
ref: z.ZodString;
|
|
21
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
22
|
+
kind: z.ZodLiteral<"automation">;
|
|
23
|
+
ref: z.ZodString;
|
|
24
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
25
|
+
kind: z.ZodLiteral<"feature">;
|
|
26
|
+
ref: z.ZodString;
|
|
27
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
28
|
+
kind: z.ZodLiteral<"application">;
|
|
29
|
+
ref: z.ZodString;
|
|
30
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
31
|
+
kind: z.ZodLiteral<"product">;
|
|
32
|
+
ref: z.ZodString;
|
|
33
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
34
|
+
kind: z.ZodLiteral<"space">;
|
|
35
|
+
ref: z.ZodString;
|
|
36
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
37
|
+
kind: z.ZodLiteral<"person">;
|
|
38
|
+
ref: z.ZodString;
|
|
39
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
40
|
+
kind: z.ZodLiteral<"platform_default">;
|
|
41
|
+
ref: z.ZodLiteral<"communication:preference-target:platform-default">;
|
|
42
|
+
}, z.core.$strict>], "kind">;
|
|
43
|
+
export declare const CommunicationEvaluatedPreferenceSetV1Schema: z.ZodObject<{
|
|
44
|
+
preferenceSetRef: z.ZodString;
|
|
45
|
+
revision: z.ZodNumber;
|
|
46
|
+
digest: z.ZodString;
|
|
47
|
+
target: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
48
|
+
kind: z.ZodLiteral<"event">;
|
|
49
|
+
ref: z.ZodString;
|
|
50
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
51
|
+
kind: z.ZodLiteral<"automation">;
|
|
52
|
+
ref: z.ZodString;
|
|
53
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
54
|
+
kind: z.ZodLiteral<"feature">;
|
|
55
|
+
ref: z.ZodString;
|
|
56
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
57
|
+
kind: z.ZodLiteral<"application">;
|
|
58
|
+
ref: z.ZodString;
|
|
59
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
60
|
+
kind: z.ZodLiteral<"product">;
|
|
61
|
+
ref: z.ZodString;
|
|
62
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
63
|
+
kind: z.ZodLiteral<"space">;
|
|
64
|
+
ref: z.ZodString;
|
|
65
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
66
|
+
kind: z.ZodLiteral<"person">;
|
|
67
|
+
ref: z.ZodString;
|
|
68
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
69
|
+
kind: z.ZodLiteral<"platform_default">;
|
|
70
|
+
ref: z.ZodLiteral<"communication:preference-target:platform-default">;
|
|
71
|
+
}, z.core.$strict>], "kind">;
|
|
72
|
+
}, z.core.$strict>;
|
|
73
|
+
/** Replayable preference evaluation evidence; it grants no send authority. */
|
|
74
|
+
export declare const CommunicationPreferenceResolutionResultV1Schema: z.ZodObject<{
|
|
75
|
+
schemaVersion: z.ZodLiteral<"1.0.0">;
|
|
76
|
+
resolutionRef: z.ZodString;
|
|
77
|
+
scope: z.ZodObject<{
|
|
78
|
+
tenantRef: z.ZodString;
|
|
79
|
+
workspaceRef: z.ZodOptional<z.ZodString>;
|
|
80
|
+
spaceRef: z.ZodOptional<z.ZodString>;
|
|
81
|
+
subjectRef: z.ZodString;
|
|
82
|
+
}, z.core.$strict>;
|
|
83
|
+
subjectRef: z.ZodString;
|
|
84
|
+
evaluatedPreferenceSets: z.ZodArray<z.ZodObject<{
|
|
85
|
+
preferenceSetRef: z.ZodString;
|
|
86
|
+
revision: z.ZodNumber;
|
|
87
|
+
digest: z.ZodString;
|
|
88
|
+
target: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
89
|
+
kind: z.ZodLiteral<"event">;
|
|
90
|
+
ref: z.ZodString;
|
|
91
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
92
|
+
kind: z.ZodLiteral<"automation">;
|
|
93
|
+
ref: z.ZodString;
|
|
94
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
95
|
+
kind: z.ZodLiteral<"feature">;
|
|
96
|
+
ref: z.ZodString;
|
|
97
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
98
|
+
kind: z.ZodLiteral<"application">;
|
|
99
|
+
ref: z.ZodString;
|
|
100
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
101
|
+
kind: z.ZodLiteral<"product">;
|
|
102
|
+
ref: z.ZodString;
|
|
103
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
104
|
+
kind: z.ZodLiteral<"space">;
|
|
105
|
+
ref: z.ZodString;
|
|
106
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
107
|
+
kind: z.ZodLiteral<"person">;
|
|
108
|
+
ref: z.ZodString;
|
|
109
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
110
|
+
kind: z.ZodLiteral<"platform_default">;
|
|
111
|
+
ref: z.ZodLiteral<"communication:preference-target:platform-default">;
|
|
112
|
+
}, z.core.$strict>], "kind">;
|
|
113
|
+
}, z.core.$strict>>;
|
|
114
|
+
winningPreferenceSetRef: z.ZodString;
|
|
115
|
+
winningTarget: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
116
|
+
kind: z.ZodLiteral<"event">;
|
|
117
|
+
ref: z.ZodString;
|
|
118
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
119
|
+
kind: z.ZodLiteral<"automation">;
|
|
120
|
+
ref: z.ZodString;
|
|
121
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
122
|
+
kind: z.ZodLiteral<"feature">;
|
|
123
|
+
ref: z.ZodString;
|
|
124
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
125
|
+
kind: z.ZodLiteral<"application">;
|
|
126
|
+
ref: z.ZodString;
|
|
127
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
128
|
+
kind: z.ZodLiteral<"product">;
|
|
129
|
+
ref: z.ZodString;
|
|
130
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
131
|
+
kind: z.ZodLiteral<"space">;
|
|
132
|
+
ref: z.ZodString;
|
|
133
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
134
|
+
kind: z.ZodLiteral<"person">;
|
|
135
|
+
ref: z.ZodString;
|
|
136
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
137
|
+
kind: z.ZodLiteral<"platform_default">;
|
|
138
|
+
ref: z.ZodLiteral<"communication:preference-target:platform-default">;
|
|
139
|
+
}, z.core.$strict>], "kind">;
|
|
140
|
+
authority: z.ZodLiteral<"preference_only">;
|
|
141
|
+
effectAuthority: z.ZodLiteral<"none">;
|
|
142
|
+
resolvedAt: z.ZodString;
|
|
143
|
+
evidenceRefs: z.ZodArray<z.ZodString>;
|
|
144
|
+
resolutionDigest: z.ZodString;
|
|
145
|
+
}, z.core.$strict>;
|
|
146
|
+
export type CommunicationPreferenceResolutionTargetKind = z.infer<typeof CommunicationPreferenceResolutionTargetKindSchema>;
|
|
147
|
+
export type CommunicationPreferenceResolutionTargetV1 = z.infer<typeof CommunicationPreferenceResolutionTargetV1Schema>;
|
|
148
|
+
export type CommunicationEvaluatedPreferenceSetV1 = z.infer<typeof CommunicationEvaluatedPreferenceSetV1Schema>;
|
|
149
|
+
export type CommunicationPreferenceResolutionResultV1 = z.infer<typeof CommunicationPreferenceResolutionResultV1Schema>;
|
|
150
|
+
/** Pure validation of the winning result against its persisted preference set. */
|
|
151
|
+
export declare function validateCommunicationPreferenceResolutionBindingV1(input: {
|
|
152
|
+
preferenceResolution: CommunicationPreferenceResolutionResultV1;
|
|
153
|
+
preferenceSet: CommunicationPreferenceSetV1;
|
|
154
|
+
}): string[];
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
// @bun
|
|
2
|
+
import{z as c}from"zod";import{z as r}from"zod";var C="1.0.0",P="1.0.0",I={id:"communication-os.agent-omnichannel.v1",title:"CommunicationOS agent omnichannel contracts",body:"Provider-neutral agent profiles and lifecycle links bind applications, runs, tasks, help requests, background results, routes, preferences, policies, and evidence through opaque references. They grant no provider access or effect authority.",kind:"reference",route:"/docs/communication-os/agent-omnichannel-v1",visibility:"public"},o=r.string().trim().min(1),h=r.string().datetime({offset:!0}),m=r.string().regex(/^sha256:[a-f0-9]{64}$/),S=r.object({ref:o,digest:m}).strict(),l=S.extend({revision:r.number().int().positive()}).strict(),d=r.object({tenantRef:o,workspaceRef:o.optional(),spaceRef:o.optional(),subjectRef:o}).strict(),k=r.object({schemaVersion:r.literal(C),profileRef:o,revision:r.number().int().positive(),agentRef:o,applicationRef:o,scope:d,routeBindings:r.array(l),connectionRefs:r.array(o),preferenceSet:l,policyRefs:r.array(o).min(1),evidenceRefs:r.array(o).min(1),createdAt:h,updatedAt:h,profileDigest:m}).strict().superRefine((e,t)=>{for(let i of["connectionRefs","policyRefs","evidenceRefs"])if(new Set(e[i]).size!==e[i].length)t.addIssue({code:r.ZodIssueCode.custom,path:[i],message:`${i} must be unique`});let n=e.routeBindings.map((i)=>i.ref);if(new Set(n).size!==n.length)t.addIssue({code:r.ZodIssueCode.custom,path:["routeBindings"],message:"route bindings must be unique"})}),T=r.object({schemaVersion:r.literal(P),linkRef:o,profile:l,agentRef:o,applicationRef:o,scope:d,runRef:o.optional(),taskRef:o.optional(),helpRequestRef:o.optional(),approvalRequestRef:o.optional(),backgroundResultRef:o.optional(),canonicalConversation:S.optional(),session:l.optional(),correlationRef:o,evidenceRefs:r.array(o).min(1)}).strict().superRefine((e,t)=>{if(new Set(e.evidenceRefs).size!==e.evidenceRefs.length)t.addIssue({code:r.ZodIssueCode.custom,path:["evidenceRefs"],message:"evidenceRefs must be unique"});if(!e.runRef&&!e.taskRef&&!e.helpRequestRef&&!e.approvalRequestRef&&!e.backgroundResultRef)t.addIssue({code:r.ZodIssueCode.custom,path:["runRef"],message:"at least one run, task, help request, approval request, or background result ref is required"})});function g(e,t){return e.tenantRef===t.tenantRef&&e.workspaceRef===t.workspaceRef&&e.spaceRef===t.spaceRef&&e.subjectRef===t.subjectRef}function w(e){let t=[];for(let n of["agentRef","applicationRef"])if(e.profile[n]!==e.lifecycleLink[n])t.push(`Lifecycle ${n} does not match the agent profile`);if(e.lifecycleLink.profile.ref!==e.profile.profileRef||e.lifecycleLink.profile.revision!==e.profile.revision||e.lifecycleLink.profile.digest!==e.profile.profileDigest)t.push("Lifecycle profile binding does not match the agent profile");if(!g(e.profile.scope,e.lifecycleLink.scope))t.push("Lifecycle scope does not match the agent profile");return t}function x(e){let{intent:t,progress:n}=e,i=[];if(n.deliveryRef!==t.deliveryRef||n.intent.ref!==t.deliveryRef||n.intent.digest!==t.deliveryDigest)i.push("Progress delivery does not match the intent");if(!g(n.scope,t.scope))i.push("Progress scope does not match the intent");if(n.recipientRef!==t.recipientRefs[0])i.push("Progress recipient does not match the intent");let s=t.requestedRoutes.find((f)=>f.ref===n.route.ref);if(!s||s.revision!==n.route.revision||s.digest!==n.route.digest)i.push("Progress route was not requested by the intent");if(Date.parse(n.occurredAt)<Date.parse(t.createdAt)||Date.parse(n.occurredAt)>Date.parse(t.expiresAt))i.push("Progress occurred outside the intent validity window");return i}var V="1.0.0",b="communication:preference-target:platform-default",N=[["event","automation"],["feature","application"],["product"],["space","person"],["platform_default"]],O=c.enum(["event","automation","feature","application","product","space","person","platform_default"]),p=c.string().trim().min(1);function a(e){return c.object({kind:c.literal(e),ref:p}).strict()}var y=c.discriminatedUnion("kind",[a("event"),a("automation"),a("feature"),a("application"),a("product"),a("space"),a("person"),c.object({kind:c.literal("platform_default"),ref:c.literal(b)}).strict()]),A=c.object({preferenceSetRef:p,revision:c.number().int().positive(),digest:m,target:y}).strict(),D=c.object({schemaVersion:c.literal(V),resolutionRef:p,scope:d,subjectRef:p,evaluatedPreferenceSets:c.array(A).min(1),winningPreferenceSetRef:p,winningTarget:y,authority:c.literal("preference_only"),effectAuthority:c.literal("none"),resolvedAt:c.string().datetime({offset:!0}),evidenceRefs:c.array(p).min(1),resolutionDigest:m}).strict().superRefine((e,t)=>{let n=e.evaluatedPreferenceSets.map((s)=>s.preferenceSetRef);if(new Set(n).size!==n.length)u(t,"evaluatedPreferenceSets","evaluated sets must be unique");if(new Set(e.evidenceRefs).size!==e.evidenceRefs.length)u(t,"evidenceRefs","evidenceRefs must be unique");for(let s=1;s<e.evaluatedPreferenceSets.length;s+=1){let f=e.evaluatedPreferenceSets[s-1],R=e.evaluatedPreferenceSets[s];if(f&&R&&v(f.target.kind)>v(R.target.kind)){u(t,"evaluatedPreferenceSets","evaluated sets must follow the preference resolution hierarchy");break}}let i=e.evaluatedPreferenceSets.find((s)=>s.preferenceSetRef===e.winningPreferenceSetRef);if(!i)u(t,"winningPreferenceSetRef","winning preference set must have been evaluated");else if(i.preferenceSetRef!==e.evaluatedPreferenceSets[0]?.preferenceSetRef)u(t,"winningPreferenceSetRef","winning preference set must be the most specific evaluated set");else if(i.target.kind!==e.winningTarget.kind||i.target.ref!==e.winningTarget.ref)u(t,"winningTarget","winning target must match the winning preference set")});function v(e){switch(e){case"event":case"automation":return 0;case"feature":case"application":return 1;case"product":return 2;case"space":case"person":return 3;case"platform_default":return 4}}function u(e,t,n){e.addIssue({code:c.ZodIssueCode.custom,path:[t],message:n})}function q(e){let{preferenceResolution:t,preferenceSet:n}=e,i=[];if(t.subjectRef!==n.scope.subjectRef||t.winningPreferenceSetRef!==n.preferenceSetRef)i.push("Preference resolution does not match its subject and set");if(!g(t.scope,n.scope))i.push("Preference resolution scope does not match its preference set");let s=t.evaluatedPreferenceSets.find((f)=>f.preferenceSetRef===n.preferenceSetRef);if(!s||s.revision!==n.revision||s.digest!==n.preferenceSetDigest)i.push("Preference resolution binding is stale");if(t.winningTarget.kind!==n.target.kind||t.winningTarget.ref!==n.target.ref)i.push("Preference resolution target does not match its preference set");return i}export{b as COMMUNICATION_PLATFORM_DEFAULT_PREFERENCE_TARGET_REF,V as COMMUNICATION_PREFERENCE_RESOLUTION_SCHEMA_VERSION,N as COMMUNICATION_PREFERENCE_RESOLUTION_TIERS,A as CommunicationEvaluatedPreferenceSetV1Schema,D as CommunicationPreferenceResolutionResultV1Schema,O as CommunicationPreferenceResolutionTargetKindSchema,y as CommunicationPreferenceResolutionTargetV1Schema,q as validateCommunicationPreferenceResolutionBindingV1};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|