@telorun/analyzer 0.68.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.
Files changed (70) hide show
  1. package/dist/analysis-registry.d.ts +12 -0
  2. package/dist/analysis-registry.d.ts.map +1 -1
  3. package/dist/analysis-registry.js +26 -0
  4. package/dist/call-graph.d.ts +80 -1
  5. package/dist/call-graph.d.ts.map +1 -1
  6. package/dist/call-graph.js +145 -12
  7. package/dist/import-resolution-diagnostics.d.ts.map +1 -1
  8. package/dist/import-resolution-diagnostics.js +22 -8
  9. package/dist/index.d.ts +4 -5
  10. package/dist/index.d.ts.map +1 -1
  11. package/dist/index.js +3 -4
  12. package/dist/loaded-types.d.ts +4 -4
  13. package/dist/loaded-types.d.ts.map +1 -1
  14. package/dist/manifest-analysis.d.ts +19 -0
  15. package/dist/manifest-analysis.d.ts.map +1 -1
  16. package/dist/manifest-analysis.js +27 -0
  17. package/dist/manifest-loader.d.ts +3 -4
  18. package/dist/manifest-loader.d.ts.map +1 -1
  19. package/dist/manifest-loader.js +4 -5
  20. package/dist/manifest-schemas.d.ts +2 -0
  21. package/dist/manifest-schemas.d.ts.map +1 -1
  22. package/dist/manifest-schemas.js +4 -0
  23. package/dist/module-graph.d.ts +500 -0
  24. package/dist/module-graph.d.ts.map +1 -0
  25. package/dist/module-graph.js +1411 -0
  26. package/dist/reconcile-module-versions.d.ts.map +1 -1
  27. package/dist/reconcile-module-versions.js +10 -11
  28. package/dist/release/release-plan.d.ts +1 -1
  29. package/dist/resolve-zone-containment.d.ts +9 -1
  30. package/dist/resolve-zone-containment.d.ts.map +1 -1
  31. package/dist/resolve-zone-containment.js +34 -6
  32. package/dist/resolve-zone-requirements.d.ts.map +1 -1
  33. package/dist/resolve-zone-requirements.js +4 -2
  34. package/dist/sources/default-sources.d.ts +6 -6
  35. package/dist/sources/default-sources.d.ts.map +1 -1
  36. package/dist/sources/default-sources.js +7 -8
  37. package/dist/sources/integrity.d.ts +3 -2
  38. package/dist/sources/integrity.d.ts.map +1 -1
  39. package/dist/sources/integrity.js +26 -3
  40. package/dist/sources/versioned-ref.d.ts +17 -12
  41. package/dist/sources/versioned-ref.d.ts.map +1 -1
  42. package/dist/sources/versioned-ref.js +22 -24
  43. package/dist/telo-version.d.ts +1 -1
  44. package/dist/telo-version.js +1 -1
  45. package/package.json +1 -1
  46. package/src/analysis-registry.ts +37 -0
  47. package/src/call-graph.ts +207 -14
  48. package/src/import-resolution-diagnostics.ts +24 -7
  49. package/src/index.ts +38 -5
  50. package/src/loaded-types.ts +4 -4
  51. package/src/manifest-analysis.ts +39 -0
  52. package/src/manifest-loader.ts +4 -5
  53. package/src/manifest-schemas.ts +4 -0
  54. package/src/module-graph.ts +2005 -0
  55. package/src/reconcile-module-versions.ts +10 -11
  56. package/src/release/release-plan.ts +1 -1
  57. package/src/resolve-zone-containment.ts +49 -9
  58. package/src/resolve-zone-requirements.ts +7 -2
  59. package/src/sources/default-sources.ts +7 -8
  60. package/src/sources/integrity.ts +28 -3
  61. package/src/sources/versioned-ref.ts +26 -28
  62. package/src/telo-version.ts +1 -1
  63. package/dist/sources/module-ref.d.ts +0 -21
  64. package/dist/sources/module-ref.d.ts.map +0 -1
  65. package/dist/sources/module-ref.js +0 -36
  66. package/dist/sources/registry-source.d.ts +0 -14
  67. package/dist/sources/registry-source.d.ts.map +0 -1
  68. package/dist/sources/registry-source.js +0 -45
  69. package/src/sources/module-ref.ts +0 -49
  70. package/src/sources/registry-source.ts +0 -52
