@dynamicalsystems/idl 0.11.0 → 0.13.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 CHANGED
@@ -952,6 +952,1077 @@ const identityBindingV1 = {
952
952
  documents: { binding: IdentityBindingSchema }
953
953
  };
954
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$1 = () => _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$1()),
1041
+ capabilities: _sinclair_typebox.Type.Optional(UniquePaths$1()),
1042
+ instructions: _sinclair_typebox.Type.Optional(_sinclair_typebox.Type.Array(OrganizationInstructionSchema)),
1043
+ documents: _sinclair_typebox.Type.Optional(UniquePaths$1()),
1044
+ archive: _sinclair_typebox.Type.Optional(OrganizationDocumentPathSchema),
1045
+ releases: _sinclair_typebox.Type.Optional(UniquePaths$1()),
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$1()
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
+ }
1142
+ };
1143
+ //#endregion
1144
+ //#region src/extension/release.v1.ts
1145
+ const EXTENSION_RELEASE_PROFILE = "dsg.extension.release/1";
1146
+ const EXTENSION_RELEASE_CANONICALIZATION = "RFC8785-JCS-UTF8";
1147
+ const IdentifierSchema$1 = _sinclair_typebox.Type.String({ pattern: "^[a-z][a-z0-9-]*(?:[.-][a-z0-9]+)*$" });
1148
+ const IdentifierSet$1 = () => _sinclair_typebox.Type.Array(IdentifierSchema$1, { uniqueItems: true });
1149
+ const RequiredStrings$1 = () => _sinclair_typebox.Type.Array(NonEmptyString, {
1150
+ minItems: 1,
1151
+ uniqueItems: true
1152
+ });
1153
+ const ExtensionReleaseReferenceSchema = Reference;
1154
+ const ExtensionComponentKindSchema = _sinclair_typebox.Type.Union([
1155
+ _sinclair_typebox.Type.Literal("workflow"),
1156
+ _sinclair_typebox.Type.Literal("example"),
1157
+ _sinclair_typebox.Type.Literal("contract"),
1158
+ _sinclair_typebox.Type.Literal("job-class"),
1159
+ _sinclair_typebox.Type.Literal("workload-artifact"),
1160
+ _sinclair_typebox.Type.Literal("event-catalog"),
1161
+ _sinclair_typebox.Type.Literal("connector"),
1162
+ _sinclair_typebox.Type.Literal("module"),
1163
+ _sinclair_typebox.Type.Literal("check"),
1164
+ _sinclair_typebox.Type.Literal("vocabulary"),
1165
+ _sinclair_typebox.Type.Literal("assurance"),
1166
+ _sinclair_typebox.Type.Literal("documentation")
1167
+ ]);
1168
+ const ExtensionComponentReferenceSchema = Reference;
1169
+ const ComponentProperties = {
1170
+ id: IdentifierSchema$1,
1171
+ reference: ExtensionComponentReferenceSchema,
1172
+ mediaType: NonEmptyString,
1173
+ required: _sinclair_typebox.Type.Boolean(),
1174
+ dependsOn: IdentifierSet$1()
1175
+ };
1176
+ const ExtensionComponentSchema = closed({
1177
+ ...ComponentProperties,
1178
+ kind: ExtensionComponentKindSchema
1179
+ });
1180
+ const ComputeComponentKindSchema = _sinclair_typebox.Type.Union([
1181
+ _sinclair_typebox.Type.Literal("workflow"),
1182
+ _sinclair_typebox.Type.Literal("example"),
1183
+ _sinclair_typebox.Type.Literal("contract"),
1184
+ _sinclair_typebox.Type.Literal("job-class"),
1185
+ _sinclair_typebox.Type.Literal("workload-artifact"),
1186
+ _sinclair_typebox.Type.Literal("event-catalog"),
1187
+ _sinclair_typebox.Type.Literal("connector"),
1188
+ _sinclair_typebox.Type.Literal("module"),
1189
+ _sinclair_typebox.Type.Literal("check"),
1190
+ _sinclair_typebox.Type.Literal("vocabulary"),
1191
+ _sinclair_typebox.Type.Literal("assurance"),
1192
+ _sinclair_typebox.Type.Literal("documentation")
1193
+ ]);
1194
+ const ComputeComponentSchema = closed({
1195
+ ...ComponentProperties,
1196
+ kind: ComputeComponentKindSchema
1197
+ });
1198
+ const NonComputeComponentKindSchema = _sinclair_typebox.Type.Union([
1199
+ _sinclair_typebox.Type.Literal("workflow"),
1200
+ _sinclair_typebox.Type.Literal("example"),
1201
+ _sinclair_typebox.Type.Literal("contract"),
1202
+ _sinclair_typebox.Type.Literal("event-catalog"),
1203
+ _sinclair_typebox.Type.Literal("connector"),
1204
+ _sinclair_typebox.Type.Literal("module"),
1205
+ _sinclair_typebox.Type.Literal("check"),
1206
+ _sinclair_typebox.Type.Literal("vocabulary"),
1207
+ _sinclair_typebox.Type.Literal("assurance"),
1208
+ _sinclair_typebox.Type.Literal("documentation")
1209
+ ]);
1210
+ const NonComputeComponentSchema = closed({
1211
+ ...ComponentProperties,
1212
+ kind: NonComputeComponentKindSchema
1213
+ });
1214
+ const ExtensionDependencyKindSchema = _sinclair_typebox.Type.Union([
1215
+ _sinclair_typebox.Type.Literal("extension-release"),
1216
+ _sinclair_typebox.Type.Literal("idl-package"),
1217
+ _sinclair_typebox.Type.Literal("module-release"),
1218
+ _sinclair_typebox.Type.Literal("law-release"),
1219
+ _sinclair_typebox.Type.Literal("event-catalog"),
1220
+ _sinclair_typebox.Type.Literal("example-release"),
1221
+ _sinclair_typebox.Type.Literal("target-release")
1222
+ ]);
1223
+ const ExtensionDependencySchema = closed({
1224
+ id: IdentifierSchema$1,
1225
+ kind: ExtensionDependencyKindSchema,
1226
+ reference: Reference,
1227
+ required: _sinclair_typebox.Type.Boolean()
1228
+ });
1229
+ /** Shared requirements contain no compute-only workload obligations. */
1230
+ const ExtensionRequirementsSchema = closed({
1231
+ idlProfiles: _sinclair_typebox.Type.Array(NonEmptyString, { uniqueItems: true }),
1232
+ roles: _sinclair_typebox.Type.Array(NonEmptyString, { uniqueItems: true }),
1233
+ qualification: _sinclair_typebox.Type.Optional(Reference),
1234
+ handling: _sinclair_typebox.Type.Union([
1235
+ _sinclair_typebox.Type.Literal("public"),
1236
+ _sinclair_typebox.Type.Literal("restricted"),
1237
+ _sinclair_typebox.Type.Literal("confidential")
1238
+ ])
1239
+ });
1240
+ const ExtensionComputeRequirementsSchema = closed({
1241
+ idlProfiles: _sinclair_typebox.Type.Array(NonEmptyString, { uniqueItems: true }),
1242
+ roles: _sinclair_typebox.Type.Array(NonEmptyString, { uniqueItems: true }),
1243
+ qualification: _sinclair_typebox.Type.Optional(Reference),
1244
+ handling: _sinclair_typebox.Type.Union([
1245
+ _sinclair_typebox.Type.Literal("public"),
1246
+ _sinclair_typebox.Type.Literal("restricted"),
1247
+ _sinclair_typebox.Type.Literal("confidential")
1248
+ ]),
1249
+ supportedPlatforms: RequiredStrings$1(),
1250
+ targets: _sinclair_typebox.Type.Array(Reference, { uniqueItems: true }),
1251
+ isolation: _sinclair_typebox.Type.Union([_sinclair_typebox.Type.Literal("ephemeral"), _sinclair_typebox.Type.Literal("dedicated")]),
1252
+ retention: _sinclair_typebox.Type.Union([
1253
+ _sinclair_typebox.Type.Literal("ephemeral"),
1254
+ _sinclair_typebox.Type.Literal("bounded"),
1255
+ _sinclair_typebox.Type.Literal("durable")
1256
+ ]),
1257
+ completion: Reference,
1258
+ teardown: Reference,
1259
+ evidence: Reference,
1260
+ replay: Reference
1261
+ });
1262
+ const ExtensionBoundsSchema = closed({
1263
+ maxDurationSeconds: SafeInt,
1264
+ maxParallelism: SafeInt,
1265
+ maxUsdMicroUnits: SafeInt
1266
+ });
1267
+ const ReleaseIdentity = {
1268
+ profile: _sinclair_typebox.Type.Literal(EXTENSION_RELEASE_PROFILE),
1269
+ schemaVersion: _sinclair_typebox.Type.Literal(1),
1270
+ kind: _sinclair_typebox.Type.Literal("extension-release"),
1271
+ publisher: Orn,
1272
+ name: IdentifierSchema$1,
1273
+ version: _sinclair_typebox.Type.String({ pattern: "^(?:0|[1-9][0-9]*)\\.[0-9]+\\.[0-9]+$" }),
1274
+ /** Derived from publisher, namespace, name, and version; never from this
1275
+ * body's digest, so canonical hashing has no self-reference. */
1276
+ releaseOrn: Orn,
1277
+ namespace: NonEmptyString,
1278
+ source: closed({
1279
+ repository: NonEmptyString,
1280
+ revision: _sinclair_typebox.Type.String({ pattern: "^(?:[0-9a-f]{40}|[0-9a-f]{64})$" })
1281
+ }),
1282
+ build: closed({
1283
+ provenance: Reference,
1284
+ sourceDigest: Hex64
1285
+ }),
1286
+ canonicalization: _sinclair_typebox.Type.Literal(EXTENSION_RELEASE_CANONICALIZATION),
1287
+ dependencies: _sinclair_typebox.Type.Array(ExtensionDependencySchema, { uniqueItems: true })
1288
+ };
1289
+ const ComputeReleaseSchema = closed({
1290
+ ...ReleaseIdentity,
1291
+ compute: _sinclair_typebox.Type.Literal(true),
1292
+ components: _sinclair_typebox.Type.Array(ComputeComponentSchema, {
1293
+ minItems: 1,
1294
+ uniqueItems: true
1295
+ }),
1296
+ requirements: ExtensionComputeRequirementsSchema,
1297
+ bounds: ExtensionBoundsSchema
1298
+ });
1299
+ const NonComputeReleaseSchema = closed({
1300
+ ...ReleaseIdentity,
1301
+ compute: _sinclair_typebox.Type.Literal(false),
1302
+ components: _sinclair_typebox.Type.Array(NonComputeComponentSchema, {
1303
+ minItems: 1,
1304
+ uniqueItems: true
1305
+ }),
1306
+ requirements: ExtensionRequirementsSchema
1307
+ });
1308
+ const ExtensionReleaseSchema = _sinclair_typebox.Type.Union([ComputeReleaseSchema, NonComputeReleaseSchema]);
1309
+ /** Detached publisher envelope. `release.sha256` and `bodySha256` both pin
1310
+ * the RFC 8785 JCS UTF-8 bytes of the semantic release body. */
1311
+ const ExtensionReleaseSignatureSchema = closed({
1312
+ profile: _sinclair_typebox.Type.Literal(EXTENSION_RELEASE_PROFILE),
1313
+ schemaVersion: _sinclair_typebox.Type.Literal(1),
1314
+ kind: _sinclair_typebox.Type.Literal("extension-release-signature"),
1315
+ release: ExtensionReleaseReferenceSchema,
1316
+ publisher: Orn,
1317
+ publicKey: Hex64,
1318
+ bodySha256: Hex64,
1319
+ canonicalization: _sinclair_typebox.Type.Literal(EXTENSION_RELEASE_CANONICALIZATION),
1320
+ signature: _sinclair_typebox.Type.String({ pattern: "^[0-9a-f]{128}$" }),
1321
+ signedAt: UtcSecond
1322
+ });
1323
+ const extensionReleaseV1 = {
1324
+ literal: EXTENSION_RELEASE_PROFILE,
1325
+ rootDocument: "release",
1326
+ documents: {
1327
+ release: ExtensionReleaseSchema,
1328
+ signature: ExtensionReleaseSignatureSchema
1329
+ }
1330
+ };
1331
+ //#endregion
1332
+ //#region src/organization/release.v1.ts
1333
+ const ORGANIZATION_RELEASE_PROFILE = "dsg.organization.release/1";
1334
+ const ORGANIZATION_RELEASE_CANONICALIZATION = "RFC8785-JCS-UTF8";
1335
+ const Identifier = _sinclair_typebox.Type.String({ pattern: "^[a-z][a-z0-9-]*(?:[.-][a-z0-9]+)*$" });
1336
+ const Revision = _sinclair_typebox.Type.String({ pattern: "^(?:[0-9a-f]{40}|[0-9a-f]{64})$" });
1337
+ const Identifiers = () => _sinclair_typebox.Type.Array(Identifier, { uniqueItems: true });
1338
+ const References = () => _sinclair_typebox.Type.Array(Reference, { uniqueItems: true });
1339
+ const Evidence = () => _sinclair_typebox.Type.Array(Reference, {
1340
+ minItems: 1,
1341
+ uniqueItems: true
1342
+ });
1343
+ const Header = {
1344
+ profile: _sinclair_typebox.Type.Literal(ORGANIZATION_RELEASE_PROFILE),
1345
+ schemaVersion: _sinclair_typebox.Type.Literal(1)
1346
+ };
1347
+ const CompilerContractSchema = closed({
1348
+ profile: _sinclair_typebox.Type.String({ pattern: "^dsg\\.[a-z0-9.-]+/[1-9][0-9]*$" }),
1349
+ version: _sinclair_typebox.Type.String({ pattern: "^(?:0|[1-9][0-9]*)\\.(?:0|[1-9][0-9]*)\\.(?:0|[1-9][0-9]*)$" }),
1350
+ implementation: Reference
1351
+ });
1352
+ const DependencyKindSchema = _sinclair_typebox.Type.Union([
1353
+ _sinclair_typebox.Type.Literal("extension-release"),
1354
+ _sinclair_typebox.Type.Literal("component"),
1355
+ _sinclair_typebox.Type.Literal("idl-package"),
1356
+ _sinclair_typebox.Type.Literal("module-release"),
1357
+ _sinclair_typebox.Type.Literal("law-release"),
1358
+ _sinclair_typebox.Type.Literal("definition"),
1359
+ _sinclair_typebox.Type.Literal("workload-artifact"),
1360
+ _sinclair_typebox.Type.Literal("event-catalog"),
1361
+ _sinclair_typebox.Type.Literal("example"),
1362
+ _sinclair_typebox.Type.Literal("project"),
1363
+ _sinclair_typebox.Type.Literal("target")
1364
+ ]);
1365
+ const DependencyLockEntrySchema = closed({
1366
+ id: Identifier,
1367
+ kind: DependencyKindSchema,
1368
+ reference: Reference,
1369
+ mediaType: NonEmptyString,
1370
+ selectedMemberIds: Identifiers(),
1371
+ dependsOn: Identifiers()
1372
+ });
1373
+ const DependencyLockSchema = closed({
1374
+ ...Header,
1375
+ kind: _sinclair_typebox.Type.Literal("dependency-lock"),
1376
+ canonicalization: _sinclair_typebox.Type.Literal(ORGANIZATION_RELEASE_CANONICALIZATION),
1377
+ roots: Identifiers(),
1378
+ entries: _sinclair_typebox.Type.Array(DependencyLockEntrySchema, { uniqueItems: true }),
1379
+ compiler: CompilerContractSchema
1380
+ });
1381
+ const OrganizationReleaseMemberKindSchema = _sinclair_typebox.Type.Union([
1382
+ _sinclair_typebox.Type.Literal("publication"),
1383
+ _sinclair_typebox.Type.Literal("import"),
1384
+ _sinclair_typebox.Type.Literal("capability-admission"),
1385
+ _sinclair_typebox.Type.Literal("workflow-publication"),
1386
+ _sinclair_typebox.Type.Literal("contract-check"),
1387
+ _sinclair_typebox.Type.Literal("target-readiness"),
1388
+ _sinclair_typebox.Type.Literal("setup-condition"),
1389
+ _sinclair_typebox.Type.Literal("paid-execution-readiness")
1390
+ ]);
1391
+ const OrganizationReleaseMemberSchema = closed({
1392
+ id: Identifier,
1393
+ kind: OrganizationReleaseMemberKindSchema,
1394
+ required: _sinclair_typebox.Type.Boolean(),
1395
+ acceptableDispositions: _sinclair_typebox.Type.Array(NonEmptyString, {
1396
+ minItems: 1,
1397
+ uniqueItems: true
1398
+ }),
1399
+ subject: Reference
1400
+ });
1401
+ const ComponentBindingSchema = closed({
1402
+ id: Identifier,
1403
+ kind: ExtensionComponentKindSchema,
1404
+ reference: Reference
1405
+ });
1406
+ const BuildSelectionSchema = closed({
1407
+ id: Identifier,
1408
+ selection: Reference,
1409
+ extensionRelease: Reference,
1410
+ members: _sinclair_typebox.Type.Array(ComponentBindingSchema, {
1411
+ minItems: 1,
1412
+ uniqueItems: true
1413
+ })
1414
+ });
1415
+ const BuildComponentSchema = closed({
1416
+ extensionRelease: Reference,
1417
+ memberId: Identifier,
1418
+ kind: ExtensionComponentKindSchema,
1419
+ reference: Reference,
1420
+ mediaType: NonEmptyString
1421
+ });
1422
+ const OrganizationBuildSchema = closed({
1423
+ ...Header,
1424
+ kind: _sinclair_typebox.Type.Literal("organization-build"),
1425
+ organization: NonEmptyString,
1426
+ canonicalization: _sinclair_typebox.Type.Literal(ORGANIZATION_RELEASE_CANONICALIZATION),
1427
+ source: closed({
1428
+ root: Reference,
1429
+ revision: Revision
1430
+ }),
1431
+ facts: closed({
1432
+ name: NonEmptyString,
1433
+ purpose: NonEmptyString,
1434
+ space: NonEmptyString
1435
+ }),
1436
+ workspaceProfile: Reference,
1437
+ projects: _sinclair_typebox.Type.Array(closed({
1438
+ id: Identifier,
1439
+ membership: Reference,
1440
+ revision: Revision
1441
+ }), { uniqueItems: true }),
1442
+ sourceDocuments: _sinclair_typebox.Type.Array(closed({
1443
+ path: NonEmptyString,
1444
+ sha256: Hex64,
1445
+ mediaType: NonEmptyString
1446
+ }), {
1447
+ minItems: 1,
1448
+ uniqueItems: true
1449
+ }),
1450
+ selections: _sinclair_typebox.Type.Array(BuildSelectionSchema, { uniqueItems: true }),
1451
+ components: _sinclair_typebox.Type.Array(BuildComponentSchema, { uniqueItems: true }),
1452
+ typedReleases: _sinclair_typebox.Type.Array(DependencyLockEntrySchema, { uniqueItems: true }),
1453
+ dependencyLock: Reference,
1454
+ compiler: CompilerContractSchema,
1455
+ instructions: References(),
1456
+ handling: References(),
1457
+ releaseDeclarations: References(),
1458
+ releaseMembers: _sinclair_typebox.Type.Array(OrganizationReleaseMemberSchema, { uniqueItems: true })
1459
+ });
1460
+ const OrganizationReleaseSchema = closed({
1461
+ ...Header,
1462
+ kind: _sinclair_typebox.Type.Literal("organization-release"),
1463
+ id: Identifier,
1464
+ organization: NonEmptyString,
1465
+ build: Reference,
1466
+ dependencyLock: Reference,
1467
+ selections: Identifiers(),
1468
+ members: _sinclair_typebox.Type.Array(OrganizationReleaseMemberSchema, {
1469
+ minItems: 1,
1470
+ uniqueItems: true
1471
+ })
1472
+ });
1473
+ const ImportCommon = {
1474
+ ...Header,
1475
+ kind: _sinclair_typebox.Type.Literal("import-disposition"),
1476
+ installation: Orn,
1477
+ build: Reference,
1478
+ release: Reference,
1479
+ subject: Reference,
1480
+ observedAt: UtcSecond
1481
+ };
1482
+ const ImportDispositionSchema = _sinclair_typebox.Type.Union([
1483
+ closed({
1484
+ ...ImportCommon,
1485
+ status: _sinclair_typebox.Type.Literal("pending")
1486
+ }),
1487
+ closed({
1488
+ ...ImportCommon,
1489
+ status: _sinclair_typebox.Type.Literal("verified"),
1490
+ disposition: _sinclair_typebox.Type.Union([_sinclair_typebox.Type.Literal("published"), _sinclair_typebox.Type.Literal("digest-match")]),
1491
+ evidence: Evidence()
1492
+ }),
1493
+ closed({
1494
+ ...ImportCommon,
1495
+ status: _sinclair_typebox.Type.Literal("staged"),
1496
+ disposition: _sinclair_typebox.Type.Literal("captured"),
1497
+ evidence: Evidence()
1498
+ }),
1499
+ closed({
1500
+ ...ImportCommon,
1501
+ status: _sinclair_typebox.Type.Literal("refused"),
1502
+ disposition: _sinclair_typebox.Type.Union([
1503
+ _sinclair_typebox.Type.Literal("digest-mismatch"),
1504
+ _sinclair_typebox.Type.Literal("missing"),
1505
+ _sinclair_typebox.Type.Literal("unsupported")
1506
+ ]),
1507
+ reason: NonEmptyString,
1508
+ evidence: Evidence()
1509
+ })
1510
+ ]);
1511
+ const ReleaseStatusSchema = _sinclair_typebox.Type.Union([
1512
+ _sinclair_typebox.Type.Literal("active"),
1513
+ _sinclair_typebox.Type.Literal("retired"),
1514
+ _sinclair_typebox.Type.Literal("revoked")
1515
+ ]);
1516
+ const ReleaseStatusObservationSchema = closed({
1517
+ ...Header,
1518
+ kind: _sinclair_typebox.Type.Literal("release-status-observation"),
1519
+ subject: Reference,
1520
+ registry: Reference,
1521
+ trustView: Reference,
1522
+ status: ReleaseStatusSchema,
1523
+ effectiveAt: UtcSecond,
1524
+ observedAt: UtcSecond,
1525
+ evidence: Evidence()
1526
+ });
1527
+ const ReleaseEligibilitySchema = closed({
1528
+ ...Header,
1529
+ kind: _sinclair_typebox.Type.Literal("release-eligibility"),
1530
+ release: Reference,
1531
+ operation: _sinclair_typebox.Type.Union([
1532
+ _sinclair_typebox.Type.Literal("resolve"),
1533
+ _sinclair_typebox.Type.Literal("select"),
1534
+ _sinclair_typebox.Type.Literal("import"),
1535
+ _sinclair_typebox.Type.Literal("admit"),
1536
+ _sinclair_typebox.Type.Literal("activate"),
1537
+ _sinclair_typebox.Type.Literal("execute")
1538
+ ]),
1539
+ observation: ReleaseStatusObservationSchema,
1540
+ trustView: Reference,
1541
+ activeSet: _sinclair_typebox.Type.Union([Reference, _sinclair_typebox.Type.Null()])
1542
+ });
1543
+ const ApprovedUseSchema = closed({
1544
+ use: NonEmptyString,
1545
+ binding: Reference
1546
+ });
1547
+ const AdmissionCommon = {
1548
+ ...Header,
1549
+ kind: _sinclair_typebox.Type.Literal("admission-record"),
1550
+ id: Identifier,
1551
+ installation: Orn,
1552
+ organization: NonEmptyString,
1553
+ build: Reference,
1554
+ release: Reference,
1555
+ selectionId: Identifier,
1556
+ extensionRelease: Reference,
1557
+ evaluatingCase: Reference,
1558
+ decision: Reference,
1559
+ authority: Reference,
1560
+ fence: Reference,
1561
+ revision: SafeInt,
1562
+ decidedAt: UtcSecond
1563
+ };
1564
+ const AdmissionRecordSchema = _sinclair_typebox.Type.Union([closed({
1565
+ ...AdmissionCommon,
1566
+ status: _sinclair_typebox.Type.Literal("admitted"),
1567
+ components: _sinclair_typebox.Type.Array(ComponentBindingSchema, {
1568
+ minItems: 1,
1569
+ uniqueItems: true
1570
+ }),
1571
+ approvedUses: _sinclair_typebox.Type.Array(ApprovedUseSchema, {
1572
+ minItems: 1,
1573
+ uniqueItems: true
1574
+ }),
1575
+ bindings: Evidence(),
1576
+ evidence: Evidence()
1577
+ }), closed({
1578
+ ...AdmissionCommon,
1579
+ status: _sinclair_typebox.Type.Literal("refused"),
1580
+ components: _sinclair_typebox.Type.Array(ComponentBindingSchema, { uniqueItems: true }),
1581
+ reason: NonEmptyString,
1582
+ evidence: Evidence()
1583
+ })]);
1584
+ const AdmissionObservationCommon = {
1585
+ ...Header,
1586
+ kind: _sinclair_typebox.Type.Literal("admission-status-observation"),
1587
+ admission: Reference,
1588
+ decision: Reference,
1589
+ evidence: Evidence(),
1590
+ observedAt: UtcSecond
1591
+ };
1592
+ const AdmissionStatusObservationSchema = _sinclair_typebox.Type.Union([
1593
+ closed({
1594
+ ...AdmissionObservationCommon,
1595
+ status: _sinclair_typebox.Type.Literal("suspended"),
1596
+ reason: NonEmptyString
1597
+ }),
1598
+ closed({
1599
+ ...AdmissionObservationCommon,
1600
+ status: _sinclair_typebox.Type.Literal("superseded"),
1601
+ replacement: Reference
1602
+ }),
1603
+ closed({
1604
+ ...AdmissionObservationCommon,
1605
+ status: _sinclair_typebox.Type.Literal("revoked"),
1606
+ governedRevocation: Reference,
1607
+ trustView: Reference,
1608
+ reason: NonEmptyString
1609
+ })
1610
+ ]);
1611
+ const MemberObservationCommon = {
1612
+ ...Header,
1613
+ kind: _sinclair_typebox.Type.Literal("member-observation"),
1614
+ installation: Orn,
1615
+ build: Reference,
1616
+ release: Reference,
1617
+ memberId: Identifier,
1618
+ memberKind: OrganizationReleaseMemberKindSchema,
1619
+ subject: Reference,
1620
+ evidence: Evidence(),
1621
+ observedAt: UtcSecond
1622
+ };
1623
+ const MemberObservationSchema = _sinclair_typebox.Type.Union([closed({
1624
+ ...MemberObservationCommon,
1625
+ disposition: _sinclair_typebox.Type.Union([_sinclair_typebox.Type.Literal("ready"), _sinclair_typebox.Type.Literal("verified")])
1626
+ }), closed({
1627
+ ...MemberObservationCommon,
1628
+ disposition: _sinclair_typebox.Type.Union([
1629
+ _sinclair_typebox.Type.Literal("refused"),
1630
+ _sinclair_typebox.Type.Literal("suspended"),
1631
+ _sinclair_typebox.Type.Literal("revoked")
1632
+ ]),
1633
+ reason: NonEmptyString
1634
+ })]);
1635
+ const ActiveMemberSchema = closed({
1636
+ selectionId: Identifier,
1637
+ memberId: Identifier,
1638
+ extensionRelease: Reference,
1639
+ components: _sinclair_typebox.Type.Array(ComponentBindingSchema, {
1640
+ minItems: 1,
1641
+ uniqueItems: true
1642
+ }),
1643
+ admission: Reference
1644
+ });
1645
+ const ActiveSetSchema = closed({
1646
+ ...Header,
1647
+ kind: _sinclair_typebox.Type.Literal("active-set"),
1648
+ installation: Orn,
1649
+ organization: NonEmptyString,
1650
+ release: Reference,
1651
+ build: Reference,
1652
+ predecessor: _sinclair_typebox.Type.Union([Reference, _sinclair_typebox.Type.Null()]),
1653
+ members: _sinclair_typebox.Type.Array(ActiveMemberSchema, { uniqueItems: true }),
1654
+ memberObservations: Evidence(),
1655
+ policies: References(),
1656
+ configuration: References(),
1657
+ activatingCase: Reference,
1658
+ authority: Reference,
1659
+ activatingDecision: Reference,
1660
+ fence: Reference,
1661
+ revision: SafeInt,
1662
+ activatedAt: UtcSecond
1663
+ });
1664
+ const CatalogEntryCommon = {
1665
+ id: Identifier,
1666
+ activeSet: Reference,
1667
+ selectionId: Identifier,
1668
+ memberId: Identifier,
1669
+ extensionRelease: Reference,
1670
+ workflow: Reference,
1671
+ example: _sinclair_typebox.Type.Union([Reference, _sinclair_typebox.Type.Null()]),
1672
+ jobClass: _sinclair_typebox.Type.Union([Reference, _sinclair_typebox.Type.Null()]),
1673
+ workloadArtifact: _sinclair_typebox.Type.Union([Reference, _sinclair_typebox.Type.Null()]),
1674
+ contracts: References(),
1675
+ availabilityEvidence: Evidence()
1676
+ };
1677
+ const CatalogEntrySchema = _sinclair_typebox.Type.Union([closed({
1678
+ ...CatalogEntryCommon,
1679
+ availability: _sinclair_typebox.Type.Literal("available")
1680
+ }), closed({
1681
+ ...CatalogEntryCommon,
1682
+ availability: _sinclair_typebox.Type.Literal("unavailable"),
1683
+ unavailableReason: NonEmptyString
1684
+ })]);
1685
+ const CatalogSchema = closed({
1686
+ ...Header,
1687
+ kind: _sinclair_typebox.Type.Literal("catalog"),
1688
+ activeSet: Reference,
1689
+ entries: _sinclair_typebox.Type.Array(CatalogEntrySchema, { uniqueItems: true })
1690
+ });
1691
+ const BoundAttestationSchema = closed({
1692
+ ...Header,
1693
+ kind: _sinclair_typebox.Type.Literal("bound-attestation"),
1694
+ subject: Reference,
1695
+ issuer: Orn,
1696
+ evidence: Reference,
1697
+ verification: _sinclair_typebox.Type.Union([
1698
+ _sinclair_typebox.Type.Literal("publisher-signature"),
1699
+ _sinclair_typebox.Type.Literal("registry-recognition"),
1700
+ _sinclair_typebox.Type.Literal("source-provenance"),
1701
+ _sinclair_typebox.Type.Literal("component-digest")
1702
+ ]),
1703
+ observedAt: UtcSecond,
1704
+ signature: NonEmptyString
1705
+ });
1706
+ const organizationReleaseV1 = {
1707
+ literal: ORGANIZATION_RELEASE_PROFILE,
1708
+ documents: {
1709
+ dependencyLock: DependencyLockSchema,
1710
+ organizationBuild: OrganizationBuildSchema,
1711
+ importDisposition: ImportDispositionSchema,
1712
+ releaseStatusObservation: ReleaseStatusObservationSchema,
1713
+ releaseEligibility: ReleaseEligibilitySchema,
1714
+ organizationRelease: OrganizationReleaseSchema,
1715
+ admissionRecord: AdmissionRecordSchema,
1716
+ admissionStatusObservation: AdmissionStatusObservationSchema,
1717
+ memberObservation: MemberObservationSchema,
1718
+ activeSet: ActiveSetSchema,
1719
+ catalog: CatalogSchema,
1720
+ boundAttestation: BoundAttestationSchema
1721
+ }
1722
+ };
1723
+ //#endregion
1724
+ //#region src/organization/source.v3.ts
1725
+ const ORGANIZATION_SOURCE_V3_PROFILE = "dsg.organization.source/3";
1726
+ const IdentifierSchema = _sinclair_typebox.Type.String({ pattern: "^[a-z][a-z0-9-]*(?:[.-][a-z0-9]+)*$" });
1727
+ const UniqueIdentifiers = () => _sinclair_typebox.Type.Array(IdentifierSchema, {
1728
+ minItems: 1,
1729
+ uniqueItems: true
1730
+ });
1731
+ const IdentifierSet = () => _sinclair_typebox.Type.Array(IdentifierSchema, { uniqueItems: true });
1732
+ const UniquePaths = () => _sinclair_typebox.Type.Array(OrganizationDocumentPathSchema, { uniqueItems: true });
1733
+ const UniqueStrings = () => _sinclair_typebox.Type.Array(NonEmptyString, { uniqueItems: true });
1734
+ const OrganizationSourceProjectSchema = closed({
1735
+ schemaVersion: _sinclair_typebox.Type.Literal(3),
1736
+ kind: _sinclair_typebox.Type.Literal("project-membership"),
1737
+ id: IdentifierSchema,
1738
+ source: ProjectSourceSchema,
1739
+ contract: OrganizationDocumentPathSchema,
1740
+ handling: OrganizationDocumentPathSchema
1741
+ });
1742
+ const OrganizationSelectionDispositionSchema = closed({
1743
+ kind: _sinclair_typebox.Type.Union([
1744
+ _sinclair_typebox.Type.Literal("publication"),
1745
+ _sinclair_typebox.Type.Literal("import"),
1746
+ _sinclair_typebox.Type.Literal("admission"),
1747
+ _sinclair_typebox.Type.Literal("target"),
1748
+ _sinclair_typebox.Type.Literal("check"),
1749
+ _sinclair_typebox.Type.Literal("setup"),
1750
+ _sinclair_typebox.Type.Literal("paid-execution")
1751
+ ]),
1752
+ required: _sinclair_typebox.Type.Boolean(),
1753
+ acceptable: UniqueStrings()
1754
+ });
1755
+ const AuthoredOverlaySchema = closed({
1756
+ id: IdentifierSchema,
1757
+ document: OrganizationDocumentPathSchema,
1758
+ sha256: Hex64,
1759
+ mediaType: NonEmptyString
1760
+ });
1761
+ const CapabilitySelectionV3Schema = closed({
1762
+ schemaVersion: _sinclair_typebox.Type.Literal(3),
1763
+ kind: _sinclair_typebox.Type.Literal("capability-selection"),
1764
+ id: IdentifierSchema,
1765
+ release: ExtensionReleaseReferenceSchema,
1766
+ memberIds: UniqueIdentifiers(),
1767
+ origin: _sinclair_typebox.Type.Union([
1768
+ _sinclair_typebox.Type.Literal("workspace"),
1769
+ _sinclair_typebox.Type.Literal("official"),
1770
+ _sinclair_typebox.Type.Literal("curated")
1771
+ ]),
1772
+ dependencyLock: OrganizationDocumentPathSchema,
1773
+ requiredDispositions: _sinclair_typebox.Type.Array(OrganizationSelectionDispositionSchema, {
1774
+ minItems: 1,
1775
+ uniqueItems: true
1776
+ }),
1777
+ authoredOverlays: _sinclair_typebox.Type.Array(AuthoredOverlaySchema, { uniqueItems: true })
1778
+ });
1779
+ const WorkspaceProfileV3Schema = closed({
1780
+ schemaVersion: _sinclair_typebox.Type.Literal(3),
1781
+ kind: _sinclair_typebox.Type.Literal("workspace-profile"),
1782
+ profile: _sinclair_typebox.Type.Literal(ORGANIZATION_SOURCE_V3_PROFILE),
1783
+ id: IdentifierSchema,
1784
+ version: _sinclair_typebox.Type.String({ pattern: "^(?:0|[1-9][0-9]*)\\.[0-9]+\\.[0-9]+$" }),
1785
+ requirements: closed({
1786
+ facts: UniqueStrings(),
1787
+ minimumProjects: _sinclair_typebox.Type.Integer({ minimum: 0 }),
1788
+ requiredSelections: _sinclair_typebox.Type.Array(IdentifierSchema, { uniqueItems: true }),
1789
+ instructions: _sinclair_typebox.Type.Boolean()
1790
+ }),
1791
+ allowedOrigins: _sinclair_typebox.Type.Array(_sinclair_typebox.Type.Union([
1792
+ _sinclair_typebox.Type.Literal("workspace"),
1793
+ _sinclair_typebox.Type.Literal("official"),
1794
+ _sinclair_typebox.Type.Literal("curated")
1795
+ ]), {
1796
+ minItems: 1,
1797
+ uniqueItems: true
1798
+ }),
1799
+ sourceChecks: UniquePaths()
1800
+ });
1801
+ /** A semantic dependency lock is a source document referenced by the root;
1802
+ * its lock bytes contain no Build self-reference or runtime observations. */
1803
+ const OrganizationDependencyLockSchema = DependencyLockSchema;
1804
+ const OrganizationSourceReleaseMemberSchema = closed({
1805
+ id: IdentifierSchema,
1806
+ kind: OrganizationReleaseMemberKindSchema,
1807
+ required: _sinclair_typebox.Type.Boolean(),
1808
+ acceptableDispositions: _sinclair_typebox.Type.Array(NonEmptyString, {
1809
+ minItems: 1,
1810
+ uniqueItems: true
1811
+ }),
1812
+ subject: OrganizationDocumentPathSchema
1813
+ });
1814
+ /** Source-only Organization Release declaration. Runtime status, admission,
1815
+ * activation, predecessor, and supersession belong to release records. */
1816
+ const OrganizationReleaseDeclarationSchema = closed({
1817
+ schemaVersion: _sinclair_typebox.Type.Literal(3),
1818
+ kind: _sinclair_typebox.Type.Literal("organization-release-declaration"),
1819
+ id: IdentifierSchema,
1820
+ dependencyLock: OrganizationDocumentPathSchema,
1821
+ selections: IdentifierSet(),
1822
+ members: _sinclair_typebox.Type.Array(OrganizationSourceReleaseMemberSchema, {
1823
+ minItems: 1,
1824
+ uniqueItems: true
1825
+ }),
1826
+ acceptance: closed({
1827
+ requiredMembers: UniqueIdentifiers(),
1828
+ acceptableDispositions: _sinclair_typebox.Type.Array(NonEmptyString, {
1829
+ minItems: 1,
1830
+ uniqueItems: true
1831
+ })
1832
+ })
1833
+ });
1834
+ const OrganizationRootV3Schema = closed({
1835
+ schemaVersion: _sinclair_typebox.Type.Literal(3),
1836
+ kind: _sinclair_typebox.Type.Literal("organization"),
1837
+ org: NonEmptyString,
1838
+ space: OrganizationSpaceSchema,
1839
+ purpose: NonEmptyString,
1840
+ profile: OrganizationDocumentPathSchema,
1841
+ projects: UniquePaths(),
1842
+ capabilities: UniquePaths(),
1843
+ dependencyLocks: UniquePaths(),
1844
+ releases: UniquePaths(),
1845
+ instructions: UniquePaths(),
1846
+ documents: UniquePaths(),
1847
+ archive: _sinclair_typebox.Type.Optional(OrganizationDocumentPathSchema),
1848
+ source: _sinclair_typebox.Type.Optional(OrganizationSourceLocationSchema)
1849
+ });
1850
+ const organizationSourceV3 = {
1851
+ literal: ORGANIZATION_SOURCE_V3_PROFILE,
1852
+ rootDocument: "organization",
1853
+ documents: {
1854
+ organization: OrganizationRootV3Schema,
1855
+ profile: WorkspaceProfileV3Schema,
1856
+ project: OrganizationSourceProjectSchema,
1857
+ capabilitySelection: CapabilitySelectionV3Schema,
1858
+ dependencyLock: OrganizationDependencyLockSchema,
1859
+ releaseMember: OrganizationSourceReleaseMemberSchema,
1860
+ releaseDeclaration: OrganizationReleaseDeclarationSchema
1861
+ }
1862
+ };
1863
+ //#endregion
1864
+ //#region src/run/job-class.v1.ts
1865
+ const JOB_CLASS_PROFILE = "dsg.run.job-class/1";
1866
+ const RequiredReferences = () => _sinclair_typebox.Type.Array(Reference, {
1867
+ minItems: 1,
1868
+ uniqueItems: true
1869
+ });
1870
+ const RequiredStrings = () => _sinclair_typebox.Type.Array(NonEmptyString, {
1871
+ minItems: 1,
1872
+ uniqueItems: true
1873
+ });
1874
+ const JobClassBoundsSchema = closed({
1875
+ maxRunSeconds: SafeInt,
1876
+ maxGpuSeconds: SafeInt,
1877
+ maxParallelism: SafeInt,
1878
+ maxUsdMicroUnits: SafeInt
1879
+ });
1880
+ const JobClassSchema = closed({
1881
+ profile: _sinclair_typebox.Type.Literal(JOB_CLASS_PROFILE),
1882
+ schemaVersion: _sinclair_typebox.Type.Literal(1),
1883
+ kind: _sinclair_typebox.Type.Literal("job-class"),
1884
+ id: NonEmptyString,
1885
+ executor: NonEmptyString,
1886
+ mode: NonEmptyString,
1887
+ modeEnvironmentVariable: NonEmptyString,
1888
+ workloadArtifact: Reference,
1889
+ platforms: RequiredStrings(),
1890
+ isolation: _sinclair_typebox.Type.Union([_sinclair_typebox.Type.Literal("ephemeral"), _sinclair_typebox.Type.Literal("dedicated")]),
1891
+ inputContracts: RequiredReferences(),
1892
+ outputContracts: RequiredReferences(),
1893
+ eventCatalog: Reference,
1894
+ decisionRequirements: RequiredReferences(),
1895
+ bounds: JobClassBoundsSchema,
1896
+ handling: _sinclair_typebox.Type.Union([
1897
+ _sinclair_typebox.Type.Literal("public"),
1898
+ _sinclair_typebox.Type.Literal("restricted"),
1899
+ _sinclair_typebox.Type.Literal("confidential")
1900
+ ]),
1901
+ retention: _sinclair_typebox.Type.Union([
1902
+ _sinclair_typebox.Type.Literal("ephemeral"),
1903
+ _sinclair_typebox.Type.Literal("bounded"),
1904
+ _sinclair_typebox.Type.Literal("durable")
1905
+ ]),
1906
+ completion: Reference,
1907
+ teardown: Reference,
1908
+ evidence: Reference,
1909
+ replay: Reference
1910
+ });
1911
+ const jobClassV1 = {
1912
+ literal: JOB_CLASS_PROFILE,
1913
+ rootDocument: "jobClass",
1914
+ documents: { jobClass: JobClassSchema }
1915
+ };
1916
+ //#endregion
1917
+ //#region src/run/workload-artifact.v1.ts
1918
+ const WORKLOAD_ARTIFACT_PROFILE = "dsg.run.workload-artifact/1";
1919
+ const OciRepository = _sinclair_typebox.Type.String({ pattern: "^(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\\.)*[a-z0-9](?:[a-z0-9-]*[a-z0-9])?(?::[1-9][0-9]{0,4})?/[a-z0-9]+(?:[._-][a-z0-9]+)*(?:/[a-z0-9]+(?:[._-][a-z0-9]+)*)*$" });
1920
+ const WorkloadSourceSchema = closed({
1921
+ repository: NonEmptyString,
1922
+ revision: _sinclair_typebox.Type.String({ pattern: "^(?:[0-9a-f]{40}|[0-9a-f]{64})$" }),
1923
+ sourceDigest: Hex64
1924
+ });
1925
+ const OciPlatformSchema = closed({
1926
+ os: NonEmptyString,
1927
+ architecture: NonEmptyString,
1928
+ variant: _sinclair_typebox.Type.Optional(NonEmptyString)
1929
+ });
1930
+ const WorkloadArtifactSchema = closed({
1931
+ profile: _sinclair_typebox.Type.Literal(WORKLOAD_ARTIFACT_PROFILE),
1932
+ schemaVersion: _sinclair_typebox.Type.Literal(1),
1933
+ kind: _sinclair_typebox.Type.Literal("workload-artifact"),
1934
+ id: NonEmptyString,
1935
+ format: _sinclair_typebox.Type.Literal("oci-image"),
1936
+ source: WorkloadSourceSchema,
1937
+ index: _sinclair_typebox.Type.Union([_sinclair_typebox.Type.Null(), closed({
1938
+ sha256: Hex64,
1939
+ mediaType: _sinclair_typebox.Type.Union([_sinclair_typebox.Type.Literal("application/vnd.oci.image.index.v1+json"), _sinclair_typebox.Type.Literal("application/vnd.docker.distribution.manifest.list.v2+json")])
1940
+ })]),
1941
+ executable: closed({
1942
+ repository: OciRepository,
1943
+ platform: OciPlatformSchema,
1944
+ manifest: closed({
1945
+ sha256: Hex64,
1946
+ mediaType: _sinclair_typebox.Type.Union([_sinclair_typebox.Type.Literal("application/vnd.oci.image.manifest.v1+json"), _sinclair_typebox.Type.Literal("application/vnd.docker.distribution.manifest.v2+json")])
1947
+ }),
1948
+ config: closed({
1949
+ sha256: Hex64,
1950
+ mediaType: _sinclair_typebox.Type.Union([_sinclair_typebox.Type.Literal("application/vnd.oci.image.config.v1+json"), _sinclair_typebox.Type.Literal("application/vnd.docker.container.image.v1+json")])
1951
+ })
1952
+ }),
1953
+ entrypoint: _sinclair_typebox.Type.Array(NonEmptyString, { minItems: 1 })
1954
+ });
1955
+ const WorkloadArtifactProvenanceSchema = closed({
1956
+ profile: _sinclair_typebox.Type.Literal(WORKLOAD_ARTIFACT_PROFILE),
1957
+ schemaVersion: _sinclair_typebox.Type.Literal(1),
1958
+ kind: _sinclair_typebox.Type.Literal("workload-artifact-provenance"),
1959
+ artifact: Reference,
1960
+ source: WorkloadSourceSchema,
1961
+ build: Reference,
1962
+ transportArchiveSha256: Hex64,
1963
+ observedAt: UtcSecond,
1964
+ evidence: _sinclair_typebox.Type.Array(Reference, {
1965
+ minItems: 1,
1966
+ uniqueItems: true
1967
+ })
1968
+ });
1969
+ const workloadArtifactV1 = {
1970
+ literal: WORKLOAD_ARTIFACT_PROFILE,
1971
+ rootDocument: "workloadArtifact",
1972
+ documents: {
1973
+ workloadArtifact: WorkloadArtifactSchema,
1974
+ provenance: WorkloadArtifactProvenanceSchema
1975
+ }
1976
+ };
1977
+ //#endregion
1978
+ //#region src/run/execution-binding.v1.ts
1979
+ const EXECUTION_BINDING_PROFILE = "dsg.run.execution-binding/1";
1980
+ const ExecutionBindingSchema = closed({
1981
+ profile: _sinclair_typebox.Type.Literal(EXECUTION_BINDING_PROFILE),
1982
+ schemaVersion: _sinclair_typebox.Type.Literal(1),
1983
+ kind: _sinclair_typebox.Type.Literal("execution-binding"),
1984
+ installation: Orn,
1985
+ operation: Reference,
1986
+ activeSet: Reference,
1987
+ admission: Reference,
1988
+ organizationRelease: Reference,
1989
+ organizationBuild: Reference,
1990
+ selection: Reference,
1991
+ extensionRelease: Reference,
1992
+ workflow: Reference,
1993
+ jobClass: Reference,
1994
+ workloadArtifact: Reference,
1995
+ executableManifestSha256: Hex64,
1996
+ target: Reference,
1997
+ eventCatalog: Reference,
1998
+ law: Reference,
1999
+ reservation: Reference,
2000
+ trustView: Reference
2001
+ });
2002
+ const ExecutionRequestEnvelopeSchema = closed({
2003
+ profile: _sinclair_typebox.Type.Literal(EXECUTION_BINDING_PROFILE),
2004
+ schemaVersion: _sinclair_typebox.Type.Literal(1),
2005
+ kind: _sinclair_typebox.Type.Literal("execution-request-envelope"),
2006
+ operation: OperationRequestSchema,
2007
+ binding: ExecutionBindingSchema,
2008
+ jobClass: JobClassSchema,
2009
+ workloadArtifact: WorkloadArtifactSchema,
2010
+ workloadArtifactProvenance: WorkloadArtifactProvenanceSchema,
2011
+ admission: AdmissionRecordSchema,
2012
+ activeSet: ActiveSetSchema,
2013
+ selection: BuildSelectionSchema,
2014
+ catalogEntry: CatalogEntrySchema,
2015
+ releaseEligibility: ReleaseEligibilitySchema
2016
+ });
2017
+ const executionBindingV1 = {
2018
+ literal: EXECUTION_BINDING_PROFILE,
2019
+ rootDocument: "executionBinding",
2020
+ documents: {
2021
+ executionBinding: ExecutionBindingSchema,
2022
+ executionRequestEnvelope: ExecutionRequestEnvelopeSchema
2023
+ }
2024
+ };
2025
+ //#endregion
955
2026
  //#region src/index.ts
