Technical Documentation: Integrations (Custom Tasks)
Architecture








Integrations are stored as CustomTaskDefinition schemas. They define the "Interface" for a piece of logic that the backend execution engine (Go) will perform on behalf of the robot.
Technical Details
- File Path: lib/screens/integrations_screen.dart
- Model: CustomTaskDefinition (supports IO mapping, rule-sets, and category metadata).
- Backend Sync: Unified REST services for CRUD operations on tasks.
Schema Definition
Input/Output Fields
Tasks define dynamic payloads. A TaskIOField includes:
- key: The internal name (e.g., "target_id").
- type: String, Boolean, or Integer.
- initialValue: Default value.
Rule Engine
Rules define the outcome based on execution results:
- Success Rules: Conditions that mark the task as successful.
- Failure Rules: Conditions that trigger error recovery paths in the State Machine.
Implementation Details
- Task Palette Integration: All saved integrations are automatically injected into the TaskPalette of the State Machine Editor.
- Execution Lifecycle:
- The State Machine triggers a TaskNode.
- The Go Backend fetches the CustomTaskDefinition.
- The Backend performs the protocol-specific action (e.g., HTTP POST).
- Rules are evaluated against the response.
- The result is returned to the robot's logic engine.