mecha10-cli-core 0.6.3

Mecha10 CLI core foundation — shared types, services, and utilities
Documentation
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
//! Package component definitions
//!
//! AUTO-GENERATED by scripts/dev/sync_node_catalog.py
//! DO NOT EDIT MANUALLY — run `./scripts/dev/sync_node_catalog.py` to regenerate.
//!
//! Source: packages/nodes/*/Cargo.toml [package.metadata.mecha10]

use super::{CargoDependency, Component, ComponentCatalog, ComponentType, CustomNodeConfig, Mecha10Config};

/// Add all package components to the catalog
pub fn add_packages(catalog: &mut ComponentCatalog) {
    // Behavior tree executor node for autonomous robot behaviors
    catalog.insert(Component {
        id: "behavior-executor".to_string(),
        name: "behavior-executor".to_string(),
        description: "Behavior tree executor node for autonomous robot behaviors".to_string(),
        component_type: ComponentType::Package,
        version: "0.1.0".to_string(),
        category: "nodes".to_string(),
        tags: vec!["behavior".to_string(), "ai".to_string(), "autonomous".to_string()],
        cargo_dependencies: vec![CargoDependency {
            name: "mecha10-nodes-behavior-executor".to_string(),
            version: Some("0.1".to_string()),
            path: None,
            features: vec![],
            optional: false,
        }],
        files: vec![],
        mecha10_config: Mecha10Config {
            driver: None,
            custom_node: Some(CustomNodeConfig {
                name: "behavior-executor".to_string(),
                path: "mecha10-nodes-behavior-executor".to_string(),
                config: None,
                description: "Behavior tree executor node for autonomous robot behaviors".to_string(),
                run_target: "robot".to_string(),
                enabled: true,
            }),
            behavior: None,
        },
    });

    // Camera node for Mecha10 - unified camera streaming with dual-path WebRTC and Redis publishing
    catalog.insert(Component {
        id: "camera".to_string(),
        name: "camera".to_string(),
        description: "Camera node for Mecha10 - unified camera streaming with dual-path WebRTC and Redis publishing"
            .to_string(),
        component_type: ComponentType::Package,
        version: "0.1.0".to_string(),
        category: "nodes".to_string(),
        tags: vec!["camera".to_string(), "video".to_string(), "streaming".to_string()],
        cargo_dependencies: vec![CargoDependency {
            name: "mecha10-nodes-camera".to_string(),
            version: Some("0.1".to_string()),
            path: None,
            features: vec![],
            optional: false,
        }],
        files: vec![],
        mecha10_config: Mecha10Config {
            driver: None,
            custom_node: Some(CustomNodeConfig {
                name: "camera".to_string(),
                path: "mecha10-nodes-camera".to_string(),
                config: None,
                description:
                    "Camera node for Mecha10 - unified camera streaming with dual-path WebRTC and Redis publishing"
                        .to_string(),
                run_target: "robot".to_string(),
                enabled: true,
            }),
            behavior: None,
        },
    });

    // Diagnostics node that publishes Docker and system resource metrics
    catalog.insert(Component {
        id: "diagnostics".to_string(),
        name: "diagnostics".to_string(),
        description: "Diagnostics node that publishes Docker and system resource metrics".to_string(),
        component_type: ComponentType::Package,
        version: "0.1.0".to_string(),
        category: "nodes".to_string(),
        tags: vec![
            "diagnostics".to_string(),
            "monitoring".to_string(),
            "metrics".to_string(),
        ],
        cargo_dependencies: vec![CargoDependency {
            name: "mecha10-nodes-diagnostics".to_string(),
            version: Some("0.1".to_string()),
            path: None,
            features: vec![],
            optional: false,
        }],
        files: vec![],
        mecha10_config: Mecha10Config {
            driver: None,
            custom_node: Some(CustomNodeConfig {
                name: "diagnostics".to_string(),
                path: "mecha10-nodes-diagnostics".to_string(),
                config: None,
                description: "Diagnostics node that publishes Docker and system resource metrics".to_string(),
                run_target: "robot".to_string(),
                enabled: true,
            }),
            behavior: None,
        },
    });

    // Image classification node using ONNX models from catalog
    catalog.insert(Component {
        id: "image-classifier".to_string(),
        name: "image-classifier".to_string(),
        description: "Image classification node using ONNX models from catalog".to_string(),
        component_type: ComponentType::Package,
        version: "0.1.0".to_string(),
        category: "nodes".to_string(),
        tags: vec![
            "ai".to_string(),
            "ml".to_string(),
            "vision".to_string(),
            "classification".to_string(),
        ],
        cargo_dependencies: vec![CargoDependency {
            name: "mecha10-nodes-image-classifier".to_string(),
            version: Some("0.1".to_string()),
            path: None,
            features: vec![],
            optional: false,
        }],
        files: vec![],
        mecha10_config: Mecha10Config {
            driver: None,
            custom_node: Some(CustomNodeConfig {
                name: "image-classifier".to_string(),
                path: "mecha10-nodes-image-classifier".to_string(),
                config: None,
                description: "Image classification node using ONNX models from catalog".to_string(),
                run_target: "remote".to_string(),
                enabled: true,
            }),
            behavior: None,
        },
    });

    // IMU node for Mecha10 - manages IMU driver and provides orientation/acceleration data
    catalog.insert(Component {
        id: "imu".to_string(),
        name: "imu".to_string(),
        description: "IMU node for Mecha10 - manages IMU driver and provides orientation/acceleration data".to_string(),
        component_type: ComponentType::Package,
        version: "0.1.0".to_string(),
        category: "nodes".to_string(),
        tags: vec!["imu".to_string(), "sensor".to_string(), "orientation".to_string()],
        cargo_dependencies: vec![CargoDependency {
            name: "mecha10-nodes-imu".to_string(),
            version: Some("0.1".to_string()),
            path: None,
            features: vec![],
            optional: false,
        }],
        files: vec![],
        mecha10_config: Mecha10Config {
            driver: None,
            custom_node: Some(CustomNodeConfig {
                name: "imu".to_string(),
                path: "mecha10-nodes-imu".to_string(),
                config: None,
                description: "IMU node for Mecha10 - manages IMU driver and provides orientation/acceleration data"
                    .to_string(),
                run_target: "robot".to_string(),
                enabled: true,
            }),
            behavior: None,
        },
    });

    // Example listener node for the Mecha10 robotics framework
    catalog.insert(Component {
        id: "listener".to_string(),
        name: "listener".to_string(),
        description: "Example listener node for the Mecha10 robotics framework".to_string(),
        component_type: ComponentType::Package,
        version: "0.1.0".to_string(),
        category: "nodes".to_string(),
        tags: vec!["pubsub".to_string(), "example".to_string()],
        cargo_dependencies: vec![CargoDependency {
            name: "mecha10-nodes-listener".to_string(),
            version: Some("0.1".to_string()),
            path: None,
            features: vec![],
            optional: false,
        }],
        files: vec![],
        mecha10_config: Mecha10Config {
            driver: None,
            custom_node: Some(CustomNodeConfig {
                name: "listener".to_string(),
                path: "mecha10-nodes-listener".to_string(),
                config: None,
                description: "Example listener node for the Mecha10 robotics framework".to_string(),
                run_target: "robot".to_string(),
                enabled: true,
            }),
            behavior: None,
        },
    });

    // Natural language command parsing via LLM APIs (OpenAI, Claude, Ollama)
    catalog.insert(Component {
        id: "llm-command".to_string(),
        name: "llm-command".to_string(),
        description: "Natural language command parsing via LLM APIs (OpenAI, Claude, Ollama)".to_string(),
        component_type: ComponentType::Package,
        version: "0.1.0".to_string(),
        category: "nodes".to_string(),
        tags: vec![
            "ai".to_string(),
            "llm".to_string(),
            "nlp".to_string(),
            "command".to_string(),
        ],
        cargo_dependencies: vec![CargoDependency {
            name: "mecha10-nodes-llm-command".to_string(),
            version: Some("0.1".to_string()),
            path: None,
            features: vec![],
            optional: false,
        }],
        files: vec![],
        mecha10_config: Mecha10Config {
            driver: None,
            custom_node: Some(CustomNodeConfig {
                name: "llm-command".to_string(),
                path: "mecha10-nodes-llm-command".to_string(),
                config: None,
                description: "Natural language command parsing via LLM APIs (OpenAI, Claude, Ollama)".to_string(),
                run_target: "remote".to_string(),
                enabled: true,
            }),
            behavior: None,
        },
    });

    // Motor node for Mecha10 - manages motor driver and provides velocity control interface
    catalog.insert(Component {
        id: "motor".to_string(),
        name: "motor".to_string(),
        description: "Motor node for Mecha10 - manages motor driver and provides velocity control interface"
            .to_string(),
        component_type: ComponentType::Package,
        version: "0.1.0".to_string(),
        category: "nodes".to_string(),
        tags: vec!["motor".to_string(), "actuator".to_string(), "odometry".to_string()],
        cargo_dependencies: vec![CargoDependency {
            name: "mecha10-nodes-motor".to_string(),
            version: Some("0.1".to_string()),
            path: None,
            features: vec![],
            optional: false,
        }],
        files: vec![],
        mecha10_config: Mecha10Config {
            driver: None,
            custom_node: Some(CustomNodeConfig {
                name: "motor".to_string(),
                path: "mecha10-nodes-motor".to_string(),
                config: None,
                description: "Motor node for Mecha10 - manages motor driver and provides velocity control interface"
                    .to_string(),
                run_target: "robot".to_string(),
                enabled: true,
            }),
            behavior: None,
        },
    });

    // Real-time object detection node using YOLO and ONNX
    catalog.insert(Component {
        id: "object-detector".to_string(),
        name: "object-detector".to_string(),
        description: "Real-time object detection node using YOLO and ONNX".to_string(),
        component_type: ComponentType::Package,
        version: "0.1.0".to_string(),
        category: "nodes".to_string(),
        tags: vec![
            "ai".to_string(),
            "ml".to_string(),
            "vision".to_string(),
            "detection".to_string(),
            "yolo".to_string(),
        ],
        cargo_dependencies: vec![CargoDependency {
            name: "mecha10-nodes-object-detector".to_string(),
            version: Some("0.1".to_string()),
            path: None,
            features: vec![],
            optional: false,
        }],
        files: vec![],
        mecha10_config: Mecha10Config {
            driver: None,
            custom_node: Some(CustomNodeConfig {
                name: "object-detector".to_string(),
                path: "mecha10-nodes-object-detector".to_string(),
                config: None,
                description: "Real-time object detection node using YOLO and ONNX".to_string(),
                run_target: "remote".to_string(),
                enabled: true,
            }),
            behavior: None,
        },
    });

    // MuJoCo simulation node - supervises the Python mecha10_rl MuJoCo backend as a subprocess, bridging /motor/cmd_vel, /camera/rgb, and /imu/data over Redis
    catalog.insert(Component {
        id: "simulator".to_string(),
        name: "simulator".to_string(),
        description: "MuJoCo simulation node - supervises the Python mecha10_rl MuJoCo backend as a subprocess, bridging /motor/cmd_vel, /camera/rgb, and /imu/data over Redis".to_string(),
        component_type: ComponentType::Package,
        version: "0.1.0".to_string(),
        category: "nodes".to_string(),
        tags: vec!["simulation".to_string(), "mujoco".to_string(), "rl".to_string()],
        cargo_dependencies: vec![CargoDependency {
            name: "mecha10-nodes-simulator".to_string(),
            version: Some("0.1".to_string()),
            path: None,
            features: vec![],
            optional: false,
        }],
        files: vec![],
        mecha10_config: Mecha10Config {
            driver: None,
            custom_node: Some(CustomNodeConfig {
                name: "simulator".to_string(),
                path: "mecha10-nodes-simulator".to_string(),
                config: None,
                description: "MuJoCo simulation node - supervises the Python mecha10_rl MuJoCo backend as a subprocess, bridging /motor/cmd_vel, /camera/rgb, and /imu/data over Redis".to_string(),
                run_target: "dev".to_string(),
                enabled: true,
            }),
            behavior: None,
        },
    });

    // Example speaker node for the Mecha10 robotics framework
    catalog.insert(Component {
        id: "speaker".to_string(),
        name: "speaker".to_string(),
        description: "Example speaker node for the Mecha10 robotics framework".to_string(),
        component_type: ComponentType::Package,
        version: "0.1.0".to_string(),
        category: "nodes".to_string(),
        tags: vec!["pubsub".to_string(), "example".to_string()],
        cargo_dependencies: vec![CargoDependency {
            name: "mecha10-nodes-speaker".to_string(),
            version: Some("0.1".to_string()),
            path: None,
            features: vec![],
            optional: false,
        }],
        files: vec![],
        mecha10_config: Mecha10Config {
            driver: None,
            custom_node: Some(CustomNodeConfig {
                name: "speaker".to_string(),
                path: "mecha10-nodes-speaker".to_string(),
                config: None,
                description: "Example speaker node for the Mecha10 robotics framework".to_string(),
                run_target: "robot".to_string(),
                enabled: true,
            }),
            behavior: None,
        },
    });

    // Teleoperation node for keyboard-based robot control
    catalog.insert(Component {
        id: "teleop".to_string(),
        name: "teleop".to_string(),
        description: "Teleoperation node for keyboard-based robot control".to_string(),
        component_type: ComponentType::Package,
        version: "0.1.0".to_string(),
        category: "nodes".to_string(),
        tags: vec!["teleop".to_string(), "control".to_string(), "development".to_string()],
        cargo_dependencies: vec![CargoDependency {
            name: "mecha10-nodes-teleop".to_string(),
            version: Some("0.1".to_string()),
            path: None,
            features: vec![],
            optional: false,
        }],
        files: vec![],
        mecha10_config: Mecha10Config {
            driver: None,
            custom_node: Some(CustomNodeConfig {
                name: "teleop".to_string(),
                path: "mecha10-nodes-teleop".to_string(),
                config: None,
                description: "Teleoperation node for keyboard-based robot control".to_string(),
                run_target: "dev".to_string(),
                enabled: true,
            }),
            behavior: None,
        },
    });

    // Video streamer node for WebRTC streaming to dashboard
    catalog.insert(Component {
        id: "video-streamer".to_string(),
        name: "video-streamer".to_string(),
        description: "Video streamer node for WebRTC streaming to dashboard".to_string(),
        component_type: ComponentType::Package,
        version: "0.1.0".to_string(),
        category: "nodes".to_string(),
        tags: vec!["video".to_string(), "webrtc".to_string(), "streaming".to_string()],
        cargo_dependencies: vec![CargoDependency {
            name: "mecha10-nodes-video-streamer".to_string(),
            version: Some("0.1".to_string()),
            path: None,
            features: vec![],
            optional: false,
        }],
        files: vec![],
        mecha10_config: Mecha10Config {
            driver: None,
            custom_node: Some(CustomNodeConfig {
                name: "video-streamer".to_string(),
                path: "mecha10-nodes-video-streamer".to_string(),
                config: None,
                description: "Video streamer node for WebRTC streaming to dashboard".to_string(),
                run_target: "remote".to_string(),
                enabled: true,
            }),
            behavior: None,
        },
    });

    // WebSocket bridge node that forwards Redis pub/sub to WebSocket clients
    catalog.insert(Component {
        id: "websocket-bridge".to_string(),
        name: "websocket-bridge".to_string(),
        description: "WebSocket bridge node that forwards Redis pub/sub to WebSocket clients".to_string(),
        component_type: ComponentType::Package,
        version: "0.1.0".to_string(),
        category: "nodes".to_string(),
        tags: vec!["websocket".to_string(), "bridge".to_string(), "streaming".to_string()],
        cargo_dependencies: vec![CargoDependency {
            name: "mecha10-nodes-websocket-bridge".to_string(),
            version: Some("0.1".to_string()),
            path: None,
            features: vec![],
            optional: false,
        }],
        files: vec![],
        mecha10_config: Mecha10Config {
            driver: None,
            custom_node: Some(CustomNodeConfig {
                name: "websocket-bridge".to_string(),
                path: "mecha10-nodes-websocket-bridge".to_string(),
                config: None,
                description: "WebSocket bridge node that forwards Redis pub/sub to WebSocket clients".to_string(),
                run_target: "remote".to_string(),
                enabled: true,
            }),
            behavior: None,
        },
    });
}