@telorun/editor-protocol 0.2.0 → 0.3.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/README.md CHANGED
@@ -170,7 +170,7 @@ for that owner, like the owner's documents.
170
170
 
171
171
  | Method | Params | Result |
172
172
  | --- | --- | --- |
173
- | `telo/viewModel` | `{ owner }` | the owner's [view model](#the-view-model), or `null` when the engine is not analysing `owner`. |
173
+ | `telo/viewModel` | `{ owner, configuration? }` | the owner's [view model](#the-view-model), or `null` when the engine is not analysing `owner`. |
174
174
  | `telo/celCompletion` | `{ owner, resource: { kind, name }, path, tag, text, offset }` | LSP `CompletionItem[]` for a CEL value typed into a structured form field, which is not document text yet; `[]` when the engine is not analysing `owner`. |
175
175
 
176
176
  `telo/celCompletion` answers what completion inside that value would offer were
@@ -188,7 +188,18 @@ engine's diagnostics come from, at the module's own telo version, and is plain
188
188
  JSON. JSON Schemas in it are plain JSON objects.
189
189
 
190
190
  - `owner`, `revision` — as in `telo/viewModelChanged`.
191
- - `moduleGraph` — the owner module drawn as a graph (below), or `null`.
191
+ - `moduleGraph` — the owner module drawn as a graph (below), or `null`. When
192
+ the module writes `!if` / `!switch` choices it is drawn in one configuration:
193
+ the request's `configuration` (an assignment `{ "<dimension path>": value }`;
194
+ a dimension it leaves out, or gives a value outside the dimension's domain,
195
+ takes its default), else every dimension's default.
196
+ - `configurations?` — present when the module writes a choice:
197
+ `dimensions` (`{ key, values, default }` per dimension a choice reads — a
198
+ variable or secret declared `enum` / `const` / boolean, a member a value
199
+ type's argument binds, a `default: null` input's presence, a need's presence,
200
+ and for a library its `resources.<input>` presence; `default` is the declared
201
+ `default:`, a presence dimension's `absent`, else the first value) and
202
+ `selected`, the complete assignment `moduleGraph` is drawn in.
192
203
  - `moduleRootSchema` — the schema of the owner's module document kind
193
204
  (`Telo.Application` / `Telo.Library`), or `null`.
194
205
  - `kindSpellings` — every `kind:` spelling in the owner's import closure
@@ -243,17 +254,30 @@ A **module graph** is `{ root?, nodes, edges, regions, kinds }`:
243
254
  `imported`, `injected`, `enclosing`, `forwarded`), `owner?` / `ownerSite?`
244
255
  (the node and site declaring an owned declaration), `module?`, `external?`,
245
256
  `alias?`, `ports`, `rows`, `rowArrays` (`{ field, kind }` per array the kind
246
- can hold rows in), `throws?` (`{ codes, unbounded }`) and `root?`;
257
+ can hold rows in), `throws?` (`{ codes, unbounded }`), `root?`, `choice?`,
258
+ `choices?` and `family?`. A declaration-position `!if` / `!switch` is ONE node
259
+ identified by its name: `choice` is `{ path: "", tag, alternatives, selected }`
260
+ (an alternative is `{ key, kind? }` — `then`, `else`, `default` or a case key,
261
+ `absent` for an `!if` with no `else:`; `selected` the key the drawn
262
+ configuration takes), and only the node's `kind` follows the configuration,
263
+ never its `id`. `choices` lists the choices written in the node's fields (the
264
+ same shape, `path` the written field path). `family` (`{ source, as }`) marks
265
+ a `!for-each` at a declaration position of a template body: one node under
266
+ the family's name, with no node per element;
247
267
  - a **port** is a reference slot the kind declares, filled or not: `slot` (its
248
268
  field-map path), `refs` (accepted constraints, canonical), `capabilities`,
249
269
  `array`, `class`, `slots` (`{ path, target?, targetNode?, inline? }` per
250
270
  occupancy), `addPath?` and `rowOwned?`;