@@ -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 http/registry, an absolute path for local. */
14
+ * HTTPS for a remote module, an absolute path for local. */
15
15
  source: string;
16
- /** The URL the caller supplied (e.g. registry ref `std/javascript@0.3.0`).
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 — a registry ref, an `oci://`
65
- * or `https://` ref, or a relative path. Version reconciliation keys on
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,EAAE,gBAAgB,EAAE,MAAM,cAAc,CAAC;AACrD,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,MAAM,CAAC;AACrC,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAC;AAC7D,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,EAAE,MAAM,eAAe,CAAC;AAEjD;;;;4EAI4E;AAC5E,MAAM,WAAW,UAAU;IACzB;+DAC2D;IAC3D,MAAM,EAAE,MAAM,CAAC;IACf;gEAC4D;IAC5D,YAAY,EAAE,MAAM,CAAC;IACrB,gDAAgD;IAChD,IAAI,EAAE,MAAM,CAAC;IACb;;+EAE2E;IAC3E,SAAS,EAAE,QAAQ,EAAE,CAAC;IACtB;+EAC2E;IAC3E,YAAY,EAAE,WAAW,EAAE,CAAC;IAC5B,6EAA6E;IAC7E,SAAS,EAAE,KAAK,CAAC,gBAAgB,GAAG,IAAI,CAAC,CAAC;IAC1C,0EAA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;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;;;;;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;AAKjE;;;GAGG;AACH,MAAM,WAAW,WAAW;IAC1B,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED,qBAAa,gBAAgB;IAKzB,QAAQ,CAAC,SAAS,EAAE,gBAAgB,EAAE;IACtC,OAAO,CAAC,QAAQ,CAAC,GAAG;IALtB,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAe;IACtC,OAAO,CAAC,aAAa,CAA4B;gBAGtC,SAAS,EAAE,gBAAgB,EAAE,EACrB,GAAG,EAAE,oBAAoB;IAS5C;;gBAEY;IACZ,IAAI,QAAQ,IAAI,aAAa,CAE5B;IAED,oDAAoD;IACpD,WAAW,CAAC,IAAI,EAAE,MAAM,G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,OAAO,CAAC,eAAe,CAA0B;gBAGtC,SAAS,EAAE,gBAAgB,EAAE,EACrB,GAAG,EAAE,oBAAoB;IAS5C;;gBAEY;IACZ,IAAI,QAAQ,IAAI,aAAa,CAE5B;IAED;kDAC8C;IAC9C,OAAO,KAAK,SAAS,GAKpB;IAED;;;;;;;;;;;OAWG;IACH,WAAW,CAAC,IAAI,EAAE,eAAe,EAAE,OAAO,GAAE,uBAA4B,GAAG,WAAW;IAStF,oDAAoD;IACpD,WAAW,CAAC,IAAI,EAAE,MAAM,GAAG,SAAS,EAAE,IAAI,EAAE,MAAM,GAAG,SAAS,GAAG,gBAAgB,GAAG,SAAS;IAI7F;;;;;;;;OAQG;IACH,WAAW,CAAC,GAAG,EAAE,WAAW,EAAE,SAAS,EAAE,iBAAiB,GAAG,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG,SAAS;IAiB5F;;;;;;;;OAQG;IACH,OAAO,CAAC,UAAU;IAqBlB,OAAO,CAAC,aAAa;CAItB;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 `RegistrySource`, a disk read 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 + registry) for the common case. `register()` prepends a source at
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`; registry refs and full URLs pass through
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;;;;mBAIe;gBACH,OAAO,GAAE,cAAc,EAAO,EAAE,OAAO,GAAE,iBAAsB;IAM3E,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,EAA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,IAAI,CAAC;CA0B5D"}
@@ -97,7 +97,7 @@ export class Loader {
97
97
  * 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 `RegistrySource`, a disk read 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 + registry) for the common case. `register()` prepends a source at
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 `RegistrySource`).
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`; registry refs and full URLs pass through
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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA+E5B,CAAC;AAEF;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,eAAO,MAAM,iBAAiB;;;;;;CAM7B,CAAC;AAEF;;;;;;;;;;;;;;GAcG;AACH,eAAO,MAAM,gBAAgB;;;;;;CAO5B,CAAC;AA4BF;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,eAAO,MAAM,UAAU;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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AAC,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"}
@@ -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: {