956
2027
  /** Every profile this version of the package defines, keyed by literal.
957
2028
  * Profile modules are added here as they are extracted; the rules test
@@ -975,41 +2046,93 @@ const PROFILES = {
975
2046
  [revocationsV1.literal]: revocationsV1,
976
2047
  [bootstrapV1.literal]: bootstrapV1,
977
2048
  [ordinaryAuthorityV1.literal]: ordinaryAuthorityV1,
978
- [standingOrderActivationV1.literal]: standingOrderActivationV1
2049
+ [standingOrderActivationV1.literal]: standingOrderActivationV1,
2050
+ [organizationSourceV2.literal]: organizationSourceV2,
2051
+ [extensionReleaseV1.literal]: extensionReleaseV1,
2052
+ [organizationSourceV3.literal]: organizationSourceV3,
2053
+ [organizationReleaseV1.literal]: organizationReleaseV1,
2054
+ [jobClassV1.literal]: jobClassV1,
2055
+ [workloadArtifactV1.literal]: workloadArtifactV1,
2056
+ [executionBindingV1.literal]: executionBindingV1
979
2057
  };
980
2058
  //#endregion
981
2059
  exports.ADOPTION_FACT_PROFILE = ADOPTION_FACT_PROFILE;
982
2060
  exports.AcceptedSchema = AcceptedSchema;
2061
+ exports.ActiveMemberSchema = ActiveMemberSchema;
2062
+ exports.ActiveSetSchema = ActiveSetSchema;
2063
+ exports.AdmissionRecordSchema = AdmissionRecordSchema;
2064
+ exports.AdmissionStatusObservationSchema = AdmissionStatusObservationSchema;
983
2065
  exports.AdoptionFactSchema = AdoptionFactSchema;
2066
+ exports.ApprovedUseSchema = ApprovedUseSchema;
2067
+ exports.AuthoredOverlaySchema = AuthoredOverlaySchema;
984
2068
  exports.BOOTSTRAP_PROFILE = BOOTSTRAP_PROFILE;
985
2069
  exports.BootstrapActionSchema = BootstrapActionSchema;
986
2070
  exports.BootstrapIntentSchema = BootstrapIntentSchema;
2071
+ exports.BoundAttestationSchema = BoundAttestationSchema;
2072
+ exports.BuildComponentSchema = BuildComponentSchema;
2073
+ exports.BuildSelectionSchema = BuildSelectionSchema;
2074
+ exports.CapabilityOriginSchema = CapabilityOriginSchema;
2075
+ exports.CapabilitySelectionSchema = CapabilitySelectionSchema;
2076
+ exports.CapabilitySelectionV3Schema = CapabilitySelectionV3Schema;
2077
+ exports.CatalogEntrySchema = CatalogEntrySchema;
2078
+ exports.CatalogSchema = CatalogSchema;
2079
+ exports.CompilerContractSchema = CompilerContractSchema;
2080
+ exports.ComponentBindingSchema = ComponentBindingSchema;
987
2081
  exports.DECISION_PROFILE = DECISION_PROFILE;
988
2082
  exports.DISPATCH_CONSUME_PROFILE = DISPATCH_CONSUME_PROFILE;
989
2083
  exports.DISPATCH_MAX_SKEW_SECONDS = DISPATCH_MAX_SKEW_SECONDS;
2084
+ exports.DependencyKindSchema = DependencyKindSchema;
2085
+ exports.DependencyLockEntrySchema = DependencyLockEntrySchema;
2086
+ exports.DependencyLockSchema = DependencyLockSchema;
990
2087
  exports.DispatchConsumeRequestSchema = DispatchConsumeRequestSchema;
991
2088
  exports.DispatchLeaseSchema = DispatchLeaseSchema;
992
2089
  exports.DispatchRefusalCodeSchema = DispatchRefusalCodeSchema;
993
2090
  exports.DispatchRefusalSchema = DispatchRefusalSchema;
994
2091
  exports.EVENT_LINE_PREFIX = EVENT_LINE_PREFIX;
995
2092
  exports.EVENT_PROFILE = EVENT_PROFILE;
2093
+ exports.EXECUTION_BINDING_PROFILE = EXECUTION_BINDING_PROFILE;
996
2094
  exports.EXECUTOR_PROTOCOL_VERSION = EXECUTOR_PROTOCOL_VERSION;
2095
+ exports.EXTENSION_RELEASE_CANONICALIZATION = EXTENSION_RELEASE_CANONICALIZATION;
2096
+ exports.EXTENSION_RELEASE_PROFILE = EXTENSION_RELEASE_PROFILE;
997
2097
  exports.EventSchema = EventSchema;
998
2098
  exports.EventStreamSealSchema = EventStreamSealSchema;
2099
+ exports.ExecutionBindingSchema = ExecutionBindingSchema;
999
2100
  exports.ExecutionDocumentSchema = ExecutionDocumentSchema;
1000
2101
  exports.ExecutionLawSchema = ExecutionLawSchema;
2102
+ exports.ExecutionRequestEnvelopeSchema = ExecutionRequestEnvelopeSchema;
1001
2103
  exports.ExecutionResourcesSchema = ExecutionResourcesSchema;
1002
2104
  exports.ExperimentRefSchema = ExperimentRefSchema;
2105
+ exports.ExtensionBoundsSchema = ExtensionBoundsSchema;
2106
+ exports.ExtensionComponentKindSchema = ExtensionComponentKindSchema;
2107
+ exports.ExtensionComponentReferenceSchema = ExtensionComponentReferenceSchema;
2108
+ exports.ExtensionComponentSchema = ExtensionComponentSchema;
2109
+ exports.ExtensionComputeRequirementsSchema = ExtensionComputeRequirementsSchema;
2110
+ exports.ExtensionDependencyKindSchema = ExtensionDependencyKindSchema;
2111
+ exports.ExtensionDependencySchema = ExtensionDependencySchema;
2112
+ exports.ExtensionReleaseReferenceSchema = ExtensionReleaseReferenceSchema;
2113
+ exports.ExtensionReleaseSchema = ExtensionReleaseSchema;
2114
+ exports.ExtensionReleaseSignatureSchema = ExtensionReleaseSignatureSchema;
2115
+ exports.ExtensionRequirementsSchema = ExtensionRequirementsSchema;
1003
2116
  exports.GOOGLE_IDENTITY_PROFILE = GOOGLE_IDENTITY_PROFILE;
1004
2117
  exports.GOOGLE_SIGN_IN_ISSUER = GOOGLE_SIGN_IN_ISSUER;
1005
2118
  exports.GoogleIdentitySchema = GoogleIdentitySchema;
1006
2119
  exports.Hex64 = Hex64;
1007
2120
  exports.IDENTITY_BINDING_PROFILE = IDENTITY_BINDING_PROFILE;
1008
2121
  exports.IdentityBindingSchema = IdentityBindingSchema;
2122
+ exports.ImportDispositionSchema = ImportDispositionSchema;
2123
+ exports.JOB_CLASS_PROFILE = JOB_CLASS_PROFILE;
2124
+ exports.JobClassBoundsSchema = JobClassBoundsSchema;
2125
+ exports.JobClassSchema = JobClassSchema;
1009
2126
  exports.LIFECYCLE_KINDS = LIFECYCLE_KINDS;
2127
+ exports.MemberObservationSchema = MemberObservationSchema;
1010
2128
  exports.NonEmptyString = NonEmptyString;
1011
2129
  exports.OPERATION_PROFILE = OPERATION_PROFILE;
1012
2130
  exports.ORDINARY_AUTHORITY_PROFILE = ORDINARY_AUTHORITY_PROFILE;
2131
+ exports.ORGANIZATION_RELEASE_CANONICALIZATION = ORGANIZATION_RELEASE_CANONICALIZATION;
2132
+ exports.ORGANIZATION_RELEASE_PROFILE = ORGANIZATION_RELEASE_PROFILE;
2133
+ exports.ORGANIZATION_SOURCE_PROFILE = ORGANIZATION_SOURCE_PROFILE;
2134
+ exports.ORGANIZATION_SOURCE_V3_PROFILE = ORGANIZATION_SOURCE_V3_PROFILE;
2135
+ exports.OciPlatformSchema = OciPlatformSchema;
1013
2136
  exports.OperationBeforeSchema = OperationBeforeSchema;
1014
2137
  exports.OperationCleanupSchema = OperationCleanupSchema;
1015
2138
  exports.OperationCostSchema = OperationCostSchema;
@@ -1018,11 +2141,29 @@ exports.OperationExecutionSchema = OperationExecutionSchema;
1018
2141
  exports.OperationRequestSchema = OperationRequestSchema;
1019
2142
  exports.OperationStatusSchema = OperationStatusSchema;
1020
2143
  exports.OrdinaryAuthoritySchema = OrdinaryAuthoritySchema;
2144
+ exports.OrganizationBuildSchema = OrganizationBuildSchema;
2145
+ exports.OrganizationDependencyLockSchema = OrganizationDependencyLockSchema;
2146
+ exports.OrganizationDocumentPathSchema = OrganizationDocumentPathSchema;
2147
+ exports.OrganizationInstructionSchema = OrganizationInstructionSchema;
2148
+ exports.OrganizationReleaseDeclarationSchema = OrganizationReleaseDeclarationSchema;
2149
+ exports.OrganizationReleaseMemberKindSchema = OrganizationReleaseMemberKindSchema;
2150
+ exports.OrganizationReleaseMemberSchema = OrganizationReleaseMemberSchema;
2151
+ exports.OrganizationReleaseSchema = OrganizationReleaseSchema;
2152
+ exports.OrganizationRootSchema = OrganizationRootSchema;
2153
+ exports.OrganizationRootV1Schema = OrganizationRootV1Schema;
2154
+ exports.OrganizationRootV3Schema = OrganizationRootV3Schema;
2155
+ exports.OrganizationSelectionDispositionSchema = OrganizationSelectionDispositionSchema;
2156
+ exports.OrganizationSourceLocationSchema = OrganizationSourceLocationSchema;
2157
+ exports.OrganizationSourceProjectSchema = OrganizationSourceProjectSchema;
2158
+ exports.OrganizationSourceReleaseMemberSchema = OrganizationSourceReleaseMemberSchema;
2159
+ exports.OrganizationSpaceSchema = OrganizationSpaceSchema;
1021
2160
  exports.Orn = Orn;
1022
2161
  exports.PRICE_PROFILE_REFERENCE = PRICE_PROFILE_REFERENCE;
1023
2162
  exports.PROFILES = PROFILES;
1024
2163
  exports.PROVIDER_PROTOCOL_VERSION = PROVIDER_PROTOCOL_VERSION;
1025
2164
  exports.PersonReference = PersonReference;
2165
+ exports.ProjectMembershipSchema = ProjectMembershipSchema;
2166
+ exports.ProjectSourceSchema = ProjectSourceSchema;
1026
2167
  exports.REFUSAL_PROFILE = REFUSAL_PROFILE;
1027
2168
  exports.REFUSAL_V2_PROFILE = REFUSAL_V2_PROFILE;
1028
2169
  exports.REFUSAL_V3_PROFILE = REFUSAL_V3_PROFILE;
@@ -1041,6 +2182,11 @@ exports.RefusalStageV2Schema = RefusalStageV2Schema;
1041
2182
  exports.RefusalStageV3Schema = RefusalStageV3Schema;
1042
2183
  exports.RefusalV2Schema = RefusalV2Schema;
1043
2184
  exports.RefusalV3Schema = RefusalV3Schema;
2185
+ exports.ReleaseDeclarationSchema = ReleaseDeclarationSchema;
2186
+ exports.ReleaseEligibilitySchema = ReleaseEligibilitySchema;
2187
+ exports.ReleaseMemberKindSchema = ReleaseMemberKindSchema;
2188
+ exports.ReleaseStatusObservationSchema = ReleaseStatusObservationSchema;
2189
+ exports.ReleaseStatusSchema = ReleaseStatusSchema;
1044
2190
  exports.RequestCeilingsSchema = RequestCeilingsSchema;
1045
2191
  exports.ResourceDescriptorSchema = ResourceDescriptorSchema;
1046
2192
  exports.RevocationPointerSchema = RevocationPointerSchema;
@@ -1062,4 +2208,10 @@ exports.StandingOrderActivationEventSchema = StandingOrderActivationEventSchema;
1062
2208
  exports.StandingOrderActivationSchema = StandingOrderActivationSchema;
1063
2209
  exports.StandingOrderModeSchema = StandingOrderModeSchema;
1064
2210
  exports.UtcSecond = UtcSecond;
2211
+ exports.WORKLOAD_ARTIFACT_PROFILE = WORKLOAD_ARTIFACT_PROFILE;
2212
+ exports.WorkloadArtifactProvenanceSchema = WorkloadArtifactProvenanceSchema;
2213
+ exports.WorkloadArtifactSchema = WorkloadArtifactSchema;
2214
+ exports.WorkloadSourceSchema = WorkloadSourceSchema;
2215
+ exports.WorkspaceProfileSchema = WorkspaceProfileSchema;
2216
+ exports.WorkspaceProfileV3Schema = WorkspaceProfileV3Schema;
1065
2217
  exports.closed = closed;