251
271
  - a **row** is an ordered entry of a node: `id`, `kind` (`step`, `entry`,
252
- `target`, `inline`, `reference`, `export`), `name?`, `path`, `array`,
272
+ `target`, `repeat`, `inline`, `reference`, `export`), `name?`, `path`, `array`,
253
273
  `index`, `depth`, `parent?`, `target?`, `targetNode?`, `inputs?`, `match?`,
254
274
  `variant?`, `variantLabel?`, `predicate?`, `catches?`, `dispatch?`
255
275
  (`{ path, refs, inline?, alternatives? }`, where the call is written and
256
- what may fill it), `declares?` and `unknownKind?`;
276
+ what may fill it), `declares?`, `unknownKind?`, `repeat?` and `emitted?`. A
277
+ `repeat` row is a `!for-each` in a list (`{ source, as }`), identified by its
278
+ source and its ordinal among the list's repeats of that source; `emitted` is
279
+ the identity text of a step a repeat emitted, which carries it in place of a
280
+ `name`;
257
281
  - an **edge** is a reference site, classed: `id`, `from`, `to?`, `toName`,
258
282
  `class` (`flow`, `holds`, `shape`, `data`), `use` (the slot's declared uses:
259
283
  `schema`, `dependency`, `call`, `detached`, `trigger.inbound`,
@@ -273,7 +297,8 @@ Every diagnostic the engine publishes may carry:
273
297
  ```ts
274
298
  { fix?: { replacement: string; tag?: "ref" | "cel" | "module-path" },
275
299
  resource?: { kind: string; name: string },
276
- path?: string }
300
+ path?: string,
301
+ configurations?: Array<Record<string, unknown>> }
277
302
  ```
278
303
 
279
304
  `fix` is a mechanically applicable repair — the whole corrected value at the
@@ -282,7 +307,18 @@ returns the diagnostic unchanged in a `textDocument/codeAction` request's
282
307
  context, and the engine answers with the quick fix that applies it. `resource`
283
308
  and `path` locate the offending value inside a manifest (a host may use them to
284
309
  place a diagnostic on a form field). `Diagnostic.tags` carries LSP's
285
- `Deprecated` / `Unnecessary`.
310
+ `Deprecated` / `Unnecessary`. `configurations` is present only on a diagnostic
311
+ that holds in some configurations of the application and not all (a diagnostic
312
+ in every configuration carries none): a list of **partial assignments**, each
313
+ `{ "<dimension path>": <JSON value> }` — an enum, const or boolean as itself,
314
+ a presence dimension as `"present"` / `"absent"`, an absent dimension input as
315
+ `null`. An entry names only the dimensions it narrows, each to one value; a
316
+ dimension it leaves out holds every value, so the diagnostic holds in a
317
+ configuration when **some entry agrees with it on every key the entry names**
318
+ (an entry naming none holds everywhere). A block spanning several values of a
319
+ dimension is one entry per value. The list is empty when the diagnostic holds
320
+ in no configuration (a branch nothing takes). The configuration label lives in
321
+ `message` only.
286
322
 
287
323
  ## Commands
288
324
 
@@ -296,7 +332,11 @@ The engine's code lenses over an `imports:` block name the first two.
296
332
 
297
333
  ## Generations
298
334
 
299
- `TELO_EDITOR_PROTOCOL` is the generation this package describes (`1`).
335
+ `TELO_EDITOR_PROTOCOL` is the generation this package describes (`2`).
336
+ Generation 2 made `Diagnostic.data.configurations` a list of partial
337
+ assignments; generation 1 listed complete ones, so a host reading entries as
338
+ complete would misread every diagnostic. A complete assignment reads correctly
339
+ as a partial one, so a host of generation 2 also speaks generation 1.
300
340
  **Additions within a generation are negotiated by capability**: a new request, a
301
341
  new optional field or a new command is advertised by the side that has it and
302
342
  used only when advertised, so an older host and a newer engine (or the reverse)
package/dist/index.d.ts CHANGED
@@ -1,6 +1,6 @@
1
1
  /** The protocol generation this package describes. Additions within a
2
2
  * generation are negotiated by capability; an incompatible change bumps it. */
3
- export declare const TELO_EDITOR_PROTOCOL = 1;
3
+ export declare const TELO_EDITOR_PROTOCOL = 2;
4
4
  /** What an engine advertises under `ServerCapabilities.experimental`. */
5
5
  export interface TeloExperimentalCapabilities {
6
6
  telo: TeloProtocolCapability;
@@ -141,6 +141,9 @@ export interface ViewModelChangedParams {
141
141
  /** `telo/viewModel`: the structured-view model of one owner module. */
142
142
  export interface ViewModelParams {
143
143
  owner: string;
144
+ /** The assignment to draw the module graph in, keyed by dimension; a
145
+ * dimension left out takes its default. */
146
+ configuration?: Record<string, unknown>;
144
147
  }
145
148
  /** `null` when the engine is not analysing `owner`. */
146
149
  export type ViewModelResult = ViewModel | null;
@@ -214,6 +217,9 @@ export interface ViewModel {
214
217
  revision: number;
215
218
  /** The owner module drawn as a graph. */
216
219
  moduleGraph: ModuleGraphData | null;
220
+ /** The configurations `moduleGraph` can be drawn in. Absent when the module
221
+ * writes no `!if` / `!switch` choice. */
222
+ configurations?: ViewModelConfigurations;
217
223
  /** The schema of the owner's module document kind. */
218
224
  moduleRootSchema: JsonSchema | null;
219
225
  /** Each `kind:` spelling in the closure, and each constraint in
@@ -240,6 +246,40 @@ export interface ViewModel {
240
246
  * not computed from. */
241
247
  documents: Record<string, number>;
242
248
  }
249
+ /** One axis of the configuration picker: the path it is read at, its domain
250
+ * and the value a picker starts at (a presence dimension: `absent`). */
251
+ export interface GraphDimension {
252
+ key: string;
253
+ values: unknown[];
254
+ default: unknown;
255
+ }
256
+ export interface ViewModelConfigurations {
257
+ dimensions: GraphDimension[];
258
+ /** The assignment `moduleGraph` is drawn in, every dimension present. */
259
+ selected: Record<string, unknown>;
260
+ }
261
+ /** One alternative of a choice: `then`, `else`, `default`, a case key, or
262
+ * `absent` (an `!if` with no `else:` whose condition is false). At a
263
+ * declaration position it carries the kind the branch declares. */
264
+ export interface GraphAlternative {
265
+ key: string;
266
+ kind?: string;
267
+ }
268
+ /** A `!if` / `!switch` drawn at a box. At a declaration position (`path` is
269
+ * `""`) the box is the choice, identified by its name — only its kind follows
270
+ * the selected configuration. */
271
+ export interface GraphChoice {
272
+ path: string;
273
+ tag: "if" | "switch";
274
+ alternatives: GraphAlternative[];
275
+ selected: string | null;
276
+ }
277
+ /** A `!for-each` drawn as one box (a family) or one row (a repeat in a list),
278
+ * never one per element. */
279
+ export interface GraphRepeat {
280
+ source: string;
281
+ as: string;
282
+ }
243
283
  export interface RefConstraint {
244
284
  accepted: string[];
245
285
  userFacing: string[];
@@ -297,7 +337,7 @@ export interface ModuleGraphData {
297
337
  export type NodeOwnership = string;
298
338
  /** `flow` | `holds` | `shape` | `data`. */
299
339
  export type EdgeClass = string;
300
- /** `step` | `entry` | `target` | `inline` | `reference` | `export`. */
340
+ /** `step` | `entry` | `target` | `repeat` | `inline` | `reference` | `export`. */
301
341
  export type RowKind = string;
302
342
  export interface GraphNodeData {
303
343
  id: string;
@@ -323,6 +363,9 @@ export interface GraphNodeData {
323
363
  unbounded: boolean;
324
364
  };
325
365
  root?: boolean;
366
+ choice?: GraphChoice;
367
+ choices?: GraphChoice[];
368
+ family?: GraphRepeat;
326
369
  }
327
370
  export interface GraphPortData {
328
371
  slot: string;
@@ -367,6 +410,10 @@ export interface GraphRowData {
367
410
  };
368
411
  declares?: string;
369
412
  unknownKind?: boolean;
413
+ /** `repeat` rows: the loop the list item is. */
414
+ repeat?: GraphRepeat;
415
+ /** A step a template repeat emitted: its identity text, in place of `name`. */
416
+ emitted?: string;
370
417
  }
371
418
  export interface GraphEdgeData {
372
419
  id: string;
@@ -433,6 +480,13 @@ export interface TeloDiagnosticData {
433
480
  };
434
481
  /** Dotted path of the offending value within that resource. */
435
482
  path?: string;
483
+ /** Present only on a diagnostic that holds in some configurations of the
484
+ * application but not all: partial assignments covering where it holds, each
485
+ * `{ "<dimension path>": <JSON value> }` naming only the dimensions it
486
+ * narrows (one it leaves out holds every value; the diagnostic holds where
487
+ * some entry agrees on every key it names). Empty when it holds in none. The
488
+ * label is in `message` only. */
489
+ configurations?: Array<Record<string, unknown>>;
436
490
  }
437
491
  /** `workspace/executeCommand` commands an engine serves. The two upgrade
438
492
  * commands take `[{ uri, aliases }]` and apply through `workspace/applyEdit`;
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAKA;gFACgF;AAChF,eAAO,MAAM,oBAAoB,IAAI,CAAC;AAEtC,yEAAyE;AACzE,MAAM,WAAW,4BAA4B;IAC3C,IAAI,EAAE,sBAAsB,CAAC;CAC9B;AAED,MAAM,WAAW,sBAAsB;IACrC,wCAAwC;IACxC,QAAQ,EAAE,MAAM,CAAC;IACjB;mCAC+B;IAC/B,SAAS,CAAC,EAAE,OAAO,CAAC;CACrB;AAED;gCACgC;AAChC,eAAO,MAAM,oBAAoB,cAAc,CAAC;AAEhD;;;eAGe;AACf,eAAO,MAAM,gBAAgB,SAAS,CAAC;AAEvC;;qCAEqC;AACrC,eAAO,MAAM,UAAU;;;;;;;;;;CAUb,CAAC;AACX,MAAM,MAAM,UAAU,GAAG,CAAC,OAAO,UAAU,CAAC,CAAC,MAAM,OAAO,UAAU,CAAC,CAAC;AAItE;;0CAE0C;AAC1C,MAAM,WAAW,UAAU;IACzB,GAAG,EAAE,MAAM,CAAC;CACb;AAED;;;0CAG0C;AAC1C,MAAM,MAAM,UAAU,GAAG;IAAE,GAAG,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,MAAM,CAAA;CAAE,GAAG,IAAI,CAAC;AAE9D;sDACsD;AACtD,MAAM,WAA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2EAC2E;AAC3E,MAAM,WAAW,kBAAkB;IACjC,GAAG,CAAC,EAAE,aAAa,CAAC;IACpB,gDAAgD;IAChD,QAAQ,CAAC,EAAE;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,CAAA;KAAE,CAAC;IAC1C,+DAA+D;IAC/D,IAAI,CAAC,EAAE,MAAM,CAAC;IACd;;;;;sCAKkC;IAClC,cAAc,CAAC,EAAE,KAAK,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,CAAC;CACjD;AAID;;iCAEiC;AACjC,eAAO,MAAM,WAAW;;;;CAId,CAAC;AACX,MAAM,MAAM,WAAW,GAAG,CAAC,OAAO,WAAW,CAAC,CAAC,MAAM,OAAO,WAAW,CAAC,CAAC;AAEzE,MAAM,WAAW,uBAAuB;IACtC,GAAG,EAAE,MAAM,CAAC;IACZ,OAAO,EAAE,MAAM,EAAE,CAAC;CACnB"}
package/dist/index.js CHANGED
@@ -4,7 +4,7 @@
4
4
  // through `editor-protocol-schema.json` — can speak it. `README.md` is the spec.
5
5
  /** The protocol generation this package describes. Additions within a
6
6
  * generation are negotiated by capability; an incompatible change bumps it. */
7
- export const TELO_EDITOR_PROTOCOL = 1;
7
+ export const TELO_EDITOR_PROTOCOL = 2;
8
8
  /** The file a module directory is read as: `telo/read` of a directory answers
9
9
  * with this file inside it. */
10
10
  export const TELO_MODULE_FILENAME = "telo.yaml";
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "$schema": "http://json-schema.org/draft-07/schema#",
3
3
  "$id": "https://telo.run/schemas/editor-protocol.json",
4
- "title": "Telo editor protocol, generation 1",
4
+ "title": "Telo editor protocol, generation 2",
5
5
  "description": "The messages an editor host and a telo language-server engine exchange beyond LSP itself. Each request — host-served (engine to host) or engine-served (host to engine) — has a `<Name>Params` and a `<Name>Result` definition; `RequirementsParams` and `ViewModelChangedParams` are the engine-to-host `telo/requirements` and `telo/viewModelChanged` notifications; `TeloDiagnosticData` is what an engine puts in `Diagnostic.data`; `ExperimentalCapabilities` is what an engine advertises under `ServerCapabilities.experimental`. `x-telo-methods` maps each method name to its definitions. Objects are open and enumerations list the values known to this generation: a receiver ignores a member it does not know and reads an unknown enumeration value as its least-capable value (README.md, Generations). See README.md for the handshake and the generation rule.",
6
6
  "x-telo-methods": {
7
7
  "telo/read": {
@@ -340,6 +340,10 @@
340
340
  "properties": {
341
341
  "owner": {
342
342
  "type": "string"
343
+ },
344
+ "configuration": {
345
+ "description": "The assignment to draw the module graph in; a dimension left out takes its default.",
346
+ "type": "object"
343
347
  }
344
348
  }
345
349
  },
@@ -605,6 +609,9 @@
605
609
  "additionalProperties": {
606
610
  "type": "integer"
607
611
  }
612
+ },
613
+ "configurations": {
614
+ "$ref": "#/$defs/ViewModelConfigurations"
608
615
  }
609
616
  }
610
617
  },
@@ -916,6 +923,18 @@
916
923
  },
917
924
  "root": {
918
925
  "type": "boolean"
926
+ },
927
+ "choice": {
928
+ "$ref": "#/$defs/GraphChoice"
929
+ },
930
+ "choices": {
931
+ "type": "array",
932
+ "items": {
933
+ "$ref": "#/$defs/GraphChoice"
934
+ }
935
+ },
936
+ "family": {
937
+ "$ref": "#/$defs/GraphRepeat"
919
938
  }
920
939
  }
921
940
  },
