@telorun/analyzer 0.56.1 → 0.58.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.
Files changed (133) hide show
  1. package/dist/analyzer.d.ts +5 -0
  2. package/dist/analyzer.d.ts.map +1 -1
  3. package/dist/analyzer.js +232 -94
  4. package/dist/cel-environment.d.ts.map +1 -1
  5. package/dist/cel-environment.js +6 -3
  6. package/dist/definition-registry.d.ts +5 -0
  7. package/dist/definition-registry.d.ts.map +1 -1
  8. package/dist/definition-registry.js +9 -0
  9. package/dist/index.d.ts +14 -4
  10. package/dist/index.d.ts.map +1 -1
  11. package/dist/index.js +8 -3
  12. package/dist/invocation-contract.d.ts +21 -13
  13. package/dist/invocation-contract.d.ts.map +1 -1
  14. package/dist/invocation-contract.js +43 -46
  15. package/dist/loaded-types.d.ts +13 -0
  16. package/dist/loaded-types.d.ts.map +1 -1
  17. package/dist/manifest-loader.d.ts +8 -1
  18. package/dist/manifest-loader.d.ts.map +1 -1
  19. package/dist/manifest-loader.js +33 -6
  20. package/dist/manifest-visitor.d.ts +4 -0
  21. package/dist/manifest-visitor.d.ts.map +1 -1
  22. package/dist/manifest-visitor.js +3 -3
  23. package/dist/migrations/driver.d.ts +69 -0
  24. package/dist/migrations/driver.d.ts.map +1 -0
  25. package/dist/migrations/driver.js +200 -0
  26. package/dist/migrations/entries/index.d.ts +3 -0
  27. package/dist/migrations/entries/index.d.ts.map +1 -0
  28. package/dist/migrations/entries/index.js +9 -0
  29. package/dist/migrations/entries/normalize-value-types.json +48 -0
  30. package/dist/migrations/entries/ref-slot-scalar-type.json +20 -0
  31. package/dist/migrations/entry-data.d.ts +25 -0
  32. package/dist/migrations/entry-data.d.ts.map +1 -0
  33. package/dist/migrations/entry-data.js +171 -0
  34. package/dist/migrations/index.d.ts +22 -0
  35. package/dist/migrations/index.d.ts.map +1 -0
  36. package/dist/migrations/index.js +19 -0
  37. package/dist/migrations/match.d.ts +162 -0
  38. package/dist/migrations/match.d.ts.map +1 -0
  39. package/dist/migrations/match.js +295 -0
  40. package/dist/migrations/patch.d.ts +68 -0
  41. package/dist/migrations/patch.d.ts.map +1 -0
  42. package/dist/migrations/patch.js +236 -0
  43. package/dist/migrations/provenance.d.ts +25 -0
  44. package/dist/migrations/provenance.d.ts.map +1 -0
  45. package/dist/migrations/provenance.js +118 -0
  46. package/dist/migrations/registry.d.ts +35 -0
  47. package/dist/migrations/registry.d.ts.map +1 -0
  48. package/dist/migrations/registry.js +35 -0
  49. package/dist/migrations/report.d.ts +28 -0
  50. package/dist/migrations/report.d.ts.map +1 -0
  51. package/dist/migrations/report.js +144 -0
  52. package/dist/migrations/types.d.ts +115 -0
  53. package/dist/migrations/types.d.ts.map +1 -0
  54. package/dist/migrations/types.js +24 -0
  55. package/dist/migrations/yaml-edit.d.ts +21 -0
  56. package/dist/migrations/yaml-edit.d.ts.map +1 -0
  57. package/dist/migrations/yaml-edit.js +245 -0
  58. package/dist/module-file-claims.d.ts +65 -0
  59. package/dist/module-file-claims.d.ts.map +1 -0
  60. package/dist/module-file-claims.js +106 -0
  61. package/dist/parse-loaded-file.d.ts +8 -0
  62. package/dist/parse-loaded-file.d.ts.map +1 -1
  63. package/dist/parse-loaded-file.js +22 -13
  64. package/dist/resolve-schema-type-refs.d.ts +29 -12
  65. package/dist/resolve-schema-type-refs.d.ts.map +1 -1
  66. package/dist/resolve-schema-type-refs.js +89 -16
  67. package/dist/schema-compat.d.ts +35 -9
  68. package/dist/schema-compat.d.ts.map +1 -1
  69. package/dist/schema-compat.js +181 -54
  70. package/dist/schema-region.d.ts +33 -0
  71. package/dist/schema-region.d.ts.map +1 -0
  72. package/dist/schema-region.js +45 -0
  73. package/dist/types.d.ts +51 -0
  74. package/dist/types.d.ts.map +1 -1
  75. package/dist/types.js +6 -0
  76. package/dist/validate-cel-context.d.ts.map +1 -1
  77. package/dist/validate-cel-context.js +29 -3
  78. package/dist/validate-include-placement.d.ts +26 -0
  79. package/dist/validate-include-placement.d.ts.map +1 -0
  80. package/dist/validate-include-placement.js +67 -0
  81. package/dist/validate-step-inputs.d.ts +8 -1
  82. package/dist/validate-step-inputs.d.ts.map +1 -1
  83. package/dist/validate-step-inputs.js +47 -2
  84. package/dist/validate-throws-coverage.d.ts.map +1 -1
  85. package/dist/validate-throws-coverage.js +15 -12
  86. package/dist/validate-value-type-slots.d.ts +43 -0
  87. package/dist/validate-value-type-slots.d.ts.map +1 -0
  88. package/dist/validate-value-type-slots.js +142 -0
  89. package/dist/value-type-keyword.d.ts +60 -0
  90. package/dist/value-type-keyword.d.ts.map +1 -0
  91. package/dist/value-type-keyword.js +119 -0
  92. package/dist/yaml-source-edit.d.ts +56 -0
  93. package/dist/yaml-source-edit.d.ts.map +1 -0
  94. package/dist/yaml-source-edit.js +93 -0
  95. package/package.json +4 -3
  96. package/src/analyzer.ts +276 -129
  97. package/src/cel-environment.ts +6 -3
  98. package/src/definition-registry.ts +10 -0
  99. package/src/index.ts +31 -3
  100. package/src/invocation-contract.ts +43 -48
  101. package/src/loaded-types.ts +13 -0
  102. package/src/manifest-loader.ts +37 -6
  103. package/src/manifest-visitor.ts +11 -3
  104. package/src/migrations/driver.ts +262 -0
  105. package/src/migrations/entries/index.ts +10 -0
  106. package/src/migrations/entries/normalize-value-types.json +48 -0
  107. package/src/migrations/entries/ref-slot-scalar-type.json +20 -0
  108. package/src/migrations/entry-data.ts +207 -0
  109. package/src/migrations/index.ts +22 -0
  110. package/src/migrations/match.ts +382 -0
  111. package/src/migrations/patch.ts +265 -0
  112. package/src/migrations/provenance.ts +167 -0
  113. package/src/migrations/registry.ts +40 -0
  114. package/src/migrations/report.ts +169 -0
  115. package/src/migrations/types.ts +144 -0
  116. package/src/migrations/yaml-edit.ts +260 -0
  117. package/src/module-file-claims.ts +168 -0
  118. package/src/parse-loaded-file.ts +31 -12
  119. package/src/resolve-schema-type-refs.ts +93 -16
  120. package/src/schema-compat.ts +218 -62
  121. package/src/schema-region.ts +46 -0
  122. package/src/types.ts +54 -0
  123. package/src/validate-cel-context.ts +36 -3
  124. package/src/validate-include-placement.ts +70 -0
  125. package/src/validate-step-inputs.ts +56 -1
  126. package/src/validate-throws-coverage.ts +16 -11
  127. package/src/validate-value-type-slots.ts +182 -0
  128. package/src/value-type-keyword.ts +135 -0
  129. package/src/yaml-source-edit.ts +106 -0
  130. package/dist/binary-slot.d.ts +0 -39
  131. package/dist/binary-slot.d.ts.map +0 -1
  132. package/dist/binary-slot.js +0 -58
  133. package/src/binary-slot.ts +0 -71
