@arkitektio/bsx 4.0.1 → 4.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/bsx/references.d.ts.map +1 -1
- package/dist/bsx/references.js +17 -4
- package/dist/bsx/references.js.map +1 -1
- package/dist/ports/dependencies/DependenciesContainer.d.ts +13 -8
- package/dist/ports/dependencies/DependenciesContainer.d.ts.map +1 -1
- package/dist/ports/dependencies/DependenciesContainer.js +130 -118
- package/dist/ports/dependencies/DependenciesContainer.js.map +1 -1
- package/dist/ports/dependencies/DependencyTreeNotice.d.ts +3 -2
- package/dist/ports/dependencies/DependencyTreeNotice.d.ts.map +1 -1
- package/dist/ports/dependencies/DependencyTreeNotice.js +7 -6
- package/dist/ports/dependencies/DependencyTreeNotice.js.map +1 -1
- package/dist/ports/dependencies/tree.d.ts +24 -0
- package/dist/ports/dependencies/tree.d.ts.map +1 -1
- package/dist/ports/dependencies/tree.js +52 -0
- package/dist/ports/dependencies/tree.js.map +1 -1
- package/dist/ports/dependencies/useDependencyTree.d.ts +5 -0
- package/dist/ports/dependencies/useDependencyTree.d.ts.map +1 -1
- package/dist/ports/dependencies/useDependencyTree.js +11 -5
- package/dist/ports/dependencies/useDependencyTree.js.map +1 -1
- package/dist/renderer/BlokRenderer.d.ts +3 -1
- package/dist/renderer/BlokRenderer.d.ts.map +1 -1
- package/dist/renderer/BlokRenderer.js +5 -1
- package/dist/renderer/BlokRenderer.js.map +1 -1
- package/dist/renderer/bloks/control.d.ts +1 -0
- package/dist/renderer/bloks/control.d.ts.map +1 -1
- package/dist/renderer/bloks/control.js +10 -0
- package/dist/renderer/bloks/control.js.map +1 -1
- package/dist/renderer/bloks/run/host.d.ts +2 -0
- package/dist/renderer/bloks/run/host.d.ts.map +1 -1
- package/dist/renderer/bloks/run/host.js.map +1 -1
- package/dist/renderer/runtime/context.d.ts +1 -0
- package/dist/renderer/runtime/context.d.ts.map +1 -1
- package/dist/renderer/runtime/context.js +4 -0
- package/dist/renderer/runtime/context.js.map +1 -1
- package/dist/renderer/runtime/hooks.d.ts.map +1 -1
- package/dist/renderer/runtime/hooks.js +1 -0
- package/dist/renderer/runtime/hooks.js.map +1 -1
- package/dist/renderer/runtime/resolution.d.ts +1 -0
- package/dist/renderer/runtime/resolution.d.ts.map +1 -1
- package/dist/renderer/runtime/resolution.js +13 -2
- package/dist/renderer/runtime/resolution.js.map +1 -1
- package/dist/renderer/runtime/types.d.ts +5 -0
- package/dist/renderer/runtime/types.d.ts.map +1 -1
- package/dist/spec/bsx_v2.json +287 -0
- package/dist/spec/catalogs/base@2.json +12 -0
- package/dist/spec/catalogs/base@2.json.js +12 -0
- package/dist/spec/vocabulary.d.ts +1 -1
- package/dist/spec/vocabulary.d.ts.map +1 -1
- package/dist/spec/vocabulary.js +1 -1
- package/dist/spec/vocabulary.js.map +1 -1
- package/dist/spec/vocabulary.json +11 -3
- package/dist/spec/vocabulary.json.js +11 -3
- package/package.json +1 -1
- package/src/bsx/references.ts +18 -4
- package/src/ports/dependencies/DependenciesContainer.test.tsx +176 -0
- package/src/ports/dependencies/DependenciesContainer.tsx +341 -304
- package/src/ports/dependencies/DependencyTreeNotice.tsx +7 -15
- package/src/ports/dependencies/tree.test.ts +75 -0
- package/src/ports/dependencies/tree.ts +54 -0
- package/src/ports/dependencies/useDependencyTree.test.tsx +55 -0
- package/src/ports/dependencies/useDependencyTree.ts +11 -5
- package/src/renderer/BlokRenderer.tsx +8 -0
- package/src/renderer/bloks/control.tsx +15 -0
- package/src/renderer/bloks/run/host.tsx +2 -0
- package/src/renderer/bloks/run/space.test.tsx +17 -1
- package/src/renderer/runtime/context.tsx +5 -0
- package/src/renderer/runtime/hooks.ts +1 -0
- package/src/renderer/runtime/resolution.test.ts +8 -0
- package/src/renderer/runtime/resolution.ts +11 -2
- package/src/renderer/runtime/types.ts +5 -0
- package/src/spec/bsx_v2.json +287 -0
- package/src/spec/catalogs/base@2.json +12 -0
- package/src/spec/vocabulary.json +11 -3
- package/src/spec/vocabulary.ts +2 -2
package/src/spec/bsx_v2.json
CHANGED
|
@@ -1490,6 +1490,14 @@
|
|
|
1490
1490
|
"accepts_children": false,
|
|
1491
1491
|
"catalog": "scene@1"
|
|
1492
1492
|
},
|
|
1493
|
+
"args": {
|
|
1494
|
+
"text_prop": null,
|
|
1495
|
+
"context": "HTML",
|
|
1496
|
+
"children_context": null,
|
|
1497
|
+
"inherits_context": false,
|
|
1498
|
+
"accepts_children": false,
|
|
1499
|
+
"catalog": "base@2"
|
|
1500
|
+
},
|
|
1493
1501
|
"ask": {
|
|
1494
1502
|
"text_prop": null,
|
|
1495
1503
|
"context": "HTML",
|
|
@@ -8659,6 +8667,285 @@
|
|
|
8659
8667
|
"space.kind"
|
|
8660
8668
|
]
|
|
8661
8669
|
},
|
|
8670
|
+
{
|
|
8671
|
+
"name": "an assign blok",
|
|
8672
|
+
"source": "<Html><Card><Text>{args.slides}</Text><args /><Button onClick={assign.start()}>Start</Button></Card></Html>",
|
|
8673
|
+
"tree": {
|
|
8674
|
+
"id": "Html[0]",
|
|
8675
|
+
"component": "Html",
|
|
8676
|
+
"children": [
|
|
8677
|
+
{
|
|
8678
|
+
"id": "Html[0]/Card[0]",
|
|
8679
|
+
"component": "Card",
|
|
8680
|
+
"children": [
|
|
8681
|
+
{
|
|
8682
|
+
"id": "Html[0]/Card[0]/Text[0]",
|
|
8683
|
+
"component": "Text",
|
|
8684
|
+
"props": [
|
|
8685
|
+
{
|
|
8686
|
+
"key": "text",
|
|
8687
|
+
"dynamic_value": {
|
|
8688
|
+
"path": "args.slides"
|
|
8689
|
+
}
|
|
8690
|
+
}
|
|
8691
|
+
]
|
|
8692
|
+
},
|
|
8693
|
+
{
|
|
8694
|
+
"id": "Html[0]/Card[0]/args[0]",
|
|
8695
|
+
"component": "args"
|
|
8696
|
+
},
|
|
8697
|
+
{
|
|
8698
|
+
"id": "Html[0]/Card[0]/Button[0]",
|
|
8699
|
+
"component": "Button",
|
|
8700
|
+
"props": [
|
|
8701
|
+
{
|
|
8702
|
+
"key": "onClick",
|
|
8703
|
+
"util_call": {
|
|
8704
|
+
"operation": "assign.start"
|
|
8705
|
+
}
|
|
8706
|
+
},
|
|
8707
|
+
{
|
|
8708
|
+
"key": "label",
|
|
8709
|
+
"static_value": "Start"
|
|
8710
|
+
}
|
|
8711
|
+
]
|
|
8712
|
+
}
|
|
8713
|
+
]
|
|
8714
|
+
}
|
|
8715
|
+
]
|
|
8716
|
+
},
|
|
8717
|
+
"scope": {
|
|
8718
|
+
"kind": "assign",
|
|
8719
|
+
"context": "HTML",
|
|
8720
|
+
"dependencies": [
|
|
8721
|
+
{
|
|
8722
|
+
"key": "robot",
|
|
8723
|
+
"action_dependencies": [
|
|
8724
|
+
{
|
|
8725
|
+
"key": "move_to",
|
|
8726
|
+
"demand": {
|
|
8727
|
+
"arg_matches": [
|
|
8728
|
+
{
|
|
8729
|
+
"key": "position"
|
|
8730
|
+
}
|
|
8731
|
+
],
|
|
8732
|
+
"return_matches": [
|
|
8733
|
+
{
|
|
8734
|
+
"key": "arrived"
|
|
8735
|
+
}
|
|
8736
|
+
]
|
|
8737
|
+
}
|
|
8738
|
+
}
|
|
8739
|
+
],
|
|
8740
|
+
"state_dependencies": [
|
|
8741
|
+
{
|
|
8742
|
+
"key": "arm",
|
|
8743
|
+
"demand": {
|
|
8744
|
+
"matches": [
|
|
8745
|
+
{
|
|
8746
|
+
"key": "joints",
|
|
8747
|
+
"kind": "LIST"
|
|
8748
|
+
},
|
|
8749
|
+
{
|
|
8750
|
+
"key": "mode",
|
|
8751
|
+
"kind": "STRING"
|
|
8752
|
+
}
|
|
8753
|
+
]
|
|
8754
|
+
}
|
|
8755
|
+
}
|
|
8756
|
+
]
|
|
8757
|
+
}
|
|
8758
|
+
],
|
|
8759
|
+
"locals": [],
|
|
8760
|
+
"queries": [],
|
|
8761
|
+
"subscriptions": [],
|
|
8762
|
+
"args": [
|
|
8763
|
+
"slides"
|
|
8764
|
+
],
|
|
8765
|
+
"catalogs": [],
|
|
8766
|
+
"catalog": true,
|
|
8767
|
+
"module": null
|
|
8768
|
+
},
|
|
8769
|
+
"resolved": {
|
|
8770
|
+
"locals": []
|
|
8771
|
+
},
|
|
8772
|
+
"codes": []
|
|
8773
|
+
},
|
|
8774
|
+
{
|
|
8775
|
+
"name": "an assign blok places the run's dependencies",
|
|
8776
|
+
"source": "<Html><Space room=\"room:lab\"><Placed dep=\"robot\" /></Space></Html>",
|
|
8777
|
+
"tree": {
|
|
8778
|
+
"id": "Html[0]",
|
|
8779
|
+
"component": "Html",
|
|
8780
|
+
"children": [
|
|
8781
|
+
{
|
|
8782
|
+
"id": "Html[0]/Space[0]",
|
|
8783
|
+
"component": "Space",
|
|
8784
|
+
"props": [
|
|
8785
|
+
{
|
|
8786
|
+
"key": "room",
|
|
8787
|
+
"static_value": "room:lab"
|
|
8788
|
+
}
|
|
8789
|
+
],
|
|
8790
|
+
"children": [
|
|
8791
|
+
{
|
|
8792
|
+
"id": "Html[0]/Space[0]/Placed[0]",
|
|
8793
|
+
"component": "Placed",
|
|
8794
|
+
"props": [
|
|
8795
|
+
{
|
|
8796
|
+
"key": "dep",
|
|
8797
|
+
"static_value": "robot"
|
|
8798
|
+
}
|
|
8799
|
+
]
|
|
8800
|
+
}
|
|
8801
|
+
]
|
|
8802
|
+
}
|
|
8803
|
+
]
|
|
8804
|
+
},
|
|
8805
|
+
"scope": {
|
|
8806
|
+
"kind": "assign",
|
|
8807
|
+
"context": "HTML",
|
|
8808
|
+
"dependencies": [
|
|
8809
|
+
{
|
|
8810
|
+
"key": "robot",
|
|
8811
|
+
"action_dependencies": [
|
|
8812
|
+
{
|
|
8813
|
+
"key": "move_to",
|
|
8814
|
+
"demand": {
|
|
8815
|
+
"arg_matches": [
|
|
8816
|
+
{
|
|
8817
|
+
"key": "position"
|
|
8818
|
+
}
|
|
8819
|
+
],
|
|
8820
|
+
"return_matches": [
|
|
8821
|
+
{
|
|
8822
|
+
"key": "arrived"
|
|
8823
|
+
}
|
|
8824
|
+
]
|
|
8825
|
+
}
|
|
8826
|
+
}
|
|
8827
|
+
],
|
|
8828
|
+
"state_dependencies": [
|
|
8829
|
+
{
|
|
8830
|
+
"key": "arm",
|
|
8831
|
+
"demand": {
|
|
8832
|
+
"matches": [
|
|
8833
|
+
{
|
|
8834
|
+
"key": "joints",
|
|
8835
|
+
"kind": "LIST"
|
|
8836
|
+
},
|
|
8837
|
+
{
|
|
8838
|
+
"key": "mode",
|
|
8839
|
+
"kind": "STRING"
|
|
8840
|
+
}
|
|
8841
|
+
]
|
|
8842
|
+
}
|
|
8843
|
+
}
|
|
8844
|
+
]
|
|
8845
|
+
}
|
|
8846
|
+
],
|
|
8847
|
+
"locals": [],
|
|
8848
|
+
"queries": [],
|
|
8849
|
+
"subscriptions": [],
|
|
8850
|
+
"args": null,
|
|
8851
|
+
"catalogs": [],
|
|
8852
|
+
"catalog": true,
|
|
8853
|
+
"module": null
|
|
8854
|
+
},
|
|
8855
|
+
"resolved": {
|
|
8856
|
+
"locals": []
|
|
8857
|
+
},
|
|
8858
|
+
"codes": []
|
|
8859
|
+
},
|
|
8860
|
+
{
|
|
8861
|
+
"name": "an assign blok has no task",
|
|
8862
|
+
"source": "<Html><Text>{task.status}</Text></Html>",
|
|
8863
|
+
"tree": {
|
|
8864
|
+
"id": "Html[0]",
|
|
8865
|
+
"component": "Html",
|
|
8866
|
+
"children": [
|
|
8867
|
+
{
|
|
8868
|
+
"id": "Html[0]/Text[0]",
|
|
8869
|
+
"component": "Text",
|
|
8870
|
+
"props": [
|
|
8871
|
+
{
|
|
8872
|
+
"key": "text",
|
|
8873
|
+
"dynamic_value": {
|
|
8874
|
+
"path": "task.status"
|
|
8875
|
+
}
|
|
8876
|
+
}
|
|
8877
|
+
]
|
|
8878
|
+
}
|
|
8879
|
+
]
|
|
8880
|
+
},
|
|
8881
|
+
"scope": {
|
|
8882
|
+
"kind": "assign",
|
|
8883
|
+
"context": "HTML",
|
|
8884
|
+
"dependencies": [],
|
|
8885
|
+
"locals": [],
|
|
8886
|
+
"queries": [],
|
|
8887
|
+
"subscriptions": [],
|
|
8888
|
+
"args": null,
|
|
8889
|
+
"catalogs": [],
|
|
8890
|
+
"catalog": true,
|
|
8891
|
+
"module": null
|
|
8892
|
+
},
|
|
8893
|
+
"resolved": {
|
|
8894
|
+
"locals": []
|
|
8895
|
+
},
|
|
8896
|
+
"codes": [
|
|
8897
|
+
"roots.not_in_kind"
|
|
8898
|
+
]
|
|
8899
|
+
},
|
|
8900
|
+
{
|
|
8901
|
+
"name": "starting a run is an assign blok's",
|
|
8902
|
+
"source": "<Html><args /><Button onClick={assign.start()}>Start</Button></Html>",
|
|
8903
|
+
"tree": {
|
|
8904
|
+
"id": "Html[0]",
|
|
8905
|
+
"component": "Html",
|
|
8906
|
+
"children": [
|
|
8907
|
+
{
|
|
8908
|
+
"id": "Html[0]/args[0]",
|
|
8909
|
+
"component": "args"
|
|
8910
|
+
},
|
|
8911
|
+
{
|
|
8912
|
+
"id": "Html[0]/Button[0]",
|
|
8913
|
+
"component": "Button",
|
|
8914
|
+
"props": [
|
|
8915
|
+
{
|
|
8916
|
+
"key": "onClick",
|
|
8917
|
+
"util_call": {
|
|
8918
|
+
"operation": "assign.start"
|
|
8919
|
+
}
|
|
8920
|
+
},
|
|
8921
|
+
{
|
|
8922
|
+
"key": "label",
|
|
8923
|
+
"static_value": "Start"
|
|
8924
|
+
}
|
|
8925
|
+
]
|
|
8926
|
+
}
|
|
8927
|
+
]
|
|
8928
|
+
},
|
|
8929
|
+
"scope": {
|
|
8930
|
+
"kind": "action",
|
|
8931
|
+
"context": "HTML",
|
|
8932
|
+
"dependencies": [],
|
|
8933
|
+
"locals": [],
|
|
8934
|
+
"queries": [],
|
|
8935
|
+
"subscriptions": [],
|
|
8936
|
+
"args": null,
|
|
8937
|
+
"catalogs": [],
|
|
8938
|
+
"catalog": true,
|
|
8939
|
+
"module": null
|
|
8940
|
+
},
|
|
8941
|
+
"resolved": {
|
|
8942
|
+
"locals": []
|
|
8943
|
+
},
|
|
8944
|
+
"codes": [
|
|
8945
|
+
"assign.kind",
|
|
8946
|
+
"assign.kind"
|
|
8947
|
+
]
|
|
8948
|
+
},
|
|
8662
8949
|
{
|
|
8663
8950
|
"name": "an unknown component",
|
|
8664
8951
|
"source": "<Html><Frobnicator /></Html>",
|
|
@@ -17,6 +17,18 @@
|
|
|
17
17
|
"text_prop": null,
|
|
18
18
|
"props": []
|
|
19
19
|
},
|
|
20
|
+
{
|
|
21
|
+
"name": "args",
|
|
22
|
+
"description": "The arguments of the run an assign blok starts, as the form the action's ports generate: filled in right here, and read as `args.<key>`. Without it the host shows the form beside the blok. An assign blok only.",
|
|
23
|
+
"context": "HTML",
|
|
24
|
+
"children_context": null,
|
|
25
|
+
"inherits_context": false,
|
|
26
|
+
"accepts_children": false,
|
|
27
|
+
"downstream_of": [],
|
|
28
|
+
"not_downstream_of": [],
|
|
29
|
+
"text_prop": null,
|
|
30
|
+
"props": []
|
|
31
|
+
},
|
|
20
32
|
{
|
|
21
33
|
"name": "ask",
|
|
22
34
|
"description": "The open ask of the task this blok is about (`task.ask`), as the form its ports generate: answered right here, which resumes the task. Shows nothing while no ask is open. Replaces TaskAsk.",
|
package/src/spec/vocabulary.json
CHANGED
|
@@ -53,6 +53,12 @@
|
|
|
53
53
|
"locals": true,
|
|
54
54
|
"contexts": ["HTML", "SCENE"]
|
|
55
55
|
},
|
|
56
|
+
"assign": {
|
|
57
|
+
"description": "An action's own blok for starting a run of it (assign_bloks): shown before there is a task, with the arguments being filled in as args and the agents a run would get as deps.",
|
|
58
|
+
"roots": ["self", "deps", "args", "queries", "subscriptions", "viewer"],
|
|
59
|
+
"locals": true,
|
|
60
|
+
"contexts": ["HTML", "SCENE"]
|
|
61
|
+
},
|
|
56
62
|
"action_logo": {
|
|
57
63
|
"description": "An action's logo, drawn against the task the viewer last ran of it (null until then).",
|
|
58
64
|
"roots": ["task"],
|
|
@@ -141,7 +147,7 @@
|
|
|
141
147
|
]
|
|
142
148
|
},
|
|
143
149
|
"functions": {
|
|
144
|
-
"description": "Pure functions by namespace, snake_case. Positional arguments map onto params in order. `lazy`: arguments are read only as needed. `effect`: allowed only as a callback's one thing (ui.*, task.answer, query.*). `sees_status`: sees pending/failed instead of suspending. No function reads the wall clock. `null` says what the function does with a null argument (known absence); a missing path reads as null.",
|
|
150
|
+
"description": "Pure functions by namespace, snake_case. Positional arguments map onto params in order. `lazy`: arguments are read only as needed. `effect`: allowed only as a callback's one thing (ui.*, task.answer, assign.start, query.*). `sees_status`: sees pending/failed instead of suspending. No function reads the wall clock. `null` says what the function does with a null argument (known absence); a missing path reads as null.",
|
|
145
151
|
"cmp.eq": {"params": [["a", "ANY"], ["b", "ANY"]], "returns": "BOOL", "description": "Deep JSON equality.", "null": "null equals only null"},
|
|
146
152
|
"cmp.ne": {"params": [["a", "ANY"], ["b", "ANY"]], "returns": "BOOL", "description": "Not deep-equal.", "null": "null equals only null"},
|
|
147
153
|
"cmp.gt": {"params": [["a", "ANY"], ["b", "ANY"]], "returns": "BOOL", "description": "a > b, numbers or strings.", "null": "false"},
|
|
@@ -251,6 +257,7 @@
|
|
|
251
257
|
"time.diff": {"params": [["start", "STRING"], ["end", "STRING"]], "returns": "FLOAT", "description": "Seconds from start to end (ISO 8601 datetimes); negative when end is earlier. Pure: relative time to the viewed moment is the <Time> component's.", "null": "null"},
|
|
252
258
|
"ui.copy": {"params": [["text", "ANY"]], "returns": "ANY", "effect": true, "description": "Copies text to the viewer's clipboard: the only non-task effect.", "null": "copies an empty string"},
|
|
253
259
|
"task.answer": {"params": [["values", "DICT"]], "returns": "ANY", "effect": true, "task_operation": true, "description": "Answers the open ask of `task`. Counts as a task operation.", "null": "answers with no values"},
|
|
260
|
+
"assign.start": {"params": [], "returns": "ANY", "effect": true, "description": "Starts the run an assign blok prepares, with the arguments as they are filled in and the agents the blok was shown (deps) pinned. An assign blok only.", "null": "starts the run"},
|
|
254
261
|
"query.refetch": {"params": [["query", "STRING"]], "returns": "ANY", "effect": true, "description": "Re-reads the declared query named by the literal `query`; never suspends, queries.<name>.refetching is true meanwhile. BSX writes it queries.<name>.refetch().", "null": "refused: the query is named by a literal"},
|
|
255
262
|
"query.fetch_more": {"params": [["query", "STRING"], ["variables", "DICT", false]], "returns": "ANY", "effect": true, "description": "Reads the next page of the declared query named by the literal `query`, its variables overridden by `variables`, and appends the page's list at the query's `more` field to what is shown; queries.<name>.fetching_more is true meanwhile. BSX writes it queries.<name>.fetch_more(name: value, ...). Refused on a query without `more`.", "null": "refused: the query is named by a literal; null variables fetch with the query's own"}
|
|
256
263
|
},
|
|
@@ -265,7 +272,7 @@
|
|
|
265
272
|
"description": "What a prop or an argument may hold besides a literal, a path or a util call.",
|
|
266
273
|
"kinds": {
|
|
267
274
|
"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).",
|
|
268
|
-
"util_call": "A pure function, or an effect (ui.copy, task.answer, query.refetch, query.fetch_more) as a callback's one thing."
|
|
275
|
+
"util_call": "A pure function, or an effect (ui.copy, task.answer, assign.start, query.refetch, query.fetch_more) as a callback's one thing."
|
|
269
276
|
},
|
|
270
277
|
"reserved_kinds": {
|
|
271
278
|
"service_call": "Reserved for mutations, should they ever exist. Renderers refuse a call kind they do not know."
|
|
@@ -370,7 +377,7 @@
|
|
|
370
377
|
"callback.positional": {"level": "error", "message": "{call}: a task call names its arguments (name: value)."},
|
|
371
378
|
"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>."},
|
|
372
379
|
"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."},
|
|
373
|
-
"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).", "hint": "Give {key} a task call (deps.<key>.<action>(name: value)) or one effect, not a value."},
|
|
380
|
+
"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).", "hint": "Give {key} a task call (deps.<key>.<action>(name: value)) or one effect, not a value."},
|
|
374
381
|
"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}."},
|
|
375
382
|
"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 an into record."},
|
|
376
383
|
"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."},
|
|
@@ -416,6 +423,7 @@
|
|
|
416
423
|
"context.root": {"level": "error", "message": "The root of a {context} blok is <{root}>, not <{component}>.", "hint": "Make <{root}> the root and put <{component}> inside it."},
|
|
417
424
|
"context.root_unknown": {"level": "error", "message": "A blok's root names its context ({roots}), not <{component}>.", "hint": "Make the root one of {roots} and put <{component}> inside it."},
|
|
418
425
|
"context.kind": {"level": "error", "message": "A{n} {kind} blok is drawn in {contexts}, not {context}."},
|
|
426
|
+
"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": "Declare it with the action: @app.workflow(assign_bloks=[...])."},
|
|
419
427
|
"space.kind": {"level": "error", "message": "<{component}> places the run's dependencies, so only an action's own blok holds it, not a{n} {kind} blok.", "hint": "Declare it with the action: @app.workflow(bloks=[...])."},
|
|
420
428
|
"logo.complexity": {"level": "error", "message": "{detail}"},
|
|
421
429
|
"catalog.unknown_component": {"level": "warning", "message": "<{component}> is in no catalog in force ({catalogs}).", "hint": "Look the component up in the catalog; names are case-sensitive."},
|
package/src/spec/vocabulary.ts
CHANGED
|
@@ -8,8 +8,8 @@ import vocabularyJson from './vocabulary.json';
|
|
|
8
8
|
* diagnostics is read from this one file, never restated.
|
|
9
9
|
*/
|
|
10
10
|
|
|
11
|
-
export type BlokKind = 'agent' | 'custom' | 'task' | 'action' | 'action_logo';
|
|
12
|
-
export const BLOK_KINDS: readonly BlokKind[] = ['agent', 'custom', 'task', 'action', 'action_logo'];
|
|
11
|
+
export type BlokKind = 'agent' | 'custom' | 'task' | 'action' | 'assign' | 'action_logo';
|
|
12
|
+
export const BLOK_KINDS: readonly BlokKind[] = ['agent', 'custom', 'task', 'action', 'assign', 'action_logo'];
|
|
13
13
|
|
|
14
14
|
export type BlokContextName = 'HTML' | 'SCENE' | 'LOGO';
|
|
15
15
|
|