@company-semantics/contracts 86.1.0 → 88.0.0
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/package.json +14 -10
- package/src/api/generated-spec-hash.ts +2 -2
- package/src/api/generated.ts +50 -262
- package/src/chat/README.md +8 -20
- package/src/chat/__tests__/compaction-boundary.test.ts +1 -0
- package/src/chat/__tests__/continuity.test.ts +1 -0
- package/src/chat/__tests__/discussion-scope.test.ts +0 -7
- package/src/chat/__tests__/message-mentions.test.ts +1 -12
- package/src/chat/__tests__/multi-party.test.ts +15 -6
- package/src/chat/__tests__/page-context.test.ts +3 -3
- package/src/chat/enums.ts +24 -11
- package/src/chat/index.ts +4 -16
- package/src/chat/schemas.ts +9 -71
- package/src/chat/types.ts +25 -77
- package/src/generated/openapi-routes.ts +1 -4
- package/src/guards/README.md +0 -1
- package/src/guards/config.ts +1 -10
- package/src/guards/evolution-config.ts +1 -18
- package/src/guards/index.ts +0 -1
- package/src/index.ts +15 -1279
- package/src/notifications/__tests__/__snapshots__/monospace-budget.test.ts.snap +4 -4
- package/src/notifications/__tests__/__snapshots__/render-snapshot.test.ts.snap +50 -49
- package/src/notifications/__tests__/fixtures.ts +7 -7
- package/src/notifications/__tests__/render-snapshot.test.ts +7 -7
- package/src/notifications/kinds/chat-shared.ts +11 -5
- package/src/notifications/payloads.ts +5 -5
- package/src/org/README.md +0 -212
- package/src/org/__tests__/view-scopes.test.ts +0 -2
- package/src/org/authority-schemas.ts +242 -0
- package/src/org/index.ts +26 -249
- package/src/org/invite-schemas.ts +596 -0
- package/src/org/org-governance-schemas.ts +198 -0
- package/src/org/org-unit-api-schemas.ts +226 -0
- package/src/org/org-unit-schemas.ts +223 -0
- package/src/org/ownership-transfer-types.ts +51 -0
- package/src/org/schemas.ts +18 -1658
- package/src/org/sso-stepper-types.ts +81 -0
- package/src/org/types.ts +15 -115
- package/src/org/view-scopes.ts +0 -1
- package/src/org/workspace-admin-schemas.ts +240 -0
- package/src/root-exports/README.md +91 -0
- package/src/root-exports/agent-runtime.ts +213 -0
- package/src/root-exports/collaboration.ts +247 -0
- package/src/root-exports/delivery.ts +218 -0
- package/src/root-exports/org-structure.ts +214 -0
- package/src/root-exports/org-workspace.ts +254 -0
- package/src/root-exports/platform.ts +205 -0
package/src/org/index.ts
CHANGED
|
@@ -3,6 +3,11 @@
|
|
|
3
3
|
*
|
|
4
4
|
* Re-exports organization vocabulary types.
|
|
5
5
|
* Import from '@company-semantics/contracts' (root).
|
|
6
|
+
*
|
|
7
|
+
* A module this barrel re-exports in full is re-exported with `export *`.
|
|
8
|
+
* `./types`, `./schemas` and `./org-depth` are listed by name because the
|
|
9
|
+
* barrel curates them: it omits a few names and re-exports some schema
|
|
10
|
+
* inferences under a `*Dto` alias.
|
|
6
11
|
*/
|
|
7
12
|
|
|
8
13
|
export type {
|
|
@@ -77,183 +82,61 @@ export {
|
|
|
77
82
|
} from "./types";
|
|
78
83
|
|
|
79
84
|
// Domain types (Phase 4)
|
|
80
|
-
export
|
|
81
|
-
DomainStatus,
|
|
82
|
-
DomainVerificationMethod,
|
|
83
|
-
OrgDomain,
|
|
84
|
-
Phase4AuditAction,
|
|
85
|
-
} from "./domain";
|
|
85
|
+
export * from "./domain";
|
|
86
86
|
|
|
87
87
|
// View authorization scopes (Phase 5 - ADR-APP-013)
|
|
88
|
-
export
|
|
89
|
-
export { VIEW_SCOPE_MAP, getViewScope } from "./view-scopes";
|
|
88
|
+
export * from "./view-scopes";
|
|
90
89
|
|
|
91
90
|
// Org structure facts: provenance + home/membership separation (ADR-CONTRACTS-066)
|
|
92
|
-
export
|
|
93
|
-
FactSourceTierSchema,
|
|
94
|
-
FACT_SOURCE_TIER_PRECEDENCE,
|
|
95
|
-
FactProvenanceSchema,
|
|
96
|
-
HomeAssignmentSchema,
|
|
97
|
-
} from "./structure-facts";
|
|
98
|
-
export type {
|
|
99
|
-
FactSourceTier,
|
|
100
|
-
FactProvenance,
|
|
101
|
-
HomeAssignment,
|
|
102
|
-
} from "./structure-facts";
|
|
91
|
+
export * from "./structure-facts";
|
|
103
92
|
|
|
104
93
|
// Occupancy: the holds_position relation (M:N, co-occupancy first-class).
|
|
105
94
|
// Vacancy = a position with no active occupancy. (ADR-CONT-083 / ADR-CTRL-182)
|
|
106
|
-
export
|
|
107
|
-
export type { OccupancyStatus, Occupancy } from "./occupancy";
|
|
95
|
+
export * from "./occupancy";
|
|
108
96
|
|
|
109
97
|
// Position: the org seat (planned/open/filled/closed) — a seat, not a person
|
|
110
98
|
// or a title. Carries a FactProvenance envelope. (ADR-CONT-083 / ADR-CTRL-182)
|
|
111
|
-
export
|
|
112
|
-
export type { PositionStatus, Position } from "./positions";
|
|
99
|
+
export * from "./positions";
|
|
113
100
|
|
|
114
101
|
// Position reporting: the canonical seat -> manager-seat reporting edge. The
|
|
115
102
|
// person hierarchy derives from this composed with occupancy. (ADR-CONT-083 / ADR-CTRL-182)
|
|
116
|
-
export
|
|
117
|
-
PositionReportingRelationshipTypeSchema,
|
|
118
|
-
PositionReportingSchema,
|
|
119
|
-
ReportingErrorCodeSchema,
|
|
120
|
-
} from "./position-reporting";
|
|
121
|
-
export type {
|
|
122
|
-
PositionReportingRelationshipType,
|
|
123
|
-
PositionReporting,
|
|
124
|
-
ReportingErrorCode,
|
|
125
|
-
} from "./position-reporting";
|
|
103
|
+
export * from "./position-reporting";
|
|
126
104
|
|
|
127
105
|
// Source authority: per-field ownership — who may WRITE a given entity field.
|
|
128
106
|
// Orthogonal to provenance (who reported). (ADR-CONT-083 / ADR-CTRL-182)
|
|
129
|
-
export
|
|
130
|
-
export type { SourceAuthority } from "./source-authority";
|
|
107
|
+
export * from "./source-authority";
|
|
131
108
|
|
|
132
109
|
// Sync run summary: the outcome record of one adapter sync run (counts +
|
|
133
110
|
// cursor watermark). A flat report shape, not a structure fact. (ADR-CONT-085)
|
|
134
|
-
export
|
|
135
|
-
export type { SyncRunSummary } from "./sync-run";
|
|
111
|
+
export * from "./sync-run";
|
|
136
112
|
|
|
137
113
|
// Conflict record: one recorded reconciliation conflict surfaced during a sync.
|
|
138
114
|
// Operational audit record about a sync, not a structure fact. (ADR-CONT-085)
|
|
139
|
-
export
|
|
140
|
-
export type { ConflictRecord } from "./conflict-record";
|
|
115
|
+
export * from "./conflict-record";
|
|
141
116
|
|
|
142
117
|
// Org reconciliation ledger: the org's STANDING disagreements with the connected
|
|
143
118
|
// HRIS — the open ones only, whether they arose during a sync (runId set) or
|
|
144
119
|
// during app use (runId null). Complements the run-scoped conflicts view; does
|
|
145
120
|
// not replace it. Resolution is a LOCAL decision (`sentToSource` is the literal
|
|
146
121
|
// false). (ADR-BE-564)
|
|
147
|
-
export
|
|
148
|
-
OrgDivergenceSchema,
|
|
149
|
-
OrgReconciliationLedgerSchema,
|
|
150
|
-
OrgDivergenceResolutionSchema,
|
|
151
|
-
ResolveOrgDivergenceResultSchema,
|
|
152
|
-
} from "./reconciliation";
|
|
153
|
-
export type {
|
|
154
|
-
OrgDivergence,
|
|
155
|
-
OrgReconciliationLedger,
|
|
156
|
-
OrgDivergenceResolution,
|
|
157
|
-
ResolveOrgDivergenceResult,
|
|
158
|
-
} from "./reconciliation";
|
|
122
|
+
export * from "./reconciliation";
|
|
159
123
|
|
|
160
124
|
// Structure findings: standing observations about recorded org data (a
|
|
161
125
|
// custodial-looking reporting line, a pod that looks like its own team), open /
|
|
162
126
|
// resolved by the facts / dismissed as intentional against a content
|
|
163
127
|
// fingerprint. Not questions — corrections go through transformations.
|
|
164
128
|
// (ADR-BE-765)
|
|
165
|
-
export
|
|
166
|
-
STRUCTURE_FINDING_KINDS,
|
|
167
|
-
STRUCTURE_FINDING_STATUSES,
|
|
168
|
-
StructureFindingKindSchema,
|
|
169
|
-
StructureFindingStatusSchema,
|
|
170
|
-
ReportingLineAnomalyReportSchema,
|
|
171
|
-
ReportingLineAnomalyFactsSchema,
|
|
172
|
-
SubunitCandidateFactsSchema,
|
|
173
|
-
StructureFindingDismissalSchema,
|
|
174
|
-
StructureFindingSchema,
|
|
175
|
-
StructureFindingListStatusSchema,
|
|
176
|
-
StructureFindingListResponseSchema,
|
|
177
|
-
DismissStructureFindingRequestSchema,
|
|
178
|
-
StructureFindingResponseSchema,
|
|
179
|
-
} from "./structure-findings";
|
|
180
|
-
export type {
|
|
181
|
-
StructureFindingKind,
|
|
182
|
-
StructureFindingStatus,
|
|
183
|
-
ReportingLineAnomalyReport,
|
|
184
|
-
ReportingLineAnomalyFacts,
|
|
185
|
-
SubunitCandidateFacts,
|
|
186
|
-
StructureFindingDismissal,
|
|
187
|
-
StructureFinding,
|
|
188
|
-
StructureFindingListStatus,
|
|
189
|
-
StructureFindingListResponse,
|
|
190
|
-
DismissStructureFindingRequest,
|
|
191
|
-
StructureFindingResponse,
|
|
192
|
-
} from "./structure-findings";
|
|
129
|
+
export * from "./structure-findings";
|
|
193
130
|
|
|
194
131
|
// Org transformation wire vocabulary: intent -> simulation -> preview. The
|
|
195
132
|
// engine turns a TransformationRequest into scored mutation bundles and returns
|
|
196
133
|
// a TransformationPreview the operator confirms before apply. (ADR-CONTRACTS-072)
|
|
197
|
-
export
|
|
198
|
-
OrgIntentSchema,
|
|
199
|
-
FactMutationSchema,
|
|
200
|
-
TransformationOriginSchema,
|
|
201
|
-
ProvenanceSchema,
|
|
202
|
-
ExecutionContextSchema,
|
|
203
|
-
TransformationRequestSchema,
|
|
204
|
-
ConstraintViolationSchema,
|
|
205
|
-
RecommendationSchema,
|
|
206
|
-
FindingSeveritySchema,
|
|
207
|
-
FindingSchema,
|
|
208
|
-
TransformStrategySchema,
|
|
209
|
-
SelectionRationaleSchema,
|
|
210
|
-
ReportingEdgeProvenanceSchema,
|
|
211
|
-
SupersededReportingEdgeSchema,
|
|
212
|
-
TransformationPreviewSchema,
|
|
213
|
-
} from "./transformation";
|
|
214
|
-
export type {
|
|
215
|
-
OrgIntent,
|
|
216
|
-
FactMutation,
|
|
217
|
-
TransformationOrigin,
|
|
218
|
-
Provenance,
|
|
219
|
-
ExecutionContext,
|
|
220
|
-
TransformationRequest,
|
|
221
|
-
ConstraintViolation,
|
|
222
|
-
Recommendation,
|
|
223
|
-
FindingSeverity,
|
|
224
|
-
Finding,
|
|
225
|
-
TransformStrategy,
|
|
226
|
-
SelectionRationale,
|
|
227
|
-
ReportingEdgeProvenance,
|
|
228
|
-
SupersededReportingEdge,
|
|
229
|
-
TransformationPreview,
|
|
230
|
-
} from "./transformation";
|
|
134
|
+
export * from "./transformation";
|
|
231
135
|
|
|
232
136
|
// Canonical facts: the adapter-seam ingestion batch. Each fact is keyed by
|
|
233
137
|
// external identity (externalSourceId/externalSourceSystem) and carries a
|
|
234
138
|
// FactProvenance envelope; the reconciler consumes the batch. (ADR-CONT-085 / ADR-CTRL-183)
|
|
235
|
-
export
|
|
236
|
-
CanonicalPersonSchema,
|
|
237
|
-
CanonicalOrgUnitSchema,
|
|
238
|
-
CanonicalPositionStatusSchema,
|
|
239
|
-
CanonicalPositionSchema,
|
|
240
|
-
CanonicalOccupancySchema,
|
|
241
|
-
CanonicalReportingEdgeSchema,
|
|
242
|
-
CanonicalUnresolvedManagerResolutionSchema,
|
|
243
|
-
CanonicalUnresolvedManagerSchema,
|
|
244
|
-
CanonicalFactsSchema,
|
|
245
|
-
} from "./canonical-facts";
|
|
246
|
-
export type {
|
|
247
|
-
CanonicalPerson,
|
|
248
|
-
CanonicalOrgUnit,
|
|
249
|
-
CanonicalPositionStatus,
|
|
250
|
-
CanonicalPosition,
|
|
251
|
-
CanonicalOccupancy,
|
|
252
|
-
CanonicalReportingEdge,
|
|
253
|
-
CanonicalUnresolvedManagerResolution,
|
|
254
|
-
CanonicalUnresolvedManager,
|
|
255
|
-
CanonicalFacts,
|
|
256
|
-
} from "./canonical-facts";
|
|
139
|
+
export * from "./canonical-facts";
|
|
257
140
|
|
|
258
141
|
// Org-structure inference: the snapshot the engine reasons over and the
|
|
259
142
|
// proposed desired state it returns. Evidence is TYPED so the validator can
|
|
@@ -266,119 +149,26 @@ export type {
|
|
|
266
149
|
// Apply on an AI proposal makes it human_confirmed without making its origin
|
|
267
150
|
// manual. Precedence runs on `authority` alone, via mayOverrideAuthority.
|
|
268
151
|
// (PRD-00956)
|
|
269
|
-
export
|
|
270
|
-
StructureEvidenceSchema,
|
|
271
|
-
TOPOLOGY_ONLY_EVIDENCE_KINDS,
|
|
272
|
-
StructureUnitAuthoritySchema,
|
|
273
|
-
StructureProposalOriginSchema,
|
|
274
|
-
StructureAcceptedBySchema,
|
|
275
|
-
StructureAuthoritySchema,
|
|
276
|
-
StructureProvenanceSchema,
|
|
277
|
-
mayOverrideAuthority,
|
|
278
|
-
ProposedOrgUnitSchema,
|
|
279
|
-
PersonStructureOutcomeSchema,
|
|
280
|
-
StructureReviewItemSchema,
|
|
281
|
-
STRUCTURE_REVIEW_ITEM_KINDS,
|
|
282
|
-
StructureProposalSchema,
|
|
283
|
-
StructurePersonFactSchema,
|
|
284
|
-
StructureReportingFactSchema,
|
|
285
|
-
ExistingUnitFactSchema,
|
|
286
|
-
ExistingPlacementFactSchema,
|
|
287
|
-
StructureInferenceSnapshotSchema,
|
|
288
|
-
} from "./structure-inference";
|
|
289
|
-
export type {
|
|
290
|
-
StructureEvidence,
|
|
291
|
-
StructureUnitAuthority,
|
|
292
|
-
StructureProposalOrigin,
|
|
293
|
-
StructureAcceptedBy,
|
|
294
|
-
StructureAuthority,
|
|
295
|
-
StructureProvenance,
|
|
296
|
-
ProposedOrgUnit,
|
|
297
|
-
PersonStructureOutcome,
|
|
298
|
-
StructureReviewItem,
|
|
299
|
-
StructureProposal,
|
|
300
|
-
StructurePersonFact,
|
|
301
|
-
StructureReportingFact,
|
|
302
|
-
ExistingUnitFact,
|
|
303
|
-
ExistingPlacementFact,
|
|
304
|
-
StructureInferenceSnapshot,
|
|
305
|
-
} from "./structure-inference";
|
|
152
|
+
export * from "./structure-inference";
|
|
306
153
|
|
|
307
154
|
// Canonical OrgUnit tree ordering (PRD-00506)
|
|
308
|
-
export
|
|
309
|
-
export
|
|
310
|
-
export {
|
|
311
|
-
levelSlugForDepth,
|
|
312
|
-
slugifyLevelLabel,
|
|
313
|
-
unitRouteSegments,
|
|
314
|
-
} from "./unit-route";
|
|
315
|
-
export type { UnitRouteLevel } from "./unit-route";
|
|
155
|
+
export * from "./tree-ordering";
|
|
156
|
+
export * from "./unit-route";
|
|
316
157
|
|
|
317
158
|
// Company.md domain types (PRD-00173)
|
|
318
|
-
export
|
|
319
|
-
CompanyMdVisibility,
|
|
320
|
-
CompanyMdDiscoverabilityPolicy,
|
|
321
|
-
CompanyMdClassification,
|
|
322
|
-
CompanyMdDocLevel,
|
|
323
|
-
CompanyMdDocKind,
|
|
324
|
-
CompanyMdNodeType,
|
|
325
|
-
CompanyMdSource,
|
|
326
|
-
CompanyMdDependency,
|
|
327
|
-
CompanyMdNodeIdentity,
|
|
328
|
-
CompanyMdTreeNode,
|
|
329
|
-
CompanyMdDocCore,
|
|
330
|
-
CompanyMdDocCollaborators,
|
|
331
|
-
CompanyMdDocRelations,
|
|
332
|
-
CompanyMdDoc,
|
|
333
|
-
CompanyMdContextBankItem,
|
|
334
|
-
} from "./company-md";
|
|
159
|
+
export * from "./company-md";
|
|
335
160
|
|
|
336
161
|
// Company.md real-time collaboration wire contract: sync/update-accepted
|
|
337
162
|
// responses, the SSE frame union, the Y.Doc shape constant, and the published
|
|
338
163
|
// size limits. Sequences are ALWAYS decimal strings. (ADR-CONT-102)
|
|
339
|
-
export
|
|
340
|
-
COMPANY_MD_COLLAB_TEXT_KEY,
|
|
341
|
-
COMPANY_MD_COLLAB_MAX_UPDATE_B64_CHARS,
|
|
342
|
-
COMPANY_MD_COLLAB_MAX_DOC_TEXT_BYTES,
|
|
343
|
-
COMPANY_MD_COLLAB_MAX_PRESENCE_POSITION_CHARS,
|
|
344
|
-
COMPANY_MD_COLLAB_PRESENCE_TTL_MS,
|
|
345
|
-
COMPANY_MD_COLLAB_PRESENCE_HEARTBEAT_MS,
|
|
346
|
-
CompanyMdCollabSyncLimitsSchema,
|
|
347
|
-
CompanyMdCollabSyncResponseSchema,
|
|
348
|
-
CompanyMdCollabUpdateAcceptedSchema,
|
|
349
|
-
CompanyMdCollabUpdateEventSchema,
|
|
350
|
-
CompanyMdCollabPresenceEventSchema,
|
|
351
|
-
CompanyMdCollabResetEventSchema,
|
|
352
|
-
CompanyMdCollabAccessRevokedEventSchema,
|
|
353
|
-
CompanyMdCollabConnectedEventSchema,
|
|
354
|
-
CompanyMdCollabServerDrainEventSchema,
|
|
355
|
-
CompanyMdCollabSseEventSchema,
|
|
356
|
-
} from "./company-md-collab";
|
|
357
|
-
export type {
|
|
358
|
-
CompanyMdCollabSyncLimits,
|
|
359
|
-
CompanyMdCollabSyncResponse,
|
|
360
|
-
CompanyMdCollabUpdateAccepted,
|
|
361
|
-
CompanyMdCollabUpdateEvent,
|
|
362
|
-
CompanyMdCollabPresenceEvent,
|
|
363
|
-
CompanyMdCollabResetEvent,
|
|
364
|
-
CompanyMdCollabAccessRevokedEvent,
|
|
365
|
-
CompanyMdCollabConnectedEvent,
|
|
366
|
-
CompanyMdCollabServerDrainEvent,
|
|
367
|
-
CompanyMdCollabSseEvent,
|
|
368
|
-
} from "./company-md-collab";
|
|
164
|
+
export * from "./company-md-collab";
|
|
369
165
|
|
|
370
166
|
// Sharing and ACL types (PRD-00306). The legacy AccessSource / AccessReason /
|
|
371
167
|
// EffectiveAccess / EvaluationStep / AccessExplanation were removed with
|
|
372
168
|
// CompanyMdAccessEvaluator (ADR-BE-392); ShareState.effectiveAccess now carries
|
|
373
169
|
// the projection EffectiveAccessResponse, and the ONE AccessSource lives in
|
|
374
170
|
// permissions/access-source.
|
|
375
|
-
export
|
|
376
|
-
AccessLevel,
|
|
377
|
-
SharePolicy,
|
|
378
|
-
AclEntry,
|
|
379
|
-
ShareState,
|
|
380
|
-
PermissionAuditEntry,
|
|
381
|
-
} from "./sharing";
|
|
171
|
+
export * from "./sharing";
|
|
382
172
|
|
|
383
173
|
// Workspace response schemas (PRD-00445)
|
|
384
174
|
export {
|
|
@@ -513,19 +303,7 @@ export type {
|
|
|
513
303
|
} from "./schemas";
|
|
514
304
|
|
|
515
305
|
// OrgUnit canonical model (ADR-BE-120)
|
|
516
|
-
export
|
|
517
|
-
OrgUnitClassification,
|
|
518
|
-
OrgUnitSyncMode,
|
|
519
|
-
OrgUnitVisibility,
|
|
520
|
-
OrgUnitRelationshipType,
|
|
521
|
-
OrgUnitRelationshipRole,
|
|
522
|
-
OrgUnitMembershipStatus,
|
|
523
|
-
OrgUnitMembershipSource,
|
|
524
|
-
OpenRoleStatus,
|
|
525
|
-
OrgUnitErrorCode,
|
|
526
|
-
OrgTreeResponse,
|
|
527
|
-
} from "./org-units";
|
|
528
|
-
export { ORG_UNITS_ROUTES } from "./org-units";
|
|
306
|
+
export * from "./org-units";
|
|
529
307
|
export {
|
|
530
308
|
ORG_UNIT_DESIGNED_MAX_DEPTH,
|
|
531
309
|
ORG_UNIT_ABSOLUTE_MAX_DEPTH,
|
|
@@ -644,5 +422,4 @@ export type {
|
|
|
644
422
|
} from "./schemas";
|
|
645
423
|
|
|
646
424
|
// Why an org stopped being personal (ADR-CONTRACTS-167)
|
|
647
|
-
export
|
|
648
|
-
export { ORG_SHARED_TRANSITION_TRIGGERS } from "./shared-transition";
|
|
425
|
+
export * from "./shared-transition";
|