{ "$schema": "https://json-schema.org/draft/2020-12/schema", "$id": "urn:robot-bt:contracts:blackboard-group-snapshot:1", "title": "Robot BT Blackboard atomic group snapshot v1 — proposed external-store protocol", "description": "This is a proposed shared storage envelope, not a deployed service or the ROS IDL. Semantic CAS, TTL, writer authentication, UUID correlation and epoch validation are required outside JSON Schema. No motor/velocity/joint/action-chunk fields are accepted. Timeout fields are storage projections in milliseconds, not additions to ExecuteManipulation.action.", "type": "object", "properties": { "schema_version": { "const": 1 }, "robot_id": { "type": "string", "minLength": 1, "maxLength": 512 }, "group": { "type": "string", "enum": [ "task", "current_step", "navigation_config", "target_binding", "placement_binding", "navigation_execution", "manipulation_execution", "verification", "robot_state", "safety_state", "task_result" ] }, "revision": { "type": "integer", "minimum": 1 }, "previous_revision": { "type": "integer", "minimum": 0 }, "writer": { "type": "string", "enum": [ "TaskCoordinator", "BTExecutor", "TaskAdapter", "GroundTargetAdapter", "FreeSpaceAdapter", "NavigationActionAdapter", "ManipulationActionAdapter", "VerificationAdapter", "RobotStateBridge", "SafetyBridge", "TaskFinalizer" ] }, "trace": { "$ref": "#/$defs/trace" }, "source_goal_id": { "type": "string" }, "geometry_epoch": { "type": "string", "pattern": "^(0|[1-9][0-9]{0,19})$", "description": "Canonical unsigned decimal string; semantic validator enforces uint64 range." }, "clock_id": { "type": "string", "minLength": 1, "maxLength": 512 }, "observed_at_ns": { "type": "string", "pattern": "^(0|[1-9][0-9]{0,18})$", "description": "Nanoseconds in the declared ROS clock domain, encoded as decimal string to preserve precision; zero is invalid for observations." }, "valid_until_ns": { "type": "string", "pattern": "^(0|[1-9][0-9]{0,18})$", "description": "Nanoseconds in the declared ROS clock domain, encoded as decimal string to preserve precision; zero is invalid for observations." }, "payload": {} }, "required": [ "schema_version", "robot_id", "group", "revision", "previous_revision", "writer", "trace", "source_goal_id", "geometry_epoch", "clock_id", "observed_at_ns", "valid_until_ns", "payload" ], "additionalProperties": false, "allOf": [ { "if": { "properties": { "group": { "const": "task" } }, "required": [ "group" ] }, "then": { "properties": { "writer": { "const": "TaskCoordinator" }, "payload": { "$ref": "#/$defs/task_payload" } } } }, { "if": { "properties": { "group": { "const": "current_step" } }, "required": [ "group" ] }, "then": { "properties": { "writer": { "const": "BTExecutor" }, "payload": { "$ref": "#/$defs/current_step_payload" } } } }, { "if": { "properties": { "group": { "const": "navigation_config" } }, "required": [ "group" ] }, "then": { "properties": { "writer": { "const": "TaskAdapter" }, "payload": { "$ref": "#/$defs/navigation_config_payload" } } } }, { "if": { "properties": { "group": { "const": "target_binding" } }, "required": [ "group" ] }, "then": { "properties": { "writer": { "const": "GroundTargetAdapter" }, "payload": { "$ref": "#/$defs/target_binding_payload" } } } }, { "if": { "properties": { "group": { "const": "placement_binding" } }, "required": [ "group" ] }, "then": { "properties": { "writer": { "const": "FreeSpaceAdapter" }, "payload": { "$ref": "#/$defs/placement_binding_payload" } } } }, { "if": { "properties": { "group": { "const": "navigation_execution" } }, "required": [ "group" ] }, "then": { "properties": { "writer": { "const": "NavigationActionAdapter" }, "payload": { "$ref": "#/$defs/navigation_execution_payload" } } } }, { "if": { "properties": { "group": { "const": "manipulation_execution" } }, "required": [ "group" ] }, "then": { "properties": { "writer": { "const": "ManipulationActionAdapter" }, "payload": { "$ref": "#/$defs/manipulation_execution_payload" } } } }, { "if": { "properties": { "group": { "const": "verification" } }, "required": [ "group" ] }, "then": { "properties": { "writer": { "const": "VerificationAdapter" }, "payload": { "$ref": "#/$defs/verification_payload" } } } }, { "if": { "properties": { "group": { "const": "robot_state" } }, "required": [ "group" ] }, "then": { "properties": { "writer": { "const": "RobotStateBridge" }, "payload": { "$ref": "#/$defs/robot_state_payload" } } } }, { "if": { "properties": { "group": { "const": "safety_state" } }, "required": [ "group" ] }, "then": { "properties": { "writer": { "const": "SafetyBridge" }, "payload": { "$ref": "#/$defs/safety_state_payload" } } } }, { "if": { "properties": { "group": { "const": "task_result" } }, "required": [ "group" ] }, "then": { "properties": { "writer": { "const": "TaskFinalizer" }, "payload": { "$ref": "#/$defs/task_result_payload" } } } } ], "$defs": { "trace": { "type": "object", "properties": { "task_id": { "type": "string", "minLength": 1, "maxLength": 512 }, "subtask_id": { "type": "string" }, "attempt": { "type": "integer", "minimum": 0, "maximum": 4294967295 }, "task_revision": { "type": "integer", "minimum": 1, "maximum": 4294967295 }, "plan_version": { "type": "integer", "minimum": 0, "maximum": 4294967295 }, "run_id": { "type": "string" }, "execution_generation": { "type": "string", "pattern": "^(0|[1-9][0-9]{0,19})$", "description": "Canonical unsigned decimal string; semantic validator enforces uint64 range." } }, "required": [ "task_id", "subtask_id", "attempt", "task_revision", "plan_version", "run_id", "execution_generation" ], "additionalProperties": false }, "object_target": { "type": "object", "properties": { "object_ref": { "type": "string", "minLength": 1, "maxLength": 512 }, "description": { "type": "string", "minLength": 1, "maxLength": 512 } }, "required": [ "object_ref", "description" ], "additionalProperties": false }, "region_target": { "type": "object", "properties": { "region_ref": { "type": "string", "minLength": 1, "maxLength": 512 }, "description": { "type": "string", "minLength": 1, "maxLength": 512 } }, "required": [ "region_ref", "description" ], "additionalProperties": false }, "empty_region_target": { "type": "object", "properties": { "region_ref": { "const": "" }, "description": { "const": "" } }, "required": [ "region_ref", "description" ], "additionalProperties": false }, "point": { "type": "object", "properties": { "frame_id": { "type": "string", "minLength": 1, "maxLength": 512 }, "stamp_ns": { "type": "string", "pattern": "^(0|[1-9][0-9]{0,18})$", "description": "Nanoseconds in the declared ROS clock domain, encoded as decimal string to preserve precision; zero is invalid for observations." }, "x": { "type": "number" }, "y": { "type": "number" }, "z": { "type": "number" } }, "required": [ "frame_id", "stamp_ns", "x", "y", "z" ], "additionalProperties": false }, "pose": { "type": "object", "properties": { "frame_id": { "type": "string", "minLength": 1, "maxLength": 512 }, "stamp_ns": { "type": "string", "pattern": "^(0|[1-9][0-9]{0,18})$", "description": "Nanoseconds in the declared ROS clock domain, encoded as decimal string to preserve precision; zero is invalid for observations." }, "position": { "type": "object", "properties": { "x": { "type": "number" }, "y": { "type": "number" }, "z": { "type": "number" } }, "required": [ "x", "y", "z" ], "additionalProperties": false }, "orientation": { "type": "object", "properties": { "x": { "type": "number" }, "y": { "type": "number" }, "z": { "type": "number" }, "w": { "type": "number" } }, "required": [ "x", "y", "z", "w" ], "additionalProperties": false } }, "required": [ "frame_id", "stamp_ns", "position", "orientation" ], "additionalProperties": false }, "holding": { "type": "string", "enum": [ "EMPTY", "HOLDING_TARGET", "HOLDING_OTHER", "UNKNOWN" ] }, "valid_bool": { "type": "object", "properties": { "valid": { "type": "boolean" }, "value": { "type": "boolean" } }, "required": [ "valid", "value" ], "additionalProperties": false }, "station": { "type": "object", "properties": { "station_id": { "type": "string", "minLength": 1, "maxLength": 512 }, "registry_version": { "type": "integer", "minimum": 1, "maximum": 4294967295 }, "region_ref": { "type": "string", "minLength": 1, "maxLength": 512 }, "shelf_id": { "type": "string" }, "side_id": { "type": "string" }, "column_id": { "type": "string" }, "station_type": { "type": "string", "enum": [ "OBSERVATION", "SOURCE", "DESTINATION" ] }, "pose": { "$ref": "#/$defs/pose" }, "position_tolerance_m": { "type": "number", "exclusiveMinimum": 0 }, "orientation_tolerance_rad": { "type": "number", "exclusiveMinimum": 0, "maximum": 3.141592653589793 } }, "required": [ "station_id", "registry_version", "region_ref", "shelf_id", "side_id", "column_id", "station_type", "pose", "position_tolerance_m", "orientation_tolerance_rad" ], "additionalProperties": false }, "execution_result": { "type": "object", "properties": { "status": { "type": "string", "enum": [ "COMPLETED", "FAILED", "CANCELED", "TIMED_OUT", "REJECTED" ] }, "error_code": { "type": "string" }, "message": { "type": "string" }, "stop_state": { "type": "string", "enum": [ "UNKNOWN", "CONFIRMED" ] }, "stopped_at_ns": { "type": "string", "pattern": "^(0|[1-9][0-9]{0,18})$", "description": "Nanoseconds in the declared ROS clock domain, encoded as decimal string to preserve precision; zero is invalid for observations." }, "stop_evidence_ref": { "type": "string" } }, "required": [ "status", "error_code", "message", "stop_state", "stopped_at_ns", "stop_evidence_ref" ], "additionalProperties": false }, "navigation_request": { "type": "object", "properties": { "trace": { "$ref": "#/$defs/trace" }, "target_pose": { "$ref": "#/$defs/pose" }, "position_tolerance_m": { "type": "number", "exclusiveMinimum": 0 }, "orientation_tolerance_rad": { "type": "number", "exclusiveMinimum": 0, "maximum": 3.141592653589793 }, "timeout_ms": { "type": "integer", "minimum": 1 } }, "required": [ "trace", "target_pose", "position_tolerance_m", "orientation_tolerance_rad", "timeout_ms" ], "additionalProperties": false }, "manipulation_request": { "type": "object", "properties": { "trace": { "$ref": "#/$defs/trace" }, "skill": { "type": "string", "enum": [ "pick", "place" ] }, "instruction": { "type": "string", "minLength": 1, "maxLength": 512 }, "target": { "$ref": "#/$defs/object_target" }, "destination": { "oneOf": [ { "$ref": "#/$defs/region_target" }, { "$ref": "#/$defs/empty_region_target" } ] }, "timeout_ms": { "type": "integer", "minimum": 1 } }, "required": [ "trace", "skill", "instruction", "target", "destination", "timeout_ms" ], "additionalProperties": false, "allOf": [ { "if": { "properties": { "skill": { "const": "pick" } } }, "then": { "properties": { "destination": { "$ref": "#/$defs/empty_region_target" } } }, "else": { "properties": { "destination": { "$ref": "#/$defs/region_target" } } } } ] }, "navigation_feedback": { "type": "object", "properties": { "stamp_ns": { "type": "string", "pattern": "^(0|[1-9][0-9]{0,18})$", "description": "Nanoseconds in the declared ROS clock domain, encoded as decimal string to preserve precision; zero is invalid for observations." }, "sequence": { "type": "integer", "minimum": 0, "maximum": 4294967295 }, "phase": { "type": "string", "enum": [ "CHECKING", "PLANNING", "NAVIGATING", "WAITING_OBSTACLE", "RECOVERING", "ARRIVING", "STOPPING" ] }, "pose_valid": { "type": "boolean" }, "current_pose": { "$ref": "#/$defs/pose" }, "errors_valid": { "type": "boolean" }, "position_error_m": { "type": "number" }, "orientation_error_rad": { "type": "number" }, "blocked_valid": { "type": "boolean" }, "blocked": { "type": "boolean" }, "elapsed_ms": { "type": "integer", "minimum": 0 }, "message": { "type": "string" } }, "required": [ "stamp_ns", "sequence", "phase", "pose_valid", "current_pose", "errors_valid", "position_error_m", "orientation_error_rad", "blocked_valid", "blocked", "elapsed_ms", "message" ], "additionalProperties": false }, "manipulation_feedback": { "type": "object", "properties": { "stamp_ns": { "type": "string", "pattern": "^(0|[1-9][0-9]{0,18})$", "description": "Nanoseconds in the declared ROS clock domain, encoded as decimal string to preserve precision; zero is invalid for observations." }, "sequence": { "type": "integer", "minimum": 0, "maximum": 4294967295 }, "phase": { "type": "string", "enum": [ "PREPARING", "WAITING_OBSERVATION", "INFERRING", "EXECUTING", "COMPLETING", "STOPPING" ] }, "progress_valid": { "type": "boolean" }, "progress": { "type": "number", "minimum": 0, "maximum": 1 }, "elapsed_ms": { "type": "integer", "minimum": 0 }, "message": { "type": "string" } }, "required": [ "stamp_ns", "sequence", "phase", "progress_valid", "progress", "elapsed_ms", "message" ], "additionalProperties": false }, "goal_record": { "type": "object", "properties": { "goal_id": { "type": "string", "minLength": 1, "maxLength": 512 }, "run_id": { "type": "string", "minLength": 1, "maxLength": 512 }, "subtask_id": { "type": "string", "minLength": 1, "maxLength": 512 }, "attempt": { "type": "integer", "minimum": 1, "maximum": 4294967295 }, "state": { "type": "string", "enum": [ "SENDING", "ACTIVE", "CANCEL_REQUESTED", "STOP_UNKNOWN", "TERMINAL" ] }, "cancel_intent": { "type": "boolean" }, "native_terminal": { "type": "string", "enum": [ "NONE", "SUCCEEDED", "ABORTED", "CANCELED", "REJECTED", "UNKNOWN" ] }, "stop_state": { "type": "string", "enum": [ "UNKNOWN", "CONFIRMED" ] }, "last_sequence": { "type": "integer", "minimum": 0, "maximum": 4294967295 }, "result": { "oneOf": [ { "type": "null" }, { "$ref": "#/$defs/execution_result" } ] } }, "required": [ "goal_id", "run_id", "subtask_id", "attempt", "state", "cancel_intent", "native_terminal", "stop_state", "last_sequence", "result" ], "additionalProperties": false }, "verification_evidence": { "type": "object", "properties": { "check": { "type": "string", "enum": [ "PRECHECK", "PICK", "TRANSPORT", "PLACE", "STOPPED" ] }, "status": { "type": "string", "enum": [ "PASSED", "FAILED", "UNKNOWN" ] }, "target_ref": { "type": "string" }, "destination_ref": { "type": "string" }, "holding_state": { "$ref": "#/$defs/holding" }, "target_match": { "$ref": "#/$defs/valid_bool" }, "grasp_stable": { "$ref": "#/$defs/valid_bool" }, "hand_empty": { "$ref": "#/$defs/valid_bool" }, "target_in_destination": { "$ref": "#/$defs/valid_bool" }, "stopped": { "$ref": "#/$defs/valid_bool" }, "source": { "type": "string", "minLength": 1, "maxLength": 512 }, "evidence_ref": { "type": "string", "minLength": 1, "maxLength": 512 }, "error_code": { "type": "string" }, "message": { "type": "string" } }, "required": [ "check", "status", "target_ref", "destination_ref", "holding_state", "target_match", "grasp_stable", "hand_empty", "target_in_destination", "stopped", "source", "evidence_ref", "error_code", "message" ], "additionalProperties": false }, "delivery_record": { "type": "object", "properties": { "task_id": { "type": "string", "minLength": 1, "maxLength": 512 }, "item_index": { "const": 0 }, "target_ref": { "type": "string", "minLength": 1, "maxLength": 512 }, "destination_ref": { "type": "string", "minLength": 1, "maxLength": 512 }, "verification_goal_id": { "type": "string", "minLength": 1, "maxLength": 512 }, "evidence_ref": { "type": "string", "minLength": 1, "maxLength": 512 }, "committed_at_ns": { "type": "string", "pattern": "^(0|[1-9][0-9]{0,18})$", "description": "Nanoseconds in the declared ROS clock domain, encoded as decimal string to preserve precision; zero is invalid for observations." } }, "required": [ "task_id", "item_index", "target_ref", "destination_ref", "verification_goal_id", "evidence_ref", "committed_at_ns" ], "additionalProperties": false }, "task_payload": { "type": "object", "properties": { "status": { "type": "string", "enum": [ "RECEIVED", "QUEUED", "PLANNING", "NEEDS_CLARIFICATION", "READY", "EXECUTING", "PAUSING", "PAUSED", "CANCELING", "INTERVENTION_REQUIRED", "SUCCEEDED", "FAILED", "CANCELED", "EXPIRED" ] }, "status_version": { "type": "string", "pattern": "^(0|[1-9][0-9]{0,19})$", "description": "Canonical unsigned decimal string; semantic validator enforces uint64 range." }, "instruction": { "type": "string", "minLength": 1, "maxLength": 1000 }, "plan_hash": { "type": "string" }, "approved_plan_ref": { "type": "string" }, "question_id": { "type": "string" }, "canceled": { "type": "boolean" } }, "required": [ "status", "status_version", "instruction", "plan_hash", "approved_plan_ref", "question_id", "canceled" ], "additionalProperties": false }, "current_step_payload": { "type": "object", "properties": { "stage": { "type": "string", "enum": [ "PREFLIGHT", "NAVIGATE_OBSERVE", "LOCATE_SHELF_COLUMN", "NAVIGATE_SOURCE", "LOCALIZE_TARGET", "PICK", "VERIFY_PICK", "TRANSPORT_POSTURE", "VERIFY_TRANSPORT", "NAVIGATE_DESTINATION", "CHECK_FREE_SPACE", "PLACE", "VERIFY_PLACE", "DELIVER", "CLEANUP" ] }, "subtask_id": { "type": "string", "minLength": 1, "maxLength": 512 }, "attempt": { "type": "integer", "minimum": 1 }, "active_goal_id": { "type": "string" } }, "required": [ "stage", "subtask_id", "attempt", "active_goal_id" ], "additionalProperties": false }, "navigation_config_payload": { "type": "object", "properties": { "source_observation": { "$ref": "#/$defs/station" }, "source_parking": { "oneOf": [ { "type": "null" }, { "$ref": "#/$defs/station" } ] }, "destination": { "$ref": "#/$defs/station" } }, "required": [ "source_observation", "source_parking", "destination" ], "additionalProperties": false }, "target_binding_payload": { "type": "object", "properties": { "target": { "$ref": "#/$defs/object_target" }, "grasp_region_ref": { "type": "string" }, "target_point": { "$ref": "#/$defs/point" }, "grasp_point": { "$ref": "#/$defs/point" }, "grasp_point_valid": { "type": "boolean" }, "geometry_valid": { "type": "boolean" }, "station_binding_ref": { "type": "string", "minLength": 1, "maxLength": 512 }, "shelf_id": { "type": "string", "minLength": 1, "maxLength": 512 }, "side_id": { "type": "string", "minLength": 1, "maxLength": 512 }, "column_id": { "type": "string", "minLength": 1, "maxLength": 512 }, "tier_id": { "type": "string" }, "calibration_id": { "type": "string", "minLength": 1, "maxLength": 512 }, "observation_id": { "type": "string", "minLength": 1, "maxLength": 512 } }, "required": [ "target", "grasp_region_ref", "target_point", "grasp_point", "grasp_point_valid", "geometry_valid", "station_binding_ref", "shelf_id", "side_id", "column_id", "tier_id", "calibration_id", "observation_id" ], "additionalProperties": false }, "placement_binding_payload": { "type": "object", "properties": { "target_ref": { "type": "string", "minLength": 1, "maxLength": 512 }, "destination": { "$ref": "#/$defs/region_target" }, "placement_region_ref": { "type": "string", "minLength": 1, "maxLength": 512 }, "placement_point": { "$ref": "#/$defs/point" }, "placement_point_valid": { "type": "boolean" }, "placement_pose": { "$ref": "#/$defs/pose" }, "placement_pose_valid": { "type": "boolean" }, "geometry_valid": { "type": "boolean" }, "observation_id": { "type": "string", "minLength": 1, "maxLength": 512 } }, "required": [ "target_ref", "destination", "placement_region_ref", "placement_point", "placement_point_valid", "placement_pose", "placement_pose_valid", "geometry_valid", "observation_id" ], "additionalProperties": false }, "navigation_execution_payload": { "type": "object", "properties": { "request": { "$ref": "#/$defs/navigation_request" }, "current_goal_id": { "type": "string", "minLength": 1, "maxLength": 512 }, "feedback": { "oneOf": [ { "type": "null" }, { "$ref": "#/$defs/navigation_feedback" } ] }, "result": { "oneOf": [ { "type": "null" }, { "$ref": "#/$defs/execution_result" } ] }, "stop_state": { "type": "string", "enum": [ "UNKNOWN", "CONFIRMED" ] }, "active_goal_records": { "type": "array", "items": { "$ref": "#/$defs/goal_record" } } }, "required": [ "request", "current_goal_id", "feedback", "result", "stop_state", "active_goal_records" ], "additionalProperties": false }, "manipulation_execution_payload": { "type": "object", "properties": { "request": { "$ref": "#/$defs/manipulation_request" }, "current_goal_id": { "type": "string", "minLength": 1, "maxLength": 512 }, "feedback": { "oneOf": [ { "type": "null" }, { "$ref": "#/$defs/manipulation_feedback" } ] }, "result": { "oneOf": [ { "type": "null" }, { "$ref": "#/$defs/execution_result" } ] }, "stop_state": { "type": "string", "enum": [ "UNKNOWN", "CONFIRMED" ] }, "execution_record_ref": { "type": "string" }, "active_goal_records": { "type": "array", "items": { "$ref": "#/$defs/goal_record" } } }, "required": [ "request", "current_goal_id", "feedback", "result", "stop_state", "execution_record_ref", "active_goal_records" ], "additionalProperties": false }, "verification_payload": { "type": "object", "properties": { "evidence": { "$ref": "#/$defs/verification_evidence" }, "held_target_binding": { "oneOf": [ { "type": "null" }, { "$ref": "#/$defs/object_target" } ] }, "subject_goal_id": { "type": "string", "description": "Proposed storage-only linkage to the preceding manipulation/posture goal; empty only for PRECHECK/standalone stop checks. Not a field in the current VerifyState.action." } }, "required": [ "evidence", "held_target_binding", "subject_goal_id" ], "additionalProperties": false }, "robot_state_payload": { "type": "object", "properties": { "base_stopped": { "$ref": "#/$defs/valid_bool" }, "posture_settled": { "$ref": "#/$defs/valid_bool" }, "holding_state": { "$ref": "#/$defs/holding" }, "held_target_ref": { "type": "string" }, "posture_id": { "type": "string" }, "pose_valid": { "type": "boolean" }, "pose": { "$ref": "#/$defs/pose" }, "evidence_ref": { "type": "string", "minLength": 1, "maxLength": 512 } }, "required": [ "base_stopped", "posture_settled", "holding_state", "held_target_ref", "posture_id", "pose_valid", "pose", "evidence_ref" ], "additionalProperties": false }, "safety_state_payload": { "type": "object", "properties": { "safety_valid": { "type": "boolean" }, "motion_allowed": { "type": "boolean" }, "emergency_stop_active": { "type": "boolean" }, "protective_stop_active": { "type": "boolean" }, "error_code": { "type": "string" }, "evidence_ref": { "type": "string", "minLength": 1, "maxLength": 512 } }, "required": [ "safety_valid", "motion_allowed", "emergency_stop_active", "protective_stop_active", "error_code", "evidence_ref" ], "additionalProperties": false }, "task_result_payload": { "type": "object", "properties": { "status": { "type": "string", "enum": [ "SUCCEEDED", "FAILED", "CANCELED", "INTERVENTION_REQUIRED" ] }, "completed_quantity": { "type": "integer", "minimum": 0, "maximum": 1 }, "remaining_quantity": { "type": "integer", "minimum": 0, "maximum": 1 }, "failure_codes": { "type": "array", "items": { "type": "string", "minLength": 1, "maxLength": 512 } }, "delivery_ledger_ref": { "type": "string" }, "deliveries": { "type": "array", "items": { "$ref": "#/$defs/delivery_record" } } }, "required": [ "status", "completed_quantity", "remaining_quantity", "failure_codes", "delivery_ledger_ref", "deliveries" ], "additionalProperties": false } } }