List of functions in the ude.orchestrator namespace.

Entity NameDescription
find_global_configWalks the directory tree upwards to locate ude_global_config.json or ude_global.json.
find_product_jsonAscends the directory tree starting from start_dir to find ude_sdk_config.json or product.json.
deep_mergeRecursively merges dict2 into dict1, with dict2 taking priority on conflicts.
load_sidebar_tomlLoads and parses the mandatory sidebar.toml from doc_dir.
_reject_forbidden_sidebar_keys[IMP-32.10] _load_sidebar_toml_graceful() was removed here on 2026-08-02.
_resolve_output_dirResolves output directory, supporting base/subdir layout or overrides.
resolve_configLoad, merge (global→sdk→doc), and return (merged_config, config_dir, sidebar_config).
mainPrimary execution entry point when run as a script.

Generated with Flude

Copyright © 2026

Directory & Entity Index

Entity NameSummary / Description
_reject_forbidden_sidebar_keys function

[IMP-32.10] _load_sidebar_toml_graceful() was removed here on 2026-08-02.

It was the sole consumer of the project-tier sidebar.toml and returned {} for a missing file with no log line, so a project that omitted the file built cleanly on silently wrong navigation while load_sidebar_toml() above — plus every docstring and a passing unit test — described the file as mandatory. resolve_config() now calls the strict loader, which makes keeping a second, laxer loader actively harmful: it would be dead code that still looks like a supported path.

_resolve_output_dir function

Resolves output directory, supporting base/subdir layout or overrides.

Returns:

The resolved, absolute output directory path.

Methods

_resolve_output_dir

_resolve_output_dir(config: dict, config_dir: Path, global_config_path: Optional, output_override: Optional) -> Path

Resolves output directory, supporting base/subdir layout or overrides.

Returns:

The resolved, absolute output directory path.

ParameterTypeDescription
configdictThe merged target config dict.
config_dirPathDirectory containing the target’s doc config file.
global_config_pathOptionalExplicit global config path, if one was supplied.
output_overrideOptionalExplicit output directory override, if one was supplied.

Generated with Flude

deep_merge function

Recursively merges dict2 into dict1, with dict2 taking priority on conflicts.

Returns:

A new merged dict; nested dict values are merged recursively, all

Methods

deep_merge

deep_merge(dict1: dict, dict2: dict) -> dict

Recursively merges dict2 into dict1, with dict2 taking priority on conflicts.

Returns:

A new merged dict; nested dict values are merged recursively, all

ParameterTypeDescription
dict1dictThe base mapping (lower priority).
dict2dictThe overriding mapping (higher priority).

Generated with Flude

find_global_config function

Walks the directory tree upwards to locate ude_global_config.json or ude_global.json.

Returns:

Path to the global configuration if found, otherwise None.

Methods

find_global_config

find_global_config(start_dir: Path) -> Optional[Path]

Walks the directory tree upwards to locate ude_global_config.json or ude_global.json.

Returns:

Path to the global configuration if found, otherwise None.

ParameterTypeDescription
start_dirPathDirectory to start the search from.

Generated with Flude

Copyright © 2026

find_product_json function

Ascends the directory tree starting from start_dir to find ude_sdk_config.json or product.json.

Returns:

The Path to product configuration if found, otherwise None.

Methods

find_product_json

find_product_json(start_dir: Path) -> Optional[Path]

Ascends the directory tree starting from start_dir to find ude_sdk_config.json or product.json.

Returns:

The Path to product configuration if found, otherwise None.

ParameterTypeDescription
start_dirPathDirectory to start searching from.

Generated with Flude

Copyright © 2026

load_sidebar_toml function

Loads and parses the mandatory sidebar.toml from doc_dir.

Raises: UdeException: If sidebar.toml is absent, unreadable, malformed, or tomllib is unavailable.

Returns:

Parsed TOML content as a dict.

Methods

load_sidebar_toml

load_sidebar_toml(doc_dir: Path) -> dict

Loads and parses the mandatory sidebar.toml from doc_dir.

Raises: UdeException: If sidebar.toml is absent, unreadable, malformed, or tomllib is unavailable.

Returns:

Parsed TOML content as a dict.

ParameterTypeDescription
doc_dirPathDirectory that must contain sidebar.toml.

Generated with Flude

main function

Primary execution entry point when run as a script.

Returns:

Exit code: 4 if no config paths were given, 0 on success, 1 on failure.

Methods

main

main() -> int

Primary execution entry point when run as a script.

Returns:

Exit code: 4 if no config paths were given, 0 on success, 1 on failure.

Generated with Flude

Copyright © 2026

resolve_config function

Load, merge (global→sdk→doc), and return (merged_config, config_dir, sidebar_config).

[groups] and [[sidebar]] are deliberately NOT part of this JSON cascade: they are sourced exclusively from the document’s own sidebar.toml, with no default and no merge across tiers. Any groups/sidebar key found in the global, SDK, or doc JSON config is a hard error (see _reject_forbidden_sidebar_keys()).

Implements GAP-05 (TASK-B.1.2)

Raises: UdeException: If config file cannot be read, or a groups/sidebar key is found in a JSON config layer.