@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,115 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
export declare const COMMUNICATION_PREFERENCE_SET_SCHEMA_VERSION: '1.0.0';
|
|
3
|
+
export declare const CommunicationQuietHoursV1Schema: z.ZodObject<{
|
|
4
|
+
start: z.ZodString;
|
|
5
|
+
end: z.ZodString;
|
|
6
|
+
timezone: z.ZodString;
|
|
7
|
+
}, z.core.$strict>;
|
|
8
|
+
export declare const CommunicationDigestPreferenceV1Schema: z.ZodObject<{
|
|
9
|
+
enabled: z.ZodBoolean;
|
|
10
|
+
frequency: z.ZodEnum<{
|
|
11
|
+
daily: "daily";
|
|
12
|
+
immediate: "immediate";
|
|
13
|
+
weekly: "weekly";
|
|
14
|
+
}>;
|
|
15
|
+
deliveryTime: z.ZodOptional<z.ZodString>;
|
|
16
|
+
}, z.core.$strict>;
|
|
17
|
+
export declare const CommunicationRoutePreferenceV1Schema: z.ZodObject<{
|
|
18
|
+
routeRef: z.ZodString;
|
|
19
|
+
channel: z.ZodString;
|
|
20
|
+
enabled: z.ZodBoolean;
|
|
21
|
+
priority: z.ZodNumber;
|
|
22
|
+
consentRef: z.ZodOptional<z.ZodString>;
|
|
23
|
+
quietHours: z.ZodOptional<z.ZodObject<{
|
|
24
|
+
start: z.ZodString;
|
|
25
|
+
end: z.ZodString;
|
|
26
|
+
timezone: z.ZodString;
|
|
27
|
+
}, z.core.$strict>>;
|
|
28
|
+
digest: z.ZodOptional<z.ZodObject<{
|
|
29
|
+
enabled: z.ZodBoolean;
|
|
30
|
+
frequency: z.ZodEnum<{
|
|
31
|
+
daily: "daily";
|
|
32
|
+
immediate: "immediate";
|
|
33
|
+
weekly: "weekly";
|
|
34
|
+
}>;
|
|
35
|
+
deliveryTime: z.ZodOptional<z.ZodString>;
|
|
36
|
+
}, z.core.$strict>>;
|
|
37
|
+
}, z.core.$strict>;
|
|
38
|
+
export declare const CommunicationFallbackPreferenceV1Schema: z.ZodObject<{
|
|
39
|
+
enabled: z.ZodBoolean;
|
|
40
|
+
orderedRouteRefs: z.ZodArray<z.ZodString>;
|
|
41
|
+
terminalRouteRef: z.ZodOptional<z.ZodString>;
|
|
42
|
+
}, z.core.$strict>;
|
|
43
|
+
export declare const CommunicationPreferenceSetV1Schema: z.ZodObject<{
|
|
44
|
+
schemaVersion: z.ZodLiteral<"1.0.0">;
|
|
45
|
+
preferenceSetRef: z.ZodString;
|
|
46
|
+
revision: z.ZodNumber;
|
|
47
|
+
scope: z.ZodObject<{
|
|
48
|
+
tenantRef: z.ZodString;
|
|
49
|
+
workspaceRef: z.ZodOptional<z.ZodString>;
|
|
50
|
+
spaceRef: z.ZodOptional<z.ZodString>;
|
|
51
|
+
subjectRef: z.ZodString;
|
|
52
|
+
}, z.core.$strict>;
|
|
53
|
+
target: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
54
|
+
kind: z.ZodLiteral<"event">;
|
|
55
|
+
ref: z.ZodString;
|
|
56
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
57
|
+
kind: z.ZodLiteral<"automation">;
|
|
58
|
+
ref: z.ZodString;
|
|
59
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
60
|
+
kind: z.ZodLiteral<"feature">;
|
|
61
|
+
ref: z.ZodString;
|
|
62
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
63
|
+
kind: z.ZodLiteral<"application">;
|
|
64
|
+
ref: z.ZodString;
|
|
65
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
66
|
+
kind: z.ZodLiteral<"product">;
|
|
67
|
+
ref: z.ZodString;
|
|
68
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
69
|
+
kind: z.ZodLiteral<"space">;
|
|
70
|
+
ref: z.ZodString;
|
|
71
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
72
|
+
kind: z.ZodLiteral<"person">;
|
|
73
|
+
ref: z.ZodString;
|
|
74
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
75
|
+
kind: z.ZodLiteral<"platform_default">;
|
|
76
|
+
ref: z.ZodLiteral<"communication:preference-target:platform-default">;
|
|
77
|
+
}, z.core.$strict>], "kind">;
|
|
78
|
+
parentPreferenceSetRefs: z.ZodArray<z.ZodString>;
|
|
79
|
+
authority: z.ZodLiteral<"preference_only">;
|
|
80
|
+
globalEnabled: z.ZodBoolean;
|
|
81
|
+
routePreferences: z.ZodArray<z.ZodObject<{
|
|
82
|
+
routeRef: z.ZodString;
|
|
83
|
+
channel: z.ZodString;
|
|
84
|
+
enabled: z.ZodBoolean;
|
|
85
|
+
priority: z.ZodNumber;
|
|
86
|
+
consentRef: z.ZodOptional<z.ZodString>;
|
|
87
|
+
quietHours: z.ZodOptional<z.ZodObject<{
|
|
88
|
+
start: z.ZodString;
|
|
89
|
+
end: z.ZodString;
|
|
90
|
+
timezone: z.ZodString;
|
|
91
|
+
}, z.core.$strict>>;
|
|
92
|
+
digest: z.ZodOptional<z.ZodObject<{
|
|
93
|
+
enabled: z.ZodBoolean;
|
|
94
|
+
frequency: z.ZodEnum<{
|
|
95
|
+
daily: "daily";
|
|
96
|
+
immediate: "immediate";
|
|
97
|
+
weekly: "weekly";
|
|
98
|
+
}>;
|
|
99
|
+
deliveryTime: z.ZodOptional<z.ZodString>;
|
|
100
|
+
}, z.core.$strict>>;
|
|
101
|
+
}, z.core.$strict>>;
|
|
102
|
+
fallback: z.ZodObject<{
|
|
103
|
+
enabled: z.ZodBoolean;
|
|
104
|
+
orderedRouteRefs: z.ZodArray<z.ZodString>;
|
|
105
|
+
terminalRouteRef: z.ZodOptional<z.ZodString>;
|
|
106
|
+
}, z.core.$strict>;
|
|
107
|
+
updatedAt: z.ZodString;
|
|
108
|
+
evidenceRefs: z.ZodArray<z.ZodString>;
|
|
109
|
+
preferenceSetDigest: z.ZodString;
|
|
110
|
+
}, z.core.$strict>;
|
|
111
|
+
export type CommunicationQuietHoursV1 = z.infer<typeof CommunicationQuietHoursV1Schema>;
|
|
112
|
+
export type CommunicationDigestPreferenceV1 = z.infer<typeof CommunicationDigestPreferenceV1Schema>;
|
|
113
|
+
export type CommunicationRoutePreferenceV1 = z.infer<typeof CommunicationRoutePreferenceV1Schema>;
|
|
114
|
+
export type CommunicationFallbackPreferenceV1 = z.infer<typeof CommunicationFallbackPreferenceV1Schema>;
|
|
115
|
+
export type CommunicationPreferenceSetV1 = z.infer<typeof CommunicationPreferenceSetV1Schema>;
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
// @bun
|
|
2
|
+
import{z as o}from"zod";import{z as a}from"zod";var E="1.0.0",_="1.0.0",K={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"},r=a.string().trim().min(1),V=a.string().datetime({offset:!0}),u=a.string().regex(/^sha256:[a-f0-9]{64}$/),I=a.object({ref:r,digest:u}).strict(),S=I.extend({revision:a.number().int().positive()}).strict(),d=a.object({tenantRef:r,workspaceRef:r.optional(),spaceRef:r.optional(),subjectRef:r}).strict(),Z=a.object({schemaVersion:a.literal(E),profileRef:r,revision:a.number().int().positive(),agentRef:r,applicationRef:r,scope:d,routeBindings:a.array(S),connectionRefs:a.array(r),preferenceSet:S,policyRefs:a.array(r).min(1),evidenceRefs:a.array(r).min(1),createdAt:V,updatedAt:V,profileDigest:u}).strict().superRefine((e,t)=>{for(let i of["connectionRefs","policyRefs","evidenceRefs"])if(new Set(e[i]).size!==e[i].length)t.addIssue({code:a.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:a.ZodIssueCode.custom,path:["routeBindings"],message:"route bindings must be unique"})}),U=a.object({schemaVersion:a.literal(_),linkRef:r,profile:S,agentRef:r,applicationRef:r,scope:d,runRef:r.optional(),taskRef:r.optional(),helpRequestRef:r.optional(),approvalRequestRef:r.optional(),backgroundResultRef:r.optional(),canonicalConversation:I.optional(),session:S.optional(),correlationRef:r,evidenceRefs:a.array(r).min(1)}).strict().superRefine((e,t)=>{if(new Set(e.evidenceRefs).size!==e.evidenceRefs.length)t.addIssue({code:a.ZodIssueCode.custom,path:["evidenceRefs"],message:"evidenceRefs must be unique"});if(!e.runRef&&!e.taskRef&&!e.helpRequestRef&&!e.approvalRequestRef&&!e.backgroundResultRef)t.addIssue({code:a.ZodIssueCode.custom,path:["runRef"],message:"at least one run, task, help request, approval request, or background result ref is required"})});function C(e,t){return e.tenantRef===t.tenantRef&&e.workspaceRef===t.workspaceRef&&e.spaceRef===t.spaceRef&&e.subjectRef===t.subjectRef}function F(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(!C(e.profile.scope,e.lifecycleLink.scope))t.push("Lifecycle scope does not match the agent profile");return t}function H(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(!C(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((m)=>m.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}import{z as f}from"zod";var w="1.0.0",A=["email","calendar","sms","slack","teams","discord","telegram","whatsapp","matrix","in_app","push","webhook","web_chat","internal_chat"],v=f.string().trim().min(1),Y=f.enum(A),T=f.enum(["communication","calendar_event"]),h=f.string().trim().min(1),J=f.object({schemaVersion:f.literal(w),routeRef:h,revision:f.number().int().positive(),scope:d,channel:v,destinationRef:h,connectionRef:h.optional(),semantic:T,deliveryMode:f.enum(["direct","durable_in_app"]),capabilityRefs:f.array(h),evidenceRefs:f.array(h).min(1),routeDigest:u}).strict().superRefine((e,t)=>{if(e.channel==="calendar"!==(e.semantic==="calendar_event"))t.addIssue({code:f.ZodIssueCode.custom,path:["semantic"],message:"calendar routes require calendar_event semantics and calendar_event routes require the calendar channel"});for(let n of["capabilityRefs","evidenceRefs"])if(new Set(e[n]).size!==e[n].length)t.addIssue({code:f.ZodIssueCode.custom,path:[n],message:`${n} must be unique`})});import{z as c}from"zod";var x="1.0.0",N="communication:preference-target:platform-default",ne=[["event","automation"],["feature","application"],["product"],["space","person"],["platform_default"]],oe=c.enum(["event","automation","feature","application","product","space","person","platform_default"]),g=c.string().trim().min(1);function p(e){return c.object({kind:c.literal(e),ref:g}).strict()}var y=c.discriminatedUnion("kind",[p("event"),p("automation"),p("feature"),p("application"),p("product"),p("space"),p("person"),c.object({kind:c.literal("platform_default"),ref:c.literal(N)}).strict()]),z=c.object({preferenceSetRef:g,revision:c.number().int().positive(),digest:u,target:y}).strict(),ie=c.object({schemaVersion:c.literal(x),resolutionRef:g,scope:d,subjectRef:g,evaluatedPreferenceSets:c.array(z).min(1),winningPreferenceSetRef:g,winningTarget:y,authority:c.literal("preference_only"),effectAuthority:c.literal("none"),resolvedAt:c.string().datetime({offset:!0}),evidenceRefs:c.array(g).min(1),resolutionDigest:u}).strict().superRefine((e,t)=>{let n=e.evaluatedPreferenceSets.map((s)=>s.preferenceSetRef);if(new Set(n).size!==n.length)R(t,"evaluatedPreferenceSets","evaluated sets must be unique");if(new Set(e.evidenceRefs).size!==e.evidenceRefs.length)R(t,"evidenceRefs","evidenceRefs must be unique");for(let s=1;s<e.evaluatedPreferenceSets.length;s+=1){let m=e.evaluatedPreferenceSets[s-1],P=e.evaluatedPreferenceSets[s];if(m&&P&&k(m.target.kind)>k(P.target.kind)){R(t,"evaluatedPreferenceSets","evaluated sets must follow the preference resolution hierarchy");break}}let i=e.evaluatedPreferenceSets.find((s)=>s.preferenceSetRef===e.winningPreferenceSetRef);if(!i)R(t,"winningPreferenceSetRef","winning preference set must have been evaluated");else if(i.preferenceSetRef!==e.evaluatedPreferenceSets[0]?.preferenceSetRef)R(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)R(t,"winningTarget","winning target must match the winning preference set")});function k(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 R(e,t,n){e.addIssue({code:c.ZodIssueCode.custom,path:[t],message:n})}function re(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(!C(t.scope,n.scope))i.push("Preference resolution scope does not match its preference set");let s=t.evaluatedPreferenceSets.find((m)=>m.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}var q="1.0.0",l=o.string().trim().min(1),D=o.string().datetime({offset:!0}),b=o.string().regex(/^([01]\d|2[0-3]):[0-5]\d$/),L=o.object({start:b,end:b,timezone:o.string().trim().min(1)}).strict(),O=o.object({enabled:o.boolean(),frequency:o.enum(["immediate","daily","weekly"]),deliveryTime:b.optional()}).strict().superRefine((e,t)=>{if(e.frequency==="immediate"&&e.deliveryTime)t.addIssue({code:o.ZodIssueCode.custom,path:["deliveryTime"],message:"immediate digest frequency cannot carry a delivery time"});if(e.enabled&&e.frequency!=="immediate"&&!e.deliveryTime)t.addIssue({code:o.ZodIssueCode.custom,path:["deliveryTime"],message:"enabled daily or weekly digest requires a delivery time"})}),B=o.object({routeRef:l,channel:v,enabled:o.boolean(),priority:o.number().int().positive(),consentRef:l.optional(),quietHours:L.optional(),digest:O.optional()}).strict(),M=o.object({enabled:o.boolean(),orderedRouteRefs:o.array(l),terminalRouteRef:l.optional()}).strict().superRefine((e,t)=>{if(new Set(e.orderedRouteRefs).size!==e.orderedRouteRefs.length)t.addIssue({code:o.ZodIssueCode.custom,path:["orderedRouteRefs"],message:"fallback routes must be unique"});if(e.enabled&&e.orderedRouteRefs.length===0)t.addIssue({code:o.ZodIssueCode.custom,path:["orderedRouteRefs"],message:"enabled fallback requires at least one route"})}),ue=o.object({schemaVersion:o.literal(q),preferenceSetRef:l,revision:o.number().int().positive(),scope:d,target:y,parentPreferenceSetRefs:o.array(l),authority:o.literal("preference_only"),globalEnabled:o.boolean(),routePreferences:o.array(B),fallback:M,updatedAt:D,evidenceRefs:o.array(l).min(1),preferenceSetDigest:u}).strict().superRefine((e,t)=>{if(new Set(e.evidenceRefs).size!==e.evidenceRefs.length)t.addIssue({code:o.ZodIssueCode.custom,path:["evidenceRefs"],message:"evidenceRefs must be unique"});if(new Set(e.parentPreferenceSetRefs).size!==e.parentPreferenceSetRefs.length)t.addIssue({code:o.ZodIssueCode.custom,path:["parentPreferenceSetRefs"],message:"parent preference sets must be unique"});if(e.parentPreferenceSetRefs.includes(e.preferenceSetRef))t.addIssue({code:o.ZodIssueCode.custom,path:["parentPreferenceSetRefs"],message:"a preference set cannot inherit from itself"});let n=e.routePreferences.map((m)=>m.routeRef);if(new Set(n).size!==n.length)t.addIssue({code:o.ZodIssueCode.custom,path:["routePreferences"],message:"route preferences must be unique"});let i=e.routePreferences.map((m)=>m.priority);if(new Set(i).size!==i.length)t.addIssue({code:o.ZodIssueCode.custom,path:["routePreferences"],message:"route preference priorities must be unique"});let s=new Set(n);for(let m of e.fallback.orderedRouteRefs)if(!s.has(m))t.addIssue({code:o.ZodIssueCode.custom,path:["fallback","orderedRouteRefs"],message:`fallback route ${m} has no route preference`});if(e.fallback.terminalRouteRef&&!s.has(e.fallback.terminalRouteRef))t.addIssue({code:o.ZodIssueCode.custom,path:["fallback","terminalRouteRef"],message:"terminal route has no route preference"});if(e.fallback.enabled&&e.fallback.terminalRouteRef&&!e.fallback.orderedRouteRefs.includes(e.fallback.terminalRouteRef))t.addIssue({code:o.ZodIssueCode.custom,path:["fallback","terminalRouteRef"],message:"terminal route must be part of the fallback order"})});export{q as COMMUNICATION_PREFERENCE_SET_SCHEMA_VERSION,O as CommunicationDigestPreferenceV1Schema,M as CommunicationFallbackPreferenceV1Schema,ue as CommunicationPreferenceSetV1Schema,L as CommunicationQuietHoursV1Schema,B as CommunicationRoutePreferenceV1Schema};
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
export declare const COMMUNICATION_CHANNEL_ROUTING_SCHEMA_VERSION: '1.0.0';
|
|
3
|
+
export declare const COMMUNICATION_WELL_KNOWN_CHANNEL_KEYS: readonly ['email', 'calendar', 'sms', 'slack', 'teams', 'discord', 'telegram', 'whatsapp', 'matrix', 'in_app', 'push', 'webhook', 'web_chat', 'internal_chat'];
|
|
4
|
+
/** Open channel keys allow namespaced vertical and provider extensions. */
|
|
5
|
+
export declare const CommunicationChannelKeySchema: z.ZodString;
|
|
6
|
+
export declare const CommunicationWellKnownChannelKeySchema: z.ZodEnum<{
|
|
7
|
+
calendar: "calendar";
|
|
8
|
+
discord: "discord";
|
|
9
|
+
email: "email";
|
|
10
|
+
in_app: "in_app";
|
|
11
|
+
internal_chat: "internal_chat";
|
|
12
|
+
matrix: "matrix";
|
|
13
|
+
push: "push";
|
|
14
|
+
slack: "slack";
|
|
15
|
+
sms: "sms";
|
|
16
|
+
teams: "teams";
|
|
17
|
+
telegram: "telegram";
|
|
18
|
+
web_chat: "web_chat";
|
|
19
|
+
webhook: "webhook";
|
|
20
|
+
whatsapp: "whatsapp";
|
|
21
|
+
}>;
|
|
22
|
+
export declare const CommunicationDeliverySemanticSchema: z.ZodEnum<{
|
|
23
|
+
calendar_event: "calendar_event";
|
|
24
|
+
communication: "communication";
|
|
25
|
+
}>;
|
|
26
|
+
/**
|
|
27
|
+
* A provider-neutral route to an opaque destination. A route may reference a
|
|
28
|
+
* connection, but never embeds provider configuration or credentials.
|
|
29
|
+
*/
|
|
30
|
+
export declare const CommunicationDeliveryRouteV1Schema: z.ZodObject<{
|
|
31
|
+
schemaVersion: z.ZodLiteral<"1.0.0">;
|
|
32
|
+
routeRef: z.ZodString;
|
|
33
|
+
revision: z.ZodNumber;
|
|
34
|
+
scope: z.ZodObject<{
|
|
35
|
+
tenantRef: z.ZodString;
|
|
36
|
+
workspaceRef: z.ZodOptional<z.ZodString>;
|
|
37
|
+
spaceRef: z.ZodOptional<z.ZodString>;
|
|
38
|
+
subjectRef: z.ZodString;
|
|
39
|
+
}, z.core.$strict>;
|
|
40
|
+
channel: z.ZodString;
|
|
41
|
+
destinationRef: z.ZodString;
|
|
42
|
+
connectionRef: z.ZodOptional<z.ZodString>;
|
|
43
|
+
semantic: z.ZodEnum<{
|
|
44
|
+
calendar_event: "calendar_event";
|
|
45
|
+
communication: "communication";
|
|
46
|
+
}>;
|
|
47
|
+
deliveryMode: z.ZodEnum<{
|
|
48
|
+
direct: "direct";
|
|
49
|
+
durable_in_app: "durable_in_app";
|
|
50
|
+
}>;
|
|
51
|
+
capabilityRefs: z.ZodArray<z.ZodString>;
|
|
52
|
+
evidenceRefs: z.ZodArray<z.ZodString>;
|
|
53
|
+
routeDigest: z.ZodString;
|
|
54
|
+
}, z.core.$strict>;
|
|
55
|
+
export type CommunicationChannelKey = z.infer<typeof CommunicationChannelKeySchema>;
|
|
56
|
+
export type CommunicationWellKnownChannelKey = z.infer<typeof CommunicationWellKnownChannelKeySchema>;
|
|
57
|
+
export type CommunicationDeliverySemantic = z.infer<typeof CommunicationDeliverySemanticSchema>;
|
|
58
|
+
export type CommunicationDeliveryRouteV1 = z.infer<typeof CommunicationDeliveryRouteV1Schema>;
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
// @bun
|
|
2
|
+
import{z as c}from"zod";import{z as o}from"zod";var h="1.0.0",y="1.0.0",b={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),u=o.string().datetime({offset:!0}),m=o.string().regex(/^sha256:[a-f0-9]{64}$/),l=o.object({ref:t,digest:m}).strict(),a=l.extend({revision:o.number().int().positive()}).strict(),f=o.object({tenantRef:t,workspaceRef:t.optional(),spaceRef:t.optional(),subjectRef:t}).strict(),A=o.object({schemaVersion:o.literal(h),profileRef:t,revision:o.number().int().positive(),agentRef:t,applicationRef:t,scope:f,routeBindings:o.array(a),connectionRefs:o.array(t),preferenceSet:a,policyRefs:o.array(t).min(1),evidenceRefs:o.array(t).min(1),createdAt:u,updatedAt:u,profileDigest:m}).strict().superRefine((e,n)=>{for(let s of["connectionRefs","policyRefs","evidenceRefs"])if(new Set(e[s]).size!==e[s].length)n.addIssue({code:o.ZodIssueCode.custom,path:[s],message:`${s} must be unique`});let i=e.routeBindings.map((s)=>s.ref);if(new Set(i).size!==i.length)n.addIssue({code:o.ZodIssueCode.custom,path:["routeBindings"],message:"route bindings must be unique"})}),I=o.object({schemaVersion:o.literal(y),linkRef:t,profile:a,agentRef:t,applicationRef:t,scope:f,runRef:t.optional(),taskRef:t.optional(),helpRequestRef:t.optional(),approvalRequestRef:t.optional(),backgroundResultRef:t.optional(),canonicalConversation:l.optional(),session:a.optional(),correlationRef:t,evidenceRefs:o.array(t).min(1)}).strict().superRefine((e,n)=>{if(new Set(e.evidenceRefs).size!==e.evidenceRefs.length)n.addIssue({code:o.ZodIssueCode.custom,path:["evidenceRefs"],message:"evidenceRefs must be unique"});if(!e.runRef&&!e.taskRef&&!e.helpRequestRef&&!e.approvalRequestRef&&!e.backgroundResultRef)n.addIssue({code:o.ZodIssueCode.custom,path:["runRef"],message:"at least one run, task, help request, approval request, or background result ref is required"})});function d(e,n){return e.tenantRef===n.tenantRef&&e.workspaceRef===n.workspaceRef&&e.spaceRef===n.spaceRef&&e.subjectRef===n.subjectRef}function x(e){let n=[];for(let i of["agentRef","applicationRef"])if(e.profile[i]!==e.lifecycleLink[i])n.push(`Lifecycle ${i} 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(!d(e.profile.scope,e.lifecycleLink.scope))n.push("Lifecycle scope does not match the agent profile");return n}function k(e){let{intent:n,progress:i}=e,s=[];if(i.deliveryRef!==n.deliveryRef||i.intent.ref!==n.deliveryRef||i.intent.digest!==n.deliveryDigest)s.push("Progress delivery does not match the intent");if(!d(i.scope,n.scope))s.push("Progress scope does not match the intent");if(i.recipientRef!==n.recipientRefs[0])s.push("Progress recipient does not match the intent");let p=n.requestedRoutes.find((g)=>g.ref===i.route.ref);if(!p||p.revision!==i.route.revision||p.digest!==i.route.digest)s.push("Progress route was not requested by the intent");if(Date.parse(i.occurredAt)<Date.parse(n.createdAt)||Date.parse(i.occurredAt)>Date.parse(n.expiresAt))s.push("Progress occurred outside the intent validity window");return s}var R="1.0.0",C=["email","calendar","sms","slack","teams","discord","telegram","whatsapp","matrix","in_app","push","webhook","web_chat","internal_chat"],v=c.string().trim().min(1),N=c.enum(C),S=c.enum(["communication","calendar_event"]),r=c.string().trim().min(1),B=c.object({schemaVersion:c.literal(R),routeRef:r,revision:c.number().int().positive(),scope:f,channel:v,destinationRef:r,connectionRef:r.optional(),semantic:S,deliveryMode:c.enum(["direct","durable_in_app"]),capabilityRefs:c.array(r),evidenceRefs:c.array(r).min(1),routeDigest:m}).strict().superRefine((e,n)=>{if(e.channel==="calendar"!==(e.semantic==="calendar_event"))n.addIssue({code:c.ZodIssueCode.custom,path:["semantic"],message:"calendar routes require calendar_event semantics and calendar_event routes require the calendar channel"});for(let i of["capabilityRefs","evidenceRefs"])if(new Set(e[i]).size!==e[i].length)n.addIssue({code:c.ZodIssueCode.custom,path:[i],message:`${i} must be unique`})});export{R as COMMUNICATION_CHANNEL_ROUTING_SCHEMA_VERSION,C as COMMUNICATION_WELL_KNOWN_CHANNEL_KEYS,v as CommunicationChannelKeySchema,B as CommunicationDeliveryRouteV1Schema,S as CommunicationDeliverySemanticSchema,N as CommunicationWellKnownChannelKeySchema};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,315 @@
|
|
|
1
|
+
export declare const CreateHandoffCommand: import("@lssm/lib.contracts-spec").OperationSpec<import("@lssm/lib.schema").SchemaModel<{
|
|
2
|
+
threadId: {
|
|
3
|
+
type: import("@lssm/lib.schema").FieldType<string, string>;
|
|
4
|
+
isOptional: false;
|
|
5
|
+
};
|
|
6
|
+
fromOwner: {
|
|
7
|
+
type: import("@lssm/lib.schema").FieldType<string, string>;
|
|
8
|
+
isOptional: false;
|
|
9
|
+
};
|
|
10
|
+
toOwner: {
|
|
11
|
+
type: import("@lssm/lib.schema").FieldType<string, string>;
|
|
12
|
+
isOptional: false;
|
|
13
|
+
};
|
|
14
|
+
reason: {
|
|
15
|
+
type: import("@lssm/lib.schema").FieldType<string, string>;
|
|
16
|
+
isOptional: true;
|
|
17
|
+
};
|
|
18
|
+
}>, import("@lssm/lib.schema").SchemaModel<{
|
|
19
|
+
id: {
|
|
20
|
+
type: import("@lssm/lib.schema").FieldType<string, string>;
|
|
21
|
+
isOptional: false;
|
|
22
|
+
};
|
|
23
|
+
threadId: {
|
|
24
|
+
type: import("@lssm/lib.schema").FieldType<string, string>;
|
|
25
|
+
isOptional: false;
|
|
26
|
+
};
|
|
27
|
+
status: {
|
|
28
|
+
type: import("@lssm/lib.schema").EnumType<[string, string, string, string, string]>;
|
|
29
|
+
isOptional: false;
|
|
30
|
+
defaultValue: string;
|
|
31
|
+
};
|
|
32
|
+
fromOwner: {
|
|
33
|
+
type: import("@lssm/lib.schema").FieldType<string, string>;
|
|
34
|
+
isOptional: false;
|
|
35
|
+
};
|
|
36
|
+
toOwner: {
|
|
37
|
+
type: import("@lssm/lib.schema").FieldType<string, string>;
|
|
38
|
+
isOptional: false;
|
|
39
|
+
};
|
|
40
|
+
summary: {
|
|
41
|
+
type: import("@lssm/lib.schema").FieldType<string, string>;
|
|
42
|
+
isOptional: false;
|
|
43
|
+
};
|
|
44
|
+
keyFacts: {
|
|
45
|
+
type: import("@lssm/lib.schema").FieldType<string, string>;
|
|
46
|
+
isArray: true;
|
|
47
|
+
isOptional: true;
|
|
48
|
+
};
|
|
49
|
+
openQuestions: {
|
|
50
|
+
type: import("@lssm/lib.schema").FieldType<string, string>;
|
|
51
|
+
isArray: true;
|
|
52
|
+
isOptional: true;
|
|
53
|
+
};
|
|
54
|
+
requiredActions: {
|
|
55
|
+
type: import("@lssm/lib.schema").SchemaModel<{
|
|
56
|
+
id: {
|
|
57
|
+
type: import("@lssm/lib.schema").FieldType<string, string>;
|
|
58
|
+
isOptional: false;
|
|
59
|
+
};
|
|
60
|
+
threadId: {
|
|
61
|
+
type: import("@lssm/lib.schema").FieldType<string, string>;
|
|
62
|
+
isOptional: false;
|
|
63
|
+
};
|
|
64
|
+
title: {
|
|
65
|
+
type: import("@lssm/lib.schema").FieldType<string, string>;
|
|
66
|
+
isOptional: false;
|
|
67
|
+
};
|
|
68
|
+
owner: {
|
|
69
|
+
type: import("@lssm/lib.schema").FieldType<string, string>;
|
|
70
|
+
isOptional: true;
|
|
71
|
+
};
|
|
72
|
+
deadline: {
|
|
73
|
+
type: import("@lssm/lib.schema").FieldType<Date, string>;
|
|
74
|
+
isOptional: true;
|
|
75
|
+
};
|
|
76
|
+
blockers: {
|
|
77
|
+
type: import("@lssm/lib.schema").FieldType<string, string>;
|
|
78
|
+
isArray: true;
|
|
79
|
+
isOptional: true;
|
|
80
|
+
};
|
|
81
|
+
sourceMessageIds: {
|
|
82
|
+
type: import("@lssm/lib.schema").FieldType<string, string>;
|
|
83
|
+
isArray: true;
|
|
84
|
+
isOptional: false;
|
|
85
|
+
};
|
|
86
|
+
safetyMode: {
|
|
87
|
+
type: import("@lssm/lib.schema").EnumType<[string, string, string, string, string]>;
|
|
88
|
+
isOptional: false;
|
|
89
|
+
defaultValue: string;
|
|
90
|
+
};
|
|
91
|
+
}>;
|
|
92
|
+
isArray: true;
|
|
93
|
+
isOptional: true;
|
|
94
|
+
};
|
|
95
|
+
evidenceLinks: {
|
|
96
|
+
type: import("@lssm/lib.schema").FieldType<string, string>;
|
|
97
|
+
isArray: true;
|
|
98
|
+
isOptional: true;
|
|
99
|
+
};
|
|
100
|
+
createdAt: {
|
|
101
|
+
type: import("@lssm/lib.schema").FieldType<Date, string>;
|
|
102
|
+
isOptional: false;
|
|
103
|
+
};
|
|
104
|
+
updatedAt: {
|
|
105
|
+
type: import("@lssm/lib.schema").FieldType<Date, string>;
|
|
106
|
+
isOptional: false;
|
|
107
|
+
};
|
|
108
|
+
}>, undefined>;
|
|
109
|
+
export declare const ProposeThreadLinkCommand: import("@lssm/lib.contracts-spec").OperationSpec<import("@lssm/lib.schema").SchemaModel<{
|
|
110
|
+
id: {
|
|
111
|
+
type: import("@lssm/lib.schema").FieldType<string, string>;
|
|
112
|
+
isOptional: false;
|
|
113
|
+
};
|
|
114
|
+
threadId: {
|
|
115
|
+
type: import("@lssm/lib.schema").FieldType<string, string>;
|
|
116
|
+
isOptional: false;
|
|
117
|
+
};
|
|
118
|
+
objectRef: {
|
|
119
|
+
type: import("@lssm/lib.schema").FieldType<Record<string, unknown>, Record<string, unknown>>;
|
|
120
|
+
isOptional: false;
|
|
121
|
+
};
|
|
122
|
+
relation: {
|
|
123
|
+
type: import("@lssm/lib.schema").FieldType<string, string>;
|
|
124
|
+
isOptional: true;
|
|
125
|
+
};
|
|
126
|
+
confidence: {
|
|
127
|
+
type: import("@lssm/lib.schema").FieldType<number, number>;
|
|
128
|
+
isOptional: true;
|
|
129
|
+
};
|
|
130
|
+
createdAt: {
|
|
131
|
+
type: import("@lssm/lib.schema").FieldType<Date, string>;
|
|
132
|
+
isOptional: false;
|
|
133
|
+
};
|
|
134
|
+
}>, import("@lssm/lib.schema").SchemaModel<{
|
|
135
|
+
id: {
|
|
136
|
+
type: import("@lssm/lib.schema").FieldType<string, string>;
|
|
137
|
+
isOptional: false;
|
|
138
|
+
};
|
|
139
|
+
threadId: {
|
|
140
|
+
type: import("@lssm/lib.schema").FieldType<string, string>;
|
|
141
|
+
isOptional: false;
|
|
142
|
+
};
|
|
143
|
+
objectRef: {
|
|
144
|
+
type: import("@lssm/lib.schema").FieldType<Record<string, unknown>, Record<string, unknown>>;
|
|
145
|
+
isOptional: false;
|
|
146
|
+
};
|
|
147
|
+
relation: {
|
|
148
|
+
type: import("@lssm/lib.schema").FieldType<string, string>;
|
|
149
|
+
isOptional: true;
|
|
150
|
+
};
|
|
151
|
+
confidence: {
|
|
152
|
+
type: import("@lssm/lib.schema").FieldType<number, number>;
|
|
153
|
+
isOptional: true;
|
|
154
|
+
};
|
|
155
|
+
createdAt: {
|
|
156
|
+
type: import("@lssm/lib.schema").FieldType<Date, string>;
|
|
157
|
+
isOptional: false;
|
|
158
|
+
};
|
|
159
|
+
}>, undefined>;
|
|
160
|
+
export declare const ProposeIdentityLinkCommand: import("@lssm/lib.contracts-spec").OperationSpec<import("@lssm/lib.schema").SchemaModel<{
|
|
161
|
+
id: {
|
|
162
|
+
type: import("@lssm/lib.schema").FieldType<string, string>;
|
|
163
|
+
isOptional: false;
|
|
164
|
+
};
|
|
165
|
+
participantId: {
|
|
166
|
+
type: import("@lssm/lib.schema").FieldType<string, string>;
|
|
167
|
+
isOptional: false;
|
|
168
|
+
};
|
|
169
|
+
candidateParticipantId: {
|
|
170
|
+
type: import("@lssm/lib.schema").FieldType<string, string>;
|
|
171
|
+
isOptional: false;
|
|
172
|
+
};
|
|
173
|
+
status: {
|
|
174
|
+
type: import("@lssm/lib.schema").EnumType<[string, string, string, string, string, string, string]>;
|
|
175
|
+
isOptional: false;
|
|
176
|
+
defaultValue: string;
|
|
177
|
+
};
|
|
178
|
+
confidence: {
|
|
179
|
+
type: import("@lssm/lib.schema").FieldType<number, number>;
|
|
180
|
+
isOptional: false;
|
|
181
|
+
};
|
|
182
|
+
reasoning: {
|
|
183
|
+
type: import("@lssm/lib.schema").FieldType<string, string>;
|
|
184
|
+
isOptional: true;
|
|
185
|
+
};
|
|
186
|
+
reviewedBy: {
|
|
187
|
+
type: import("@lssm/lib.schema").FieldType<string, string>;
|
|
188
|
+
isOptional: true;
|
|
189
|
+
};
|
|
190
|
+
createdAt: {
|
|
191
|
+
type: import("@lssm/lib.schema").FieldType<Date, string>;
|
|
192
|
+
isOptional: false;
|
|
193
|
+
};
|
|
194
|
+
}>, import("@lssm/lib.schema").SchemaModel<{
|
|
195
|
+
id: {
|
|
196
|
+
type: import("@lssm/lib.schema").FieldType<string, string>;
|
|
197
|
+
isOptional: false;
|
|
198
|
+
};
|
|
199
|
+
participantId: {
|
|
200
|
+
type: import("@lssm/lib.schema").FieldType<string, string>;
|
|
201
|
+
isOptional: false;
|
|
202
|
+
};
|
|
203
|
+
candidateParticipantId: {
|
|
204
|
+
type: import("@lssm/lib.schema").FieldType<string, string>;
|
|
205
|
+
isOptional: false;
|
|
206
|
+
};
|
|
207
|
+
status: {
|
|
208
|
+
type: import("@lssm/lib.schema").EnumType<[string, string, string, string, string, string, string]>;
|
|
209
|
+
isOptional: false;
|
|
210
|
+
defaultValue: string;
|
|
211
|
+
};
|
|
212
|
+
confidence: {
|
|
213
|
+
type: import("@lssm/lib.schema").FieldType<number, number>;
|
|
214
|
+
isOptional: false;
|
|
215
|
+
};
|
|
216
|
+
reasoning: {
|
|
217
|
+
type: import("@lssm/lib.schema").FieldType<string, string>;
|
|
218
|
+
isOptional: true;
|
|
219
|
+
};
|
|
220
|
+
reviewedBy: {
|
|
221
|
+
type: import("@lssm/lib.schema").FieldType<string, string>;
|
|
222
|
+
isOptional: true;
|
|
223
|
+
};
|
|
224
|
+
createdAt: {
|
|
225
|
+
type: import("@lssm/lib.schema").FieldType<Date, string>;
|
|
226
|
+
isOptional: false;
|
|
227
|
+
};
|
|
228
|
+
}>, undefined>;
|
|
229
|
+
export declare const EscalateToHumanCommand: import("@lssm/lib.contracts-spec").OperationSpec<import("@lssm/lib.schema").SchemaModel<{
|
|
230
|
+
threadId: {
|
|
231
|
+
type: import("@lssm/lib.schema").FieldType<string, string>;
|
|
232
|
+
isOptional: false;
|
|
233
|
+
};
|
|
234
|
+
reason: {
|
|
235
|
+
type: import("@lssm/lib.schema").FieldType<string, string>;
|
|
236
|
+
isOptional: false;
|
|
237
|
+
};
|
|
238
|
+
targetOwner: {
|
|
239
|
+
type: import("@lssm/lib.schema").FieldType<string, string>;
|
|
240
|
+
isOptional: true;
|
|
241
|
+
};
|
|
242
|
+
}>, import("@lssm/lib.schema").SchemaModel<{
|
|
243
|
+
id: {
|
|
244
|
+
type: import("@lssm/lib.schema").FieldType<string, string>;
|
|
245
|
+
isOptional: false;
|
|
246
|
+
};
|
|
247
|
+
threadId: {
|
|
248
|
+
type: import("@lssm/lib.schema").FieldType<string, string>;
|
|
249
|
+
isOptional: false;
|
|
250
|
+
};
|
|
251
|
+
messageId: {
|
|
252
|
+
type: import("@lssm/lib.schema").FieldType<string, string>;
|
|
253
|
+
isOptional: true;
|
|
254
|
+
};
|
|
255
|
+
suggestionType: {
|
|
256
|
+
type: import("@lssm/lib.schema").FieldType<string, string>;
|
|
257
|
+
isOptional: false;
|
|
258
|
+
};
|
|
259
|
+
content: {
|
|
260
|
+
type: import("@lssm/lib.schema").FieldType<string, string>;
|
|
261
|
+
isOptional: false;
|
|
262
|
+
};
|
|
263
|
+
status: {
|
|
264
|
+
type: import("@lssm/lib.schema").EnumType<[string, string, string, string, string, string, string]>;
|
|
265
|
+
isOptional: false;
|
|
266
|
+
defaultValue: string;
|
|
267
|
+
};
|
|
268
|
+
modelName: {
|
|
269
|
+
type: import("@lssm/lib.schema").FieldType<string, string>;
|
|
270
|
+
isOptional: true;
|
|
271
|
+
};
|
|
272
|
+
confidence: {
|
|
273
|
+
type: import("@lssm/lib.schema").FieldType<number, number>;
|
|
274
|
+
isOptional: true;
|
|
275
|
+
};
|
|
276
|
+
policyVersion: {
|
|
277
|
+
type: import("@lssm/lib.schema").FieldType<string, string>;
|
|
278
|
+
isOptional: true;
|
|
279
|
+
};
|
|
280
|
+
createdAt: {
|
|
281
|
+
type: import("@lssm/lib.schema").FieldType<Date, string>;
|
|
282
|
+
isOptional: false;
|
|
283
|
+
};
|
|
284
|
+
updatedAt: {
|
|
285
|
+
type: import("@lssm/lib.schema").FieldType<Date, string>;
|
|
286
|
+
isOptional: false;
|
|
287
|
+
};
|
|
288
|
+
}>, undefined>;
|
|
289
|
+
export declare const RecordHumanFeedbackCommand: import("@lssm/lib.contracts-spec").OperationSpec<import("@lssm/lib.schema").SchemaModel<{
|
|
290
|
+
targetId: {
|
|
291
|
+
type: import("@lssm/lib.schema").FieldType<string, string>;
|
|
292
|
+
isOptional: false;
|
|
293
|
+
};
|
|
294
|
+
targetType: {
|
|
295
|
+
type: import("@lssm/lib.schema").FieldType<string, string>;
|
|
296
|
+
isOptional: false;
|
|
297
|
+
};
|
|
298
|
+
outcome: {
|
|
299
|
+
type: import("@lssm/lib.schema").EnumType<[string, string, string, string, string]>;
|
|
300
|
+
isOptional: false;
|
|
301
|
+
};
|
|
302
|
+
notes: {
|
|
303
|
+
type: import("@lssm/lib.schema").FieldType<string, string>;
|
|
304
|
+
isOptional: true;
|
|
305
|
+
};
|
|
306
|
+
}>, import("@lssm/lib.schema").SchemaModel<{
|
|
307
|
+
feedbackId: {
|
|
308
|
+
type: import("@lssm/lib.schema").FieldType<string, string>;
|
|
309
|
+
isOptional: false;
|
|
310
|
+
};
|
|
311
|
+
safetyMode: {
|
|
312
|
+
type: import("@lssm/lib.schema").EnumType<[string, string, string, string, string]>;
|
|
313
|
+
isOptional: false;
|
|
314
|
+
};
|
|
315
|
+
}>, undefined>;
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
// @bun
|
|
2
|
+
import{defineCommand as s}from"@lssm/lib.contracts-spec";import{defineSchemaModel as l,ScalarTypeEnum as i}from"@lssm/lib.schema";import{defineEnum as n}from"@lssm/lib.schema";var a=n("ChannelType",["email","sms","whatsapp","telegram","matrix","web_chat","voice","internal_chat","custom_adapter","future_bridge","unknown"]),d=n("ThreadStatus",["open","waiting_on_human","waiting_on_external_party","action_required","resolved","archived"]),y=n("MessageStatus",["received","normalized","classified","linked","triaged","replied","archived"]),m=n("ReplyStatus",["drafted","requires_review","approved","sent","failed","blocked_by_policy"]),f=n("HandoffStatus",["created","assigned","acknowledged","completed","reopened"]),c=n("SuggestionStatus",["generated","shown","accepted","edited","rejected","applied","expired"]),g=n("IntentCategory",["support","sales","bug_report","feature_request","billing","onboarding","coordination","general","spam","escalation"]),o=n("ActionSafetyMode",["read_only","draft_only","requires_review","policy_executable","blocked"]),O=n("FeedbackOutcome",["accepted","edited","rejected","unsafe","incomplete"]);import{defineSchemaModel as t,ScalarTypeEnum as e}from"@lssm/lib.schema";var A=t({name:"ChannelAccount",description:"A channel account belonging to a participant",fields:{id:{type:e.String_unsecure(),isOptional:!1},participantId:{type:e.String_unsecure(),isOptional:!1},channelType:{type:a,isOptional:!1},externalId:{type:e.String_unsecure(),isOptional:!1},displayName:{type:e.String_unsecure(),isOptional:!0},metadata:{type:e.JSONObject(),isOptional:!0},isPrimary:{type:e.Boolean(),isOptional:!1,defaultValue:!1},createdAt:{type:e.DateTime(),isOptional:!1}}}),p=t({name:"IdentityLink",description:"Proposed or confirmed relationship between participant identities",fields:{id:{type:e.String_unsecure(),isOptional:!1},participantId:{type:e.String_unsecure(),isOptional:!1},candidateParticipantId:{type:e.String_unsecure(),isOptional:!1},status:{type:c,isOptional:!1,defaultValue:"generated"},confidence:{type:e.Float_unsecure(),isOptional:!1},reasoning:{type:e.String_unsecure(),isOptional:!0},reviewedBy:{type:e.String_unsecure(),isOptional:!0},createdAt:{type:e.DateTime(),isOptional:!1}}}),M=t({name:"CommunicationParticipant",description:"A person or system that participates in conversations",fields:{id:{type:e.String_unsecure(),isOptional:!1},name:{type:e.String_unsecure(),isOptional:!0},email:{type:e.EmailAddress(),isOptional:!0},accounts:{type:A,isArray:!0,isOptional:!1},identityLinks:{type:p,isArray:!0,isOptional:!0},createdAt:{type:e.DateTime(),isOptional:!1},updatedAt:{type:e.DateTime(),isOptional:!1}}}),b=t({name:"Attachment",description:"A file or media attachment on a message",fields:{id:{type:e.String_unsecure(),isOptional:!1},messageId:{type:e.String_unsecure(),isOptional:!1},name:{type:e.String_unsecure(),isOptional:!1},mimeType:{type:e.String_unsecure(),isOptional:!0},sizeBytes:{type:e.Int_unsecure(),isOptional:!0},url:{type:e.URL(),isOptional:!0},metadata:{type:e.JSONObject(),isOptional:!0}}}),u=t({name:"ThreadLink",description:"Link between a thread and an external business object (V2: rich-reference objectRef replaces V1 objectType/objectId)",fields:{id:{type:e.String_unsecure(),isOptional:!1},threadId:{type:e.String_unsecure(),isOptional:!1},objectRef:{type:e.JSONObject(),isOptional:!1},relation:{type:e.String_unsecure(),isOptional:!0},confidence:{type:e.Float_unsecure(),isOptional:!0},createdAt:{type:e.DateTime(),isOptional:!1}}}),k=t({name:"MessageIntent",description:"Classified message or thread intent with confidence and evidence",fields:{id:{type:e.String_unsecure(),isOptional:!1},threadId:{type:e.String_unsecure(),isOptional:!1},messageId:{type:e.String_unsecure(),isOptional:!0},category:{type:g,isOptional:!1},confidence:{type:e.Float_unsecure(),isOptional:!1},reasoning:{type:e.String_unsecure(),isOptional:!0},evidenceMessageIds:{type:e.String_unsecure(),isArray:!0,isOptional:!0},createdAt:{type:e.DateTime(),isOptional:!1}}}),v=t({name:"CommunicationMessage",description:"A single message within a communication thread",fields:{id:{type:e.String_unsecure(),isOptional:!1},threadId:{type:e.String_unsecure(),isOptional:!1},channelType:{type:a,isOptional:!1},channelAccountId:{type:e.String_unsecure(),isOptional:!1},participantId:{type:e.String_unsecure(),isOptional:!0},externalMessageId:{type:e.String_unsecure(),isOptional:!0},body:{type:e.String_unsecure(),isOptional:!1},bodyNormalized:{type:e.String_unsecure(),isOptional:!0},status:{type:y,isOptional:!1,defaultValue:"received"},intent:{type:k,isOptional:!0},attachments:{type:b,isArray:!0,isOptional:!0},metadata:{type:e.JSONObject(),isOptional:!0},createdAt:{type:e.DateTime(),isOptional:!1},updatedAt:{type:e.DateTime(),isOptional:!1}}}),C=t({name:"CommunicationFormIntake",description:"Declarative source reference for a communication message mapped into an entity-bound form intake result",fields:{id:{type:e.String_unsecure(),isOptional:!1},messageId:{type:e.String_unsecure(),isOptional:!1},threadId:{type:e.String_unsecure(),isOptional:!1},channelType:{type:a,isOptional:!1},channelAccountId:{type:e.String_unsecure(),isOptional:!1},participantId:{type:e.String_unsecure(),isOptional:!0},entityKey:{type:e.String_unsecure(),isOptional:!1},projectionKind:{type:e.String_unsecure(),isOptional:!1},formKey:{type:e.String_unsecure(),isOptional:!0},formVersion:{type:e.String_unsecure(),isOptional:!0},completionProfileKey:{type:e.String_unsecure(),isOptional:!0},acceptedValues:{type:e.JSONObject(),isOptional:!1},completionDebt:{type:e.JSONObject(),isArray:!0,isOptional:!1},captureStatus:{type:e.String_unsecure(),isOptional:!1,defaultValue:"accepted"},completionStatus:{type:e.String_unsecure(),isOptional:!1},createdAt:{type:e.DateTime(),isOptional:!1}}}),D=t({name:"CommunicationThread",description:"A conversation thread spanning one or more channels",fields:{id:{type:e.String_unsecure(),isOptional:!1},title:{type:e.String_unsecure(),isOptional:!0},status:{type:d,isOptional:!1,defaultValue:"open"},participantIds:{type:e.String_unsecure(),isArray:!0,isOptional:!1},channelTypes:{type:a,isArray:!0,isOptional:!1},links:{type:u,isArray:!0,isOptional:!0},assignedTo:{type:e.String_unsecure(),isOptional:!0},priority:{type:e.String_unsecure(),isOptional:!0},tags:{type:e.String_unsecure(),isArray:!0,isOptional:!0},metadata:{type:e.JSONObject(),isOptional:!0},createdAt:{type:e.DateTime(),isOptional:!1},updatedAt:{type:e.DateTime(),isOptional:!1}}}),S=t({name:"CommunicationAction",description:"Structured action extracted from a conversation",fields:{id:{type:e.String_unsecure(),isOptional:!1},threadId:{type:e.String_unsecure(),isOptional:!1},title:{type:e.String_unsecure(),isOptional:!1},owner:{type:e.String_unsecure(),isOptional:!0},deadline:{type:e.DateTime(),isOptional:!0},blockers:{type:e.String_unsecure(),isArray:!0,isOptional:!0},sourceMessageIds:{type:e.String_unsecure(),isArray:!0,isOptional:!1},safetyMode:{type:o,isOptional:!1,defaultValue:"draft_only"}}}),E=t({name:"ReplyDraft",description:"An AI-generated or human-authored reply draft",fields:{id:{type:e.String_unsecure(),isOptional:!1},threadId:{type:e.String_unsecure(),isOptional:!1},messageId:{type:e.String_unsecure(),isOptional:!0},body:{type:e.String_unsecure(),isOptional:!1},status:{type:m,isOptional:!1,defaultValue:"drafted"},generatedBy:{type:e.String_unsecure(),isOptional:!0},modelName:{type:e.String_unsecure(),isOptional:!0},promptVersion:{type:e.String_unsecure(),isOptional:!0},policyVersion:{type:e.String_unsecure(),isOptional:!0},reviewedBy:{type:e.String_unsecure(),isOptional:!0},reviewedAt:{type:e.DateTime(),isOptional:!0},metadata:{type:e.JSONObject(),isOptional:!0},createdAt:{type:e.DateTime(),isOptional:!1},updatedAt:{type:e.DateTime(),isOptional:!1}}}),_=t({name:"HandoffPacket",description:"A structured handoff between owners, teams, or systems",fields:{id:{type:e.String_unsecure(),isOptional:!1},threadId:{type:e.String_unsecure(),isOptional:!1},status:{type:f,isOptional:!1,defaultValue:"created"},fromOwner:{type:e.String_unsecure(),isOptional:!1},toOwner:{type:e.String_unsecure(),isOptional:!1},summary:{type:e.String_unsecure(),isOptional:!1},keyFacts:{type:e.String_unsecure(),isArray:!0,isOptional:!0},openQuestions:{type:e.String_unsecure(),isArray:!0,isOptional:!0},requiredActions:{type:S,isArray:!0,isOptional:!0},evidenceLinks:{type:e.String_unsecure(),isArray:!0,isOptional:!0},createdAt:{type:e.DateTime(),isOptional:!1},updatedAt:{type:e.DateTime(),isOptional:!1}}}),j=t({name:"CommunicationSummary",description:"AI-generated summary of a thread or message range",fields:{id:{type:e.String_unsecure(),isOptional:!1},threadId:{type:e.String_unsecure(),isOptional:!1},messageIds:{type:e.String_unsecure(),isArray:!0,isOptional:!0},content:{type:e.String_unsecure(),isOptional:!1},facts:{type:e.JSONObject(),isArray:!0,isOptional:!0},actions:{type:S,isArray:!0,isOptional:!0},decisions:{type:e.JSONObject(),isArray:!0,isOptional:!0},risks:{type:e.JSONObject(),isArray:!0,isOptional:!0},modelName:{type:e.String_unsecure(),isOptional:!0},generatedAt:{type:e.DateTime(),isOptional:!1}}}),h=t({name:"AgentSuggestion",description:"An AI-generated suggestion attached to a thread or message",fields:{id:{type:e.String_unsecure(),isOptional:!1},threadId:{type:e.String_unsecure(),isOptional:!1},messageId:{type:e.String_unsecure(),isOptional:!0},suggestionType:{type:e.String_unsecure(),isOptional:!1},content:{type:e.String_unsecure(),isOptional:!1},status:{type:c,isOptional:!1,defaultValue:"generated"},modelName:{type:e.String_unsecure(),isOptional:!0},confidence:{type:e.Float_unsecure(),isOptional:!0},policyVersion:{type:e.String_unsecure(),isOptional:!0},createdAt:{type:e.DateTime(),isOptional:!1},updatedAt:{type:e.DateTime(),isOptional:!1}}});var r=["platform.communication-os"],F=s({meta:{key:"communication.handoff.create",version:"1.0.0",stability:"experimental",owners:[...r],tags:["communication","handoff"],description:"Create a handoff packet for a thread",goal:"Transfer context safely between owners or systems",context:"Requires evidence links and does not close source thread automatically"},io:{input:l({name:"CreateHandoffInput",fields:{threadId:{type:i.String_unsecure(),isOptional:!1},fromOwner:{type:i.String_unsecure(),isOptional:!1},toOwner:{type:i.String_unsecure(),isOptional:!1},reason:{type:i.String_unsecure(),isOptional:!0}}}),output:_},policy:{auth:"user"}}),H=s({meta:{key:"communication.threadLink.propose",version:"1.0.0",stability:"experimental",owners:[...r],tags:["communication","thread-link","propose"],description:"Propose a link between a thread and a business object",goal:"Let future vertical consumers bind domain objects without changing the core",context:"Draft-only operation; domain packs own object semantics"},io:{input:u,output:u},policy:{auth:"user"}}),J=s({meta:{key:"communication.identityLink.propose",version:"1.0.0",stability:"experimental",owners:[...r],tags:["communication","identity","propose"],description:"Propose a participant identity link",goal:"Resolve cross-channel identities without reckless auto-merge",context:"Draft-only operation; high-impact merges require human review"},io:{input:p,output:p},policy:{auth:"user"}}),q=s({meta:{key:"communication.escalation.request",version:"1.0.0",stability:"experimental",owners:[...r],tags:["communication","escalation"],description:"Request human escalation for a thread",goal:"Surface high-risk, blocked, or unresolved conversations to a human owner",context:"Policy-executable operation that emits escalation evidence"},io:{input:l({name:"EscalateToHumanInput",fields:{threadId:{type:i.String_unsecure(),isOptional:!1},reason:{type:i.String_unsecure(),isOptional:!1},targetOwner:{type:i.String_unsecure(),isOptional:!0}}}),output:h},policy:{auth:"user"}}),B=s({meta:{key:"communication.feedback.record",version:"1.0.0",stability:"experimental",owners:[...r],tags:["communication","feedback"],description:"Record human feedback on a suggestion, draft, or extraction",goal:"Make AI correction signals auditable and replayable",context:"Used by review surfaces and future evaluation runs"},io:{input:l({name:"RecordHumanFeedbackInput",fields:{targetId:{type:i.String_unsecure(),isOptional:!1},targetType:{type:i.String_unsecure(),isOptional:!1},outcome:{type:O,isOptional:!1},notes:{type:i.String_unsecure(),isOptional:!0}}}),output:l({name:"RecordHumanFeedbackOutput",fields:{feedbackId:{type:i.String_unsecure(),isOptional:!1},safetyMode:{type:o,isOptional:!1}}})},policy:{auth:"user"}});export{F as CreateHandoffCommand,q as EscalateToHumanCommand,J as ProposeIdentityLinkCommand,H as ProposeThreadLinkCommand,B as RecordHumanFeedbackCommand};
|