@@ -1016,6 +1035,7 @@
1016
1035
  "step",
1017
1036
  "entry",
1018
1037
  "target",
1038
+ "repeat",
1019
1039
  "inline",
1020
1040
  "reference",
1021
1041
  "export"
@@ -1115,6 +1135,12 @@
1115
1135
  },
1116
1136
  "unknownKind": {
1117
1137
  "type": "boolean"
1138
+ },
1139
+ "repeat": {
1140
+ "$ref": "#/$defs/GraphRepeat"
1141
+ },
1142
+ "emitted": {
1143
+ "type": "string"
1118
1144
  }
1119
1145
  }
1120
1146
  },
@@ -1374,6 +1400,12 @@
1374
1400
  },
1375
1401
  "path": {
1376
1402
  "type": "string"
1403
+ },
1404
+ "configurations": {
1405
+ "type": "array",
1406
+ "items": {
1407
+ "type": "object"
1408
+ }
1377
1409
  }
1378
1410
  }
1379
1411
  },
@@ -1394,6 +1426,111 @@
1394
1426
  }
1395
1427
  }
1396
1428
  }
1429
+ },
1430
+ "GraphAlternative": {
1431
+ "type": "object",
1432
+ "required": [
1433
+ "key"
1434
+ ],
1435
+ "properties": {
1436
+ "key": {
1437
+ "description": "then, else, default, a case key, or absent (an if with no else whose condition is false).",
1438
+ "type": "string"
1439
+ },
1440
+ "kind": {
1441
+ "description": "At a declaration position, the kind the branch declares.",
1442
+ "type": "string"
1443
+ }
1444
+ }
1445
+ },
1446
+ "GraphChoice": {
1447
+ "type": "object",
1448
+ "required": [
1449
+ "path",
1450
+ "tag",
1451
+ "alternatives",
1452
+ "selected"
1453
+ ],
1454
+ "properties": {
1455
+ "path": {
1456
+ "description": "\"\" for the declaration itself, else the written path of the field.",
1457
+ "type": "string"
1458
+ },
1459
+ "tag": {
1460
+ "enum": [
1461
+ "if",
1462
+ "switch"
1463
+ ]
1464
+ },
1465
+ "alternatives": {
1466
+ "type": "array",
1467
+ "items": {
1468
+ "$ref": "#/$defs/GraphAlternative"
1469
+ }
1470
+ },
1471
+ "selected": {
1472
+ "description": "The alternative key the selected configuration takes; null when it takes none.",
1473
+ "oneOf": [
1474
+ {
1475
+ "type": "string"
1476
+ },
1477
+ {
1478
+ "type": "null"
1479
+ }
1480
+ ]
1481
+ }
1482
+ }
1483
+ },
1484
+ "GraphRepeat": {
1485
+ "type": "object",
1486
+ "required": [
1487
+ "source",
1488
+ "as"
1489
+ ],
1490
+ "properties": {
1491
+ "source": {
1492
+ "type": "string"
1493
+ },
1494
+ "as": {
1495
+ "type": "string"
1496
+ }
1497
+ }
1498
+ },
1499
+ "GraphDimension": {
1500
+ "type": "object",
1501
+ "required": [
1502
+ "key",
1503
+ "values",
1504
+ "default"
1505
+ ],
1506
+ "properties": {
1507
+ "key": {
1508
+ "type": "string"
1509
+ },
1510
+ "values": {
1511
+ "type": "array"
1512
+ },
1513
+ "default": {}
1514
+ }
1515
+ },
1516
+ "ViewModelConfigurations": {
1517
+ "description": "The configurations the owner's module graph can be drawn in: its dimensions and the assignment the graph is drawn in.",
1518
+ "type": "object",
1519
+ "required": [
1520
+ "dimensions",
1521
+ "selected"
1522
+ ],
1523
+ "properties": {
1524
+ "dimensions": {
1525
+ "type": "array",
1526
+ "items": {
1527
+ "$ref": "#/$defs/GraphDimension"
1528
+ }
1529
+ },
1530
+ "selected": {
1531
+ "type": "object"
1532
+ }
1533
+ }
1397
1534
  }
