@arkitektio/bsx 6.7.0 → 6.9.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 (50) hide show
  1. package/dist/bsx/declared.d.ts +35 -3
  2. package/dist/bsx/declared.d.ts.map +1 -1
  3. package/dist/bsx/declared.js +73 -3
  4. package/dist/bsx/declared.js.map +1 -1
  5. package/dist/bsx/expr.d.ts +5 -3
  6. package/dist/bsx/expr.d.ts.map +1 -1
  7. package/dist/bsx/expr.js +18 -7
  8. package/dist/bsx/expr.js.map +1 -1
  9. package/dist/bsx/language.d.ts.map +1 -1
  10. package/dist/bsx/language.js +6 -4
  11. package/dist/bsx/language.js.map +1 -1
  12. package/dist/bsx/parse.d.ts.map +1 -1
  13. package/dist/bsx/parse.js +23 -6
  14. package/dist/bsx/parse.js.map +1 -1
  15. package/dist/bsx/print.d.ts.map +1 -1
  16. package/dist/bsx/print.js +10 -3
  17. package/dist/bsx/print.js.map +1 -1
  18. package/dist/bsx/references.d.ts.map +1 -1
  19. package/dist/bsx/references.js +103 -22
  20. package/dist/bsx/references.js.map +1 -1
  21. package/dist/renderer/bloks/control.d.ts +7 -1
  22. package/dist/renderer/bloks/control.d.ts.map +1 -1
  23. package/dist/renderer/bloks/control.js +24 -6
  24. package/dist/renderer/bloks/control.js.map +1 -1
  25. package/dist/spec/bsx_v2.json +3479 -2185
  26. package/dist/spec/catalogs/base@4.json +35 -6
  27. package/dist/spec/catalogs/base@4.json.js +35 -6
  28. package/dist/spec/vocabulary.d.ts +2 -0
  29. package/dist/spec/vocabulary.d.ts.map +1 -1
  30. package/dist/spec/vocabulary.js +2 -0
  31. package/dist/spec/vocabulary.js.map +1 -1
  32. package/dist/spec/vocabulary.json +19 -12
  33. package/dist/spec/vocabulary.json.js +19 -12
  34. package/package.json +1 -1
  35. package/src/bsx/declared.ts +76 -5
  36. package/src/bsx/expr.ts +17 -8
  37. package/src/bsx/infer.test.ts +1 -1
  38. package/src/bsx/language.test.ts +17 -16
  39. package/src/bsx/language.ts +6 -4
  40. package/src/bsx/logo.test.ts +47 -0
  41. package/src/bsx/parse.ts +23 -4
  42. package/src/bsx/print.ts +9 -2
  43. package/src/bsx/references.test.ts +6 -6
  44. package/src/bsx/references.ts +105 -20
  45. package/src/renderer/bloks/control.tsx +31 -7
  46. package/src/spec/bsx_v2.json +3479 -2185
  47. package/src/spec/catalogs/base@4.json +35 -6
  48. package/src/spec/spec.test.ts +1 -1
  49. package/src/spec/vocabulary.json +19 -12
  50. package/src/spec/vocabulary.ts +4 -0
@@ -2,7 +2,7 @@
2
2
  "id": "https://arkitekt.live/catalogs/base/v4",
3
3
  "name": "base",
4
4
  "version": 4,
5
- "minor": 3,
5
+ "minor": 4,
6
6
  "extends": null,
7
7
  "description": "The base catalog: everything every renderer draws. The language's own elements (control flow, async boundaries, the Blok element, the declarations, text), the html components, the structure and run parts a host supplies, the scene and the logo shapes. A renderer speaks it whole, in the contexts it draws; functions and effects are in vocabulary.json.",
8
8
  "components": [
@@ -263,7 +263,7 @@
263
263
  {
264
264
  "name": "dependencies",
265
265
  "group": "language",
266
- "description": "Declares the dependencies of one of the app's own actions for an agent blok: read and called through its key (cells.<dependency>), picked by the viewer, and handed to a run of that action with `with <key>`. A child of <Blok>; draws nothing.",
266
+ "description": "Declares the dependencies of one action, for an agent blok one of the app's own, for a custom blok one of an agent it is bound to: read and called through its key (cells.<dependency>), picked by the viewer, and handed to a run of that action with `with <key>`. A child of <Blok>; draws nothing.",
267
267
  "context": "PANEL",
268
268
  "children_context": null,
269
269
  "inherits_context": true,
@@ -282,14 +282,42 @@
282
282
  "key": "like",
283
283
  "kind": "STRING",
284
284
  "required": true,
285
- "description": "The action whose dependencies they are: self.<action>."
285
+ "description": "The action whose dependencies they are: self.<action>, in a custom blok agents.<name>.<action>."
286
286
  }
287
287
  ],
