embodichain.lab.task_program.language#
Task Program source schema, strict decoding, validation, and loading.
Task Program source is represented by executable-free schema values. The same package owns strict JSON/YAML decoding, reference validation, bounded loading, and pathful configuration errors.
Validate one articulation joint against an inclusive position interval. |
|
Explicit synchronization boundary owned by one parallel node. |
|
Built-in immutable sequence. |
|
Represent a PEP 604 union type |
|
Finite pose values selected cyclically by the enclosing repeat index. |
|
Declarative request to transfer one held object between resources. |
|
Invoke exactly one semantic call at the current program boundary. |
|
Validate an object's position against one resolved target. |
|
Execute two or more branches concurrently and join at one barrier. |
|
Declarative request to acquire one registered object. |
|
Declarative request to place one held object at one destination. |
|
One declarative Cartesian pose using an XYZW quaternion. |
|
Safe declarative payload for one catalog-registered semantic call. |
|
Repeat one child node a finite validated number of times. |
|
alias of |
|
Logical transaction with optional segment-specific language instruction. |
|
Execute one non-empty ordered tuple of program nodes. |
|
Reference to one top-level typed target provider. |
|
Strict, executable-free Task Program configuration. |
|
Base pathful diagnostic for Task Program configuration failures. |
|
Raised when untrusted data does not match a supported strict schema. |
|
Static integration references selected by one Task Program. |
|
Provider-free static validation boundary for external references. |
|
Raised when an explicit static integration context rejects a reference. |
|
Wait for one registered entity to satisfy a named stability preset. |
|
|
Decode untrusted JSON/YAML-shaped values into strict program config. |
|
Safely load and strictly decode one JSON or YAML Task Program file. |
|
Strictly parse and decode one untrusted Task Program JSON document. |
|
Parse one bounded Task Program JSON object without decoding its schema. |
|
Render one configuration path using JSONPath-like notation. |
|
Resolve external references without observing or executing an environment. |
Classes:
Validate one articulation joint against an inclusive position interval. |
|
Explicit synchronization boundary owned by one parallel node. |
|
Finite pose values selected cyclically by the enclosing repeat index. |
|
Declarative request to transfer one held object between resources. |
|
Invoke exactly one semantic call at the current program boundary. |
|
Require a world-Z increase since the owning segment started. |
|
Validate an object's position against one resolved target. |
|
Require an object's position near a live reference plus a declared offset. |
|
Require the object's local Z axis to tilt less than an angle from world Z. |
|
Execute two or more branches concurrently and join at one barrier. |
|
Declarative request to acquire one registered object. |
|
Declarative request to place one held object at one destination. |
|
One declarative Cartesian pose using an XYZW quaternion. |
|
Safe declarative payload for one catalog-registered semantic call. |
|
Repeat one child node a finite validated number of times. |
|
Logical transaction with optional segment-specific language instruction. |
|
Execute one non-empty ordered tuple of program nodes. |
|
Reference to one top-level typed target provider. |
|
Strict, executable-free Task Program configuration. |
|
Static integration references selected by one Task Program. |
|
Provider-free static validation boundary for external references. |
|
Wait for one registered entity to satisfy a named stability preset. |
Exceptions:
Base pathful diagnostic for Task Program configuration failures. |
|
Raised when untrusted data does not match a supported strict schema. |
|
Raised when an explicit static integration context rejects a reference. |
Functions:
|
Decode untrusted JSON/YAML-shaped values into strict program config. |
|
Safely load and strictly decode one JSON or YAML Task Program file. |
|
Strictly parse and decode one untrusted Task Program JSON document. |
|
Parse one bounded Task Program JSON object without decoding its schema. |
|
Render one configuration path using JSONPath-like notation. |
|
Resolve external references without observing or executing an environment. |
- class embodichain.lab.task_program.language.ArticulationJointPositionValidatorCfg[source]#
Validate one articulation joint against an inclusive position interval.
Methods:
__init__([articulation, joint, ...])copy(**kwargs)Return a new object replacing specified fields with new values.
replace(**kwargs)Return a new object replacing specified fields with new values.
to_dict()Convert an object into dictionary recursively.
validate([prefix])Check the validity of configclass object.
Attributes:
- __init__(articulation=<factory>, joint=<factory>, minimum_position=<factory>, maximum_position=<factory>, kind=<factory>)#
-
articulation:
str#
- copy(**kwargs)#
Return a new object replacing specified fields with new values.
This is especially useful for frozen classes. Example usage:
@configclass(frozen=True) class C: x: int y: int c = C(1, 2) c1 = c.replace(x=3) assert c1.x == 3 and c1.y == 2
- Parameters:
obj (
object) – The object to replace.**kwargs – The fields to replace and their new values.
- Return type:
object- Returns:
The new object.
-
joint:
str#
-
kind:
str#
-
maximum_position:
float|None#
-
minimum_position:
float|None#
- replace(**kwargs)#
Return a new object replacing specified fields with new values.
This is especially useful for frozen classes. Example usage:
@configclass(frozen=True) class C: x: int y: int c = C(1, 2) c1 = c.replace(x=3) assert c1.x == 3 and c1.y == 2
- Parameters:
obj (
object) – The object to replace.**kwargs – The fields to replace and their new values.
- Return type:
object- Returns:
The new object.
- to_dict()#
Convert an object into dictionary recursively.
Note
Ignores all names starting with “__” (i.e. built-in methods).
- Parameters:
obj (
object) – An instance of a class to convert.- Raises:
ValueError – When input argument is not an object.
- Return type:
dict[str,Any]- Returns:
Converted dictionary mapping.
- validate(prefix='')#
Check the validity of configclass object.
This function checks if the object is a valid configclass object. A valid configclass object contains no MISSING entries.
- Parameters:
obj (
object) – The object to check.prefix (
str) – The prefix to add to the missing fields. Defaults to ‘’.
- Return type:
list[str]- Returns:
A list of missing fields.
- Raises:
TypeError – When the object is not a valid configuration object.
- class embodichain.lab.task_program.language.BarrierCfg[source]#
Explicit synchronization boundary owned by one parallel node.
Methods:
__init__([name, timeout_steps, ...])copy(**kwargs)Return a new object replacing specified fields with new values.
replace(**kwargs)Return a new object replacing specified fields with new values.
to_dict()Convert an object into dictionary recursively.
validate([prefix])Check the validity of configclass object.
Attributes:
- __init__(name=<factory>, timeout_steps=<factory>, failure_policy=<factory>, kind=<factory>)#
- copy(**kwargs)#
Return a new object replacing specified fields with new values.
This is especially useful for frozen classes. Example usage:
@configclass(frozen=True) class C: x: int y: int c = C(1, 2) c1 = c.replace(x=3) assert c1.x == 3 and c1.y == 2
- Parameters:
obj (
object) – The object to replace.**kwargs – The fields to replace and their new values.
- Return type:
object- Returns:
The new object.
-
failure_policy:
str#
-
kind:
str#
-
name:
str#
- replace(**kwargs)#
Return a new object replacing specified fields with new values.
This is especially useful for frozen classes. Example usage:
@configclass(frozen=True) class C: x: int y: int c = C(1, 2) c1 = c.replace(x=3) assert c1.x == 3 and c1.y == 2
- Parameters:
obj (
object) – The object to replace.**kwargs – The fields to replace and their new values.
- Return type:
object- Returns:
The new object.
-
timeout_steps:
int#
- to_dict()#
Convert an object into dictionary recursively.
Note
Ignores all names starting with “__” (i.e. built-in methods).
- Parameters:
obj (
object) – An instance of a class to convert.- Raises:
ValueError – When input argument is not an object.
- Return type:
dict[str,Any]- Returns:
Converted dictionary mapping.
- validate(prefix='')#
Check the validity of configclass object.
This function checks if the object is a valid configclass object. A valid configclass object contains no MISSING entries.
- Parameters:
obj (
object) – The object to check.prefix (
str) – The prefix to add to the missing fields. Defaults to ‘’.
- Return type:
list[str]- Returns:
A list of missing fields.
- Raises:
TypeError – When the object is not a valid configuration object.
- class embodichain.lab.task_program.language.CyclicPoseTargetCfg[source]#
Finite pose values selected cyclically by the enclosing repeat index.
Methods:
__init__([values, kind])copy(**kwargs)Return a new object replacing specified fields with new values.
replace(**kwargs)Return a new object replacing specified fields with new values.
to_dict()Convert an object into dictionary recursively.
validate([prefix])Check the validity of configclass object.
Attributes:
- __init__(values=<factory>, kind=<factory>)#
- copy(**kwargs)#
Return a new object replacing specified fields with new values.
This is especially useful for frozen classes. Example usage:
@configclass(frozen=True) class C: x: int y: int c = C(1, 2) c1 = c.replace(x=3) assert c1.x == 3 and c1.y == 2
- Parameters:
obj (
object) – The object to replace.**kwargs – The fields to replace and their new values.
- Return type:
object- Returns:
The new object.
-
kind:
str#
- replace(**kwargs)#
Return a new object replacing specified fields with new values.
This is especially useful for frozen classes. Example usage:
@configclass(frozen=True) class C: x: int y: int c = C(1, 2) c1 = c.replace(x=3) assert c1.x == 3 and c1.y == 2
- Parameters:
obj (
object) – The object to replace.**kwargs – The fields to replace and their new values.
- Return type:
object- Returns:
The new object.
- to_dict()#
Convert an object into dictionary recursively.
Note
Ignores all names starting with “__” (i.e. built-in methods).
- Parameters:
obj (
object) – An instance of a class to convert.- Raises:
ValueError – When input argument is not an object.
- Return type:
dict[str,Any]- Returns:
Converted dictionary mapping.
- validate(prefix='')#
Check the validity of configclass object.
This function checks if the object is a valid configclass object. A valid configclass object contains no MISSING entries.
- Parameters:
obj (
object) – The object to check.prefix (
str) – The prefix to add to the missing fields. Defaults to ‘’.
- Return type:
list[str]- Returns:
A list of missing fields.
- Raises:
TypeError – When the object is not a valid configuration object.
- class embodichain.lab.task_program.language.HandOverCfg[source]#
Declarative request to transfer one held object between resources.
Methods:
__init__([object, final_target, resources, kind])copy(**kwargs)Return a new object replacing specified fields with new values.
replace(**kwargs)Return a new object replacing specified fields with new values.
to_dict()Convert an object into dictionary recursively.
validate([prefix])Check the validity of configclass object.
Attributes:
- __init__(object=<factory>, final_target=<factory>, resources=<factory>, kind=<factory>)#
- copy(**kwargs)#
Return a new object replacing specified fields with new values.
This is especially useful for frozen classes. Example usage:
@configclass(frozen=True) class C: x: int y: int c = C(1, 2) c1 = c.replace(x=3) assert c1.x == 3 and c1.y == 2
-
final_target:
TargetRefCfg|None#
-
kind:
str#
-
object:
str#
- replace(**kwargs)#
Return a new object replacing specified fields with new values.
This is especially useful for frozen classes. Example usage:
@configclass(frozen=True) class C: x: int y: int c = C(1, 2) c1 = c.replace(x=3) assert c1.x == 3 and c1.y == 2
-
resources:
dict[str,str]#
- to_dict()#
Convert an object into dictionary recursively.
Note
Ignores all names starting with “__” (i.e. built-in methods).
- Parameters:
obj (
object) – An instance of a class to convert.- Raises:
ValueError – When input argument is not an object.
- Return type:
dict[str,Any]- Returns:
Converted dictionary mapping.
- validate(prefix='')#
Check the validity of configclass object.
This function checks if the object is a valid configclass object. A valid configclass object contains no MISSING entries.
- Parameters:
obj (
object) – The object to check.prefix (
str) – The prefix to add to the missing fields. Defaults to ‘’.
- Return type:
list[str]- Returns:
A list of missing fields.
- Raises:
TypeError – When the object is not a valid configuration object.
- class embodichain.lab.task_program.language.InvokeCfg[source]#
Invoke exactly one semantic call at the current program boundary.
Methods:
__init__([call, kind])copy(**kwargs)Return a new object replacing specified fields with new values.
replace(**kwargs)Return a new object replacing specified fields with new values.
to_dict()Convert an object into dictionary recursively.
validate([prefix])Check the validity of configclass object.
Attributes:
- __init__(call=<factory>, kind=<factory>)#
-
call:
PickCfg|PlaceCfg|HandOverCfg|RegisteredSemanticCallCfg#
- copy(**kwargs)#
Return a new object replacing specified fields with new values.
This is especially useful for frozen classes. Example usage:
@configclass(frozen=True) class C: x: int y: int c = C(1, 2) c1 = c.replace(x=3) assert c1.x == 3 and c1.y == 2
- Parameters:
obj (
object) – The object to replace.**kwargs – The fields to replace and their new values.
- Return type:
object- Returns:
The new object.
-
kind:
str#
- replace(**kwargs)#
Return a new object replacing specified fields with new values.
This is especially useful for frozen classes. Example usage:
@configclass(frozen=True) class C: x: int y: int c = C(1, 2) c1 = c.replace(x=3) assert c1.x == 3 and c1.y == 2
- Parameters:
obj (
object) – The object to replace.**kwargs – The fields to replace and their new values.
- Return type:
object- Returns:
The new object.
- to_dict()#
Convert an object into dictionary recursively.
Note
Ignores all names starting with “__” (i.e. built-in methods).
- Parameters:
obj (
object) – An instance of a class to convert.- Raises:
ValueError – When input argument is not an object.
- Return type:
dict[str,Any]- Returns:
Converted dictionary mapping.
- validate(prefix='')#
Check the validity of configclass object.
This function checks if the object is a valid configclass object. A valid configclass object contains no MISSING entries.
- Parameters:
obj (
object) – The object to check.prefix (
str) – The prefix to add to the missing fields. Defaults to ‘’.
- Return type:
list[str]- Returns:
A list of missing fields.
- Raises:
TypeError – When the object is not a valid configuration object.
- class embodichain.lab.task_program.language.ObjectLiftedValidatorCfg[source]#
Require a world-Z increase since the owning segment started.
- Parameters:
object (
str) – Logical scene object whose observed height is measured.minimum_lift (
float) – Inclusive minimum increase in meters, relative to the observed pose captured before the segment starts executing.kind (
str) – Fixedobject_lifteddiscriminator.
Methods:
__init__([object, minimum_lift, kind])copy(**kwargs)Return a new object replacing specified fields with new values.
replace(**kwargs)Return a new object replacing specified fields with new values.
to_dict()Convert an object into dictionary recursively.
validate([prefix])Check the validity of configclass object.
Attributes:
- __init__(object=<factory>, minimum_lift=<factory>, kind=<factory>)#
- copy(**kwargs)#
Return a new object replacing specified fields with new values.
This is especially useful for frozen classes. Example usage:
@configclass(frozen=True) class C: x: int y: int c = C(1, 2) c1 = c.replace(x=3) assert c1.x == 3 and c1.y == 2
-
kind:
str#
-
minimum_lift:
float#
-
object:
str#
- replace(**kwargs)#
Return a new object replacing specified fields with new values.
This is especially useful for frozen classes. Example usage:
@configclass(frozen=True) class C: x: int y: int c = C(1, 2) c1 = c.replace(x=3) assert c1.x == 3 and c1.y == 2
- to_dict()#
Convert an object into dictionary recursively.
Note
Ignores all names starting with “__” (i.e. built-in methods).
- Parameters:
obj (
object) – An instance of a class to convert.- Raises:
ValueError – When input argument is not an object.
- Return type:
dict[str,Any]- Returns:
Converted dictionary mapping.
- validate(prefix='')#
Check the validity of configclass object.
This function checks if the object is a valid configclass object. A valid configclass object contains no MISSING entries.
- Parameters:
obj (
object) – The object to check.prefix (
str) – The prefix to add to the missing fields. Defaults to ‘’.
- Return type:
list[str]- Returns:
A list of missing fields.
- Raises:
TypeError – When the object is not a valid configuration object.
- class embodichain.lab.task_program.language.ObjectNearTargetValidatorCfg[source]#
Validate an object’s position against one resolved target.
Methods:
__init__([object, target, ...])copy(**kwargs)Return a new object replacing specified fields with new values.
replace(**kwargs)Return a new object replacing specified fields with new values.
to_dict()Convert an object into dictionary recursively.
validate([prefix])Check the validity of configclass object.
Attributes:
- __init__(object=<factory>, target=<factory>, position_tolerance=<factory>, kind=<factory>)#
- copy(**kwargs)#
Return a new object replacing specified fields with new values.
This is especially useful for frozen classes. Example usage:
@configclass(frozen=True) class C: x: int y: int c = C(1, 2) c1 = c.replace(x=3) assert c1.x == 3 and c1.y == 2
-
kind:
str#
-
object:
str#
-
position_tolerance:
float#
- replace(**kwargs)#
Return a new object replacing specified fields with new values.
This is especially useful for frozen classes. Example usage:
@configclass(frozen=True) class C: x: int y: int c = C(1, 2) c1 = c.replace(x=3) assert c1.x == 3 and c1.y == 2
-
target:
str#
- to_dict()#
Convert an object into dictionary recursively.
Note
Ignores all names starting with “__” (i.e. built-in methods).
- Parameters:
obj (
object) – An instance of a class to convert.- Raises:
ValueError – When input argument is not an object.
- Return type:
dict[str,Any]- Returns:
Converted dictionary mapping.
- validate(prefix='')#
Check the validity of configclass object.
This function checks if the object is a valid configclass object. A valid configclass object contains no MISSING entries.
- Parameters:
obj (
object) – The object to check.prefix (
str) – The prefix to add to the missing fields. Defaults to ‘’.
- Return type:
list[str]- Returns:
A list of missing fields.
- Raises:
TypeError – When the object is not a valid configuration object.
- class embodichain.lab.task_program.language.ObjectRelativePositionValidatorCfg[source]#
Require an object’s position near a live reference plus a declared offset.
Each tolerance is exclusive;
Nonedisables checking that axis. At least one axis must be checked.world_axespreserves world-oriented offsets and tolerances;parentmeasures them in the live reference frame.- Parameters:
object (
str) – Logical scene object to validate.reference (
str) – Logical scene object whose live position defines the origin.position_offset (
tuple[float,float,float]) – Desired XYZ displacement in the selected frame, in meters.position_tolerance (
tuple[float|None,float|None,float|None]) – Exclusive XYZ error bounds in meters;Nonedisables the corresponding axis.reference_frame (
str) –world_axes(default) or the live reference’sparentframe.kind (
str) – Fixedobject_relative_positiondiscriminator.
Methods:
__init__([object, reference, ...])copy(**kwargs)Return a new object replacing specified fields with new values.
replace(**kwargs)Return a new object replacing specified fields with new values.
to_dict()Convert an object into dictionary recursively.
validate([prefix])Check the validity of configclass object.
Attributes:
- __init__(object=<factory>, reference=<factory>, position_offset=<factory>, position_tolerance=<factory>, kind=<factory>, reference_frame=<factory>)#
- copy(**kwargs)#
Return a new object replacing specified fields with new values.
This is especially useful for frozen classes. Example usage:
@configclass(frozen=True) class C: x: int y: int c = C(1, 2) c1 = c.replace(x=3) assert c1.x == 3 and c1.y == 2
-
kind:
str#
-
object:
str#
-
position_offset:
tuple[float,float,float]#
-
position_tolerance:
tuple[float|None,float|None,float|None]#
-
reference:
str#
-
reference_frame:
str#
- replace(**kwargs)#
Return a new object replacing specified fields with new values.
This is especially useful for frozen classes. Example usage:
@configclass(frozen=True) class C: x: int y: int c = C(1, 2) c1 = c.replace(x=3) assert c1.x == 3 and c1.y == 2
- to_dict()#
Convert an object into dictionary recursively.
Note
Ignores all names starting with “__” (i.e. built-in methods).
- Parameters:
obj (
object) – An instance of a class to convert.- Raises:
ValueError – When input argument is not an object.
- Return type:
dict[str,Any]- Returns:
Converted dictionary mapping.
- validate(prefix='')#
Check the validity of configclass object.
This function checks if the object is a valid configclass object. A valid configclass object contains no MISSING entries.
- Parameters:
obj (
object) – The object to check.prefix (
str) – The prefix to add to the missing fields. Defaults to ‘’.
- Return type:
list[str]- Returns:
A list of missing fields.
- Raises:
TypeError – When the object is not a valid configuration object.
- class embodichain.lab.task_program.language.ObjectUprightValidatorCfg[source]#
Require the object’s local Z axis to tilt less than an angle from world Z.
- Parameters:
object (
str) – Logical scene object whose local Z axis is measured.maximum_tilt_degrees (
float) – Exclusive maximum angle from world Z in degrees.kind (
str) – Fixedobject_uprightdiscriminator.
Methods:
__init__([object, maximum_tilt_degrees, kind])copy(**kwargs)Return a new object replacing specified fields with new values.
replace(**kwargs)Return a new object replacing specified fields with new values.
to_dict()Convert an object into dictionary recursively.
validate([prefix])Check the validity of configclass object.
Attributes:
- __init__(object=<factory>, maximum_tilt_degrees=<factory>, kind=<factory>)#
- copy(**kwargs)#
Return a new object replacing specified fields with new values.
This is especially useful for frozen classes. Example usage:
@configclass(frozen=True) class C: x: int y: int c = C(1, 2) c1 = c.replace(x=3) assert c1.x == 3 and c1.y == 2
-
kind:
str#
-
maximum_tilt_degrees:
float#
-
object:
str#
- replace(**kwargs)#
Return a new object replacing specified fields with new values.
This is especially useful for frozen classes. Example usage:
@configclass(frozen=True) class C: x: int y: int c = C(1, 2) c1 = c.replace(x=3) assert c1.x == 3 and c1.y == 2
- to_dict()#
Convert an object into dictionary recursively.
Note
Ignores all names starting with “__” (i.e. built-in methods).
- Parameters:
obj (
object) – An instance of a class to convert.- Raises:
ValueError – When input argument is not an object.
- Return type:
dict[str,Any]- Returns:
Converted dictionary mapping.
- validate(prefix='')#
Check the validity of configclass object.
This function checks if the object is a valid configclass object. A valid configclass object contains no MISSING entries.
- Parameters:
obj (
object) – The object to check.prefix (
str) – The prefix to add to the missing fields. Defaults to ‘’.
- Return type:
list[str]- Returns:
A list of missing fields.
- Raises:
TypeError – When the object is not a valid configuration object.
- class embodichain.lab.task_program.language.ParallelCfg[source]#
Execute two or more branches concurrently and join at one barrier.
Methods:
__init__([branches, barrier, kind])copy(**kwargs)Return a new object replacing specified fields with new values.
replace(**kwargs)Return a new object replacing specified fields with new values.
to_dict()Convert an object into dictionary recursively.
validate([prefix])Check the validity of configclass object.
Attributes:
- __init__(branches=<factory>, barrier=<factory>, kind=<factory>)#
-
barrier:
BarrierCfg#
-
branches:
tuple[SequenceCfg|RepeatCfg|SegmentCfg|InvokeCfg|ParallelCfg,...]#
- copy(**kwargs)#
Return a new object replacing specified fields with new values.
This is especially useful for frozen classes. Example usage:
@configclass(frozen=True) class C: x: int y: int c = C(1, 2) c1 = c.replace(x=3) assert c1.x == 3 and c1.y == 2
- Parameters:
obj (
object) – The object to replace.**kwargs – The fields to replace and their new values.
- Return type:
object- Returns:
The new object.
-
kind:
str#
- replace(**kwargs)#
Return a new object replacing specified fields with new values.
This is especially useful for frozen classes. Example usage:
@configclass(frozen=True) class C: x: int y: int c = C(1, 2) c1 = c.replace(x=3) assert c1.x == 3 and c1.y == 2
- Parameters:
obj (
object) – The object to replace.**kwargs – The fields to replace and their new values.
- Return type:
object- Returns:
The new object.
- to_dict()#
Convert an object into dictionary recursively.
Note
Ignores all names starting with “__” (i.e. built-in methods).
- Parameters:
obj (
object) – An instance of a class to convert.- Raises:
ValueError – When input argument is not an object.
- Return type:
dict[str,Any]- Returns:
Converted dictionary mapping.
- validate(prefix='')#
Check the validity of configclass object.
This function checks if the object is a valid configclass object. A valid configclass object contains no MISSING entries.
- Parameters:
obj (
object) – The object to check.prefix (
str) – The prefix to add to the missing fields. Defaults to ‘’.
- Return type:
list[str]- Returns:
A list of missing fields.
- Raises:
TypeError – When the object is not a valid configuration object.
- class embodichain.lab.task_program.language.PickCfg[source]#
Declarative request to acquire one registered object.
Methods:
__init__([object, grasp, resources, kind])copy(**kwargs)Return a new object replacing specified fields with new values.
replace(**kwargs)Return a new object replacing specified fields with new values.
to_dict()Convert an object into dictionary recursively.
validate([prefix])Check the validity of configclass object.
Attributes:
- __init__(object=<factory>, grasp=<factory>, resources=<factory>, kind=<factory>)#
- copy(**kwargs)#
Return a new object replacing specified fields with new values.
This is especially useful for frozen classes. Example usage:
@configclass(frozen=True) class C: x: int y: int c = C(1, 2) c1 = c.replace(x=3) assert c1.x == 3 and c1.y == 2
-
grasp:
str|None#
-
kind:
str#
-
object:
str#
- replace(**kwargs)#
Return a new object replacing specified fields with new values.
This is especially useful for frozen classes. Example usage:
@configclass(frozen=True) class C: x: int y: int c = C(1, 2) c1 = c.replace(x=3) assert c1.x == 3 and c1.y == 2
-
resources:
dict[str,str]#
- to_dict()#
Convert an object into dictionary recursively.
Note
Ignores all names starting with “__” (i.e. built-in methods).
- Parameters:
obj (
object) – An instance of a class to convert.- Raises:
ValueError – When input argument is not an object.
- Return type:
dict[str,Any]- Returns:
Converted dictionary mapping.
- validate(prefix='')#
Check the validity of configclass object.
This function checks if the object is a valid configclass object. A valid configclass object contains no MISSING entries.
- Parameters:
obj (
object) – The object to check.prefix (
str) – The prefix to add to the missing fields. Defaults to ‘’.
- Return type:
list[str]- Returns:
A list of missing fields.
- Raises:
TypeError – When the object is not a valid configuration object.
- class embodichain.lab.task_program.language.PlaceCfg[source]#
Declarative request to place one held object at one destination.
Methods:
__init__([object, at, on, inside, ...])copy(**kwargs)Return a new object replacing specified fields with new values.
replace(**kwargs)Return a new object replacing specified fields with new values.
to_dict()Convert an object into dictionary recursively.
validate([prefix])Check the validity of configclass object.
Attributes:
- __init__(object=<factory>, at=<factory>, on=<factory>, inside=<factory>, resources=<factory>, kind=<factory>)#
-
at:
TargetRefCfg|None#
- copy(**kwargs)#
Return a new object replacing specified fields with new values.
This is especially useful for frozen classes. Example usage:
@configclass(frozen=True) class C: x: int y: int c = C(1, 2) c1 = c.replace(x=3) assert c1.x == 3 and c1.y == 2
-
inside:
str|None#
-
kind:
str#
-
object:
str#
-
on:
str|None#
- replace(**kwargs)#
Return a new object replacing specified fields with new values.
This is especially useful for frozen classes. Example usage:
@configclass(frozen=True) class C: x: int y: int c = C(1, 2) c1 = c.replace(x=3) assert c1.x == 3 and c1.y == 2
-
resources:
dict[str,str]#
- to_dict()#
Convert an object into dictionary recursively.
Note
Ignores all names starting with “__” (i.e. built-in methods).
- Parameters:
obj (
object) – An instance of a class to convert.- Raises:
ValueError – When input argument is not an object.
- Return type:
dict[str,Any]- Returns:
Converted dictionary mapping.
- validate(prefix='')#
Check the validity of configclass object.
This function checks if the object is a valid configclass object. A valid configclass object contains no MISSING entries.
- Parameters:
obj (
object) – The object to check.prefix (
str) – The prefix to add to the missing fields. Defaults to ‘’.
- Return type:
list[str]- Returns:
A list of missing fields.
- Raises:
TypeError – When the object is not a valid configuration object.
- class embodichain.lab.task_program.language.PoseCfg[source]#
One declarative Cartesian pose using an XYZW quaternion.
Methods:
__init__([position, quaternion_xyzw])copy(**kwargs)Return a new object replacing specified fields with new values.
replace(**kwargs)Return a new object replacing specified fields with new values.
to_dict()Convert an object into dictionary recursively.
validate([prefix])Check the validity of configclass object.
Attributes:
- __init__(position=<factory>, quaternion_xyzw=<factory>)#
- copy(**kwargs)#
Return a new object replacing specified fields with new values.
This is especially useful for frozen classes. Example usage:
@configclass(frozen=True) class C: x: int y: int c = C(1, 2) c1 = c.replace(x=3) assert c1.x == 3 and c1.y == 2
- Parameters:
obj (
object) – The object to replace.**kwargs – The fields to replace and their new values.
- Return type:
object- Returns:
The new object.
-
position:
tuple[float,float,float]#
-
quaternion_xyzw:
tuple[float,float,float,float]#
- replace(**kwargs)#
Return a new object replacing specified fields with new values.
This is especially useful for frozen classes. Example usage:
@configclass(frozen=True) class C: x: int y: int c = C(1, 2) c1 = c.replace(x=3) assert c1.x == 3 and c1.y == 2
- Parameters:
obj (
object) – The object to replace.**kwargs – The fields to replace and their new values.
- Return type:
object- Returns:
The new object.
- to_dict()#
Convert an object into dictionary recursively.
Note
Ignores all names starting with “__” (i.e. built-in methods).
- Parameters:
obj (
object) – An instance of a class to convert.- Raises:
ValueError – When input argument is not an object.
- Return type:
dict[str,Any]- Returns:
Converted dictionary mapping.
- validate(prefix='')#
Check the validity of configclass object.
This function checks if the object is a valid configclass object. A valid configclass object contains no MISSING entries.
- Parameters:
obj (
object) – The object to check.prefix (
str) – The prefix to add to the missing fields. Defaults to ‘’.
- Return type:
list[str]- Returns:
A list of missing fields.
- Raises:
TypeError – When the object is not a valid configuration object.
- class embodichain.lab.task_program.language.RegisteredSemanticCallCfg[source]#
Safe declarative payload for one catalog-registered semantic call.
Methods:
__init__([call_id, arguments, resources, kind])copy(**kwargs)Return a new object replacing specified fields with new values.
replace(**kwargs)Return a new object replacing specified fields with new values.
to_dict()Convert an object into dictionary recursively.
validate([prefix])Check the validity of configclass object.
Attributes:
- __init__(call_id=<factory>, arguments=<factory>, resources=<factory>, kind=<factory>)#
-
arguments:
dict[str,None|bool|int|float|str|tuple[None|bool|int|float|str|tuple[DeclarativeCfgValue,...] |dict[str, DeclarativeCfgValue],...] |dict[str,None|bool|int|float|str|tuple[DeclarativeCfgValue,...] |dict[str, DeclarativeCfgValue]]]#
-
call_id:
str#
- copy(**kwargs)#
Return a new object replacing specified fields with new values.
This is especially useful for frozen classes. Example usage:
@configclass(frozen=True) class C: x: int y: int c = C(1, 2) c1 = c.replace(x=3) assert c1.x == 3 and c1.y == 2
- Parameters:
obj (
object) – The object to replace.**kwargs – The fields to replace and their new values.
- Return type:
object- Returns:
The new object.
-
kind:
str#
- replace(**kwargs)#
Return a new object replacing specified fields with new values.
This is especially useful for frozen classes. Example usage:
@configclass(frozen=True) class C: x: int y: int c = C(1, 2) c1 = c.replace(x=3) assert c1.x == 3 and c1.y == 2
- Parameters:
obj (
object) – The object to replace.**kwargs – The fields to replace and their new values.
- Return type:
object- Returns:
The new object.
-
resources:
dict[str,str]#
- to_dict()#
Convert an object into dictionary recursively.
Note
Ignores all names starting with “__” (i.e. built-in methods).
- Parameters:
obj (
object) – An instance of a class to convert.- Raises:
ValueError – When input argument is not an object.
- Return type:
dict[str,Any]- Returns:
Converted dictionary mapping.
- validate(prefix='')#
Check the validity of configclass object.
This function checks if the object is a valid configclass object. A valid configclass object contains no MISSING entries.
- Parameters:
obj (
object) – The object to check.prefix (
str) – The prefix to add to the missing fields. Defaults to ‘’.
- Return type:
list[str]- Returns:
A list of missing fields.
- Raises:
TypeError – When the object is not a valid configuration object.
- class embodichain.lab.task_program.language.RepeatCfg[source]#
Repeat one child node a finite validated number of times.
Methods:
__init__([count, body, kind])copy(**kwargs)Return a new object replacing specified fields with new values.
replace(**kwargs)Return a new object replacing specified fields with new values.
to_dict()Convert an object into dictionary recursively.
validate([prefix])Check the validity of configclass object.
Attributes:
- __init__(count=<factory>, body=<factory>, kind=<factory>)#
-
body:
SequenceCfg|RepeatCfg|SegmentCfg|InvokeCfg|ParallelCfg#
- copy(**kwargs)#
Return a new object replacing specified fields with new values.
This is especially useful for frozen classes. Example usage:
@configclass(frozen=True) class C: x: int y: int c = C(1, 2) c1 = c.replace(x=3) assert c1.x == 3 and c1.y == 2
- Parameters:
obj (
object) – The object to replace.**kwargs – The fields to replace and their new values.
- Return type:
object- Returns:
The new object.
-
count:
int#
-
kind:
str#
- replace(**kwargs)#
Return a new object replacing specified fields with new values.
This is especially useful for frozen classes. Example usage:
@configclass(frozen=True) class C: x: int y: int c = C(1, 2) c1 = c.replace(x=3) assert c1.x == 3 and c1.y == 2
- Parameters:
obj (
object) – The object to replace.**kwargs – The fields to replace and their new values.
- Return type:
object- Returns:
The new object.
- to_dict()#
Convert an object into dictionary recursively.
Note
Ignores all names starting with “__” (i.e. built-in methods).
- Parameters:
obj (
object) – An instance of a class to convert.- Raises:
ValueError – When input argument is not an object.
- Return type:
dict[str,Any]- Returns:
Converted dictionary mapping.
- validate(prefix='')#
Check the validity of configclass object.
This function checks if the object is a valid configclass object. A valid configclass object contains no MISSING entries.
- Parameters:
obj (
object) – The object to check.prefix (
str) – The prefix to add to the missing fields. Defaults to ‘’.
- Return type:
list[str]- Returns:
A list of missing fields.
- Raises:
TypeError – When the object is not a valid configuration object.
- class embodichain.lab.task_program.language.SegmentCfg[source]#
Logical transaction with optional segment-specific language instruction.
instructiondescribes this segment for dataset annotation. When omitted, Gym demonstrations fall back to the episode’s overall task instruction.Methods:
__init__([name, steps, post, validators, ...])copy(**kwargs)Return a new object replacing specified fields with new values.
replace(**kwargs)Return a new object replacing specified fields with new values.
to_dict()Convert an object into dictionary recursively.
validate([prefix])Check the validity of configclass object.
Attributes:
- __init__(name=<factory>, steps=<factory>, post=<factory>, validators=<factory>, kind=<factory>, instruction=<factory>)#
- copy(**kwargs)#
Return a new object replacing specified fields with new values.
This is especially useful for frozen classes. Example usage:
@configclass(frozen=True) class C: x: int y: int c = C(1, 2) c1 = c.replace(x=3) assert c1.x == 3 and c1.y == 2
- Parameters:
obj (
object) – The object to replace.**kwargs – The fields to replace and their new values.
- Return type:
object- Returns:
The new object.
-
instruction:
str|None#
-
kind:
str#
-
name:
str#
-
post:
tuple[WaitStablePostCfg,...]#
- replace(**kwargs)#
Return a new object replacing specified fields with new values.
This is especially useful for frozen classes. Example usage:
@configclass(frozen=True) class C: x: int y: int c = C(1, 2) c1 = c.replace(x=3) assert c1.x == 3 and c1.y == 2
- Parameters:
obj (
object) – The object to replace.**kwargs – The fields to replace and their new values.
- Return type:
object- Returns:
The new object.
-
steps:
SequenceCfg|RepeatCfg|SegmentCfg|InvokeCfg|ParallelCfg#
- to_dict()#
Convert an object into dictionary recursively.
Note
Ignores all names starting with “__” (i.e. built-in methods).
- Parameters:
obj (
object) – An instance of a class to convert.- Raises:
ValueError – When input argument is not an object.
- Return type:
dict[str,Any]- Returns:
Converted dictionary mapping.
- validate(prefix='')#
Check the validity of configclass object.
This function checks if the object is a valid configclass object. A valid configclass object contains no MISSING entries.
- Parameters:
obj (
object) – The object to check.prefix (
str) – The prefix to add to the missing fields. Defaults to ‘’.
- Return type:
list[str]- Returns:
A list of missing fields.
- Raises:
TypeError – When the object is not a valid configuration object.
- class embodichain.lab.task_program.language.SequenceCfg[source]#
Execute one non-empty ordered tuple of program nodes.
Methods:
__init__([items, kind])copy(**kwargs)Return a new object replacing specified fields with new values.
replace(**kwargs)Return a new object replacing specified fields with new values.
to_dict()Convert an object into dictionary recursively.
validate([prefix])Check the validity of configclass object.
Attributes:
- __init__(items=<factory>, kind=<factory>)#
- copy(**kwargs)#
Return a new object replacing specified fields with new values.
This is especially useful for frozen classes. Example usage:
@configclass(frozen=True) class C: x: int y: int c = C(1, 2) c1 = c.replace(x=3) assert c1.x == 3 and c1.y == 2
- Parameters:
obj (
object) – The object to replace.**kwargs – The fields to replace and their new values.
- Return type:
object- Returns:
The new object.
-
items:
tuple[SequenceCfg|RepeatCfg|SegmentCfg|InvokeCfg|ParallelCfg,...]#
-
kind:
str#
- replace(**kwargs)#
Return a new object replacing specified fields with new values.
This is especially useful for frozen classes. Example usage:
@configclass(frozen=True) class C: x: int y: int c = C(1, 2) c1 = c.replace(x=3) assert c1.x == 3 and c1.y == 2
- Parameters:
obj (
object) – The object to replace.**kwargs – The fields to replace and their new values.
- Return type:
object- Returns:
The new object.
- to_dict()#
Convert an object into dictionary recursively.
Note
Ignores all names starting with “__” (i.e. built-in methods).
- Parameters:
obj (
object) – An instance of a class to convert.- Raises:
ValueError – When input argument is not an object.
- Return type:
dict[str,Any]- Returns:
Converted dictionary mapping.
- validate(prefix='')#
Check the validity of configclass object.
This function checks if the object is a valid configclass object. A valid configclass object contains no MISSING entries.
- Parameters:
obj (
object) – The object to check.prefix (
str) – The prefix to add to the missing fields. Defaults to ‘’.
- Return type:
list[str]- Returns:
A list of missing fields.
- Raises:
TypeError – When the object is not a valid configuration object.
- class embodichain.lab.task_program.language.TargetRefCfg[source]#
Reference to one top-level typed target provider.
Methods:
__init__([target, kind])copy(**kwargs)Return a new object replacing specified fields with new values.
replace(**kwargs)Return a new object replacing specified fields with new values.
to_dict()Convert an object into dictionary recursively.
validate([prefix])Check the validity of configclass object.
Attributes:
- __init__(target=<factory>, kind=<factory>)#
- copy(**kwargs)#
Return a new object replacing specified fields with new values.
This is especially useful for frozen classes. Example usage:
@configclass(frozen=True) class C: x: int y: int c = C(1, 2) c1 = c.replace(x=3) assert c1.x == 3 and c1.y == 2
- Parameters:
obj (
object) – The object to replace.**kwargs – The fields to replace and their new values.
- Return type:
object- Returns:
The new object.
-
kind:
str#
- replace(**kwargs)#
Return a new object replacing specified fields with new values.
This is especially useful for frozen classes. Example usage:
@configclass(frozen=True) class C: x: int y: int c = C(1, 2) c1 = c.replace(x=3) assert c1.x == 3 and c1.y == 2
- Parameters:
obj (
object) – The object to replace.**kwargs – The fields to replace and their new values.
- Return type:
object- Returns:
The new object.
-
target:
str#
- to_dict()#
Convert an object into dictionary recursively.
Note
Ignores all names starting with “__” (i.e. built-in methods).
- Parameters:
obj (
object) – An instance of a class to convert.- Raises:
ValueError – When input argument is not an object.
- Return type:
dict[str,Any]- Returns:
Converted dictionary mapping.
- validate(prefix='')#
Check the validity of configclass object.
This function checks if the object is a valid configclass object. A valid configclass object contains no MISSING entries.
- Parameters:
obj (
object) – The object to check.prefix (
str) – The prefix to add to the missing fields. Defaults to ‘’.
- Return type:
list[str]- Returns:
A list of missing fields.
- Raises:
TypeError – When the object is not a valid configuration object.
- class embodichain.lab.task_program.language.TaskProgramCfg[source]#
Strict, executable-free Task Program configuration.
instructiondescribes the overall task independently of the selected embodiment and recorder. Segment instructions describe individual phases.Methods:
__init__([program_id, integration, program, ...])copy(**kwargs)Return a new object replacing specified fields with new values.
replace(**kwargs)Return a new object replacing specified fields with new values.
to_dict()Convert an object into dictionary recursively.
validate([prefix])Check the validity of configclass object.
Attributes:
- __init__(program_id=<factory>, integration=<factory>, program=<factory>, targets=<factory>, instruction=<factory>)#
- copy(**kwargs)#
Return a new object replacing specified fields with new values.
This is especially useful for frozen classes. Example usage:
@configclass(frozen=True) class C: x: int y: int c = C(1, 2) c1 = c.replace(x=3) assert c1.x == 3 and c1.y == 2
- Parameters:
obj (
object) – The object to replace.**kwargs – The fields to replace and their new values.
- Return type:
object- Returns:
The new object.
-
instruction:
str|None#
-
integration:
TaskProgramIntegrationCfg#
-
program:
SequenceCfg|RepeatCfg|SegmentCfg|InvokeCfg|ParallelCfg#
-
program_id:
str#
- replace(**kwargs)#
Return a new object replacing specified fields with new values.
This is especially useful for frozen classes. Example usage:
@configclass(frozen=True) class C: x: int y: int c = C(1, 2) c1 = c.replace(x=3) assert c1.x == 3 and c1.y == 2
- Parameters:
obj (
object) – The object to replace.**kwargs – The fields to replace and their new values.
- Return type:
object- Returns:
The new object.
-
targets:
dict[str,CyclicPoseTargetCfg]#
- to_dict()#
Convert an object into dictionary recursively.
Note
Ignores all names starting with “__” (i.e. built-in methods).
- Parameters:
obj (
object) – An instance of a class to convert.- Raises:
ValueError – When input argument is not an object.
- Return type:
dict[str,Any]- Returns:
Converted dictionary mapping.
- validate(prefix='')#
Check the validity of configclass object.
This function checks if the object is a valid configclass object. A valid configclass object contains no MISSING entries.
- Parameters:
obj (
object) – The object to check.prefix (
str) – The prefix to add to the missing fields. Defaults to ‘’.
- Return type:
list[str]- Returns:
A list of missing fields.
- Raises:
TypeError – When the object is not a valid configuration object.
- exception embodichain.lab.task_program.language.TaskProgramConfigError[source]#
Base pathful diagnostic for Task Program configuration failures.
Methods:
__init__(code, path, message)Create one stable pathful diagnostic.
- exception embodichain.lab.task_program.language.TaskProgramDecodeError[source]#
Raised when untrusted data does not match a supported strict schema.
- class embodichain.lab.task_program.language.TaskProgramIntegrationCfg[source]#
Static integration references selected by one Task Program.
Methods:
__init__([robot_profile, scene_registry, ...])copy(**kwargs)Return a new object replacing specified fields with new values.
replace(**kwargs)Return a new object replacing specified fields with new values.
to_dict()Convert an object into dictionary recursively.
validate([prefix])Check the validity of configclass object.
Attributes:
- __init__(robot_profile=<factory>, scene_registry=<factory>, runtime_preset=<factory>)#
- copy(**kwargs)#
Return a new object replacing specified fields with new values.
This is especially useful for frozen classes. Example usage:
@configclass(frozen=True) class C: x: int y: int c = C(1, 2) c1 = c.replace(x=3) assert c1.x == 3 and c1.y == 2
- Parameters:
obj (
object) – The object to replace.**kwargs – The fields to replace and their new values.
- Return type:
object- Returns:
The new object.
- replace(**kwargs)#
Return a new object replacing specified fields with new values.
This is especially useful for frozen classes. Example usage:
@configclass(frozen=True) class C: x: int y: int c = C(1, 2) c1 = c.replace(x=3) assert c1.x == 3 and c1.y == 2
- Parameters:
obj (
object) – The object to replace.**kwargs – The fields to replace and their new values.
- Return type:
object- Returns:
The new object.
-
robot_profile:
str#
-
runtime_preset:
str#
-
scene_registry:
str#
- to_dict()#
Convert an object into dictionary recursively.
Note
Ignores all names starting with “__” (i.e. built-in methods).
- Parameters:
obj (
object) – An instance of a class to convert.- Raises:
ValueError – When input argument is not an object.
- Return type:
dict[str,Any]- Returns:
Converted dictionary mapping.
- validate(prefix='')#
Check the validity of configclass object.
This function checks if the object is a valid configclass object. A valid configclass object contains no MISSING entries.
- Parameters:
obj (
object) – The object to check.prefix (
str) – The prefix to add to the missing fields. Defaults to ‘’.
- Return type:
list[str]- Returns:
A list of missing fields.
- Raises:
TypeError – When the object is not a valid configuration object.
- class embodichain.lab.task_program.language.TaskProgramValidationContext[source]#
Provider-free static validation boundary for external references.
Implementations may resolve profile, scene, preset, catalog, affordance, and resource IDs, but must not observe simulation state, construct planners, or execute calls.
Methods:
__init__(*args, **kwargs)validate_integration(integration, *, path)Validate integration references at
path.validate_post_policy(policy, *, path)Validate a post-policy kind and its named preset.
validate_scene_reference(reference, *, role, ...)Validate one canonical scene reference with its semantic role.
validate_semantic_call(call, *, path)Validate catalog identity, schema revision, and resource overrides.
validate_validator(validator, *, path)Validate one registered segment-validator contract.
- __init__(*args, **kwargs)#
- validate_integration(integration, *, path)[source]#
Validate integration references at
path.- Return type:
None
- validate_post_policy(policy, *, path)[source]#
Validate a post-policy kind and its named preset.
- Return type:
None
- validate_scene_reference(reference, *, role, path)[source]#
Validate one canonical scene reference with its semantic role.
- Return type:
None
- exception embodichain.lab.task_program.language.TaskProgramValidationError[source]#
Raised when an explicit static integration context rejects a reference.
- class embodichain.lab.task_program.language.WaitStablePostCfg[source]#
Wait for one registered entity to satisfy a named stability preset.
Methods:
__init__([entity, preset, kind])copy(**kwargs)Return a new object replacing specified fields with new values.
replace(**kwargs)Return a new object replacing specified fields with new values.
to_dict()Convert an object into dictionary recursively.
validate([prefix])Check the validity of configclass object.
Attributes:
- __init__(entity=<factory>, preset=<factory>, kind=<factory>)#
- copy(**kwargs)#
Return a new object replacing specified fields with new values.
This is especially useful for frozen classes. Example usage:
@configclass(frozen=True) class C: x: int y: int c = C(1, 2) c1 = c.replace(x=3) assert c1.x == 3 and c1.y == 2
- Parameters:
obj (
object) – The object to replace.**kwargs – The fields to replace and their new values.
- Return type:
object- Returns:
The new object.
-
entity:
str#
-
kind:
str#
-
preset:
str#
- replace(**kwargs)#
Return a new object replacing specified fields with new values.
This is especially useful for frozen classes. Example usage:
@configclass(frozen=True) class C: x: int y: int c = C(1, 2) c1 = c.replace(x=3) assert c1.x == 3 and c1.y == 2
- Parameters:
obj (
object) – The object to replace.**kwargs – The fields to replace and their new values.
- Return type:
object- Returns:
The new object.
- to_dict()#
Convert an object into dictionary recursively.
Note
Ignores all names starting with “__” (i.e. built-in methods).
- Parameters:
obj (
object) – An instance of a class to convert.- Raises:
ValueError – When input argument is not an object.
- Return type:
dict[str,Any]- Returns:
Converted dictionary mapping.
- validate(prefix='')#
Check the validity of configclass object.
This function checks if the object is a valid configclass object. A valid configclass object contains no MISSING entries.
- Parameters:
obj (
object) – The object to check.prefix (
str) – The prefix to add to the missing fields. Defaults to ‘’.
- Return type:
list[str]- Returns:
A list of missing fields.
- Raises:
TypeError – When the object is not a valid configuration object.
- embodichain.lab.task_program.language.decode_task_program(data, *, validation_context=None)[source]#
Decode untrusted JSON/YAML-shaped values into strict program config.
The schema contains sequential nodes plus deterministic parallel blocks with explicit barriers.
- Parameters:
data (
object) – Exact JSON-compatible mapping produced by a trusted parser.validation_context (
TaskProgramValidationContext|None) – Optional provider-free static reference validator.
- Return type:
- Returns:
Fully owned and internally validated Task Program configuration.
- Raises:
TaskProgramDecodeError – If data is unsafe or violates the schema.
TaskProgramValidationError – If an explicit context rejects a reference.
- embodichain.lab.task_program.language.load_task_program(path, *, base_dir=None, integration=None, validation_context=None)[source]#
Safely load and strictly decode one JSON or YAML Task Program file.
Relative paths are resolved from
base_dirwhen provided. Otherwise, they retain normalpathlib.Pathsemantics and therefore resolve from the process working directory when opened.- Parameters:
path (
str|PathLike[str]) – JSON, YAML, or YML file to load.base_dir (
str|PathLike[str] |None) – Optional directory used to resolve a relativepath.integration (
TaskProgramIntegrationCfg|None) – Optional trusted integration selection injected into an unbound program before strict decoding.validation_context (
TaskProgramValidationContext|None) – Optional provider-free static reference validator applied after decoding either serialized format.
- Return type:
- Returns:
An owned, validated Task Program configuration.
- Raises:
FileNotFoundError – If the resolved path is not a regular file.
ValueError – If the file is too large, has an unsupported extension, or contains ambiguous or invalid serialized data.
TaskProgramValidationError – If
validation_contextrejects an external reference.UnicodeDecodeError – If the file is not valid UTF-8.
- embodichain.lab.task_program.language.loads_task_program_json(text, *, integration=None, validation_context=None, max_bytes=4194304)[source]#
Strictly parse and decode one untrusted Task Program JSON document.
The input must be one plain JSON document. Markdown fences, trailing text, multiple documents, duplicate keys, non-finite numbers, and oversized input are rejected before the existing Task Program decoder is called.
- Parameters:
text (
str) – Untrusted JSON response text.integration (
TaskProgramIntegrationCfg|None) – Optional trusted integration selection injected before strict decoding. The source document must omitintegrationwhen this is provided.validation_context (
TaskProgramValidationContext|None) – Optional provider-free static reference validator.max_bytes (
int) – Maximum UTF-8 encoded response size.
- Return type:
- Returns:
Fully owned and internally validated Task Program configuration.
- Raises:
TypeError – If
textormax_byteshas the wrong exact type.ValueError – If
max_bytesis not positive.TaskProgramDecodeError – If parsing or strict decoding fails.
- embodichain.lab.task_program.language.parse_task_program_json(text, *, max_bytes=4194304)[source]#
Parse one bounded Task Program JSON object without decoding its schema.
This parse-only boundary lets a host-controlled frontend inspect or inject fields before calling
decode_task_program(). It rejects duplicate keys, non-finite numbers, trailing content, invalid Unicode, excessive nesting, oversized UTF-8 input, and non-object top-level values. It does not validate the Task Program schema.- Parameters:
text (
str) – Untrusted JSON document text.max_bytes (
int) – Maximum accepted UTF-8 encoded input size.
- Return type:
dict[str,object]- Returns:
Exact JSON object mapping ready for explicit schema decoding.
- Raises:
TypeError – If
textormax_byteshas the wrong exact type.ValueError – If
max_bytesis not positive.TaskProgramDecodeError – If strict JSON parsing fails.
- embodichain.lab.task_program.language.render_config_path(path)[source]#
Render one configuration path using JSONPath-like notation.
- Parameters:
path (
tuple[str|int,...]) – Tuple of mapping keys and sequence indices.- Return type:
str- Returns:
Stable human-readable path beginning at
$.
- embodichain.lab.task_program.language.validate_task_program(config, context)[source]#
Resolve external references without observing or executing an environment.
- Parameters:
config (
TaskProgramCfg) – Fully decoded and internally validated Task Program.context (
TaskProgramValidationContext) – Provider-free static integration/catalog/scene validator.
- Raises:
TypeError – If either argument has the wrong contract.
TaskProgramValidationError – If an external reference is unavailable.
- Return type:
None
Configuration paths and reference roles#
These exported values describe configuration paths and reference categories.
- embodichain.lab.task_program.language.ConfigPath(*args, **kwargs)#
Built-in immutable sequence.
If no argument is given, the constructor returns an empty tuple. If iterable is specified the tuple is initialized from iterable’s items.
If the argument is a tuple, the return value is the same object.
alias of
tuple[str|int, …]
- embodichain.lab.task_program.language.ConfigPathPart = str | int#
Represent a PEP 604 union type
E.g. for int | str
- embodichain.lab.task_program.language.SceneReferenceRole(*args, **kwargs)#
alias of
Literal[‘entity’, ‘object’, ‘articulation’, ‘affordance’, ‘object_or_affordance’]