Skip to main content

Module run_package

Module run_package 

Source

ConstantsΒ§

RBNX_INVOCATION_CWD πŸ”’
Directory against which relative -p is resolved: the pwd of the command invocation. When cargo run runs from robonix/rust, the process cwd is not the user’s shell cwd β€” wrappers should export RBNX_INVOCATION_CWD="$(pwd)" before cd+cargo run. If unset, std::env::current_dir() is used.

FunctionsΒ§

build_deploy_manifest πŸ”’
Build every package referenced by a top-level robonix_manifest.yaml. Two phases:
build_start_config_json πŸ”’
Materialize a per-instance config from --config <file> plus repeatable --set k.v=val overrides. Returns the merged JSON string. When neither input was provided, returns an empty JSON object so rbnx start still performs the provider lifecycle initialization.
drive_standalone_lifecycle πŸ”’
Wait for exactly one new provider, verify that it declares the driver contract from this package manifest, then drive INIT and (except for skills) ACTIVATE. Contract verification is mandatory before any config is sent, so a provider exposing a different lifecycle cannot receive this package’s configuration. Concurrent starts of two instances with the same driver contract still require a future registration token for full identity correlation.
execute_build
execute_start
find_package_from_cwd πŸ”’
Walk up from the invocation cwd looking for a directory that contains a package_manifest.yaml. Returns the first match.
generated_pythonpath_export πŸ”’
Build the package-local Python import path without touching a colcon workspace. A real rbnx-build/ws/install/setup.bash, when present, is sourced first; this export then prepends generated stubs while preserving every Python path contributed by that overlay and the parent environment.
lifecycle_driver_migration_warning πŸ”’
Return the migration warning emitted by rbnx start for a non-shared Driver declaration. Runtime registration later proves whether it is the provider’s exact namespace legacy contract before accepting it.
merge_dotted πŸ”’
Set obj[a][b][c] = v for a dotted key like "a.b.c". Creates intermediate objects as needed; bails on a non-object collision.
normalize_atlas_endpoint πŸ”’
path_base_for_dash_p πŸ”’
resolve_local_path_for_filesystem πŸ”’
Resolve -p to a filesystem path before canonicalize: relative paths and . use path_base_for_dash_p as the prefix (invocation pwd, or process cwd).
resolve_package_path πŸ”’
Resolve package path from -p (local path) or -g (system-installed name). When neither is given, walk up from cwd to find a package manifest.
resolve_package_path_for_start πŸ”’
Resolve package path for start: same -p rules as build, then system-installed name fallback.
shell_escape πŸ”’
POSIX-shell single-quoted escape, used when we synthesise export FOO=... fragments to inject into a package’s start body.
should_activate_standalone_provider πŸ”’
should_drive_standalone_init πŸ”’