@telorun/editor-protocol 0.1.1 → 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
@@ -49,6 +49,10 @@ The host sends a standard `initialize`. The engine answers:
49
49
  against `requires: telo:` intervals by semver precedence (build metadata
50
50
  ignored), and tells engines apart by the whole string.
51
51
  - `capabilities.experimental.telo.protocol: 1` — the generation it speaks.
52
+ - `capabilities.experimental.telo.viewModel: true` — the engine serves the
53
+ [engine-served requests](#engine-served-requests-host--engine) and sends
54
+ [`telo/viewModelChanged`](#teloviewmodelchanged-engine--host-notification).
55
+ Absent, a host sends neither request.
52
56
  - The standard capabilities it serves: full text sync, completion, hover,
53
57
  definition, rename with `prepareRename`, signature help, `semanticTokens/full`
54
58
  (the legend is in the capabilities), `codeAction` (quick fixes),
@@ -149,6 +153,143 @@ analysed standalone:
149
153
  A range the analyzer refuses as malformed is reported as a diagnostic and does
150
154
  not appear here.
151
155
 
156
+ ## `telo/viewModelChanged` (engine → host notification)
157
+
158
+ `{ owner, revision }` — sent after each analysis of an owner module (beside
159
+ `telo/requirements`) and when the engine stops analysing an owner. `owner` is
160
+ the owner's canonical URI; `revision` is an integer that increases with every
161
+ send for that owner. A host holding a view model for `owner` at a lower
162
+ revision asks for it again; after an owner is dropped, `telo/viewModel` answers
163
+ `null`.
164
+
165
+ ## Engine-served requests (host → engine)
166
+
167
+ Sent by a host, served by an engine, and only to an engine advertising
168
+ `viewModel`. Each names an `owner` and is routed to the engine the host chose
169
+ for that owner, like the owner's documents.
170
+
171
+ | Method | Params | Result |
172
+ | --- | --- | --- |
173
+ | `telo/viewModel` | `{ owner, configuration? }` | the owner's [view model](#the-view-model), or `null` when the engine is not analysing `owner`. |
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
+
176
+ `telo/celCompletion` answers what completion inside that value would offer were
177
+ it written in the document: `path` is the field's concrete path within the
178
+ resource (`routes[0].handler.inputs.x`), `tag` the tag it is written under
179
+ without its `!` (`cel`, `interpolate`), `text` the value without its tag and
180
+ `offset` the cursor's offset into `text`. A `textEdit` range is a
181
+ line/character range in `text`.
182
+
183
+ ## The view model
184
+
185
+ What a structured editor — a module canvas, a schema form, a reference picker —
186
+ reads about one owner module. It is computed from the same analysis the
187
+ engine's diagnostics come from, at the module's own telo version, and is plain
188
+ JSON. JSON Schemas in it are plain JSON objects.
189
+
190
+ - `owner`, `revision` — as in `telo/viewModelChanged`.
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.
203
+ - `moduleRootSchema` — the schema of the owner's module document kind
204
+ (`Telo.Application` / `Telo.Library`), or `null`.
205
+ - `kindSpellings` — every `kind:` spelling in the owner's import closure
206
+ (template bodies' entries included), every constraint key of
207
+ `refConstraints` and every spelling in their `userFacing` lists, mapped to
208
+ the canonical `<module>.<Kind>` it resolves to in the owner's scope; a
209
+ spelling only a graph node carries (a body entry of another module's
210
+ template) maps to that node's `canonicalKind`. A spelling that resolves to
211
+ nothing is absent.
212
+ - `refConstraints` — per reference-slot constraint (each kind an `x-telo-ref`
213
+ in the closure's kinds names, as written and canonical, and each kind a port
214
+ or a row's dispatch site in the graphs names): `accepted`, the canonical kinds
215
+ that satisfy it, sorted; `userFacing`, the alias-form kinds a new resource
216
+ satisfying it could be declared with. A constraint that resolves to nothing
217
+ is absent.
218
+ - `contracts` — per canonical kind declaring an invocation contract,
219
+ `{ inputType?, outputType? }`, resolved along `extends`.
220
+ - `outputRefusals` — one entry per `x-telo-ref` in the closure's kinds that
221
+ declares an `outputType`: `kind` (the canonical kind declaring it),
222
+ `pointer` (the JSON Pointer of the `x-telo-ref` node within that kind's
223
+ `schema`, as the kind's author wrote it — a host finds a slot by where it
224
+ sits, never by comparing `outputType`s, which the engine reads after
225
+ migration), and `refusals`, mapping a resource name of the owner module to
226
+ why it cannot fill that slot by what it returns, one line per definite
227
+ mismatch. A resource absent from `refusals` can fill it. The verdict
228
+ `telo check` reports as `REFERENCE_OUTPUT_MISMATCH`.
229
+ - `templates` — per canonical kind with a template body in the closure:
230
+ `kindId`, `name`, `module?`, `capability?` (inherited along `extends`),
231
+ `definition` (the definition document as analysed, its `metadata.source` a
232
+ document URI), `graph`, the body drawn as a module, and `outputRefusals`,
233
+ shaped as the owner's but judging the body's entries, keyed by entry name —
234
+ a name in a body is never looked up among the owner's resources.
235
+ - `referenceSites` — every reference written in the owner module's resources
236
+ and in its module document (`targets:`, `imports:` and the rest): `source`
237
+ (`{ kind, name }` of the resource writing it, the module document as itself),
238
+ `path` (the slot's concrete path within it) and `target` (the name held, as
239
+ written — `Alias.name` across an import).
240
+ - `documents` — the canonical URI of each document the analysis read from an
241
+ open buffer, mapped to the LSP version it read (the `version` of the
242
+ `didOpen` / `didChange` that carried that text). A host that has since sent
243
+ a later version of any of them holds text this model was not computed from:
244
+ the model is **stale**, and a host acting on its paths (writing at a
245
+ `referenceSites` path, deciding a resource is unreferenced) waits for the
246
+ next revision. A document read from the host rather than a buffer is
247
+ absent.
248
+
249
+ A **module graph** is `{ root?, nodes, edges, regions, kinds }`:
250
+
251
+ - a **node** is a resource or the module root: `id`, `kind` (as written),
252
+ `name`, `capability?`, `canonicalKind?` (when `kind` is not already
253
+ canonical), `unknownKind?`, `ownership` (`root`, `named`, `inline`, `scoped`,
254
+ `imported`, `injected`, `enclosing`, `forwarded`), `owner?` / `ownerSite?`
255
+ (the node and site declaring an owned declaration), `module?`, `external?`,
256
+ `alias?`, `ports`, `rows`, `rowArrays` (`{ field, kind }` per array the kind
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;
267
+ - a **port** is a reference slot the kind declares, filled or not: `slot` (its
268
+ field-map path), `refs` (accepted constraints, canonical), `capabilities`,
269
+ `array`, `class`, `slots` (`{ path, target?, targetNode?, inline? }` per
270
+ occupancy), `addPath?` and `rowOwned?`;
271
+ - a **row** is an ordered entry of a node: `id`, `kind` (`step`, `entry`,
272
+ `target`, `repeat`, `inline`, `reference`, `export`), `name?`, `path`, `array`,
273
+ `index`, `depth`, `parent?`, `target?`, `targetNode?`, `inputs?`, `match?`,
274
+ `variant?`, `variantLabel?`, `predicate?`, `catches?`, `dispatch?`
275
+ (`{ path, refs, inline?, alternatives? }`, where the call is written and
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`;
281
+ - an **edge** is a reference site, classed: `id`, `from`, `to?`, `toName`,
282
+ `class` (`flow`, `holds`, `shape`, `data`), `use` (the slot's declared uses:
283
+ `schema`, `dependency`, `call`, `detached`, `trigger.inbound`,
284
+ `trigger.consumer`), `slot`, `path`, `row?`, `inputs?`, `boot?`, `scoped?`,
285
+ `read?` and `call?`;
286
+ - a **region** is a containment: `id`, `kind` (`inline`, `scope`, `zone`),
287
+ `owner`, `site`, `members`, and for a zone `attributes?` (attribute → the
288
+ author's reason) and `boundaries?` (`{ from, toName, escaping }`);
289
+ - a **kind** is a kind declaration in scope: `id` (canonical), `name`,
290
+ `module?`, `abstract`, `capability?`, `extendsId?`, `extendsName?`,
291
+ `instances` (node ids), `template`, `own` and `exported?`.
292
+
152
293
  ## `Diagnostic.data`
153
294
 
154
295
  Every diagnostic the engine publishes may carry:
@@ -156,7 +297,8 @@ Every diagnostic the engine publishes may carry:
156
297
  ```ts
157
298
  { fix?: { replacement: string; tag?: "ref" | "cel" | "module-path" },
158
299
  resource?: { kind: string; name: string },
159
- path?: string }
300
+ path?: string,
301
+ configurations?: Array<Record<string, unknown>> }
160
302
  ```
161
303
 
162
304
  `fix` is a mechanically applicable repair — the whole corrected value at the
@@ -165,7 +307,18 @@ returns the diagnostic unchanged in a `textDocument/codeAction` request's
165
307
  context, and the engine answers with the quick fix that applies it. `resource`
166
308
  and `path` locate the offending value inside a manifest (a host may use them to
167
309
  place a diagnostic on a form field). `Diagnostic.tags` carries LSP's
168
- `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.
169
322
 
170
323
  ## Commands
171
324
 
@@ -179,7 +332,11 @@ The engine's code lenses over an `imports:` block name the first two.
179
332
 
180
333
  ## Generations
181
334
 
182
- `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.
183
340
  **Additions within a generation are negotiated by capability**: a new request, a
184
341
  new optional field or a new command is advertised by the side that has it and
185
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;
@@ -8,6 +8,9 @@ export interface TeloExperimentalCapabilities {
8
8
  export interface TeloProtocolCapability {
9
9
  /** The generation the engine speaks. */
10
10
  protocol: number;
11
+ /** The engine serves `telo/viewModel` and `telo/celCompletion` and sends
12
+ * `telo/viewModelChanged`. */
13
+ viewModel?: boolean;
11
14
  }
12
15
  /** The file a module directory is read as: `telo/read` of a directory answers
13
16
  * with this file inside it. */
@@ -17,8 +20,9 @@ export declare const TELO_MODULE_FILENAME = "telo.yaml";
17
20
  * release build, `X+unreleased` for a build made while that release is still
18
21
  * pending. */
19
22
  export declare const TELO_SERVER_NAME = "telo";
20
- /** Method names of the requests an engine sends and a host serves, and of the
21
- * notification an engine sends. */
23
+ /** Method names of every `telo/*` message: the requests an engine sends and a
24
+ * host serves, the requests a host sends and an engine serves, and the
25
+ * notifications an engine sends. */
22
26
  export declare const TeloMethod: {
23
27
  readonly read: "telo/read";
24
28
  readonly exists: "telo/exists";
@@ -26,6 +30,9 @@ export declare const TeloMethod: {
26
30
  readonly hubSearchRefs: "telo/hub/searchRefs";
27
31
  readonly hubListVersions: "telo/hub/listVersions";
28
32
  readonly requirements: "telo/requirements";
33
+ readonly viewModel: "telo/viewModel";
34
+ readonly celCompletion: "telo/celCompletion";
35
+ readonly viewModelChanged: "telo/viewModelChanged";
29
36
  };
30
37
  export type TeloMethod = (typeof TeloMethod)[keyof typeof TeloMethod];
31
38
  /** `telo/read`: the text at `uri`. `uri` is a document URI (`file:///…`) or an
@@ -122,6 +129,337 @@ export interface RequirementsParams {
122
129
  * itself declares one exactly when an entry's `module` equals `owner`. */
123
130
  ranges: RequirementsRange[];
124
131
  }
132
+ /** `telo/viewModelChanged`: the owner's view model moved — sent after each
133
+ * analysis of the owner, and when the owner stops being analysed (a
134
+ * `telo/viewModel` for it then answers `null`). */
135
+ export interface ViewModelChangedParams {
136
+ /** Canonical `file:` URI of the owner module's document. */
137
+ owner: string;
138
+ /** Increases with every analysis of the owner, and when it is dropped. */
139
+ revision: number;
140
+ }
141
+ /** `telo/viewModel`: the structured-view model of one owner module. */
142
+ export interface ViewModelParams {
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>;
147
+ }
148
+ /** `null` when the engine is not analysing `owner`. */
149
+ export type ViewModelResult = ViewModel | null;
150
+ /** `telo/celCompletion`: completion for a CEL value typed into a structured
151
+ * form field, which is not document text yet. */
152
+ export interface CelCompletionParams {
153
+ owner: string;
154
+ /** The resource the field belongs to. */
155
+ resource: {
156
+ kind: string;
157
+ name: string;
158
+ };
159
+ /** Concrete path of the field within the resource (`routes[0].handler.inputs.x`). */
160
+ path: string;
161
+ /** The tag the value is written under, without its `!` (`cel`, `interpolate`). */
162
+ tag: string;
163
+ /** The field's value without its tag. */
164
+ text: string;
165
+ /** Cursor offset into `text`. */
166
+ offset: number;
167
+ }
168
+ /** LSP `CompletionItem`s; a `textEdit` range is a line/character range in
169
+ * `text`. Empty when the engine is not analysing `owner`. */
170
+ export type CelCompletionResult = CompletionItem[];
171
+ /** The members of an LSP `CompletionItem` an engine sets. */
172
+ export interface CompletionItem {
173
+ label: string;
174
+ /** LSP `CompletionItemKind`. */
175
+ kind?: number;
176
+ detail?: string;
177
+ documentation?: string;
178
+ insertText?: string;
179
+ /** LSP `InsertTextFormat`; 2 is a snippet. */
180
+ insertTextFormat?: number;
181
+ textEdit?: {
182
+ range: TextRange;
183
+ newText: string;
184
+ };
185
+ preselect?: boolean;
186
+ sortText?: string;
187
+ filterText?: string;
188
+ command?: {
189
+ title: string;
190
+ command: string;
191
+ };
192
+ }
193
+ export interface TextRange {
194
+ start: {
195
+ line: number;
196
+ character: number;
197
+ };
198
+ end: {
199
+ line: number;
200
+ character: number;
201
+ };
202
+ }
203
+ /** Params and result of every engine-served request, by method. */
204
+ export interface TeloEngineRequests {
205
+ "telo/viewModel": [ViewModelParams, ViewModelResult];
206
+ "telo/celCompletion": [CelCompletionParams, CelCompletionResult];
207
+ }
208
+ /** A JSON Schema, as plain JSON. */
209
+ export type JsonSchema = Record<string, unknown>;
210
+ /**
211
+ * What a structured editor (a module canvas, a schema form, a reference picker)
212
+ * reads about one owner module, computed by the engine of the module's telo
213
+ * version over the same analysis its diagnostics come from.
214
+ */
215
+ export interface ViewModel {
216
+ owner: string;
217
+ revision: number;
218
+ /** The owner module drawn as a graph. */
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;
223
+ /** The schema of the owner's module document kind. */
224
+ moduleRootSchema: JsonSchema | null;
225
+ /** Each `kind:` spelling in the closure, and each constraint in
226
+ * `refConstraints`, mapped to the canonical kind it resolves to. A spelling
227
+ * that resolves to nothing is absent. */
228
+ kindSpellings: Record<string, string>;
229
+ /** Per reference-slot constraint: the canonical kinds that satisfy it and the
230
+ * spellings a new resource could be created with. A constraint that resolves
231
+ * to nothing is absent. */
232
+ refConstraints: Record<string, RefConstraint>;
233
+ /** Invocation contracts of every kind declaring one, by canonical kind. */
234
+ contracts: Record<string, KindContract>;
235
+ /** Why a resource of the owner module cannot fill a slot, by what it returns:
236
+ * one entry per reference slot declaring an `outputType` in the closure's
237
+ * kinds. */
238
+ outputRefusals: OutputRefusals[];
239
+ /** The body of every templated kind in the closure, by canonical kind. */
240
+ templates: Record<string, TemplateGraphData>;
241
+ /** Every reference written in the owner module's resources and its module
242
+ * document. */
243
+ referenceSites: ReferenceSite[];
244
+ /** Canonical URI → the LSP version of each open document the analysis read.
245
+ * A host holding a newer version of one of them holds text this model was
246
+ * not computed from. */
247
+ documents: Record<string, number>;
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
+ }
283
+ export interface RefConstraint {
284
+ accepted: string[];
285
+ userFacing: string[];
286
+ }
287
+ export interface KindContract {
288
+ inputType?: JsonSchema;
289
+ outputType?: JsonSchema;
290
+ }
291
+ export interface OutputRefusals {
292
+ /** The canonical kind declaring the slot. */
293
+ kind: string;
294
+ /** JSON Pointer of the slot's `x-telo-ref` node within that kind's `schema`. */
295
+ pointer: string;
296
+ /** Resource name, in the scope the entry is listed in (the owner module, or
297
+ * a template's body), → one line per definite mismatch. A resource absent
298
+ * here can fill the slot. */
299
+ refusals: Record<string, string[]>;
300
+ }
301
+ export interface TemplateGraphData {
302
+ /** Canonical `<module>.<Name>`. */
303
+ kindId: string;
304
+ name: string;
305
+ module?: string;
306
+ /** The kind's capability, inherited along `extends`. */
307
+ capability?: string;
308
+ /** The definition document as analysed; `metadata.source` is a document URI. */
309
+ definition: Record<string, unknown>;
310
+ graph: ModuleGraphData;
311
+ /** Why an entry of the body cannot fill a slot, by what it returns — the
312
+ * owner's `outputRefusals`, judged over the body's entries. */
313
+ outputRefusals: OutputRefusals[];
314
+ }
315
+ export interface ReferenceSite {
316
+ /** The resource writing the reference; the module document as itself. */
317
+ source: {
318
+ kind: string;
319
+ name: string;
320
+ };
321
+ /** Concrete path of the slot within that resource. */
322
+ path: string;
323
+ /** The name the reference holds, as written (`Alias.name` across an import). */
324
+ target: string;
325
+ }
326
+ /** A module drawn as boxes, ordered rows and classed edges — the analyzer's
327
+ * module graph as data. */
328
+ export interface ModuleGraphData {
329
+ root?: GraphNodeData;
330
+ nodes: GraphNodeData[];
331
+ edges: GraphEdgeData[];
332
+ regions: GraphRegionData[];
333
+ kinds: GraphKindData[];
334
+ }
335
+ /** `root` | `named` | `inline` | `scoped` | `imported` | `injected` |
336
+ * `enclosing` | `forwarded`. */
337
+ export type NodeOwnership = string;
338
+ /** `flow` | `holds` | `shape` | `data`. */
339
+ export type EdgeClass = string;
340
+ /** `step` | `entry` | `target` | `repeat` | `inline` | `reference` | `export`. */
341
+ export type RowKind = string;
342
+ export interface GraphNodeData {
343
+ id: string;
344
+ kind: string;
345
+ name: string;
346
+ capability?: string;
347
+ canonicalKind?: string;
348
+ unknownKind?: boolean;
349
+ ownership: NodeOwnership;
350
+ owner?: string;
351
+ ownerSite?: string;
352
+ module?: string;
353
+ external?: boolean;
354
+ alias?: string;
355
+ ports: GraphPortData[];
356
+ rows: GraphRowData[];
357
+ rowArrays: {
358
+ field: string;
359
+ kind: RowKind;
360
+ }[];
361
+ throws?: {
362
+ codes: string[];
363
+ unbounded: boolean;
364
+ };
365
+ root?: boolean;
366
+ choice?: GraphChoice;
367
+ choices?: GraphChoice[];
368
+ family?: GraphRepeat;
369
+ }
370
+ export interface GraphPortData {
371
+ slot: string;
372
+ refs: string[];
373
+ capabilities: string[];
374
+ array: boolean;
375
+ class: EdgeClass;
376
+ slots: {
377
+ path: string;
378
+ target?: string;
379
+ targetNode?: string;
380
+ inline?: boolean;
381
+ }[];
382
+ addPath?: string;
383
+ rowOwned?: boolean;
384
+ }
385
+ export interface GraphRowData {
386
+ id: string;
387
+ kind: RowKind;
388
+ name?: string;
389
+ path: string;
390
+ array: string;
391
+ index: number;
392
+ depth: number;
393
+ parent?: string;
394
+ target?: string;
395
+ targetNode?: string;
396
+ inputs?: string;
397
+ match?: Record<string, unknown>;
398
+ variant?: string;
399
+ variantLabel?: string;
400
+ predicate?: string;
401
+ catches?: boolean;
402
+ dispatch?: {
403
+ path: string;
404
+ refs: string[];
405
+ inline?: boolean;
406
+ alternatives?: {
407
+ path: string;
408
+ refs: string[];
409
+ }[];
410
+ };
411
+ declares?: string;
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;
417
+ }
418
+ export interface GraphEdgeData {
419
+ id: string;
420
+ from: string;
421
+ to?: string;
422
+ toName: string;
423
+ class: EdgeClass;
424
+ /** `schema` | `dependency` | `call` | `detached` | `trigger.inbound` |
425
+ * `trigger.consumer`. */
426
+ use: string[];
427
+ slot: string;
428
+ path: string;
429
+ row?: string;
430
+ inputs?: string;
431
+ boot?: boolean;
432
+ scoped?: boolean;
433
+ read?: string;
434
+ call?: string;
435
+ }
436
+ export interface GraphRegionData {
437
+ id: string;
438
+ /** `inline` | `scope` | `zone`. */
439
+ kind: string;
440
+ owner: string;
441
+ site: string;
442
+ members: string[];
443
+ attributes?: Record<string, string>;
444
+ boundaries?: {
445
+ from: string;
446
+ toName: string;
447
+ escaping: string[];
448
+ }[];
449
+ }
450
+ export interface GraphKindData {
451
+ id: string;
452
+ name: string;
453
+ module?: string;
454
+ abstract: boolean;
455
+ capability?: string;
456
+ extendsId?: string;
457
+ extendsName?: string;
458
+ instances: string[];
459
+ template: boolean;
460
+ own: boolean;
461
+ exported?: boolean;
462
+ }
125
463
  /** The YAML tags a repair may write. A receiver that does not know a tag
126
464
  * offers no fix for it. */
127
465
  export type DiagnosticFixTag = "ref" | "cel" | "module-path";
@@ -142,6 +480,13 @@ export interface TeloDiagnosticData {
142
480
  };
143
481
  /** Dotted path of the offending value within that resource. */
144
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>>;
145
490
  }
146
491
  /** `workspace/executeCommand` commands an engine serves. The two upgrade
147
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;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AE,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";
@@ -13,8 +13,9 @@ export const TELO_MODULE_FILENAME = "telo.yaml";
13
13
  * release build, `X+unreleased` for a build made while that release is still
14
14
  * pending. */
15
15
  export const TELO_SERVER_NAME = "telo";
16
- /** Method names of the requests an engine sends and a host serves, and of the
17
- * notification an engine sends. */
16
+ /** Method names of every `telo/*` message: the requests an engine sends and a
17
+ * host serves, the requests a host sends and an engine serves, and the
18
+ * notifications an engine sends. */
18
19
  export const TeloMethod = {
19
20
  read: "telo/read",
20
21
  exists: "telo/exists",
@@ -22,6 +23,9 @@ export const TeloMethod = {
22
23
  hubSearchRefs: "telo/hub/searchRefs",
23
24
  hubListVersions: "telo/hub/listVersions",
24
25
  requirements: "telo/requirements",
26
+ viewModel: "telo/viewModel",
27
+ celCompletion: "telo/celCompletion",
28
+ viewModelChanged: "telo/viewModelChanged",
25
29
  };
26
30
  // --- Commands --------------------------------------------------------------
27
31
  /** `workspace/executeCommand` commands an engine serves. The two upgrade