Skip to content

Telo v0.117.0

Choose a tag to compare

@github-actions github-actions released this 16 Oct 19:31
972e899

Packages

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

Minor

A kind can consume a need's fulfilment whole and verify the need's constraints. Telo.NeedType gains version: semver and features: [names], and a need may state version (a range in explicit comparators, >=15.0.0, whose refusals explain themselves in need terms) and features (names its type lists). A reference slot whose kind is a need type takes the fulfilment whole, and x-telo-ref gains observes: [version, features]: the kind reports what it found and the kernel compares it with the outermost need of the whole-forward chain. In Node a controller opens the fulfilment with ctx.resolveNeed(pointer) — its handle, fields, sensitive field names, and the outermost need's constraints and parameters — and reports with ctx.verifyNeed(pointer, { version, features }); a mismatch is ERR_NEED_UNMET, whose data holds need, type, source, required and actual. An observing slot not reported by the end of startup (init() for a provider, run() for a service, the first run() / invoke() otherwise), or a malformed report, is ERR_NEED_OBSERVATION_INVALID. Phase-5 injection no longer places a fulfilment in a slot. — cli, analyzer, kernel, sdk

telo check refuses X_TELO_REF_INVALID_OBSERVES (an observes that is malformed, on a non-need slot, naming a constraint the type does not declare, or on a kind with no observation deadline or no controller of its own — ERR_X_TELO_REF_INVALID_OBSERVES at definition registration), NEED_CONSTRAINT_UNVERIFIED (a stated constraint reaching no observing slot among the module's resources, their inline declarations and its templated kinds' body entries, or through a whole forward), NEED_OPTIONAL_REFERENCED (an optional need at a reference slot), and the version / features cases of NEED_FORWARD_INCOMPATIBLE and NEED_PARAMETERS_INVALID, each raised by the kernel at load as its ERR_ twin — including when the analysis refused the load, which now reports the twin rather than ERR_MANIFEST_VALIDATION_FAILED. The analysis builds every imported library whole (collectModuleDocuments returns every imported library, and the zone stage selects the ones exporting instances), and reports an imported library's need-table defect once at the imports: entry that reaches it. telo needs report entries gain version (or null) and features.

The controller protocol moves to generation telo-6, withdrawing 5: two messages, Need.Resolve and Need.Verify; every conformance vector, every handshake included, states 6, which check:controller-protocol now verifies.

Needs reaching the root are read from the environment, and telo needs report lists them. A Telo.Application declares needs: as a library does, plus env: { <field>: <NAME> } choosing the variable a field is read from. Every need reaching the root unsupplied — the application's own included — is read at load, before any resource initializes, from exactly one environment variable per field: the bound name, otherwise TELO_NEED_ + the need path's segments and the field in upper snake case joined by __ (Orders.databaseAccess field url → TELO_NEED_ORDERS__DATABASE_ACCESS__URL; HTTPServer → HTTP_SERVER). A supply at an import wins over the environment. Values are decoded against the field's schema as a root variable's are, a failure joining the application's ERR_MANIFEST_VALIDATION_FAILED without printing a sensitive value; some variables of a need set and a required one not is ERR_NEED_PARTIALLY_SUPPLIED; a required need with none set is ERR_NEED_UNMET, now naming every variable to set; an optional one is null. Those names are hidden by exact name from process.env and ctx.env. telo check reports NEED_ENV_NAME_COLLISION (two need fields reading one name, or one a variables: / secrets: / ports: entry binds; ERR_NEED_ENV_NAME_COLLISION at load), LIBRARY_ENV_KEY_REJECTED for a library need's env: (ERR_LIBRARY_ENV_KEY_REJECTED), and NEED_FIELD_UNDECLARED / NEED_SLOT_MISMATCH for an env: map. telo needs report <manifest> prints, with nothing booted, every need read from the environment with its fields' variables; -o json writes a versioned document (reportVersion: 1, needs[] of path, declaredBy, type { module, name }, parameters, optional, fields { env, envSource, required, sensitive }). — cli, analyzer, kernel

The analyzer's need table now lists those needs as environment (replacing unmet; a need's supply form unsupplied is now environment), each with its fields' environment names, and exports needGraphScopeOf, derivedNeedEnvName, envNameSegment and NEED_ENV_PREFIX.

telo check and the kernel now judge the same needs and the same observing slots. An observes slot an abstract declares is judged at each implementation in telo check as the kernel judges it at registration, so a templated or sink implementation inheriting one is X_TELO_REF_INVALID_OBSERVES, naming the ancestor that declares the slot, instead of passing the check and failing at boot; a malformed slot is still reported once, at the kind that declares it. A version that version reconciliation lost, and every module only it imports, is no longer judged by the need table, so a defect only they carry refuses neither telo run nor telo needs report. A sensitive need-type field whose mark is not true, or that holds no text, is a need-table refusal: reported in an importer's check at the import that reaches the library, and refused at load for every module as ERR_SENSITIVE_ANNOTATION_INVALID. A load the need table refuses carries every other error the analysis found in the same refusal, each once. — analyzer, ide-support, kernel

A diagnostic naming both a resource and its file is located in that file, so two modules declaring the same name no longer point a reader at the wrong one. The passes that skip what is not an instance recognise a kind document through the one kind-declaration reader, so a Telo.Abstract is no longer a call-graph node; AnalysisRegistry.visitManifest takes a skip document predicate in place of the skipKinds set.

Need types, library needs and their supply at an import. A Telo.NeedType document declares a kind a module can ask for (fields, required, parameters); it registers a Telo.Provider kind served by the kernel's need-type controller, whose resource is a fulfilment publishing exactly its fields. A Telo.Library declares needs: (kind, parameters, optional), read in CEL as resources.<need>.<field> — typed and closed from the type's fields, nullable when optional — and never handed to a controller as an instance (ctx.resolveRef refuses it with ERR_REF_UNRESOLVED). An import's needs: supplies a need whole by !ref to a need or fulfilment of the importer, or field by field with literals and CEL over the importer's scope; a need nobody supplies bubbles to the root. A field marked x-telo-sensitive (a string field, else SENSITIVE_ANNOTATION_INVALID) joins the redaction set of every module context the fulfilment reaches. needs: joins the shared-library agreement. telo check reports NEED_TYPE_UNRESOLVED, NEED_PARAMETERS_INVALID, NEED_FIELD_UNDECLARED, NEED_SLOT_MISMATCH, NEED_UNDECLARED, NEED_FORWARD_INCOMPATIBLE and RESOURCE_INPUT_NEED_TYPE, and the kernel raises each one's ERR_ twin at load, before any resource initializes, for every module the application reaches. The Rust kernel refuses needs:, an import's needs: and a Telo.NeedType with ERR_UNSUPPORTED_MANIFEST_FEATURE. — analyzer, kernel

A need-type kind's schema is closed — a fulfilment's fields: takes exactly the type's fields and requires its required ones — while an undeclared or missing field is still reported once, as NEED_FIELD_UNDECLARED / NEED_SLOT_MISMATCH. The kind carries its document's metadata whole, so metadata.deprecated on a need type gives DEPRECATED_KIND at a fulfilment and its metadata is checked like any kind document's (METADATA_UNKNOWN_FIELD, METADATA_INVALID_TYPE, INVALID_DEPRECATION). The analyzer exports kindDeclarationOf — which kind a document declares, and its definition, the same object for the same document — and isKindDocument; the module graph draws a need type on its kind plane rather than as an instance. TYPE_LEVEL_DOC_KINDS is replaced by isTypeLevelDocument(doc).


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