Skip to content

a2ui-agent-sdk 0.9.0

Choose a tag to compare

@github-actions github-actions released this 17 Oct 00:12
· 171 commits to main since this release
c68db10
  • BREAKING: Package dependency updated to require a2ui-core>=0.4.0,<0.5.0.
  • resolve_catalogs, validate_payload, and the Direct JSON and Express
    formats resolve cross-catalog $refs between the catalogs they are given.
    resolve_catalogs also resolves references into registered catalogs that
    the renderer doesn't support and into the unpruned catalogs that
    transformers start from. It links per-request copies, so the registered
    catalogs are never modified, and an inline catalog is only linked when the
    agent accepts it.
  • BREAKING: Remove the a2ui.schema package.
    • The constants move to a2ui.constants. For example,
      from a2ui.schema import A2UI_OPEN_TAG becomes
      from a2ui.constants import A2UI_OPEN_TAG.
    • load_examples, resolve_examples_path, load_agent_to_renderer_schema
      and load_common_types_schema move to a2ui.utils.
    • find_repo_root, get_spec_dir, get_basic_catalog_path,
      get_basic_examples_dir, wrap_as_json_array and deep_update are
      removed. The path helpers only worked in a repository checkout.
    • The VERSION_0_8, VERSION_0_9, VERSION_0_9_1 and VERSION_1_0
      constants are removed. Use the ProtocolVersion members from
      a2ui.core.schema instead, such as ProtocolVersion.V0_9. Their values
      carry a leading "v" ("v0.9"); a2ui.utils.to_version_number returns the
      bare form ("0.9") for paths and URIs.
    • The SPECIFICATION_DIR constant is removed.
  • resolve_catalogs and A2uiGenerator.create_processor read v0.8
    capabilities in the shape the v0.8 specification defines, the entry itself
    ({"supportedCatalogIds": [...]}), as well as keyed by "v0.8". From v0.9
    the capabilities must be keyed by protocol version.
  • BREAKING: Move a2ui.inference_formats.experimental.express to
    a2ui.inference_formats.express.
  • ExpressCompiler: a variable holding a function call that names its
    catalogId (total = formatString("...", catalogId="...")) is inlined
    wherever it is used, like any other variable holding a function call.
    Previously it was compiled as a component and failed with "Unknown component".
  • BREAKING: The agent SDK no longer depends on an agent framework. a2ui.a2a
    moves to the new a2ui-a2a package and a2ui.adk to the new a2ui-adk
    package, and a2a-sdk, google-adk, google-genai and nest-asyncio are no
    longer dependencies. Import paths are unchanged. To migrate, install the
    packages you use: pip install a2ui-a2a and pip install "a2ui-adk[a2a]".
  • BREAKING: FileResolver no longer creates google.genai parts.
    to_genai_part and resolve_all_to_genai_parts move to
    a2ui.adk.GenAIFileResolver. FileResolver.resolve_all resolves a list of
    file pointers, and resolve_all and as_tool_decorator take a convert
    callback (bytes, mime_type) -> Any. Without one they return
    (bytes, mime_type) tuples, and as_tool_decorator injects them into
    resolved_files instead of genai_parts. To keep the old behavior, use
    GenAIFileResolver from a2ui-adk.
  • The experimental Elemental and Atom formats warn through an A2UI decorator
    instead of ADK's. Set A2UI_SUPPRESS_EXPERIMENTAL_FEATURE_WARNINGS
    instead of ADK_SUPPRESS_EXPERIMENTAL_FEATURE_WARNINGS to silence the
    warnings.
  • DirectJsonParser.parse_chunk raises A2uiValidationError on the chunk that
    closes an invalid v1.0 component. Previously the error was swallowed until the
    block ended, and every component after it was held back.
  • BREAKING: DirectJsonStreamParser, DirectJsonStreamParserModern,
    DirectJsonStreamParserV08Legacy and DirectJsonFormat.create_stream_parser
    are removed (#3074). To migrate, call parse_chunk on the parser that
    DirectJsonFormat.create_parser() returns. It streams v0.8, v0.9 and v1.0,
    and behaves differently from the removed parsers:
    • It adds no placeholder components. A parent is emitted with the child ids
      it names before those children arrive.
    • A message that is still arriving is emitted whole each time it changes,
      rather than pruned to the parts that parse.
    • A block whose messages never become valid, for example with an orphan or a
      cycle, raises when it closes instead of dropping the bad parts.
    • Paths are emitted as written. The v0.8 parser added a leading slash.
  • DirectJsonParser.parse_chunk emits a createSurface or beginRendering
    once, after its object closes, instead of again each time it grows. A string
    that starts with http://, https:// or data: is never healed, even under
    a progressive key, since a cut URL is a broken one.
  • InferenceFormat.supports_streaming tells whether a format's parser
    implements parse_chunk. DirectJsonFormat returns True.
  • validate_payload accepts a payload that creates a surface whose
    components name children that a later message in the payload adds, and a
    v0.8 payload that deletes a surface and starts it over.
  • BREAKING: Implement A2uiGenerator, A2uiRequestProcessor, CatalogConfig,
    CatalogProvider (FileSystemCatalogProvider, InMemoryCatalogProvider),
    InferenceFormatFactory (DirectJsonFormatFactory, ExpressFormatFactory,
    ElementalFormatFactory, AtomFormatFactory), PromptGenerator, and unified
    Parser (ResponsePart, TextPart, A2uiPart, RawResponsePart,
    RawA2uiPart) per a2ui_agent.blueprint.md. InferenceFormat.parser is
    replaced by InferenceFormat.create_parser(), CatalogConfig moves from
    a2ui.schema to a2ui.processor with
    CatalogConfig(catalog, transformers=None) and transformed_catalog, and
    A2uiCatalogProvider is replaced by CatalogProvider.
  • ComponentPruningTransformer and FunctionPruningTransformer keep a
    catalog's metadata and authored document, so a pruned catalog loaded from a
    file serializes with to_json() as that file minus the pruned entries, with
    the unions rebuilt. The macro expander builds the expanded catalog from
    to_json(), keeping common type references and metadata (#3053).
  • DirectJsonPromptGenerator (schema_to_prompt) embeds each active catalog's
    Catalog.to_json() document alongside the pruned common_types schema,
    avoiding duplicate inlined common type definitions across multiple catalogs.
  • The SDK reads Catalog.validation_schema instead of the deprecated
    catalog_schema (#3053).
  • A generated skill no longer falls back to the catalog's description when
    none is given, since catalogs loaded with Catalog.from_json now carry the
    file's description (#3053).

Published to PyPI: a2ui-agent-sdk 0.9.0

pip install a2ui-agent-sdk==0.9.0