workflows.services.context_catalogΒΆ

Helpers to build a flattened catalog of context keys for the UI.

Module ContentsΒΆ

workflows.services.context_catalog.MAX_SAMPLE_LEN = 160[source]ΒΆ
workflows.services.context_catalog.MAX_ITEMS = 500[source]ΒΆ
workflows.services.context_catalog.build_catalog(ctx)[source]ΒΆ

Build catalog rows (key/label/sample) for use in the UI.

Parameters:

ctx (dict[str, Any]) – The workflow context dictionary (ctx) as produced by build_context.

Returns:

A structure containing usage information and a list of variable descriptors under the "vars" key. Each descriptor has "key", "label", and "sample" fields.

Return type:

dict[str, Any]