288
288
  "kinds": [
289
- "agent"
289
+ "agent",
290
+ "custom"
290
291
  ],
291
292
  "since": 3
292
293
  },
294
+ {
295
+ "name": "logo",
296
+ "group": "language",
297
+ "description": "Declares the blok's own logo: what stands for it in lists, pins and tabs. A drawing of the logo catalog on a 24-unit grid, painted with the logo pens, drawn with the action logos' pen unless a shape says otherwise; literals only. A child of <Blok>, one; draws nothing in the blok.",
298
+ "context": "PANEL",
299
+ "children_context": "LOGO",
300
+ "inherits_context": false,
301
+ "accepts_children": true,
302
+ "downstream_of": [],
303
+ "not_downstream_of": [],
304
+ "text_prop": null,
305
+ "props": [
306
+ {
307
+ "key": "title",
308
+ "kind": "STRING",
309
+ "required": false,
310
+ "description": "What the logo is called: read out in place of the drawing."
311
+ },
312
+ {
313
+ "key": "viewBox",
314
+ "kind": "STRING",
315
+ "required": false,
316
+ "description": "The drawing's grid; 0 0 24 24 when left out."
317
+ }
318
+ ],
319
+ "since": 4
320
+ },
293
321
  {
294
322
  "name": "#text",
295
323
  "group": "language",
@@ -10614,7 +10642,7 @@
10614
10642
  {
10615
10643
  "name": "deppicker",
10616
10644
  "group": "run",
10617
- "description": "The ready-made picker of the agent a declared dependency is bound to: the agents that fit, the chosen one shown, always changeable. An agent blok only.",
10645
+ "description": "The ready-made picker of the agent a declared dependency is bound to: the agents that fit, the chosen one shown, always changeable. In an agent or a custom blok.",
10618
10646
  "context": "PANEL",
10619
10647
  "children_context": null,
10620
10648
  "inherits_context": false,
@@ -10631,7 +10659,8 @@
10631
10659
  }
10632
10660
  ],
10633
10661
  "kinds": [
10634
- "agent"
10662
+ "agent",
10663
+ "custom"
10635
10664
  ],
10636
10665
  "since": 3
10637
10666
  },
