@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.
- package/package.json +7 -3
- package/src/guards/README.md +0 -1
- package/src/guards/config.ts +0 -9
- package/src/guards/evolution-config.ts +1 -18
- package/src/guards/index.ts +0 -1
- package/src/index.ts +15 -1277
- package/src/mcp/README.md +12 -12
- package/src/mcp/capability-graph.ts +1 -1
- package/src/mcp/index.ts +16 -244
- package/src/mcp/tool-descriptor.ts +244 -0
- 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/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/system/README.md +1 -1
- package/src/system/capabilities.ts +1 -1
- package/src/system/diagram.ts +1 -1
- package/src/system/feature-status.ts +4 -0
- package/src/system/index.ts +3 -4
|
@@ -0,0 +1,214 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Package root exports — Org: Structure
|
|
3
|
+
*
|
|
4
|
+
* Sync runs, conflicts, reconciliation, structure findings, transformations,
|
|
5
|
+
* canonical facts, structure inference and authority/delegation vocabulary
|
|
6
|
+
* re-exported from the org domain.
|
|
7
|
+
*
|
|
8
|
+
* A slice of the `@company-semantics/contracts` root entry, moved here verbatim
|
|
9
|
+
* from `src/index.ts`, which re-exports it with `export *`. Each list is the
|
|
10
|
+
* exact subset of its domain the root exposes. Import from the package root,
|
|
11
|
+
* never from this file.
|
|
12
|
+
*/
|
|
13
|
+
|
|
14
|
+
// Sync run summary: the outcome record of one adapter sync run (counts +
|
|
15
|
+
// cursor watermark). A flat report shape, not a structure fact. (ADR-CONT-085)
|
|
16
|
+
export { SyncRunSummarySchema } from "../org/index";
|
|
17
|
+
export type { SyncRunSummary } from "../org/index";
|
|
18
|
+
|
|
19
|
+
// Conflict record: one recorded reconciliation conflict surfaced during a sync.
|
|
20
|
+
// Operational audit record about a sync, not a structure fact. (ADR-CONT-085)
|
|
21
|
+
export { ConflictRecordSchema } from "../org/index";
|
|
22
|
+
export type { ConflictRecord } from "../org/index";
|
|
23
|
+
|
|
24
|
+
// Org reconciliation ledger: the org's STANDING disagreements with the connected
|
|
25
|
+
// HRIS — the open ones only, sync-time (runId set) and app-time (runId null)
|
|
26
|
+
// alike. Complements the run-scoped conflicts view rather than replacing it, and
|
|
27
|
+
// resolution is a LOCAL decision only. (ADR-BE-564)
|
|
28
|
+
export {
|
|
29
|
+
OrgDivergenceSchema,
|
|
30
|
+
OrgReconciliationLedgerSchema,
|
|
31
|
+
OrgDivergenceResolutionSchema,
|
|
32
|
+
ResolveOrgDivergenceResultSchema,
|
|
33
|
+
} from "../org/index";
|
|
34
|
+
export type {
|
|
35
|
+
OrgDivergence,
|
|
36
|
+
OrgReconciliationLedger,
|
|
37
|
+
OrgDivergenceResolution,
|
|
38
|
+
ResolveOrgDivergenceResult,
|
|
39
|
+
} from "../org/index";
|
|
40
|
+
|
|
41
|
+
// Structure findings: standing observations about recorded org data, with a
|
|
42
|
+
// fact-driven lifecycle and a content-pinned dismissal. (ADR-BE-765)
|
|
43
|
+
export {
|
|
44
|
+
STRUCTURE_FINDING_KINDS,
|
|
45
|
+
STRUCTURE_FINDING_STATUSES,
|
|
46
|
+
StructureFindingKindSchema,
|
|
47
|
+
StructureFindingStatusSchema,
|
|
48
|
+
ReportingLineAnomalyReportSchema,
|
|
49
|
+
ReportingLineAnomalyFactsSchema,
|
|
50
|
+
SubunitCandidateFactsSchema,
|
|
51
|
+
StructureFindingDismissalSchema,
|
|
52
|
+
StructureFindingSchema,
|
|
53
|
+
StructureFindingListStatusSchema,
|
|
54
|
+
StructureFindingListResponseSchema,
|
|
55
|
+
DismissStructureFindingRequestSchema,
|
|
56
|
+
StructureFindingResponseSchema,
|
|
57
|
+
} from "../org/index";
|
|
58
|
+
export type {
|
|
59
|
+
StructureFindingKind,
|
|
60
|
+
StructureFindingStatus,
|
|
61
|
+
ReportingLineAnomalyReport,
|
|
62
|
+
ReportingLineAnomalyFacts,
|
|
63
|
+
SubunitCandidateFacts,
|
|
64
|
+
StructureFindingDismissal,
|
|
65
|
+
StructureFinding,
|
|
66
|
+
StructureFindingListStatus,
|
|
67
|
+
StructureFindingListResponse,
|
|
68
|
+
DismissStructureFindingRequest,
|
|
69
|
+
StructureFindingResponse,
|
|
70
|
+
} from "../org/index";
|
|
71
|
+
|
|
72
|
+
// Org transformation wire vocabulary: intent -> simulation -> preview. The
|
|
73
|
+
// engine turns a TransformationRequest into scored mutation bundles and returns
|
|
74
|
+
// a TransformationPreview the operator confirms before apply. (ADR-CONTRACTS-072)
|
|
75
|
+
export {
|
|
76
|
+
OrgIntentSchema,
|
|
77
|
+
FactMutationSchema,
|
|
78
|
+
TransformationOriginSchema,
|
|
79
|
+
ProvenanceSchema,
|
|
80
|
+
ExecutionContextSchema,
|
|
81
|
+
TransformationRequestSchema,
|
|
82
|
+
ConstraintViolationSchema,
|
|
83
|
+
RecommendationSchema,
|
|
84
|
+
FindingSeveritySchema,
|
|
85
|
+
FindingSchema,
|
|
86
|
+
TransformStrategySchema,
|
|
87
|
+
SelectionRationaleSchema,
|
|
88
|
+
ReportingEdgeProvenanceSchema,
|
|
89
|
+
SupersededReportingEdgeSchema,
|
|
90
|
+
TransformationPreviewSchema,
|
|
91
|
+
} from "../org/index";
|
|
92
|
+
export type {
|
|
93
|
+
OrgIntent,
|
|
94
|
+
FactMutation,
|
|
95
|
+
TransformationOrigin,
|
|
96
|
+
Provenance,
|
|
97
|
+
ExecutionContext,
|
|
98
|
+
TransformationRequest,
|
|
99
|
+
ConstraintViolation,
|
|
100
|
+
Recommendation,
|
|
101
|
+
FindingSeverity,
|
|
102
|
+
Finding,
|
|
103
|
+
TransformStrategy,
|
|
104
|
+
SelectionRationale,
|
|
105
|
+
ReportingEdgeProvenance,
|
|
106
|
+
SupersededReportingEdge,
|
|
107
|
+
TransformationPreview,
|
|
108
|
+
} from "../org/index";
|
|
109
|
+
|
|
110
|
+
// Canonical facts: the adapter-seam ingestion batch — external-keyed Canonical*
|
|
111
|
+
// facts (each with provenance) plus a CanonicalFacts envelope. The reconciler
|
|
112
|
+
// consumes the batch into the internal org graph. (ADR-CONT-085 / ADR-CTRL-183)
|
|
113
|
+
export {
|
|
114
|
+
CanonicalPersonSchema,
|
|
115
|
+
CanonicalOrgUnitSchema,
|
|
116
|
+
CanonicalPositionStatusSchema,
|
|
117
|
+
CanonicalPositionSchema,
|
|
118
|
+
CanonicalOccupancySchema,
|
|
119
|
+
CanonicalReportingEdgeSchema,
|
|
120
|
+
CanonicalUnresolvedManagerResolutionSchema,
|
|
121
|
+
CanonicalUnresolvedManagerSchema,
|
|
122
|
+
CanonicalFactsSchema,
|
|
123
|
+
} from "../org/index";
|
|
124
|
+
export type {
|
|
125
|
+
CanonicalPerson,
|
|
126
|
+
CanonicalOrgUnit,
|
|
127
|
+
CanonicalPositionStatus,
|
|
128
|
+
CanonicalPosition,
|
|
129
|
+
CanonicalOccupancy,
|
|
130
|
+
CanonicalReportingEdge,
|
|
131
|
+
CanonicalUnresolvedManagerResolution,
|
|
132
|
+
CanonicalUnresolvedManager,
|
|
133
|
+
CanonicalFacts,
|
|
134
|
+
} from "../org/index";
|
|
135
|
+
|
|
136
|
+
// Org-structure inference: a StructureInferenceSnapshot of the persisted graph
|
|
137
|
+
// goes in, a StructureProposal — a proposed desired state, never database
|
|
138
|
+
// commands — comes out. Typed evidence, targetUnitId for durable identity, and
|
|
139
|
+
// exactly one PersonStructureOutcome per person in the snapshot. (PRD-00955)
|
|
140
|
+
//
|
|
141
|
+
// Acceptance attaches StructureProvenance — proposalOrigin, acceptedBy and
|
|
142
|
+
// authority as three ORTHOGONAL axes, so accepting an AI proposal never rewrites
|
|
143
|
+
// its origin as manual. mayOverrideAuthority is the single definition of
|
|
144
|
+
// precedence, and it consults `authority` only. (PRD-00956)
|
|
145
|
+
export {
|
|
146
|
+
StructureEvidenceSchema,
|
|
147
|
+
TOPOLOGY_ONLY_EVIDENCE_KINDS,
|
|
148
|
+
StructureUnitAuthoritySchema,
|
|
149
|
+
StructureProposalOriginSchema,
|
|
150
|
+
StructureAcceptedBySchema,
|
|
151
|
+
StructureAuthoritySchema,
|
|
152
|
+
StructureProvenanceSchema,
|
|
153
|
+
mayOverrideAuthority,
|
|
154
|
+
ProposedOrgUnitSchema,
|
|
155
|
+
PersonStructureOutcomeSchema,
|
|
156
|
+
StructureReviewItemSchema,
|
|
157
|
+
StructureProposalSchema,
|
|
158
|
+
StructurePersonFactSchema,
|
|
159
|
+
StructureReportingFactSchema,
|
|
160
|
+
ExistingUnitFactSchema,
|
|
161
|
+
ExistingPlacementFactSchema,
|
|
162
|
+
StructureInferenceSnapshotSchema,
|
|
163
|
+
} from "../org/index";
|
|
164
|
+
export type {
|
|
165
|
+
StructureEvidence,
|
|
166
|
+
StructureUnitAuthority,
|
|
167
|
+
StructureProposalOrigin,
|
|
168
|
+
StructureAcceptedBy,
|
|
169
|
+
StructureAuthority,
|
|
170
|
+
StructureProvenance,
|
|
171
|
+
ProposedOrgUnit,
|
|
172
|
+
PersonStructureOutcome,
|
|
173
|
+
StructureReviewItem,
|
|
174
|
+
StructureProposal,
|
|
175
|
+
StructurePersonFact,
|
|
176
|
+
StructureReportingFact,
|
|
177
|
+
ExistingUnitFact,
|
|
178
|
+
ExistingPlacementFact,
|
|
179
|
+
StructureInferenceSnapshot,
|
|
180
|
+
} from "../org/index";
|
|
181
|
+
|
|
182
|
+
// Authority & Delegation vocabulary
|
|
183
|
+
export {
|
|
184
|
+
AuthoritySourceSchema,
|
|
185
|
+
AuthorityOriginSchema,
|
|
186
|
+
AuthorityConfidenceSchema,
|
|
187
|
+
AuthorityMechanismSchema,
|
|
188
|
+
AuthorityLocalitySchema,
|
|
189
|
+
AuthorityMutabilitySchema,
|
|
190
|
+
OwnerAuthoritySchema,
|
|
191
|
+
OrgUnitOwnerSchema,
|
|
192
|
+
PendingUnitOwnerSchema,
|
|
193
|
+
UnitLeadClearedSchema,
|
|
194
|
+
OrgUnitOwnersResponseSchema,
|
|
195
|
+
DelegationSchema,
|
|
196
|
+
CreateDelegationRequestSchema,
|
|
197
|
+
DelegationListResponseSchema,
|
|
198
|
+
} from "../org/index";
|
|
199
|
+
export type {
|
|
200
|
+
AuthoritySource,
|
|
201
|
+
AuthorityOrigin,
|
|
202
|
+
AuthorityConfidence,
|
|
203
|
+
AuthorityMechanism,
|
|
204
|
+
AuthorityLocality,
|
|
205
|
+
AuthorityMutability,
|
|
206
|
+
OwnerAuthority,
|
|
207
|
+
OrgUnitOwner,
|
|
208
|
+
PendingUnitOwner,
|
|
209
|
+
UnitLeadCleared,
|
|
210
|
+
OrgUnitOwnersResponse,
|
|
211
|
+
Delegation,
|
|
212
|
+
CreateDelegationRequest,
|
|
213
|
+
DelegationListResponse,
|
|
214
|
+
} from "../org/index";
|
|
@@ -0,0 +1,254 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Package root exports — Org: Workspace
|
|
3
|
+
*
|
|
4
|
+
* Organization, workspace, membership, invite, directory, company.md and
|
|
5
|
+
* collaboration vocabulary re-exported from the org 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
|
+
// Organization domain types
|
|
14
|
+
// @see ADR-BE-XXX for design rationale (Personal vs Shared Organization Model)
|
|
15
|
+
export type {
|
|
16
|
+
OrgType,
|
|
17
|
+
OrgSharedTransitionTrigger,
|
|
18
|
+
ExecutionScope,
|
|
19
|
+
OrganizationInfo,
|
|
20
|
+
OwnershipTransferRequest,
|
|
21
|
+
OwnershipTransferStatus,
|
|
22
|
+
// Workspace visibility DTOs (Phase 2)
|
|
23
|
+
// @see ADR-CONT-030 for design rationale
|
|
24
|
+
OrgLogos,
|
|
25
|
+
WorkspaceOverview,
|
|
26
|
+
WorkspaceMember,
|
|
27
|
+
AuthMethodConfig,
|
|
28
|
+
WorkspaceAuthConfig,
|
|
29
|
+
// SSO self-service setup types (PRD-00193)
|
|
30
|
+
SsoSetupInfo,
|
|
31
|
+
SsoReadinessCheck,
|
|
32
|
+
SsoReadiness,
|
|
33
|
+
SsoEnforcementStatus,
|
|
34
|
+
// SSO stepper types (PRD-00197)
|
|
35
|
+
ProviderStatus,
|
|
36
|
+
WorkspaceSsoState,
|
|
37
|
+
SsoStepperStep,
|
|
38
|
+
OwnerIdentityInfo,
|
|
39
|
+
OidcValidationResult,
|
|
40
|
+
TestSsoInitiation,
|
|
41
|
+
TestSsoResult,
|
|
42
|
+
ProviderSuggestion,
|
|
43
|
+
WorkspaceAuditEvent,
|
|
44
|
+
// Workspace expansion DTOs (Phase 3)
|
|
45
|
+
// @see ADR-CONT-031 for design rationale
|
|
46
|
+
OrgInviteStatus,
|
|
47
|
+
OrgInvite,
|
|
48
|
+
CreateInviteRequest,
|
|
49
|
+
AcceptInviteRequest,
|
|
50
|
+
RemoveMemberRequest,
|
|
51
|
+
ChangeMemberRoleRequest,
|
|
52
|
+
OrgAuthPolicy,
|
|
53
|
+
UpdateAuthPolicyRequest,
|
|
54
|
+
Phase3AuditAction,
|
|
55
|
+
// Domain and multi-org types (Phase 4)
|
|
56
|
+
// @see ADR-CONT-032 for design rationale
|
|
57
|
+
DomainStatus,
|
|
58
|
+
DomainVerificationMethod,
|
|
59
|
+
OrgDomain,
|
|
60
|
+
Phase4AuditAction,
|
|
61
|
+
UserOrgMembership,
|
|
62
|
+
// Authorization context types (Phase 5)
|
|
63
|
+
// @see ADR-CTRL-010 for design rationale
|
|
64
|
+
OrgScopedContext,
|
|
65
|
+
// Workspace Info/Settings surface types (PRD-00133)
|
|
66
|
+
WorkspaceSurface,
|
|
67
|
+
WorkspaceInfoOverview,
|
|
68
|
+
WorkspaceSettingsOverview,
|
|
69
|
+
IntegrationRequestStatus,
|
|
70
|
+
IntegrationRequest,
|
|
71
|
+
// Ownership transfer DTOs (PRD-00153)
|
|
72
|
+
TransferInitiateRequest,
|
|
73
|
+
TransferStatusResponse,
|
|
74
|
+
TransferAcceptanceView,
|
|
75
|
+
TransferResponsibility,
|
|
76
|
+
// Identity Trust Level types (PRD-00154)
|
|
77
|
+
IdentityTrustLevel,
|
|
78
|
+
TransferEligibilityResult,
|
|
79
|
+
TransferMemberEligibility,
|
|
80
|
+
// Company.md domain types (PRD-00173)
|
|
81
|
+
CompanyMdVisibility,
|
|
82
|
+
CompanyMdDiscoverabilityPolicy,
|
|
83
|
+
CompanyMdClassification,
|
|
84
|
+
CompanyMdDocLevel,
|
|
85
|
+
CompanyMdDocKind,
|
|
86
|
+
CompanyMdNodeType,
|
|
87
|
+
CompanyMdSource,
|
|
88
|
+
CompanyMdDependency,
|
|
89
|
+
CompanyMdTreeNode,
|
|
90
|
+
CompanyMdDoc,
|
|
91
|
+
CompanyMdContextBankItem,
|
|
92
|
+
// Sharing and ACL types (PRD-00306). Legacy AccessSource / AccessReason /
|
|
93
|
+
// EffectiveAccess / EvaluationStep / AccessExplanation removed with
|
|
94
|
+
// CompanyMdAccessEvaluator (ADR-BE-392); the ONE AccessSource is re-exported
|
|
95
|
+
// from ../permissions by the package root. AccessLevel (the sharing one) is
|
|
96
|
+
// exported by name from src/index.ts, not here — see the note there.
|
|
97
|
+
SharePolicy,
|
|
98
|
+
AclEntry,
|
|
99
|
+
ShareState,
|
|
100
|
+
PermissionAuditEntry,
|
|
101
|
+
} from "../org/index";
|
|
102
|
+
|
|
103
|
+
export {
|
|
104
|
+
VIEW_SCOPE_MAP,
|
|
105
|
+
getViewScope,
|
|
106
|
+
ORG_SHARED_TRANSITION_TRIGGERS,
|
|
107
|
+
TRANSFER_RESPONSIBILITIES,
|
|
108
|
+
IDENTITY_TRUST_LEVEL_LABELS,
|
|
109
|
+
ORG_UNIT_DESIGNED_MAX_DEPTH,
|
|
110
|
+
ORG_UNIT_ABSOLUTE_MAX_DEPTH,
|
|
111
|
+
} from "../org/index";
|
|
112
|
+
|
|
113
|
+
// The org unit route, built by backend hrefs and app routes alike (ADR-CONTRACTS-171)
|
|
114
|
+
export {
|
|
115
|
+
levelSlugForDepth,
|
|
116
|
+
slugifyLevelLabel,
|
|
117
|
+
unitRouteSegments,
|
|
118
|
+
} from "../org/index";
|
|
119
|
+
export type { UnitRouteLevel } from "../org/index";
|
|
120
|
+
|
|
121
|
+
// View authorization types (Phase 5 - ADR-APP-013)
|
|
122
|
+
export type { AuthorizableView } from "../org/index";
|
|
123
|
+
|
|
124
|
+
// Org structure facts: provenance + home/membership separation (ADR-CONTRACTS-066)
|
|
125
|
+
export {
|
|
126
|
+
FactSourceTierSchema,
|
|
127
|
+
FACT_SOURCE_TIER_PRECEDENCE,
|
|
128
|
+
FactProvenanceSchema,
|
|
129
|
+
HomeAssignmentSchema,
|
|
130
|
+
} from "../org/index";
|
|
131
|
+
export type {
|
|
132
|
+
FactSourceTier,
|
|
133
|
+
FactProvenance,
|
|
134
|
+
HomeAssignment,
|
|
135
|
+
} from "../org/index";
|
|
136
|
+
|
|
137
|
+
// Occupancy: the holds_position relation (M:N, co-occupancy first-class).
|
|
138
|
+
// Vacancy = a position with no active occupancy. (ADR-CONT-083 / ADR-CTRL-182)
|
|
139
|
+
export { OccupancyStatusSchema, OccupancySchema } from "../org/index";
|
|
140
|
+
export type { OccupancyStatus, Occupancy } from "../org/index";
|
|
141
|
+
|
|
142
|
+
// Position: the org seat (planned/open/filled/closed) — a seat, not a person
|
|
143
|
+
// or a title. Carries a FactProvenance envelope. (ADR-CONT-083 / ADR-CTRL-182)
|
|
144
|
+
export { PositionStatusSchema, PositionSchema } from "../org/index";
|
|
145
|
+
export type { PositionStatus, Position } from "../org/index";
|
|
146
|
+
|
|
147
|
+
// Position reporting: the canonical seat -> manager-seat reporting edge. The
|
|
148
|
+
// person hierarchy derives from this composed with occupancy. (ADR-CONT-083 / ADR-CTRL-182)
|
|
149
|
+
export {
|
|
150
|
+
PositionReportingRelationshipTypeSchema,
|
|
151
|
+
PositionReportingSchema,
|
|
152
|
+
} from "../org/index";
|
|
153
|
+
export type {
|
|
154
|
+
PositionReportingRelationshipType,
|
|
155
|
+
PositionReporting,
|
|
156
|
+
} from "../org/index";
|
|
157
|
+
|
|
158
|
+
// People directory: every `persons` row in the org, account-bearing or not.
|
|
159
|
+
// Neither the member list (RBAC principals) nor the org chart (topology) — the
|
|
160
|
+
// set an HRIS sync populates, and the only surface carrying a directory email.
|
|
161
|
+
// Capability-gated, deliberately: the org-chart read is authenticated-only.
|
|
162
|
+
export {
|
|
163
|
+
OrgDirectoryPersonSchema,
|
|
164
|
+
OrgDirectoryResponseSchema,
|
|
165
|
+
} from "../org/index";
|
|
166
|
+
export type { OrgDirectoryPerson, OrgDirectoryResponse } from "../org/index";
|
|
167
|
+
|
|
168
|
+
// Bulk invite, keyed by personId so recipients are resolved server-side from the
|
|
169
|
+
// caller's own directory rather than supplied by the caller.
|
|
170
|
+
export {
|
|
171
|
+
BATCH_INVITE_PERSONS_MAX,
|
|
172
|
+
INVITE_EXPIRY_DAYS,
|
|
173
|
+
BATCH_INVITE_SKIP_REASONS,
|
|
174
|
+
BatchInviteSkipReasonSchema,
|
|
175
|
+
BatchInviteRequestSchema,
|
|
176
|
+
BatchInviteResponseSchema,
|
|
177
|
+
} from "../org/index";
|
|
178
|
+
export type {
|
|
179
|
+
BatchInviteSkipReason,
|
|
180
|
+
BatchInviteRequest,
|
|
181
|
+
BatchInviteResponse,
|
|
182
|
+
} from "../org/index";
|
|
183
|
+
|
|
184
|
+
// Invite batches: the persisted Prepare → Review → Send lifecycle that puts a
|
|
185
|
+
// review boundary in front of bulk invite. The batch holds INTENT, never
|
|
186
|
+
// credentials — there is no token field on a batch or an item, and there never
|
|
187
|
+
// may be. Supersedes BatchInvite* above, which is removed in 58.0.0.
|
|
188
|
+
export {
|
|
189
|
+
INVITE_BATCH_STATUSES,
|
|
190
|
+
INVITE_BATCH_ITEM_STATUSES,
|
|
191
|
+
INVITE_BATCH_ITEM_REASONS,
|
|
192
|
+
INVITE_BATCH_CHANGED,
|
|
193
|
+
InviteBatchStatusSchema,
|
|
194
|
+
InviteBatchItemStatusSchema,
|
|
195
|
+
InviteBatchItemReasonSchema,
|
|
196
|
+
InviteBatchItemSchema,
|
|
197
|
+
InviteBatchCountsSchema,
|
|
198
|
+
InviteBatchSchema,
|
|
199
|
+
InviteBatchResponseSchema,
|
|
200
|
+
CreateInviteBatchRequestSchema,
|
|
201
|
+
UpdateInviteBatchRequestSchema,
|
|
202
|
+
SendInviteBatchRequestSchema,
|
|
203
|
+
} from "../org/index";
|
|
204
|
+
export type {
|
|
205
|
+
InviteBatchStatus,
|
|
206
|
+
InviteBatchItemStatus,
|
|
207
|
+
InviteBatchItemReason,
|
|
208
|
+
InviteBatchItem,
|
|
209
|
+
InviteBatchCounts,
|
|
210
|
+
InviteBatch,
|
|
211
|
+
InviteBatchResponse,
|
|
212
|
+
CreateInviteBatchRequest,
|
|
213
|
+
UpdateInviteBatchRequest,
|
|
214
|
+
SendInviteBatchRequest,
|
|
215
|
+
} from "../org/index";
|
|
216
|
+
|
|
217
|
+
// Source authority: per-field ownership — who may WRITE a given entity field.
|
|
218
|
+
// Orthogonal to provenance (who reported). (ADR-CONT-083 / ADR-CTRL-182)
|
|
219
|
+
export { SourceAuthoritySchema } from "../org/index";
|
|
220
|
+
export type { SourceAuthority } from "../org/index";
|
|
221
|
+
|
|
222
|
+
// Company.md real-time collaboration wire contract: sync/update-accepted
|
|
223
|
+
// responses, the SSE frame union, the Y.Doc shape constant, and the published
|
|
224
|
+
// size limits. Sequences are ALWAYS decimal strings. (ADR-CONT-102)
|
|
225
|
+
export {
|
|
226
|
+
COMPANY_MD_COLLAB_TEXT_KEY,
|
|
227
|
+
COMPANY_MD_COLLAB_MAX_UPDATE_B64_CHARS,
|
|
228
|
+
COMPANY_MD_COLLAB_MAX_DOC_TEXT_BYTES,
|
|
229
|
+
COMPANY_MD_COLLAB_MAX_PRESENCE_POSITION_CHARS,
|
|
230
|
+
COMPANY_MD_COLLAB_PRESENCE_TTL_MS,
|
|
231
|
+
COMPANY_MD_COLLAB_PRESENCE_HEARTBEAT_MS,
|
|
232
|
+
CompanyMdCollabSyncLimitsSchema,
|
|
233
|
+
CompanyMdCollabSyncResponseSchema,
|
|
234
|
+
CompanyMdCollabUpdateAcceptedSchema,
|
|
235
|
+
CompanyMdCollabUpdateEventSchema,
|
|
236
|
+
CompanyMdCollabPresenceEventSchema,
|
|
237
|
+
CompanyMdCollabResetEventSchema,
|
|
238
|
+
CompanyMdCollabAccessRevokedEventSchema,
|
|
239
|
+
CompanyMdCollabConnectedEventSchema,
|
|
240
|
+
CompanyMdCollabServerDrainEventSchema,
|
|
241
|
+
CompanyMdCollabSseEventSchema,
|
|
242
|
+
} from "../org/index";
|
|
243
|
+
export type {
|
|
244
|
+
CompanyMdCollabSyncLimits,
|
|
245
|
+
CompanyMdCollabSyncResponse,
|
|
246
|
+
CompanyMdCollabUpdateAccepted,
|
|
247
|
+
CompanyMdCollabUpdateEvent,
|
|
248
|
+
CompanyMdCollabPresenceEvent,
|
|
249
|
+
CompanyMdCollabResetEvent,
|
|
250
|
+
CompanyMdCollabAccessRevokedEvent,
|
|
251
|
+
CompanyMdCollabConnectedEvent,
|
|
252
|
+
CompanyMdCollabServerDrainEvent,
|
|
253
|
+
CompanyMdCollabSseEvent,
|
|
254
|
+
} from "../org/index";
|
|
@@ -0,0 +1,205 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Package root exports — Platform
|
|
3
|
+
*
|
|
4
|
+
* Impersonation, usage and execution telemetry, resource keys, errors, the
|
|
5
|
+
* generated OpenAPI surface, security, request scheduling, observability, SSE,
|
|
6
|
+
* routing, pressure, safe-mode, timeouts, tracing and auto-tuning vocabulary.
|
|
7
|
+
*
|
|
8
|
+
* A slice of the `@company-semantics/contracts` root entry, moved here verbatim
|
|
9
|
+
* from `src/index.ts`, which re-exports it with `export *`. Each list is the
|
|
10
|
+
* exact subset of its domain the root exposes. Import from the package root,
|
|
11
|
+
* never from this file.
|
|
12
|
+
*/
|
|
13
|
+
|
|
14
|
+
// Impersonation types (break-glass emergency access)
|
|
15
|
+
// @see ADR-BE-068 for trust model
|
|
16
|
+
export type {
|
|
17
|
+
AuthMode,
|
|
18
|
+
ImpersonationSession,
|
|
19
|
+
RestrictedImpersonationAction,
|
|
20
|
+
ImpersonationCapability,
|
|
21
|
+
ImpersonationSessionSummary,
|
|
22
|
+
ImpersonationAuditEventType,
|
|
23
|
+
} from "../impersonation";
|
|
24
|
+
|
|
25
|
+
export { RESTRICTED_IMPERSONATION_ACTIONS } from "../impersonation";
|
|
26
|
+
|
|
27
|
+
// Impersonation SSE event types (real-time push)
|
|
28
|
+
// @see PRD-00176 for design rationale
|
|
29
|
+
export type {
|
|
30
|
+
ImpersonationSessionSnapshotEvent,
|
|
31
|
+
ImpersonationSessionStartedEvent,
|
|
32
|
+
ImpersonationSessionEndedEvent,
|
|
33
|
+
ImpersonationSessionExpiredEvent,
|
|
34
|
+
ImpersonationSseEvent,
|
|
35
|
+
} from "../impersonation-events";
|
|
36
|
+
|
|
37
|
+
// AI features (INV-AI-ATTRIBUTION) and the internal-admin telemetry usage types
|
|
38
|
+
export { AI_FEATURES, AI_FEATURE_LABELS } from "../usage/features";
|
|
39
|
+
export type {
|
|
40
|
+
AiFeature,
|
|
41
|
+
// Unified usage types (PRD-00276/277)
|
|
42
|
+
UnifiedUsageSummary,
|
|
43
|
+
UnifiedDailyUsage,
|
|
44
|
+
UnifiedProfileUsage,
|
|
45
|
+
UnifiedUserUsage,
|
|
46
|
+
UnifiedModelUsage,
|
|
47
|
+
UnifiedFeatureUsage,
|
|
48
|
+
UnifiedUsageResponse,
|
|
49
|
+
} from "../usage/types";
|
|
50
|
+
|
|
51
|
+
// Runtime execution telemetry types
|
|
52
|
+
// @see PRD-00200 for design rationale
|
|
53
|
+
export type {
|
|
54
|
+
ExecutionFailureReason,
|
|
55
|
+
RuntimeExecutionTelemetry,
|
|
56
|
+
// Aggregation response types (PRD-00201)
|
|
57
|
+
ProfileStats,
|
|
58
|
+
OrgExecutionSummary,
|
|
59
|
+
DailyExecutionStats,
|
|
60
|
+
ExecutionByUser,
|
|
61
|
+
ExecutionDetail,
|
|
62
|
+
// Budget governance types (PRD-00232)
|
|
63
|
+
BudgetCheck,
|
|
64
|
+
OrgBudgetSettings,
|
|
65
|
+
} from "../usage/execution-types";
|
|
66
|
+
|
|
67
|
+
// Resource key types (shared vocabulary for data layer)
|
|
68
|
+
// @see PRD-00321 for design rationale
|
|
69
|
+
export type { ResourceKey, Action } from "../resource-keys";
|
|
70
|
+
export {
|
|
71
|
+
resolveScope,
|
|
72
|
+
toQueryKey,
|
|
73
|
+
fromQueryKey,
|
|
74
|
+
matchesResourceKey,
|
|
75
|
+
isResourceKeyShape,
|
|
76
|
+
} from "../resource-keys";
|
|
77
|
+
|
|
78
|
+
// Resource response wrapper (typed versioning for cache invalidation)
|
|
79
|
+
export type { ResourceResponse } from "../resource-response";
|
|
80
|
+
|
|
81
|
+
// Error response types (canonical shape for all API surfaces)
|
|
82
|
+
// @see ADR-BE-098 for design rationale
|
|
83
|
+
export type { ValidationDetail, ErrorResponse } from "../errors/index";
|
|
84
|
+
|
|
85
|
+
// OpenAPI generated types (from openapi/backend.yaml)
|
|
86
|
+
// @see src/api/README.md for codegen details
|
|
87
|
+
export type { paths, components, operations } from "../api/index";
|
|
88
|
+
|
|
89
|
+
// Spec hash (SHA-256 of openapi/backend.yaml, generated at build time)
|
|
90
|
+
export { SPEC_HASH, SPEC_HASH_FULL } from "../api/index";
|
|
91
|
+
|
|
92
|
+
// OpenAPI route registry (generated from openapi/backend.yaml)
|
|
93
|
+
export {
|
|
94
|
+
openApiRoutes,
|
|
95
|
+
type OpenApiRoute,
|
|
96
|
+
type OpenApiMethod,
|
|
97
|
+
} from "../generated/openapi-routes";
|
|
98
|
+
|
|
99
|
+
// Secret wrapper (multi-surface redaction for sensitive values)
|
|
100
|
+
export type { Secret } from "../security/index";
|
|
101
|
+
export { wrapSecret, unwrapSecret } from "../security/index";
|
|
102
|
+
|
|
103
|
+
// Org secrets DTO schemas (PRD-00629)
|
|
104
|
+
// @see src/security/org-secrets.ts for invariants (no value field on summary)
|
|
105
|
+
export {
|
|
106
|
+
UsageClassSchema,
|
|
107
|
+
OrgSecretsActionSchema,
|
|
108
|
+
SecretValueStringSchema,
|
|
109
|
+
OrgSecretSummarySchema,
|
|
110
|
+
CreateSecretRequestSchema,
|
|
111
|
+
RotateSecretRequestSchema,
|
|
112
|
+
DisableSecretRequestSchema,
|
|
113
|
+
} from "../security/index";
|
|
114
|
+
export type {
|
|
115
|
+
UsageClass,
|
|
116
|
+
OrgSecretsAction,
|
|
117
|
+
SecretValueString,
|
|
118
|
+
OrgSecretSummary,
|
|
119
|
+
CreateSecretRequest,
|
|
120
|
+
RotateSecretRequest,
|
|
121
|
+
DisableSecretRequest,
|
|
122
|
+
} from "../security/index";
|
|
123
|
+
|
|
124
|
+
// Auth token storage/entropy policy (PRD-00901)
|
|
125
|
+
// @see src/security/token-policy.ts — single source for the runtime issuance
|
|
126
|
+
// path and the secure-token-generation CI guard
|
|
127
|
+
export { AUTH_TOKEN_POLICY_REQUIREMENTS } from "../security/index";
|
|
128
|
+
export type {
|
|
129
|
+
TokenStorageFormat,
|
|
130
|
+
TokenPolicyConformance,
|
|
131
|
+
TokenPolicyRequirement,
|
|
132
|
+
AuthTokenPolicyClass,
|
|
133
|
+
} from "../security/index";
|
|
134
|
+
|
|
135
|
+
// Analytics response metadata (shared vocabulary for OLTP/OLAP separation)
|
|
136
|
+
// @see ADR-CTRL-053 for design rationale
|
|
137
|
+
export type {
|
|
138
|
+
AnalyticsBackend,
|
|
139
|
+
AnalyticsResponseMeta,
|
|
140
|
+
} from "../types/analytics";
|
|
141
|
+
|
|
142
|
+
// Client request scheduler types (shared tier vocabulary)
|
|
143
|
+
export type {
|
|
144
|
+
Tier,
|
|
145
|
+
MutationBehavior,
|
|
146
|
+
SchedulerResourceKey,
|
|
147
|
+
RequestDescriptor,
|
|
148
|
+
SchedulerEvent,
|
|
149
|
+
} from "../requests";
|
|
150
|
+
|
|
151
|
+
// Mutation policy types (lane behavior semantics)
|
|
152
|
+
export type { MutationPolicy } from "../mutations";
|
|
153
|
+
|
|
154
|
+
// Observability envelope types (shared metric shape)
|
|
155
|
+
export { REQUEST_ID_HEADER } from "../observability";
|
|
156
|
+
export type {
|
|
157
|
+
Labels,
|
|
158
|
+
MetricEnvelope,
|
|
159
|
+
SchedulerMetricName,
|
|
160
|
+
} from "../observability";
|
|
161
|
+
|
|
162
|
+
// Long-lived route vocabulary (PRD-00485 SSE / event-stream isolation)
|
|
163
|
+
export type { LongLivedRouteOptions, LongLivedPlugin } from "../sse";
|
|
164
|
+
export { longLivedPlugin } from "../sse";
|
|
165
|
+
|
|
166
|
+
// Route builder (PRD-00499 h5): required tier + resourceKey at the type level
|
|
167
|
+
export type { HttpMethod, RouteDefinition } from "../route-builder";
|
|
168
|
+
export { routeBuilder } from "../route-builder";
|
|
169
|
+
|
|
170
|
+
// Query intent vocabulary (PRD-00486 per-tier DB query timeouts + circuit breaker)
|
|
171
|
+
export type { QueryIntent } from "../queryIntent";
|
|
172
|
+
|
|
173
|
+
// System pressure vocabulary (PRD-00489 load-shed + progressive degradation)
|
|
174
|
+
export {
|
|
175
|
+
SYSTEM_PRESSURE_HEADER,
|
|
176
|
+
HEAP_SHED_PCT,
|
|
177
|
+
HEAP_CLEAR_PCT,
|
|
178
|
+
CLEAR_HOLDDOWN_MS,
|
|
179
|
+
} from "../pressure";
|
|
180
|
+
export type { SystemPressureValue, ShedResponse } from "../pressure";
|
|
181
|
+
|
|
182
|
+
// Safe-mode vocabulary (PRD-00495 global freeze / circuit breaker)
|
|
183
|
+
export { SYSTEM_SAFE_MODE_HEADER } from "../safe-mode";
|
|
184
|
+
export type { SafeModeValue, SafeModeState } from "../safe-mode";
|
|
185
|
+
|
|
186
|
+
// Timeout ladder (PRD-00491 end-to-end timing budgets)
|
|
187
|
+
export { TIMEOUT_LADDER_MS, getTimeoutForTier } from "../timeouts";
|
|
188
|
+
|
|
189
|
+
// Tracing vocabulary (PRD-00497 canonical request lifecycle)
|
|
190
|
+
export { LIFECYCLE_PHASES } from "../tracing";
|
|
191
|
+
export type {
|
|
192
|
+
LifecyclePhase,
|
|
193
|
+
TraceId,
|
|
194
|
+
RequestId,
|
|
195
|
+
TraceMetadata,
|
|
196
|
+
} from "../tracing";
|
|
197
|
+
|
|
198
|
+
// Damped auto-tuning controller vocabulary (PRD-00500 a1)
|
|
199
|
+
export { bounded } from "../autotune";
|
|
200
|
+
export type {
|
|
201
|
+
Bounded,
|
|
202
|
+
ControllerConfig,
|
|
203
|
+
ControllerInput,
|
|
204
|
+
ControllerOutput,
|
|
205
|
+
} from "../autotune";
|
package/src/system/README.md
CHANGED
|
@@ -33,7 +33,7 @@ Defines the semantic contract between backend (producer) and site (renderer).
|
|
|
33
33
|
- `DiagramSnapshot` _(type)_ — Snapshot of a diagram for cross-repo distribution.
|
|
34
34
|
- `DiagramSpec` _(type)_ — Complete diagram specification.
|
|
35
35
|
- `EdgeDirection` _(type)_ — Edge direction semantics.
|
|
36
|
-
- `FeatureStatus` _(type)_
|
|
36
|
+
- `FeatureStatus` _(type)_ — Feature maturity status.
|
|
37
37
|
- `FlowStage` _(type)_ — Architecture layers for horizontal organization.
|
|
38
38
|
- `PipelinePhase` _(type)_ — Data lifecycle phase for coloring/filtering.
|
|
39
39
|
- `RepoCapability` _(type)_ — Repository Capability Extends DiagramNode with repo-specific fields.
|
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
* @see ADR-CONTRACTS-NNN in DECISIONS.md
|
|
16
16
|
*/
|
|
17
17
|
|
|
18
|
-
import type { DiagramNode, FlowStage } from "./
|
|
18
|
+
import type { DiagramNode, FlowStage } from "./diagram";
|
|
19
19
|
|
|
20
20
|
// =============================================================================
|
|
21
21
|
// Types
|
package/src/system/diagram.ts
CHANGED