@@ -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,EACx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B,CAAC;AAC/D,OAAO,EAAE,sBAAsB,EAAE,MAAM,+BAA+B,CAAC;AAIvE,OAAO,EAAE,sBAAsB,EAAE,MAAM,+BAA+B,CAAC;AACvE,OAAO,EAAE,sBAAsB,EAAE,MAAM,+BAA+B,CAAC;AACvE,OAAO,EAAE,aAAa,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAC1D,YAAY,EAAE,WAAW,EAAE,MAAM,EAAE,OAAO,EAAE,OAAO,EAAE,SAAS,EAAE,MAAM,EAAE,MAAM,eAAe,CAAC;AAC9F,OAAO,EAAE,aAAa,EAAE,gBAAgB,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC3E,YAAY,EAAE,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,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"}
package/dist/index.js CHANGED
@@ -7,20 +7,24 @@ export { BINDINGS_ANNOTATION, bindingContextProperties, bindingDependencies, fin
7
7
  export { applyObservedStateNode, buildObservedStateIndex, buildObservedStateResourcesSchema, collectRunReachableNames, observedStateRead, validateObservedStateDeclarations, OBSERVED_STATE_SCHEMA, } from "./validate-observed-state.js";
8
8
  export { moduleScopedDefResolver, scopeResolverForModule } from "./alias-resolver.js";
9
9
  export { ancestorChain, contractDeclarer, controllerBearingAncestor, effectiveAuthorSchema, effectiveContractField, effectiveStatusSchema, hasOwnControllerOrTemplate, inheritedCapability, isInheritedDelegation, mappingFieldFor, needsContractMapping, resolveParent, } from "./extends-resolution.js";
10
- export { defaultBearingPaths, PERMISSIVE_CONTRACT, resolveContract, resolveContractSchema, withStreamPropertiesSkipped, } from "./invocation-contract.js";
10
+ export { defaultBearingPaths, PERMISSIVE_CONTRACT, resolveContract, resolveContractSchema, withLiveValuesSkipped, } from "./invocation-contract.js";
11
11
  export { hasIntermediateWildcard, parseRedactionPath, RedactionPathError, } from "./redaction-path.js";
12
12
  export { buildCallGraph, projectToPairs, resourceId } from "./call-graph.js";
13
13
  export { buildReferenceFieldMap, isRefEntry, isScopeEntry } from "./reference-field-map.js";
14
14
  export { hasDeclaredUse, isRefSlot, isRefUse, possibleUses, readRefSlot, REF_USES, refSlotAnnotation, rewriteRefSlotKinds, transfersControl, } from "./ref-slot.js";
15
- export { binaryKeyword, isBinarySlot, X_TELO_BINARY } from "./binary-slot.js";
15
+ export { ANNOTATION_KEYWORDS, registerTeloKeywords, valueTypeKeyword, } from "./value-type-keyword.js";
16
+ export { applyTextEdits, isPlainSafe, quoteStyleOf, renderFixReplacement, } from "./yaml-source-edit.js";
16
17
  export { hasProvidesZone, hasRequiresZone, readProvidesZone, readRequiresZone, rewriteRequiresZoneKind, } from "./zone-slot.js";
17
18
  export { deriveLibraryExportRequirements, projectZoneRequirements, runZoneAnalysis, zoneDocumentsSignature, } from "./resolve-zone-requirements.js";
18
19
  export { validateZoneSlotDeclarations } from "./validate-zone-slots.js";
19
20
  export { validateDynamicSelectors, validateRefSlotDeclarations } from "./validate-ref-slots.js";
21
+ export { validateValueTypeSlots } from "./validate-value-type-slots.js";
22
+ export { checkSchemaCompatibility } from "./schema-compat.js";
20
23
  export { visitManifest } from "./manifest-visitor.js";
21
24
  export { Loader } from "./manifest-loader.js";
22
25
  export { isModuleKind, MODULE_KINDS } from "./module-kinds.js";
23
26
  export { parseLoadedFile } from "./parse-loaded-file.js";
27
+ export { CORE_MIGRATIONS, migrateFileText, migrateManifests, NO_MIGRATIONS, parseMigrationEntry, remapMigratedPaths, } from "./migrations/index.js";
24
28
  export { desugarLoadedFile, inlineImportManifests } from "./inline-imports.js";
25
29
  export { compareModuleVersions, compareParsedModuleVersions, isNewerModuleVersion, isSameModuleVersion, newestModuleVersion, parseModuleVersion, } from "./module-version-order.js";
26
30
  export { reconcileModuleVersions } from "./reconcile-module-versions.js";
@@ -36,6 +40,7 @@ export { parseVersionedRef, withRefVersion } from "./sources/versioned-ref.js";
36
40
  export { isLocalPathSource } from "./sources/local-path-ref.js";
37
41
  export { MANIFEST_CACHE_BASE_URL, ManifestCacheSource, isHttpsModuleRef, manifestCacheKey, manifestCacheUrl, ociManifestCacheCoords, urlManifestCacheCoords, } from "./sources/manifest-cache.js";
38
42
  export { LAYER_ROLES, PLATFORM_AXES, ArtifactSelectorError, describeSelector, isLayerRole, normalizeSelector, selectorFromQualifiers, selectorKey, selectorMatches, } from "./artifact-selector.js";
43
+ export { collectModuleFileClaims } from "./module-file-claims.js";
39
44
  export { LayerIndexError, matchControllerLayers, parseLayerIndex, singletonLayer, } from "./artifact-layer-index.js";
40
45
  export { validateModuleArtifact } from "./validate-module-artifact.js";
41
46
  // Warnings everywhere, fatal at `telo publish` — descriptive metadata has no
@@ -45,4 +50,4 @@ export { PUBLISH_BLOCKING_CODES } from "./validate-module-metadata.js";
45
50
  export { withSyntheticPositions } from "./with-synthetic-positions.js";
46
51
  export { documentToAst, parseToAst } from "./yaml-ast.js";
47
52
  export { CelParseError, buildCelSegments, wrapCelAst } from "./cel-ast.js";
48
- export { DEFAULT_MANIFEST_FILENAME, DiagnosticSeverity } from "./types.js";
53
+ export { DEFAULT_MANIFEST_FILENAME, DiagnosticSeverity, diagnosticFix } from "./types.js";
@@ -1,4 +1,4 @@
1
- import type { ResourceDefinition } from "@telorun/sdk";
1
+ import { type ResourceDefinition } from "@telorun/sdk";
2
2
  import { type ContractDirection, type DefResolver } from "./extends-resolution.js";
3
3
  export type { ContractDirection };
4
4
  /**
@@ -65,26 +65,34 @@ export declare function resolveContract(direction: ContractDirection, manifest:
65
65
  * to needing to know whether one was declared. */
66
66
  export declare function resolveContractSchema(direction: ContractDirection, manifest: Record<string, any> | undefined, definition: ResourceDefinition | undefined, scope: ContractScope): Record<string, any>;
67
67
  /**
68
- * A copy of `schema` with every `x-telo-stream`-marked property removed from
69
- * `properties` and `required`, for validating a runtime value against.
68
+ * A copy of `schema` with every `live`-typed node left unconstrained, for
69
+ * validating a runtime value against.
70
70
  *
71
- * Streams travel in BOTH directions — `Codec.Encoder` marks `input` on its
72
- * `inputType` and lists it in `required`, and `Record.Stream`, `Ai`, `Tar` and
73
- * `Console` do the same — so a one-directional skip would walk a live `Stream`
74
- * with AJV on the hottest path in the runtime. That is the same defect as
75
- * `stripCompiledValues` walking a live `ResourceInstance` in a ref slot: a live
76
- * object in a declared slot is not data to be traversed. The annotation already
77
- * marks exactly the properties to leave alone.
71
+ * Live values travel in BOTH directions — `Codec.Encoder` declares a stream on
72
+ * its `inputType` and lists it in `required`, and `Record.Stream`, `Ai`, `Tar`
73
+ * and `Console` do the same — so a one-directional skip would walk a live
74
+ * `Stream` with AJV on the hottest path in the runtime. That is the same defect
75
+ * as `stripCompiledValues` walking a live `ResourceInstance` in a ref slot: a
76
+ * live object in a declared slot is not data to be traversed.
77
+ *
78
+ * EXEMPTION IS A PROPERTY OF THE TYPE, not of a position. This used to neutralize
79
+ * only a key it found in a `properties` map, so an array-OF-streams element was
80
+ * reached and left constrained even though the walk descended into `items`.
81
+ * Reading the exemption off the declared value type makes an item, a union branch
82
+ * and a property the same case, and it is one rule instead of three.
83
+ *
84
+ * The exemption is from VALIDATION, never from TYPING: a live type's declared
85
+ * arguments still travel through every schema-typing walk the analyzer performs.
78
86
  *
79
87
  * Structural (returns a new object, never mutates), and shared so the analyzer
80
88
  * and the kernel exempt the same set.
81
89
  */
82
- export declare function withStreamPropertiesSkipped(schema: Record<string, any>,
90
+ export declare function withLiveValuesSkipped(schema: Record<string, any>,
83
91
  /** Resolves a `$ref` to the schema it names. Required to see through the
84
92
  * reference form the runtime deliberately KEEPS intact for its validator: a
85
93
  * contract written as `{ $ref: "telo:mod/Type" }` has none of its own
86
94
  * properties, so a walk that cannot follow the reference exempts nothing and
87
- * the stream is traversed after all. */
95
+ * the live value is traversed after all. */
88
96
  resolveRef?: (ref: string) => Record<string, any> | undefined): Record<string, any>;
89
97
  /** Every property path in `schema` that can receive a `default:` — the paths a
90
98
  * defaults pass may write to, and therefore exactly how far the caller's inputs
@@ -93,7 +101,7 @@ resolveRef?: (ref: string) => Record<string, any> | undefined): Record<string, a
93
101
  * default would mutate the structure the caller still holds. Bounded by the
94
102
  * schema's defaults rather than by the size of the payload. */
95
103
  export declare function defaultBearingPaths(schema: Record<string, any>,
96
- /** See {@link withStreamPropertiesSkipped} — a contract kept in `$ref` form
104
+ /** See {@link withLiveValuesSkipped} — a contract kept in `$ref` form
97
105
  * declares its defaults behind the reference, and a walk that cannot follow
98
106
  * it would report none, leaving the caller's data shared where a fill lands. */
99
107
  resolveRef?: (ref: string) => Record<string, any> | undefined): string[][];
@@ -1 +1 @@
1
- {"version":3,"file":"invocation-contract.d.ts","sourceRoot":"","sources":["../src/invocation-contract.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,cAAc,CAAC;AACvD,OAAO,EACL,KAAK,iBAAiB,EAEtB,KAAK,WAAW,EAEjB,MAAM,yBAAyB,CAAC;AAGjC,YAAY,EAAE,iBAAiB,EAAE,CAAC;AAElC;;;;;;;;;;;;GAYG;AAEH;;oCAEoC;AACpC,MAAM,MAAM,cAAc,GAAG,UAAU,GAAG,MAAM,CAAC;AAEjD,MAAM,WAAW,gBAAgB;IAC/B,oDAAoD;IACpD,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;IAC5B,MAAM,EAAE,cAAc,CAAC;IACvB;gFAC4E;IAC5E,UAAU,CAAC,EAAE,kBAAkB,CAAC;CACjC;AAED,MAAM,WAAW,aAAa;IAC5B;;kEAE8D;IAC9D,iBAAiB,EAAE,WAAW,CAAC;IAC/B;;;;;;;;;OASG;IACH,gBAAgB,CAAC,GAAG,EAAE,kBAAkB,GAAG,SAAS,GAAG,MAAM,CAAC,MAAM,EAAE,G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;;;;;;;;;;;;GAsBG;AACH,wBAAgB,qBAAqB,CACnC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC;AAC3B;;;;6CAI6C;AAC7C,UAAU,CAAC,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG,SAAS,GAC5D,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAErB;AAoFD;;;;;gEAKgE;AAChE,wBAAgB,mBAAmB,CACjC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC;AAC3B;;iFAEiF;AACjF,UAAU,CAAC,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG,SAAS,GAC5D,MAAM,EAAE,EAAE,CA+BZ"}
@@ -1,3 +1,4 @@
1
+ import { isLiveSlot } from "@telorun/sdk";
1
2
  import { contractDeclarer, effectiveContractField, } from "./extends-resolution.js";
2
3
  import { resolveTypeFieldToSchema } from "./validate-cel-context.js";
3
4
  /** The fallback for a target that declares no contract: anything goes. Not
@@ -42,30 +43,38 @@ export function resolveContractSchema(direction, manifest, definition, scope) {
42
43
  return resolveContract(direction, manifest, definition, scope)?.schema ?? PERMISSIVE_CONTRACT;
43
44
  }
44
45
  /**
45
- * A copy of `schema` with every `x-telo-stream`-marked property removed from
46
- * `properties` and `required`, for validating a runtime value against.
46
+ * A copy of `schema` with every `live`-typed node left unconstrained, for
47
+ * validating a runtime value against.
47
48
  *
48
- * Streams travel in BOTH directions — `Codec.Encoder` marks `input` on its
49
- * `inputType` and lists it in `required`, and `Record.Stream`, `Ai`, `Tar` and
50
- * `Console` do the same — so a one-directional skip would walk a live `Stream`
51
- * with AJV on the hottest path in the runtime. That is the same defect as
52
- * `stripCompiledValues` walking a live `ResourceInstance` in a ref slot: a live
53
- * object in a declared slot is not data to be traversed. The annotation already
54
- * marks exactly the properties to leave alone.
49
+ * Live values travel in BOTH directions — `Codec.Encoder` declares a stream on
50
+ * its `inputType` and lists it in `required`, and `Record.Stream`, `Ai`, `Tar`
51
+ * and `Console` do the same — so a one-directional skip would walk a live
52
+ * `Stream` with AJV on the hottest path in the runtime. That is the same defect
53
+ * as `stripCompiledValues` walking a live `ResourceInstance` in a ref slot: a
54
+ * live object in a declared slot is not data to be traversed.
55
+ *
56
+ * EXEMPTION IS A PROPERTY OF THE TYPE, not of a position. This used to neutralize
57
+ * only a key it found in a `properties` map, so an array-OF-streams element was
58
+ * reached and left constrained even though the walk descended into `items`.
59
+ * Reading the exemption off the declared value type makes an item, a union branch
60
+ * and a property the same case, and it is one rule instead of three.
61
+ *
62
+ * The exemption is from VALIDATION, never from TYPING: a live type's declared
63
+ * arguments still travel through every schema-typing walk the analyzer performs.
55
64
  *
56
65
  * Structural (returns a new object, never mutates), and shared so the analyzer
57
66
  * and the kernel exempt the same set.
58
67
  */
59
- export function withStreamPropertiesSkipped(schema,
68
+ export function withLiveValuesSkipped(schema,
60
69
  /** Resolves a `$ref` to the schema it names. Required to see through the
61
70
  * reference form the runtime deliberately KEEPS intact for its validator: a
62
71
  * contract written as `{ $ref: "telo:mod/Type" }` has none of its own
63
72
  * properties, so a walk that cannot follow the reference exempts nothing and
64
- * the stream is traversed after all. */
73
+ * the live value is traversed after all. */
65
74
  resolveRef) {
66
- return stripStreams(schema, [], resolveRef);
75
+ return stripLive(schema, [], resolveRef);
67
76
  }
68
- function stripStreams(node,
77
+ function stripLive(node,
69
78
  // A PATH-scoped guard, not a global memo: a schema object reached twice from
70
79
  // different parents must be stripped twice (a global `seen` would hand the
71
80
  // second parent the unstripped original), while a cycle must still terminate.
@@ -73,7 +82,7 @@ path, resolveRef) {
73
82
  if (Array.isArray(node)) {
74
83
  let changed = false;
75
84
  const items = node.map((item) => {
76
- const next = stripStreams(item, path, resolveRef);
85
+ const next = stripLive(item, path, resolveRef);
77
86
  if (next !== item)
78
87
  changed = true;
79
88
  return next;
@@ -85,6 +94,14 @@ path, resolveRef) {
85
94
  let schema = node;
86
95
  if (path.includes(schema))
87
96
  return schema;
97
+ // The one rule. An empty schema leaves the node DECLARED but unconstrained,
98
+ // rather than deleted: deleting a property would force `additionalProperties:
99
+ // false` open, and a closed contract would stop rejecting unknown keys the
100
+ // moment it grew a stream — trading one exemption for a hole across the whole
101
+ // shape. `required` is untouched for the same reason: a live value IS present,
102
+ // it is only not walked.
103
+ if (isLiveSlot(schema))
104
+ return {};
88
105
  // Follow a whole-document reference to SEE the annotations behind it, but
89
106
  // return the original node when nothing behind it was stripped. Substituting
90
107
  // the resolved target unconditionally would break schema identity — the
@@ -93,7 +110,7 @@ path, resolveRef) {
93
110
  if (resolveRef && typeof schema.$ref === "string") {
94
111
  const target = resolveRef(schema.$ref);
95
112
  if (target && !path.includes(target)) {
96
- const stripped = stripStreams(target, [...path, schema], resolveRef);
113
+ const stripped = stripLive(target, [...path, schema], resolveRef);
97
114
  if (stripped === target)
98
115
  return node;
99
116
  const { $ref: _ref, ...siblings } = schema;
@@ -101,44 +118,24 @@ path, resolveRef) {
101
118
  }
102
119
  }
103
120
  const here = [...path, schema];
104
- let out = schema;
105
- const properties = schema.properties;
106
- if (properties) {
107
- // A stream can be contributed by an `allOf` branch too (how type inheritance
108
- // is expressed before the branches are merged), so the marked set is read
109
- // from the folded view while the removal is applied here.
110
- const streamed = Object.keys(properties).filter((key) => properties[key]?.["x-telo-stream"]);
111
- if (streamed.length > 0) {
112
- const kept = {};
113
- for (const [key, value] of Object.entries(properties)) {
114
- if (!streamed.includes(key))
115
- kept[key] = value;
116
- }
117
- // The key stays DECLARED but unconstrained, rather than being deleted.
118
- // Deleting it would force `additionalProperties: false` open, and a closed
119
- // contract would stop rejecting unknown keys the moment it grew a stream —
120
- // trading one exemption for a hole across the whole shape.
121
- for (const key of streamed)
122
- kept[key] = {};
123
- out = { ...schema, properties: kept };
124
- }
125
- }
126
- // Recurse: a stream one level down (an item, a branch, a nested object) is as
127
- // live as one at the root, and walking it with AJV is the same defect.
121
+ // Recurse: a live value one level down (a property, an item, a branch, a
122
+ // nested object) is as live as one at the root, and walking it with AJV is the
123
+ // same defect. Each is neutralized by the single rule above when the walk
124
+ // reaches it.
128
125
  //
129
126
  // `properties` and `$defs` are MAPS of schemas, not schemas — descending into
130
127
  // them as if they were would visit nothing, since a map has none of the
131
128
  // keywords this walk looks for.
132
- let changed = out !== schema;
133
- const result = { ...out };
129
+ let changed = false;
130
+ const result = { ...schema };
134
131
  for (const key of ["properties", "$defs"]) {
135
- const map = out[key];
132
+ const map = schema[key];
136
133
  if (!map || typeof map !== "object")
137
134
  continue;
138
135
  let mapChanged = false;
139
136
  const next = {};
140
137
  for (const [name, child] of Object.entries(map)) {
141
- const stripped = stripStreams(child, here, resolveRef);
138
+ const stripped = stripLive(child, here, resolveRef);
142
139
  if (stripped !== child)
143
140
  mapChanged = true;
144
141
  next[name] = stripped;
@@ -149,10 +146,10 @@ path, resolveRef) {
149
146
  }
150
147
  }
151
148
  for (const key of ["items", "allOf", "anyOf", "oneOf"]) {
152
- const child = out[key];
149
+ const child = schema[key];
153
150
  if (child === undefined)
154
151
  continue;
155
- const next = stripStreams(child, here, resolveRef);
152
+ const next = stripLive(child, here, resolveRef);
156
153
  if (next !== child) {
157
154
  result[key] = next;
158
155
  changed = true;
@@ -167,7 +164,7 @@ path, resolveRef) {
167
164
  * default would mutate the structure the caller still holds. Bounded by the
168
165
  * schema's defaults rather than by the size of the payload. */
169
166
  export function defaultBearingPaths(schema,
170
- /** See {@link withStreamPropertiesSkipped} — a contract kept in `$ref` form
167
+ /** See {@link withLiveValuesSkipped} — a contract kept in `$ref` form
171
168
  * declares its defaults behind the reference, and a walk that cannot follow
172
169
  * it would report none, leaving the caller's data shared where a fill lands. */
173
170
  resolveRef) {
@@ -1,5 +1,6 @@
1
1
  import type { ResourceManifest } from "@telorun/sdk";
2
2
  import type { Document } from "yaml";
3
+ import type { FileMigrations } from "./migrations/driver.js";
3
4
  import type { DocumentPosition } from "./position-metadata.js";
4
5
  import type { AnalysisDiagnostic, Range } from "./types.js";
5
6
  import type { AstDocument } from "./yaml-ast.js";
@@ -30,6 +31,12 @@ export interface LoadedFile {
30
31
  positions: DocumentPosition[];
31
32
  /** Document-level parse errors aggregated from `yaml.Document.errors`. */
32
33
  parseErrors: ParseError[];
34
+ /** What the migration phase rewrote in this file, and the diagnostics for it.
35
+ * Empty unless the load opted into `migrate` AND a legacy spelling matched.
36
+ * `manifests` above are the POST-migration tree; `documents` / `astDocuments`
37
+ * / `positions` / `text` are always the author's file untouched, which is
38
+ * what the recorded `legacyPath` resolves against. */
39
+ migrations: FileMigrations;
33
40
  }
34
41
  export interface ParseError {
35
42
  documentIndex: number;
@@ -88,6 +95,12 @@ export interface LoadedGraph {
88
95
  * it independently re-resolves an import (the analyzer already sees repointed
89
96
  * `importEdges`). Empty when no module identity appeared at two sources. */
90
97
  overrides: Map<string, string>;
98
+ /** Deprecation diagnostics from the loader's migration phase, scoped to the
99
+ * ENTRY's own module (owner + its `include:` partials). A migration rewrites
100
+ * always — the runtime must read artifacts published years ago — but reports
101
+ * only here, because a published dependency is not the consumer's to fix.
102
+ * Empty unless the load opted into `migrate`. */
103
+ migrationDiagnostics: AnalysisDiagnostic[];
91
104
  /** Diagnostics produced while reconciling module versions — one per import
92
105
  * edge redirected to a different version (warning for a same-major hoist,
93
106
  * error for a major mismatch). Surfaced alongside `analyze()` diagnostics by
@@ -1 +1 @@
1
- {"version":3,"file":"loaded-types.d.ts","sourceRoot":"","sources":["../src/loaded-types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,cAAc,CAAC;AACrD,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,MAAM,CAAC;AACrC,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,wBAAwB,CAAC;AAC/D,OAAO,KAAK,EAAE,kBAAkB,EAAE,KAAK,EAAE,MAAM,YAAY,CAAC;AAC5D,OAAO,KAAK,EAAE,WAAW,EAA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AS,EAAE,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAC/B;;;;sDAIkD;IAClD,oBAAoB,EAAE,kBAAkB,EAAE,CAAC;IAC3C;;;iDAG6C;IAC7C,kBAAkB,EAAE,kBAAkB,EAAE,CAAC;IACzC;;;8EAG0E;IAC1E,gBAAgB,EAAE,kBAAkB,EAAE,CAAC;IACvC;yCACqC;IACrC,MAAM,EAAE,cAAc,EAAE,CAAC;CAC1B;AAED,MAAM,WAAW,cAAc;IAC7B;8BAC0B;IAC1B,GAAG,EAAE,MAAM,CAAC;IACZ;;qEAEiE;IACjE,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,2EAA2E;IAC3E,UAAU,EAAE,MAAM,GAAG,IAAI,CAAC;IAC1B;;gFAE4E;IAC5E,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,4EAA4E;IAC5E,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,KAAK,EAAE,KAAK,CAAC;CACd"}
@@ -15,6 +15,7 @@ export declare class Loader {
15
15
  private readonly urlToSource;
16
16
  protected sources: ManifestSource[];
17
17
  private readonly celEnv;
18
+ private readonly migrations?;
18
19
  /** Sources are resolved in order — the first whose `supports(url)` matches
19
20
  * wins. The caller (composition root) decides which concrete sources exist
20
21
  * and supplies them; `defaultSources()` bundles the browser-safe built-ins
@@ -50,7 +51,13 @@ export declare class Loader {
50
51
  * caller opted in. Desugaring lives here, not in the pure `parseLoadedFile`,
51
52
  * so round-trip consumers (the editor) keep a raw manifest/AST/position
52
53
  * triple they can pair by index; only resolved consumers that pass
53
- * `desugarImports` see synthetic Telo.Import manifests. */
54
+ * `desugarImports` see synthetic Telo.Import manifests.
55
+ *
56
+ * The migration phase runs inside `parseLoadedFile`, i.e. before desugaring —
57
+ * a rule must only ever match author-written nodes, and the position is what
58
+ * makes that structural rather than a convention. Nothing needs the later
59
+ * position: the `imports:` map is read straight off the module manifest and is
60
+ * equally available before desugaring. */
54
61
  private parseAndMaybeDesugar;
55
62
  /** Raw text of any already-cached variant for `source`, so a cache miss on
56
63
  * one (compile, desugar) variant reparses without a second source read. */
@@ -1 +1 @@
1
- {"version":3,"file":"manifest-loader.d.ts","sourceRoot":"","sources":["../src/manifest-loader.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAGV,UAAU,EACV,WAAW,EACX,YAAY,EACb,MAAM,mBAAmB,CAAC;AAK3B,OAAO,EAIL,KAAK,WAAW,EAChB,KAAK,iBAAiB,EACtB,KAAK,cAAc,EACpB,MAAM,YAAY,CAAC;AAwCpB,qBAAa,MAAM;IACjB;;;yEAGqE;IACrE,OAAO,CAAC,QAAQ,CAAC,SAAS,CAAiC;IAE3D;;;;;8BAK0B;IAC1B,OAAO,CAAC,QAAQ,CAAC,WAAW,CAA6B;IAEzD,SAAS,CAAC,OAAO,EAAE,cAAc,EAAE,CAAC;IACpC,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAc;IAErC;;;;mBAIe;gBACH,OAAO,GAAE,cAAc,EAAO,EAAE,OAAO,GAAE,iBAAsB;IAK3E,QAAQ,CAAC,MAAM,EAAE,cAAc,GAAG,IAAI;IAKtC,OAAO,CAAC,IAAI;IAMN,iBAAiB,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC;IAUrD;;;;2CAIuC;IACvC,YAAY,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS;IAI7C;;;;;;;;;gFAS4E;IAC5E,MAAM,CAAC,GAAG,EAAE,MAAM,GAAG,IAAI;IAYzB;;;+BAG2B;IACrB,QAAQ,CAAC,GAAG,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,WAAW,GAAG,OAAO,CAAC,UAAU,CAAC;IAyCvE;;;;gEAI4D;IAC5D,OAAO,CAAC,oBAAoB;IAa5B;gFAC4E;IAC5E,OAAO,CAAC,cAAc;IAQtB;;wEAEoE;IAC9D,UAAU,CAAC,GAAG,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,WAA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AAI;IAMN,iBAAiB,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC;IAUrD;;;;2CAIuC;IACvC,YAAY,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS;IAI7C;;;;;;;;;gFAS4E;IAC5E,MAAM,CAAC,GAAG,EAAE,MAAM,GAAG,IAAI;IAYzB;;;+BAG2B;IACrB,QAAQ,CAAC,GAAG,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,WAAW,GAAG,OAAO,CAAC,UAAU,CAAC;IAyCvE;;;;;;;;;;6CAUyC;IACzC,OAAO,CAAC,oBAAoB;IAe5B;gFAC4E;IAC5E,OAAO,CAAC,cAAc;IAQtB;;wEAEoE;IAC9D,UAAU,CAAC,GAAG,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,WAAW,GAAG,OAAO,CAAC,YAAY,CAAC;IAsB3E;;;qCAGiC;IAC3B,SAAS,CAAC,QAAQ,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,WAAW,GAAG,OAAO,CAAC,WAAW,CAAC;IAkI9E;;;;;;;;sBAQkB;IAClB,gBAAgB,CAAC,UAAU,EAAE,MAAM,EAAE,YAAY,EAAE,MAAM,GAAG,MAAM;IAOlE,OAAO,CAAC,6BAA6B;IAarC,OAAO,CAAC,mCAAmC;IAc3C,OAAO,CAAC,2BAA2B;YAkCrB,eAAe;IAmB7B;;;0CAGsC;IAChC,gBAAgB,CACpB,OAAO,EAAE,MAAM,EACf,OAAO,CAAC,EAAE,WAAW,GACpB,OAAO,CAAC;QAAE,KAAK,EAAE,WAAW,CAAC;QAAC,QAAQ,EAAE,MAAM,CAAA;KAAE,GAAG,IAAI,CAAC;CA0B5D"}
@@ -24,18 +24,34 @@ function collectParseDiagnostics(modules) {
24
24
  }
25
25
  return diagnostics;
26
26
  }
27
+ /** Rewrite always, report locally. Every file in the graph was migrated, but a
28
+ * published dependency's manifest is not the consumer's to fix and its author
29
+ * is the only person who can — so only the entry module's own files (owner +
30
+ * its `include:` partials) report. Same rule `X_TELO_REF_UNRESOLVED` follows. */
31
+ function collectMigrationDiagnostics(entry) {
32
+ const diagnostics = [];
33
+ for (const file of [entry.owner, ...entry.partials]) {
34
+ diagnostics.push(...file.migrations.diagnostics);
35
+ }
36
+ return diagnostics;
37
+ }
27
38
  const SYSTEM_KINDS = new Set([
28
39
  "Telo.Application",
29
40
  "Telo.Library",
30
41
  "Telo.Import",
31
42
  "Telo.Definition",
32
43
  ]);
33
- /** File cache variant tags: compile (c/r) × desugarImports (d/n). A desugared
34
- * and a raw load of the same file are distinct entries so neither sees the
35
- * wrong manifest tree. */
36
- const CACHE_VARIANTS = ["rn", "rd", "cn", "cd"];
44
+ /** File cache variant tags: compile (c/r) × desugarImports (d/n) × migrate
45
+ * (m/x). A desugared and a raw load of the same file are distinct entries so
46
+ * neither sees the wrong manifest tree, and the migration axis is there for
47
+ * the same reason the editor's round-trip view and `telo migrate` must see
48
+ * the author's spelling, everything else the current one. */
49
+ const CACHE_VARIANTS = [
50
+ "rnx", "rdx", "cnx", "cdx",
51
+ "rnm", "rdm", "cnm", "cdm",
52
+ ];
37
53
  function variantKey(options) {
38
- return `${options?.compile ? "c" : "r"}${options?.desugarImports ? "d" : "n"}`;
54
+ return `${options?.compile ? "c" : "r"}${options?.desugarImports ? "d" : "n"}${options?.migrate ? "m" : "x"}`;
39
55
  }
40
56
  export class Loader {
41
57
  /** LoadedFile cache keyed by `${compile ? "compiled" : "raw"}:${source}`.
@@ -52,6 +68,7 @@ export class Loader {
52
68
  urlToSource = new Map();
53
69
  sources;
54
70
  celEnv;
71
+ migrations;
55
72
  /** Sources are resolved in order — the first whose `supports(url)` matches
56
73
  * wins. The caller (composition root) decides which concrete sources exist
57
74
  * and supplies them; `defaultSources()` bundles the browser-safe built-ins
@@ -60,6 +77,7 @@ export class Loader {
60
77
  constructor(sources = [], options = {}) {
61
78
  this.sources = [...sources];
62
79
  this.celEnv = buildCelEnvironment(options.celHandlers);
80
+ this.migrations = options.migrations;
63
81
  }
64
82
  register(source) {
65
83
  this.sources.unshift(source);
@@ -157,11 +175,19 @@ export class Loader {
157
175
  * caller opted in. Desugaring lives here, not in the pure `parseLoadedFile`,
158
176
  * so round-trip consumers (the editor) keep a raw manifest/AST/position
159
177
  * triple they can pair by index; only resolved consumers that pass
160
- * `desugarImports` see synthetic Telo.Import manifests. */
178
+ * `desugarImports` see synthetic Telo.Import manifests.
179
+ *
180
+ * The migration phase runs inside `parseLoadedFile`, i.e. before desugaring —
181
+ * a rule must only ever match author-written nodes, and the position is what
182
+ * makes that structural rather than a convention. Nothing needs the later
183
+ * position: the `imports:` map is read straight off the module manifest and is
184
+ * equally available before desugaring. */
161
185
  parseAndMaybeDesugar(source, requestedUrl, text, options) {
162
186
  const loaded = parseLoadedFile(source, requestedUrl, text, {
163
187
  compile: options?.compile,
164
188
  celEnv: this.celEnv,
189
+ migrate: options?.migrate,
190
+ migrations: this.migrations,
165
191
  });
166
192
  return options?.desugarImports ? desugarLoadedFile(loaded) : loaded;
167
193
  }
@@ -318,6 +344,7 @@ export class Loader {
318
344
  modules,
319
345
  importEdges,
320
346
  overrides,
347
+ migrationDiagnostics: collectMigrationDiagnostics(entry),
321
348
  versionDiagnostics: diagnostics,
322
349
  parseDiagnostics: collectParseDiagnostics(modules),
323
350
  errors,
@@ -1,4 +1,5 @@
1
1
  import type { ResourceDefinition, ResourceManifest } from "@telorun/sdk";
2
+ import { type CelSurface } from "@telorun/templating";
2
3
  import type { AliasResolver } from "./alias-resolver.js";
3
4
  import type { DefinitionRegistry } from "./definition-registry.js";
4
5
  import { type RefFieldEntry, type SchemaFromFieldEntry } from "./reference-field-map.js";
@@ -100,6 +101,9 @@ export interface CelSiteEvent {
100
101
  contextSchema?: Record<string, any>;
101
102
  /** Scope of the matched context (e.g. `$.routes[*].handler`), if matched. */
102
103
  matchedScope?: string;
104
+ /** Where `expr` sits in the scalar at `path`, and the delimiters to restore
105
+ * around a corrected expression. See `CelSurface`. */
106
+ surface: CelSurface;
103
107
  }
104
108
  export interface ManifestVisitor {
105
109
  onResourceEnter?(e: ResourceEnterEvent): void;
@@ -1 +1 @@
1
- {"version":3,"file":"manifest-visitor.d.ts","sourceRoot":"","sources":["../src/manifest-visitor.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,kBAAkB,EAAE,gBAAgB,EAAE,MAAM,cAAc,CAAC;AAEzE,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AACzD,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,0BAA0B,CAAC;AACnE,OAAO,EAML,KAAK,aAAa,EAClB,KAAK,oBAAoB,EAC1B,MAAM,0BAA0B,CAAC;AAGlC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;AAEH,MAAM,WAAW,kBAAkB;IACjC,MAAM,EAAE,gBAAgB,CAAC;IACzB,8EAA8E;IAC9E,UAAU,CAAC,EAAE,kBAAkB,CAAC;CACjC;AAED,MAAM,WAAW,iBAAiB;IAChC,MAAM,EAAE,gBAAgB,CAAC;CAC1B;AAED,MAAM,WAAW,kBAAkB;IACjC,MAAM,EAAE,gBAAgB,CAAC;IACzB,wEAAwE;IACxE,aAAa,EAAE,MAAM,EAAE,CAAC;IACxB,uEAAuE;IACvE,kBAAkB,EAAE,GAAG,CAAC,MAAM,EAAE,gBAAgB,EAAE,CAAC,CAAC;IACpD;iFAC6E;IAC7E,aAAa,EAAE,GAAG,CAAC,MAAM,CAAC,CAAC;IAC3B;;2EAEuE;IACvE,eAAe,EAAE;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,OAAO,EAAE,MAAM,CAAA;KAAE,EAAE,CAAC;CACtD;AAED,MAAM,WAAW,YAAY;IAC3B,MAAM,EAAE,gBAAgB,CAAC;IACzB,uEAAuE;IACvE,SAAS,EAAE,MAAM,CAAC;IAClB,+EAA+E;IAC/E,YAAY,EAAE,MAAM,CAAC;IACrB,gFAAgF;IAChF,KAAK,EAAE,OA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,CAAC;IAC9B,YAAY,CAAC,CAAC,CAAC,EAAE,mBAAmB,GAAG,IAAI,CAAC;IAC5C,KAAK,CAAC,CAAC,CAAC,EAAE,YAAY,GAAG,IAAI,CAAC;IAC9B,cAAc,CAAC,CAAC,CAAC,EAAE,iBAAiB,GAAG,IAAI,CAAC;CAC7C;AAED,MAAM,WAAW,YAAY;IAC3B,OAAO,CAAC,EAAE,aAAa,CAAC;IACxB,eAAe,CAAC,EAAE,GAAG,CAAC,MAAM,EAAE,aAAa,CAAC,CAAC;IAC7C,6EAA6E;IAC7E,SAAS,CAAC,EAAE,WAAW,CAAC,MAAM,CAAC,CAAC;IAChC;;+EAE2E;IAC3E,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB;;;;;;wDAMoD;IACpD,kBAAkB,CAAC,EAAE,OAAO,CAAC;CAC9B;AAsDD,wBAAgB,aAAa,CAC3B,SAAS,EAAE,gBAAgB,EAAE,EAC7B,QAAQ,EAAE,kBAAkB,EAC5B,OAAO,EAAE,eAAe,EACxB,OAAO,GAAE,YAAiB,GACzB,IAAI,CAuKN"}
@@ -1,4 +1,4 @@
1
- import { isRefSentinel, isTaggedSentinel, walkCelExpressions } from "@telorun/templating";
1
+ import { isRefSentinel, isTaggedSentinel, walkCelExpressions, } from "@telorun/templating";
2
2
  import { isRefEntry, isSchemaFromEntry, isScopeEntry, resolveFieldEntries, } from "./reference-field-map.js";
3
3
  import { extractContextsFromSchema, pathMatchesScope } from "./validate-cel-context.js";
4
4
  /** Synthetic entry for a value-tree-discovered ref — these carry no declared
@@ -189,7 +189,7 @@ export function visitManifest(resources, registry, visitor, options = {}) {
189
189
  }
190
190
  if (wantsCel) {
191
191
  const contexts = definition?.schema ? extractContextsFromSchema(definition.schema) : [];
192
- walkCelExpressions(r, "", (expr, path, engineName) => {
192
+ walkCelExpressions(r, "", (expr, path, engineName, surface) => {
193
193
  let contextSchema;
194
194
  let matchedScope;
195
195
  for (const ctx of contexts) {
@@ -199,7 +199,7 @@ export function visitManifest(resources, registry, visitor, options = {}) {
199
199
  break;
200
200
  }
201
201
  }
202
- visitor.onCel({ source: r, path, expr, engineName, contextSchema, matchedScope });
202
+ visitor.onCel({ source: r, path, expr, engineName, contextSchema, matchedScope, surface });
203
203
  });
204
204
  }
205
205
  visitor.onResourceExit?.({ source: r });
@@ -0,0 +1,69 @@
1
+ /** The migration driver — one pass, one set of guarantees.
2
+ *
3
+ * **Composition is the driver's guarantee, not each entry's proof
4
+ * obligation.** The match set is frozen against the pre-migration tree, so no
5
+ * rule can match a node another rule produced; rules within an entry apply in
6
+ * order at each match; entries never see one another's output. That matters
7
+ * once core and module entries are aggregated from different parties, where
8
+ * "it happens to work" is not determinism. Idempotency then follows from the
9
+ * driver rather than from every author getting it right: a rule matches only
10
+ * the legacy spelling, and re-running finds nothing.
11
+ *
12
+ * How a rewrite is REPORTED — the provenance record and the diagnostic — is
13
+ * `report.ts`. Nothing there can change what a migration does, and nothing
14
+ * here decides how it reads. */
15
+ import type { ResourceManifest } from "@telorun/sdk";
16
+ import type { Document } from "yaml";
17
+ import type { MigrationEntry, MigrationRewrite } from "./types.js";
18
+ import type { AnalysisDiagnostic } from "../types.js";
19
+ /** What one file's migration produced. */
20
+ export interface FileMigrations {
21
+ /** One record per applied rewrite, in application order. Empty when the file
22
+ * carried no legacy spelling — the overwhelmingly common case. */
23
+ readonly rewrites: readonly MigrationRewrite[];
24
+ /** One diagnostic per rewrite. Whether they are SURFACED is the graph's
25
+ * decision: a migration rewrites always, because the runtime must read
26
+ * artifacts published years ago, but reports only for the entry's own
27
+ * modules, because a published dependency is not the consumer's to fix. */
28
+ readonly diagnostics: readonly AnalysisDiagnostic[];
29
+ }
30
+ export declare const NO_MIGRATIONS: FileMigrations;
31
+ /**
32
+ * Run `entries` over one file's parsed documents, mutating `manifests` in
33
+ * place. Returns the provenance records and their diagnostics.
34
+ *
35
+ * The manifests are the loader's own projection of the file, never the
36
+ * author's text — nothing here can reach disk.
37
+ */
38
+ export declare function migrateManifests(args: {
39
+ source: string;
40
+ manifests: Array<ResourceManifest | null>;
41
+ entries?: readonly MigrationEntry[];
42
+ }): FileMigrations;
43
+ /**
44
+ * Migrate the author's YAML instead of the loader's tree — the operation
45
+ * `telo migrate` is the reference application of.
46
+ *
47
+ * `manifests` must be the RAW (un-migrated) projection of `documents`, since
48
+ * the matchers select legacy spellings. Returns `null` when nothing matched, so
49
+ * a caller can leave an untouched file untouched rather than rewriting
50
+ * identical bytes.
51
+ *
52
+ * `unwritable` names every rewrite the tree accepted but the TEXT could not
53
+ * express. The two appliers can disagree only in this direction, and the
54
+ * disagreement has to be reported: the diagnostic that sent the author here
55
+ * says "run `telo migrate`", so a location this silently skipped would keep
56
+ * warning with no way to act on it.
57
+ */
58
+ export declare function migrateFileText(args: {
59
+ source: string;
60
+ text: string;
61
+ documents: readonly Document[];
62
+ manifests: ReadonlyArray<ResourceManifest | null>;
63
+ entries?: readonly MigrationEntry[];
64
+ }): {
65
+ text: string;
66
+ rewrites: MigrationRewrite[];
67
+ unwritable: MigrationRewrite[];
68
+ } | null;
69
+ //# sourceMappingURL=driver.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"driver.d.ts","sourceRoot":"","sources":["../../src/migrations/driver.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;iCAaiC;AAEjC,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,cAAc,CAAC;AACrD,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,MAAM,CAAC;AAWrC,OAAO,KAAK,EACV,cAAc,EAGd,gBAAgB,EACjB,MAAM,YAAY,CAAC;AACpB,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,aAAa,CAAC;AAEtD,0CAA0C;AAC1C,MAAM,WAAW,cAAc;IAC7B;uEACmE;IACnE,QAAQ,CAAC,QAAQ,EAAE,SAAS,gBAAgB,EAAE,CAAC;IAC/C;;;gFAG4E;IAC5E,QAAQ,CAAC,WAAW,EAAE,SAAS,kBAAkB,EAAE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