@xemahq/kernel-contracts 0.2.2 → 0.2.3
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/agent-workspace/awp-spec.json +1 -1
- package/dist/distribution/lib/distribution-lock.d.ts +7 -0
- package/dist/distribution/lib/distribution-lock.d.ts.map +1 -1
- package/dist/distribution/lib/distribution-lock.js +7 -1
- package/dist/distribution/lib/distribution-lock.js.map +1 -1
- package/dist/distribution/lib/distribution.d.ts +6 -0
- package/dist/distribution/lib/distribution.d.ts.map +1 -1
- package/dist/distribution/lib/distribution.js +6 -1
- package/dist/distribution/lib/distribution.js.map +1 -1
- package/dist/distribution/lib/image-lock.d.ts +7 -0
- package/dist/distribution/lib/image-lock.d.ts.map +1 -1
- package/dist/distribution/lib/image-lock.js +7 -1
- package/dist/distribution/lib/image-lock.js.map +1 -1
- package/package.json +1 -1
- package/src/distribution/lib/distribution-lock.ts +32 -0
- package/src/distribution/lib/distribution.ts +26 -0
- package/src/distribution/lib/image-lock.ts +25 -0
|
@@ -9,13 +9,20 @@ export interface LockedBiome {
|
|
|
9
9
|
mandatory: boolean;
|
|
10
10
|
repo: string;
|
|
11
11
|
path: string;
|
|
12
|
+
services: readonly string[];
|
|
12
13
|
imageDigest?: string;
|
|
13
14
|
}
|
|
14
15
|
export declare const LockedBiomeSchema: z.ZodType<LockedBiome>;
|
|
16
|
+
export interface LockedPlatformService {
|
|
17
|
+
name: string;
|
|
18
|
+
tier: BiomeTier | 'edge';
|
|
19
|
+
}
|
|
20
|
+
export declare const LockedPlatformServiceSchema: z.ZodType<LockedPlatformService>;
|
|
15
21
|
export interface DistributionLock {
|
|
16
22
|
schemaVersion: 1;
|
|
17
23
|
distributionId: string;
|
|
18
24
|
biomes: readonly LockedBiome[];
|
|
25
|
+
platformServices: readonly LockedPlatformService[];
|
|
19
26
|
resolvedAt?: string;
|
|
20
27
|
inputHash?: string;
|
|
21
28
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"distribution-lock.d.ts","sourceRoot":"","sources":["../../../src/distribution/lib/distribution-lock.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAIL,KAAK,SAAS,EACd,KAAK,WAAW,EAChB,KAAK,WAAW,EACjB,MAAM,aAAa,CAAC;AAQrB,MAAM,WAAW,WAAW;IAC1B,EAAE,EAAE,MAAM,CAAC;IACX,OAAO,EAAE,MAAM,CAAC;IAChB,IAAI,EAAE,SAAS,CAAC;IAChB,MAAM,EAAE,WAAW,CAAC;IAEpB,MAAM,EAAE,WAAW,CAAC;IAEpB,SAAS,EAAE,OAAO,CAAC;IAEnB,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;
|
|
1
|
+
{"version":3,"file":"distribution-lock.d.ts","sourceRoot":"","sources":["../../../src/distribution/lib/distribution-lock.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAIL,KAAK,SAAS,EACd,KAAK,WAAW,EAChB,KAAK,WAAW,EACjB,MAAM,aAAa,CAAC;AAQrB,MAAM,WAAW,WAAW;IAC1B,EAAE,EAAE,MAAM,CAAC;IACX,OAAO,EAAE,MAAM,CAAC;IAChB,IAAI,EAAE,SAAS,CAAC;IAChB,MAAM,EAAE,WAAW,CAAC;IAEpB,MAAM,EAAE,WAAW,CAAC;IAEpB,SAAS,EAAE,OAAO,CAAC;IAEnB,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IASb,QAAQ,EAAE,SAAS,MAAM,EAAE,CAAC;IAE5B,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB;AAED,eAAO,MAAM,iBAAiB,EAWxB,CAAC,CAAC,OAAO,CAAC,WAAW,CAAC,CAAC;AAU7B,MAAM,WAAW,qBAAqB;IACpC,IAAI,EAAE,MAAM,CAAC;IAEb,IAAI,EAAE,SAAS,GAAG,MAAM,CAAC;CAC1B;AAED,eAAO,MAAM,2BAA2B,EAGlC,CAAC,CAAC,OAAO,CAAC,qBAAqB,CAAC,CAAC;AAYvC,MAAM,WAAW,gBAAgB;IAC/B,aAAa,EAAE,CAAC,CAAC;IACjB,cAAc,EAAE,MAAM,CAAC;IACvB,MAAM,EAAE,SAAS,WAAW,EAAE,CAAC;IAE/B,gBAAgB,EAAE,SAAS,qBAAqB,EAAE,CAAC;IAEnD,UAAU,CAAC,EAAE,MAAM,CAAC;IAEpB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,eAAO,MAAM,sBAAsB,EAO7B,CAAC,CAAC,OAAO,CAAC,gBAAgB,CAAC,CAAC;AAOlC,wBAAgB,qBAAqB,CAAC,GAAG,EAAE,OAAO,GAAG,gBAAgB,CAUpE"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.DistributionLockSchema = exports.LockedBiomeSchema = void 0;
|
|
3
|
+
exports.DistributionLockSchema = exports.LockedPlatformServiceSchema = exports.LockedBiomeSchema = void 0;
|
|
4
4
|
exports.parseDistributionLock = parseDistributionLock;
|
|
5
5
|
const zod_1 = require("zod");
|
|
6
6
|
const biome_1 = require("../../biome");
|
|
@@ -13,12 +13,18 @@ exports.LockedBiomeSchema = zod_1.z.object({
|
|
|
13
13
|
mandatory: zod_1.z.boolean(),
|
|
14
14
|
repo: zod_1.z.string().min(1),
|
|
15
15
|
path: zod_1.z.string().min(1),
|
|
16
|
+
services: zod_1.z.array(zod_1.z.string().min(1)).readonly(),
|
|
16
17
|
imageDigest: zod_1.z.string().min(1).optional(),
|
|
17
18
|
});
|
|
19
|
+
exports.LockedPlatformServiceSchema = zod_1.z.object({
|
|
20
|
+
name: zod_1.z.string().min(1),
|
|
21
|
+
tier: zod_1.z.union([biome_1.BiomeTierSchema, zod_1.z.literal('edge')]),
|
|
22
|
+
});
|
|
18
23
|
exports.DistributionLockSchema = zod_1.z.object({
|
|
19
24
|
schemaVersion: zod_1.z.literal(1),
|
|
20
25
|
distributionId: zod_1.z.string().min(1),
|
|
21
26
|
biomes: zod_1.z.array(exports.LockedBiomeSchema).readonly(),
|
|
27
|
+
platformServices: zod_1.z.array(exports.LockedPlatformServiceSchema).readonly(),
|
|
22
28
|
resolvedAt: zod_1.z.string().min(1).optional(),
|
|
23
29
|
inputHash: zod_1.z.string().min(1).optional(),
|
|
24
30
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"distribution-lock.js","sourceRoot":"","sources":["../../../src/distribution/lib/distribution-lock.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"distribution-lock.js","sourceRoot":"","sources":["../../../src/distribution/lib/distribution-lock.ts"],"names":[],"mappings":";;;AA6GA,sDAUC;AAvHD,6BAAwB;AACxB,uCAOqB;AAiCR,QAAA,iBAAiB,GAAG,OAAC,CAAC,MAAM,CAAC;IACxC,EAAE,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC;IACrB,OAAO,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC;IAC1B,IAAI,EAAE,uBAAe;IACrB,MAAM,EAAE,yBAAiB;IACzB,MAAM,EAAE,yBAAiB;IACzB,SAAS,EAAE,OAAC,CAAC,OAAO,EAAE;IACtB,IAAI,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC;IACvB,IAAI,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC;IACvB,QAAQ,EAAE,OAAC,CAAC,KAAK,CAAC,OAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,QAAQ,EAAE;IAC/C,WAAW,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,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CAChB,CAAC;IACJ,CAAC;IACD,OAAO,MAAM,CAAC,IAAI,CAAC;AACrB,CAAC"}
|
|
@@ -6,6 +6,11 @@ export interface DistributionTrustPolicy {
|
|
|
6
6
|
allow: readonly BiomeOrigin[];
|
|
7
7
|
}
|
|
8
8
|
export declare const DistributionTrustPolicySchema: z.ZodType<DistributionTrustPolicy>;
|
|
9
|
+
export interface DistributionPlatformService {
|
|
10
|
+
name: string;
|
|
11
|
+
tier: 'kernel' | 'system' | 'base' | 'platform' | 'edge';
|
|
12
|
+
}
|
|
13
|
+
export declare const DistributionPlatformServiceSchema: z.ZodType<DistributionPlatformService>;
|
|
9
14
|
export interface Distribution {
|
|
10
15
|
schemaVersion: DistributionSchemaVersion;
|
|
11
16
|
id: string;
|
|
@@ -15,6 +20,7 @@ export interface Distribution {
|
|
|
15
20
|
include: readonly DistributionSelector[];
|
|
16
21
|
exclude?: readonly string[];
|
|
17
22
|
trustPolicy?: DistributionTrustPolicy;
|
|
23
|
+
platformServices?: readonly DistributionPlatformService[];
|
|
18
24
|
}
|
|
19
25
|
export declare const DistributionSchema: z.ZodType<Distribution>;
|
|
20
26
|
export declare function parseDistribution(raw: unknown): Distribution;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"distribution.d.ts","sourceRoot":"","sources":["../../../src/distribution/lib/distribution.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAqB,KAAK,WAAW,EAAE,MAAM,aAAa,CAAC;AAClE,OAAO,EAEL,KAAK,oBAAoB,EAC1B,MAAM,yBAAyB,CAAC;AAOjC,MAAM,MAAM,yBAAyB,GAAG,CAAC,CAAC;AAQ1C,MAAM,WAAW,uBAAuB;IACtC,KAAK,EAAE,SAAS,WAAW,EAAE,CAAC;CAC/B;AAED,eAAO,MAAM,6BAA6B,EAEpC,CAAC,CAAC,OAAO,CAAC,uBAAuB,CAAC,CAAC;
|
|
1
|
+
{"version":3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";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.DistributionSchema = exports.DistributionTrustPolicySchema = void 0;
|
|
3
|
+
exports.DistributionSchema = exports.DistributionPlatformServiceSchema = exports.DistributionTrustPolicySchema = void 0;
|
|
4
4
|
exports.parseDistribution = parseDistribution;
|
|
5
5
|
const zod_1 = require("zod");
|
|
6
6
|
const biome_1 = require("../../biome");
|
|
@@ -8,6 +8,10 @@ const distribution_selector_1 = require("./distribution-selector");
|
|
|
8
8
|
exports.DistributionTrustPolicySchema = zod_1.z.object({
|
|
9
9
|
allow: zod_1.z.array(biome_1.BiomeOriginSchema).readonly(),
|
|
10
10
|
});
|
|
11
|
+
exports.DistributionPlatformServiceSchema = zod_1.z.object({
|
|
12
|
+
name: zod_1.z.string().min(1),
|
|
13
|
+
tier: zod_1.z.enum(['kernel', 'system', 'base', 'platform', 'edge']),
|
|
14
|
+
});
|
|
11
15
|
exports.DistributionSchema = zod_1.z.object({
|
|
12
16
|
schemaVersion: zod_1.z.literal(1),
|
|
13
17
|
id: zod_1.z.string().min(1),
|
|
@@ -17,6 +21,7 @@ exports.DistributionSchema = zod_1.z.object({
|
|
|
17
21
|
include: zod_1.z.array(distribution_selector_1.DistributionSelectorSchema).readonly(),
|
|
18
22
|
exclude: zod_1.z.array(zod_1.z.string().min(1)).readonly().optional(),
|
|
19
23
|
trustPolicy: exports.DistributionTrustPolicySchema.optional(),
|
|
24
|
+
platformServices: zod_1.z.array(exports.DistributionPlatformServiceSchema).readonly().optional(),
|
|
20
25
|
});
|
|
21
26
|
function parseDistribution(raw) {
|
|
22
27
|
const result = exports.DistributionSchema.safeParse(raw);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"distribution.js","sourceRoot":"","sources":["../../../src/distribution/lib/distribution.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"distribution.js","sourceRoot":"","sources":["../../../src/distribution/lib/distribution.ts"],"names":[],"mappings":";;;AA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AAQ,EAAE,CAAC,QAAQ,EAAE;CACnF,CAA4B,CAAC;AAM9B,SAAgB,iBAAiB,CAAC,GAAY;IAC5C,MAAM,MAAM,GAAG,0BAAkB,CAAC,SAAS,CAAC,GAAG,CAAC,CAAC;IACjD,IAAI,CAAC,MAAM,CAAC,OAAO,EAAE,CAAC;QACpB,MAAM,IAAI,KAAK,CACb,mCAAmC,MAAM,CAAC,KAAK,CAAC,MAAM;aACnD,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,IAAI,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC,OAAO,EAAE,CAAC;aAChD,IAAI,CAAC,IAAI,CAAC,EAAE,CAChB,CAAC;IACJ,CAAC;IACD,OAAO,MAAM,CAAC,IAAI,CAAC;AACrB,CAAC"}
|
|
@@ -9,10 +9,17 @@ export interface LockedImage {
|
|
|
9
9
|
path: string;
|
|
10
10
|
}
|
|
11
11
|
export declare const LockedImageSchema: z.ZodType<LockedImage>;
|
|
12
|
+
export interface LockedWebBiome {
|
|
13
|
+
biomeId: string;
|
|
14
|
+
repo: string;
|
|
15
|
+
path: string;
|
|
16
|
+
}
|
|
17
|
+
export declare const LockedWebBiomeSchema: z.ZodType<LockedWebBiome>;
|
|
12
18
|
export interface ImageLock {
|
|
13
19
|
schemaVersion: 1;
|
|
14
20
|
distributionId: string;
|
|
15
21
|
images: readonly LockedImage[];
|
|
22
|
+
webBiomes: readonly LockedWebBiome[];
|
|
16
23
|
resolvedAt?: string;
|
|
17
24
|
}
|
|
18
25
|
export declare const ImageLockSchema: z.ZodType<ImageLock>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"image-lock.d.ts","sourceRoot":"","sources":["../../../src/distribution/lib/image-lock.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAqB,KAAK,WAAW,EAAE,MAAM,aAAa,CAAC;AAalE,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AE,MAAM,CAAC;IACvB,MAAM,EAAE,SAAS,WAAW,EAAE,CAAC;IAE/B,SAAS,EAAE,SAAS,cAAc,EAAE,CAAC;IAErC,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB;AAED,eAAO,MAAM,eAAe,EAMtB,CAAC,CAAC,OAAO,CAAC,SAAS,CAAC,CAAC;AAO3B,wBAAgB,cAAc,CAAC,GAAG,EAAE,OAAO,GAAG,SAAS,CAUtD"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.ImageLockSchema = exports.LockedImageSchema = void 0;
|
|
3
|
+
exports.ImageLockSchema = exports.LockedWebBiomeSchema = exports.LockedImageSchema = void 0;
|
|
4
4
|
exports.parseImageLock = parseImageLock;
|
|
5
5
|
const zod_1 = require("zod");
|
|
6
6
|
const biome_1 = require("../../biome");
|
|
@@ -12,10 +12,16 @@ exports.LockedImageSchema = zod_1.z.object({
|
|
|
12
12
|
repo: zod_1.z.string().min(1),
|
|
13
13
|
path: zod_1.z.string().min(1),
|
|
14
14
|
});
|
|
15
|
+
exports.LockedWebBiomeSchema = zod_1.z.object({
|
|
16
|
+
biomeId: zod_1.z.string().min(1),
|
|
17
|
+
repo: zod_1.z.string().min(1),
|
|
18
|
+
path: zod_1.z.string().min(1),
|
|
19
|
+
});
|
|
15
20
|
exports.ImageLockSchema = zod_1.z.object({
|
|
16
21
|
schemaVersion: zod_1.z.literal(1),
|
|
17
22
|
distributionId: zod_1.z.string().min(1),
|
|
18
23
|
images: zod_1.z.array(exports.LockedImageSchema).readonly(),
|
|
24
|
+
webBiomes: zod_1.z.array(exports.LockedWebBiomeSchema).readonly(),
|
|
19
25
|
resolvedAt: zod_1.z.string().min(1).optional(),
|
|
20
26
|
});
|
|
21
27
|
function parseImageLock(raw) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"image-lock.js","sourceRoot":"","sources":["../../../src/distribution/lib/image-lock.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"image-lock.js","sourceRoot":"","sources":["../../../src/distribution/lib/image-lock.ts"],"names":[],"mappings":";;;AA2FA,wCAUC;AArGD,6BAAwB;AACxB,uCAAkE;AA4BrD,QAAA,iBAAiB,GAAG,OAAC,CAAC,MAAM,CAAC;IACxC,OAAO,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC;IAC1B,MAAM,EAAE,yBAAiB;IACzB,QAAQ,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC;IAC3B,WAAW,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC;IAC9B,IAAI,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC;IACvB,IAAI,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC;CACxB,CAA2B,CAAC;AAkBhB,QAAA,oBAAoB,GAAG,OAAC,CAAC,MAAM,CAAC;IAC3C,OAAO,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC;IAC1B,IAAI,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC;IACvB,IAAI,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC;CACxB,CAA8B,CAAC;AAoBnB,QAAA,eAAe,GAAG,OAAC,CAAC,MAAM,CAAC;IACtC,aAAa,EAAE,OAAC,CAAC,OAAO,CAAC,CAAC,CAAC;IAC3B,cAAc,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC;IACjC,MAAM,EAAE,OAAC,CAAC,KAAK,CAAC,yBAAiB,CAAC,CAAC,QAAQ,EAAE;IAC7C,SAAS,EAAE,OAAC,CAAC,KAAK,CAAC,4BAAoB,CAAC,CAAC,QAAQ,EAAE;IACnD,UAAU,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,QAAQ,EAAE;CACzC,CAAyB,CAAC;AAO3B,SAAgB,cAAc,CAAC,GAAY;IACzC,MAAM,MAAM,GAAG,uBAAe,CAAC,SAAS,CAAC,GAAG,CAAC,CAAC;IAC9C,IAAI,CAAC,MAAM,CAAC,OAAO,EAAE,CAAC;QACpB,MAAM,IAAI,KAAK,CACb,6BAA6B,MAAM,CAAC,KAAK,CAAC,MAAM;aAC7C,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,IAAI,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC,OAAO,EAAE,CAAC;aAChD,IAAI,CAAC,IAAI,CAAC,EAAE,CAChB,CAAC;IACJ,CAAC;IACD,OAAO,MAAM,CAAC,IAAI,CAAC;AACrB,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@xemahq/kernel-contracts",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.3",
|
|
4
4
|
"description": "Consolidated Xema OS kernel wire contracts — pure types + zod schemas for the 32 kernel protocol surfaces. One package, one npm scope, wildcard per-surface subpath exports. No framework/runtime deps.",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"registry": "https://registry.npmjs.org/",
|
|
@@ -26,6 +26,15 @@ export interface LockedBiome {
|
|
|
26
26
|
/** Source repo + path the biome was resolved from (provenance for the build). */
|
|
27
27
|
repo: string;
|
|
28
28
|
path: string;
|
|
29
|
+
/**
|
|
30
|
+
* Deployable service names this biome ships (from the manifest `ships.apis[].name`).
|
|
31
|
+
* Empty for biomes with no deployable API (pure skill/agent bundles) and for
|
|
32
|
+
* web biomes (which bundle into the host shell, not their own container). This
|
|
33
|
+
* is what the deployment-roster generator reads — it runs in a standalone
|
|
34
|
+
* checkout without the biome sources, so the biome→service mapping must travel
|
|
35
|
+
* inside the lockfile, never be recomputed downstream.
|
|
36
|
+
*/
|
|
37
|
+
services: readonly string[];
|
|
29
38
|
/** Set by the image-manifest resolver; `image@sha256:<digest>`. */
|
|
30
39
|
imageDigest?: string;
|
|
31
40
|
}
|
|
@@ -39,9 +48,29 @@ export const LockedBiomeSchema = z.object({
|
|
|
39
48
|
mandatory: z.boolean(),
|
|
40
49
|
repo: z.string().min(1),
|
|
41
50
|
path: z.string().min(1),
|
|
51
|
+
services: z.array(z.string().min(1)).readonly(),
|
|
42
52
|
imageDigest: z.string().min(1).optional(),
|
|
43
53
|
}) as z.ZodType<LockedBiome>;
|
|
44
54
|
|
|
55
|
+
/**
|
|
56
|
+
* A platform-substrate service that is part of a distribution but is NOT a biome
|
|
57
|
+
* — the deployment "init system" (kernel server, host shell, opencode worker
|
|
58
|
+
* plane, docs). These always ship with any Xema deployment that includes the
|
|
59
|
+
* base layer; they are declared once on the `core` distribution and inherited
|
|
60
|
+
* via `extends`. Carried into the lock so the roster generator sees the full
|
|
61
|
+
* service set (biome services ∪ platform services) without any hardcoded floor.
|
|
62
|
+
*/
|
|
63
|
+
export interface LockedPlatformService {
|
|
64
|
+
name: string;
|
|
65
|
+
/** Wave/boot tier — drives ordering in the generated bring-up plan. */
|
|
66
|
+
tier: BiomeTier | 'edge';
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
export const LockedPlatformServiceSchema = z.object({
|
|
70
|
+
name: z.string().min(1),
|
|
71
|
+
tier: z.union([BiomeTierSchema, z.literal('edge')]),
|
|
72
|
+
}) as z.ZodType<LockedPlatformService>;
|
|
73
|
+
|
|
45
74
|
/**
|
|
46
75
|
* `DistributionLock` — the deterministic, resolved output of a `Distribution`.
|
|
47
76
|
* THE single artifact every consumer reads (deploy generator, test-suite
|
|
@@ -56,6 +85,8 @@ export interface DistributionLock {
|
|
|
56
85
|
schemaVersion: 1;
|
|
57
86
|
distributionId: string;
|
|
58
87
|
biomes: readonly LockedBiome[];
|
|
88
|
+
/** Non-biome substrate services that ship with this distribution (the deploy "init system"). */
|
|
89
|
+
platformServices: readonly LockedPlatformService[];
|
|
59
90
|
/** ISO-8601 timestamp the resolver stamped (tooling-supplied). */
|
|
60
91
|
resolvedAt?: string;
|
|
61
92
|
/** Hash of the resolver inputs (manifest + index) for drift detection. */
|
|
@@ -66,6 +97,7 @@ export const DistributionLockSchema = z.object({
|
|
|
66
97
|
schemaVersion: z.literal(1),
|
|
67
98
|
distributionId: z.string().min(1),
|
|
68
99
|
biomes: z.array(LockedBiomeSchema).readonly(),
|
|
100
|
+
platformServices: z.array(LockedPlatformServiceSchema).readonly(),
|
|
69
101
|
resolvedAt: z.string().min(1).optional(),
|
|
70
102
|
inputHash: z.string().min(1).optional(),
|
|
71
103
|
}) as z.ZodType<DistributionLock>;
|
|
@@ -26,6 +26,25 @@ export const DistributionTrustPolicySchema = z.object({
|
|
|
26
26
|
allow: z.array(BiomeOriginSchema).readonly(),
|
|
27
27
|
}) as z.ZodType<DistributionTrustPolicy>;
|
|
28
28
|
|
|
29
|
+
/**
|
|
30
|
+
* A platform-substrate service a distribution ships that is NOT a biome — the
|
|
31
|
+
* deployment "init system" (kernel server, host shell, opencode worker plane,
|
|
32
|
+
* docs). Declared once on the floor distribution (`core`) and inherited via
|
|
33
|
+
* `extends`. These never go through biome selectors (they are not biomes); they
|
|
34
|
+
* are carried verbatim into the lock so the deployment-roster generator sees the
|
|
35
|
+
* full service set without any hardcoded floor in the generator.
|
|
36
|
+
*/
|
|
37
|
+
export interface DistributionPlatformService {
|
|
38
|
+
name: string;
|
|
39
|
+
/** Wave/boot tier — drives ordering in the generated bring-up plan. */
|
|
40
|
+
tier: 'kernel' | 'system' | 'base' | 'platform' | 'edge';
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
export const DistributionPlatformServiceSchema = z.object({
|
|
44
|
+
name: z.string().min(1),
|
|
45
|
+
tier: z.enum(['kernel', 'system', 'base', 'platform', 'edge']),
|
|
46
|
+
}) as z.ZodType<DistributionPlatformService>;
|
|
47
|
+
|
|
29
48
|
/**
|
|
30
49
|
* `Distribution` — the top-level shape of `xema-distribution.json`: the
|
|
31
50
|
* PACKAGING primitive that declares which biomes a given Xema build ships.
|
|
@@ -52,6 +71,12 @@ export interface Distribution {
|
|
|
52
71
|
/** Biome ids to remove after composition. Cannot remove a kernel-tier biome. */
|
|
53
72
|
exclude?: readonly string[];
|
|
54
73
|
trustPolicy?: DistributionTrustPolicy;
|
|
74
|
+
/**
|
|
75
|
+
* Non-biome substrate services this distribution ships (the deploy "init
|
|
76
|
+
* system"). Composed parent→child like `include` (concatenated, de-duped by
|
|
77
|
+
* name with the child winning on tier). Usually declared only on `core`.
|
|
78
|
+
*/
|
|
79
|
+
platformServices?: readonly DistributionPlatformService[];
|
|
55
80
|
}
|
|
56
81
|
|
|
57
82
|
export const DistributionSchema = z.object({
|
|
@@ -63,6 +88,7 @@ export const DistributionSchema = z.object({
|
|
|
63
88
|
include: z.array(DistributionSelectorSchema).readonly(),
|
|
64
89
|
exclude: z.array(z.string().min(1)).readonly().optional(),
|
|
65
90
|
trustPolicy: DistributionTrustPolicySchema.optional(),
|
|
91
|
+
platformServices: z.array(DistributionPlatformServiceSchema).readonly().optional(),
|
|
66
92
|
}) as z.ZodType<Distribution>;
|
|
67
93
|
|
|
68
94
|
/**
|
|
@@ -36,6 +36,28 @@ export const LockedImageSchema = z.object({
|
|
|
36
36
|
path: z.string().min(1),
|
|
37
37
|
}) as z.ZodType<LockedImage>;
|
|
38
38
|
|
|
39
|
+
/**
|
|
40
|
+
* A web biome that ships in a distribution. Web biomes do NOT produce their own
|
|
41
|
+
* container image — they are static frontend bundles compiled INTO the single
|
|
42
|
+
* host-shell image (`xema-host-web`). They are listed here explicitly (never
|
|
43
|
+
* silently dropped) so the host-shell build knows exactly which web biomes to
|
|
44
|
+
* bundle for this distribution: the lockfile is the join key for the frontend
|
|
45
|
+
* too, not just the backend.
|
|
46
|
+
*/
|
|
47
|
+
export interface LockedWebBiome {
|
|
48
|
+
biomeId: string;
|
|
49
|
+
/** Source repo segment the web biome was resolved from. */
|
|
50
|
+
repo: string;
|
|
51
|
+
/** Source directory path (repo-root-relative) the web biome was resolved from. */
|
|
52
|
+
path: string;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
export const LockedWebBiomeSchema = z.object({
|
|
56
|
+
biomeId: z.string().min(1),
|
|
57
|
+
repo: z.string().min(1),
|
|
58
|
+
path: z.string().min(1),
|
|
59
|
+
}) as z.ZodType<LockedWebBiome>;
|
|
60
|
+
|
|
39
61
|
/**
|
|
40
62
|
* `ImageLock` — the deterministic, content-addressed image manifest for a
|
|
41
63
|
* distribution. Resolved from `distribution.lock.json` by the image-manifest
|
|
@@ -48,6 +70,8 @@ export interface ImageLock {
|
|
|
48
70
|
schemaVersion: 1;
|
|
49
71
|
distributionId: string;
|
|
50
72
|
images: readonly LockedImage[];
|
|
73
|
+
/** Web biomes bundled into the host-shell image (no own container). */
|
|
74
|
+
webBiomes: readonly LockedWebBiome[];
|
|
51
75
|
/** ISO-8601 timestamp the resolver stamped (tooling-supplied). */
|
|
52
76
|
resolvedAt?: string;
|
|
53
77
|
}
|
|
@@ -56,6 +80,7 @@ export const ImageLockSchema = z.object({
|
|
|
56
80
|
schemaVersion: z.literal(1),
|
|
57
81
|
distributionId: z.string().min(1),
|
|
58
82
|
images: z.array(LockedImageSchema).readonly(),
|
|
83
|
+
webBiomes: z.array(LockedWebBiomeSchema).readonly(),
|
|
59
84
|
resolvedAt: z.string().min(1).optional(),
|
|
60
85
|
}) as z.ZodType<ImageLock>;
|
|
61
86
|
|