-
Notifications
You must be signed in to change notification settings - Fork 431
Expand file tree
/
Copy pathdora-schema.json
More file actions
1273 lines (1273 loc) · 54.1 KB
/
Copy pathdora-schema.json
File metadata and controls
1273 lines (1273 loc) · 54.1 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"title": "dora-rs specification",
"description": "The main configuration structure for defining a Dora dataflow. Dataflows are\nspecified through YAML files that describe the nodes, their connections, and\nexecution parameters.\n\n## Structure\n\nA dataflow consists of:\n- **Nodes**: The computational units that process data\n- **Deployment**: Optional deployment configuration (unstable)\n- **Debug options**: Optional development and debugging settings (unstable)\n\n## Example\n\n```yaml\nnodes:\n - id: webcam\n operator:\n python: webcam.py\n inputs:\n tick: dora/timer/millis/100\n outputs:\n - image\n - id: plot\n operator:\n python: plot.py\n inputs:\n image: webcam/image\n```",
"type": "object",
"properties": {
"env": {
"description": "Global environment variables inherited by every node.\n\nEach node's own `env` map takes precedence on key conflicts, so nodes\ncan override a global default without repeating shared values like\n`RUST_LOG`, `OTEL_EXPORTER_OTLP_ENDPOINT`, or `CUDA_VISIBLE_DEVICES`.\n\n## Example\n\n```yaml\nenv:\n RUST_LOG: info\n OTEL_EXPORTER_OTLP_ENDPOINT: http://collector:4317\nnodes:\n - id: verbose-node\n path: path/to/node\n env:\n RUST_LOG: debug # overrides the global RUST_LOG for this node\n```",
"type": [
"object",
"null"
],
"additionalProperties": {
"$ref": "#/$defs/EnvValue"
}
},
"exit_when_nodes_finish": {
"description": "Finish the dataflow once every node has, treating\n`dora/timer/...` inputs as a clock rather than as work.\n\nA timer input has no upstream node, so it never closes. By default\na node consuming one is therefore never told its inputs are done\nand the graph cannot end on its own, even after every node doing\nreal work has exited (dora-rs/dora#2920).\n\nOff by default: for a long-lived dataflow the timer is precisely\nwhat keeps it alive. Nodes with no data inputs at all (timer-only\nsources, or no inputs) are unaffected either way -- they have no\ndependency that could finish, so they are treated as sources.\n\nSet by `dora run --exit-when-nodes-finish` and `dora start\n--exit-when-nodes-finish`, and settable directly in YAML. It lives\non the descriptor rather than on the wire so that it survives the\nevents a dataflow outlives: auto-recovery re-spawn, coordinator\nrestart with state reconstruction, and `dora restart`.\n\n## Example\n\n```yaml\nexit_when_nodes_finish: true\nnodes:\n - id: worker\n path: ./worker\n inputs:\n tick: dora/timer/millis/100\n```",
"type": [
"boolean",
"null"
]
},
"health_check_interval": {
"description": "How often the daemon checks node health (in seconds).\n\nDefaults to 5.0 seconds if not specified. Lower values detect hung nodes\nfaster but add more overhead.",
"type": [
"number",
"null"
],
"format": "double",
"default": null
},
"nodes": {
"description": "List of nodes in the dataflow\n\nThis is the most important field of the dataflow specification.\nEach node must be identified by a unique `id`:\n\n## Example\n\n```yaml\nnodes:\n - id: foo\n path: path/to/the/executable\n # ... (see below)\n - id: bar\n path: path/to/another/executable\n # ... (see below)\n```\n\nFor each node, you need to specify the `path` of the executable or script that Dora should run when starting the node.\nMost of the other node fields are optional, but you typically want to specify at least some `inputs` and/or `outputs`.",
"type": "array",
"items": {
"$ref": "#/$defs/Node"
}
},
"strict_types": {
"description": "Enable strict type checking: type warnings become errors during build.\n\nCan also be enabled via `--strict-types` CLI flag on `dora build`.",
"type": [
"boolean",
"null"
]
},
"type_rules": {
"description": "Custom type compatibility rules.\n\nEach rule declares that a source type can be implicitly converted to\na target type. These supplement the built-in widening rules.\n\n## Example\n\n```yaml\ntype_rules:\n - from: myproject/SensorV1\n to: myproject/SensorV2\n```",
"type": "array",
"items": {
"$ref": "#/$defs/TypeRuleDef"
}
}
},
"additionalProperties": true,
"required": [
"nodes"
],
"$defs": {
"ByteSize": {
"description": "Byte size: integer (raw bytes) or string with unit (e.g. \"128MB\", \"1GB\")",
"anyOf": [
{
"type": "integer"
},
{
"type": "string"
}
]
},
"DataId": {
"description": "A validated data (output) identifier.\n\nA `DataId` may contain only `[a-zA-Z0-9_./-]` and must be non-empty. Unlike\n[`NodeId`], a `DataId` **may** contain `/` (runtime-operator outputs are\nnamespaced as `<operator-id>/<output-name>`), but leading, trailing, or\nconsecutive slashes — which would produce empty path segments — are\nrejected.\n\n# Parsing vs. conversion (panic footgun)\n\nUse [`str::parse`] / [`FromStr`](std::str::FromStr) for untrusted input: it\nreturns `Result<DataId, InvalidId>`. The `From<String>` / `From<&str>`\nconversions — and therefore `.into()` and the auto-derived `TryFrom` —\n**panic** on an invalid id.\n\n```\nuse dora_message::id::DataId;\n\nassert!(\"image\".parse::<DataId>().is_ok());\nassert!(\"op/status\".parse::<DataId>().is_ok()); // '/' is allowed in a DataId\nassert!(\"a//b\".parse::<DataId>().is_err()); // empty path segment rejected\nassert!(\"/out\".parse::<DataId>().is_err()); // leading '/' rejected\nassert!(\"bad id\".parse::<DataId>().is_err()); // space rejected\n```\n\nThe infallible-looking conversion panics on the same invalid input:\n\n```should_panic\nuse dora_message::id::DataId;\nlet _ = DataId::from(\"a//b\".to_string()); // panics — prefer .parse()\n```",
"type": "string"
},
"Duration": {
"type": "object",
"properties": {
"nanos": {
"type": "integer",
"format": "uint32",
"minimum": 0
},
"secs": {
"type": "integer",
"format": "uint64",
"minimum": 0
}
},
"required": [
"secs",
"nanos"
]
},
"EnvValue": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "integer",
"format": "int64"
},
{
"type": "number",
"format": "double"
},
{
"type": "string"
}
]
},
"Input": {
"description": "A single input subscription of a node, as declared under `inputs:` in a\ndataflow descriptor.\n\nIn YAML an input is written either as a bare mapping string\n(`source_node/output`) or as a mapping plus per-input options; both forms\ndeserialize into this struct (see [`InputDef`]).",
"anyOf": [
{
"$ref": "#/$defs/InputMapping"
},
{
"type": "object",
"properties": {
"input_timeout": {
"type": [
"number",
"null"
],
"format": "double"
},
"queue_policy": {
"anyOf": [
{
"$ref": "#/$defs/QueuePolicy"
},
{
"type": "null"
}
]
},
"queue_size": {
"type": [
"integer",
"null"
],
"format": "uint",
"minimum": 0
},
"source": {
"$ref": "#/$defs/InputMapping"
}
},
"required": [
"source"
]
}
]
},
"InputMapping": {
"description": "The source an [`Input`] subscribes to.\n\nThe wire form is a `/`-separated string; [`FromStr`] parses it and\n[`fmt::Display`] renders it back, so the two round-trip:\n\n```\nuse dora_message::config::InputMapping;\n\nlet mapping: InputMapping = \"camera/image\".parse().unwrap();\nassert!(matches!(mapping, InputMapping::User(_)));\nassert_eq!(mapping.to_string(), \"camera/image\");\n\n// Built-in timer source.\nlet timer: InputMapping = \"dora/timer/millis/100\".parse().unwrap();\nassert_eq!(timer.to_string(), \"dora/timer/millis/100\");\n\n// A mapping without a `/` separator is rejected.\nassert!(\"no-slash\".parse::<InputMapping>().is_err());\n```",
"oneOf": [
{
"description": "A built-in timer that fires at a fixed `interval`.\n\nSyntax: `dora/timer/{unit}/{value}`, e.g. `dora/timer/millis/100`.",
"type": "object",
"properties": {
"Timer": {
"type": "object",
"properties": {
"interval": {
"description": "How often the timer fires.",
"$ref": "#/$defs/Duration"
}
},
"required": [
"interval"
]
}
},
"additionalProperties": true,
"required": [
"Timer"
]
},
{
"description": "Subscribe to log messages from all (or filtered) nodes in the dataflow.\n\nSyntax: `dora/logs`, `dora/logs/{level}`, `dora/logs/{level}/{node_id}`",
"type": "object",
"properties": {
"Logs": {
"$ref": "#/$defs/LogSubscriptionFilter"
}
},
"additionalProperties": true,
"required": [
"Logs"
]
},
{
"description": "Subscribe to another node's output — the common case.",
"type": "object",
"properties": {
"User": {
"$ref": "#/$defs/UserInputMapping"
}
},
"additionalProperties": true,
"required": [
"User"
]
}
]
},
"LogSubscriptionFilter": {
"description": "Filter for the `dora/logs` virtual input.",
"type": "object",
"properties": {
"min_level": {
"description": "Minimum log level to receive. `None` means all levels (including stdout).",
"type": [
"string",
"null"
]
},
"node_filter": {
"description": "Only receive logs from this specific node. `None` means all nodes.",
"anyOf": [
{
"$ref": "#/$defs/NodeId"
},
{
"type": "null"
}
]
}
}
},
"Node": {
"title": "Dora Node Configuration",
"description": "A node represents a computational unit in a Dora dataflow. Each node runs as a\nseparate process and can communicate with other nodes through inputs and outputs.",
"type": "object",
"properties": {
"args": {
"description": "Command-line arguments passed to the executable.\n\nThe command-line arguments that should be passed to the executable/script specified in `path`.\nThe arguments should be separated by space.\nThis field is optional and defaults to an empty argument list.\n\n## Example\n```yaml\nnodes:\n - id: example\n path: example-node\n args: -v --some-flag foo\n```",
"type": [
"string",
"null"
]
},
"branch": {
"description": "Git branch to checkout after cloning.\n\nThe `branch` field is only allowed in combination with the [`git`](#git) field.\nIt specifies the branch that should be checked out after cloning.\nOnly one of `branch`, `tag`, or `rev` can be specified.\n\n## Example\n\n```yaml\nnodes:\n - id: rust-node\n git: https://github.com/dora-rs/dora.git\n branch: some-branch-name\n```",
"type": [
"string",
"null"
]
},
"build": {
"description": "Build commands executed during `dora build`. Each line runs separately.\n\nThe `build` key specifies the command that should be invoked for building the node.\nThe key expects a single- or multi-line string.\n\nEach line is run as a separate command.\nSpaces are used to separate arguments.\n\nNote that all the environment variables specified in the [`env`](Self::env) field are also\napplied to the build commands.\n\n## Special treatment of `pip`\n\nBuild lines that start with `pip` or `pip3` are treated in a special way:\nIf the `--uv` argument is passed to the `dora build` command, all `pip`/`pip3` commands are\nrun through the [`uv` package manager](https://docs.astral.sh/uv/).\n\n## Example\n\n```yaml\nnodes:\n- id: build-example\n build: cargo build -p receive_data --release\n path: target/release/receive_data\n- id: multi-line-example\n build: |\n pip install requirements.txt\n pip install -e some/local/package\n path: package\n```\n\nIn the above example, the `pip` commands will be replaced by `uv pip` when run through\n`dora build --uv`.",
"type": [
"string",
"null"
]
},
"cpu_affinity": {
"description": "CPU cores to pin this node's process to (Linux only, ignored on other platforms).\n\n## Example\n\n```yaml\nnodes:\n - id: fast_node\n path: ./fast_node\n cpu_affinity: [0, 1]\n```",
"type": [
"array",
"null"
],
"items": {
"type": "integer",
"format": "uint",
"minimum": 0
}
},
"description": {
"description": "Detailed description of the node's functionality.\n\n## Example\n\n```yaml\nnodes:\n - id: camera_node\n description: \"Captures video frames from webcam\"\n```",
"type": [
"string",
"null"
]
},
"env": {
"description": "Environment variables for node builds and execution.\n\nKey-value map of environment variables that should be set for both the\n[`build`](Self::build) operation and the node execution (i.e. when the node is spawned\nthrough [`path`](Self::path)).\n\nSupports strings, numbers, and booleans.\n\n## Example\n\n```yaml\nnodes:\n - id: example-node\n path: path/to/node\n env:\n DEBUG: true\n PORT: 8080\n API_KEY: \"secret-key\"\n```",
"type": [
"object",
"null"
],
"additionalProperties": {
"$ref": "#/$defs/EnvValue"
}
},
"finish_grace_secs": {
"description": "Per-node finish-drain grace period in seconds.\n\nOverrides the global `DORA_FINISH_DRAIN_GRACE_SECS` for this node only.\nWhen all other nodes in a dataflow have finished, the daemon waits this\nlong after the node's last input closes before force-stopping it.\n\nSet to a large value (e.g. `3600.0`) for nodes that need significant\npost-input compute time (ML training, large-batch inference, checkpoint\nwrites) to prevent premature SIGKILL while the computation is in progress.\n\nWhen unset, the global grace period applies (default 120s, controlled\nby `DORA_FINISH_DRAIN_GRACE_SECS`).",
"type": [
"number",
"null"
],
"format": "double"
},
"git": {
"description": "Git repository URL for downloading nodes.\n\nThe `git` key allows downloading nodes (i.e. their source code) from git repositories.\nThis can be especially useful for distributed dataflows.\n\nWhen a `git` key is specified, `dora build` automatically clones the specified repository\n(or reuse an existing clone).\nThen it checks out the specified [`branch`](Self::branch), [`tag`](Self::tag), or\n[`rev`](Self::rev), or the default branch if none of them are specified.\nAfterwards it runs the [`build`](Self::build) command if specified.\n\nNote that the git clone directory is set as working directory for both the\n[`build`](Self::build) command and the specified [`path`](Self::path).\n\n## Example\n\n```yaml\nnodes:\n - id: rust-node\n git: https://github.com/dora-rs/dora.git\n build: cargo build -p rust-dataflow-example-node\n path: target/debug/rust-dataflow-example-node\n```\n\nIn the above example, `dora build` will first clone the specified `git` repository and then\nrun the specified `build` inside the local clone directory.\nWhen `dora run` or `dora start` is invoked, the working directory will be the git clone\ndirectory too. So a relative `path` will start from the clone directory.",
"type": [
"string",
"null"
]
},
"health_check_timeout": {
"description": "Health check timeout in seconds.\n\nWhen set, the daemon monitors this node for activity **once it has\nconnected** (i.e. subscribed to events during `Node::init`). If the\nconnected node then does not communicate with the daemon within this\ntimeout, it is killed and the restart policy is evaluated.\n\nThis bounds post-connection liveness only, not startup time: a node\nstill in a slow cold start has not connected yet and is never killed by\nthis watchdog. A node that hangs before it ever subscribes is therefore\nnot reaped here either.",
"type": [
"number",
"null"
],
"format": "double"
},
"hub": {
"description": "Hub package reference (unstable).\n\nReferences a node published in the Dora Hub index:\n`[<namespace>/]<name>@<semver-requirement>`. A bare name is shorthand\nfor the official `dora-rs/` namespace.\n\n`dora build` resolves the reference against the index to a pinned\ncommit and the node is fetched/built through the same machinery as a\n[`git`](Self::git) node; the package manifest supplies the\nentrypoint, build command, and typed contracts. Mutually exclusive\nwith `path`, `git`, and `build`.\n\n## Example\n\n```yaml\nnodes:\n - id: detector\n hub: dora-yolo@^0.5\n inputs:\n image: camera/image\n outputs:\n - bbox\n```",
"type": [
"string",
"null"
]
},
"id": {
"description": "Unique node identifier. Must not contain `/` characters.\n\nNode IDs can be arbitrary strings with the following limitations:\n\n- They must not contain any `/` characters (slashes).\n- We do not recommend using whitespace characters (e.g. spaces) in IDs\n\nEach node must have an ID field.\n\n## Example\n\n```yaml\nnodes:\n - id: camera_node\n - id: some_other_node\n```",
"$ref": "#/$defs/NodeId"
},
"input_types": {
"description": "Optional type annotations for inputs.\n\nMaps input identifiers to expected type URNs. Used by `dora validate`\nto check that upstream output types match expectations.",
"type": "object",
"additionalProperties": {
"type": "string"
}
},
"inputs": {
"description": "Input data connections from other nodes.\n\nDefines the inputs that this node is subscribing to.\n\nThe `inputs` field should be a key-value map of the following format:\n\n`input_id: source_node_id/source_node_output_id`\n\nThe components are defined as follows:\n\n - `input_id` is the local identifier that should be used for this input.\n\n This will map to the `id` field of\n [`Event::Input`](https://docs.rs/dora-node-api/latest/dora_node_api/enum.Event.html#variant.Input)\n events sent to the node event loop.\n - `source_node_id` should be the `id` field of the node that sends the output that we want\n to subscribe to\n - `source_node_output_id` should be the identifier of the output that that we want\n to subscribe to\n\n## Example\n\n```yaml\nnodes:\n - id: example-node\n outputs:\n - one\n - two\n - id: receiver\n inputs:\n my_input: example-node/two\n```",
"type": "object",
"additionalProperties": {
"$ref": "#/$defs/Input"
},
"default": {}
},
"max_log_size": {
"description": "Maximum log file size before rotation (e.g. \"50MB\", \"1GB\").\n\nWhen the JSONL log file exceeds this size, it is rotated. Old files\nare renamed with numeric suffixes (`.1.jsonl`, `.2.jsonl`, etc.) and\nthe oldest are deleted once 5 rotated files exist.\n\n## Example\n\n```yaml\nnodes:\n - id: sensor\n path: ./sensor\n max_log_size: \"100MB\"\n```",
"type": [
"string",
"null"
]
},
"max_restart_delay": {
"description": "Maximum delay in seconds for exponential backoff.\n\nCaps the exponentially growing `restart_delay`. For example, with\n`restart_delay: 1.0` and `max_restart_delay: 30.0`, delays grow as\n1s, 2s, 4s, 8s, 16s, 30s, 30s, ...",
"type": [
"number",
"null"
],
"format": "double"
},
"max_restarts": {
"description": "Maximum number of restart attempts. 0 means unlimited.\n\nWhen combined with `restart_window`, this limits restarts within the window period.\nFor example, `max_restarts: 5` with `restart_window: 300` means \"5 restarts per 5 minutes\".",
"type": "integer",
"format": "uint32",
"default": 0,
"minimum": 0
},
"max_rotated_files": {
"description": "Maximum number of rotated log files to keep (default: 5)",
"type": [
"integer",
"null"
],
"format": "uint32",
"minimum": 0
},
"min_log_level": {
"description": "Minimum log level for this node (error, warn, info, debug, trace, stdout).\n\nLogs below this level are suppressed from file output, coordinator\nforwarding, and `send_logs_as` routing.\n\n## Example\n\n```yaml\nnodes:\n - id: noisy_sensor\n path: ./sensor\n min_log_level: info\n```",
"type": [
"string",
"null"
]
},
"module": {
"description": "Path to a module definition file (e.g. `nav_module.yml`).\n\nA module is a reusable sub-dataflow: a group of nodes with declared\ninputs and outputs. At build time the module is expanded inline —\ninternal node IDs are prefixed with `{module_id}.` and all wiring is\nrewritten so the runtime sees only flat nodes.\n\nMutually exclusive with `path`, `operators`, `operator`, `custom`,\nand `ros2`.\n\n## Example\n\n```yaml\nnodes:\n - id: nav_stack\n module: modules/navigation_module.yml\n inputs:\n goal_pose: localization/goal\n```",
"type": [
"string",
"null"
]
},
"name": {
"description": "Human-readable node name for documentation.\n\nThis optional field can be used to define a more descriptive name in addition to a short\n[`id`](Self::id).\n\n## Example\n\n```yaml\nnodes:\n - id: camera_node\n name: \"Camera Input Handler\"",
"type": [
"string",
"null"
]
},
"operator": {
"description": "Single operator configuration.\n\nThis is a convenience field for defining runtime nodes that contain only a single operator.\nThis field is an alternative to the [`operators`](Self::operators) field, which can be used\nif there is only a single operator defined for the runtime node.\n\n## Example\n\n```yaml\nnodes:\n - id: runtime-node\n operator:\n id: processor\n python: script.py\n outputs: [data]\n```",
"anyOf": [
{
"$ref": "#/$defs/SingleOperatorDefinition"
},
{
"type": "null"
}
]
},
"operators": {
"description": "Multiple operators running in a shared runtime process.\n\nOperators are an experimental, lightweight alternative to nodes.\nInstead of running as a separate process, operators are linked into a runtime process.\nThis allows running multiple operators to share a single address space (not supported for\nPython currently).\n\nOperators are defined as part of the node list, as children of a runtime node.\nA runtime node is a special node that specifies no [`path`](Self::path) field, but contains\nan `operators` field instead.\n\n## Example\n\n```yaml\nnodes:\n - id: runtime-node\n operators:\n - id: processor\n python: process.py\n```",
"anyOf": [
{
"$ref": "#/$defs/RuntimeNode"
},
{
"type": "null"
}
]
},
"output_framing": {
"description": "Per-output framing overrides (default: Raw for all).\n\nMaps output identifiers to their wire framing mode.\nOutputs not listed here use the default `Raw` framing.",
"type": "object",
"additionalProperties": {
"$ref": "#/$defs/OutputFraming"
}
},
"output_metadata": {
"description": "Required metadata keys per output.\n\nMaps output identifiers to lists of required metadata key names.\nThese are checked at build/validate time.\n\n## Example\n\n```yaml\noutput_metadata:\n response: [request_id]\n```",
"type": "object",
"additionalProperties": {
"type": "array",
"items": {
"type": "string"
}
}
},
"output_types": {
"description": "Optional type annotations for outputs.\n\nMaps output identifiers to type URNs (e.g. `std/media/v1/Image`).\nOnly annotated outputs are type-checked; unannotated outputs remain dynamic.",
"type": "object",
"additionalProperties": {
"type": "string"
}
},
"outputs": {
"description": "Output data identifiers produced by this node.\n\nList of output identifiers that the node sends.\nMust contain all `output_id` values that the node uses when sending output, e.g. through the\n[`send_output`](https://docs.rs/dora-node-api/latest/dora_node_api/struct.DoraNode.html#method.send_output)\nfunction.\n\n## Example\n\n```yaml\nnodes:\n - id: example-node\n outputs:\n - processed_image\n - metadata\n```",
"type": "array",
"default": [],
"items": {
"$ref": "#/$defs/DataId"
},
"uniqueItems": true
},
"params": {
"description": "Parameters passed to a module for compile-time substitution.\n\nOnly meaningful when `module` is set. Values are substituted into\ninner node `args` fields (using `${_param.name}` syntax) and can be\ninjected into inner node `env` maps.\n\n## Example\n\n```yaml\nnodes:\n - id: nav_stack\n module: modules/navigation_module.yml\n params:\n speed: \"2.0\"\n mode: turbo\n```",
"type": "object",
"additionalProperties": {
"type": "string"
}
},
"path": {
"description": "Path to executable or script that should be run.\n\nSpecifies the path of the executable or script that Dora should run when starting the\ndataflow.\nThis can point to a normal executable (e.g. when using a compiled language such as Rust) or\na Python script.\n\nDora will automatically append a `.exe` extension on Windows systems when the specified\nfile name has no extension.\n\n## Example\n\n```yaml\nnodes:\n - id: rust-example\n path: target/release/rust-node\n - id: python-example\n path: ./receive_data.py\n```\n\n## URL as Path\n\nThe `path` field can also point to a URL instead of a local path.\nIn this case, Dora will download the given file when starting the dataflow.\n\nNote that this is quite an old feature and using this functionality is **not recommended**\nanymore. Instead, we recommend using a [`git`][Self::git] and/or [`build`](Self::build)\nkey.",
"type": [
"string",
"null"
]
},
"path_sha256": {
"description": "SHA-256 checksum the `path` download must match, verified after fetch\nand on cache reuse (spec §8.2/§8.4). Set internally when a `hub:`\nreference resolves to a prebuilt binary artifact; rarely set by hand.",
"type": [
"string",
"null"
]
},
"pattern": {
"description": "Communication pattern shorthand (e.g. `service-server`).\n\nAutomatically implies required metadata keys on all outputs.\nSee `pattern_metadata_keys()` for supported patterns.",
"type": [
"string",
"null"
]
},
"restart_delay": {
"description": "Initial delay in seconds before restarting. Doubles each attempt (exponential backoff).\n\nFor example, with `restart_delay: 1.0`, delays will be 1s, 2s, 4s, 8s, ...\nUse `max_restart_delay` to cap the backoff.",
"type": [
"number",
"null"
],
"format": "double"
},
"restart_policy": {
"description": "Whether this node should be restarted on exit or error.\n\nDefaults to `RestartPolicy::Never`.",
"$ref": "#/$defs/RestartPolicy",
"default": "never"
},
"restart_window": {
"description": "Time window in seconds for counting restarts.\n\nWhen set, the restart counter resets after this period of time elapses since the\nfirst restart in the current window. This enables \"N restarts within M seconds\" semantics.",
"type": [
"number",
"null"
],
"format": "double"
},
"rev": {
"description": "Git revision (e.g. commit hash) to checkout after cloning.\n\nThe `rev` field is only allowed in combination with the [`git`](#git) field.\nIt specifies the git revision (e.g. a commit hash) that should be checked out after cloning.\nOnly one of `branch`, `tag`, or `rev` can be specified.\n\n## Example\n\n```yaml\nnodes:\n - id: rust-node\n git: https://github.com/dora-rs/dora.git\n rev: 64ab0d7c\n```",
"type": [
"string",
"null"
]
},
"ros2": {
"description": "ROS2 bridge configuration (unstable).\n\nDeclares this node as a ROS2 bridge that automatically subscribes to or\npublishes on ROS2 topics. No custom code is needed -- the framework spawns\na bridge binary that converts between ROS2 DDS messages and Dora's Arrow\nformat.\n\n## Example\n\n```yaml\nnodes:\n - id: camera_bridge\n ros2:\n topic: /camera/image_raw\n message_type: sensor_msgs/Image\n direction: subscribe\n outputs:\n - image\n```",
"anyOf": [
{
"$ref": "#/$defs/Ros2BridgeConfig"
},
{
"type": "null"
}
]
},
"send_logs_as": {
"description": "Redirect structured log entries to a data output as JSON strings.\n\nUnlike `send_stdout_as` which sends raw stdout lines, this sends only\nparsed structured log entries (with level, timestamp, message, fields).\n\n## Example\n\n```yaml\nnodes:\n - id: sensor\n path: ./sensor\n send_logs_as: logs\n outputs:\n - data\n - logs\n```",
"type": [
"string",
"null"
]
},
"send_stdout_as": {
"description": "Redirect stdout/stderr to a data output.\n\nThis field can be used to send all stdout and stderr output of the node as a Dora output.\nEach output line is sent as a separate message.\n\n\n## Example\n\n```yaml\nnodes:\n - id: example\n send_stdout_as: stdout_output\n - id: logger\n inputs:\n example_output: example/stdout_output\n```",
"type": [
"string",
"null"
]
},
"shared_memory_pool_size": {
"description": "Size of the zenoh shared memory pool for zero-copy output publishing.\n\nAccepts an integer (raw bytes) or a string with a unit suffix\n(`KB`, `MB`, `GB`, case-insensitive). If unset, the\n`DORA_NODE_SHM_POOL_SIZE` env var is used, falling back to a\nbuilt-in default.\n\n## Example\n\n```yaml\nnodes:\n - id: camera-node\n shared_memory_pool_size: 128MB\n```",
"anyOf": [
{
"$ref": "#/$defs/ByteSize"
},
{
"type": "null"
}
]
},
"tag": {
"description": "Git tag to checkout after cloning.\n\nThe `tag` field is only allowed in combination with the [`git`](#git) field.\nIt specifies the git tag that should be checked out after cloning.\nOnly one of `branch`, `tag`, or `rev` can be specified.\n\n## Example\n\n```yaml\nnodes:\n - id: rust-node\n git: https://github.com/dora-rs/dora.git\n tag: v0.1.0\n```",
"type": [
"string",
"null"
]
}
},
"additionalProperties": true,
"required": [
"id"
]
},
"NodeId": {
"description": "A validated node identifier.\n\nA `NodeId` may contain only `[a-zA-Z0-9_.-]`, must be non-empty, and must\nnot start with `.` (dot-segments like `.` or `..` could traverse into a\nparent directory when the id is joined into a filesystem path). Unlike\n[`DataId`], a `NodeId` may **not** contain `/`, which separates\n`<node_id>/<output_id>` in input-mapping syntax.\n\nThe exact id `dora` is additionally reserved: it names the built-in input\nnamespaces (`dora/timer/...`, `dora/logs`), which input-mapping parsing\nmatches before any user node, so a node called `dora` could never be\nsubscribed to. Only the exact string is reserved — `dora-node`, `my-dora`\nand `Dora` all remain valid.\n\n# Parsing vs. conversion (panic footgun)\n\nUse [`str::parse`] / [`FromStr`](std::str::FromStr) for untrusted input: it\nreturns `Result<NodeId, InvalidId>`. The `From<String>` conversion — and\ntherefore `.into()` and the auto-derived `TryFrom<String>` — **panics** on\nan invalid id.\n\n```\nuse dora_message::id::NodeId;\n\n// Fallible path — always safe for untrusted input:\nassert!(\"camera_node\".parse::<NodeId>().is_ok());\nassert!(\"node/out\".parse::<NodeId>().is_err()); // '/' is not allowed in a NodeId\nassert!(\"\".parse::<NodeId>().is_err()); // empty is rejected\nassert!(\".hidden\".parse::<NodeId>().is_err()); // leading '.' is rejected\nassert!(\"dora\".parse::<NodeId>().is_err()); // reserved for built-in inputs\nassert!(\"dora-node\".parse::<NodeId>().is_ok()); // only the exact id is reserved\n```\n\nThe infallible-looking conversion panics on the same invalid input:\n\n```should_panic\nuse dora_message::id::NodeId;\nlet _ = NodeId::from(\"node/out\".to_string()); // panics — prefer .parse()\n```",
"type": "string"
},
"OperatorDefinition": {
"type": "object",
"properties": {
"build": {
"description": "Build commands for this operator",
"type": [
"string",
"null"
]
},
"description": {
"description": "Detailed description of the operator",
"type": [
"string",
"null"
]
},
"id": {
"description": "Unique operator identifier within the runtime",
"$ref": "#/$defs/OperatorId"
},
"input_types": {
"description": "Optional type annotations for inputs",
"type": "object",
"additionalProperties": {
"type": "string"
}
},
"inputs": {
"description": "Input data connections",
"type": "object",
"additionalProperties": {
"$ref": "#/$defs/Input"
},
"default": {}
},
"max_log_size": {
"description": "Maximum log file size before rotation (e.g. \"50MB\", \"1GB\")",
"type": [
"string",
"null"
]
},
"max_rotated_files": {
"description": "Maximum number of rotated log files to keep (default: 5)",
"type": [
"integer",
"null"
],
"format": "uint32",
"minimum": 0
},
"min_log_level": {
"description": "Minimum log level for this operator",
"type": [
"string",
"null"
]
},
"name": {
"description": "Human-readable operator name",
"type": [
"string",
"null"
]
},
"output_framing": {
"description": "Per-output framing overrides (default: Raw for all).",
"type": "object",
"additionalProperties": {
"$ref": "#/$defs/OutputFraming"
}
},
"output_metadata": {
"description": "Required metadata keys per output",
"type": "object",
"additionalProperties": {
"type": "array",
"items": {
"type": "string"
}
}
},
"output_types": {
"description": "Optional type annotations for outputs",
"type": "object",
"additionalProperties": {
"type": "string"
}
},
"outputs": {
"description": "Output data identifiers",
"type": "array",
"default": [],
"items": {
"$ref": "#/$defs/DataId"
},
"uniqueItems": true
},
"pattern": {
"description": "Communication pattern shorthand (e.g. `service-server`)",
"type": [
"string",
"null"
]
},
"send_logs_as": {
"description": "Redirect structured log entries to a data output as JSON strings",
"type": [
"string",
"null"
]
},
"send_stdout_as": {
"description": "Redirect stdout to data output",
"type": [
"string",
"null"
]
}
},
"oneOf": [
{
"type": "object",
"properties": {
"shared-library": {
"type": "string"
}
},
"required": [
"shared-library"
]
},
{
"type": "object",
"properties": {
"python": {
"$ref": "#/$defs/PythonSource"
}
},
"required": [
"python"
]
}
],
"required": [
"id"
]
},
"OperatorId": {
"type": "string"
},
"OutputFraming": {
"description": "Wire framing mode for an output.",
"oneOf": [
{
"description": "Raw Arrow buffer layout (default, current behavior).",
"type": "string",
"const": "raw"
},
{
"description": "Arrow IPC stream format — self-describing, schema + record batches.",
"type": "string",
"const": "arrow-ipc"
}
]
},
"PythonSource": {
"anyOf": [
{
"type": "string"
},
{
"type": "object",
"properties": {
"conda_env": {
"type": [
"string",
"null"
]
},
"source": {
"type": "string"
}
},
"required": [
"source"
]
}
]
},
"QueuePolicy": {
"description": "Queue overflow policy for an input.",
"oneOf": [
{
"description": "Drop the oldest queued message when the queue is full (default).",
"type": "string",
"const": "drop_oldest"
},
{
"description": "Buffer up to 10x `queue_size` without dropping. Drops with ERROR log at hard cap.",
"type": "string",
"const": "backpressure"
}
]
},
"RestartPolicy": {
"description": "Specifies when a node should be restarted.",
"oneOf": [
{
"description": "Never restart the node (default)",
"type": "string",
"const": "never"
},
{
"description": "Restart the node if it exits with a non-zero exit code.",
"type": "string",
"const": "on-failure"
},
{
"description": "Always restart the node when it exits, regardless of exit code.\n\nThe node will not be restarted on the following conditions:\n\n- The node was stopped by the user (e.g., via `dora stop`).\n- All inputs to the node have been closed and the node finished with a non-zero exit code.",
"type": "string",
"const": "always"
}
]
},
"RmwZenohCompatibility": {
"description": "Wire-compatibility profile for the `rmw_zenoh_cpp` protocol.",
"oneOf": [
{
"description": "ROS2 Humble, whose endpoint identity uses `TypeHashNotSupported`.",
"type": "string",
"const": "humble"
},
{
"description": "ROS2 distributions whose endpoint identity uses REP-2016 type hashes.",
"type": "string",
"const": "rep2016"
}
]
},
"Ros2BridgeConfig": {
"description": "ROS2 bridge configuration for declarative ROS2 bridging.\n\nThis allows nodes to interact with ROS2 topics, services, and actions\nwithout writing any custom code. The framework spawns a bridge binary that\nhandles the ROS2 DDS communication and Arrow data conversion.\n\nExactly one of `topic`, `topics`, `service`, or `action` must be set.",
"type": "object",
"properties": {
"action": {
"description": "ROS2 action name (e.g. \"/navigate\").\nMutually exclusive with `topic`, `topics`, `service`.",
"type": [
"string",
"null"
]
},
"action_type": {
"description": "ROS2 action type (e.g. \"nav2_msgs/NavigateToPose\").\nRequired when `action` is set.",
"type": [
"string",
"null"
]
},
"direction": {
"description": "Direction: subscribe (ROS2 -> Dora) or publish (Dora -> ROS2).\nDefaults to subscribe. Only used with `topic`/`topics`.",
"$ref": "#/$defs/Ros2Direction",
"default": "subscribe"
},
"message_type": {
"description": "ROS2 message type (e.g. \"sensor_msgs/Image\").\nRequired when `topic` is set.",
"type": [
"string",
"null"
]
},
"namespace": {
"description": "ROS2 namespace (default: \"/\").",
"type": "string",
"default": "/"
},
"node_name": {
"description": "ROS2 node name. Defaults to the dora node id.",
"type": [
"string",
"null"
]
},
"qos": {
"description": "QoS policies applied to all topics (can be overridden per-topic).",
"$ref": "#/$defs/Ros2QosConfig",
"default": {
"keep_all": false,
"reliable": false
}
},
"role": {
"description": "Role: client or server. Required for `service` and `action`.",
"anyOf": [
{
"$ref": "#/$defs/Ros2Role"
},
{
"type": "null"
}
]
},
"service": {
"description": "ROS2 service name (e.g. \"/add_two_ints\").\nMutually exclusive with `topic`, `topics`, `action`.",
"type": [
"string",
"null"
]
},
"service_type": {
"description": "ROS2 service type (e.g. \"example_interfaces/AddTwoInts\").\nRequired when `service` is set.",
"type": [
"string",
"null"
]
},
"topic": {
"description": "ROS2 topic name (e.g. \"/camera/image_raw\").\nMutually exclusive with `topics`, `service`, `action`.",
"type": [
"string",
"null"
]
},
"topics": {
"description": "Multiple topics on a single ROS2 node context.\nMutually exclusive with `topic`, `service`, `action`.",
"type": [
"array",
"null"
],
"items": {
"$ref": "#/$defs/Ros2TopicConfig"
}
},
"transport": {
"description": "Native transport used to communicate with the ROS2 graph.\n\nDefaults to the existing DDS implementation.",
"$ref": "#/$defs/Ros2TransportConfig",
"default": {
"kind": "dds"
}
}
},
"additionalProperties": true
},
"Ros2Direction": {
"description": "Direction of ROS2 bridge communication.",
"oneOf": [
{
"description": "Subscribe: receive from ROS2, forward to dora outputs.",
"type": "string",
"const": "subscribe"
},
{
"description": "Publish: receive from dora inputs, publish to ROS2.",
"type": "string",
"const": "publish"
}
]
},
"Ros2QosConfig": {
"description": "ROS2 Quality of Service configuration.",
"type": "object",
"properties": {
"durability": {
"description": "Durability: \"volatile\" (default), \"transient_local\".",
"type": [
"string",
"null"
]
},
"keep_all": {
"description": "Use KeepAll history policy instead of KeepLast.",
"type": "boolean",
"default": false
},
"keep_last": {
"description": "History depth for KeepLast policy (default: 1).",
"type": [
"integer",
"null"
],
"format": "int32"
},
"lease_duration": {
"description": "Lease duration in seconds (default: infinity).",
"type": [
"number",
"null"
],
"format": "double"
},
"liveliness": {
"description": "Liveliness: \"automatic\" (default), \"manual_by_participant\", \"manual_by_topic\".",
"type": [
"string",
"null"
]
},
"max_blocking_time": {
"description": "Max blocking time in seconds for reliable transport.",
"type": [
"number",
"null"
],
"format": "double"
},
"reliable": {
"description": "Use reliable transport (default: false = best effort).",
"type": "boolean",
"default": false
}
},
"additionalProperties": true
},
"Ros2Role": {
"description": "Role of a ROS2 service or action bridge node.",
"oneOf": [
{
"description": "Client: sends requests/goals, receives responses/results.",
"type": "string",
"const": "client"
},
{
"description": "Server: receives requests, sends responses.",
"type": "string",
"const": "server"
}
]
},
"Ros2TopicConfig": {
"description": "Configuration for a single ROS2 topic in multi-topic mode.",
"type": "object",
"properties": {
"direction": {
"description": "Direction: subscribe or publish.",
"$ref": "#/$defs/Ros2Direction",
"default": "subscribe"
},
"input": {
"description": "Maps to an dora input id (for publish direction).",
"type": [
"string",
"null"
]
},
"message_type": {
"description": "ROS2 message type (e.g. \"geometry_msgs/Twist\").",
"type": "string"
},