@dynamicalsystems/idl 0.10.0 → 0.12.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/dist/index.cjs +295 -30
- package/dist/index.d.cts +249 -5
- package/dist/index.d.cts.map +1 -1
- package/dist/index.d.mts +249 -5
- package/dist/index.d.mts.map +1 -1
- package/dist/index.mjs +276 -31
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -2
- package/schema/dsg-core-google-identity-v1.json +39 -0
- package/schema/dsg-core-refusal-v3.json +103 -0
- package/schema/dsg-organization-source-v2.json +623 -0
- package/src/core/google-identity.v1.ts +42 -0
- package/src/core/identity-binding.v1.ts +2 -2
- package/src/core/refusal.v1.ts +2 -2
- package/src/core/refusal.v2.ts +2 -2
- package/src/core/refusal.v3.ts +50 -0
- package/src/index.ts +50 -6
- package/src/infra/adoption-fact.v1.ts +2 -2
- package/src/infra/resource-descriptor.v1.ts +2 -2
- package/src/infra/signed-law.v1.ts +1 -1
- package/src/kernel/bootstrap.v1.ts +1 -1
- package/src/kernel/dispatch-consume.v1.ts +1 -1
- package/src/kernel/ordinary-authority.v1.ts +2 -2
- package/src/kernel/standing-order-activation.v1.ts +2 -2
- package/src/organization/source.v2.ts +219 -0
- package/src/primitives.ts +2 -2
- package/src/registry/revocations.v1.ts +1 -1
- package/src/run/decision.v1.ts +2 -2
- package/src/run/event.v1.ts +2 -2
- package/src/run/operation.v1.ts +1 -1
- package/src/run/request.v1.ts +2 -2
- package/src/run/run-summary.v1.ts +2 -2
package/dist/index.cjs
CHANGED
|
@@ -100,7 +100,7 @@ const DispatchRefusalSchema = closed({
|
|
|
100
100
|
});
|
|
101
101
|
const dispatchConsumeV1 = {
|
|
102
102
|
literal: DISPATCH_CONSUME_PROFILE,
|
|
103
|
-
|
|
103
|
+
documents: {
|
|
104
104
|
request: DispatchConsumeRequestSchema,
|
|
105
105
|
lease: DispatchLeaseSchema,
|
|
106
106
|
refusal: DispatchRefusalSchema
|
|
@@ -187,7 +187,7 @@ const ReadbackSchema = closed({
|
|
|
187
187
|
const OperationStatusSchema = ReadbackSchema;
|
|
188
188
|
const operationV1 = {
|
|
189
189
|
literal: OPERATION_PROFILE,
|
|
190
|
-
|
|
190
|
+
documents: {
|
|
191
191
|
request: OperationRequestSchema,
|
|
192
192
|
accepted: AcceptedSchema,
|
|
193
193
|
readback: ReadbackSchema
|
|
@@ -225,8 +225,8 @@ const ResourceDescriptorSchema = closed({
|
|
|
225
225
|
const resourceDescriptorV1 = {
|
|
226
226
|
literal: RESOURCE_DESCRIPTOR_PROFILE,
|
|
227
227
|
literalNote: "carried as kind (unversioned) plus schemaVersion on the document; the /1 literal is the version marker signed-law pins",
|
|
228
|
-
|
|
229
|
-
|
|
228
|
+
rootDocument: "descriptor",
|
|
229
|
+
documents: { descriptor: ResourceDescriptorSchema }
|
|
230
230
|
};
|
|
231
231
|
//#endregion
|
|
232
232
|
//#region src/infra/signed-law.v1.ts
|
|
@@ -438,7 +438,7 @@ const SignedLawBundleSchema = _sinclair_typebox.Type.Object({
|
|
|
438
438
|
const signedLawV1 = {
|
|
439
439
|
literal: SIGNED_LAW_PROFILE,
|
|
440
440
|
literalNote: "carried as the domain member of the canonical signature input, not as a bundle field",
|
|
441
|
-
|
|
441
|
+
documents: { bundle: SignedLawBundleSchema }
|
|
442
442
|
};
|
|
443
443
|
//#endregion
|
|
444
444
|
//#region src/infra/adoption-fact.v1.ts
|
|
@@ -466,8 +466,8 @@ const AdoptionFactSchema = closed({
|
|
|
466
466
|
});
|
|
467
467
|
const adoptionFactV1 = {
|
|
468
468
|
literal: ADOPTION_FACT_PROFILE,
|
|
469
|
-
|
|
470
|
-
|
|
469
|
+
rootDocument: "fact",
|
|
470
|
+
documents: { fact: AdoptionFactSchema }
|
|
471
471
|
};
|
|
472
472
|
//#endregion
|
|
473
473
|
//#region src/registry/revocations.v1.ts
|
|
@@ -530,7 +530,7 @@ const RevocationPointerSchema = _sinclair_typebox.Type.Object({
|
|
|
530
530
|
}, closed$1);
|
|
531
531
|
const revocationsV1 = {
|
|
532
532
|
literal: REVOCATIONS_PROFILE,
|
|
533
|
-
|
|
533
|
+
documents: {
|
|
534
534
|
snapshot: RevocationSchema,
|
|
535
535
|
pointer: RevocationPointerSchema
|
|
536
536
|
}
|
|
@@ -580,7 +580,7 @@ const SignedBootstrapIntentSchema = closed({
|
|
|
580
580
|
});
|
|
581
581
|
const bootstrapV1 = {
|
|
582
582
|
literal: BOOTSTRAP_PROFILE,
|
|
583
|
-
|
|
583
|
+
documents: {
|
|
584
584
|
intent: BootstrapIntentSchema,
|
|
585
585
|
signed: SignedBootstrapIntentSchema
|
|
586
586
|
}
|
|
@@ -621,8 +621,8 @@ const SignedStandingOrderActivationSchema = closed({
|
|
|
621
621
|
});
|
|
622
622
|
const standingOrderActivationV1 = {
|
|
623
623
|
literal: STANDING_ORDER_ACTIVATION_PROFILE,
|
|
624
|
-
|
|
625
|
-
|
|
624
|
+
rootDocument: "event",
|
|
625
|
+
documents: {
|
|
626
626
|
activation: StandingOrderActivationSchema,
|
|
627
627
|
signed: SignedStandingOrderActivationSchema,
|
|
628
628
|
event: StandingOrderActivationEventSchema
|
|
@@ -668,8 +668,8 @@ const OrdinaryAuthoritySchema = closed({
|
|
|
668
668
|
});
|
|
669
669
|
const ordinaryAuthorityV1 = {
|
|
670
670
|
literal: ORDINARY_AUTHORITY_PROFILE,
|
|
671
|
-
|
|
672
|
-
|
|
671
|
+
rootDocument: "authority",
|
|
672
|
+
documents: { authority: OrdinaryAuthoritySchema }
|
|
673
673
|
};
|
|
674
674
|
//#endregion
|
|
675
675
|
//#region src/run/contract-versions.ts
|
|
@@ -731,8 +731,8 @@ const EventStreamSealSchema = closed({
|
|
|
731
731
|
});
|
|
732
732
|
const eventV1 = {
|
|
733
733
|
literal: EVENT_PROFILE,
|
|
734
|
-
|
|
735
|
-
|
|
734
|
+
rootDocument: "event",
|
|
735
|
+
documents: {
|
|
736
736
|
event: EventSchema,
|
|
737
737
|
streamSeal: EventStreamSealSchema
|
|
738
738
|
}
|
|
@@ -762,8 +762,8 @@ const RunRequestSchema = closed({
|
|
|
762
762
|
});
|
|
763
763
|
const requestV1 = {
|
|
764
764
|
literal: REQUEST_PROFILE,
|
|
765
|
-
|
|
766
|
-
|
|
765
|
+
rootDocument: "request",
|
|
766
|
+
documents: { request: RunRequestSchema }
|
|
767
767
|
};
|
|
768
768
|
//#endregion
|
|
769
769
|
//#region src/run/decision.v1.ts
|
|
@@ -780,8 +780,8 @@ const RunDecisionSchema = closed({
|
|
|
780
780
|
});
|
|
781
781
|
const decisionV1 = {
|
|
782
782
|
literal: DECISION_PROFILE,
|
|
783
|
-
|
|
784
|
-
|
|
783
|
+
rootDocument: "decision",
|
|
784
|
+
documents: { decision: RunDecisionSchema }
|
|
785
785
|
};
|
|
786
786
|
//#endregion
|
|
787
787
|
//#region src/run/run-summary.v1.ts
|
|
@@ -803,8 +803,8 @@ const RunSummarySchema = closed({
|
|
|
803
803
|
});
|
|
804
804
|
const runSummaryV1 = {
|
|
805
805
|
literal: RUN_SUMMARY_PROFILE,
|
|
806
|
-
|
|
807
|
-
|
|
806
|
+
rootDocument: "summary",
|
|
807
|
+
documents: { summary: RunSummarySchema }
|
|
808
808
|
};
|
|
809
809
|
//#endregion
|
|
810
810
|
//#region src/core/refusal.v1.ts
|
|
@@ -835,8 +835,8 @@ const RefusalSchema = closed({
|
|
|
835
835
|
});
|
|
836
836
|
const refusalV1 = {
|
|
837
837
|
literal: REFUSAL_PROFILE,
|
|
838
|
-
|
|
839
|
-
|
|
838
|
+
rootDocument: "refusal",
|
|
839
|
+
documents: { refusal: RefusalSchema }
|
|
840
840
|
};
|
|
841
841
|
//#endregion
|
|
842
842
|
//#region src/core/refusal.v2.ts
|
|
@@ -877,17 +877,70 @@ const RefusalV2Schema = closed({
|
|
|
877
877
|
});
|
|
878
878
|
const refusalV2 = {
|
|
879
879
|
literal: REFUSAL_V2_PROFILE,
|
|
880
|
-
|
|
881
|
-
|
|
880
|
+
rootDocument: "refusal",
|
|
881
|
+
documents: { refusal: RefusalV2Schema }
|
|
882
|
+
};
|
|
883
|
+
//#endregion
|
|
884
|
+
//#region src/core/google-identity.v1.ts
|
|
885
|
+
const GOOGLE_IDENTITY_PROFILE = "dsg.core.google-identity/1";
|
|
886
|
+
const GOOGLE_SIGN_IN_ISSUER = "https://accounts.google.com";
|
|
887
|
+
const GoogleAccountSubject = _sinclair_typebox.Type.String({ pattern: "^accounts\\.google\\.com:[0-9]+$" });
|
|
888
|
+
const GoogleIdentitySchema = closed({
|
|
889
|
+
profile: _sinclair_typebox.Type.Literal(GOOGLE_IDENTITY_PROFILE),
|
|
890
|
+
issuer: _sinclair_typebox.Type.Literal(GOOGLE_SIGN_IN_ISSUER),
|
|
891
|
+
googleSubject: GoogleAccountSubject,
|
|
892
|
+
audience: NonEmptyString,
|
|
893
|
+
hostedDomain: _sinclair_typebox.Type.Optional(NonEmptyString),
|
|
894
|
+
email: _sinclair_typebox.Type.Optional(NonEmptyString)
|
|
895
|
+
});
|
|
896
|
+
const googleIdentityV1 = {
|
|
897
|
+
literal: GOOGLE_IDENTITY_PROFILE,
|
|
898
|
+
rootDocument: "googleIdentity",
|
|
899
|
+
documents: { googleIdentity: GoogleIdentitySchema }
|
|
900
|
+
};
|
|
901
|
+
//#endregion
|
|
902
|
+
//#region src/core/refusal.v3.ts
|
|
903
|
+
const REFUSAL_V3_PROFILE = "dsg.core.refusal/3";
|
|
904
|
+
const RefusalCodeV3Schema = _sinclair_typebox.Type.Union([
|
|
905
|
+
_sinclair_typebox.Type.Literal("organization_absent"),
|
|
906
|
+
_sinclair_typebox.Type.Literal("organization_exists"),
|
|
907
|
+
_sinclair_typebox.Type.Literal("domain_mismatch"),
|
|
908
|
+
_sinclair_typebox.Type.Literal("suspended"),
|
|
909
|
+
_sinclair_typebox.Type.Literal("organization_disabled"),
|
|
910
|
+
_sinclair_typebox.Type.Literal("claims_missing"),
|
|
911
|
+
_sinclair_typebox.Type.Literal("not_qualified"),
|
|
912
|
+
_sinclair_typebox.Type.Literal("subject_conflict")
|
|
913
|
+
]);
|
|
914
|
+
const RefusalStageV3Schema = _sinclair_typebox.Type.Union([
|
|
915
|
+
_sinclair_typebox.Type.Literal("proxy"),
|
|
916
|
+
_sinclair_typebox.Type.Literal("provider"),
|
|
917
|
+
_sinclair_typebox.Type.Literal("identity_read"),
|
|
918
|
+
_sinclair_typebox.Type.Literal("plane"),
|
|
919
|
+
_sinclair_typebox.Type.Literal("console"),
|
|
920
|
+
_sinclair_typebox.Type.Literal("kernel"),
|
|
921
|
+
_sinclair_typebox.Type.Literal("record"),
|
|
922
|
+
_sinclair_typebox.Type.Literal("claim")
|
|
923
|
+
]);
|
|
924
|
+
const RefusalV3Schema = closed({
|
|
925
|
+
profile: _sinclair_typebox.Type.Literal(REFUSAL_V3_PROFILE),
|
|
926
|
+
code: RefusalCodeV3Schema,
|
|
927
|
+
sentence: NonEmptyString,
|
|
928
|
+
stage: _sinclair_typebox.Type.Optional(RefusalStageV3Schema),
|
|
929
|
+
correlationId: _sinclair_typebox.Type.Optional(NonEmptyString),
|
|
930
|
+
detail: _sinclair_typebox.Type.Optional(NonEmptyString)
|
|
931
|
+
});
|
|
932
|
+
const refusalV3 = {
|
|
933
|
+
literal: REFUSAL_V3_PROFILE,
|
|
934
|
+
rootDocument: "refusal",
|
|
935
|
+
documents: { refusal: RefusalV3Schema }
|
|
882
936
|
};
|
|
883
937
|
//#endregion
|
|
884
938
|
//#region src/core/identity-binding.v1.ts
|
|
885
939
|
const IDENTITY_BINDING_PROFILE = "dsg.core.identity-binding/1";
|
|
886
|
-
const GOOGLE_SIGN_IN_ISSUER = "https://accounts.google.com";
|
|
887
940
|
const IdentityBindingSchema = closed({
|
|
888
941
|
profile: _sinclair_typebox.Type.Literal(IDENTITY_BINDING_PROFILE),
|
|
889
942
|
principal: Orn,
|
|
890
|
-
issuer: _sinclair_typebox.Type.Literal(
|
|
943
|
+
issuer: _sinclair_typebox.Type.Literal("https://accounts.google.com"),
|
|
891
944
|
subject: NonEmptyString,
|
|
892
945
|
decider: Orn,
|
|
893
946
|
boundAt: UtcSecond,
|
|
@@ -895,8 +948,197 @@ const IdentityBindingSchema = closed({
|
|
|
895
948
|
});
|
|
896
949
|
const identityBindingV1 = {
|
|
897
950
|
literal: IDENTITY_BINDING_PROFILE,
|
|
898
|
-
|
|
899
|
-
|
|
951
|
+
rootDocument: "binding",
|
|
952
|
+
documents: { binding: IdentityBindingSchema }
|
|
953
|
+
};
|
|
954
|
+
//#endregion
|
|
955
|
+
//#region src/organization/source.v2.ts
|
|
956
|
+
const ORGANIZATION_SOURCE_PROFILE = "dsg.organization.source/2";
|
|
957
|
+
const OrganizationSpaceSchema = _sinclair_typebox.Type.String({ pattern: "^[a-z][a-z0-9-]*(?:\\.[a-z][a-z0-9-]*)+$" });
|
|
958
|
+
/** A path interpreted relative to the organization source root. Filesystem
|
|
959
|
+
* containment and symlink checks belong to the consumer that opens it. */
|
|
960
|
+
const OrganizationDocumentPathSchema = _sinclair_typebox.Type.String({
|
|
961
|
+
minLength: 1,
|
|
962
|
+
pattern: "^(?!/)(?!.*(?:^|/)\\.\\.(?:/|$))(?!.*//)(?!.*\\\\).+$"
|
|
963
|
+
});
|
|
964
|
+
const OrganizationSourceLocationSchema = closed({
|
|
965
|
+
repository: NonEmptyString,
|
|
966
|
+
ref: NonEmptyString,
|
|
967
|
+
subdirectory: OrganizationDocumentPathSchema
|
|
968
|
+
});
|
|
969
|
+
const OrganizationSourceLocationV1Schema = closed({
|
|
970
|
+
repository: _sinclair_typebox.Type.String(),
|
|
971
|
+
ref: _sinclair_typebox.Type.String(),
|
|
972
|
+
subdirectory: _sinclair_typebox.Type.String()
|
|
973
|
+
});
|
|
974
|
+
const ProjectSourceSchema = closed({
|
|
975
|
+
repository: NonEmptyString,
|
|
976
|
+
revision: _sinclair_typebox.Type.String({ pattern: "^(?:[0-9a-f]{40}|[0-9a-f]{64})$" })
|
|
977
|
+
});
|
|
978
|
+
const UniquePaths = () => _sinclair_typebox.Type.Array(OrganizationDocumentPathSchema, { uniqueItems: true });
|
|
979
|
+
const UniqueNames = () => _sinclair_typebox.Type.Array(NonEmptyString, { uniqueItems: true });
|
|
980
|
+
/** Frozen compatibility shape. Version one is loaded only through the explicit
|
|
981
|
+
* compatibility path; it is never silently reinterpreted as version two. */
|
|
982
|
+
const OrganizationRootV1Schema = closed({
|
|
983
|
+
schemaVersion: _sinclair_typebox.Type.Literal(1),
|
|
984
|
+
kind: _sinclair_typebox.Type.Literal("organization"),
|
|
985
|
+
org: NonEmptyString,
|
|
986
|
+
space: OrganizationSpaceSchema,
|
|
987
|
+
identity: closed({
|
|
988
|
+
principals: NonEmptyString,
|
|
989
|
+
qualifications: NonEmptyString,
|
|
990
|
+
designations: NonEmptyString
|
|
991
|
+
}),
|
|
992
|
+
policies: NonEmptyString,
|
|
993
|
+
vocabulary: NonEmptyString,
|
|
994
|
+
admissions: NonEmptyString,
|
|
995
|
+
deployment: NonEmptyString,
|
|
996
|
+
source: _sinclair_typebox.Type.Optional(OrganizationSourceLocationV1Schema)
|
|
997
|
+
});
|
|
998
|
+
const OrganizationInstructionSchema = closed({
|
|
999
|
+
layer: _sinclair_typebox.Type.Union([
|
|
1000
|
+
_sinclair_typebox.Type.Literal("constitution"),
|
|
1001
|
+
_sinclair_typebox.Type.Literal("profile"),
|
|
1002
|
+
_sinclair_typebox.Type.Literal("project")
|
|
1003
|
+
]),
|
|
1004
|
+
source: OrganizationDocumentPathSchema,
|
|
1005
|
+
provenance: OrganizationDocumentPathSchema
|
|
1006
|
+
});
|
|
1007
|
+
/** The generic root requires only stable identity, accountability, purpose and
|
|
1008
|
+
* a selected profile. Optional declaration groups become required only when
|
|
1009
|
+
* that profile says so. */
|
|
1010
|
+
const OrganizationRootSchema = closed({
|
|
1011
|
+
schemaVersion: _sinclair_typebox.Type.Literal(2),
|
|
1012
|
+
kind: _sinclair_typebox.Type.Literal("organization"),
|
|
1013
|
+
org: NonEmptyString,
|
|
1014
|
+
space: OrganizationSpaceSchema,
|
|
1015
|
+
owner: closed({
|
|
1016
|
+
responsibility: NonEmptyString,
|
|
1017
|
+
qualification: _sinclair_typebox.Type.Optional(OrganizationDocumentPathSchema),
|
|
1018
|
+
designation: _sinclair_typebox.Type.Optional(OrganizationDocumentPathSchema)
|
|
1019
|
+
}),
|
|
1020
|
+
purpose: NonEmptyString,
|
|
1021
|
+
profile: closed({
|
|
1022
|
+
document: OrganizationDocumentPathSchema,
|
|
1023
|
+
facts: _sinclair_typebox.Type.Record(_sinclair_typebox.Type.String({ pattern: "^[a-z][a-z0-9-]*$" }), OrganizationDocumentPathSchema, { additionalProperties: false })
|
|
1024
|
+
}),
|
|
1025
|
+
identity: _sinclair_typebox.Type.Optional(closed({
|
|
1026
|
+
principals: _sinclair_typebox.Type.Optional(OrganizationDocumentPathSchema),
|
|
1027
|
+
qualifications: _sinclair_typebox.Type.Optional(OrganizationDocumentPathSchema),
|
|
1028
|
+
designations: _sinclair_typebox.Type.Optional(OrganizationDocumentPathSchema),
|
|
1029
|
+
eligibility: _sinclair_typebox.Type.Optional(OrganizationDocumentPathSchema)
|
|
1030
|
+
})),
|
|
1031
|
+
policies: _sinclair_typebox.Type.Optional(closed({
|
|
1032
|
+
sources: _sinclair_typebox.Type.Array(OrganizationDocumentPathSchema, {
|
|
1033
|
+
minItems: 1,
|
|
1034
|
+
uniqueItems: true
|
|
1035
|
+
}),
|
|
1036
|
+
release: _sinclair_typebox.Type.Optional(OrganizationDocumentPathSchema)
|
|
1037
|
+
})),
|
|
1038
|
+
vocabulary: _sinclair_typebox.Type.Optional(OrganizationDocumentPathSchema),
|
|
1039
|
+
admissions: _sinclair_typebox.Type.Optional(OrganizationDocumentPathSchema),
|
|
1040
|
+
projects: _sinclair_typebox.Type.Optional(UniquePaths()),
|
|
1041
|
+
capabilities: _sinclair_typebox.Type.Optional(UniquePaths()),
|
|
1042
|
+
instructions: _sinclair_typebox.Type.Optional(_sinclair_typebox.Type.Array(OrganizationInstructionSchema)),
|
|
1043
|
+
documents: _sinclair_typebox.Type.Optional(UniquePaths()),
|
|
1044
|
+
archive: _sinclair_typebox.Type.Optional(OrganizationDocumentPathSchema),
|
|
1045
|
+
releases: _sinclair_typebox.Type.Optional(UniquePaths()),
|
|
1046
|
+
deployment: _sinclair_typebox.Type.Optional(OrganizationDocumentPathSchema),
|
|
1047
|
+
source: _sinclair_typebox.Type.Optional(OrganizationSourceLocationSchema)
|
|
1048
|
+
});
|
|
1049
|
+
const WorkspaceProfileSchema = closed({
|
|
1050
|
+
schemaVersion: _sinclair_typebox.Type.Literal(1),
|
|
1051
|
+
kind: _sinclair_typebox.Type.Literal("workspace-profile"),
|
|
1052
|
+
id: NonEmptyString,
|
|
1053
|
+
profile: _sinclair_typebox.Type.Literal(ORGANIZATION_SOURCE_PROFILE),
|
|
1054
|
+
version: _sinclair_typebox.Type.String({ pattern: "^[1-9][0-9]*\\.[0-9]+\\.[0-9]+$" }),
|
|
1055
|
+
requirements: closed({
|
|
1056
|
+
facts: UniqueNames(),
|
|
1057
|
+
minimumProjects: SafeInt,
|
|
1058
|
+
requiredCapabilities: UniqueNames(),
|
|
1059
|
+
instructions: _sinclair_typebox.Type.Boolean()
|
|
1060
|
+
}),
|
|
1061
|
+
allowedCapabilityOrigins: _sinclair_typebox.Type.Array(_sinclair_typebox.Type.Union([
|
|
1062
|
+
_sinclair_typebox.Type.Literal("workspace"),
|
|
1063
|
+
_sinclair_typebox.Type.Literal("official"),
|
|
1064
|
+
_sinclair_typebox.Type.Literal("curated")
|
|
1065
|
+
]), { uniqueItems: true }),
|
|
1066
|
+
handling: closed({ required: _sinclair_typebox.Type.Boolean() }),
|
|
1067
|
+
readinessChecks: UniquePaths()
|
|
1068
|
+
});
|
|
1069
|
+
const ProjectMembershipSchema = closed({
|
|
1070
|
+
schemaVersion: _sinclair_typebox.Type.Literal(1),
|
|
1071
|
+
kind: _sinclair_typebox.Type.Literal("project-membership"),
|
|
1072
|
+
id: NonEmptyString,
|
|
1073
|
+
mode: _sinclair_typebox.Type.Union([_sinclair_typebox.Type.Literal("managed"), _sinclair_typebox.Type.Literal("independent")]),
|
|
1074
|
+
source: ProjectSourceSchema,
|
|
1075
|
+
role: NonEmptyString,
|
|
1076
|
+
contract: OrganizationDocumentPathSchema,
|
|
1077
|
+
handling: OrganizationDocumentPathSchema,
|
|
1078
|
+
state: _sinclair_typebox.Type.Union([
|
|
1079
|
+
_sinclair_typebox.Type.Literal("active"),
|
|
1080
|
+
_sinclair_typebox.Type.Literal("suspended"),
|
|
1081
|
+
_sinclair_typebox.Type.Literal("removed")
|
|
1082
|
+
])
|
|
1083
|
+
});
|
|
1084
|
+
const CapabilityOriginSchema = _sinclair_typebox.Type.Union([
|
|
1085
|
+
_sinclair_typebox.Type.Literal("workspace"),
|
|
1086
|
+
_sinclair_typebox.Type.Literal("official"),
|
|
1087
|
+
_sinclair_typebox.Type.Literal("curated")
|
|
1088
|
+
]);
|
|
1089
|
+
/** `declaration` and component `reference` point to their owning existing
|
|
1090
|
+
* capability/Definition formats; this schema does not duplicate them. */
|
|
1091
|
+
const CapabilitySelectionSchema = closed({
|
|
1092
|
+
schemaVersion: _sinclair_typebox.Type.Literal(1),
|
|
1093
|
+
kind: _sinclair_typebox.Type.Literal("capability-selection"),
|
|
1094
|
+
id: NonEmptyString,
|
|
1095
|
+
declaration: OrganizationDocumentPathSchema,
|
|
1096
|
+
components: _sinclair_typebox.Type.Array(closed({
|
|
1097
|
+
id: NonEmptyString,
|
|
1098
|
+
reference: OrganizationDocumentPathSchema
|
|
1099
|
+
}), { uniqueItems: true }),
|
|
1100
|
+
origin: CapabilityOriginSchema,
|
|
1101
|
+
dependencyLock: OrganizationDocumentPathSchema,
|
|
1102
|
+
requiredDispositions: UniqueNames()
|
|
1103
|
+
});
|
|
1104
|
+
const ReleaseMemberKindSchema = _sinclair_typebox.Type.Union([
|
|
1105
|
+
_sinclair_typebox.Type.Literal("policy"),
|
|
1106
|
+
_sinclair_typebox.Type.Literal("capability-admission"),
|
|
1107
|
+
_sinclair_typebox.Type.Literal("workflow-publication"),
|
|
1108
|
+
_sinclair_typebox.Type.Literal("contract-check"),
|
|
1109
|
+
_sinclair_typebox.Type.Literal("target-readiness"),
|
|
1110
|
+
_sinclair_typebox.Type.Literal("setup-condition")
|
|
1111
|
+
]);
|
|
1112
|
+
const ReleaseDeclarationSchema = closed({
|
|
1113
|
+
schemaVersion: _sinclair_typebox.Type.Literal(1),
|
|
1114
|
+
kind: _sinclair_typebox.Type.Literal("release-declaration"),
|
|
1115
|
+
name: NonEmptyString,
|
|
1116
|
+
selection: closed({
|
|
1117
|
+
projects: UniqueNames(),
|
|
1118
|
+
capabilities: UniqueNames()
|
|
1119
|
+
}),
|
|
1120
|
+
members: _sinclair_typebox.Type.Array(closed({
|
|
1121
|
+
key: NonEmptyString,
|
|
1122
|
+
artifact: OrganizationDocumentPathSchema,
|
|
1123
|
+
kind: ReleaseMemberKindSchema,
|
|
1124
|
+
required: _sinclair_typebox.Type.Boolean(),
|
|
1125
|
+
acceptableDispositions: _sinclair_typebox.Type.Array(NonEmptyString, {
|
|
1126
|
+
minItems: 1,
|
|
1127
|
+
uniqueItems: true
|
|
1128
|
+
})
|
|
1129
|
+
})),
|
|
1130
|
+
predecessors: UniqueNames()
|
|
1131
|
+
});
|
|
1132
|
+
const organizationSourceV2 = {
|
|
1133
|
+
literal: ORGANIZATION_SOURCE_PROFILE,
|
|
1134
|
+
rootDocument: "organization",
|
|
1135
|
+
documents: {
|
|
1136
|
+
organization: OrganizationRootSchema,
|
|
1137
|
+
workspaceProfile: WorkspaceProfileSchema,
|
|
1138
|
+
projectMembership: ProjectMembershipSchema,
|
|
1139
|
+
capabilitySelection: CapabilitySelectionSchema,
|
|
1140
|
+
releaseDeclaration: ReleaseDeclarationSchema
|
|
1141
|
+
}
|
|
900
1142
|
};
|
|
901
1143
|
//#endregion
|
|
902
1144
|
//#region src/index.ts
|
|
@@ -913,6 +1155,8 @@ const PROFILES = {
|
|
|
913
1155
|
[runSummaryV1.literal]: runSummaryV1,
|
|
914
1156
|
[refusalV1.literal]: refusalV1,
|
|
915
1157
|
[refusalV2.literal]: refusalV2,
|
|
1158
|
+
[refusalV3.literal]: refusalV3,
|
|
1159
|
+
[googleIdentityV1.literal]: googleIdentityV1,
|
|
916
1160
|
[identityBindingV1.literal]: identityBindingV1,
|
|
917
1161
|
[signedLawV1.literal]: signedLawV1,
|
|
918
1162
|
[resourceDescriptorV1.literal]: resourceDescriptorV1,
|
|
@@ -920,7 +1164,8 @@ const PROFILES = {
|
|
|
920
1164
|
[revocationsV1.literal]: revocationsV1,
|
|
921
1165
|
[bootstrapV1.literal]: bootstrapV1,
|
|
922
1166
|
[ordinaryAuthorityV1.literal]: ordinaryAuthorityV1,
|
|
923
|
-
[standingOrderActivationV1.literal]: standingOrderActivationV1
|
|
1167
|
+
[standingOrderActivationV1.literal]: standingOrderActivationV1,
|
|
1168
|
+
[organizationSourceV2.literal]: organizationSourceV2
|
|
924
1169
|
};
|
|
925
1170
|
//#endregion
|
|
926
1171
|
exports.ADOPTION_FACT_PROFILE = ADOPTION_FACT_PROFILE;
|
|
@@ -929,6 +1174,8 @@ exports.AdoptionFactSchema = AdoptionFactSchema;
|
|
|
929
1174
|
exports.BOOTSTRAP_PROFILE = BOOTSTRAP_PROFILE;
|
|
930
1175
|
exports.BootstrapActionSchema = BootstrapActionSchema;
|
|
931
1176
|
exports.BootstrapIntentSchema = BootstrapIntentSchema;
|
|
1177
|
+
exports.CapabilityOriginSchema = CapabilityOriginSchema;
|
|
1178
|
+
exports.CapabilitySelectionSchema = CapabilitySelectionSchema;
|
|
932
1179
|
exports.DECISION_PROFILE = DECISION_PROFILE;
|
|
933
1180
|
exports.DISPATCH_CONSUME_PROFILE = DISPATCH_CONSUME_PROFILE;
|
|
934
1181
|
exports.DISPATCH_MAX_SKEW_SECONDS = DISPATCH_MAX_SKEW_SECONDS;
|
|
@@ -945,7 +1192,9 @@ exports.ExecutionDocumentSchema = ExecutionDocumentSchema;
|
|
|
945
1192
|
exports.ExecutionLawSchema = ExecutionLawSchema;
|
|
946
1193
|
exports.ExecutionResourcesSchema = ExecutionResourcesSchema;
|
|
947
1194
|
exports.ExperimentRefSchema = ExperimentRefSchema;
|
|
1195
|
+
exports.GOOGLE_IDENTITY_PROFILE = GOOGLE_IDENTITY_PROFILE;
|
|
948
1196
|
exports.GOOGLE_SIGN_IN_ISSUER = GOOGLE_SIGN_IN_ISSUER;
|
|
1197
|
+
exports.GoogleIdentitySchema = GoogleIdentitySchema;
|
|
949
1198
|
exports.Hex64 = Hex64;
|
|
950
1199
|
exports.IDENTITY_BINDING_PROFILE = IDENTITY_BINDING_PROFILE;
|
|
951
1200
|
exports.IdentityBindingSchema = IdentityBindingSchema;
|
|
@@ -953,6 +1202,7 @@ exports.LIFECYCLE_KINDS = LIFECYCLE_KINDS;
|
|
|
953
1202
|
exports.NonEmptyString = NonEmptyString;
|
|
954
1203
|
exports.OPERATION_PROFILE = OPERATION_PROFILE;
|
|
955
1204
|
exports.ORDINARY_AUTHORITY_PROFILE = ORDINARY_AUTHORITY_PROFILE;
|
|
1205
|
+
exports.ORGANIZATION_SOURCE_PROFILE = ORGANIZATION_SOURCE_PROFILE;
|
|
956
1206
|
exports.OperationBeforeSchema = OperationBeforeSchema;
|
|
957
1207
|
exports.OperationCleanupSchema = OperationCleanupSchema;
|
|
958
1208
|
exports.OperationCostSchema = OperationCostSchema;
|
|
@@ -961,13 +1211,22 @@ exports.OperationExecutionSchema = OperationExecutionSchema;
|
|
|
961
1211
|
exports.OperationRequestSchema = OperationRequestSchema;
|
|
962
1212
|
exports.OperationStatusSchema = OperationStatusSchema;
|
|
963
1213
|
exports.OrdinaryAuthoritySchema = OrdinaryAuthoritySchema;
|
|
1214
|
+
exports.OrganizationDocumentPathSchema = OrganizationDocumentPathSchema;
|
|
1215
|
+
exports.OrganizationInstructionSchema = OrganizationInstructionSchema;
|
|
1216
|
+
exports.OrganizationRootSchema = OrganizationRootSchema;
|
|
1217
|
+
exports.OrganizationRootV1Schema = OrganizationRootV1Schema;
|
|
1218
|
+
exports.OrganizationSourceLocationSchema = OrganizationSourceLocationSchema;
|
|
1219
|
+
exports.OrganizationSpaceSchema = OrganizationSpaceSchema;
|
|
964
1220
|
exports.Orn = Orn;
|
|
965
1221
|
exports.PRICE_PROFILE_REFERENCE = PRICE_PROFILE_REFERENCE;
|
|
966
1222
|
exports.PROFILES = PROFILES;
|
|
967
1223
|
exports.PROVIDER_PROTOCOL_VERSION = PROVIDER_PROTOCOL_VERSION;
|
|
968
1224
|
exports.PersonReference = PersonReference;
|
|
1225
|
+
exports.ProjectMembershipSchema = ProjectMembershipSchema;
|
|
1226
|
+
exports.ProjectSourceSchema = ProjectSourceSchema;
|
|
969
1227
|
exports.REFUSAL_PROFILE = REFUSAL_PROFILE;
|
|
970
1228
|
exports.REFUSAL_V2_PROFILE = REFUSAL_V2_PROFILE;
|
|
1229
|
+
exports.REFUSAL_V3_PROFILE = REFUSAL_V3_PROFILE;
|
|
971
1230
|
exports.REQUEST_PROFILE = REQUEST_PROFILE;
|
|
972
1231
|
exports.RESOURCE_DESCRIPTOR_KIND = RESOURCE_DESCRIPTOR_KIND;
|
|
973
1232
|
exports.RESOURCE_DESCRIPTOR_PROFILE = RESOURCE_DESCRIPTOR_PROFILE;
|
|
@@ -977,9 +1236,14 @@ exports.ReadbackSchema = ReadbackSchema;
|
|
|
977
1236
|
exports.Reference = Reference;
|
|
978
1237
|
exports.RefusalCodeSchema = RefusalCodeSchema;
|
|
979
1238
|
exports.RefusalCodeV2Schema = RefusalCodeV2Schema;
|
|
1239
|
+
exports.RefusalCodeV3Schema = RefusalCodeV3Schema;
|
|
980
1240
|
exports.RefusalSchema = RefusalSchema;
|
|
981
1241
|
exports.RefusalStageV2Schema = RefusalStageV2Schema;
|
|
1242
|
+
exports.RefusalStageV3Schema = RefusalStageV3Schema;
|
|
982
1243
|
exports.RefusalV2Schema = RefusalV2Schema;
|
|
1244
|
+
exports.RefusalV3Schema = RefusalV3Schema;
|
|
1245
|
+
exports.ReleaseDeclarationSchema = ReleaseDeclarationSchema;
|
|
1246
|
+
exports.ReleaseMemberKindSchema = ReleaseMemberKindSchema;
|
|
983
1247
|
exports.RequestCeilingsSchema = RequestCeilingsSchema;
|
|
984
1248
|
exports.ResourceDescriptorSchema = ResourceDescriptorSchema;
|
|
985
1249
|
exports.RevocationPointerSchema = RevocationPointerSchema;
|
|
@@ -1001,4 +1265,5 @@ exports.StandingOrderActivationEventSchema = StandingOrderActivationEventSchema;
|
|
|
1001
1265
|
exports.StandingOrderActivationSchema = StandingOrderActivationSchema;
|
|
1002
1266
|
exports.StandingOrderModeSchema = StandingOrderModeSchema;
|
|
1003
1267
|
exports.UtcSecond = UtcSecond;
|
|
1268
|
+
exports.WorkspaceProfileSchema = WorkspaceProfileSchema;
|
|
1004
1269
|
exports.closed = closed;
|