Skip to content

Telo v0.106.0

Choose a tag to compare

@github-actions github-actions released this 30 Sep 15:23

Packages

Package Version
@telorun/cli 0.106.0
@telorun/analyzer 0.106.0
@telorun/ide-support 0.106.0
@telorun/kernel 0.106.0
@telorun/language-server 0.106.0
@telorun/sdk 0.106.0
@telorun/templating 0.106.0

Minor

A reference slot is now reached wherever a kind's schema writes it: behind a local $ref (target: { $ref: "#/$defs/Target" }), inside a root anyOf / oneOf / allOf branch, under a root additionalProperties (every key but the declared ones and kind / metadata), and at every depth of a recursive $defs shape, as deep as the resource's data goes. Before, telo check was clean at such a slot while the kernel handed a !ref to the controller raw, never created an inline declaration written there (the run failed with "must be a !ref"), and !ref nosuch there went unreported. Now a !ref arrives as the live instance, an inline declaration is extracted and runs, and a missing target is UNRESOLVED_REFERENCE at its concrete path — the same as a plain properties slot. Every consumer — Phase-5 injection, scope creation, the inherited-controller path, inline extraction, !ref resolution, reference validation, the dependency and call graphs, invocation contracts, observed state, peer binding, template bodies and the editor's port list — reads one enumeration of the kind's reach, so telo check and the kernel cannot disagree about where a reference is. A step body is still not a slot — a step's invoke: resolves at dispatch — except a step list whose items are themselves references, as an Application's targets: are. TEMPLATE_REF_COMPUTED and a module graph's forwarded edges now find a value written above a reference slot at any depth of a recursive shape too. An x-telo-schema-from failure the kind alone decides (INVALID_SCHEMA_FROM, an alias-qualified anchor naming nothing) is still reported for every resource of the kind at the declared pattern, now also at patterns behind a local $ref or in a root branch; CONTRACT_SLOT_INPUTS_UNSATISFIABLE and CONTRACT_INPUTS_AT_RUN_SITE name the concrete path. — analyzer, kernel, sdk

A reference slot is paired with an argument map by its own x-telo-ref inputs: pointer, at every shape the reach covers. A site where a slot declares one is checked at the call site against the target's contract (CONTRACT_INPUTS_MISMATCH) and is exempt from CONTRACT_SLOT_INPUTS_UNSATISFIABLE / CONTRACT_INPUTS_AT_RUN_SITE — so a route behind a $ref, in a root branch or under a root additionalProperties whose inputs: supplies what its target requires checks clean and runs, exactly as a plain route does. A sibling marked x-telo-topology-role: inputs no longer pairs a reference slot on its own. A case map's selector default: and the editor's port use are read from the object enclosing the slot as the reach recorded it, so a slot under a root additionalProperties, behind a #/definitions/ pointer or inside a schema-from anchor classifies as a plain slot does; a default a sibling branch declares is never read.

A key one anyOf / oneOf branch declares a reference slot and a sibling branch a plain value (target: { type: string }) — at the schema root or any depth below it — takes that value where the whole object fits that branch: target: hello checks clean and reaches the controller as written. One level below the root this was refused as INVALID_REFERENCE_FORM at check and at boot. In a discriminated union the rest of the object decides — { mode: ref, target: hello } beside a mode: text branch declaring target a string is still INVALID_REFERENCE_FORM, while { mode: text, target: hello } is a value. A value no branch accepts is still refused, and an allOf member or a base properties entry beside a branch is not an alternative. Each value branch is validated against the document its slot is declared in, so one using #/$defs/… compiles.

x-telo-scope is legal only on a named top-level property — one in the schema root's properties or in a root variant's, written directly or through a local $ref — and a scope there (a root anyOf branch, a $ref'd with:) is now stood up. Anywhere else (nested under an object, on an array item, under additionalProperties, inside a recursive shape, below an x-telo-schema-from) is SCOPE_SLOT_MISPLACED at telo check, and the kernel refuses the definition at registration with ERR_SCOPE_SLOT_MISPLACED, a dependency's kind included.

@telorun/analyzer's field-map API is replaced by the reach: buildReferenceFieldMap, isRefEntry, isScopeEntry, ReferenceFieldMap and shapeMatches are removed from the package exports; reachSites and scopeSlotProblems (with the types ReachSite, ReachRef, DeclaredReach, DeclaredReference, SchemaFromResolver, ScopeSlotProblem) are added, and a kind's declared patterns are read through DefinitionRegistry.declaredReachOf. A ReachRef carries its slot's schema node, the enclosing conjunct declarations of the object holding it, and its value alternatives at the site, each with the union members it diverged through and the value at each union's position. PeerBinderRegistry takes declaredReachOf and referenceSites in place of getFieldMap / getFieldMapForKind. ProjectionScope.referenceSlots / ProjectionModules.referenceSlots return CONCRETE paths (tables[0]) rather than patterns (tables[]) — a host still returning patterns matches no hop. AnalysisRegistry.iterateFieldEntries is replaced by referenceSitesOf; ModuleGraphDeps gains refSites and refPositions, and each refFields entry a required uses; a RefSiteEvent carries the site's refs and a StepGraphNode.refSlots entry its uses; a PeerBinderEnv supplies refSitesOf beside refSlotsOf.


Changelogs: cli · analyzer · ide-support · kernel · language-server · sdk · templating