embodichain.lab.task_program.language

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.

ArticulationJointPositionValidatorCfg

Validate one articulation joint against an inclusive position interval.

BarrierCfg

Explicit synchronization boundary owned by one parallel node.

ConfigPath

Built-in immutable sequence.

ConfigPathPart

Represent a PEP 604 union type

CyclicPoseTargetCfg

Finite pose values selected cyclically by the enclosing repeat index.

HandOverCfg

Declarative request to transfer one held object between resources.

InvokeCfg

Invoke exactly one semantic call at the current program boundary.

ObjectNearTargetValidatorCfg

Validate an object's position against one resolved target.

ParallelCfg

Execute two or more branches concurrently and join at one barrier.

PickCfg

Declarative request to acquire one registered object.

PlaceCfg

Declarative request to place one held object at one destination.

PoseCfg

One declarative Cartesian pose using a WXYZ quaternion.

RegisteredSemanticCallCfg

Safe declarative payload for one catalog-registered semantic call.

RepeatCfg

Repeat one child node a finite validated number of times.

SceneReferenceRole

alias of Literal['entity', 'object', 'articulation', 'affordance', 'object_or_affordance']

SegmentCfg

Logical program transaction with post-policies and validators.

SequenceCfg

Execute one non-empty ordered tuple of program nodes.

TargetRefCfg

Reference to one top-level typed target provider.

TaskProgramCfg

Strict, executable-free Task Program configuration.

TaskProgramConfigError

Base pathful diagnostic for Task Program configuration failures.

TaskProgramDecodeError

Raised when untrusted data does not match a supported strict schema.

TaskProgramIntegrationCfg

Static integration references selected by one Task Program.

TaskProgramValidationContext

Provider-free static validation boundary for external references.

TaskProgramValidationError

Raised when an explicit static integration context rejects a reference.

WaitStablePostCfg

Wait for one registered entity to satisfy a named stability preset.

decode_task_program(data, *[, ...])

Decode untrusted JSON/YAML-shaped values into strict program config.

load_task_program(path, *[, base_dir, ...])

Safely load and strictly decode one JSON or YAML Task Program file.

loads_task_program_json(text, *[, ...])

Strictly parse and decode one untrusted Task Program JSON document.

parse_task_program_json(text, *[, max_bytes])

Parse one bounded Task Program JSON object without decoding its schema.

render_config_path(path)

Render one configuration path using JSONPath-like notation.

validate_task_program(config, context)

Resolve external references without observing or executing an environment.

Classes:

ArticulationJointPositionValidatorCfg

Validate one articulation joint against an inclusive position interval.

BarrierCfg

Explicit synchronization boundary owned by one parallel node.

CyclicPoseTargetCfg

Finite pose values selected cyclically by the enclosing repeat index.

HandOverCfg

Declarative request to transfer one held object between resources.

InvokeCfg

Invoke exactly one semantic call at the current program boundary.

ObjectNearTargetValidatorCfg

Validate an object's position against one resolved target.

ParallelCfg

Execute two or more branches concurrently and join at one barrier.

PickCfg

Declarative request to acquire one registered object.

PlaceCfg

Declarative request to place one held object at one destination.

PoseCfg

One declarative Cartesian pose using a WXYZ quaternion.

RegisteredSemanticCallCfg

Safe declarative payload for one catalog-registered semantic call.

RepeatCfg

Repeat one child node a finite validated number of times.

SegmentCfg

Logical program transaction with post-policies and validators.

SequenceCfg

Execute one non-empty ordered tuple of program nodes.

TargetRefCfg

Reference to one top-level typed target provider.

TaskProgramCfg

Strict, executable-free Task Program configuration.

TaskProgramIntegrationCfg

Static integration references selected by one Task Program.

TaskProgramValidationContext

Provider-free static validation boundary for external references.

WaitStablePostCfg

Wait for one registered entity to satisfy a named stability preset.

Exceptions:

TaskProgramConfigError

Base pathful diagnostic for Task Program configuration failures.

TaskProgramDecodeError

Raised when untrusted data does not match a supported strict schema.

TaskProgramValidationError

Raised when an explicit static integration context rejects a reference.

Functions:

decode_task_program(data, *[, ...])

Decode untrusted JSON/YAML-shaped values into strict program config.

load_task_program(path, *[, base_dir, ...])

Safely load and strictly decode one JSON or YAML Task Program file.

loads_task_program_json(text, *[, ...])

Strictly parse and decode one untrusted Task Program JSON document.

parse_task_program_json(text, *[, max_bytes])

Parse one bounded Task Program JSON object without decoding its schema.

render_config_path(path)

Render one configuration path using JSONPath-like notation.

validate_task_program(config, context)

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.

__init__(articulation=<factory>, joint=<factory>, minimum_position=<factory>, maximum_position=<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.

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.

__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.

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.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.

__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.

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.

__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
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.

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.

__init__(call=<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.

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.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.

__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
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.

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.

__init__(branches=<factory>, barrier=<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.

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.

__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
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.

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.

__init__(object=<factory>, at=<factory>, on=<factory>, inside=<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
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.

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 a WXYZ quaternion.

Methods:

__init__([position, quaternion_wxyz])

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.

__init__(position=<factory>, quaternion_wxyz=<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.

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.

__init__(call_id=<factory>, arguments=<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
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.

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.

__init__(count=<factory>, body=<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.

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 program transaction with post-policies and validators.

Methods:

__init__([name, steps, post, validators, 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.

__init__(name=<factory>, steps=<factory>, post=<factory>, validators=<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.

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.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.

__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.

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.

__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.

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.TaskProgramCfg[source]

Strict, executable-free Task Program configuration.

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.

__init__(program_id=<factory>, integration=<factory>, program=<factory>, targets=<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.

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.

__init__(code, path, message)[source]

Create one stable pathful diagnostic.

Parameters:
  • code (str) – Machine-readable failure code.

  • path (tuple[str | int, ...]) – Exact configuration location.

  • message (str) – Human-readable explanation.

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.

__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.

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

validate_semantic_call(call, *, path)[source]

Validate catalog identity, schema revision, and resource overrides.

Return type:

None

validate_validator(validator, *, path)[source]

Validate one registered segment-validator contract.

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.

__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.

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:

TaskProgramCfg

Returns:

Fully owned and internally validated Task Program configuration.

Raises:
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_dir when provided. Otherwise, they retain normal pathlib.Path semantics 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 relative path.

  • 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:

TaskProgramCfg

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_context rejects 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 omit integration when this is provided.

  • validation_context (TaskProgramValidationContext | None) – Optional provider-free static reference validator.

  • max_bytes (int) – Maximum UTF-8 encoded response size.

Return type:

TaskProgramCfg

Returns:

Fully owned and internally validated Task Program configuration.

Raises:
  • TypeError – If text or max_bytes has the wrong exact type.

  • ValueError – If max_bytes is 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 text or max_bytes has the wrong exact type.

  • ValueError – If max_bytes is 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:
Raises:
  • TypeError – If either argument has the wrong contract.

  • TaskProgramValidationError – If an external reference is unavailable.

Return type:

None