@telorun/analyzer 0.67.0 → 0.69.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/analysis-registry.d.ts +12 -0
- package/dist/analysis-registry.d.ts.map +1 -1
- package/dist/analysis-registry.js +26 -0
- package/dist/analyzer.d.ts.map +1 -1
- package/dist/analyzer.js +23 -0
- package/dist/call-graph.d.ts +80 -1
- package/dist/call-graph.d.ts.map +1 -1
- package/dist/call-graph.js +145 -12
- package/dist/extends-resolution.d.ts +20 -0
- package/dist/extends-resolution.d.ts.map +1 -1
- package/dist/extends-resolution.js +29 -0
- package/dist/import-resolution-diagnostics.d.ts.map +1 -1
- package/dist/import-resolution-diagnostics.js +22 -8
- package/dist/index.d.ts +8 -7
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +6 -6
- package/dist/invocation-contract.d.ts +20 -0
- package/dist/invocation-contract.d.ts.map +1 -1
- package/dist/invocation-contract.js +74 -0
- package/dist/loaded-types.d.ts +4 -4
- package/dist/loaded-types.d.ts.map +1 -1
- package/dist/manifest-analysis.d.ts +19 -0
- package/dist/manifest-analysis.d.ts.map +1 -1
- package/dist/manifest-analysis.js +27 -0
- package/dist/manifest-loader.d.ts +3 -4
- package/dist/manifest-loader.d.ts.map +1 -1
- package/dist/manifest-loader.js +4 -5
- package/dist/manifest-schemas.d.ts +2 -0
- package/dist/manifest-schemas.d.ts.map +1 -1
- package/dist/manifest-schemas.js +4 -0
- package/dist/module-graph.d.ts +500 -0
- package/dist/module-graph.d.ts.map +1 -0
- package/dist/module-graph.js +1411 -0
- package/dist/reconcile-module-versions.d.ts.map +1 -1
- package/dist/reconcile-module-versions.js +10 -11
- package/dist/release/release-plan.d.ts +1 -1
- package/dist/resolve-zone-containment.d.ts +9 -1
- package/dist/resolve-zone-containment.d.ts.map +1 -1
- package/dist/resolve-zone-containment.js +34 -6
- package/dist/resolve-zone-requirements.d.ts.map +1 -1
- package/dist/resolve-zone-requirements.js +4 -2
- package/dist/schema-keywords.d.ts +16 -1
- package/dist/schema-keywords.d.ts.map +1 -1
- package/dist/schema-keywords.js +20 -0
- package/dist/sources/default-sources.d.ts +6 -6
- package/dist/sources/default-sources.d.ts.map +1 -1
- package/dist/sources/default-sources.js +7 -8
- package/dist/sources/integrity.d.ts +3 -2
- package/dist/sources/integrity.d.ts.map +1 -1
- package/dist/sources/integrity.js +26 -3
- package/dist/sources/versioned-ref.d.ts +17 -12
- package/dist/sources/versioned-ref.d.ts.map +1 -1
- package/dist/sources/versioned-ref.js +22 -24
- package/dist/telo-version.d.ts +1 -1
- package/dist/telo-version.js +1 -1
- package/dist/validate-extends.d.ts.map +1 -1
- package/dist/validate-extends.js +42 -1
- package/dist/validate-sensitive-slots.d.ts +28 -0
- package/dist/validate-sensitive-slots.d.ts.map +1 -0
- package/dist/validate-sensitive-slots.js +75 -0
- package/dist/value-type-keyword.d.ts +1 -1
- package/dist/value-type-keyword.d.ts.map +1 -1
- package/dist/value-type-keyword.js +1 -0
- package/package.json +1 -1
- package/src/analysis-registry.ts +37 -0
- package/src/analyzer.ts +26 -0
- package/src/call-graph.ts +207 -14
- package/src/extends-resolution.ts +33 -0
- package/src/import-resolution-diagnostics.ts +24 -7
- package/src/index.ts +42 -5
- package/src/invocation-contract.ts +71 -0
- package/src/loaded-types.ts +4 -4
- package/src/manifest-analysis.ts +39 -0
- package/src/manifest-loader.ts +4 -5
- package/src/manifest-schemas.ts +4 -0
- package/src/module-graph.ts +2005 -0
- package/src/reconcile-module-versions.ts +10 -11
- package/src/release/release-plan.ts +1 -1
- package/src/resolve-zone-containment.ts +49 -9
- package/src/resolve-zone-requirements.ts +7 -2
- package/src/schema-keywords.ts +33 -1
- package/src/sources/default-sources.ts +7 -8
- package/src/sources/integrity.ts +28 -3
- package/src/sources/versioned-ref.ts +26 -28
- package/src/telo-version.ts +1 -1
- package/src/validate-extends.ts +51 -1
- package/src/validate-sensitive-slots.ts +109 -0
- package/src/value-type-keyword.ts +1 -0
- package/dist/sources/module-ref.d.ts +0 -21
- package/dist/sources/module-ref.d.ts.map +0 -1
- package/dist/sources/module-ref.js +0 -36
- package/dist/sources/registry-source.d.ts +0 -14
- package/dist/sources/registry-source.d.ts.map +0 -1
- package/dist/sources/registry-source.js +0 -45
- package/src/sources/module-ref.ts +0 -49
- package/src/sources/registry-source.ts +0 -52
package/dist/index.d.ts
CHANGED
|
@@ -16,14 +16,18 @@ export { applyObservedStateNode, buildObservedStateIndex, buildObservedStateReso
|
|
|
16
16
|
export type { AnalyzedResource, ObservedStateRead } from "./validate-observed-state.js";
|
|
17
17
|
export { moduleScopedDefResolver, scopeResolverForModule } from "./alias-resolver.js";
|
|
18
18
|
export type { ModuleScopes } from "./alias-resolver.js";
|
|
19
|
-
export { ancestorChain, contractDeclarer, controllerBearingAncestor, effectiveAuthorSchema, effectiveContractField, effectiveStatusSchema, hasOwnControllerOrTemplate, inheritedCapability, isInheritedDelegation, mappingFieldFor, needsContractMapping, resolveParent, } from "./extends-resolution.js";
|
|
19
|
+
export { ancestorChain, contractDeclarer, controllerBearingAncestor, effectiveAuthorSchema, effectiveContractField, effectiveStatusSchema, hasOwnControllerOrTemplate, inheritedCapability, isInheritedDelegation, mappingFieldFor, needsContractMapping, publishedOwnFields, resolveParent, } from "./extends-resolution.js";
|
|
20
20
|
export type { ContractDirection, DefResolver } from "./extends-resolution.js";
|
|
21
|
-
export {
|
|
21
|
+
export { validateSensitiveSlots } from "./validate-sensitive-slots.js";
|
|
22
|
+
export type { SensitiveSlotIssue } from "./validate-sensitive-slots.js";
|
|
23
|
+
export { defaultBearingPaths, declaredScalarPaths, PERMISSIVE_CONTRACT, resolveContract, resolveContractSchema, sensitivePaths, withLiveValuesSkipped, } from "./invocation-contract.js";
|
|
22
24
|
export type { ContractOrigin, ContractScope, DeclaredScalarForm, DeclaredScalarPath, ResolvedContract, } from "./invocation-contract.js";
|
|
23
25
|
export { hasIntermediateWildcard, parseRedactionPath, RedactionPathError, } from "./redaction-path.js";
|
|
24
26
|
export type { RedactionSegment } from "./redaction-path.js";
|
|
25
|
-
export { buildCallGraph, projectToPairs, resourceId } from "./call-graph.js";
|
|
27
|
+
export { buildCallGraph, nodeIdFor, projectToPairs, resolveScopedName, resourceId, } from "./call-graph.js";
|
|
26
28
|
export type { BuildCallGraphOptions, CallGraph, CallGraphEdge, CallGraphNode, ResourceGraphNode, StepGraphNode, } from "./call-graph.js";
|
|
29
|
+
export { AMBIENT_CAPABILITIES, buildModuleGraph, contentKey, edgeClassOf, isAmbientCapability, isAmbientHold, isOrderedRow, isUnwired, } from "./module-graph.js";
|
|
30
|
+
export type { BuildModuleGraphOptions, EdgeClass, GraphEdge, GraphKind, GraphNode, GraphPort, GraphRegion, GraphRow, ModuleGraph, ModuleGraphDeps, NodeOwnership, PortSlot, RowKind, } from "./module-graph.js";
|
|
27
31
|
export { buildReferenceFieldMap, isRefEntry, isScopeEntry, satisfiesValueBranch, } from "./reference-field-map.js";
|
|
28
32
|
export type { ReferenceFieldMap, RefFieldEntry, ValueBranchValidator, } from "./reference-field-map.js";
|
|
29
33
|
export { hasDeclaredUse, isRefSlot, isRefUse, possibleUses, readRefSlot, REF_USES, refSlotAnnotation, rewriteRefSlotKinds, transfersControl, } from "./ref-slot.js";
|
|
@@ -64,7 +68,7 @@ export { validateDynamicSelectors, validateRefSlotDeclarations } from "./validat
|
|
|
64
68
|
export type { RefSlotIssue } from "./validate-ref-slots.js";
|
|
65
69
|
export { validateValueTypeSlots } from "./validate-value-type-slots.js";
|
|
66
70
|
export type { ValueTypeSlotIssue } from "./validate-value-type-slots.js";
|
|
67
|
-
export { checkSchemaCompatibility, resolveRefIn, selectUnionBranch } from "./schema-compat.js";
|
|
71
|
+
export { checkSchemaCompatibility, collectProperties, resolveRefIn, selectUnionBranch, } from "./schema-compat.js";
|
|
68
72
|
export type { CompatibilityResult, ExternalSchemaResolver } from "./schema-compat.js";
|
|
69
73
|
export { ajvErrorToPath, formatAjvErrors, formatSingleError, reduceSchemaErrors, schemaIssues, } from "./schema-error-report.js";
|
|
70
74
|
export type { AjvErrorLike, SchemaIssue } from "./schema-error-report.js";
|
|
@@ -87,11 +91,8 @@ export { residualEntrySchema, residualEntrySchemaMap } from "./residual-schema.j
|
|
|
87
91
|
export { buildDocumentPositions, buildLineOffsets, buildPositionIndex, documentLineOffsets, offsetToPosition, } from "./position-metadata.js";
|
|
88
92
|
export type { DocumentPosition } from "./position-metadata.js";
|
|
89
93
|
export { HttpSource } from "./sources/http-source.js";
|
|
90
|
-
export { RegistrySource } from "./sources/registry-source.js";
|
|
91
94
|
export { defaultSources } from "./sources/default-sources.js";
|
|
92
95
|
export { splitIntegrity, foldIntegrity, isCanonicalIntegrity, verifyIntegrity, verifiedFetch, sha256Base64Url, IntegrityError, } from "./sources/integrity.js";
|
|
93
|
-
export { parseModuleRef, isRegistryRef } from "./sources/module-ref.js";
|
|
94
|
-
export type { ParsedModuleRef } from "./sources/module-ref.js";
|
|
95
96
|
export { OCI_SCHEME, isOciRef, parseOciRef } from "./sources/oci-ref.js";
|
|
96
97
|
export type { ParsedOciRef } from "./sources/oci-ref.js";
|
|
97
98
|
export { parseVersionedRef, withRefVersion } from "./sources/versioned-ref.js";
|
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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BAAgB,EAChB,yBAAyB,EACzB,qBAAqB,EACrB,sBAAsB,EACtB,qBAAqB,EACrB,0BAA0B,EAC1B,mBAAmB,EACnB,qBAAqB,EACrB,eAAe,EACf,oBAAoB,EACpB,aAAa,GACd,MAAM,yBAAyB,CAAC;AACjC,YAAY,EAAE,iBAAiB,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAC;AAC9E,OAAO,EACL,mBAAmB,EACnB,mBAAmB,EACnB,mBAAmB,EACnB,eAAe,EACf,qBAAqB,EACrB,qBAAqB,GACtB,MAAM,0BAA0B,CAAC;AAClC,YAAY,EACV,cAAc,EACd,aAAa,EACb,kBAAkB,EAClB,kBAAkB,EAClB,gBAAgB,GACjB,MAAM,0BAA0B,CAAC;AAClC,OAAO,EACL,uBAAuB,EACvB,kBAAkB,EAClB,kBAAkB,GACnB,MAAM,qBAAqB,CAAC;AAC7B,YAAY,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AAC5D,OAAO,
|
|
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,sBAAsB,EACtB,mBAAmB,EACnB,oBAAoB,EACpB,KAAK,iBAAiB,EACtB,KAAK,YAAY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B,CAAC;AAC1D,OAAO,EAAE,gBAAgB,EAAE,MAAM,wBAAwB,CAAC;AAC1D,YAAY,EAAE,WAAW,EAAE,MAAM,wBAAwB,CAAC;AAC1D,OAAO,EAAE,yBAAyB,EAAE,kBAAkB,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AAC1F,YAAY,EACR,kBAAkB,EAClB,eAAe,EACf,cAAc,EACd,aAAa,EACb,iBAAiB,EACjB,WAAW,EACX,cAAc,EACd,QAAQ,EACR,aAAa,EACb,KAAK,EACR,MAAM,YAAY,CAAC;AACpB,cAAc,uBAAuB,CAAC;AAGtC,cAAc,sBAAsB,CAAC;AAIrC,OAAO,EACL,uBAAuB,EACvB,sBAAsB,GACvB,MAAM,4BAA4B,CAAC;AACpC,cAAc,oBAAoB,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -8,10 +8,12 @@ export { BINDINGS_ANNOTATION, bindingContextProperties, bindingDependencies, fin
|
|
|
8
8
|
export { CEL_RESERVED_WORDS, TYPE_LEVEL_DOC_KINDS, checkName, } from "./identifier-name.js";
|
|
9
9
|
export { applyObservedStateNode, buildObservedStateIndex, buildObservedStateResourcesSchema, collectRunReachableNames, observedStateRead, validateObservedStateDeclarations, OBSERVED_STATE_SCHEMA, } from "./validate-observed-state.js";
|
|
10
10
|
export { moduleScopedDefResolver, scopeResolverForModule } from "./alias-resolver.js";
|
|
11
|
-
export { ancestorChain, contractDeclarer, controllerBearingAncestor, effectiveAuthorSchema, effectiveContractField, effectiveStatusSchema, hasOwnControllerOrTemplate, inheritedCapability, isInheritedDelegation, mappingFieldFor, needsContractMapping, resolveParent, } from "./extends-resolution.js";
|
|
12
|
-
export {
|
|
11
|
+
export { ancestorChain, contractDeclarer, controllerBearingAncestor, effectiveAuthorSchema, effectiveContractField, effectiveStatusSchema, hasOwnControllerOrTemplate, inheritedCapability, isInheritedDelegation, mappingFieldFor, needsContractMapping, publishedOwnFields, resolveParent, } from "./extends-resolution.js";
|
|
12
|
+
export { validateSensitiveSlots } from "./validate-sensitive-slots.js";
|
|
13
|
+
export { defaultBearingPaths, declaredScalarPaths, PERMISSIVE_CONTRACT, resolveContract, resolveContractSchema, sensitivePaths, withLiveValuesSkipped, } from "./invocation-contract.js";
|
|
13
14
|
export { hasIntermediateWildcard, parseRedactionPath, RedactionPathError, } from "./redaction-path.js";
|
|
14
|
-
export { buildCallGraph, projectToPairs, resourceId } from "./call-graph.js";
|
|
15
|
+
export { buildCallGraph, nodeIdFor, projectToPairs, resolveScopedName, resourceId, } from "./call-graph.js";
|
|
16
|
+
export { AMBIENT_CAPABILITIES, buildModuleGraph, contentKey, edgeClassOf, isAmbientCapability, isAmbientHold, isOrderedRow, isUnwired, } from "./module-graph.js";
|
|
15
17
|
export { buildReferenceFieldMap, isRefEntry, isScopeEntry, satisfiesValueBranch, } from "./reference-field-map.js";
|
|
16
18
|
export { hasDeclaredUse, isRefSlot, isRefUse, possibleUses, readRefSlot, REF_USES, refSlotAnnotation, rewriteRefSlotKinds, transfersControl, } from "./ref-slot.js";
|
|
17
19
|
export { isStepSlot, readStepSlot, STEP_FRAGMENT } from "./step-slot.js";
|
|
@@ -38,7 +40,7 @@ export { validateZoneViolations } from "./validate-zone-violations.js";
|
|
|
38
40
|
export { containmentIndex, findZoneRegions, regionManifests, } from "./resolve-zone-containment.js";
|
|
39
41
|
export { validateDynamicSelectors, validateRefSlotDeclarations } from "./validate-ref-slots.js";
|
|
40
42
|
export { validateValueTypeSlots } from "./validate-value-type-slots.js";
|
|
41
|
-
export { checkSchemaCompatibility, resolveRefIn, selectUnionBranch } from "./schema-compat.js";
|
|
43
|
+
export { checkSchemaCompatibility, collectProperties, resolveRefIn, selectUnionBranch, } from "./schema-compat.js";
|
|
42
44
|
export { ajvErrorToPath, formatAjvErrors, formatSingleError, reduceSchemaErrors, schemaIssues, } from "./schema-error-report.js";
|
|
43
45
|
export { visitManifest } from "./manifest-visitor.js";
|
|
44
46
|
export { Loader } from "./manifest-loader.js";
|
|
@@ -51,10 +53,8 @@ export { reconcileModuleVersions } from "./reconcile-module-versions.js";
|
|
|
51
53
|
export { residualEntrySchema, residualEntrySchemaMap } from "./residual-schema.js";
|
|
52
54
|
export { buildDocumentPositions, buildLineOffsets, buildPositionIndex, documentLineOffsets, offsetToPosition, } from "./position-metadata.js";
|
|
53
55
|
export { HttpSource } from "./sources/http-source.js";
|
|
54
|
-
export { RegistrySource } from "./sources/registry-source.js";
|
|
55
56
|
export { defaultSources } from "./sources/default-sources.js";
|
|
56
57
|
export { splitIntegrity, foldIntegrity, isCanonicalIntegrity, verifyIntegrity, verifiedFetch, sha256Base64Url, IntegrityError, } from "./sources/integrity.js";
|
|
57
|
-
export { parseModuleRef, isRegistryRef } from "./sources/module-ref.js";
|
|
58
58
|
export { OCI_SCHEME, isOciRef, parseOciRef } from "./sources/oci-ref.js";
|
|
59
59
|
export { parseVersionedRef, withRefVersion } from "./sources/versioned-ref.js";
|
|
60
60
|
export { isLocalPathSource } from "./sources/local-path-ref.js";
|
|
@@ -121,6 +121,26 @@ export declare function defaultBearingPaths(schema: Record<string, any>,
|
|
|
121
121
|
* declares its defaults behind the reference, and a walk that cannot follow
|
|
122
122
|
* it would report none, leaving the caller's data shared where a fill lands. */
|
|
123
123
|
resolveRef?: (ref: string) => Record<string, any> | undefined): string[][];
|
|
124
|
+
/** Every path in `schema` the author marked `x-telo-sensitive: true` — the
|
|
125
|
+
* values a trace payload must carry as `[redacted]` rather than verbatim.
|
|
126
|
+
*
|
|
127
|
+
* It exists because making a credential a dispatched `Telo.Invocable` turns its
|
|
128
|
+
* material into an invoke OUTPUT, and invoke inputs and outputs ride the debug
|
|
129
|
+
* wire on every call under `--inspect` — which is every watch session. The
|
|
130
|
+
* kernel's substring scrubbing does not reach them: it has one call site, the
|
|
131
|
+
* resource-Created event's properties.
|
|
132
|
+
*
|
|
133
|
+
* Declared by the kind that OWNS the contract, so the kernel names no kind and
|
|
134
|
+
* any module opts in — the `x-telo-eval` shape. Exempting "an Http.Credential
|
|
135
|
+
* result" directly would be kind-knowledge in the kernel, and would stop at
|
|
136
|
+
* that one kind while the same token surfaces wherever else a contract carries
|
|
137
|
+
* it.
|
|
138
|
+
*
|
|
139
|
+
* Bounded by the schema's declarations exactly as {@link defaultBearingPaths}
|
|
140
|
+
* is: a contract marking nothing walks nothing at dispatch. The key is kept and
|
|
141
|
+
* only the value replaced, per the logging spec §14 — a payload that silently
|
|
142
|
+
* loses a key reads as a value that was never produced. */
|
|
143
|
+
export declare function sensitivePaths(schema: Record<string, any>, resolveRef?: (ref: string) => Record<string, any> | undefined): string[][];
|
|
124
144
|
/** The scalar form a declared node's value takes at runtime. `int64` and
|
|
125
145
|
* `double` are the two JSON scalars whose runtime representation is NOT decided
|
|
126
146
|
* by the value that arrives: a CEL integer is a BigInt and a CEL double a JS
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"invocation-contract.d.ts","sourceRoot":"","sources":["../src/invocation-contract.ts"],"names":[],"mappings":"AAAA,OAAO,EAAc,KAAK,kBAAkB,EAAe,MAAM,cAAc,CAAC;AAChF,OAAO,EAAE,aAAa,EAA2B,KAAK,YAAY,EAAE,MAAM,qBAAqB,CAAC;AAChG,OAAO,EAAE,kBAAkB,EAAE,MAAM,0BAA0B,CAAC;AAC9D,OAAO,EACL,KAAK,iBAAiB,EAEtB,KAAK,WAAW,EAEjB,MAAM,yBAAyB,CAAC;AAEjC,OAAO,EAGL,KAAK,iBAAiB,EACvB,MAAM,wBAAwB,CAAC;AAEhC,YAAY,EAAE,iBAAiB,EAAE,CAAC;AAElC;;;;;uDAKuD;AACvD,wBAAgB,qBAAqB,CACnC,IAAI,EAAE,kBAAkB,EACxB,OAAO,EAAE,aAAa,EACtB,MAAM,EAAE,YAAY,EACpB,YAAY,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,EAAE,GAClC,aAAa,GAAG;IAAE,SAAS,CAAC,IAAI,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,MAAM,GAAG,kBAA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ACjC,QAAQ,CAAC,IAAI,EAAE,MAAM,EAAE,CAAC;IACxB,QAAQ,CAAC,IAAI,EAAE,kBAAkB,CAAC;CACnC;AAED;;;;;;;;;;;;;;;;;;;;;;;+DAuB+D;AAC/D,wBAAgB,mBAAmB,CACjC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,EAC3B,UAAU,CAAC,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG,SAAS,GAC5D,kBAAkB,EAAE,CAoCtB"}
|
|
@@ -241,6 +241,80 @@ resolveRef) {
|
|
|
241
241
|
walk(schema, [], []);
|
|
242
242
|
return out;
|
|
243
243
|
}
|
|
244
|
+
/** Every path in `schema` the author marked `x-telo-sensitive: true` — the
|
|
245
|
+
* values a trace payload must carry as `[redacted]` rather than verbatim.
|
|
246
|
+
*
|
|
247
|
+
* It exists because making a credential a dispatched `Telo.Invocable` turns its
|
|
248
|
+
* material into an invoke OUTPUT, and invoke inputs and outputs ride the debug
|
|
249
|
+
* wire on every call under `--inspect` — which is every watch session. The
|
|
250
|
+
* kernel's substring scrubbing does not reach them: it has one call site, the
|
|
251
|
+
* resource-Created event's properties.
|
|
252
|
+
*
|
|
253
|
+
* Declared by the kind that OWNS the contract, so the kernel names no kind and
|
|
254
|
+
* any module opts in — the `x-telo-eval` shape. Exempting "an Http.Credential
|
|
255
|
+
* result" directly would be kind-knowledge in the kernel, and would stop at
|
|
256
|
+
* that one kind while the same token surfaces wherever else a contract carries
|
|
257
|
+
* it.
|
|
258
|
+
*
|
|
259
|
+
* Bounded by the schema's declarations exactly as {@link defaultBearingPaths}
|
|
260
|
+
* is: a contract marking nothing walks nothing at dispatch. The key is kept and
|
|
261
|
+
* only the value replaced, per the logging spec §14 — a payload that silently
|
|
262
|
+
* loses a key reads as a value that was never produced. */
|
|
263
|
+
export function sensitivePaths(schema, resolveRef) {
|
|
264
|
+
const out = [];
|
|
265
|
+
const walk = (node, path, chain) => {
|
|
266
|
+
if (!node || typeof node !== "object")
|
|
267
|
+
return;
|
|
268
|
+
let s = node;
|
|
269
|
+
if (chain.includes(s))
|
|
270
|
+
return;
|
|
271
|
+
if (resolveRef && typeof s.$ref === "string") {
|
|
272
|
+
const target = resolveRef(s.$ref);
|
|
273
|
+
if (!target || chain.includes(target))
|
|
274
|
+
return;
|
|
275
|
+
s = { ...target, ...s, $ref: undefined };
|
|
276
|
+
}
|
|
277
|
+
const here = [...chain, node];
|
|
278
|
+
// A marked node is redacted WHOLE, so there is nothing below it to mark:
|
|
279
|
+
// descending would emit paths into a value that is already gone. The EMPTY
|
|
280
|
+
// path is legal and means the whole value — a contract whose entire output
|
|
281
|
+
// is the secret is the simplest shape there is, and refusing it silently
|
|
282
|
+
// (which `path.length > 0` did) left exactly that case unredacted.
|
|
283
|
+
if (s["x-telo-sensitive"] === true) {
|
|
284
|
+
out.push(path);
|
|
285
|
+
return;
|
|
286
|
+
}
|
|
287
|
+
const properties = s.properties;
|
|
288
|
+
if (properties) {
|
|
289
|
+
for (const [key, child] of Object.entries(properties))
|
|
290
|
+
walk(child, [...path, key], here);
|
|
291
|
+
}
|
|
292
|
+
// A map whose VALUES are secrets — `additionalProperties: {x-telo-sensitive}`
|
|
293
|
+
// — is the shape a headers or query bag takes, and it carries no property
|
|
294
|
+
// names to walk. `{}` is the wildcard segment, the `[]` precedent one axis
|
|
295
|
+
// over.
|
|
296
|
+
for (const key of ["additionalProperties", "patternProperties"]) {
|
|
297
|
+
const node = s[key];
|
|
298
|
+
if (!node || typeof node !== "object")
|
|
299
|
+
continue;
|
|
300
|
+
if (key === "additionalProperties")
|
|
301
|
+
walk(node, [...path, "{}"], here);
|
|
302
|
+
else
|
|
303
|
+
for (const child of Object.values(node))
|
|
304
|
+
walk(child, [...path, "{}"], here);
|
|
305
|
+
}
|
|
306
|
+
for (const branch of ["allOf", "anyOf", "oneOf"]) {
|
|
307
|
+
const list = s[branch];
|
|
308
|
+
if (Array.isArray(list))
|
|
309
|
+
for (const child of list)
|
|
310
|
+
walk(child, path, here);
|
|
311
|
+
}
|
|
312
|
+
if (s.items)
|
|
313
|
+
walk(s.items, [...path, "[]"], here);
|
|
314
|
+
};
|
|
315
|
+
walk(schema, [], []);
|
|
316
|
+
return out;
|
|
317
|
+
}
|
|
244
318
|
/** Every path in `schema` whose declared type fixes a scalar representation —
|
|
245
319
|
* the leaves a value must carry in that form for the contract to be TRUE, not
|
|
246
320
|
* merely to pass.
|
package/dist/loaded-types.d.ts
CHANGED
|
@@ -11,9 +11,9 @@ import type { AstDocument } from "./yaml-ast.js";
|
|
|
11
11
|
* cache uses `source` — the URL the source adapter's `read()` returned. */
|
|
12
12
|
export interface LoadedFile {
|
|
13
13
|
/** Canonical identity. The URL the source adapter's `read()` returned —
|
|
14
|
-
* HTTPS for
|
|
14
|
+
* HTTPS for a remote module, an absolute path for local. */
|
|
15
15
|
source: string;
|
|
16
|
-
/** The URL the caller supplied (e.g.
|
|
16
|
+
/** The URL the caller supplied (e.g. `oci://ghcr.io/telorun/javascript@0.3.0`).
|
|
17
17
|
* Differs from `source` only for adapter-resolved URLs. */
|
|
18
18
|
requestedUrl: string;
|
|
19
19
|
/** Raw text exactly as `read()` returned it. */
|
|
@@ -61,8 +61,8 @@ export interface LoadedModule {
|
|
|
61
61
|
export interface ImportEdge {
|
|
62
62
|
/** Canonical resolved URL of the target — a key into `modules`. */
|
|
63
63
|
targetSource: string;
|
|
64
|
-
/** The import's `source` exactly as authored —
|
|
65
|
-
*
|
|
64
|
+
/** The import's `source` exactly as authored — an `oci://` or `https://`
|
|
65
|
+
* ref, or a relative path. Version reconciliation keys on
|
|
66
66
|
* this (minus its version), since it names the module's location
|
|
67
67
|
* independently of what the module declares about itself. */
|
|
68
68
|
targetRef: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"loaded-types.d.ts","sourceRoot":"","sources":["../src/loaded-types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAA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;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;;;;;qEAKiE;IACjE,MAAM,CAAC,EAAE,YAAY,GAAG,iBAAiB,CAAC;IAC1C,KAAK,EAAE,KAAK,CAAC;CACd"}
|
|
@@ -26,6 +26,7 @@ import { AliasResolver } from "./alias-resolver.js";
|
|
|
26
26
|
import { CelScopeQuery, type CelScopeQueryContext } from "./cel-scope-query.js";
|
|
27
27
|
import { DefinitionRegistry } from "./definition-registry.js";
|
|
28
28
|
import type { ContractDirection } from "./extends-resolution.js";
|
|
29
|
+
import { type BuildModuleGraphOptions, type ModuleGraph, type ModuleGraphDeps } from "./module-graph.js";
|
|
29
30
|
/**
|
|
30
31
|
* A reference as the loader leaves it — the internal `{kind, name, alias?}`
|
|
31
32
|
* shape `resolveRefSentinels` rewrites `!ref` into.
|
|
@@ -40,11 +41,29 @@ export declare class ManifestAnalysis {
|
|
|
40
41
|
private readonly ctx;
|
|
41
42
|
private readonly scopes;
|
|
42
43
|
private celScopeQuery;
|
|
44
|
+
private callGraphMemo;
|
|
45
|
+
private moduleGraphMemo;
|
|
43
46
|
constructor(manifests: ResourceManifest[], ctx: CelScopeQueryContext);
|
|
44
47
|
/** What CEL sees, per site. Built on first use — its indices are a function of
|
|
45
48
|
* the whole set, and a host that never opens a CEL body should not pay for
|
|
46
49
|
* them. */
|
|
47
50
|
get celScope(): CelScopeQuery;
|
|
51
|
+
/** What calls what. Built on first use and kept, so the projection and any
|
|
52
|
+
* other consumer over this set share one. */
|
|
53
|
+
private get callGraph();
|
|
54
|
+
/**
|
|
55
|
+
* The module graph: boxes, ordered rows and classed edges — the projection an
|
|
56
|
+
* editor draws.
|
|
57
|
+
*
|
|
58
|
+
* Here rather than on the registry because it is the registry AND a manifest
|
|
59
|
+
* set, which is the pairing this class exists to name; a fifth
|
|
60
|
+
* `registry.x(manifests, …)` factory is the accretion naming it stopped. It
|
|
61
|
+
* shares this analysis's call graph rather than building one of its own.
|
|
62
|
+
*
|
|
63
|
+
* `deps` is supplied by the registry, which owns capability resolution — this
|
|
64
|
+
* class holds the manifests, not the rules for reading a kind.
|
|
65
|
+
*/
|
|
66
|
+
moduleGraph(deps: ModuleGraphDeps, options?: BuildModuleGraphOptions): ModuleGraph;
|
|
48
67
|
/** The manifest a `(kind, name)` pair addresses. */
|
|
49
68
|
resourceFor(kind: string | undefined, name: string | undefined): ResourceManifest | undefined;
|
|
50
69
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"manifest-analysis.d.ts","sourceRoot":"","sources":["../src/manifest-analysis.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,OAAO,KAAK,EAAsB,gBAAgB,EAAE,MAAM,cAAc,CAAC;AACzE,OAAO,EAAE,aAAa,EAAqB,MAAM,qBAAqB,CAAC;AACvE,OAAO,EAAE,aAAa,EAAE,KAAK,oBAAoB,EAAE,MAAM,sBAAsB,CAAC;AAChF,OAAO,EAAE,kBAAkB,EAAE,MAAM,0BAA0B,CAAC;AAC9D,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,yBAAyB,CAAC;
|
|
1
|
+
{"version":3,"file":"manifest-analysis.d.ts","sourceRoot":"","sources":["../src/manifest-analysis.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,OAAO,KAAK,EAAsB,gBAAgB,EAAE,MAAM,cAAc,CAAC;AACzE,OAAO,EAAE,aAAa,EAAqB,MAAM,qBAAqB,CAAC;AACvE,OAAO,EAAE,aAAa,EAAE,KAAK,oBAA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B;AAED,YAAY,EAAE,oBAAoB,EAAE,aAAa,EAAE,kBAAkB,EAAE,CAAC"}
|
|
@@ -1,12 +1,16 @@
|
|
|
1
1
|
import { CelScopeQuery } from "./cel-scope-query.js";
|
|
2
2
|
import { analyzerContractScope, resolveContract } from "./invocation-contract.js";
|
|
3
|
+
import { buildCallGraph } from "./call-graph.js";
|
|
3
4
|
import { findManifest } from "./find-manifest.js";
|
|
5
|
+
import { buildModuleGraph, } from "./module-graph.js";
|
|
4
6
|
import { isModuleKind } from "./module-kinds.js";
|
|
5
7
|
export class ManifestAnalysis {
|
|
6
8
|
manifests;
|
|
7
9
|
ctx;
|
|
8
10
|
scopes;
|
|
9
11
|
celScopeQuery;
|
|
12
|
+
callGraphMemo;
|
|
13
|
+
moduleGraphMemo;
|
|
10
14
|
constructor(manifests, ctx) {
|
|
11
15
|
this.manifests = manifests;
|
|
12
16
|
this.ctx = ctx;
|
|
@@ -23,6 +27,29 @@ export class ManifestAnalysis {
|
|
|
23
27
|
get celScope() {
|
|
24
28
|
return (this.celScopeQuery ??= new CelScopeQuery(this.manifests, this.ctx));
|
|
25
29
|
}
|
|
30
|
+
/** What calls what. Built on first use and kept, so the projection and any
|
|
31
|
+
* other consumer over this set share one. */
|
|
32
|
+
get callGraph() {
|
|
33
|
+
return (this.callGraphMemo ??= buildCallGraph(this.manifests, this.ctx.defs, {
|
|
34
|
+
aliases: this.ctx.aliases,
|
|
35
|
+
aliasesByModule: this.ctx.aliasesByModule,
|
|
36
|
+
}));
|
|
37
|
+
}
|
|
38
|
+
/**
|
|
39
|
+
* The module graph: boxes, ordered rows and classed edges — the projection an
|
|
40
|
+
* editor draws.
|
|
41
|
+
*
|
|
42
|
+
* Here rather than on the registry because it is the registry AND a manifest
|
|
43
|
+
* set, which is the pairing this class exists to name; a fifth
|
|
44
|
+
* `registry.x(manifests, …)` factory is the accretion naming it stopped. It
|
|
45
|
+
* shares this analysis's call graph rather than building one of its own.
|
|
46
|
+
*
|
|
47
|
+
* `deps` is supplied by the registry, which owns capability resolution — this
|
|
48
|
+
* class holds the manifests, not the rules for reading a kind.
|
|
49
|
+
*/
|
|
50
|
+
moduleGraph(deps, options = {}) {
|
|
51
|
+
return (this.moduleGraphMemo ??= buildModuleGraph(this.manifests, this.callGraph, deps, options));
|
|
52
|
+
}
|
|
26
53
|
/** The manifest a `(kind, name)` pair addresses. */
|
|
27
54
|
resourceFor(kind, name) {
|
|
28
55
|
return findManifest(this.manifests, kind, name);
|
|
@@ -10,7 +10,7 @@ export declare class Loader {
|
|
|
10
10
|
* when a URL it has already canonicalised is requested again — kernel
|
|
11
11
|
* load → boot and the import-controller each ask the loader for the same
|
|
12
12
|
* modules. Without this fast path every duplicate request re-runs the
|
|
13
|
-
* source's `read()` (a `fetch` for `
|
|
13
|
+
* source's `read()` (a `fetch` for `HttpSource`, a disk read for
|
|
14
14
|
* `LocalFileSource`). */
|
|
15
15
|
private readonly urlToSource;
|
|
16
16
|
protected sources: ManifestSource[];
|
|
@@ -19,8 +19,7 @@ export declare class Loader {
|
|
|
19
19
|
/** Sources are resolved in order — the first whose `supports(url)` matches
|
|
20
20
|
* wins. The caller (composition root) decides which concrete sources exist
|
|
21
21
|
* and supplies them; `defaultSources()` bundles the browser-safe built-ins
|
|
22
|
-
* (HTTP
|
|
23
|
-
* runtime. */
|
|
22
|
+
* (HTTP) for the common case. `register()` prepends a source at runtime. */
|
|
24
23
|
constructor(sources?: ManifestSource[], options?: LoaderInitOptions);
|
|
25
24
|
register(source: ManifestSource): this;
|
|
26
25
|
private pick;
|
|
@@ -73,7 +72,7 @@ export declare class Loader {
|
|
|
73
72
|
loadGraph(entryUrl: string, options?: LoadOptions): Promise<LoadedGraph>;
|
|
74
73
|
/** Resolve an `import` URL against the file it appears in. Relative /
|
|
75
74
|
* absolute-path forms run through the owning `ManifestSource`'s
|
|
76
|
-
* `resolveRelative`;
|
|
75
|
+
* `resolveRelative`; scheme-qualified refs and full URLs pass through
|
|
77
76
|
* unchanged. Exposed so the import-controller (and any other
|
|
78
77
|
* caller-side resolver) lands on the *exact same* canonical URL the
|
|
79
78
|
* loader used when walking the entry graph — divergent resolution
|
|
@@ -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;AAM3B,OAAO,EAIL,KAAK,WAAW,EAChB,KAAK,iBAAiB,EACtB,KAAK,cAAc,EACpB,MAAM,YAAY,CAAC;AAmHpB,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;IACrC,OAAO,CAAC,QAAQ,CAAC,UAAU,CAAC,CAA4B;IAExD
|
|
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;AAM3B,OAAO,EAIL,KAAK,WAAW,EAChB,KAAK,iBAAiB,EACtB,KAAK,cAAc,EACpB,MAAM,YAAY,CAAC;AAmHpB,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;IACrC,OAAO,CAAC,QAAQ,CAAC,UAAU,CAAC,CAA4B;IAExD;;;iFAG6E;gBAC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|
* when a URL it has already canonicalised is requested again — kernel
|
|
98
98
|
* load → boot and the import-controller each ask the loader for the same
|
|
99
99
|
* modules. Without this fast path every duplicate request re-runs the
|
|
100
|
-
* source's `read()` (a `fetch` for `
|
|
100
|
+
* source's `read()` (a `fetch` for `HttpSource`, a disk read for
|
|
101
101
|
* `LocalFileSource`). */
|
|
102
102
|
urlToSource = new Map();
|
|
103
103
|
sources;
|
|
@@ -106,8 +106,7 @@ export class Loader {
|
|
|
106
106
|
/** Sources are resolved in order — the first whose `supports(url)` matches
|
|
107
107
|
* wins. The caller (composition root) decides which concrete sources exist
|
|
108
108
|
* and supplies them; `defaultSources()` bundles the browser-safe built-ins
|
|
109
|
-
* (HTTP
|
|
110
|
-
* runtime. */
|
|
109
|
+
* (HTTP) for the common case. `register()` prepends a source at runtime. */
|
|
111
110
|
constructor(sources = [], options = {}) {
|
|
112
111
|
this.sources = [...sources];
|
|
113
112
|
this.celEnv = buildCelEnvironment(options.celHandlers);
|
|
@@ -128,7 +127,7 @@ export class Loader {
|
|
|
128
127
|
// entry are populated in `urlToSource` + `fileCache` in one read.
|
|
129
128
|
// Callers (kernel.load) immediately call `loadGraph(entryUrl)`
|
|
130
129
|
// afterwards — without this priming, the entry file would be read
|
|
131
|
-
// twice (twice over the network for `
|
|
130
|
+
// twice (twice over the network for `HttpSource`).
|
|
132
131
|
const file = await this.loadFile(url);
|
|
133
132
|
return file.source;
|
|
134
133
|
}
|
|
@@ -396,7 +395,7 @@ export class Loader {
|
|
|
396
395
|
}
|
|
397
396
|
/** Resolve an `import` URL against the file it appears in. Relative /
|
|
398
397
|
* absolute-path forms run through the owning `ManifestSource`'s
|
|
399
|
-
* `resolveRelative`;
|
|
398
|
+
* `resolveRelative`; scheme-qualified refs and full URLs pass through
|
|
400
399
|
* unchanged. Exposed so the import-controller (and any other
|
|
401
400
|
* caller-side resolver) lands on the *exact same* canonical URL the
|
|
402
401
|
* loader used when walking the entry graph — divergent resolution
|
|
@@ -228,6 +228,7 @@ export declare const InvokeStepSchema: {
|
|
|
228
228
|
when: {
|
|
229
229
|
title: string;
|
|
230
230
|
description: string;
|
|
231
|
+
"x-telo-topology-role": string;
|
|
231
232
|
type: string;
|
|
232
233
|
};
|
|
233
234
|
retry: {
|
|
@@ -781,6 +782,7 @@ export declare const ManifestRootSchema: {
|
|
|
781
782
|
when: {
|
|
782
783
|
title: string;
|
|
783
784
|
description: string;
|
|
785
|
+
"x-telo-topology-role": string;
|
|
784
786
|
type: string;
|
|
785
787
|
};
|
|
786
788
|
retry: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"manifest-schemas.d.ts","sourceRoot":"","sources":["../src/manifest-schemas.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AAKH,eAAO,MAAM,mBAAmB,oBAAoB,CAAC;AAErD,sEAAsE;AACtE,wBAAgB,mBAAmB,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAExD;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;yEA8ByE;AACzE,eAAO,MAAM,iBAAiB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAoB7B,CAAC;AAEF;;;;;;;;;;;;;;GAcG;AACH,eAAO,MAAM,iBAAiB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAwD7B,CAAC;AAEF;;;;;;;;;GASG;AACH,eAAO,MAAM,mBAAmB;;;;;;CAM/B,CAAC;AAEF;;;;;;;;;;;;;;;;;;;GAmBG;AACH,eAAO,MAAM,gBAAgB
|
|
1
|
+
{"version":3,"file":"manifest-schemas.d.ts","sourceRoot":"","sources":["../src/manifest-schemas.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AAKH,eAAO,MAAM,mBAAmB,oBAAoB,CAAC;AAErD,sEAAsE;AACtE,wBAAgB,mBAAmB,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,C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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAW9B,CAAC;AAiDF;;;0EAG0E;AAE1E,wBAAgB,gBAAgB,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAkBtE;AAID;;;;;;;;;;;;;;;;;;GAkBG;AACH,wBAAgB,uBAAuB,CAAC,IAAI,EAAE,OAAO,EAAE,IAAI,cAAoB,GAAG,IAAI,CAGrF;AAiID;;;;;;;GAOG;AACH,wBAAgB,mBAAmB,CAAC,CAAC,SAAS,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAAE,MAAM,EAAE,CAAC,GAAG,CAAC,CAGnF;AA8DD;iEACiE;AACjE,eAAO,MAAM,eAAe,oBAAoB,CAAC;AAEjD;uDACuD;AACvD,wBAAgB,kBAAkB,CAAC,MAAM,EAAE,OAAO,GAAG,MAAM,GAAG,SAAS,CAItE"}
|
package/dist/manifest-schemas.js
CHANGED
|
@@ -230,6 +230,10 @@ export const InvokeStepSchema = {
|
|
|
230
230
|
when: {
|
|
231
231
|
title: "When",
|
|
232
232
|
description: "CEL guard — the dispatch is skipped when it evaluates false.",
|
|
233
|
+
// The same role `if:` and `while:` carry: it is the expression that
|
|
234
|
+
// decides whether the statement runs, and a surface showing what a step
|
|
235
|
+
// is conditional on should not have to know which keyword spelled it.
|
|
236
|
+
"x-telo-topology-role": "predicate",
|
|
233
237
|
type: "string",
|
|
234
238
|
},
|
|
235
239
|
retry: {
|