mecha10-cli 0.1.47

Mecha10 CLI tool
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
//! Package component definitions
//!
//! Catalog of available package (processing node) components.

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

/// Add all package components to the catalog
pub fn add_packages(catalog: &mut ComponentCatalog) {
    // Speaker node - references monorepo binary directly
    catalog.insert(Component {
        id: "speaker".to_string(),
        name: "speaker".to_string(),
        description: "Example node that publishes greeting messages to /example/greetings topic".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![
            // No wrapper files - use monorepo binary directly via cargo run -p mecha10-nodes-speaker
        ],
        mecha10_config: Mecha10Config {
            driver: None,
            custom_node: Some(CustomNodeConfig {
                name: "speaker".to_string(),
                path: "mecha10-nodes-speaker".to_string(), // Package name for monorepo
                config: None,
                description: "Example speaker node from monorepo (cargo run -p mecha10-nodes-speaker)".to_string(),
                run_target: "robot".to_string(),
                enabled: true,
            }),
            behavior: None,
        },
    });

    // Listener node - references monorepo binary directly
    catalog.insert(Component {
        id: "listener".to_string(),
        name: "listener".to_string(),
        description: "Example node that subscribes to /example/greetings topic and prints messages".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![
            // No wrapper files - use monorepo binary directly via cargo run -p mecha10-nodes-listener
        ],
        mecha10_config: Mecha10Config {
            driver: None,
            custom_node: Some(CustomNodeConfig {
                name: "listener".to_string(),
                path: "mecha10-nodes-listener".to_string(), // Package name for monorepo
                config: None,
                description: "Example listener node from monorepo (cargo run -p mecha10-nodes-listener)".to_string(),
                run_target: "robot".to_string(),
                enabled: true,
            }),
            behavior: None,
        },
    });

    // Motor node - manages motor driver with configuration for fake/real
    catalog.insert(Component {
        id: "motor".to_string(),
        name: "motor".to_string(),
        description: "Motor node with differential drive kinematics and odometry (configurable fake/real driver)"
            .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(), // Package name for monorepo
                config: None,
                description: "Motor node from monorepo (cargo run -p mecha10-nodes-motor)".to_string(),
                run_target: "robot".to_string(),
                enabled: true,
            }),
            behavior: None,
        },
    });

    // IMU node - manages IMU driver with configuration for fake/real
    catalog.insert(Component {
        id: "imu".to_string(),
        name: "imu".to_string(),
        description: "IMU node providing orientation and acceleration data (configurable fake/real driver)".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(), // Package name for monorepo
                config: None,
                description: "IMU node from monorepo (cargo run -p mecha10-nodes-imu)".to_string(),
                run_target: "robot".to_string(),
                enabled: true,
            }),
            behavior: None,
        },
    });

    // Teleop node - keyboard-based control for development
    catalog.insert(Component {
        id: "teleop".to_string(),
        name: "teleop".to_string(),
        description: "Teleoperation node for keyboard-based robot control (WASD controls)".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(), // Package name for monorepo
                config: None,
                description: "Teleop node from monorepo (cargo run -p mecha10-nodes-teleop)".to_string(),
                run_target: "dev".to_string(), // Only for development
                enabled: true,
            }),
            behavior: None,
        },
    });

    // Simulation bridge node - connects framework to Godot RL Agents
    catalog.insert(Component {
        id: "simulation-bridge".to_string(),
        name: "simulation-bridge".to_string(),
        description: "Simulation bridge that translates between Redis pub/sub and Godot RL Agents protocol".to_string(),
        component_type: ComponentType::Package,
        version: "0.1.0".to_string(),
        category: "nodes".to_string(),
        tags: vec![
            "simulation".to_string(),
            "godot".to_string(),
            "rl".to_string(),
            "bridge".to_string(),
        ],
        cargo_dependencies: vec![CargoDependency {
            name: "mecha10-nodes-simulation-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: "simulation-bridge".to_string(),
                path: "mecha10-nodes-simulation-bridge".to_string(), // Package name for monorepo
                config: None,
                description: "Simulation bridge node from monorepo (cargo run -p mecha10-nodes-simulation-bridge)"
                    .to_string(),
                run_target: "dev".to_string(), // Only for development/simulation
                enabled: true,
            }),
            behavior: None,
        },
    });

    // Image classifier node - AI-powered image classification using ONNX models
    catalog.insert(Component {
        id: "image-classifier".to_string(),
        name: "image-classifier".to_string(),
        description: "Image classification node using ONNX models (MobileNet, ResNet) from model catalog".to_string(),
        component_type: ComponentType::Package,
        version: "0.1.0".to_string(),
        category: "nodes".to_string(),
        tags: vec![
            "ai".to_string(),
            "vision".to_string(),
            "classification".to_string(),
            "onnx".to_string(),
            "ml".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(), // Package name for monorepo
                config: None,
                description: "AI image classification node from monorepo (cargo run -p mecha10-nodes-image-classifier)"
                    .to_string(),
                run_target: "robot".to_string(), // Can run on robot or remotely
                enabled: true,
            }),
            behavior: None,
        },
    });

    // Object detector node - Real-time object detection using YOLO
    catalog.insert(Component {
        id: "object-detector".to_string(),
        name: "object-detector".to_string(),
        description: "Real-time object detection node using YOLO and ONNX Runtime with bounding box visualization"
            .to_string(),
        component_type: ComponentType::Package,
        version: "0.1.0".to_string(),
        category: "nodes".to_string(),
        tags: vec![
            "ai".to_string(),
            "vision".to_string(),
            "detection".to_string(),
            "yolo".to_string(),
            "onnx".to_string(),
            "ml".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(), // Package name for monorepo
                config: None,
                description: "Object detection node from monorepo (cargo run -p mecha10-nodes-object-detector)"
                    .to_string(),
                run_target: "robot".to_string(), // Can run on robot or remotely
                enabled: true,
            }),
            behavior: None,
        },
    });

    // LLM Command node - Natural language command parsing via LLM APIs
    catalog.insert(Component {
        id: "llm-command".to_string(),
        name: "llm-command".to_string(),
        description: "Natural language command parsing via LLM APIs (OpenAI, Claude, Ollama) with dashboard control"
            .to_string(),
        component_type: ComponentType::Package,
        version: "0.1.0".to_string(),
        category: "nodes".to_string(),
        tags: vec![
            "ai".to_string(),
            "llm".to_string(),
            "reasoning".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,
            },
            CargoDependency {
                name: "mecha10-ai-llm".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(), // Package name for monorepo
                config: None,
                description: "LLM command node from monorepo (cargo run -p mecha10-nodes-llm-command)".to_string(),
                run_target: "robot".to_string(), // Can run on robot or remotely
                enabled: true,
            }),
            behavior: None,
        },
    });

    // Diagnostics node - System diagnostics (Docker + system metrics)
    catalog.insert(Component {
        id: "diagnostics-node".to_string(),
        name: "diagnostics-node".to_string(),
        description: "System diagnostics node that publishes Docker container 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(),
            "docker".to_string(),
            "system".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-node".to_string(),
                path: "mecha10-nodes-diagnostics".to_string(), // Package name for monorepo
                config: None,
                description: "System diagnostics node from monorepo (cargo run -p mecha10-nodes-diagnostics)"
                    .to_string(),
                run_target: "remote".to_string(), // Runs as service/remote node
                enabled: true,
            }),
            behavior: None,
        },
    });

    // WebSocket Bridge node - 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 messages to WebSocket clients for browser consumption"
                .to_string(),
        component_type: ComponentType::Package,
        version: "0.1.0".to_string(),
        category: "nodes".to_string(),
        tags: vec![
            "websocket".to_string(),
            "bridge".to_string(),
            "pubsub".to_string(),
            "dashboard".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(), // Package name for monorepo
                config: None,
                description: "WebSocket bridge node from monorepo (cargo run -p mecha10-nodes-websocket-bridge)"
                    .to_string(),
                run_target: "robot".to_string(), // Runs on robot to forward Redis messages
                enabled: true,
            }),
            behavior: None,
        },
    });

    // Behavior Executor node - Executes behavior trees for autonomous control
    catalog.insert(Component {
        id: "behavior-executor".to_string(),
        name: "behavior-executor".to_string(),
        description: "Behavior tree executor node for autonomous robot behaviors (idle_wander, patrol, navigation)"
            .to_string(),
        component_type: ComponentType::Package,
        version: "0.1.0".to_string(),
        category: "nodes".to_string(),
        tags: vec![
            "behavior".to_string(),
            "autonomous".to_string(),
            "ai".to_string(),
            "navigation".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,
            },
            CargoDependency {
                name: "mecha10-behavior-runtime".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, // Config loaded from configs/nodes/@mecha10/behavior-executor/config.json
                description: "Behavior executor node from monorepo (cargo run -p mecha10-nodes-behavior-executor)"
                    .to_string(),
                run_target: "robot".to_string(),
                enabled: true,
            }),
            behavior: None,
        },
    });
}