@company-semantics/contracts 87.0.0 → 88.0.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.
@@ -0,0 +1,213 @@
1
+ /**
2
+ * Package root exports — Agent Runtime
3
+ *
4
+ * MCP tool discovery, message parts, execution kinds, Ralph, internal admin
5
+ * and rate-limit vocabulary.
6
+ *
7
+ * A slice of the `@company-semantics/contracts` root entry, moved here verbatim
8
+ * from `src/index.ts`, which re-exports it with `export *`. Each list is the
9
+ * exact subset of its domain the root exposes. Import from the package root,
10
+ * never from this file.
11
+ */
12
+
13
+ // MCP tool discovery types
14
+ // @see company-semantics-backend/src/interfaces/mcp/ for implementation
15
+ export type {
16
+ ToolCategory,
17
+ ToolVisibility,
18
+ ToolInvocationMode,
19
+ ToolEffectClass,
20
+ MCPToolDescriptor,
21
+ ToolDiscoveryResponse,
22
+ ToolListMessagePart,
23
+ ToolListDataPart,
24
+ // Tool domain taxonomy (PRD-00265)
25
+ ToolDomain,
26
+ ToolIntegration,
27
+ ToolIntent,
28
+ ToolStability,
29
+ ToolComplexity,
30
+ // Resource flow types (PRD-00265)
31
+ ResourceType,
32
+ // Capability graph types (PRD-00265 types, PRD-00268 implementation)
33
+ CapabilityGraph,
34
+ CapabilityGraphEdge,
35
+ ToolWorkflow,
36
+ } from "../mcp/index";
37
+
38
+ export { buildCapabilityGraph } from "../mcp/index";
39
+
40
+ // Message part types and builder functions
41
+ // @see ADR-2026-01-022 for design rationale
42
+ export type {
43
+ TextPart,
44
+ ToolListPart,
45
+ StatusPanelPart,
46
+ StatusPanelEntry,
47
+ ChartPart,
48
+ ChartDataPoint,
49
+ TablePart,
50
+ ConfirmationPart,
51
+ SurfacePart,
52
+ AssistantMessagePart,
53
+ PartBuilderState,
54
+ AddPartResult,
55
+ // Preview types (Phase 3)
56
+ PreviewArtifactKind,
57
+ IntegrationProvider,
58
+ IntegrationKey,
59
+ IntegrationArtifactContent,
60
+ PreviewArtifact,
61
+ PreviewData,
62
+ PreviewPart,
63
+ PreviewDataPart,
64
+ // Confirmation types (Phase 4)
65
+ ConfirmationChoice,
66
+ ConfirmationRiskLevel,
67
+ ConfirmationData,
68
+ ConfirmationResponseData,
69
+ ConfirmationDataPart,
70
+ // Interactive task surface types (editable surfaces)
71
+ InteractiveTaskKind,
72
+ CandidateSource,
73
+ InteractiveFieldType,
74
+ InteractiveFieldDescriptor,
75
+ InteractiveTaskSubject,
76
+ InteractiveTaskDestination,
77
+ InteractiveTaskData,
78
+ InteractiveTaskPart,
79
+ InteractiveTaskDataPart,
80
+ StructureReviewData,
81
+ StructureReviewPart,
82
+ StructureReviewDataPart,
83
+ // Discussion hand-back signal (not a surface, data-discussion-handback)
84
+ DiscussionHandbackData,
85
+ DiscussionHandbackPart,
86
+ DiscussionHandbackDataPart,
87
+ // Suggested replies surface types (non-governed chips, PRD-00958)
88
+ SuggestedReply,
89
+ SuggestedRepliesData,
90
+ SuggestedRepliesPart,
91
+ SuggestedRepliesDataPart,
92
+ // Workflow progress surface types (non-governed anchor, data-workflow-progress, PRD-00976)
93
+ WorkflowProgressData,
94
+ WorkflowProgressPart,
95
+ WorkflowProgressDataPart,
96
+ // Execution result types (Phase 5)
97
+ ExecutionArtifactStatus,
98
+ ExecutionResultSummary,
99
+ ExecutionUndoCapability,
100
+ ExecutionResultData,
101
+ ExecutionResultPart,
102
+ ExecutionResultDataPart,
103
+ // Undo result types (PRD-00203)
104
+ UndoResultData,
105
+ UndoResultDataPart,
106
+ // Message lifecycle types (Phase 1 streaming)
107
+ // @see ADR-CONT-027 for design rationale
108
+ StreamPhase,
109
+ MessageLifecycleEventType,
110
+ MessageLifecycleEvent,
111
+ MessageStartEvent,
112
+ MessageDeltaEvent,
113
+ MessageCompleteEvent,
114
+ ToolResultRenderClass,
115
+ ToolResultPart,
116
+ MessageStartDataPart,
117
+ MessageDeltaDataPart,
118
+ MessageCompleteDataPart,
119
+ } from "../message-parts/index";
120
+
121
+ export {
122
+ isTextPart,
123
+ isSurfacePart,
124
+ createPartBuilder,
125
+ addText,
126
+ addSurface,
127
+ addPart,
128
+ buildParts,
129
+ getDroppedCount,
130
+ WireSurfaceBuilder,
131
+ CONFIRMATION_LABELS,
132
+ getConfirmationLabel,
133
+ DISCUSSION_HANDBACK_PART_TYPE,
134
+ } from "../message-parts/index";
135
+
136
+ // Generic review anchor (input-request-is-the-generic-review-anchor)
137
+ // data-input-request is governed like structure-review, which stays frozen and
138
+ // readable forever. See ../message-parts/input-request.ts.
139
+ export type {
140
+ InputRequestPart,
141
+ InputRequestDataPart,
142
+ } from "../message-parts/index";
143
+ export { isInputRequestDataPartShape } from "../message-parts/index";
144
+
145
+ // Execution kind types and registry
146
+ // @see ADR-CONT-029 for design rationale
147
+ export type {
148
+ ExecutionKind,
149
+ ExecutionState,
150
+ ExecutionEventType,
151
+ ISO8601Timestamp,
152
+ IconName,
153
+ ExecutionDomain,
154
+ ExecutionKindDefinition,
155
+ // Projection contracts
156
+ ExecutionTarget,
157
+ ExecutionInitiator,
158
+ ExecutionStatus,
159
+ ExecutionSummary,
160
+ TimelineStatus,
161
+ TimelineIcon,
162
+ TimelineUIEvent,
163
+ } from "../execution/index";
164
+
165
+ export {
166
+ EXECUTION_KINDS,
167
+ getExecutionKindDefinition,
168
+ isValidExecutionKind,
169
+ EXECUTION_EVENT_TYPES,
170
+ isExecutionEventType,
171
+ } from "../execution/index";
172
+
173
+ // Ralph autonomous coding loop types
174
+ // @see company-semantics-control/docs/ralph.md for usage
175
+ export type {
176
+ // PRD types
177
+ AllowedRepo,
178
+ RalphPRDCategory,
179
+ RalphPRDPriority,
180
+ RalphPRDItem,
181
+ RalphPRD,
182
+ // PRD v2.0 schema extensions
183
+ RalphAgentContract,
184
+ RalphFailurePolicy,
185
+ RalphScope,
186
+ RalphMeta,
187
+ RalphAcceptanceCriteria,
188
+ RalphReferenceImplementation,
189
+ RalphInteractionFlow,
190
+ RalphCapabilities,
191
+ RalphSuccessCriteria,
192
+ RalphCommitPolicy,
193
+ // Progress types
194
+ RalphIteration,
195
+ RalphMode,
196
+ RalphProgress,
197
+ } from "../ralph/index";
198
+
199
+ // Ralph constants (cross-repo support)
200
+ export { REPO_PRECEDENCE } from "../ralph/index";
201
+
202
+ // Internal admin types (cross-org control plane)
203
+ // @see PRD-00113 for design rationale
204
+ export type {
205
+ InternalAdminCapability,
206
+ InternalAdminContext,
207
+ RequestContext,
208
+ } from "../internal-admin";
209
+
210
+ // Rate limit domain types
211
+ // @see PRD-00013 for contracts integration
212
+ export type { RateLimitConfig, RateLimitResult } from "../rate-limit/index";
213
+ export { RateLimitTier } from "../rate-limit/index";
@@ -0,0 +1,247 @@
1
+ /**
2
+ * Package root exports — Collaboration
3
+ *
4
+ * The comment wire contract (anchors, interpretation, construction, receipts)
5
+ * and the chat domain.
6
+ *
7
+ * A slice of the `@company-semantics/contracts` root entry, moved here verbatim
8
+ * from `src/index.ts`, which re-exports it with `export *`. Each list is the
9
+ * exact subset of its domain the root exposes. Import from the package root,
10
+ * never from this file.
11
+ */
12
+
13
+ // Comment wire contract — where a thread hangs (the anchor union), what a
14
+ // thread and its comments look like on the wire, and who a comment may name.
15
+ // The anchor is the single most load-bearing shape in this package: the backend
16
+ // validates it and then stores opaque jsonb it never interprets, so app/
17
+ // contracts drift on it has NO server-side tripwire and mis-places comments
18
+ // silently. Response vocabulary only — request bodies stay backend-side.
19
+ // See src/comments/README.md.
20
+ //
21
+ // The anchor SIZE BOUNDS are published alongside the shape, because the client
22
+ // that composes an anchor and the schema that accepts it are the two halves of
23
+ // that same driftable agreement: a constructor capturing more context than the
24
+ // boundary accepts loses a comment after it was written. Note ANCHOR_CONTEXT_CHARS
25
+ // (capture) and ANCHOR_AFFIX_MAX_CHARS (accept) differ ON PURPOSE.
26
+ // @see ADR-CONTRACTS-116, ADR-CONT-029
27
+ export {
28
+ ANCHOR_AFFIX_MAX_CHARS,
29
+ ANCHOR_CONTEXT_CHARS,
30
+ COMMENT_ANCHOR_TYPES,
31
+ COMMENT_SUBJECT_TYPES,
32
+ COMMENT_THREAD_KINDS,
33
+ COMMENT_THREAD_STATUSES,
34
+ QUOTE_MAX_CHARS,
35
+ RELATIVE_POSITION_MAX_CHARS,
36
+ SUGGESTION_OPS,
37
+ SUGGESTION_STATUSES,
38
+ } from "../comments/index";
39
+
40
+ // The anchor's INTERPRETATION, published beside its shape (ADR-CONTRACTS-127).
41
+ // The schema said what an anchor looks like; these say what it MEANS. Both
42
+ // halves have to be published for the same reason: the writing client and the
43
+ // resolving client agree with no server-side arbiter between them, so a second
44
+ // description of "where does this anchor land" mis-places comments with nothing
45
+ // anywhere throwing. `resolveAnchorFromText` is total, pure and text-only — the
46
+ // Yjs relative-position rung stays in consumers, which compose it on top.
47
+ export {
48
+ contextAfter,
49
+ contextBefore,
50
+ contextsMatchAt,
51
+ findSoleOccurrence,
52
+ resolveAnchorFromText,
53
+ } from "../comments/index";
54
+
55
+ export type { AnchorResolution, Occurrence } from "../comments/index";
56
+
57
+ // The two questions asked BEFORE the body is written (ADR-CONTRACTS-127).
58
+ // `anchorStillReads` is a SECOND assertion, independent of the ladder — the
59
+ // applier must not trust the finder — and `plannedEdit` derives the mutation
60
+ // from the canonical payload rather than a caller's restatement of it. Both are
61
+ // total functions of their arguments, which is exactly what makes them liftable
62
+ // out of a browser applier: no Y.Text, no clock, no lease.
63
+ export { anchorStillReads, plannedEdit } from "../comments/index";
64
+
65
+ export type { PlannedEdit } from "../comments/index";
66
+
67
+ // The CONSTRUCTION half of the same contract (ADR-CONTRACTS-127). Publishing
68
+ // anchor → text while leaving text → anchor browser-only would be half an
69
+ // extraction: the side that COMPOSES an anchor decides how much context to
70
+ // capture and what counts as a quote, and a second description of that is the
71
+ // same silent-drift hazard the resolver was published to end. Both constructors
72
+ // validate through `CommentAnchorSchema` before returning and refuse — `null` —
73
+ // rather than truncate, because an anchor the route boundary rejects is a
74
+ // comment lost after it was composed. The relative-position pair is NOT
75
+ // produced here; a consumer holding a `Y.Text` merges it onto the result.
76
+ export {
77
+ createTextAnchorFromRange,
78
+ createTextInsertionAnchorAt,
79
+ } from "../comments/index";
80
+
81
+ export type { TextRange } from "../comments/index";
82
+
83
+ // The application receipt — the durable proof that an accepted suggestion's
84
+ // edit ALREADY LANDED IN THE BODY (ADR-CONTRACTS-127). It travels in the same
85
+ // CRDT transaction as the edit, so either both survived or neither did, which
86
+ // is what closes the window between the write and the acknowledgment. The MAP
87
+ // KEY is the load-bearing part: a receipt written under any other name lands in
88
+ // a map nobody reads while the reader watches a map nobody writes, and nothing
89
+ // anywhere throws — the same no-arbiter hazard as the anchor, now that a second
90
+ // implementation is about to write receipts too. Published with a PARSER,
91
+ // because these values arrive from a peer through a CRDT that has no schema of
92
+ // its own: a row that is not three well-typed fields is dropped, never
93
+ // surfaced. The receipt lives BESIDE the body and must never reach the markdown
94
+ // source, an export, or the content hash.
95
+ export {
96
+ SUGGESTION_RECEIPTS_MAP,
97
+ SuggestionReceiptSchema,
98
+ readSuggestionReceipt,
99
+ } from "../comments/index";
100
+
101
+ export type { SuggestionReceipt } from "../comments/index";
102
+
103
+ export {
104
+ AGENT_OUTCOME_REASONS,
105
+ AgentOutcomeSchema,
106
+ CommentAnchorSchema,
107
+ CommentAnchorTypeSchema,
108
+ CommentMentionSchema,
109
+ CommentSchema,
110
+ CommentSubjectTypeSchema,
111
+ CommentThreadListResponseSchema,
112
+ CommentThreadSchema,
113
+ CommentThreadStatusSchema,
114
+ CommentThreadSummarySchema,
115
+ MentionableCandidateSchema,
116
+ MentionableResponseSchema,
117
+ SuggestionSchema,
118
+ ThreadOriginSchema,
119
+ } from "../comments/index";
120
+
121
+ export type {
122
+ AgentOutcome,
123
+ CommentAnchor,
124
+ CommentAnchorType,
125
+ CommentMention,
126
+ CommentProjection,
127
+ CommentSubjectType,
128
+ CommentThread,
129
+ CommentThreadKind,
130
+ CommentThreadListResponse,
131
+ CommentThreadStatus,
132
+ CommentThreadSummary,
133
+ MentionableCandidate,
134
+ MentionableResponse,
135
+ Suggestion,
136
+ SuggestionOp,
137
+ SuggestionStatus,
138
+ ThreadOrigin,
139
+ } from "../comments/index";
140
+
141
+ // Chat domain types
142
+ // @see PRD-00142 for share chat design rationale
143
+ export type {
144
+ ChatSummary,
145
+ // Chat lifecycle types
146
+ TitleSource,
147
+ ChatListFilters,
148
+ ChatSummaryExtended,
149
+ TitleGenerationRequest,
150
+ TitleGenerationResponse,
151
+ // Event system types
152
+ BaseEvent,
153
+ InvalidationReason,
154
+ ChatChangedField,
155
+ // Domain events (carry full state)
156
+ ChatCreatedEvent,
157
+ ChatUpdatedEvent,
158
+ ChatDeletedEvent,
159
+ ChatDomainEvent,
160
+ // Invalidation events (staleness signals)
161
+ InvalidateChatEvent,
162
+ InvalidateChatListEvent,
163
+ ChatInvalidationEvent,
164
+ // SSE event unions
165
+ ChatSseEvent,
166
+ // Runtime profile types (PRD-00229)
167
+ ChatRuntimeProfile,
168
+ ChatRuntimeProfileInfo,
169
+ // Proactive chat wire vocabulary (ADR-CONTRACTS-142): how a chat was born,
170
+ // the occurrence-to-chat resolution states, and the recognized form of the
171
+ // wire-lenient `proactiveKind` string
172
+ ChatOrigin,
173
+ ProactiveChatResolution,
174
+ RecognizedProactiveKind,
175
+ // Page context (PRD-00969, ADR-CONTRACTS-153): where the reader is, as
176
+ // identifiers. Never content, never free text.
177
+ ChatDiscussionScope,
178
+ ChatPageContext,
179
+ // Chat mentions (ADR-CONTRACTS-160): a turn's mention rows are keyed on a
180
+ // PrincipalRef, so the agent is nameable on the chat surface too, and the
181
+ // composer's candidate list reuses the comments candidate shape.
182
+ ChatMessageMention,
183
+ ChatMentionableResponse,
184
+ // Multi-party chat (ADR-CONTRACTS-164): a chat is a room with a membership.
185
+ // Participation, not an ACL entity — two roles, one owner, and the agent is
186
+ // mentionable but never a member.
187
+ ChatParticipantRole,
188
+ ChatGrantableRole,
189
+ AddChatParticipantRequest,
190
+ UpdateChatParticipantRequest,
191
+ ChatParticipant,
192
+ ChatParticipantsResponse,
193
+ // Chat continuity (chat-continuity-wire-vocabulary): the subject a chat
194
+ // belongs to, its generation, and the lineage back to its predecessor.
195
+ ConversationSubjectKind,
196
+ ChatContinuationReason,
197
+ ChatContinuity,
198
+ // Launch resolution: the disposition the read-only resolve reports, the
199
+ // start-fresh response, and the launch-target-superseded 409 body.
200
+ LaunchDisposition,
201
+ ResolveLaunchResponse,
202
+ StartFreshChatResponse,
203
+ LaunchTargetSuperseded,
204
+ } from "../chat/index";
205
+
206
+ export {
207
+ CHAT_RUNTIME_PROFILES,
208
+ DEFAULT_CHAT_RUNTIME_PROFILE,
209
+ // Page context: the request-side schema and the closed vocabularies behind
210
+ // its `view`, `scope` and `entity.type` fields.
211
+ ChatDiscussionScopeSchema,
212
+ ChatPageContextSchema,
213
+ CHAT_DISCUSSION_REQUEST_TYPES,
214
+ CHAT_PAGE_VIEWS,
215
+ CHAT_PAGE_SCOPES,
216
+ CHAT_PAGE_ENTITY_TYPES,
217
+ // `proactiveKind` is a bare string on the wire so a new kind cannot make an
218
+ // older client reject the whole chat list; this is the ONE place it becomes
219
+ // a ProactiveEventKind. See src/chat/proactive-kind.ts.
220
+ recognizeProactiveKind,
221
+ // Chat mentions: the mention row a turn carries, and the composer's
222
+ // candidate envelope (items are `MentionableCandidateSchema`, imported from
223
+ // comments rather than restated).
224
+ ChatMessageMentionSchema,
225
+ ChatMentionableResponseSchema,
226
+ // Multi-party chat: the role vocabulary, one participant row, and the list
227
+ // envelope for GET /api/chats/:chatId/participants.
228
+ ChatParticipantRoleSchema,
229
+ ChatGrantableRoleSchema,
230
+ ChatParticipantSchema,
231
+ ChatParticipantsResponseSchema,
232
+ // Chat continuity: the closed subject-kind and continuation-reason
233
+ // vocabularies, and the lineage object on the chat detail.
234
+ CONVERSATION_SUBJECT_KINDS,
235
+ ConversationSubjectKindSchema,
236
+ CHAT_CONTINUATION_REASONS,
237
+ ChatContinuationReasonSchema,
238
+ ChatContinuitySchema,
239
+ // Launch resolution: the closed disposition vocabulary, the resolve and
240
+ // start-fresh responses, and the 409 code + body for a superseded target.
241
+ LAUNCH_DISPOSITIONS,
242
+ LaunchDispositionSchema,
243
+ ResolveLaunchResponseSchema,
244
+ StartFreshChatResponseSchema,
245
+ LAUNCH_TARGET_SUPERSEDED_CODE,
246
+ LaunchTargetSupersededSchema,
247
+ } from "../chat/index";
@@ -0,0 +1,218 @@
1
+ /**
2
+ * Package root exports — Delivery
3
+ *
4
+ * Notifications, action items, the user-scoped push envelope, the durable
5
+ * in-app inbox, proactive delivery and analysis workflows.
6
+ *
7
+ * A slice of the `@company-semantics/contracts` root entry, moved here verbatim
8
+ * from `src/index.ts`, which re-exports it with `export *`. Each list is the
9
+ * exact subset of its domain the root exposes. Import from the package root,
10
+ * never from this file.
11
+ */
12
+
13
+ // Notification domain types
14
+ // Replaces the Email* vocabulary (ADR-CONT-034), which was deleted with
15
+ // `@company-semantics/contracts/email` — email is now one channel, not the shape
16
+ // of the layer. The render layer itself (content model, renderers,
17
+ // renderToChannel) stays on the `/notifications` subpath; the root carries the
18
+ // vocabulary, as it did for email.
19
+ // @see ADR-CONTRACTS-086 for the multi-channel render layer
20
+ // @see ADR-CONTRACTS-085 for the definition + registry
21
+ export type {
22
+ NotificationKind,
23
+ NotificationPayloads,
24
+ NotificationDefinition,
25
+ NotificationDefinitions,
26
+ } from "../notifications/index";
27
+
28
+ export {
29
+ NOTIFICATION_DEFINITIONS,
30
+ getNotificationKindDefinition,
31
+ isValidNotificationKind,
32
+ } from "../notifications/index";
33
+
34
+ // Action-item domain types — things awaiting a user's DECISION, derived from
35
+ // each domain's own pending rows rather than stored. Deliberately a separate
36
+ // vocabulary from NotificationKind above: that one names events that get SENT,
37
+ // this one names standing state. See src/action-items/README.md.
38
+ // @see ADR-CONT-104
39
+ export {
40
+ ACTION_ITEM_KINDS,
41
+ ACTION_ITEM_TARGET_TYPES,
42
+ } from "../action-items/index";
43
+
44
+ export {
45
+ ActionItemKindSchema,
46
+ ActionItemListResponseSchema,
47
+ ActionItemSchema,
48
+ ActionItemTargetSchema,
49
+ ActionItemTargetTypeSchema,
50
+ } from "../action-items/index";
51
+
52
+ export type {
53
+ ActionItem,
54
+ ActionItemKind,
55
+ ActionItemListResponse,
56
+ ActionItemTarget,
57
+ ActionItemTargetType,
58
+ } from "../action-items/index";
59
+
60
+ // User-scoped push envelope — the frames any domain may put on ONE
61
+ // authenticated user's connection without owning a route or an SSE union of its
62
+ // own. A THIRD vocabulary alongside the two above, and deliberately unlike
63
+ // both: a notification LEAVES the building, an action item is STANDING state,
64
+ // and a user event is a single unreplayable instant meaning "your cache is
65
+ // stale". This stream is a wake-up channel, NOT an ordered event log — no frame
66
+ // carries an SSE `id:` and nothing durable may be hung off it.
67
+ // See src/user-events/README.md.
68
+ export {
69
+ MAX_INVALIDATION_KEYS,
70
+ USER_EVENT_RESYNC_REASONS,
71
+ } from "../user-events/index";
72
+
73
+ export {
74
+ ResourceInvalidatedEventSchema,
75
+ UserEventBaseSchema,
76
+ UserEventConnectedSchema,
77
+ UserEventResyncReasonSchema,
78
+ UserEventResyncSchema,
79
+ UserSseEventSchema,
80
+ } from "../user-events/index";
81
+
82
+ export type {
83
+ NotificationCreatedEvent,
84
+ ResourceInvalidatedEvent,
85
+ UserEventConnected,
86
+ UserEventResync,
87
+ UserEventResyncReason,
88
+ UserSseEvent,
89
+ } from "../user-events/index";
90
+
91
+ // Durable in-app inbox + the merged feed that renders it
92
+ // (user-notification-inbox-and-merged-feed). The
93
+ // THIRD vocabulary beside NotificationKind and ActionItemKind: a notification
94
+ // leaves the building, an action item is standing state you can resolve, and
95
+ // one of these is a stored fact you can only look at. Rows hold identifiers
96
+ // only — every prose field is rendered at read time under the reader's CURRENT
97
+ // authority, which is what keeps a stale row from leaking anything.
98
+ // See src/user-notifications/README.md.
99
+ export { USER_NOTIFICATION_KINDS } from "../user-notifications/index";
100
+
101
+ export {
102
+ FeedItemSchema,
103
+ FeedListResponseSchema,
104
+ FeedMarkReadRequestSchema,
105
+ UserNotificationKindSchema,
106
+ UserNotificationSchema,
107
+ } from "../user-notifications/index";
108
+
109
+ export type {
110
+ FeedItem,
111
+ FeedListResponse,
112
+ FeedMarkReadRequest,
113
+ UserNotification,
114
+ UserNotificationKind,
115
+ } from "../user-notifications/index";
116
+
117
+ // Each inbox kind's declared lifecycle — condition, supersession, resolution,
118
+ // retention (notification-lifecycle-is-declared-per-kind) — and the one
119
+ // function that turns a kind + domain ref into its condition/supersession keys.
120
+ export {
121
+ conditionKeyOf,
122
+ NOTIFICATION_ATTENTION_ON_SUPERSEDE,
123
+ NOTIFICATION_LIFECYCLE,
124
+ NOTIFICATION_RESOLUTION_AUDIENCES,
125
+ NOTIFICATION_RETENTION_CLASSES,
126
+ NotificationConditionKeyError,
127
+ notificationKeysOf,
128
+ } from "../user-notifications/index";
129
+
130
+ export type {
131
+ NotificationAttentionOnSupersede,
132
+ NotificationCondition,
133
+ NotificationKeys,
134
+ NotificationLifecycle,
135
+ NotificationResolution,
136
+ NotificationResolutionAudience,
137
+ NotificationRetention,
138
+ } from "../user-notifications/index";
139
+
140
+ // The feed's views, selectors (explicit ids, or a view as of `asOf`) and verb
141
+ // wire — read / unread / delete / restore — for the caller's inbox rows.
142
+ export {
143
+ FEED_SELECTOR_MAX_IDS,
144
+ FEED_VIEWS,
145
+ FeedDeleteRequestSchema,
146
+ FeedDeleteResponseSchema,
147
+ FeedMarkUnreadRequestSchema,
148
+ FeedMutationResponseSchema,
149
+ FeedRestoreRequestSchema,
150
+ FeedRestoreResponseSchema,
151
+ FeedSelectorSchema,
152
+ FeedViewSchema,
153
+ } from "../user-notifications/index";
154
+
155
+ export type {
156
+ FeedDeleteRequest,
157
+ FeedDeleteResponse,
158
+ FeedMarkUnreadRequest,
159
+ FeedMutationResponse,
160
+ FeedRestoreRequest,
161
+ FeedRestoreResponse,
162
+ FeedSelector,
163
+ FeedView,
164
+ } from "../user-notifications/index";
165
+
166
+ // Proactive delivery — how the system speaks first (ADR-CONTRACTS-142). A
167
+ // COMPOSER above the three notification vocabularies, not a fourth peer: the
168
+ // presentation class is a TOTAL FUNCTION from class to surfaces
169
+ // (CLASS_SURFACES, checked in both directions by the compiler), and a kind
170
+ // carries its class plus the IDS each surface needs — which banner, which chat
171
+ // template, which inbox kind — never the surface booleans. The born-read rule
172
+ // is stated once (bornRead) so the backend imports it rather than re-deriving
173
+ // it per call site. Pushed-chat prose lives here too (PROACTIVE_CHAT_COMPOSERS,
174
+ // total over the templates): the backend hands a composer facts and writes what
175
+ // comes back, FROZEN into the transcript — so a composer may only interpolate
176
+ // facts the recipient was entitled to at compose time. See src/proactive/README.md.
177
+ export {
178
+ PROACTIVE_PRESENTATION_CLASSES,
179
+ CLASS_SURFACES,
180
+ bornRead,
181
+ ORG_SYSTEM_EVENT_TYPES,
182
+ PROACTIVE_CHAT_TEMPLATES,
183
+ PROACTIVE_EVENT_KIND_IDS,
184
+ PROACTIVE_RECIPIENT_REASONS,
185
+ PROACTIVE_PROJECTIONS,
186
+ PROACTIVE_EVENT_KINDS,
187
+ PROACTIVE_CHAT_MAX_REPLIES,
188
+ PROACTIVE_CHAT_COMPOSERS,
189
+ } from "../proactive/index";
190
+
191
+ export type {
192
+ ProactivePresentationClass,
193
+ BadgeCarrier,
194
+ ClassSurfacePlan,
195
+ OrgSystemEventType,
196
+ ProactiveChatTemplate,
197
+ ProactiveEventKind,
198
+ ProactiveEventId,
199
+ ProactiveRecipientReason,
200
+ ProactiveProjection,
201
+ ProactiveEventDefinition,
202
+ OrgBecameSharedFacts,
203
+ MorningBriefFacts,
204
+ ProactiveChatFacts,
205
+ ProactiveChatComposer,
206
+ ProactiveChatMessage,
207
+ } from "../proactive/index";
208
+
209
+ // Analysis workflows — the registered types a durable long-running analysis
210
+ // can be (PRD-00976). The workflow primitive itself is domain-agnostic; its
211
+ // TYPE is the one place a domain names itself, and that name is a public wire
212
+ // discriminator carried on the workflow row, in the data-workflow-progress
213
+ // chat part and by the generic projection read. Namespaced `<domain>/<flow>`
214
+ // so domains cannot collide, and a CLOSED const array so the discriminator is
215
+ // validated and handled exhaustively. See src/workflows/README.md.
216
+ export { ANALYSIS_WORKFLOW_TYPES, isWorkflowType } from "../workflows/index";
217
+
218
+ export type { WorkflowType } from "../workflows/index";