robonix_api.codegen¶
Locate codegen output for the calling package.
Every robonix package gets a single canonical codegen directory:
- <pkg>/rbnx-build/codegen/
proto_gen/ # gRPC stubs (atlas_pb2, robonix_contracts_pb2_grpc, …) robonix_mcp_types/ # MCP typed-input dataclasses (when –mcp was passed)
rbnx codegen -p <pkg> writes there and Capability(…) reads from there. Developers don’t have to plumb either path anywhere — these helpers walk up from the caller and add the right dirs to sys.path, idempotently.
Functions
|
Walk up from start looking for rbnx-build/codegen/. |
|
Walk up looking for package_manifest.yaml. |
- robonix_api.codegen.ensure_proto_gen(start: Path | None = None) Path | None[source]¶
Walk up from start looking for rbnx-build/codegen/. Adds proto_gen and (if present) robonix_mcp_types to sys.path. Returns the codegen dir, or None. Kept under the historical name so existing callers keep working — does the fuller “ensure_codegen” job now.