@@ -49,7 +49,7 @@ describe('the synced vocabulary', () => {
49
49
  expect(vocabulary.callKinds).not.toContain('query_refetch');
50
50
  expect(vocabulary.records.query.fields.map(field => field.key)).toContain('fetching_more');
51
51
  expect(Object.keys(vocabulary.theme.dataAttributes).sort()).toEqual(['busy', 'stale']);
52
- expect([vocabulary.vocab, vocabulary.minor]).toEqual([2, 6]);
52
+ expect([vocabulary.vocab, vocabulary.minor]).toEqual([2, 8]);
53
53
  expect(vocabulary.baseCatalog).toBe('https://arkitekt.live/catalogs/base/v4');
54
54
  expect(Object.values(vocabulary.bundledCatalogs)).toEqual(['catalogs/base@4.json', 'catalogs/orkestrator@1.json']);
55
55
  expect(vocabulary.hostParts).toEqual(['args', 'arg', 'deps', 'dep', 'ask', 'returns', 'status', 'timeline', 'label', 'description', 'message', 'control', 'field']);
@@ -1,11 +1,12 @@
1
1
  {
2
2
  "vocab": 2,
3
- "minor": 6,
3
+ "minor": 8,
4
4
  "description": "The blok language, version 2: what a blok may read, call and store. The spec's parser, the server (rekuest_core, takt) and the renderer (orkestrator) load this file or are generated from it. The design is the blok-vocab-v2 proposal of 2026-10-25. Three layers, each versioned on its own: this language (vocab, and minor for what it gained since); the base catalog, everything every renderer draws; and the app catalogs that extend it with what one frontend draws beyond (see catalogs). A server holds a blok to the language alone, never to a catalog: whoever draws a blok checks it against the catalog it has, and an author's tooling checks it when asked.",
5
5
  "roots": {
6
6
  "data": {
7
7
  "self": "The agent the blok belongs to: the declaring agent (agent blok), the sending agent (task blok), the executing agent (action blok). Shorthand for deps.self.",
8
- "deps": "deps.<key>: an agent bound to a dependency of the blok: a custom blok's, an action's, or one an agent blok declares with <dependencies> (read through its key: cells.<dependency>, stored deps.cells__<dependency>).",
8
+ "deps": "deps.<key>: an agent a run of an action uses: the action's own dependencies (task, action and assign bloks), or the ones a blok declares for an action with <dependencies> (read through its key: cells.<dependency>, stored deps.cells__<dependency>). A custom blok's bound agents are written agents.<key> and stored deps.<key>.",
9
+ "agents": "agents.<key>: an agent a custom blok is bound to where it is materialized. Only a custom blok writes it; it is stored deps.<key>.",
9
10
  "queries": "queries.<name>: a declared query's record (status, value, error, refetching, fetching_more).",
10
11
  "subscriptions": "subscriptions.<name>: a declared subscription's record (status, value, error); value is the latest payload, or the last `keep` payloads.",
11
12
  "args": "args.<key>: what the blok is opened on: the item for an agent or custom blok, the task's args for a task or action blok, the form's other arguments as they are filled in for a port blok (read only).",
@@ -23,9 +24,9 @@
23
24
  "functions": ["cmp", "logic", "math", "str", "list", "obj", "val", "fmt", "time", "ui", "query"],
24
25
  "future": ["mutations"]
25
26
  },
26
- "reserved": ["self", "deps", "queries", "subscriptions", "args", "task", "assign", "port", "event", "viewer", "then", "error", "cmp", "logic", "math", "str", "list", "obj", "val", "fmt", "time", "ui", "query", "mutations"],
27
+ "reserved": ["self", "deps", "agents", "queries", "subscriptions", "args", "task", "assign", "port", "event", "viewer", "then", "error", "cmp", "logic", "math", "str", "list", "obj", "val", "fmt", "time", "ui", "query", "mutations"],
27
28
  "agent_segments": {
28
- "description": "What follows an agent (self or deps.<key>): .<state>.<field> is state, .tasks.<action> the latest task of that action, .assets.<name> one of the agent's assets; deps.<key>.<action>(...) calls it.",
29
+ "description": "What follows an agent (self, deps.<key> or agents.<key>): .<state>.<field> is state, .tasks.<action> the latest task of that action, .assets.<name> one of the agent's assets; deps.<key>.<action>(...) calls it.",
29
30
  "tasks": "tasks",
30
31
  "assets": "assets",
31
32
  "fields": {"id": "The agent's id (a query variable: deps.robot.id).", "name": "The agent's name.", "connected": "Whether the agent is connected right now (true or false)."},
@@ -39,8 +40,8 @@
39
40
  "contexts": ["PANEL", "SCENE", "LOGO"]
40
41
  },
41
42
  "custom": {
42
- "description": "Built by a user and materialized onto agents.",
43
- "roots": ["deps", "args", "queries", "subscriptions", "viewer", "then"],
43
+ "description": "Built by a user and materialized onto agents, each read as agents.<key>. What a run of one of their actions uses it may declare with <dependencies key like=\"agents.<key>.<action>\" />.",
44
+ "roots": ["agents", "args", "queries", "subscriptions", "viewer", "then"],
44
45
  "locals": true,
45
46
  "contexts": ["PANEL", "SCENE"]
46
47
  },
@@ -94,10 +95,11 @@
94
95
  "chrome": ["PANEL", "SCENE"],
95
96
  "declarations": {
96
97
  "description": "What a blok owns, declared in its tree. Each is stored as a node of its own and draws nothing.",
97
- "local": "<local name=\"x\" default={...} persist kind=... />: a local (see locals). It comes before every other child of its parent and is in scope in its parent's subtree only; inside a foreach there is one per item. Every attribute but name is a literal: a port field (kind, identifier, nullable, choices, children, label, description, default, ...), persist, or like=\"self.<action>.<arg>\" / like=\"deps.<key>.<action>.<arg>\" (the port of that argument, resolved where the blok is mounted).",
98
+ "local": "<local name=\"x\" default={...} persist kind=... />: a local (see locals). It comes before every other child of its parent and is in scope in its parent's subtree only; inside a foreach there is one per item. Every attribute but name is a literal: a port field (kind, identifier, nullable, choices, children, label, description, default, ...), persist, or like=\"self.<action>.<arg>\" / like=\"deps.<key>.<action>.<arg>\" (the port of that argument, resolved where the blok is mounted; a custom blok writes like=\"agents.<key>.<action>.<arg>\").",
98
99
  "query": "<query name=\"x\" service=\"mikro\" document=\"query (...) {...}\" poll={5} more=\"items\"><var key=\"k\" value={...} /></query>: a declared read, queries.<name>. A child of <Blok>, before its content.",
99
100
  "subscription": "<subscription name=\"x\" service=\"mikro\" document=\"subscription (...) {...}\" keep={10} history=\"q\"><var key=\"k\" value={...} /></subscription>: a declared stream, subscriptions.<name>. A child of <Blok>, before its content.",
100
- "dependencies": "<dependencies key=\"cells\" like=\"self.<action>\" />: the dependencies of one of the app's own actions, for an agent blok to read, call and hand to a run of it. Each is read through the key, bare: cells.<dependency>.<state>.<field>, cells.<dependency>.<action>(...), cells.<dependency>.connected (stored as the blok's dependency deps.cells__<dependency>). cells.options.<dependency> lists the agents that fit one ({id, name, connected, picked}) and cells.pick(<dependency>: <agent id>) binds it; <deppicker key=\"cells.<dependency>\" /> is the ready-made picker. Which agent each is bound to is the viewer's own choice, kept on their device and never on a server; until they choose it is seeded once, with the agent the latest run of the action had, else the only one that fits. A child of <Blok>, after its locals and before what reads through it; an agent blok only. An action whose dependency is called options or pick cannot be read through one.",
101
+ "dependencies": "<dependencies key=\"cells\" like=\"self.<action>\" />: the dependencies of one of the app's own actions, for an agent blok to read, call and hand to a run of it. A custom blok declares those of an action of an agent it is bound to: like=\"agents.<name>.<action>\" (stored deps.<name>.<action>). Each is read through the key, bare: cells.<dependency>.<state>.<field>, cells.<dependency>.<action>(...), cells.<dependency>.connected (stored as the blok's dependency deps.cells__<dependency>). cells.options.<dependency> lists the agents that fit one ({id, name, connected, picked}) and cells.pick(<dependency>: <agent id>) binds it; <deppicker key=\"cells.<dependency>\" /> is the ready-made picker. Which agent each is bound to is the viewer's own choice, kept on their device and never on a server; until they choose it is seeded once, with the agent the latest run of the action had, else the only one that fits. A child of <Blok>, after its locals and before what reads through it; an agent blok only. An action whose dependency is called options or pick cannot be read through one.",
102
+ "logo": "<logo title=\"Microscope\"><Circle cx=\"12\" cy=\"12\" r=\"7\" /></logo>: the blok's own logo, standing for it in lists, pins and tabs. A child of <Blok>, one, in a blok that is no logo. It holds a drawing of the logo catalog on a 24-unit grid (viewBox=\"0 0 24 24\" unless it says otherwise), painted with the logo pens and drawn with the action logos' pen (fill none, stroke ink, round) unless a shape says otherwise. title and viewBox are literals, and so is everything it draws: a fixed drawing that reads nothing. It is checked and drawn as a logo blok of its own.",
101
103
  "var": "<var key=\"k\" value={expression or literal} />: one variable of a query or subscription; an expression over args, blok-level locals and agents."
102
104
  }
103
105
  },
@@ -360,7 +362,7 @@
360
362
  "calls": {
361
363
  "description": "What a prop or an argument may hold besides a literal, a path or a util call.",
362
364
  "kinds": {
363
- "agent_call": "A task call: self.<action>(...) or deps.<key>.<action>(...), only as a callback's one thing, optionally named with `into <name>` (stored as the prop's declares_value). A call to self may say `with <key>` before `into`: the run gets the agents the blok's <dependencies key=\"<key>\" /> are bound to (stored as the call's given: <key>); a dependency nobody bound resolves as it always does. A kind that says calls: false (a port blok) holds none.",
365
+ "agent_call": "A task call: self.<action>(...) or deps.<key>.<action>(...) (in a custom blok agents.<key>.<action>(...)), only as a callback's one thing, optionally named with `into <name>` (stored as the prop's declares_value). A call to the agent a <dependencies> names may say `with <key>` before `into`: the run gets the agents the blok's <dependencies key=\"<key>\" /> are bound to (stored as the call's given: <key>); a dependency nobody bound resolves as it always does. A kind that says calls: false (a port blok) holds none.",
364
366
  "util_call": "A pure function, or an effect (ui.copy, task.answer, assign.start, port.set, query.refetch, query.fetch_more) as a callback's one thing."
365
367
  },
366
368
  "reserved_kinds": {
@@ -476,21 +478,22 @@
476
478
  "callback.await": {"level": "error", "message": "A callback does not await; a control is busy while its call's task runs."},
477
479
  "callback.nested": {"level": "error", "message": "{what} runs only as a callback's one thing, not inside an expression.", "hint": "Move {what} into a callback prop of its own (onClick={{...}}); an expression only reads."},
478
480
  "callback.positional": {"level": "error", "message": "{call}: a task call names its arguments (name: value)."},
479
- "callback.with": {"level": "error", "message": "with hands a task call to self the dependencies the blok declares: `self.<action>(...) with <key>`.", "hint": "Write `self.<action>(name: value) with cells into run`, where the blok declares <dependencies key=\"cells\" like=\"self.<action>\" />."},
481
+ "callback.with": {"level": "error", "message": "with hands a task call the dependencies the blok declares for that action: `self.<action>(...) with <key>`, in a custom blok `agents.<name>.<action>(...) with <key>`.", "hint": "Write `self.<action>(name: value) with cells into run`, where the blok declares <dependencies key=\"cells\" like=\"self.<action>\" />."},
480
482
  "callback.into": {"level": "error", "message": "into names the record of a task call: `<call> into <name>`.", "hint": "Write `deps.<key>.<action>(name: value) into run`, then read run.running, run.returns.<port>."},
481
483
  "callback.not_callback": {"level": "error", "message": "{key} of <{component}> is not a callback prop, so it cannot hold {what}.", "hint": "Use a callback prop of <{component}> (the catalog lists them as CALLBACK), or compute {key} without a call."},
482
484
  "callback.unbound": {"level": "error", "message": "{key} of <{component}> is a callback prop: it holds one task call or one effect (queries.<name>.refetch(), queries.<name>.fetch_more(...), ui.copy, task.answer, assign.start, port.set).", "hint": "Give {key} a task call (deps.<key>.<action>(name: value)) or one effect, not a value."},
483
485
  "callback.event_field": {"level": "error", "message": "event has no field {field!r} in {key} of <{component}> (its fields: {fields}).", "hint": "Read one of the fields listed for {key}: {fields}."},
484
486
  "roots.unknown": {"level": "error", "message": "{path} reads {root!r}, which is no root, local, loop variable or record of this blok.", "hint": "Read a root this blok has (deps.<key>, args.<key>, queries.<name>, ...), a declared local, a foreach let or index, or an into record."},
485
487
  "roots.not_in_kind": {"level": "error", "message": "{path}: a{n} {kind} blok has no {root!r} (it reads {roots}).", "hint": "Read one of {roots} instead."},
488
+ "roots.custom_deps": {"level": "error", "message": "{path}: a custom blok reads an agent it is bound to as agents.<key>, not deps.<key>.", "hint": "Write agents.<key> instead: the same path, from agents."},
486
489
  "roots.reserved": {"level": "error", "message": "{name!r} is reserved: no local, let, index or into may use it."},
487
490
  "roots.shadow": {"level": "error", "message": "{name!r} is declared twice: as {first} and as {second}."},
488
491
  "roots.event_outside_callback": {"level": "error", "message": "{path} reads event outside a callback.", "hint": "Read event only inside a callback prop; outside one, bind a control to a local and read the local."},
489
492
  "roots.error_outside_boundary": {"level": "error", "message": "{path} reads error outside an <error> slot.", "hint": "Read error only inside the <error> slot of a <suspense>."},
490
493
  "roots.whole": {"level": "error", "message": "{path} reads {root!r} whole; read one of it ({root}.<name>).", "hint": "Read a field of it, as {root}.<name>."},
491
- "dependencies.position": {"level": "error", "message": "<dependencies> {key!r} is declared at {at}: dependencies are declared as a child of the <Blok> of an agent blok.", "hint": "Move it to the top of the <Blok>, after its locals; an action's or a custom blok's dependencies are declared where it is mounted."},
494
+ "dependencies.position": {"level": "error", "message": "<dependencies> {key!r} is declared at {at}: dependencies are declared as a child of the <Blok> of an agent or custom blok.", "hint": "Move it to the top of the <Blok>, after its locals; an action's dependencies are declared where it is mounted."},
492
495
  "dependencies.key": {"level": "error", "message": "<dependencies> ({node}) {problem}.", "hint": "Write <dependencies key=\"cells\" like=\"self.<action>\" />: a plain key, declared once."},
493
- "dependencies.like": {"level": "error", "message": "<dependencies> {key!r}: like={like!r} {problem}.", "hint": "like names one of the app's own actions that has dependencies: self.<action>."},
496
+ "dependencies.like": {"level": "error", "message": "<dependencies> {key!r}: like={like!r} {problem}.", "hint": "like names an action that has dependencies: one of the app's own (self.<action>), in a custom blok one of an agent it is bound to (agents.<name>.<action>)."},
494
497
  "with.mismatch": {"level": "error", "message": "{path}: {key!r} is the dependencies of {of}, not of {action}.", "hint": "Declare <dependencies key=... like=\"self.{action}\" /> and hand that over."},
495
498
  "deps.unknown": {"level": "error", "message": "{path}: {key!r} is not a dependency of the blok (its dependencies: {keys}). Fix: {hint}."},
496
499
  "deps.unknown_state": {"level": "error", "message": "{path}: {key!r} has no state {state!r} (its states: {states}).", "hint": "Read one of the states listed, or add the agent that has it as a dependency."},
@@ -542,6 +545,10 @@
542
545
  "calls.not_in_kind": {"level": "error", "message": "{path}: a{n} {kind} blok calls no agent.", "hint": "A port blok is a field of a form: read the agent's state and write the port (port.set(...), bind={{port.value}}). What starts a task belongs in the action's assign blok."},
543
546
  "assign.kind": {"level": "error", "message": "{what} belongs to starting a run, so only an action's assign blok holds it, not a{n} {kind} blok.", "hint": "Make it <Blok kind=\"assign\"> in the action's bloks=[...]."},
544
547
  "logo.complexity": {"level": "error", "message": "{detail}"},
548
+ "logo.misplaced": {"level": "error", "message": "A <logo> is a child of the <Blok> it stands for, not inside another element.", "hint": "Move it to the top of the blok, beside its queries."},
549
+ "logo.twice": {"level": "error", "message": "A blok has one <logo>; this is a second one."},
550
+ "logo.in_logo": {"level": "error", "message": "A logo blok is a logo already: it declares no <logo> of its own.", "hint": "Draw it in the blok's <Logo> instead."},
551
+ "logo.dynamic": {"level": "warning", "message": "<{component}> sets {prop} with an expression; a <logo> is a fixed drawing that reads nothing, so it is drawn without it.", "hint": "Write the value as a literal."},
545
552
  "catalog.unknown_component": {"level": "warning", "message": "<{component}> is not in the catalog the blok is written for ({catalogs}).", "hint": "Look the component up in the catalog; names are case-sensitive."},
546
553
  "catalog.children": {"level": "warning", "message": "<{component}> takes no children.", "hint": "Close <{component}> without children (<{component} ... />), or put them beside it."},
547
554
  "catalog.text": {"level": "warning", "message": "<{component}> {detail}", "hint": "Put the text in a component that draws it (<Text>, <p>, <span>), or set it once."},
@@ -66,6 +66,10 @@ export type VocabKind = {
66
66
  calls: boolean;
67
67
  };
68
68
 
69
+ /** Whether a blok of this kind holds the stored `root`: a custom blok's `agents` is stored `deps`. */
70
+ export const kindReads = (kind: VocabKind, root: string): boolean =>
71
+ kind.roots.includes(root) || (root === 'deps' && kind.roots.includes('agents'));
72
+
69
73
  /** The row of `kind` in `context`: its own, or the narrower one it has there (vocabulary `kinds.<kind>.in`). */
70
74
  export const kindIn = (kind: VocabKind, context: string): VocabKind => kind.within[context as BlokContextName] ?? kind;
71
75