@telorun/analyzer 0.59.0 → 0.61.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/analyzer.d.ts +9 -2
- package/dist/analyzer.d.ts.map +1 -1
- package/dist/analyzer.js +38 -10
- package/dist/artifact-layer-index.d.ts +13 -5
- package/dist/artifact-layer-index.d.ts.map +1 -1
- package/dist/artifact-layer-index.js +37 -13
- package/dist/artifact-selector.d.ts +10 -3
- package/dist/artifact-selector.d.ts.map +1 -1
- package/dist/artifact-selector.js +10 -1
- package/dist/builtins.d.ts.map +1 -1
- package/dist/builtins.js +44 -43
- package/dist/cel-environment.d.ts.map +1 -1
- package/dist/cel-environment.js +35 -0
- package/dist/flatten-for-analyzer.d.ts +4 -0
- package/dist/flatten-for-analyzer.d.ts.map +1 -1
- package/dist/flatten-for-analyzer.js +8 -0
- package/dist/index.d.ts +7 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +9 -2
- package/dist/kernel-globals.d.ts +1 -1
- package/dist/kernel-globals.d.ts.map +1 -1
- package/dist/kernel-globals.js +15 -1
- package/dist/manifest-schemas.d.ts +407 -0
- package/dist/manifest-schemas.d.ts.map +1 -0
- package/dist/manifest-schemas.js +396 -0
- package/dist/module-file-claims.d.ts +13 -0
- package/dist/module-file-claims.d.ts.map +1 -1
- package/dist/module-file-claims.js +26 -2
- package/dist/module-library.d.ts +97 -0
- package/dist/module-library.d.ts.map +1 -0
- package/dist/module-library.js +162 -0
- package/dist/module-metadata-scope.d.ts +44 -0
- package/dist/module-metadata-scope.d.ts.map +1 -0
- package/dist/module-metadata-scope.js +82 -0
- package/dist/parse-loaded-file.d.ts.map +1 -1
- package/dist/parse-loaded-file.js +16 -0
- package/dist/release/bump-level.d.ts +46 -0
- package/dist/release/bump-level.d.ts.map +1 -0
- package/dist/release/bump-level.js +80 -0
- package/dist/release/changelog.d.ts +36 -0
- package/dist/release/changelog.d.ts.map +1 -0
- package/dist/release/changelog.js +53 -0
- package/dist/release/fragment.d.ts +48 -0
- package/dist/release/fragment.d.ts.map +1 -0
- package/dist/release/fragment.js +84 -0
- package/dist/release/index.d.ts +26 -0
- package/dist/release/index.d.ts.map +1 -0
- package/dist/release/index.js +18 -0
- package/dist/release/ledger.d.ts +53 -0
- package/dist/release/ledger.d.ts.map +1 -0
- package/dist/release/ledger.js +109 -0
- package/dist/release/payload-digest.d.ts +63 -0
- package/dist/release/payload-digest.d.ts.map +1 -0
- package/dist/release/payload-digest.js +65 -0
- package/dist/release/release-plan.d.ts +128 -0
- package/dist/release/release-plan.d.ts.map +1 -0
- package/dist/release/release-plan.js +277 -0
- package/dist/release/version-stamp.d.ts +50 -0
- package/dist/release/version-stamp.d.ts.map +1 -0
- package/dist/release/version-stamp.js +119 -0
- package/dist/release/workspace-config.d.ts +41 -0
- package/dist/release/workspace-config.d.ts.map +1 -0
- package/dist/release/workspace-config.js +60 -0
- package/dist/schema-compat.js +2 -1
- package/dist/validate-module-artifact.d.ts.map +1 -1
- package/dist/validate-module-artifact.js +53 -1
- package/dist/validate-step-inputs.d.ts +1 -1
- package/dist/validate-step-inputs.d.ts.map +1 -1
- package/dist/validate-step-inputs.js +99 -8
- package/package.json +3 -3
- package/src/analyzer.ts +41 -10
- package/src/artifact-layer-index.ts +47 -14
- package/src/artifact-selector.ts +15 -4
- package/src/builtins.ts +45 -43
- package/src/cel-environment.ts +37 -0
- package/src/flatten-for-analyzer.ts +12 -0
- package/src/index.ts +19 -2
- package/src/kernel-globals.ts +23 -1
- package/src/manifest-schemas.ts +408 -0
- package/src/module-file-claims.ts +42 -2
- package/src/module-library.ts +208 -0
- package/src/module-metadata-scope.ts +88 -0
- package/src/parse-loaded-file.ts +16 -0
- package/src/release/bump-level.ts +95 -0
- package/src/release/changelog.ts +62 -0
- package/src/release/fragment.ts +130 -0
- package/src/release/index.ts +66 -0
- package/src/release/ledger.ts +142 -0
- package/src/release/payload-digest.ts +83 -0
- package/src/release/release-plan.ts +392 -0
- package/src/release/version-stamp.ts +142 -0
- package/src/release/workspace-config.ts +81 -0
- package/src/schema-compat.ts +1 -1
- package/src/validate-module-artifact.ts +56 -0
- package/src/validate-step-inputs.ts +109 -9
package/dist/analyzer.d.ts
CHANGED
|
@@ -27,8 +27,15 @@ export declare function containerOf(path: string): string;
|
|
|
27
27
|
* Non-refs and unresolved refs pass through unchanged. */
|
|
28
28
|
export declare function resolveLocalRef(schema: Record<string, any> | undefined, root: Record<string, any>): Record<string, any> | undefined;
|
|
29
29
|
/** Gather property schemas from a (possibly variant-bearing) object schema:
|
|
30
|
-
* top-level `properties` plus every `oneOf` / `anyOf` / `allOf` branch.
|
|
31
|
-
|
|
30
|
+
* top-level `properties` plus every `oneOf` / `anyOf` / `allOf` branch.
|
|
31
|
+
*
|
|
32
|
+
* Each branch is resolved through {@link resolveLocalRef} first, so a branch
|
|
33
|
+
* that points at a shared shape — a `oneOf` arm that IS the kernel's dispatch
|
|
34
|
+
* site — contributes its properties like an inline one. Without that, pointing a
|
|
35
|
+
* composer at a shared shape would silently empty every role-driven lookup that
|
|
36
|
+
* reads this (the inputs slot, the retry policy, the eval paths), which is a
|
|
37
|
+
* failure with no diagnostic attached to it. */
|
|
38
|
+
export declare function gatherPropertySchemas(schema: Record<string, any>, root?: Record<string, any>): Array<[string, Record<string, any>]>;
|
|
32
39
|
/**
|
|
33
40
|
* Generic, role-driven walk over an `x-telo-step-context` step array. Calls
|
|
34
41
|
* `visit(step, stepPath)` for every step — top-level and nested through the
|
package/dist/analyzer.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"analyzer.d.ts","sourceRoot":"","sources":["../src/analyzer.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,kBAAkB,EAAE,gBAAgB,EAAE,MAAM,cAAc,CAAC;AAWzE,OAAO,EACL,aAAa,EAEb,KAAK,YAAY,EAElB,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EAAE,gBAAgB,EAAE,M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E,qBAA0B;IAI/C;;;;;;;;;;;;;;OAcG;IACH,OAAO,CACL,SAAS,EAAE,gBAAgB,EAAE,EAC7B,OAAO,CAAC,EAAE,eAAe,EACzB,QAAQ,CAAC,EAAE,gBAAgB,EAC3B,eAAe,CAAC,EAAE,eAAe,GAChC,kBAAkB,EAAE;IAq7CvB,aAAa,CACX,SAAS,EAAE,gBAAgB,EAAE,EAC7B,OAAO,CAAC,EAAE,eAAe,EACzB,QAAQ,CAAC,EAAE,gBAAgB,EAC3B,eAAe,CAAC,EAAE,eAAe,GAChC,kBAAkB,EAAE;IAMvB,SAAS,CACP,SAAS,EAAE,gBAAgB,EAAE,EAC7B,QAAQ,EAAE,gBAAgB,EAI1B,kBAAkB,CAAC,EAAE,gBAAgB,EAAE,GACtC,gBAAgB,EAAE;IAyBrB,OAAO,CACL,SAAS,EAAE,gBAAgB,EAAE,EAC7B,QAAQ,EAAE,gBAAgB,GACzB;QAAE,WAAW,EAAE,kBAAkB,EAAE,CAAC;QAAC,KAAK,EAAE,MAAM,EAAE,GAAG,IAAI,CAAC;QAAC,UAAU,EAAE,MAAM,GAAG,IAAI,CAAA;KAAE;CAsB5F"}
|
package/dist/analyzer.js
CHANGED
|
@@ -17,6 +17,7 @@ import { REF_VALIDATION_SKIP_KINDS } from "./system-kinds.js";
|
|
|
17
17
|
import { resolveRefSentinels } from "./resolve-ref-sentinels.js";
|
|
18
18
|
import { resolveSchemaRefKinds } from "./resolve-schema-ref-kinds.js";
|
|
19
19
|
import { runZoneAnalysis } from "./resolve-zone-requirements.js";
|
|
20
|
+
import { MANIFEST_SCHEMA_URI, ManifestRootSchema } from "./manifest-schemas.js";
|
|
20
21
|
import { validateZoneSlotDeclarations } from "./validate-zone-slots.js";
|
|
21
22
|
import { validateDynamicSelectors, validateRefSlotDeclarations, } from "./validate-ref-slots.js";
|
|
22
23
|
import { validateValueTypeSlots, } from "./validate-value-type-slots.js";
|
|
@@ -201,23 +202,48 @@ export function resolveLocalRef(schema, root) {
|
|
|
201
202
|
if (resolved && typeof resolved === "object")
|
|
202
203
|
return resolved;
|
|
203
204
|
}
|
|
205
|
+
// A kernel-owned structural fragment (`telo://manifest#/$defs/InvokeStep`).
|
|
206
|
+
// Resolved HERE rather than by each walker: this is the one chokepoint every
|
|
207
|
+
// structural walk already goes through — the step-array walks, the call graph,
|
|
208
|
+
// the zone projection, the eval-path collector — so a composer that points at a
|
|
209
|
+
// shared shape stays legible to all of them at once. Nothing is inlined into
|
|
210
|
+
// the stored schema, which keeps validator-cache identity stable and matches
|
|
211
|
+
// what `resolveSchemaTypeRefs` does for a named user type.
|
|
212
|
+
if (typeof ref === "string" && ref.startsWith(BUILTIN_FRAGMENT_PREFIX)) {
|
|
213
|
+
const defName = ref.slice(BUILTIN_FRAGMENT_PREFIX.length);
|
|
214
|
+
const resolved = ManifestRootSchema.$defs[defName];
|
|
215
|
+
if (resolved && typeof resolved === "object")
|
|
216
|
+
return resolved;
|
|
217
|
+
}
|
|
204
218
|
return schema;
|
|
205
219
|
}
|
|
220
|
+
const BUILTIN_FRAGMENT_PREFIX = `${MANIFEST_SCHEMA_URI}#/$defs/`;
|
|
206
221
|
/** Gather property schemas from a (possibly variant-bearing) object schema:
|
|
207
|
-
* top-level `properties` plus every `oneOf` / `anyOf` / `allOf` branch.
|
|
208
|
-
|
|
222
|
+
* top-level `properties` plus every `oneOf` / `anyOf` / `allOf` branch.
|
|
223
|
+
*
|
|
224
|
+
* Each branch is resolved through {@link resolveLocalRef} first, so a branch
|
|
225
|
+
* that points at a shared shape — a `oneOf` arm that IS the kernel's dispatch
|
|
226
|
+
* site — contributes its properties like an inline one. Without that, pointing a
|
|
227
|
+
* composer at a shared shape would silently empty every role-driven lookup that
|
|
228
|
+
* reads this (the inputs slot, the retry policy, the eval paths), which is a
|
|
229
|
+
* failure with no diagnostic attached to it. */
|
|
230
|
+
export function gatherPropertySchemas(schema, root) {
|
|
209
231
|
const out = [];
|
|
210
|
-
|
|
211
|
-
|
|
232
|
+
const base = resolveLocalRef(schema, root ?? schema) ?? schema;
|
|
233
|
+
if (base.properties && typeof base.properties === "object") {
|
|
234
|
+
for (const [k, v] of Object.entries(base.properties)) {
|
|
212
235
|
out.push([k, v]);
|
|
213
236
|
}
|
|
214
237
|
}
|
|
215
238
|
for (const variantKey of ["oneOf", "anyOf", "allOf"]) {
|
|
216
|
-
const arr =
|
|
239
|
+
const arr = base[variantKey];
|
|
217
240
|
if (!Array.isArray(arr))
|
|
218
241
|
continue;
|
|
219
|
-
for (const
|
|
220
|
-
if (
|
|
242
|
+
for (const raw of arr) {
|
|
243
|
+
if (!raw || typeof raw !== "object")
|
|
244
|
+
continue;
|
|
245
|
+
const variant = resolveLocalRef(raw, root ?? schema) ?? raw;
|
|
246
|
+
if (variant.properties) {
|
|
221
247
|
for (const [k, v] of Object.entries(variant.properties)) {
|
|
222
248
|
out.push([k, v]);
|
|
223
249
|
}
|
|
@@ -1681,9 +1707,11 @@ export class StaticAnalyzer {
|
|
|
1681
1707
|
severity: DiagnosticSeverity.Error,
|
|
1682
1708
|
code: issue.code ?? "CONTRACT_INPUTS_MISMATCH",
|
|
1683
1709
|
source: SOURCE,
|
|
1684
|
-
message: issue.code
|
|
1685
|
-
? `${m.kind}/${stepName}:
|
|
1686
|
-
:
|
|
1710
|
+
message: issue.code === "LIVE_VALUE_RETRIED"
|
|
1711
|
+
? `${m.kind}/${stepName}: at '${issue.path}', ${issue.message}`
|
|
1712
|
+
: issue.code
|
|
1713
|
+
? `${m.kind}/${stepName}: inputs at '${issue.path}' flow into ${issue.targetLabel} with disagreeing type arguments: ${issue.message}`
|
|
1714
|
+
: `${m.kind}/${stepName}: inputs at '${issue.path}' do not satisfy ${issue.targetLabel}'s declared inputType: ${issue.message}`,
|
|
1687
1715
|
data: {
|
|
1688
1716
|
resource: { kind: m.kind, name: stepName ?? "" },
|
|
1689
1717
|
filePath: stepFile,
|
|
@@ -30,7 +30,7 @@
|
|
|
30
30
|
import { type ArtifactSelector, type LayerRole, type PlatformTarget } from "./artifact-selector.js";
|
|
31
31
|
export interface ArtifactLayer {
|
|
32
32
|
role: LayerRole;
|
|
33
|
-
/** Present on `controller`
|
|
33
|
+
/** Present on the code-bearing roles (`controller`, `library`) only. */
|
|
34
34
|
selector?: ArtifactSelector;
|
|
35
35
|
/** OCI blob digest — addresses the layer and verifies the transfer. */
|
|
36
36
|
blob: string;
|
|
@@ -48,8 +48,16 @@ export declare class LayerIndexError extends Error {
|
|
|
48
48
|
*/
|
|
49
49
|
export declare function parseLayerIndex(value: unknown, describe?: string): ArtifactLayer[];
|
|
50
50
|
/** The singleton layer for a role, or undefined when the artifact has none. */
|
|
51
|
-
export declare function singletonLayer(layers: readonly ArtifactLayer[], role: Exclude<LayerRole, "controller">): ArtifactLayer | undefined;
|
|
52
|
-
/**
|
|
53
|
-
*
|
|
54
|
-
|
|
51
|
+
export declare function singletonLayer(layers: readonly ArtifactLayer[], role: Exclude<LayerRole, "controller" | "library">): ArtifactLayer | undefined;
|
|
52
|
+
/** The layer of one code role carrying exactly `selector`, or undefined.
|
|
53
|
+
*
|
|
54
|
+
* By exact key rather than by re-matching a host: the candidate being resolved
|
|
55
|
+
* already *is* one selector, and it is by construction the key of the layer
|
|
56
|
+
* that carries it. */
|
|
57
|
+
export declare function codeLayerFor(layers: readonly ArtifactLayer[], role: Extract<LayerRole, "controller" | "library">, selector: ArtifactSelector): ArtifactLayer | undefined;
|
|
58
|
+
/** Every code layer — controller and library alike — matching `target`, in
|
|
59
|
+
* declaration order. Used by `telo install` to warm a cache for one platform:
|
|
60
|
+
* a library layer is as much a prerequisite of an offline run as the controller
|
|
61
|
+
* layer that imports it. */
|
|
62
|
+
export declare function matchCodeLayers(layers: readonly ArtifactLayer[], target: PlatformTarget): ArtifactLayer[];
|
|
55
63
|
//# sourceMappingURL=artifact-layer-index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"artifact-layer-index.d.ts","sourceRoot":"","sources":["../src/artifact-layer-index.ts"],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|
|
|
27
27
|
* Browser-safe: `telo check`, the editor and the hub validate an index through
|
|
28
28
|
* this module; only the kernel fetches and extracts.
|
|
29
29
|
*/
|
|
30
|
-
import { isLayerRole, normalizeSelector, selectorKey, selectorMatches, } from "./artifact-selector.js";
|
|
30
|
+
import { LAYER_ROLES, isLayerRole, normalizeSelector, roleCarriesSelector, selectorKey, selectorMatches, } from "./artifact-selector.js";
|
|
31
31
|
/** OCI content digest: `sha256:` + 64 lowercase hex. */
|
|
32
32
|
const BLOB_DIGEST = /^sha256:[0-9a-f]{64}$/;
|
|
33
33
|
/** Telo content digest: `sha256-` + unpadded base64url of 32 bytes. */
|
|
@@ -69,21 +69,32 @@ export function parseLayerIndex(value, describe = "layers") {
|
|
|
69
69
|
throw new LayerIndexError(`${where}: expected an object.`);
|
|
70
70
|
}
|
|
71
71
|
const entry = raw;
|
|
72
|
-
if (
|
|
73
|
-
throw new LayerIndexError(`${where}: role must be one of
|
|
74
|
-
|
|
72
|
+
if (typeof entry.role !== "string" || entry.role === "") {
|
|
73
|
+
throw new LayerIndexError(`${where}: role is required and must be one of ${LAYER_ROLES.map((r) => `'${r}'`).join(", ")}; ` +
|
|
74
|
+
`got ${entry.role === undefined ? "nothing" : `'${String(entry.role)}'`}.`);
|
|
75
75
|
}
|
|
76
|
+
// A role this runtime does not know is SKIPPED, never rejected. Roles are
|
|
77
|
+
// added over time, and a runtime that cannot name one cannot need it — while
|
|
78
|
+
// throwing would make the whole manifest unreadable, so a module gaining a
|
|
79
|
+
// layer for a newer runtime would stop loading on an older one entirely
|
|
80
|
+
// rather than merely lacking that layer. The error stays for a structurally
|
|
81
|
+
// invalid entry, which is a malformed index rather than a newer one.
|
|
82
|
+
if (!isLayerRole(entry.role))
|
|
83
|
+
return;
|
|
76
84
|
const role = entry.role;
|
|
77
85
|
let selector;
|
|
78
|
-
if (role
|
|
86
|
+
if (roleCarriesSelector(role)) {
|
|
79
87
|
if (entry.selector === undefined) {
|
|
80
|
-
throw new LayerIndexError(`${where}: a
|
|
88
|
+
throw new LayerIndexError(`${where}: a ${role} layer must declare a selector.`);
|
|
81
89
|
}
|
|
82
90
|
selector = normalizeSelector(entry.selector, where);
|
|
83
|
-
|
|
91
|
+
// Scoped by role: a module's `js` controller layer and its `js` library
|
|
92
|
+
// layer are different layers with the same selector, and only a collision
|
|
93
|
+
// *within* one role means two layers claim one address.
|
|
94
|
+
const key = `${role}\0${selectorKey(selector)}`;
|
|
84
95
|
if (seenSelectors.has(key)) {
|
|
85
|
-
throw new LayerIndexError(`${where}: a second
|
|
86
|
-
`Each selector addresses exactly one layer.`);
|
|
96
|
+
throw new LayerIndexError(`${where}: a second ${role} layer claims the selector ${selectorKey(selector)}. ` +
|
|
97
|
+
`Each selector addresses exactly one layer of a role.`);
|
|
87
98
|
}
|
|
88
99
|
seenSelectors.add(key);
|
|
89
100
|
}
|
|
@@ -109,8 +120,21 @@ export function parseLayerIndex(value, describe = "layers") {
|
|
|
109
120
|
export function singletonLayer(layers, role) {
|
|
110
121
|
return layers.find((l) => l.role === role);
|
|
111
122
|
}
|
|
112
|
-
/**
|
|
113
|
-
*
|
|
114
|
-
|
|
115
|
-
|
|
123
|
+
/** The layer of one code role carrying exactly `selector`, or undefined.
|
|
124
|
+
*
|
|
125
|
+
* By exact key rather than by re-matching a host: the candidate being resolved
|
|
126
|
+
* already *is* one selector, and it is by construction the key of the layer
|
|
127
|
+
* that carries it. */
|
|
128
|
+
export function codeLayerFor(layers, role, selector) {
|
|
129
|
+
const key = selectorKey(selector);
|
|
130
|
+
return layers.find((l) => l.role === role && l.selector !== undefined && selectorKey(l.selector) === key);
|
|
131
|
+
}
|
|
132
|
+
/** Every code layer — controller and library alike — matching `target`, in
|
|
133
|
+
* declaration order. Used by `telo install` to warm a cache for one platform:
|
|
134
|
+
* a library layer is as much a prerequisite of an offline run as the controller
|
|
135
|
+
* layer that imports it. */
|
|
136
|
+
export function matchCodeLayers(layers, target) {
|
|
137
|
+
return layers.filter((l) => (l.role === "controller" || l.role === "library") &&
|
|
138
|
+
l.selector !== undefined &&
|
|
139
|
+
selectorMatches(l.selector, target));
|
|
116
140
|
}
|
|
@@ -24,11 +24,18 @@
|
|
|
24
24
|
* canonical OCI/GOOS names at the kernel boundary, since these values are
|
|
25
25
|
* published into OCI descriptors.
|
|
26
26
|
*/
|
|
27
|
-
/** The role a layer plays in a module artifact. `controller`
|
|
28
|
-
* selector; `assets` and `common` are singletons and carry none. */
|
|
29
|
-
export type LayerRole = "controller" | "assets" | "common";
|
|
27
|
+
/** The role a layer plays in a module artifact. `controller` and `library` layers
|
|
28
|
+
* carry a selector; `assets` and `common` are singletons and carry none. */
|
|
29
|
+
export type LayerRole = "controller" | "library" | "assets" | "common";
|
|
30
30
|
export declare const LAYER_ROLES: readonly LayerRole[];
|
|
31
31
|
export declare function isLayerRole(value: unknown): value is LayerRole;
|
|
32
|
+
/** The roles that hold executable code, and are therefore per format rather than
|
|
33
|
+
* singletons. A `library` layer is per selector for the same reason a
|
|
34
|
+
* `controller` layer is: a module's JS entry point and its future Rust one are
|
|
35
|
+
* different files, and a consumer resolves the one its own runtime can import.
|
|
36
|
+
* A singleton would be wrong the moment a second runtime ships. */
|
|
37
|
+
export declare const CODE_LAYER_ROLES: readonly LayerRole[];
|
|
38
|
+
export declare function roleCarriesSelector(role: LayerRole): boolean;
|
|
32
39
|
/** The platform axes, in canonical order. Not a closed vocabulary of *values* —
|
|
33
40
|
* new architectures appear without a Telo release — only of axis names. */
|
|
34
41
|
export declare const PLATFORM_AXES: readonly ["os", "arch", "libc"];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"artifact-selector.d.ts","sourceRoot":"","sources":["../src/artifact-selector.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AAEH;
|
|
1
|
+
{"version":3,"file":"artifact-selector.d.ts","sourceRoot":"","sources":["../src/artifact-selector.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;G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OAAO,EACd,QAAQ,SAAmB,GAC1B,gBAAgB,CAelB;AAED;;;;;GAKG;AACH,wBAAgB,WAAW,CAAC,QAAQ,EAAE,gBAAgB,GAAG,MAAM,CAO9D;AAED,iFAAiF;AACjF,wBAAgB,gBAAgB,CAAC,QAAQ,EAAE,gBAAgB,GAAG,MAAM,CAKnE;AAED;;;;;GAKG;AACH,wBAAgB,eAAe,CAAC,QAAQ,EAAE,gBAAgB,EAAE,MAAM,EAAE,cAAc,GAAG,OAAO,CAQ3F"}
|
|
@@ -24,10 +24,19 @@
|
|
|
24
24
|
* canonical OCI/GOOS names at the kernel boundary, since these values are
|
|
25
25
|
* published into OCI descriptors.
|
|
26
26
|
*/
|
|
27
|
-
export const LAYER_ROLES = ["controller", "assets", "common"];
|
|
27
|
+
export const LAYER_ROLES = ["controller", "library", "assets", "common"];
|
|
28
28
|
export function isLayerRole(value) {
|
|
29
29
|
return typeof value === "string" && LAYER_ROLES.includes(value);
|
|
30
30
|
}
|
|
31
|
+
/** The roles that hold executable code, and are therefore per format rather than
|
|
32
|
+
* singletons. A `library` layer is per selector for the same reason a
|
|
33
|
+
* `controller` layer is: a module's JS entry point and its future Rust one are
|
|
34
|
+
* different files, and a consumer resolves the one its own runtime can import.
|
|
35
|
+
* A singleton would be wrong the moment a second runtime ships. */
|
|
36
|
+
export const CODE_LAYER_ROLES = ["controller", "library"];
|
|
37
|
+
export function roleCarriesSelector(role) {
|
|
38
|
+
return CODE_LAYER_ROLES.includes(role);
|
|
39
|
+
}
|
|
31
40
|
/** The platform axes, in canonical order. Not a closed vocabulary of *values* —
|
|
32
41
|
* new architectures appear without a Telo release — only of axis names. */
|
|
33
42
|
export const PLATFORM_AXES = ["os", "arch", "libc"];
|
package/dist/builtins.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"builtins.d.ts","sourceRoot":"","sources":["../src/builtins.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"builtins.d.ts","sourceRoot":"","sources":["../src/builtins.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,cAAc,CAAC;AAwLvD,eAAO,MAAM,eAAe,EAAE,kBAAkB,EA2rB/C,CAAC"}
|
package/dist/builtins.js
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { manifestFragment } from "./manifest-schemas.js";
|
|
1
2
|
import { OBSERVED_STATE_SCHEMA } from "./validate-observed-state.js";
|
|
2
3
|
/** Descriptive provenance a module declares about itself, shared by
|
|
3
4
|
* `Telo.Application` and `Telo.Library`.
|
|
@@ -28,6 +29,32 @@ const ASSETS_FILES_SCHEMA = {
|
|
|
28
29
|
type: "array",
|
|
29
30
|
items: { type: "string" },
|
|
30
31
|
};
|
|
32
|
+
/** `exports.code` — the entry point a sibling module's controller bundle resolves
|
|
33
|
+
* this library's bare specifier to, one per format.
|
|
34
|
+
*
|
|
35
|
+
* Data rather than a package URL: `controllers:` needs a PURL because it can name
|
|
36
|
+
* an ecosystem fetch (`pkg:npm`, `pkg:cargo`), while this always names a file the
|
|
37
|
+
* module already ships, so the type/namespace segments would be constant noise —
|
|
38
|
+
* and a query string is one opaque box to the visual editor. `format` plus the
|
|
39
|
+
* platform axes build the same `ArtifactSelector` a controller candidate does.
|
|
40
|
+
* Semantics and diagnostics live in `analyzer/nodejs/src/module-library.ts`. */
|
|
41
|
+
const LIBRARY_CANDIDATES_SCHEMA = {
|
|
42
|
+
type: "array",
|
|
43
|
+
items: {
|
|
44
|
+
type: "object",
|
|
45
|
+
required: ["specifier", "format", "path"],
|
|
46
|
+
properties: {
|
|
47
|
+
specifier: { type: "string" },
|
|
48
|
+
format: { type: "string" },
|
|
49
|
+
path: { type: "string" },
|
|
50
|
+
source: { type: "string" },
|
|
51
|
+
os: { type: "string" },
|
|
52
|
+
arch: { type: "string" },
|
|
53
|
+
libc: { type: "string" },
|
|
54
|
+
},
|
|
55
|
+
additionalProperties: false,
|
|
56
|
+
},
|
|
57
|
+
};
|
|
31
58
|
/** The published layer index, written by `telo publish` (never hand-authored).
|
|
32
59
|
* One entry per layer except the manifest layer, which cannot list its own hash
|
|
33
60
|
* inside itself and is pinned by the importer's `#sha256-...` instead. Shape and
|
|
@@ -39,7 +66,7 @@ const LAYER_INDEX_SCHEMA = {
|
|
|
39
66
|
type: "object",
|
|
40
67
|
required: ["role", "blob", "integrity"],
|
|
41
68
|
properties: {
|
|
42
|
-
role: { type: "string", enum: ["controller", "assets", "common"] },
|
|
69
|
+
role: { type: "string", enum: ["controller", "library", "assets", "common"] },
|
|
43
70
|
selector: {
|
|
44
71
|
type: "object",
|
|
45
72
|
required: ["format"],
|
|
@@ -606,48 +633,21 @@ export const KERNEL_BUILTINS = [
|
|
|
606
633
|
},
|
|
607
634
|
additionalProperties: false,
|
|
608
635
|
},
|
|
609
|
-
// Inline flat invoke step
|
|
610
|
-
// with
|
|
611
|
-
//
|
|
612
|
-
//
|
|
613
|
-
//
|
|
614
|
-
//
|
|
615
|
-
//
|
|
616
|
-
//
|
|
617
|
-
//
|
|
618
|
-
|
|
619
|
-
|
|
620
|
-
|
|
621
|
-
|
|
622
|
-
|
|
623
|
-
|
|
624
|
-
"x-telo-topology-role": "invoke",
|
|
625
|
-
"x-telo-ref": {
|
|
626
|
-
kind: "Telo.Executable",
|
|
627
|
-
use: "call",
|
|
628
|
-
inputs: "/inputs",
|
|
629
|
-
},
|
|
630
|
-
type: "object",
|
|
631
|
-
required: ["kind", "name"],
|
|
632
|
-
properties: {
|
|
633
|
-
kind: { type: "string" },
|
|
634
|
-
name: { type: "string" },
|
|
635
|
-
},
|
|
636
|
-
additionalProperties: true,
|
|
637
|
-
},
|
|
638
|
-
inputs: {
|
|
639
|
-
// Same annotation Run.Sequence steps carry: it is what makes
|
|
640
|
-
// a boot target's inputs visible to the call-site contract
|
|
641
|
-
// check and to the wiring rule. Without it the kernel would
|
|
642
|
-
// validate these at dispatch and nothing before it.
|
|
643
|
-
"x-telo-topology-role": "inputs",
|
|
644
|
-
type: "object",
|
|
645
|
-
additionalProperties: true,
|
|
646
|
-
},
|
|
647
|
-
when: { type: "string" },
|
|
648
|
-
},
|
|
649
|
-
additionalProperties: false,
|
|
650
|
-
},
|
|
636
|
+
// Inline flat invoke step, discriminated by the `invoke` key —
|
|
637
|
+
// THE dispatch site, shared with every `Run` step array rather
|
|
638
|
+
// than restated here. Restating it is what made `retry:` a schema
|
|
639
|
+
// error at boot while working one line away in a sequence: not a
|
|
640
|
+
// decision about boot, just a copy that never grew the field.
|
|
641
|
+
// Control flow (if/while/switch/try) is still not available here —
|
|
642
|
+
// reach for Run.Sequence.
|
|
643
|
+
// An expanded, stamped COPY. `builtins.ts` is not a manifest, so it
|
|
644
|
+
// never passes through the loader's expansion — embedding the
|
|
645
|
+
// fragment object itself would leave the nested `retry` as an
|
|
646
|
+
// unresolved `$ref` with no `x-telo-fragment` stamp, which is
|
|
647
|
+
// exactly what made LIVE_VALUE_RETRIED silently skip every boot
|
|
648
|
+
// target. A copy, because this is a module-level singleton and
|
|
649
|
+
// `resolveSchemaRefKinds` rewrites the `x-telo-ref` inside it.
|
|
650
|
+
manifestFragment("InvokeStep"),
|
|
651
651
|
],
|
|
652
652
|
},
|
|
653
653
|
},
|
|
@@ -858,6 +858,7 @@ export const KERNEL_BUILTINS = [
|
|
|
858
858
|
type: "array",
|
|
859
859
|
items: { type: "string", not: { enum: ["variables", "secrets"] } },
|
|
860
860
|
},
|
|
861
|
+
code: LIBRARY_CANDIDATES_SCHEMA,
|
|
861
862
|
},
|
|
862
863
|
additionalProperties: true,
|
|
863
864
|
},
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cel-environment.d.ts","sourceRoot":"","sources":["../src/cel-environment.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAC;AACnD,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,cAAc,CAAC;
|
|
1
|
+
{"version":3,"file":"cel-environment.d.ts","sourceRoot":"","sources":["../src/cel-environment.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAC;AACnD,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,cAAc,CAAC;AAcrD,OAAO,EAAE,mBAAmB,EAAE,MAAM,qBAAqB,CAAC;AAC1D,YAAY,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AAEvD;;;;;;;;;uEASuE;AACvE,wBAAgB,wBAAwB,CACtC,OAAO,EAAE,WAAW,EACpB,QAAQ,EAAE,gBAAgB,EAC1B,kBAAkB,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG,IAAI,EAI/C,kBAAkB,CAAC,EAAE,gBAAgB,GACpC,WAAW,CAgGb;AAuBD;;;;;;8DAM8D;AAC9D,wBAAgB,8BAA8B,CAC5C,OAAO,EAAE,WAAW,EACpB,cAAc,EAAE,gBAAgB,GAAG,SAAS,GAC3C,WAAW,CAkCb"}
|
package/dist/cel-environment.js
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { authoredModuleMetadata, moduleMetadataSchema } from "./module-metadata-scope.js";
|
|
1
2
|
import { jsonSchemaToCelType, VALUE_BRAND_BASE } from "./schema-compat.js";
|
|
2
3
|
/** Transport protocol on a `ports` entry → the nominal CEL brand its resolved
|
|
3
4
|
* value carries. Mirrors the `protocol` enum in the Application schema, and
|
|
@@ -74,6 +75,28 @@ rootModuleManifest) {
|
|
|
74
75
|
}
|
|
75
76
|
env.registerVariable("secrets", "map");
|
|
76
77
|
env.registerVariable("resources", "map");
|
|
78
|
+
// `module` — the declaring module's own `metadata`, so a manifest reads its
|
|
79
|
+
// version instead of restating it. A resource forwarded from an imported
|
|
80
|
+
// library reads THAT library's metadata, stamped as
|
|
81
|
+
// `metadata.moduleGlobals.module`.
|
|
82
|
+
//
|
|
83
|
+
// Falls back to an OPEN map, never to `manifest.metadata`: for a resource
|
|
84
|
+
// doc that is the RESOURCE's metadata (`{name: <resource name>}`), and
|
|
85
|
+
// closing `module` over it would turn a `module.version` that resolves
|
|
86
|
+
// perfectly well at runtime into a hard error the author cannot act on. A
|
|
87
|
+
// static check that is wrong in the rejecting direction is the worse
|
|
88
|
+
// polarity.
|
|
89
|
+
const moduleSchema = moduleMetadataSchema(manifest.metadata?.moduleGlobals?.module ?? rootModuleManifest?.metadata);
|
|
90
|
+
if (moduleSchema) {
|
|
91
|
+
const schema = {};
|
|
92
|
+
for (const [key, property] of Object.entries(moduleSchema.properties)) {
|
|
93
|
+
schema[key] = jsonSchemaToCelType(property);
|
|
94
|
+
}
|
|
95
|
+
env.registerVariable({ name: "module", schema });
|
|
96
|
+
}
|
|
97
|
+
else {
|
|
98
|
+
env.registerVariable("module", "map");
|
|
99
|
+
}
|
|
77
100
|
if (extraContextSchema?.properties) {
|
|
78
101
|
for (const [name, propSchema] of Object.entries(extraContextSchema.properties)) {
|
|
79
102
|
if (!env.hasVariable(name)) {
|
|
@@ -133,5 +156,17 @@ export function buildImportInputCelEnvironment(baseEnv, moduleManifest) {
|
|
|
133
156
|
for (const name of ["resources", "ports"]) {
|
|
134
157
|
env.registerVariable({ name, schema: {} });
|
|
135
158
|
}
|
|
159
|
+
// `module` IS part of it: the importer's own identity is config, and passing
|
|
160
|
+
// its version down to a child is the case the binding exists for.
|
|
161
|
+
const metadata = authoredModuleMetadata(mod?.metadata);
|
|
162
|
+
if (Object.keys(metadata).length > 0) {
|
|
163
|
+
const schema = {};
|
|
164
|
+
for (const key of Object.keys(metadata))
|
|
165
|
+
schema[key] = "dyn";
|
|
166
|
+
env.registerVariable({ name: "module", schema });
|
|
167
|
+
}
|
|
168
|
+
else {
|
|
169
|
+
env.registerVariable("module", "map");
|
|
170
|
+
}
|
|
136
171
|
return env;
|
|
137
172
|
}
|
|
@@ -53,6 +53,10 @@ export interface ModuleGlobals {
|
|
|
53
53
|
variables?: Record<string, unknown>;
|
|
54
54
|
secrets?: Record<string, unknown>;
|
|
55
55
|
ports?: Record<string, unknown>;
|
|
56
|
+
/** The declaring module's own `metadata` — what `module.<field>` reads. Its
|
|
57
|
+
* values, not a schema, because the fields are literals in the manifest and
|
|
58
|
+
* the module a resource belongs to is fixed at analysis time. */
|
|
59
|
+
module?: Record<string, unknown>;
|
|
56
60
|
}
|
|
57
61
|
/** Produce the flat manifest list `analyze()` consumes today.
|
|
58
62
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"flatten-for-analyzer.d.ts","sourceRoot":"","sources":["../src/flatten-for-analyzer.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,cAAc,CAAC;AACrD,OAAO,KAAK,EAAE,WAAW,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAGnE,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,4BAA4B,CAAC;AAEtE;;yEAEyE;AACzE,MAAM,WAAW,iBAAiB;IAChC,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED;;;;4CAI4C;AAC5C,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,MAAM,GAAG,iBAAiB,CAGjE;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;6EA6B6E;AAC7E,wBAAgB,gCAAgC,CAC9C,eAAe,EAAE,gBAAgB,EAAE,EACnC,MAAM,EAAE,OAAO,GACd,gBAAgB,EAAE,CAmCpB;AAED;;;6CAG6C;AAC7C,MAAM,WAAW,aAAa;IAC5B,SAAS,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IACpC,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAClC,KAAK,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;
|
|
1
|
+
{"version":3,"file":"flatten-for-analyzer.d.ts","sourceRoot":"","sources":["../src/flatten-for-analyzer.ts"],"names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AC,GAAG,EAAE,YAAY,GAAG,gBAAgB,EAAE,CAEzE"}
|
|
@@ -92,6 +92,14 @@ function readModuleGlobals(libDoc) {
|
|
|
92
92
|
if (block && typeof block === "object" && !Array.isArray(block))
|
|
93
93
|
globals[key] = block;
|
|
94
94
|
}
|
|
95
|
+
// `module` is the declaring module's own identity, so it travels with a
|
|
96
|
+
// forwarded manifest for the same reason the config blocks do: a library's
|
|
97
|
+
// `module.version` is the LIBRARY's, and typing it from the consumer's entry
|
|
98
|
+
// doc would report the app's version to the library that asked.
|
|
99
|
+
const metadata = doc.metadata;
|
|
100
|
+
if (metadata && typeof metadata === "object" && !Array.isArray(metadata)) {
|
|
101
|
+
globals.module = metadata;
|
|
102
|
+
}
|
|
95
103
|
return Object.keys(globals).length > 0 ? globals : undefined;
|
|
96
104
|
}
|
|
97
105
|
function withModuleGlobals(m, moduleGlobals) {
|
package/dist/index.d.ts
CHANGED
|
@@ -70,11 +70,13 @@ export type { ParsedVersionedRef } from "./sources/versioned-ref.js";
|
|
|
70
70
|
export { isLocalPathSource } from "./sources/local-path-ref.js";
|
|
71
71
|
export { MANIFEST_CACHE_BASE_URL, ManifestCacheSource, isHttpsModuleRef, manifestCacheKey, manifestCacheUrl, ociManifestCacheCoords, urlManifestCacheCoords, } from "./sources/manifest-cache.js";
|
|
72
72
|
export type { ManifestCacheCoords } from "./sources/manifest-cache.js";
|
|
73
|
-
export { LAYER_ROLES, PLATFORM_AXES, ArtifactSelectorError, describeSelector, isLayerRole, normalizeSelector, selectorFromQualifiers, selectorKey, selectorMatches, } from "./artifact-selector.js";
|
|
73
|
+
export { CODE_LAYER_ROLES, LAYER_ROLES, PLATFORM_AXES, ArtifactSelectorError, describeSelector, isLayerRole, normalizeSelector, roleCarriesSelector, selectorFromQualifiers, selectorKey, selectorMatches, } from "./artifact-selector.js";
|
|
74
74
|
export type { ArtifactSelector, LayerRole, PlatformAxis, PlatformTarget, } from "./artifact-selector.js";
|
|
75
75
|
export { collectModuleFileClaims } from "./module-file-claims.js";
|
|
76
76
|
export type { ModuleFileClaim } from "./module-file-claims.js";
|
|
77
|
-
export {
|
|
77
|
+
export { readLibraryCandidates } from "./module-library.js";
|
|
78
|
+
export type { LibraryCandidate, LibraryCandidateProblem, LibraryCandidates, } from "./module-library.js";
|
|
79
|
+
export { LayerIndexError, codeLayerFor, matchCodeLayers, parseLayerIndex, singletonLayer, } from "./artifact-layer-index.js";
|
|
78
80
|
export type { ArtifactLayer } from "./artifact-layer-index.js";
|
|
79
81
|
export { validateModuleArtifact } from "./validate-module-artifact.js";
|
|
80
82
|
export { PUBLISH_BLOCKING_CODES } from "./validate-module-metadata.js";
|
|
@@ -85,4 +87,7 @@ export { CelParseError, buildCelSegments, wrapCelAst } from "./cel-ast.js";
|
|
|
85
87
|
export type { CelNode, CelSegment } from "./cel-ast.js";
|
|
86
88
|
export { DEFAULT_MANIFEST_FILENAME, DiagnosticSeverity, diagnosticFix } from "./types.js";
|
|
87
89
|
export type { AnalysisDiagnostic, AnalysisOptions, DiagnosticData, DiagnosticFix, LoaderInitOptions, LoadOptions, ManifestSource, Position, PositionIndex, Range } from "./types.js";
|
|
90
|
+
export * from "./manifest-schemas.js";
|
|
91
|
+
export { DERIVED_METADATA_FIELDS, authoredModuleMetadata, } from "./module-metadata-scope.js";
|
|
92
|
+
export * from "./release/index.js";
|
|
88
93
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,wBAAwB,CAAC;AAC1D,YAAY,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAC;AAC3D,OAAO,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;AAC/C,OAAO,EAAE,2BAA2B,EAAE,MAAM,oCAAoC,CAAC;AACjF,YAAY,EACR,cAAc,EACd,UAAU,EACV,U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CAAC;AACxD,OAAO,EAAE,yBAAyB,EAAE,kBAAkB,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AAC1F,YAAY,EACR,kBAAkB,EAClB,eAAe,EACf,cAAc,EACd,aAAa,EACb,iBAAiB,EACjB,WAAW,EACX,cAAc,EACd,QAAQ,EACR,aAAa,EACb,KAAK,EACR,MAAM,YAAY,CAAC;AACpB,cAAc,uBAAuB,CAAC;AAItC,OAAO,EACL,uBAAuB,EACvB,sBAAsB,GACvB,MAAM,4BAA4B,CAAC;AACpC,cAAc,oBAAoB,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -39,9 +39,10 @@ export { OCI_SCHEME, isOciRef, parseOciRef } from "./sources/oci-ref.js";
|
|
|
39
39
|
export { parseVersionedRef, withRefVersion } from "./sources/versioned-ref.js";
|
|
40
40
|
export { isLocalPathSource } from "./sources/local-path-ref.js";
|
|
41
41
|
export { MANIFEST_CACHE_BASE_URL, ManifestCacheSource, isHttpsModuleRef, manifestCacheKey, manifestCacheUrl, ociManifestCacheCoords, urlManifestCacheCoords, } from "./sources/manifest-cache.js";
|
|
42
|
-
export { LAYER_ROLES, PLATFORM_AXES, ArtifactSelectorError, describeSelector, isLayerRole, normalizeSelector, selectorFromQualifiers, selectorKey, selectorMatches, } from "./artifact-selector.js";
|
|
42
|
+
export { CODE_LAYER_ROLES, LAYER_ROLES, PLATFORM_AXES, ArtifactSelectorError, describeSelector, isLayerRole, normalizeSelector, roleCarriesSelector, selectorFromQualifiers, selectorKey, selectorMatches, } from "./artifact-selector.js";
|
|
43
43
|
export { collectModuleFileClaims } from "./module-file-claims.js";
|
|
44
|
-
export {
|
|
44
|
+
export { readLibraryCandidates } from "./module-library.js";
|
|
45
|
+
export { LayerIndexError, codeLayerFor, matchCodeLayers, parseLayerIndex, singletonLayer, } from "./artifact-layer-index.js";
|
|
45
46
|
export { validateModuleArtifact } from "./validate-module-artifact.js";
|
|
46
47
|
// Warnings everywhere, fatal at `telo publish` — descriptive metadata has no
|
|
47
48
|
// runtime failure mode, so it must not stop a manifest running, but it is the
|
|
@@ -51,3 +52,9 @@ export { withSyntheticPositions } from "./with-synthetic-positions.js";
|
|
|
51
52
|
export { documentToAst, parseToAst } from "./yaml-ast.js";
|
|
52
53
|
export { CelParseError, buildCelSegments, wrapCelAst } from "./cel-ast.js";
|
|
53
54
|
export { DEFAULT_MANIFEST_FILENAME, DiagnosticSeverity, diagnosticFix } from "./types.js";
|
|
55
|
+
export * from "./manifest-schemas.js";
|
|
56
|
+
// The release model — module identity, fragments, the ledger, the edge graph and
|
|
57
|
+
// version planning. Pure data in, plan out, so the editor and the CLI release
|
|
58
|
+
// from one model.
|
|
59
|
+
export { DERIVED_METADATA_FIELDS, authoredModuleMetadata, } from "./module-metadata-scope.js";
|
|
60
|
+
export * from "./release/index.js";
|
package/dist/kernel-globals.d.ts
CHANGED
|
@@ -10,7 +10,7 @@ import type { ResourceManifest } from "@telorun/sdk";
|
|
|
10
10
|
* by declaring a typed `variables:`/`secrets:` entry with an `env:` binding
|
|
11
11
|
* and referencing `variables.X` / `secrets.X`.
|
|
12
12
|
*/
|
|
13
|
-
export declare const KERNEL_GLOBAL_NAMES: readonly ["variables", "secrets", "resources", "ports"];
|
|
13
|
+
export declare const KERNEL_GLOBAL_NAMES: readonly ["variables", "secrets", "resources", "ports", "module"];
|
|
14
14
|
/** Kernel globals as ONE resource's declaring module sees them. */
|
|
15
15
|
export interface KernelGlobalsIndex {
|
|
16
16
|
forResource(m: ResourceManifest): Record<string, any>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"kernel-globals.d.ts","sourceRoot":"","sources":["../src/kernel-globals.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,cAAc,CAAC;
|
|
1
|
+
{"version":3,"file":"kernel-globals.d.ts","sourceRoot":"","sources":["../src/kernel-globals.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,cAAc,CAAC;AAKrD;;;;;;;;;;GAUG;AACH,eAAO,MAAM,mBAAmB,mEAMtB,CAAC;AASX,mEAAmE;AACnE,MAAM,WAAW,kBAAkB;IACjC,WAAW,CAAC,CAAC,EAAE,gBAAgB,GAAG,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;CACvD;AAED;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,wBAAgB,uBAAuB,CACrC,SAAS,EAAE,gBAAgB,EAAE;AAC7B;;;2CAG2C;AAC3C,SAAS,CAAC,EAAE,WAAW,CAAC,MAAM,EAAE;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,MAAM,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAA;CAAE,CAAC,GAC9E,kBAAkB,CA0BpB;AAkHD;;;;;;;GAOG;AACH,wBAAgB,6BAA6B,CAC3C,aAAa,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,EAClC,aAAa,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GACjC,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CASrB"}
|