build_tools.syllable_walk_web.services.packager =============================================== .. py:module:: build_tools.syllable_walk_web.services.packager .. autoapi-nested-parse:: Package builder service for the web application. Bundles walk results, candidates, and selections from both patches into a downloadable ZIP archive with a manifest. Also writes a companion ``_metadata.json`` file to disk next to the ZIP for provenance tracking (matching the TUI packager behaviour). Functions --------- .. autoapisummary:: build_tools.syllable_walk_web.services.packager.build_package Module Contents --------------- .. py:function:: build_package(state, *, name = 'corpus-package', version = '0.1.0', include_walks_a = True, include_walks_b = True, include_candidates = True, include_selections = True) Build a ZIP archive from in-memory walker state. Also writes the ZIP and a companion metadata JSON file to disk under ``/packages/``. :param state: Global server state with patch data. :param name: Package name (used in the ZIP filename). :param version: Package version string. :param include_walks_a: Include Patch A walks. :param include_walks_b: Include Patch B walks. :param include_candidates: Include candidates from both patches. :param include_selections: Include selections from both patches. :returns: Tuple of (zip_bytes, error_message_or_none).