halfcode-compiler.xnl 0.2.9 → 0.3.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/README.md +5 -3
- package/dist/application-assembly.d.ts +1 -1
- package/dist/application-assembly.js +1 -1
- package/dist/authoring-runtime.d.ts +12 -8
- package/dist/authoring-runtime.js +1 -1
- package/dist/{effective-content-identities-DV5fTr5Q.js → effective-content-identities-CV6XFBZy.js} +8 -8
- package/dist/{effective-content-identities-CSVFi-N5.d.ts → effective-content-identities-drMRhYE2.d.ts} +2 -2
- package/dist/{index-B515mMkO.d.ts → index-CR7wJSSX.d.ts} +10 -6
- package/dist/{index-Cqh9pEBa.d.ts → index-DEikbOFh.d.ts} +2 -1
- package/dist/{index-CF4nEkOi.d.ts → index-DI3WtuXq.d.ts} +1 -1
- package/dist/index-DboIOEr8.d.ts +474 -0
- package/dist/index.d.ts +7 -6
- package/dist/index.js +6 -5
- package/dist/kind-definition.d.ts +118 -10
- package/dist/kind-definition.js +826 -15
- package/dist/resource-core-Brj8naBr.d.ts +47 -0
- package/dist/resource-core.d.ts +4 -4
- package/dist/resource-core.js +25 -11
- package/dist/resource-projection.d.ts +1 -1
- package/dist/skill-capsule.d.ts +2 -2
- package/dist/skill-capsule.js +1 -1
- package/dist/{src-3pnDAjBD.js → src-B0Hja_dk.js} +5 -7
- package/dist/{src-CaQ25rMj.js → src-DLJUCH0M.js} +11 -7
- package/dist/{src-3MZLm339.js → src-hrUy4DJ9.js} +71 -19
- package/dist/{src-D3qSzGFn.js → src-jggOQtq3.js} +511 -113
- package/dist/system-skills/resource-dsl/KindDefinitions/SkillCapsule/manifest.xnl +15 -3
- package/dist/system-skills/resource-dsl/KindDefinitions/WikiPage/manifest.xnl +15 -3
- package/dist/system-skills/resource-dsl/SkillCapsules/System/SKILL.metadata.yaml +1 -0
- package/dist/system-skills/resource-dsl/SkillCapsules/System/manifest.xnl +1 -1
- package/dist/system-skills/resource-dsl/SkillCapsules/System/resource-mappings.xnl +1 -1
- package/dist/system-skills/resource-dsl/WikiPages/documents/manifest.xnl +1 -1
- package/dist/system-skills/resource-dsl/WikiPages/files/manifest.xnl +1 -1
- package/dist/system-skills/resource-dsl/WikiPages/index/manifest.xnl +1 -1
- package/dist/system-skills/resource-dsl/WikiPages/language/manifest.xnl +1 -1
- package/dist/system-skills/resource-dsl/WikiPages/migration/manifest.xnl +1 -1
- package/dist/system-skills/resource-dsl/WikiPages/projections/manifest.xnl +1 -1
- package/dist/system-skills/resource-dsl/WikiPages/skill-capsules/manifest.xnl +1 -1
- package/dist/system-skills/resource-dsl/documents.md +33 -17
- package/dist/system-skills/resource-dsl/examples/function.xnl +1 -1
- package/dist/system-skills/resource-dsl/examples/kind-definition.xnl +15 -3
- package/dist/system-skills/resource-dsl/examples/resource-mappings.xnl +1 -1
- package/dist/system-skills/resource-dsl/examples/resource-package.xnl +1 -1
- package/dist/system-skills/resource-dsl/examples/skill-capsule-authoring.xnl +1 -1
- package/dist/system-skills/resource-dsl/examples/skill-capsule-devops.xnl +1 -1
- package/dist/system-skills/resource-dsl/examples/skill-capsule-kind-definition.xnl +14 -3
- package/dist/system-skills/resource-dsl/examples/skill-capsule-resource-dsl.xnl +1 -1
- package/dist/system-skills/resource-dsl/examples/skill-capsule-run.xnl +1 -1
- package/dist/system-skills/resource-dsl/index.md +5 -5
- package/dist/system-skills/resource-dsl/language.md +10 -8
- package/dist/system-skills/resource-dsl/manifest.xnl +1 -1
- package/dist/system-skills/resource-dsl/migration.md +6 -3
- package/dist/system-skills/resource-dsl/projections.md +7 -6
- package/dist/system-skills/resource-dsl/skill-capsules.md +8 -7
- package/dist/system-skills/sys-halfcode-resource-dsl.plan.js +84 -59
- package/dist/testing.js +1 -1
- package/package.json +1 -1
- package/dist/index-CDIT65pI.d.ts +0 -192
- package/dist/resource-core-C0Fj-VJA.d.ts +0 -29
package/README.md
CHANGED
|
@@ -34,7 +34,7 @@ const plan: SkillCapsuleDistributionPlan = await planSkillCapsuleDistribution({
|
|
|
34
34
|
await applySkillCapsuleDistributionPlan(plan, { outputRoot })
|
|
35
35
|
```
|
|
36
36
|
|
|
37
|
-
Each capsule identity includes the
|
|
37
|
+
Each capsule source identity includes the resource `envelopeVersion` and exact writer `specVersion`. Skill SemVer remains a separate Skill-owned business field. The planner generates exactly one `references/.halfcode/provenance.json` per capsule with those source facts, the Skill version, the `halfcode.skill-distribution/v1` generator and every payload file digest. The applier reconstructs and validates this manifest before any target mutation.
|
|
38
38
|
|
|
39
39
|
The legacy `compileSkillCapsule` and `compileResourceSkillCapsule` APIs remain available from both the package root and `halfcode-compiler.xnl/skill-capsule`. The subpath also exports the new plan/apply APIs and `SkillCapsuleDependency` type.
|
|
40
40
|
|
|
@@ -65,8 +65,10 @@ import {
|
|
|
65
65
|
} from "halfcode-compiler.xnl/resource-core"
|
|
66
66
|
```
|
|
67
67
|
|
|
68
|
-
`loadResourceTree()` returns an
|
|
68
|
+
`loadResourceTree()` returns an `AuthoredResourceTree`; its content identities come from the same raw-byte read used for fatal UTF-8 decoding and XNL/Markdown parsing. Markdown records preserve every body code unit after the closing frontmatter delimiter and exactly one separator newline as `node.text`/`authoredSpec.text`. `resolveResourceTree()` admits the authored tree against an exact reader profile and publishes a distinct `ResolvedResourceTree` with ordinary receipts for the package manifest, KindDefinition authorities and business resources.
|
|
69
69
|
|
|
70
|
-
Layer order, tombstones, dependency edges, and digest contributions are explicit caller-owned facts. Resource core does not assign semantics to layer names, infer dependencies from arbitrary strings, or own host installation paths.
|
|
70
|
+
Layer order, tombstones, dependency edges, and digest contributions are explicit caller-owned facts. Resource core does not assign semantics to layer names, infer dependencies from arbitrary strings, or own host installation paths. Content-sensitive projection requires authentic `AuthoredResourceTree` inputs from the canonical loader.
|
|
71
|
+
|
|
72
|
+
The immutable `RESOURCE_ENVELOPE_CONTRACT` and derived `RESOURCE_ENVELOPE_FINGERPRINT` are the sole public authority for envelope v1 decoding, authority formats, identity projection, Catalog traversal and authored-spec projection. `CORE_KIND_SUBJECT_OWNERS`, `CORE_KIND_SPEC_REVISIONS` and `CORE_KIND_READER_REGISTRATIONS` provide the compiler-owned exact ResourcePackage and KindDefinition bootstrap registrations; hosts admit them verbatim rather than recreating their fingerprints or readers.
|
|
71
73
|
|
|
72
74
|
`EffectiveResourceRegistry.compositionRevision` binds ordered identity/presence/layer/shadow/tombstone, selected KindDefinition authority identity/contract, and canonical logical-origin facts, but deliberately excludes descriptor/node/metadata bytes; its `revision` field remains an exact compatibility alias. Snapshot construction accepts only the immutable registry returned by the canonical composer, copies/freeze its own origin facts, and rejects inconsistent structural projections. `ResourceDependencySnapshot.registryRevision` additionally binds the revalidated content digests of every effective resource, while `snapshotRevision` binds the selected roots, reachable closure, and participating typed edges. Duplicate contribution keys fail closed, and all canonical ordering uses fixed UTF-16 code-unit order rather than locale-dependent sorting.
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { A as ObjectTargets, B as applicationAssemblyPackage, C as ObjectOperationDefinition, D as ObjectOperationTargetDeclaration, E as ObjectOperationOwnerKind, F as ResourceSource, G as loadApplicationAssembly, H as assertObjectOperationCall, I as SkillCapsuleDependency, K as resolveApplicationAssembly, L as SkillCapsuleResource, M as ResolveApplicationAssemblyOptions, N as ResolvedAssemblyPortBinding, O as ObjectTargetKindDefinition, P as ResourceInclude, R as TextMaterial, S as ObjectOperationContractError, T as ObjectOperationHandler, U as assertObjectOperationCatalog, V as assertExecuteObjectOperationRequest, W as assertObjectOperationDefinition, _ as ObjectInvocationMode, a as AssemblyResource, b as ObjectOperationCatalog, c as BusinessObjectSopResource, d as ExecuteObjectOperationRequest, f as JsonObject, g as ObjectInvocation, h as LoadApplicationAssemblyOptions, i as AssemblyPortBinding, j as PageObjectResource, k as ObjectTargetRef, l as CodeBinding, m as JsonValue, n as ApplicationScope, o as AuthoringModuleDescriptor, p as JsonPrimitive, q as resourceRefToFqn, r as AssemblyPort, s as BusinessObjectResource, t as ApplicationAssembly, u as ContractedCallableResource, v as ObjectOperationBehavior, w as ObjectOperationEffect, x as ObjectOperationConfig, y as ObjectOperationCall, z as TextResource } from "./index-
|
|
1
|
+
import { A as ObjectTargets, B as applicationAssemblyPackage, C as ObjectOperationDefinition, D as ObjectOperationTargetDeclaration, E as ObjectOperationOwnerKind, F as ResourceSource, G as loadApplicationAssembly, H as assertObjectOperationCall, I as SkillCapsuleDependency, K as resolveApplicationAssembly, L as SkillCapsuleResource, M as ResolveApplicationAssemblyOptions, N as ResolvedAssemblyPortBinding, O as ObjectTargetKindDefinition, P as ResourceInclude, R as TextMaterial, S as ObjectOperationContractError, T as ObjectOperationHandler, U as assertObjectOperationCatalog, V as assertExecuteObjectOperationRequest, W as assertObjectOperationDefinition, _ as ObjectInvocationMode, a as AssemblyResource, b as ObjectOperationCatalog, c as BusinessObjectSopResource, d as ExecuteObjectOperationRequest, f as JsonObject, g as ObjectInvocation, h as LoadApplicationAssemblyOptions, i as AssemblyPortBinding, j as PageObjectResource, k as ObjectTargetRef, l as CodeBinding, m as JsonValue, n as ApplicationScope, o as AuthoringModuleDescriptor, p as JsonPrimitive, q as resourceRefToFqn, r as AssemblyPort, s as BusinessObjectResource, t as ApplicationAssembly, u as ContractedCallableResource, v as ObjectOperationBehavior, w as ObjectOperationEffect, x as ObjectOperationConfig, y as ObjectOperationCall, z as TextResource } from "./index-DEikbOFh.js";
|
|
2
2
|
export { type ApplicationAssembly, type ApplicationScope, type AssemblyPort, type AssemblyPortBinding, type AssemblyResource, type AuthoringModuleDescriptor, type BusinessObjectResource, type BusinessObjectSopResource, type CodeBinding, type ContractedCallableResource, type ExecuteObjectOperationRequest, type JsonObject, type JsonPrimitive, type JsonValue, type LoadApplicationAssemblyOptions, type ObjectInvocation, type ObjectInvocationMode, type ObjectOperationBehavior, type ObjectOperationCall, type ObjectOperationCatalog, type ObjectOperationConfig, ObjectOperationContractError, type ObjectOperationDefinition, type ObjectOperationEffect, type ObjectOperationHandler, type ObjectOperationOwnerKind, type ObjectOperationTargetDeclaration, type ObjectTargetKindDefinition, type ObjectTargetRef, type ObjectTargets, type PageObjectResource, type ResolveApplicationAssemblyOptions, type ResolvedAssemblyPortBinding, type ResourceInclude, type ResourceSource, type SkillCapsuleDependency, type SkillCapsuleResource, type TextMaterial, type TextResource, applicationAssemblyPackage, assertExecuteObjectOperationRequest, assertObjectOperationCall, assertObjectOperationCatalog, assertObjectOperationDefinition, loadApplicationAssembly, resolveApplicationAssembly, resourceRefToFqn };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as assertObjectOperationCatalog, c as resolveApplicationAssembly, i as assertObjectOperationCall, l as resourceRefToFqn, n as applicationAssemblyPackage, o as assertObjectOperationDefinition, r as assertExecuteObjectOperationRequest, s as loadApplicationAssembly, t as ObjectOperationContractError } from "./src-
|
|
1
|
+
import { a as assertObjectOperationCatalog, c as resolveApplicationAssembly, i as assertObjectOperationCall, l as resourceRefToFqn, n as applicationAssemblyPackage, o as assertObjectOperationDefinition, r as assertExecuteObjectOperationRequest, s as loadApplicationAssembly, t as ObjectOperationContractError } from "./src-B0Hja_dk.js";
|
|
2
2
|
export { ObjectOperationContractError, applicationAssemblyPackage, assertExecuteObjectOperationRequest, assertObjectOperationCall, assertObjectOperationCatalog, assertObjectOperationDefinition, loadApplicationAssembly, resolveApplicationAssembly, resourceRefToFqn };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { n as ResourceLayerContentIdentityInput } from "./effective-content-identities-
|
|
1
|
+
import { $ as RESOURCE_ENVELOPE_VERSION, Dt as EffectiveResourceRegistry, i as AuthoredResourceTree, o as KindSpecRevisionDescriptor, tt as SpecVersion } from "./index-DboIOEr8.js";
|
|
2
|
+
import { n as ResourceLayerContentIdentityInput } from "./effective-content-identities-drMRhYE2.js";
|
|
3
3
|
import { a as createAuthoringBindings, c as logger, i as RuntimeEffects, l as runWithRuntime, n as AuthoringRuntime, o as currentRuntime, r as Logger, s as invokeEffect, t as AuthoringBindings, u as runtimeAuthoringPackage } from "./index-Dg0imcjf.js";
|
|
4
4
|
//#region ../runtime-authoring/src/resource-authoring.d.ts
|
|
5
5
|
declare const RESOURCE_AUTHORING_SCHEMA_VERSION: "halfcode.resource-authoring/v1";
|
|
@@ -22,7 +22,8 @@ interface ResourceAuthoringProposal {
|
|
|
22
22
|
readonly catalogId: string;
|
|
23
23
|
readonly resourceId: string;
|
|
24
24
|
readonly kind: string;
|
|
25
|
-
readonly
|
|
25
|
+
readonly envelopeVersion: typeof RESOURCE_ENVELOPE_VERSION;
|
|
26
|
+
readonly writerSpecVersion: SpecVersion;
|
|
26
27
|
readonly sourceShape: ResourceAuthoringSourceShape;
|
|
27
28
|
readonly documentUri: ResourceAuthoringDocumentUri;
|
|
28
29
|
readonly authorityText: string;
|
|
@@ -30,7 +31,7 @@ interface ResourceAuthoringProposal {
|
|
|
30
31
|
}
|
|
31
32
|
interface ResourceAuthoringKindDefinition {
|
|
32
33
|
readonly kind: string;
|
|
33
|
-
readonly
|
|
34
|
+
readonly specRevisions: readonly KindSpecRevisionDescriptor[];
|
|
34
35
|
readonly sourceShapes: readonly ResourceAuthoringSourceShape[];
|
|
35
36
|
readonly documentCardinality: "one" | "many";
|
|
36
37
|
}
|
|
@@ -50,7 +51,8 @@ type ResourceAuthoringPlanningConfig = Readonly<Record<never, never>>;
|
|
|
50
51
|
interface ResourceAuthoringInspectedRoot {
|
|
51
52
|
readonly resourceId: string;
|
|
52
53
|
readonly kind: string;
|
|
53
|
-
readonly
|
|
54
|
+
readonly envelopeVersion: string;
|
|
55
|
+
readonly writerSpecVersion: SpecVersion;
|
|
54
56
|
}
|
|
55
57
|
interface ResourceAuthoringAuthorityInspection {
|
|
56
58
|
readonly documentUri: ResourceAuthoringDocumentUri;
|
|
@@ -71,6 +73,7 @@ interface ResourceAuthoringPlan {
|
|
|
71
73
|
readonly schemaVersion: typeof RESOURCE_AUTHORING_SCHEMA_VERSION;
|
|
72
74
|
readonly proposal: ResourceAuthoringProposal;
|
|
73
75
|
readonly kindDefinition: ResourceAuthoringKindDefinition;
|
|
76
|
+
readonly writerSpecRevision: KindSpecRevisionDescriptor;
|
|
74
77
|
readonly catalog: ResourceAuthoringCatalogBinding;
|
|
75
78
|
readonly resources: readonly ResourceAuthoringInspectedRoot[];
|
|
76
79
|
readonly authorityDigest: string;
|
|
@@ -86,7 +89,7 @@ interface ResourceAuthoringRefreshCandidate {
|
|
|
86
89
|
readonly transactionId: string;
|
|
87
90
|
readonly candidateId: string;
|
|
88
91
|
readonly targetLayerId: string;
|
|
89
|
-
readonly tree:
|
|
92
|
+
readonly tree: AuthoredResourceTree;
|
|
90
93
|
readonly registry: EffectiveResourceRegistry;
|
|
91
94
|
readonly layers: readonly ResourceLayerContentIdentityInput[];
|
|
92
95
|
}
|
|
@@ -105,7 +108,8 @@ interface ResourceAuthoringReceipt {
|
|
|
105
108
|
readonly catalogId: string;
|
|
106
109
|
readonly resourceId: string;
|
|
107
110
|
readonly kind: string;
|
|
108
|
-
readonly
|
|
111
|
+
readonly envelopeVersion: typeof RESOURCE_ENVELOPE_VERSION;
|
|
112
|
+
readonly writerSpecVersion: SpecVersion;
|
|
109
113
|
readonly sourceShape: ResourceAuthoringSourceShape;
|
|
110
114
|
readonly documentUri: ResourceAuthoringDocumentUri;
|
|
111
115
|
readonly authorityDigestBefore: string | null;
|
|
@@ -150,7 +154,7 @@ interface ResourceAuthoringRegistryRevisionInput {
|
|
|
150
154
|
readonly registry: EffectiveResourceRegistry;
|
|
151
155
|
readonly layers: readonly ResourceLayerContentIdentityInput[];
|
|
152
156
|
}
|
|
153
|
-
type ResourceAuthoringErrorCode = "RESOURCE_AUTHORING_INPUT_INVALID" | "RESOURCE_AUTHORING_KIND_UNKNOWN" | "
|
|
157
|
+
type ResourceAuthoringErrorCode = "RESOURCE_AUTHORING_INPUT_INVALID" | "RESOURCE_AUTHORING_KIND_UNKNOWN" | "RESOURCE_AUTHORING_WRITER_SPEC_VERSION_UNREGISTERED" | "RESOURCE_AUTHORING_SOURCE_SHAPE_UNSUPPORTED" | "RESOURCE_AUTHORING_CATALOG_UNKNOWN" | "RESOURCE_AUTHORING_CATALOG_MISMATCH" | "RESOURCE_AUTHORING_TARGET_UNSAFE" | "RESOURCE_AUTHORING_EXPECTED_STATE_INVALID" | "RESOURCE_AUTHORING_AUTHORITY_INVALID" | "RESOURCE_AUTHORING_PLAN_FORGED" | "RESOURCE_AUTHORING_CAS_CONFLICT" | "RESOURCE_AUTHORING_PREPARE_INVALID" | "RESOURCE_AUTHORING_REFRESH_INVALID" | "RESOURCE_AUTHORING_COMMIT_INVALID" | "RESOURCE_AUTHORING_ROLLBACK_FAILED";
|
|
154
158
|
declare class ResourceAuthoringError extends Error {
|
|
155
159
|
readonly code: ResourceAuthoringErrorCode;
|
|
156
160
|
readonly cause?: unknown | undefined;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as runWithRuntime, c as ResourceAuthoringError, d as planResourceAuthoring, i as logger, l as applyResourceAuthoring, n as currentRuntime, o as runtimeAuthoringPackage, r as invokeEffect, s as RESOURCE_AUTHORING_SCHEMA_VERSION, t as createAuthoringBindings, u as deriveResourceAuthoringRegistryRevision } from "./src-
|
|
1
|
+
import { a as runWithRuntime, c as ResourceAuthoringError, d as planResourceAuthoring, i as logger, l as applyResourceAuthoring, n as currentRuntime, o as runtimeAuthoringPackage, r as invokeEffect, s as RESOURCE_AUTHORING_SCHEMA_VERSION, t as createAuthoringBindings, u as deriveResourceAuthoringRegistryRevision } from "./src-hrUy4DJ9.js";
|
|
2
2
|
export { RESOURCE_AUTHORING_SCHEMA_VERSION, ResourceAuthoringError, applyResourceAuthoring, createAuthoringBindings, currentRuntime, deriveResourceAuthoringRegistryRevision, invokeEffect, logger, planResourceAuthoring, runWithRuntime, runtimeAuthoringPackage };
|
package/dist/{effective-content-identities-DV5fTr5Q.js → effective-content-identities-CV6XFBZy.js}
RENAMED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { S as compareCodeUnits, _ as effectiveRegistryLayerBindings, b as ResourceCompositionError, f as readonlyMap, h as createResourceContentIdentity, p as isAuthoredResourceTreeAuthentic, v as isEffectiveRegistryAuthentic } from "./src-jggOQtq3.js";
|
|
2
2
|
//#region ../resource-core/src/effective-content-identities.ts
|
|
3
3
|
function resolveEffectiveResourceContentIdentities(input) {
|
|
4
4
|
const diagnostics = [];
|
|
@@ -11,8 +11,8 @@ function resolveEffectiveResourceContentIdentities(input) {
|
|
|
11
11
|
const layer = input.layers[index];
|
|
12
12
|
const binding = bindings[index];
|
|
13
13
|
if (!layer) continue;
|
|
14
|
-
if (!
|
|
15
|
-
diagnostics.push(diagnostic("RESOURCE_CONTENT_IDENTITY_LAYER_UNTRUSTED", layerLocation(index, layer.id), `Layer '${layer.id}' must use an authentic
|
|
14
|
+
if (!isAuthoredResourceTreeAuthentic(layer.tree)) {
|
|
15
|
+
diagnostics.push(diagnostic("RESOURCE_CONTENT_IDENTITY_LAYER_UNTRUSTED", layerLocation(index, layer.id), `Layer '${layer.id}' must use an authentic AuthoredResourceTree returned by loadResourceTree().`));
|
|
16
16
|
continue;
|
|
17
17
|
}
|
|
18
18
|
if (layer.id !== descriptor.id || binding?.id !== descriptor.id) {
|
|
@@ -31,7 +31,7 @@ function resolveEffectiveResourceContentIdentities(input) {
|
|
|
31
31
|
diagnostics.push(diagnostic("RESOURCE_CONTENT_IDENTITY_LAYER_BINDING_MISMATCH", layerLocation(index, layer.id), `Layer '${layer.id}' must use the exact loaded tree composed into the registry.`));
|
|
32
32
|
continue;
|
|
33
33
|
}
|
|
34
|
-
|
|
34
|
+
validateAuthoredIdentityCoverage(layer.tree, layer.id, diagnostics);
|
|
35
35
|
loadedById.set(layer.id, layer.tree);
|
|
36
36
|
}
|
|
37
37
|
const effectiveEntries = [...input.registry.byId.values()].filter((entry) => entry.resource !== void 0).sort((left, right) => compareCodeUnits(left.resourceId, right.resourceId));
|
|
@@ -65,13 +65,13 @@ function resolveEffectiveResourceContentIdentities(input) {
|
|
|
65
65
|
if (diagnostics.length > 0) throw new ResourceCompositionError(stableDiagnostics(diagnostics));
|
|
66
66
|
return readonlyMap(output.sort(([left], [right]) => compareCodeUnits(left, right)));
|
|
67
67
|
}
|
|
68
|
-
function
|
|
68
|
+
function validateAuthoredIdentityCoverage(tree, layerId, diagnostics) {
|
|
69
69
|
const resources = [...tree.registry.byKind.values()].flatMap((records) => [...records]).sort((left, right) => compareCodeUnits(left.resourceId, right.resourceId));
|
|
70
70
|
const resourcesById = new Map(resources.map((resource) => [resource.resourceId, resource]));
|
|
71
71
|
for (const resource of resources) {
|
|
72
72
|
const identity = tree.contentIdentities.get(resource.resourceId);
|
|
73
73
|
if (!identity) {
|
|
74
|
-
diagnostics.push(diagnostic("RESOURCE_CONTENT_IDENTITY_MISSING", layerLocation(void 0, layerId, resource.resourceId), `
|
|
74
|
+
diagnostics.push(diagnostic("RESOURCE_CONTENT_IDENTITY_MISSING", layerLocation(void 0, layerId, resource.resourceId), `Authored resource '${resource.resourceId}' has no authority identity.`));
|
|
75
75
|
continue;
|
|
76
76
|
}
|
|
77
77
|
const normalized = createResourceContentIdentity({
|
|
@@ -79,9 +79,9 @@ function validateLoadedIdentityCoverage(tree, layerId, diagnostics) {
|
|
|
79
79
|
authorityDigest: identity.authorityDigest,
|
|
80
80
|
contributions: identity.contributions
|
|
81
81
|
});
|
|
82
|
-
if (identity.resourceId !== resource.resourceId || identity.contentDigest !== normalized.contentDigest) diagnostics.push(diagnostic("RESOURCE_CONTENT_IDENTITY_INVALID", layerLocation(void 0, layerId, resource.resourceId), `
|
|
82
|
+
if (identity.resourceId !== resource.resourceId || identity.contentDigest !== normalized.contentDigest) diagnostics.push(diagnostic("RESOURCE_CONTENT_IDENTITY_INVALID", layerLocation(void 0, layerId, resource.resourceId), `Authored resource '${resource.resourceId}' has an inconsistent authority identity.`));
|
|
83
83
|
}
|
|
84
|
-
for (const resourceId of tree.contentIdentities.keys()) if (!resourcesById.has(resourceId)) diagnostics.push(diagnostic("RESOURCE_CONTENT_IDENTITY_EXTRA", layerLocation(void 0, layerId, resourceId), `
|
|
84
|
+
for (const resourceId of tree.contentIdentities.keys()) if (!resourcesById.has(resourceId)) diagnostics.push(diagnostic("RESOURCE_CONTENT_IDENTITY_EXTRA", layerLocation(void 0, layerId, resourceId), `Authored tree contains an extra authority identity '${resourceId}'.`));
|
|
85
85
|
}
|
|
86
86
|
function validateEffectiveOrigin(entry, registry, tree, diagnostics) {
|
|
87
87
|
const origin = entry.effectiveOrigin;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Dt as EffectiveResourceRegistry, gt as ResourceContentIdentity, i as AuthoredResourceTree, yt as ResourceDigestContribution } from "./index-DboIOEr8.js";
|
|
2
2
|
//#region ../resource-core/src/effective-content-identities.d.ts
|
|
3
3
|
interface ResourceLayerContentIdentityInput {
|
|
4
4
|
readonly id: string;
|
|
5
|
-
readonly tree:
|
|
5
|
+
readonly tree: AuthoredResourceTree;
|
|
6
6
|
}
|
|
7
7
|
interface ResolveEffectiveResourceContentIdentitiesInput {
|
|
8
8
|
readonly registry: EffectiveResourceRegistry;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { t as ApplicationAssembly } from "./index-
|
|
2
|
-
import { t as ResourceRegistry } from "./index-
|
|
1
|
+
import { t as ApplicationAssembly } from "./index-DEikbOFh.js";
|
|
2
|
+
import { t as ResourceRegistry } from "./index-DI3WtuXq.js";
|
|
3
3
|
//#region ../compiler-skill/src/index.d.ts
|
|
4
4
|
interface SkillDescriptor {
|
|
5
5
|
name: string;
|
|
@@ -30,7 +30,8 @@ interface CompileResourceSkillCapsuleInput {
|
|
|
30
30
|
interface SkillCapsuleIdentity {
|
|
31
31
|
readonly fqn: string;
|
|
32
32
|
readonly name: string;
|
|
33
|
-
readonly
|
|
33
|
+
readonly envelopeVersion: string;
|
|
34
|
+
readonly specVersion: number;
|
|
34
35
|
readonly version: string;
|
|
35
36
|
}
|
|
36
37
|
type SkillCapsuleContentDigest = `sha256:${string}`;
|
|
@@ -39,7 +40,8 @@ interface SkillCapsuleProvenanceManifest {
|
|
|
39
40
|
readonly generatedBy: "halfcode.skill-distribution/v1";
|
|
40
41
|
readonly source: {
|
|
41
42
|
readonly fqn: string;
|
|
42
|
-
readonly
|
|
43
|
+
readonly envelopeVersion: string;
|
|
44
|
+
readonly specVersion: number;
|
|
43
45
|
readonly version: string;
|
|
44
46
|
};
|
|
45
47
|
readonly payloadFiles: readonly {
|
|
@@ -49,7 +51,8 @@ interface SkillCapsuleProvenanceManifest {
|
|
|
49
51
|
}
|
|
50
52
|
interface PlannedSkillFile {
|
|
51
53
|
readonly skillFqn: string;
|
|
52
|
-
readonly
|
|
54
|
+
readonly skillEnvelopeVersion: string;
|
|
55
|
+
readonly skillSpecVersion: number;
|
|
53
56
|
readonly skillVersion: string;
|
|
54
57
|
readonly capsuleRelativePath: string;
|
|
55
58
|
readonly targetRelativePath: string;
|
|
@@ -106,7 +109,8 @@ declare function skillCapsuleDistributionProjection(plan: SkillCapsuleDistributi
|
|
|
106
109
|
files: {
|
|
107
110
|
contentBase64: string;
|
|
108
111
|
skillFqn: string;
|
|
109
|
-
|
|
112
|
+
skillEnvelopeVersion: string;
|
|
113
|
+
skillSpecVersion: number;
|
|
110
114
|
skillVersion: string;
|
|
111
115
|
capsuleRelativePath: string;
|
|
112
116
|
targetRelativePath: string;
|
|
@@ -170,7 +170,8 @@ interface SkillCapsuleResource {
|
|
|
170
170
|
kind: "SkillCapsule";
|
|
171
171
|
fqn: string;
|
|
172
172
|
name?: string;
|
|
173
|
-
|
|
173
|
+
envelopeVersion: string;
|
|
174
|
+
specVersion: number;
|
|
174
175
|
version: string;
|
|
175
176
|
description: string;
|
|
176
177
|
metadata: Record<string, unknown>;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { f as ResourceDescriptor } from "./index-DboIOEr8.js";
|
|
2
2
|
//#region ../resource-projection/src/index.d.ts
|
|
3
3
|
interface ResourceRegistry {
|
|
4
4
|
readonly byKind: ReadonlyMap<string, readonly ResourceDescriptor[]>;
|