1398
1535
  }
1399
1536
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@telorun/editor-protocol",
3
- "version": "0.2.0",
3
+ "version": "0.3.0",
4
4
  "description": "The Telo editor protocol: the contract between an editor host and a telo language-server engine — the telo/* requests, the telo/requirements notification and the protocol generation.",
5
5
  "keywords": [
6
6
  "telo",
package/src/index.ts CHANGED
@@ -5,7 +5,7 @@
5
5
 
6
6
  /** The protocol generation this package describes. Additions within a
7
7
  * generation are negotiated by capability; an incompatible change bumps it. */
8
- export const TELO_EDITOR_PROTOCOL = 1;
8
+ export const TELO_EDITOR_PROTOCOL = 2;
9
9
 
10
10
  /** What an engine advertises under `ServerCapabilities.experimental`. */
11
11
  export interface TeloExperimentalCapabilities {
@@ -167,6 +167,9 @@ export interface ViewModelChangedParams {
167
167
  /** `telo/viewModel`: the structured-view model of one owner module. */
168
168
  export interface ViewModelParams {
169
169
  owner: string;
170
+ /** The assignment to draw the module graph in, keyed by dimension; a
171
+ * dimension left out takes its default. */
172
+ configuration?: Record<string, unknown>;
170
173
  }
171
174
  /** `null` when the engine is not analysing `owner`. */
172
175
  export type ViewModelResult = ViewModel | null;
@@ -233,6 +236,9 @@ export interface ViewModel {
233
236
  revision: number;
234
237
  /** The owner module drawn as a graph. */
235
238
  moduleGraph: ModuleGraphData | null;
239
+ /** The configurations `moduleGraph` can be drawn in. Absent when the module
240
+ * writes no `!if` / `!switch` choice. */
241
+ configurations?: ViewModelConfigurations;
236
242
  /** The schema of the owner's module document kind. */
237
243
  moduleRootSchema: JsonSchema | null;
238
244
  /** Each `kind:` spelling in the closure, and each constraint in
@@ -260,6 +266,45 @@ export interface ViewModel {
260
266
  documents: Record<string, number>;
261
267
  }
262
268
 
269
+ /** One axis of the configuration picker: the path it is read at, its domain
270
+ * and the value a picker starts at (a presence dimension: `absent`). */
271
+ export interface GraphDimension {
272
+ key: string;
273
+ values: unknown[];
274
+ default: unknown;
275
+ }
276
+
277
+ export interface ViewModelConfigurations {
278
+ dimensions: GraphDimension[];
279
+ /** The assignment `moduleGraph` is drawn in, every dimension present. */
280
+ selected: Record<string, unknown>;
281
+ }
282
+
283
+ /** One alternative of a choice: `then`, `else`, `default`, a case key, or
284
+ * `absent` (an `!if` with no `else:` whose condition is false). At a
285
+ * declaration position it carries the kind the branch declares. */
286
+ export interface GraphAlternative {
287
+ key: string;
288
+ kind?: string;
289
+ }
290
+
291
+ /** A `!if` / `!switch` drawn at a box. At a declaration position (`path` is
292
+ * `""`) the box is the choice, identified by its name — only its kind follows
293
+ * the selected configuration. */
294
+ export interface GraphChoice {
295
+ path: string;
296
+ tag: "if" | "switch";
297
+ alternatives: GraphAlternative[];
298
+ selected: string | null;
299
+ }
300
+
301
+ /** A `!for-each` drawn as one box (a family) or one row (a repeat in a list),
302
+ * never one per element. */
303
+ export interface GraphRepeat {
304
+ source: string;
305
+ as: string;
306
+ }
307
+
263
308
  export interface RefConstraint {
264
309
  accepted: string[];
265
310
  userFacing: string[];
@@ -320,7 +365,7 @@ export interface ModuleGraphData {
320
365
  export type NodeOwnership = string;
321
366
  /** `flow` | `holds` | `shape` | `data`. */
322
367
  export type EdgeClass = string;
323
- /** `step` | `entry` | `target` | `inline` | `reference` | `export`. */
368
+ /** `step` | `entry` | `target` | `repeat` | `inline` | `reference` | `export`. */
324
369
  export type RowKind = string;
325
370
 
326
371
  export interface GraphNodeData {
@@ -341,6 +386,9 @@ export interface GraphNodeData {
341
386
  rowArrays: { field: string; kind: RowKind }[];
342
387
  throws?: { codes: string[]; unbounded: boolean };
343
388
  root?: boolean;
389
+ choice?: GraphChoice;
390
+ choices?: GraphChoice[];
391
+ family?: GraphRepeat;
344
392
  }
345
393
 
346
394
  export interface GraphPortData {
@@ -379,6 +427,10 @@ export interface GraphRowData {
379
427
  };
380
428
  declares?: string;
381
429
  unknownKind?: boolean;
430
+ /** `repeat` rows: the loop the list item is. */
431
+ repeat?: GraphRepeat;
432
+ /** A step a template repeat emitted: its identity text, in place of `name`. */
433
+ emitted?: string;
382
434
  }
383
435
 
384
436
  export interface GraphEdgeData {
@@ -446,6 +498,13 @@ export interface TeloDiagnosticData {
446
498
  resource?: { kind: string; name: string };
447
499
  /** Dotted path of the offending value within that resource. */
448
500
  path?: string;
501
+ /** Present only on a diagnostic that holds in some configurations of the
502
+ * application but not all: partial assignments covering where it holds, each
503
+ * `{ "<dimension path>": <JSON value> }` naming only the dimensions it
504
+ * narrows (one it leaves out holds every value; the diagnostic holds where
505
+ * some entry agrees on every key it names). Empty when it holds in none. The
506
+ * label is in `message` only. */
507
+ configurations?: Array<Record<string, unknown>>;
449
508
  }
450
509
 
451
510
  // --- Commands --------------------------------------------------------------