@telorun/analyzer 0.56.0 → 0.57.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 +2 -2
- package/dist/analyzer.d.ts +5 -0
- package/dist/analyzer.d.ts.map +1 -1
- package/dist/analyzer.js +155 -94
- package/dist/flatten-for-analyzer.d.ts +20 -1
- package/dist/flatten-for-analyzer.d.ts.map +1 -1
- package/dist/flatten-for-analyzer.js +48 -3
- package/dist/index.d.ts +4 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +2 -1
- package/dist/kernel-globals.d.ts +25 -11
- package/dist/kernel-globals.d.ts.map +1 -1
- package/dist/kernel-globals.js +54 -24
- package/dist/manifest-visitor.d.ts +4 -0
- package/dist/manifest-visitor.d.ts.map +1 -1
- package/dist/manifest-visitor.js +3 -3
- package/dist/module-file-claims.d.ts +65 -0
- package/dist/module-file-claims.d.ts.map +1 -0
- package/dist/module-file-claims.js +106 -0
- package/dist/schema-compat.d.ts.map +1 -1
- package/dist/schema-compat.js +12 -1
- package/dist/types.d.ts +34 -0
- package/dist/types.d.ts.map +1 -1
- package/dist/types.js +6 -0
- package/dist/validate-include-placement.d.ts +26 -0
- package/dist/validate-include-placement.d.ts.map +1 -0
- package/dist/validate-include-placement.js +67 -0
- package/dist/validate-throws-coverage.d.ts.map +1 -1
- package/dist/validate-throws-coverage.js +15 -12
- package/package.json +4 -3
- package/src/analyzer.ts +189 -131
- package/src/flatten-for-analyzer.ts +61 -3
- package/src/index.ts +5 -1
- package/src/kernel-globals.ts +74 -25
- package/src/manifest-visitor.ts +11 -3
- package/src/module-file-claims.ts +168 -0
- package/src/schema-compat.ts +19 -1
- package/src/types.ts +37 -0
- package/src/validate-include-placement.ts +70 -0
- package/src/validate-throws-coverage.ts +16 -11
package/README.md
CHANGED
|
@@ -23,9 +23,9 @@ Built to be language-agnostic and infinitely extensible.
|
|
|
23
23
|
|
|
24
24
|
```bash
|
|
25
25
|
# Reconcile your manifest into a running backend
|
|
26
|
-
$ telo ./examples/
|
|
26
|
+
$ telo ./examples/todo-app
|
|
27
27
|
|
|
28
|
-
{"level":30,"time":1771610393008,"pid":1310178,"hostname":"dev","msg":"Server listening at http://127.0.0.1:
|
|
28
|
+
{"level":30,"time":1771610393008,"pid":1310178,"hostname":"dev","msg":"Server listening at http://127.0.0.1:8077"}
|
|
29
29
|
```
|
|
30
30
|
|
|
31
31
|
## Why use Telo?
|
package/dist/analyzer.d.ts
CHANGED
|
@@ -40,6 +40,11 @@ export declare function gatherPropertySchemas(schema: Record<string, any>): Arra
|
|
|
40
40
|
* hardcoded; recursion is driven entirely by the schema annotations.
|
|
41
41
|
*/
|
|
42
42
|
export declare function walkStepArray(steps: unknown[], stepItemSchema: Record<string, any> | undefined, rootSchema: Record<string, any>, basePath: string, visit: (step: Record<string, any>, stepPath: string) => void): void;
|
|
43
|
+
/** A pure-CEL leaf and the schema of the field it sits in. */
|
|
44
|
+
export interface CelValueSlot {
|
|
45
|
+
readonly path: string;
|
|
46
|
+
readonly schema: Record<string, any>;
|
|
47
|
+
}
|
|
43
48
|
export interface StaticAnalyzerOptions {
|
|
44
49
|
celHandlers?: CelHandlers;
|
|
45
50
|
}
|
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;
|
|
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;AAUzE,OAAO,EACL,aAAa,EAEb,KAAK,YAAY,EAElB,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EAAE,gBAAgB,EAAE,MAAM,wBAAwB,CAAC;AA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BAAkB,EAAE,CAAC;QAAC,KAAK,EAAE,MAAM,EAAE,GAAG,IAAI,CAAC;QAAC,UAAU,EAAE,MAAM,GAAG,IAAI,CAAA;KAAE;CAsB5F"}
|
package/dist/analyzer.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { canonicalTypeSchemaId, OBSERVED_STATE_KEY } from "@telorun/sdk";
|
|
2
|
-
import { defaultRegistry, isRefSentinel, isTaggedSentinel } from "@telorun/templating";
|
|
2
|
+
import { defaultRegistry, isRefSentinel, isTaggedSentinel, } from "@telorun/templating";
|
|
3
3
|
import { AliasResolver, moduleScopedDefResolver, scopeResolverForModule, } from "./alias-resolver.js";
|
|
4
4
|
import { buildCelEnvironment, buildImportInputCelEnvironment, buildTypedCelEnvironment, } from "./cel-environment.js";
|
|
5
5
|
import { DefinitionRegistry } from "./definition-registry.js";
|
|
@@ -7,7 +7,7 @@ import { effectiveAuthorSchema } from "./extends-resolution.js";
|
|
|
7
7
|
import { PERMISSIVE_CONTRACT, resolveContract, } from "./invocation-contract.js";
|
|
8
8
|
import { buildCallGraph } from "./call-graph.js";
|
|
9
9
|
import { buildDependencyGraph, formatCycle } from "./dependency-graph.js";
|
|
10
|
-
import {
|
|
10
|
+
import { buildKernelGlobalsIndex, KERNEL_GLOBAL_NAMES, mergeKernelGlobalsIntoContext, } from "./kernel-globals.js";
|
|
11
11
|
import { buildObservedStateIndex, buildObservedStateResourcesSchema, collectRunReachableNames, observedStateRead, validateObservedStateDeclarations, } from "./validate-observed-state.js";
|
|
12
12
|
import { computeSuggestKind } from "./kind-suggest.js";
|
|
13
13
|
import { visitManifest } from "./manifest-visitor.js";
|
|
@@ -25,12 +25,13 @@ import { rewriteSyntheticOrigins } from "./rewrite-synthetic-origins.js";
|
|
|
25
25
|
import { celTypeSatisfiesJsonSchema, substituteCelFields, validateAgainstSchema, } from "./schema-compat.js";
|
|
26
26
|
import { collectValueSchemaIssues } from "./validate-value-schema.js";
|
|
27
27
|
import { DiagnosticSeverity } from "./types.js";
|
|
28
|
-
import { extractAccessChains, extractCelRegionScopes,
|
|
28
|
+
import { extractAccessChains, extractCelRegionScopes, getManifestItem, pathMatchesScope, resolveContextAnnotations, resolveTypeFieldToSchema, } from "./validate-cel-context.js";
|
|
29
29
|
import { buildEvalPaths, evalPathsCover } from "./eval-paths.js";
|
|
30
30
|
import { BINDINGS_ANNOTATION, bindingContextProperties, bindingPathChain, CEL_RESERVED_WORDS, findBindingSites, resolveBindingOrder, schemaAtChain, } from "./cel-bindings.js";
|
|
31
31
|
import { validateExtends } from "./validate-extends.js";
|
|
32
32
|
import { validateLogging } from "./validate-logging.js";
|
|
33
33
|
import { validateModuleArtifact } from "./validate-module-artifact.js";
|
|
34
|
+
import { validateIncludePlacement } from "./validate-include-placement.js";
|
|
34
35
|
import { validateModuleMetadata } from "./validate-module-metadata.js";
|
|
35
36
|
import { validateBaseMapping } from "./validate-base-mapping.js";
|
|
36
37
|
import { validateInvocationContract } from "./validate-invocation-contract.js";
|
|
@@ -735,68 +736,49 @@ function celAccessChains(env, expr) {
|
|
|
735
736
|
}
|
|
736
737
|
const CEL_PURE_RE = /^\s*\$\{\{[^}]*\}\}\s*$/;
|
|
737
738
|
const CEL_EXPR_RE = /\$\{\{\s*([^}]+?)\s*\}\}/;
|
|
738
|
-
/**
|
|
739
|
-
*
|
|
740
|
-
|
|
741
|
-
|
|
742
|
-
|
|
743
|
-
|
|
739
|
+
/** Restore the delimiters an engine's fix was computed without, so the
|
|
740
|
+
* replacement is the whole scalar rather than a bare expression that would be
|
|
741
|
+
* read back as literal text. A tagged scalar carries no wrapper and passes
|
|
742
|
+
* through untouched. */
|
|
743
|
+
function rewrapFix(fix, wrapper) {
|
|
744
|
+
if (!fix || !wrapper)
|
|
745
|
+
return fix;
|
|
746
|
+
return { replacement: wrapper.prefix + fix.replacement + wrapper.suffix };
|
|
747
|
+
}
|
|
748
|
+
/** Recursively walk `data`+`schema` together, collecting every pure CEL leaf
|
|
749
|
+
* with the schema of the field holding it.
|
|
750
|
+
*
|
|
751
|
+
* Type *checking* is deliberately not done here. It belongs to the templating
|
|
752
|
+
* engine, which owns the expression's syntax and now runs it once against the
|
|
753
|
+
* environment typed for that path; checking again here would mean two verdicts
|
|
754
|
+
* from two environments about one expression — which is exactly how an opaque
|
|
755
|
+
* "no matching overload" used to survive next to the diagnostic that explained
|
|
756
|
+
* it. What this walk supplies is the half the engine cannot know: the declared
|
|
757
|
+
* type of the slot the value flows into. The comparison happens once both are
|
|
758
|
+
* in hand (`reportCelReturnMismatches`). */
|
|
759
|
+
function collectCelValueSlots(data, schema, path) {
|
|
760
|
+
const slots = [];
|
|
761
|
+
// A pure CEL value behaves the same regardless of surface form: a
|
|
762
|
+
// `${{ … }}` string and a `!cel`-tagged sentinel are the same expression.
|
|
744
763
|
let celExpr;
|
|
745
764
|
if (isTaggedSentinel(data)) {
|
|
746
765
|
// Non-CEL engines (e.g. `!literal`) are analyzed by their own engine pass.
|
|
747
766
|
if (data.engine !== "cel")
|
|
748
|
-
return
|
|
767
|
+
return slots;
|
|
749
768
|
celExpr = data.source;
|
|
750
769
|
}
|
|
751
770
|
else if (typeof data === "string" && CEL_PURE_RE.test(data)) {
|
|
752
771
|
celExpr = data.match(CEL_EXPR_RE)?.[1]?.trim();
|
|
753
772
|
}
|
|
754
773
|
if (celExpr !== undefined) {
|
|
755
|
-
|
|
756
|
-
|
|
757
|
-
|
|
758
|
-
let typedEnv = baseTypedEnv;
|
|
759
|
-
if (definition.schema) {
|
|
760
|
-
for (const ctx of extractContextsFromSchema(definition.schema)) {
|
|
761
|
-
if (!pathMatchesScope(path, ctx.scope))
|
|
762
|
-
continue;
|
|
763
|
-
typedEnv = buildTypedCelEnvironment(rootEnv, manifest, ctx.schema, rootModuleManifest);
|
|
764
|
-
break;
|
|
765
|
-
}
|
|
766
|
-
}
|
|
767
|
-
let checkResult;
|
|
768
|
-
try {
|
|
769
|
-
checkResult = typedEnv.check(expr);
|
|
770
|
-
}
|
|
771
|
-
catch {
|
|
772
|
-
/* degrade gracefully */
|
|
773
|
-
}
|
|
774
|
-
if (checkResult?.valid === false && checkResult.error) {
|
|
775
|
-
// env.check() rejected the expression itself — e.g. wrong method, wrong
|
|
776
|
-
// argument types, wrong operator overload. Surface the first line of the
|
|
777
|
-
// error message; the tail is a source-code caret diagram we don't need.
|
|
778
|
-
const message = String(checkResult.error.message ?? checkResult.error)
|
|
779
|
-
.split("\n")[0]
|
|
780
|
-
.trim();
|
|
781
|
-
issues.push({ message: `CEL type error: ${message}`, path });
|
|
782
|
-
}
|
|
783
|
-
else if (checkResult?.valid && checkResult.type && schema) {
|
|
784
|
-
const celType = checkResult.type.split("<")[0];
|
|
785
|
-
if (!celTypeSatisfiesJsonSchema(celType, schema)) {
|
|
786
|
-
const expected = schema["x-telo-type"] ?? schema.type ?? "unknown";
|
|
787
|
-
issues.push({
|
|
788
|
-
message: `CEL returns '${checkResult.type}' but field expects '${expected}'`,
|
|
789
|
-
path,
|
|
790
|
-
});
|
|
791
|
-
}
|
|
792
|
-
}
|
|
793
|
-
}
|
|
794
|
-
return issues;
|
|
774
|
+
if (schema)
|
|
775
|
+
slots.push({ path, schema });
|
|
776
|
+
return slots;
|
|
795
777
|
}
|
|
796
778
|
if (Array.isArray(data)) {
|
|
797
779
|
const itemSchema = (schema.items ?? {});
|
|
798
780
|
for (let i = 0; i < data.length; i++) {
|
|
799
|
-
|
|
781
|
+
slots.push(...collectCelValueSlots(data[i], itemSchema, `${path}[${i}]`));
|
|
800
782
|
}
|
|
801
783
|
}
|
|
802
784
|
else if (data !== null && typeof data === "object") {
|
|
@@ -805,10 +787,10 @@ function collectCelTypeIssues(data, schema, path, definition, manifest, baseType
|
|
|
805
787
|
? schema.additionalProperties
|
|
806
788
|
: {};
|
|
807
789
|
for (const [k, v] of Object.entries(data)) {
|
|
808
|
-
|
|
790
|
+
slots.push(...collectCelValueSlots(v, (props[k] ?? mapValueSchema), path ? `${path}.${k}` : k));
|
|
809
791
|
}
|
|
810
792
|
}
|
|
811
|
-
return
|
|
793
|
+
return slots;
|
|
812
794
|
}
|
|
813
795
|
export class StaticAnalyzer {
|
|
814
796
|
celEnv;
|
|
@@ -1251,6 +1233,9 @@ export class StaticAnalyzer {
|
|
|
1251
1233
|
// these fields, which is precisely why they need a check: a mistyped one
|
|
1252
1234
|
// has no runtime failure mode that would ever surface it.
|
|
1253
1235
|
diagnostics.push(...validateModuleMetadata(allManifests, defs, aliases));
|
|
1236
|
+
// A file embed resolves at resource creation, so one written on a doc that
|
|
1237
|
+
// is never instantiated is read by nothing and would ship silently.
|
|
1238
|
+
diagnostics.push(...validateIncludePlacement(allManifests));
|
|
1254
1239
|
}
|
|
1255
1240
|
resolveSchemaTypeRefs(allManifests, aliases, aliasesByModule);
|
|
1256
1241
|
// Trusted-input fast path: when the caller has already attested that
|
|
@@ -1361,7 +1346,7 @@ export class StaticAnalyzer {
|
|
|
1361
1346
|
: new Set();
|
|
1362
1347
|
// Build typed kernel globals schema so x-telo-context chain validation
|
|
1363
1348
|
// recognises variables, secrets, resources, env automatically
|
|
1364
|
-
const kernelGlobals =
|
|
1349
|
+
const kernelGlobals = buildKernelGlobalsIndex(allManifests, observedState);
|
|
1365
1350
|
// Fallback context for CEL in a slot with no `x-telo-context` annotation:
|
|
1366
1351
|
// everything stays open except the typed `.status` nodes, so unknown-field
|
|
1367
1352
|
// checking reaches observed state everywhere without newly rejecting any
|
|
@@ -1377,9 +1362,18 @@ export class StaticAnalyzer {
|
|
|
1377
1362
|
: null;
|
|
1378
1363
|
// The module doc (Application/Library) carries the Application-only `ports`
|
|
1379
1364
|
// namespace; threaded into per-resource CEL typing so `${{ ports.X }}`
|
|
1380
|
-
// resolves its nominal brand cross-doc.
|
|
1365
|
+
// resolves its nominal brand cross-doc. A flattened set holds exactly one —
|
|
1366
|
+
// the entry's; see `buildKernelGlobalsSchema`.
|
|
1381
1367
|
const moduleManifest = allManifests.find((mm) => mm.kind === "Telo.Application") ??
|
|
1382
1368
|
allManifests.find((mm) => mm.kind === "Telo.Library");
|
|
1369
|
+
// Every pure-CEL leaf, with the slot it flows into. Compared against the
|
|
1370
|
+
// type the engine walk resolves, once both halves exist — see
|
|
1371
|
+
// `collectCelValueSlots`.
|
|
1372
|
+
const celReturnSlots = [];
|
|
1373
|
+
const celTypeByPath = new Map();
|
|
1374
|
+
// Context-free typed environments, one per manifest. Reused across every
|
|
1375
|
+
// expression in it — see the build site for why a matched context opts out.
|
|
1376
|
+
const typedEnvByManifest = new Map();
|
|
1383
1377
|
// Validate each non-definition, non-system resource
|
|
1384
1378
|
for (const m of allManifests) {
|
|
1385
1379
|
const filePath = m.metadata?.source;
|
|
@@ -1457,7 +1451,15 @@ export class StaticAnalyzer {
|
|
|
1457
1451
|
code: "UNDEFINED_KIND",
|
|
1458
1452
|
source: SOURCE,
|
|
1459
1453
|
message: `No Telo.Definition found for kind '${m.kind}'.${hint}`,
|
|
1460
|
-
|
|
1454
|
+
// `suggestedKind` is kept beside the generic `fix` because it names
|
|
1455
|
+
// what the replacement IS; the fix is how to apply it.
|
|
1456
|
+
data: {
|
|
1457
|
+
resource,
|
|
1458
|
+
filePath,
|
|
1459
|
+
path: "kind",
|
|
1460
|
+
suggestedKind,
|
|
1461
|
+
...(suggestedKind ? { fix: { replacement: suggestedKind } } : {}),
|
|
1462
|
+
},
|
|
1461
1463
|
});
|
|
1462
1464
|
continue;
|
|
1463
1465
|
}
|
|
@@ -1480,23 +1482,12 @@ export class StaticAnalyzer {
|
|
|
1480
1482
|
},
|
|
1481
1483
|
}
|
|
1482
1484
|
: authorSchema;
|
|
1483
|
-
// Phase 1: CEL
|
|
1484
|
-
//
|
|
1485
|
-
//
|
|
1486
|
-
|
|
1487
|
-
|
|
1488
|
-
|
|
1489
|
-
// importer is undefined here and variables/secrets fall back to a permissive `map`
|
|
1490
|
-
// (no false positives) while resources/env stay rejected.
|
|
1491
|
-
const importerModule = m.kind === "Telo.Import"
|
|
1492
|
-
? allManifests.find((mm) => (mm.kind === "Telo.Application" || mm.kind === "Telo.Library") &&
|
|
1493
|
-
mm.metadata?.name ===
|
|
1494
|
-
m.metadata?.module)
|
|
1495
|
-
: undefined;
|
|
1496
|
-
const baseTypedEnv = m.kind === "Telo.Import"
|
|
1497
|
-
? buildImportInputCelEnvironment(this.celEnv, importerModule)
|
|
1498
|
-
: buildTypedCelEnvironment(this.celEnv, m, undefined, moduleManifest);
|
|
1499
|
-
const celIssues = collectCelTypeIssues(m, schema, "", definition, m, baseTypedEnv, this.celEnv, moduleManifest);
|
|
1485
|
+
// Phase 1: collect the pure-CEL leaves and the schema of the slot each
|
|
1486
|
+
// flows into. The expression's own type is resolved later, by the
|
|
1487
|
+
// engine walk that owns type-checking; this half only knows the target.
|
|
1488
|
+
for (const slot of collectCelValueSlots(m, schema, "")) {
|
|
1489
|
+
celReturnSlots.push({ manifest: m, resource, filePath, ...slot });
|
|
1490
|
+
}
|
|
1500
1491
|
// Phase 2+3: AJV on substituted data — CEL fields replaced with typed placeholders
|
|
1501
1492
|
const ajvIssues = validateAgainstSchema(substituteCelFields(m, schema), schema);
|
|
1502
1493
|
// Phase 4: value slots that must satisfy a type declared elsewhere on
|
|
@@ -1504,7 +1495,7 @@ export class StaticAnalyzer {
|
|
|
1504
1495
|
// decision table against its declared `outputType`, so a mistyped branch
|
|
1505
1496
|
// is caught here rather than on the one input that selects it.
|
|
1506
1497
|
const valueSchemaIssues = collectValueSchemaIssues(m, schema, allManifests);
|
|
1507
|
-
const issues = [...
|
|
1498
|
+
const issues = [...ajvIssues, ...valueSchemaIssues];
|
|
1508
1499
|
for (const issue of issues) {
|
|
1509
1500
|
diagnostics.push({
|
|
1510
1501
|
severity: DiagnosticSeverity.Error,
|
|
@@ -1849,7 +1840,11 @@ export class StaticAnalyzer {
|
|
|
1849
1840
|
aliases,
|
|
1850
1841
|
allManifests: allManifests,
|
|
1851
1842
|
});
|
|
1852
|
-
effectiveContext = mergeKernelGlobalsIntoContext(withBindingNames(resolvedContext, m),
|
|
1843
|
+
effectiveContext = mergeKernelGlobalsIntoContext(withBindingNames(resolvedContext, m),
|
|
1844
|
+
// Typed in the module that DECLARED this resource — for a manifest
|
|
1845
|
+
// forwarded from an imported library, that is its `moduleGlobals`
|
|
1846
|
+
// stamp, not the consuming application's block.
|
|
1847
|
+
kernelGlobals.forResource(m));
|
|
1853
1848
|
}
|
|
1854
1849
|
else if (observedStateContext) {
|
|
1855
1850
|
// No `x-telo-context` matched, so nothing was chain-validated here
|
|
@@ -1871,50 +1866,116 @@ export class StaticAnalyzer {
|
|
|
1871
1866
|
});
|
|
1872
1867
|
return;
|
|
1873
1868
|
}
|
|
1874
|
-
|
|
1875
|
-
|
|
1876
|
-
|
|
1869
|
+
// The engine type-checks, so it gets the environment typed for THIS
|
|
1870
|
+
// path — not the bare base one. A `Telo.Import`'s variables/secrets
|
|
1871
|
+
// are a config-only contract evaluated in the IMPORTING module's
|
|
1872
|
+
// scope, so they type from the owning module doc and drop
|
|
1873
|
+
// `resources`/`env`, making a reference to either an error.
|
|
1874
|
+
//
|
|
1875
|
+
// Cached per manifest when no `x-telo-context` applied, which is most
|
|
1876
|
+
// expressions: the environment then depends only on the manifest, so
|
|
1877
|
+
// rebuilding it per expression is pure waste — a clone plus a
|
|
1878
|
+
// re-registration of every variable, on every keystroke in the IDE.
|
|
1879
|
+
// A matched context makes the environment path-specific (its schema is
|
|
1880
|
+
// resolved against the enclosing array item), so those still build
|
|
1881
|
+
// fresh rather than risk one item's types leaking into another's.
|
|
1882
|
+
const cached = effectiveContext === null ? typedEnvByManifest.get(m) : undefined;
|
|
1883
|
+
const typedEnv = cached ??
|
|
1884
|
+
(m.kind === "Telo.Import"
|
|
1885
|
+
? buildImportInputCelEnvironment(this.celEnv, allManifests.find((mm) => (mm.kind === "Telo.Application" || mm.kind === "Telo.Library") &&
|
|
1886
|
+
mm.metadata?.name ===
|
|
1887
|
+
m.metadata?.module))
|
|
1888
|
+
: buildTypedCelEnvironment(this.celEnv, m, effectiveContext ?? undefined, moduleManifest));
|
|
1889
|
+
if (effectiveContext === null && !cached)
|
|
1890
|
+
typedEnvByManifest.set(m, typedEnv);
|
|
1891
|
+
const result = engine.analyze(expr, { celEnv: typedEnv, contextSchema: effectiveContext });
|
|
1892
|
+
if (result.type !== undefined) {
|
|
1893
|
+
let byPath = celTypeByPath.get(m);
|
|
1894
|
+
if (!byPath)
|
|
1895
|
+
celTypeByPath.set(m, (byPath = new Map()));
|
|
1896
|
+
byPath.set(path, result.type);
|
|
1897
|
+
}
|
|
1898
|
+
// A non-deterministic call in a compile-eval field is baked once at
|
|
1899
|
+
// load: `nowIso()` there freezes at boot. Sometimes that is the
|
|
1900
|
+
// intent (a boot timestamp, a run id), so it warns rather than
|
|
1901
|
+
// blocking. The engine reports which calls re-evaluate; the eval mode
|
|
1902
|
+
// is manifest policy and stays here.
|
|
1903
|
+
if (celRuleApplies && evalPathsCover(celCompilePaths, path)) {
|
|
1904
|
+
const volatile = [
|
|
1905
|
+
...new Set(result.calls.filter((c) => c.deterministic === false).map((c) => c.name)),
|
|
1906
|
+
].sort();
|
|
1907
|
+
if (volatile.length > 0) {
|
|
1877
1908
|
diagnostics.push({
|
|
1878
|
-
severity: DiagnosticSeverity.
|
|
1879
|
-
code: "
|
|
1909
|
+
severity: DiagnosticSeverity.Warning,
|
|
1910
|
+
code: "CEL_NONDETERMINISTIC_IN_COMPILE_FIELD",
|
|
1880
1911
|
source: SOURCE,
|
|
1881
|
-
message:
|
|
1912
|
+
message: `${m.kind}/${resource.name}: '${path}' is evaluated once at startup, so ${volatile.map((n) => `\`${n}()\``).join(", ")} ${volatile.length === 1 ? "is" : "are"} baked in at load and never re-evaluated. Move the expression to a field evaluated per call (x-telo-eval: runtime) if it should change over time.`,
|
|
1882
1913
|
data: { resource, filePath, path },
|
|
1883
1914
|
});
|
|
1884
1915
|
}
|
|
1885
|
-
|
|
1916
|
+
}
|
|
1917
|
+
for (const f of result.diagnostics) {
|
|
1918
|
+
// A repair is applicable only when the analyzed expression covers
|
|
1919
|
+
// the whole scalar. For one `${{ }}` among literal text, replacing
|
|
1920
|
+
// the node would drop the text around it, so the correction stays
|
|
1921
|
+
// in the message and no fix is stamped.
|
|
1922
|
+
const fix = e.surface.whole ? rewrapFix(f.fix, e.surface.wrapper) : undefined;
|
|
1923
|
+
const data = { resource, filePath, path, ...(fix ? { fix } : {}) };
|
|
1924
|
+
if (f.code === "CEL_SYNTAX_ERROR") {
|
|
1886
1925
|
diagnostics.push({
|
|
1887
1926
|
severity: DiagnosticSeverity.Error,
|
|
1888
|
-
code: "
|
|
1927
|
+
code: "CEL_SYNTAX_ERROR",
|
|
1889
1928
|
source: SOURCE,
|
|
1890
|
-
message:
|
|
1891
|
-
data
|
|
1929
|
+
message: `CEL syntax error at ${path}: ${f.message}`,
|
|
1930
|
+
data,
|
|
1892
1931
|
});
|
|
1893
1932
|
}
|
|
1894
|
-
else if (f.code ===
|
|
1933
|
+
else if (f.code === undefined) {
|
|
1934
|
+
// No code from a future engine — pass the message through, tagged
|
|
1935
|
+
// with a generic ENGINE_DIAGNOSTIC code so downstream filters can
|
|
1936
|
+
// still bucket it.
|
|
1895
1937
|
diagnostics.push({
|
|
1896
1938
|
severity: DiagnosticSeverity.Error,
|
|
1897
|
-
code: "
|
|
1939
|
+
code: "ENGINE_DIAGNOSTIC",
|
|
1898
1940
|
source: SOURCE,
|
|
1899
|
-
message: `${m.kind}/${resource.name}:
|
|
1900
|
-
data
|
|
1941
|
+
message: `${m.kind}/${resource.name}: !${engineName} at '${path}': ${f.message}`,
|
|
1942
|
+
data,
|
|
1901
1943
|
});
|
|
1902
1944
|
}
|
|
1903
1945
|
else {
|
|
1904
|
-
//
|
|
1905
|
-
//
|
|
1906
|
-
//
|
|
1946
|
+
// Named by ENGINE, not hardcoded to CEL: the seam exists so a
|
|
1947
|
+
// second engine can produce coded findings, and labelling them
|
|
1948
|
+
// `CEL` would misattribute the first one that does.
|
|
1907
1949
|
diagnostics.push({
|
|
1908
1950
|
severity: DiagnosticSeverity.Error,
|
|
1909
|
-
code: f.code
|
|
1951
|
+
code: f.code,
|
|
1910
1952
|
source: SOURCE,
|
|
1911
1953
|
message: `${m.kind}/${resource.name}: !${engineName} at '${path}': ${f.message}`,
|
|
1912
|
-
data
|
|
1954
|
+
data,
|
|
1913
1955
|
});
|
|
1914
1956
|
}
|
|
1915
1957
|
}
|
|
1916
1958
|
},
|
|
1917
1959
|
}, { aliases });
|
|
1960
|
+
// The two halves of "does this expression fit the slot it flows into" meet
|
|
1961
|
+
// here: the engine resolved the expression's type during the walk above,
|
|
1962
|
+
// and the schema walk recorded the slot. An expression that failed to check
|
|
1963
|
+
// recorded no type and is already reported by its own diagnostic.
|
|
1964
|
+
for (const slot of celReturnSlots) {
|
|
1965
|
+
const type = celTypeByPath.get(slot.manifest)?.get(slot.path);
|
|
1966
|
+
if (type === undefined)
|
|
1967
|
+
continue;
|
|
1968
|
+
if (celTypeSatisfiesJsonSchema(type.split("<")[0], slot.schema))
|
|
1969
|
+
continue;
|
|
1970
|
+
const expected = slot.schema["x-telo-type"] ?? slot.schema.type ?? "unknown";
|
|
1971
|
+
diagnostics.push({
|
|
1972
|
+
severity: DiagnosticSeverity.Error,
|
|
1973
|
+
code: "CEL_TYPE_ERROR",
|
|
1974
|
+
source: SOURCE,
|
|
1975
|
+
message: `${slot.resource.kind}/${slot.resource.name}: CEL at '${slot.path}' returns '${type}' but the field expects '${expected}'.`,
|
|
1976
|
+
data: { resource: slot.resource, filePath: slot.filePath, path: slot.path },
|
|
1977
|
+
});
|
|
1978
|
+
}
|
|
1918
1979
|
// Validate resource references (Phase 3)
|
|
1919
1980
|
diagnostics.push(...validateReferences(allManifests, { aliases, definitions: defs, aliasesByModule }));
|
|
1920
1981
|
// Validate step `invoke` references — the slots the reference field map
|
|
@@ -33,8 +33,27 @@ export declare function parseExportEntry(entry: string): ParsedExportEntry;
|
|
|
33
33
|
* `byModuleName` and `!ref Alias.name` resolves, while `validate-references` /
|
|
34
34
|
* the per-resource validation loop never re-walk or re-validate it against the
|
|
35
35
|
* consumer's scope. A consumer that instead emits every module doc as a peer
|
|
36
|
-
* local manifest silently breaks both.
|
|
36
|
+
* local manifest silently breaks both.
|
|
37
|
+
*
|
|
38
|
+
* Dropping the module doc costs the consumer's analysis the one thing a
|
|
39
|
+
* forwarded manifest's CEL still needs: the `variables` / `secrets` / `ports`
|
|
40
|
+
* contract its expressions are evaluated against. That contract is carried
|
|
41
|
+
* across as {@link ModuleGlobals} on each forwarded manifest instead, so the
|
|
42
|
+
* consumer can check those reads in the DECLARING module's scope rather than
|
|
43
|
+
* either skipping them (a diagnostic performed nowhere) or judging them by its
|
|
44
|
+
* own block (a hard error the library author cannot act on). Stamped here
|
|
45
|
+
* because this is the only point where a manifest and its module doc are both
|
|
46
|
+
* in hand — by the time `analyze()` sees the flat list, the doc is gone. */
|
|
37
47
|
export declare function selectModuleManifestsForAnalysis(moduleManifests: ResourceManifest[], isRoot: boolean): ResourceManifest[];
|
|
48
|
+
/** The declaring module's config contract, carried on a forwarded manifest so
|
|
49
|
+
* the consumer's analysis can type its CEL globals in the right scope. Only the
|
|
50
|
+
* namespaces whose typing is scope-dependent: `resources` is deliberately
|
|
51
|
+
* absent, see {@link readModuleGlobals}. */
|
|
52
|
+
export interface ModuleGlobals {
|
|
53
|
+
variables?: Record<string, unknown>;
|
|
54
|
+
secrets?: Record<string, unknown>;
|
|
55
|
+
ports?: Record<string, unknown>;
|
|
56
|
+
}
|
|
38
57
|
/** Produce the flat manifest list `analyze()` consumes today.
|
|
39
58
|
*
|
|
40
59
|
* Combines the entry module's manifests with `Telo.Definition`,
|
|
@@ -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;AA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C,YAAY,EAAE,MAAM,CAAA;CAAE,CAAC,EAC5E,aAAa,EAAE,WAAW,CAAC,MAAM,EAAE,SAAS,MAAM,EAAE,CAAC,GACpD,IAAI,CAMN;AAgDD;;;;;oEAKoE;AACpE,wBAAgB,0BAA0B,CAAC,KAAK,EAAE,WAAW,GAAG,mBAAmB,EAAE,CAuBpF;AAED;;;;;6BAK6B;AAC7B,wBAAgB,mBAAmB,CAAC,GAAG,EAAE,YAAY,GAAG,gBAAgB,EAAE,CAEzE"}
|
|
@@ -27,7 +27,17 @@ export function parseExportEntry(entry) {
|
|
|
27
27
|
* `byModuleName` and `!ref Alias.name` resolves, while `validate-references` /
|
|
28
28
|
* the per-resource validation loop never re-walk or re-validate it against the
|
|
29
29
|
* consumer's scope. A consumer that instead emits every module doc as a peer
|
|
30
|
-
* local manifest silently breaks both.
|
|
30
|
+
* local manifest silently breaks both.
|
|
31
|
+
*
|
|
32
|
+
* Dropping the module doc costs the consumer's analysis the one thing a
|
|
33
|
+
* forwarded manifest's CEL still needs: the `variables` / `secrets` / `ports`
|
|
34
|
+
* contract its expressions are evaluated against. That contract is carried
|
|
35
|
+
* across as {@link ModuleGlobals} on each forwarded manifest instead, so the
|
|
36
|
+
* consumer can check those reads in the DECLARING module's scope rather than
|
|
37
|
+
* either skipping them (a diagnostic performed nowhere) or judging them by its
|
|
38
|
+
* own block (a hard error the library author cannot act on). Stamped here
|
|
39
|
+
* because this is the only point where a manifest and its module doc are both
|
|
40
|
+
* in hand — by the time `analyze()` sees the flat list, the doc is gone. */
|
|
31
41
|
export function selectModuleManifestsForAnalysis(moduleManifests, isRoot) {
|
|
32
42
|
if (isRoot)
|
|
33
43
|
return moduleManifests;
|
|
@@ -41,22 +51,57 @@ export function selectModuleManifestsForAnalysis(moduleManifests, isRoot) {
|
|
|
41
51
|
continue;
|
|
42
52
|
exportedResources.add(parseExportEntry(entry).name);
|
|
43
53
|
}
|
|
54
|
+
const moduleGlobals = readModuleGlobals(libDoc);
|
|
44
55
|
const out = [];
|
|
45
56
|
for (const m of moduleManifests) {
|
|
46
57
|
if (m.kind === "Telo.Definition" || m.kind === "Telo.Abstract" || m.kind === "Telo.Import") {
|
|
47
|
-
out.push(m);
|
|
58
|
+
out.push(withModuleGlobals(m, moduleGlobals));
|
|
48
59
|
}
|
|
49
60
|
else if (!isModuleKind(m.kind) &&
|
|
50
61
|
typeof m.metadata?.name === "string" &&
|
|
51
62
|
exportedResources.has(m.metadata.name)) {
|
|
52
63
|
out.push({
|
|
53
64
|
...m,
|
|
54
|
-
metadata: {
|
|
65
|
+
metadata: {
|
|
66
|
+
...m.metadata,
|
|
67
|
+
forwardedExport: true,
|
|
68
|
+
...(moduleGlobals ? { moduleGlobals } : {}),
|
|
69
|
+
},
|
|
55
70
|
});
|
|
56
71
|
}
|
|
57
72
|
}
|
|
58
73
|
return out;
|
|
59
74
|
}
|
|
75
|
+
/** Read the schema-map blocks off a module doc, or `undefined` when it declares
|
|
76
|
+
* none (the globals then stay permissive, exactly as an absent doc does).
|
|
77
|
+
*
|
|
78
|
+
* `resources` is NOT carried. The flat list holds only this module's EXPORTED
|
|
79
|
+
* instances, so a name list built from it would omit every internal one — and a
|
|
80
|
+
* `with:`-scoped resource is declared inline rather than as a doc, so it would
|
|
81
|
+
* be missing too. Both would read as "no such resource" in a consumer's pass:
|
|
82
|
+
* a false positive worse than the unchecked read it replaced. The consumer
|
|
83
|
+
* leaves a forwarded manifest's `resources` node open and the library's own
|
|
84
|
+
* analysis, which sees every name, does that check. */
|
|
85
|
+
function readModuleGlobals(libDoc) {
|
|
86
|
+
const doc = libDoc;
|
|
87
|
+
if (!doc)
|
|
88
|
+
return undefined;
|
|
89
|
+
const globals = {};
|
|
90
|
+
for (const key of ["variables", "secrets", "ports"]) {
|
|
91
|
+
const block = doc[key];
|
|
92
|
+
if (block && typeof block === "object" && !Array.isArray(block))
|
|
93
|
+
globals[key] = block;
|
|
94
|
+
}
|
|
95
|
+
return Object.keys(globals).length > 0 ? globals : undefined;
|
|
96
|
+
}
|
|
97
|
+
function withModuleGlobals(m, moduleGlobals) {
|
|
98
|
+
if (!moduleGlobals)
|
|
99
|
+
return m;
|
|
100
|
+
return {
|
|
101
|
+
...m,
|
|
102
|
+
metadata: { ...m.metadata, moduleGlobals },
|
|
103
|
+
};
|
|
104
|
+
}
|
|
60
105
|
/** Produce the flat manifest list `analyze()` consumes today.
|
|
61
106
|
*
|
|
62
107
|
* Combines the entry module's manifests with `Telo.Definition`,
|
package/dist/index.d.ts
CHANGED
|
@@ -64,6 +64,8 @@ export { MANIFEST_CACHE_BASE_URL, ManifestCacheSource, isHttpsModuleRef, manifes
|
|
|
64
64
|
export type { ManifestCacheCoords } from "./sources/manifest-cache.js";
|
|
65
65
|
export { LAYER_ROLES, PLATFORM_AXES, ArtifactSelectorError, describeSelector, isLayerRole, normalizeSelector, selectorFromQualifiers, selectorKey, selectorMatches, } from "./artifact-selector.js";
|
|
66
66
|
export type { ArtifactSelector, LayerRole, PlatformAxis, PlatformTarget, } from "./artifact-selector.js";
|
|
67
|
+
export { collectModuleFileClaims } from "./module-file-claims.js";
|
|
68
|
+
export type { ModuleFileClaim } from "./module-file-claims.js";
|
|
67
69
|
export { LayerIndexError, matchControllerLayers, parseLayerIndex, singletonLayer, } from "./artifact-layer-index.js";
|
|
68
70
|
export type { ArtifactLayer } from "./artifact-layer-index.js";
|
|
69
71
|
export { validateModuleArtifact } from "./validate-module-artifact.js";
|
|
@@ -73,6 +75,6 @@ export { documentToAst, parseToAst } from "./yaml-ast.js";
|
|
|
73
75
|
export type { AstDocument, AstMap, AstNode, AstPair, AstScalar, AstSeq } from "./yaml-ast.js";
|
|
74
76
|
export { CelParseError, buildCelSegments, wrapCelAst } from "./cel-ast.js";
|
|
75
77
|
export type { CelNode, CelSegment } from "./cel-ast.js";
|
|
76
|
-
export { DEFAULT_MANIFEST_FILENAME, DiagnosticSeverity } from "./types.js";
|
|
77
|
-
export type { AnalysisDiagnostic, AnalysisOptions, LoaderInitOptions, LoadOptions, ManifestSource, Position, PositionIndex, Range } from "./types.js";
|
|
78
|
+
export { DEFAULT_MANIFEST_FILENAME, DiagnosticSeverity, diagnosticFix } from "./types.js";
|
|
79
|
+
export type { AnalysisDiagnostic, AnalysisOptions, DiagnosticData, DiagnosticFix, LoaderInitOptions, LoadOptions, ManifestSource, Position, PositionIndex, Range } from "./types.js";
|
|
78
80
|
//# 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,UAAU,EACV,WAAW,EACX,YAAY,EACZ,UAAU,GACb,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EACH,0BAA0B,EAC1B,kBAAkB,EAClB,mBAAmB,EACnB,wBAAwB,EACxB,gBAAgB,EAChB,wBAAwB,EACxB,oBAAoB,EACpB,gCAAgC,EAChC,kBAAkB,EAClB,oBAAoB,EACpB,KAAK,iBAAiB,EACtB,KAAK,YAAY,GACpB,MAAM,2BAA2B,CAAC;AACnC,OAAO,EAAE,cAAc,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;AACjE,OAAO,EACL,mBAAmB,EACnB,wBAAwB,EACxB,mBAAmB,EACnB,gBAAgB,EAChB,mBAAmB,GACpB,MAAM,mBAAmB,CAAC;AAC3B,YAAY,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AACtD,OAAO,EACL,sBAAsB,EACtB,uBAAuB,EACvB,iCAAiC,EACjC,wBAAwB,EACxB,iBAAiB,EACjB,iC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"}
|
package/dist/index.js
CHANGED
|
@@ -36,6 +36,7 @@ export { parseVersionedRef, withRefVersion } from "./sources/versioned-ref.js";
|
|
|
36
36
|
export { isLocalPathSource } from "./sources/local-path-ref.js";
|
|
37
37
|
export { MANIFEST_CACHE_BASE_URL, ManifestCacheSource, isHttpsModuleRef, manifestCacheKey, manifestCacheUrl, ociManifestCacheCoords, urlManifestCacheCoords, } from "./sources/manifest-cache.js";
|
|
38
38
|
export { LAYER_ROLES, PLATFORM_AXES, ArtifactSelectorError, describeSelector, isLayerRole, normalizeSelector, selectorFromQualifiers, selectorKey, selectorMatches, } from "./artifact-selector.js";
|
|
39
|
+
export { collectModuleFileClaims } from "./module-file-claims.js";
|
|
39
40
|
export { LayerIndexError, matchControllerLayers, parseLayerIndex, singletonLayer, } from "./artifact-layer-index.js";
|
|
40
41
|
export { validateModuleArtifact } from "./validate-module-artifact.js";
|
|
41
42
|
// Warnings everywhere, fatal at `telo publish` — descriptive metadata has no
|
|
@@ -45,4 +46,4 @@ export { PUBLISH_BLOCKING_CODES } from "./validate-module-metadata.js";
|
|
|
45
46
|
export { withSyntheticPositions } from "./with-synthetic-positions.js";
|
|
46
47
|
export { documentToAst, parseToAst } from "./yaml-ast.js";
|
|
47
48
|
export { CelParseError, buildCelSegments, wrapCelAst } from "./cel-ast.js";
|
|
48
|
-
export { DEFAULT_MANIFEST_FILENAME, DiagnosticSeverity } from "./types.js";
|
|
49
|
+
export { DEFAULT_MANIFEST_FILENAME, DiagnosticSeverity, diagnosticFix } from "./types.js";
|