From 7a8e495ee6b8f162dce5c3124b007d2d60f6cdd6 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Sat, 18 Apr 2026 00:30:14 +0000 Subject: [PATCH 01/56] feat(api): api update --- .stats.yml | 4 ++-- src/hyperspell/resources/memories.py | 8 ++++++++ src/hyperspell/types/memory_update_params.py | 8 +++++++- tests/api_resources/test_memories.py | 2 ++ 4 files changed, 19 insertions(+), 3 deletions(-) diff --git a/.stats.yml b/.stats.yml index 60ac02f6..73fab0a4 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 30 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/hyperspell%2Fhyperspell-6d6dbb68dd9021348431b28e08378d086b3eaf5e65b3dfa03125b1fdec417fa6.yml -openapi_spec_hash: 6ad2b84ac07c482fe838929694e49015 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/hyperspell%2Fhyperspell-864ec17bc07aef2b5985bc5e876c8a99a26c8f53cd0cee693deafbe752b6b7e1.yml +openapi_spec_hash: f1d9dbac709b8de23a5243f7ccaa984f config_hash: bd8505e17db740d82e578d0edaa9bfe0 diff --git a/src/hyperspell/resources/memories.py b/src/hyperspell/resources/memories.py index d731f93a..6f750b38 100644 --- a/src/hyperspell/resources/memories.py +++ b/src/hyperspell/resources/memories.py @@ -80,6 +80,7 @@ def update( "gmail_actions", ], collection: Union[str, object, None] | Omit = omit, + date: Union[Union[str, datetime], object, None] | Omit = omit, metadata: Union[Dict[str, Union[str, float, bool, None]], object, None] | Omit = omit, text: Union[str, object, None] | Omit = omit, title: Union[str, object, None] | Omit = omit, @@ -102,6 +103,8 @@ def update( collection: The collection to move the document to — deprecated, set the collection using metadata instead. + date: Date of the document for ranking and filtering. + metadata: Custom metadata for filtering. Keys must be alphanumeric with underscores, max 64 chars. Values must be string, number, boolean, or null. Will be merged with existing metadata. @@ -127,6 +130,7 @@ def update( body=maybe_transform( { "collection": collection, + "date": date, "metadata": metadata, "text": text, "title": title, @@ -647,6 +651,7 @@ async def update( "gmail_actions", ], collection: Union[str, object, None] | Omit = omit, + date: Union[Union[str, datetime], object, None] | Omit = omit, metadata: Union[Dict[str, Union[str, float, bool, None]], object, None] | Omit = omit, text: Union[str, object, None] | Omit = omit, title: Union[str, object, None] | Omit = omit, @@ -669,6 +674,8 @@ async def update( collection: The collection to move the document to — deprecated, set the collection using metadata instead. + date: Date of the document for ranking and filtering. + metadata: Custom metadata for filtering. Keys must be alphanumeric with underscores, max 64 chars. Values must be string, number, boolean, or null. Will be merged with existing metadata. @@ -694,6 +701,7 @@ async def update( body=await async_maybe_transform( { "collection": collection, + "date": date, "metadata": metadata, "text": text, "title": title, diff --git a/src/hyperspell/types/memory_update_params.py b/src/hyperspell/types/memory_update_params.py index d8859d62..c7a19384 100644 --- a/src/hyperspell/types/memory_update_params.py +++ b/src/hyperspell/types/memory_update_params.py @@ -3,7 +3,10 @@ from __future__ import annotations from typing import Dict, Union -from typing_extensions import Literal, Required, TypedDict +from datetime import datetime +from typing_extensions import Literal, Required, Annotated, TypedDict + +from .._utils import PropertyInfo __all__ = ["MemoryUpdateParams"] @@ -34,6 +37,9 @@ class MemoryUpdateParams(TypedDict, total=False): metadata instead. """ + date: Annotated[Union[Union[str, datetime], object, None], PropertyInfo(format="iso8601")] + """Date of the document for ranking and filtering.""" + metadata: Union[Dict[str, Union[str, float, bool, None]], object, None] """Custom metadata for filtering. diff --git a/tests/api_resources/test_memories.py b/tests/api_resources/test_memories.py index 2a983b3f..b16232f1 100644 --- a/tests/api_resources/test_memories.py +++ b/tests/api_resources/test_memories.py @@ -40,6 +40,7 @@ def test_method_update_with_all_params(self, client: Hyperspell) -> None: resource_id="resource_id", source="reddit", collection="string", + date=parse_datetime("2019-12-27T18:11:19.117Z"), metadata={"foo": "string"}, text="string", title="string", @@ -449,6 +450,7 @@ async def test_method_update_with_all_params(self, async_client: AsyncHyperspell resource_id="resource_id", source="reddit", collection="string", + date=parse_datetime("2019-12-27T18:11:19.117Z"), metadata={"foo": "string"}, text="string", title="string", From c28640c64d25fd5dde07836e60e970069b0b65fe Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Sat, 18 Apr 2026 08:14:18 +0000 Subject: [PATCH 02/56] perf(client): optimize file structure copying in multipart requests --- src/hyperspell/_files.py | 56 +++++++++++++++- src/hyperspell/_utils/__init__.py | 1 - src/hyperspell/_utils/_utils.py | 15 ----- src/hyperspell/resources/memories.py | 13 ++-- tests/test_deepcopy.py | 58 ---------------- tests/test_files.py | 99 +++++++++++++++++++++++++++- 6 files changed, 159 insertions(+), 83 deletions(-) delete mode 100644 tests/test_deepcopy.py diff --git a/src/hyperspell/_files.py b/src/hyperspell/_files.py index 155adfec..34fa5459 100644 --- a/src/hyperspell/_files.py +++ b/src/hyperspell/_files.py @@ -3,8 +3,8 @@ import io import os import pathlib -from typing import overload -from typing_extensions import TypeGuard +from typing import Sequence, cast, overload +from typing_extensions import TypeVar, TypeGuard import anyio @@ -17,7 +17,9 @@ HttpxFileContent, HttpxRequestFiles, ) -from ._utils import is_tuple_t, is_mapping_t, is_sequence_t +from ._utils import is_list, is_mapping, is_tuple_t, is_mapping_t, is_sequence_t + +_T = TypeVar("_T") def is_base64_file_input(obj: object) -> TypeGuard[Base64FileInput]: @@ -121,3 +123,51 @@ async def async_read_file_content(file: FileContent) -> HttpxFileContent: return await anyio.Path(file).read_bytes() return file + + +def deepcopy_with_paths(item: _T, paths: Sequence[Sequence[str]]) -> _T: + """Copy only the containers along the given paths. + + Used to guard against mutation by extract_files without copying the entire structure. + Only dicts and lists that lie on a path are copied; everything else + is returned by reference. + + For example, given paths=[["foo", "files", "file"]] and the structure: + { + "foo": { + "bar": {"baz": {}}, + "files": {"file": } + } + } + The root dict, "foo", and "files" are copied (they lie on the path). + "bar" and "baz" are returned by reference (off the path). + """ + return _deepcopy_with_paths(item, paths, 0) + + +def _deepcopy_with_paths(item: _T, paths: Sequence[Sequence[str]], index: int) -> _T: + if not paths: + return item + if is_mapping(item): + key_to_paths: dict[str, list[Sequence[str]]] = {} + for path in paths: + if index < len(path): + key_to_paths.setdefault(path[index], []).append(path) + + # if no path continues through this mapping, it won't be mutated and copying it is redundant + if not key_to_paths: + return item + + result = dict(item) + for key, subpaths in key_to_paths.items(): + if key in result: + result[key] = _deepcopy_with_paths(result[key], subpaths, index + 1) + return cast(_T, result) + if is_list(item): + array_paths = [path for path in paths if index < len(path) and path[index] == ""] + + # if no path expects a list here, nothing will be mutated inside it - return by reference + if not array_paths: + return cast(_T, item) + return cast(_T, [_deepcopy_with_paths(entry, array_paths, index + 1) for entry in item]) + return item diff --git a/src/hyperspell/_utils/__init__.py b/src/hyperspell/_utils/__init__.py index 10cb66d2..1c090e51 100644 --- a/src/hyperspell/_utils/__init__.py +++ b/src/hyperspell/_utils/__init__.py @@ -24,7 +24,6 @@ coerce_integer as coerce_integer, file_from_path as file_from_path, strip_not_given as strip_not_given, - deepcopy_minimal as deepcopy_minimal, get_async_library as get_async_library, maybe_coerce_float as maybe_coerce_float, get_required_header as get_required_header, diff --git a/src/hyperspell/_utils/_utils.py b/src/hyperspell/_utils/_utils.py index 63b8cd60..771859f5 100644 --- a/src/hyperspell/_utils/_utils.py +++ b/src/hyperspell/_utils/_utils.py @@ -177,21 +177,6 @@ def is_iterable(obj: object) -> TypeGuard[Iterable[object]]: return isinstance(obj, Iterable) -def deepcopy_minimal(item: _T) -> _T: - """Minimal reimplementation of copy.deepcopy() that will only copy certain object types: - - - mappings, e.g. `dict` - - list - - This is done for performance reasons. - """ - if is_mapping(item): - return cast(_T, {k: deepcopy_minimal(v) for k, v in item.items()}) - if is_list(item): - return cast(_T, [deepcopy_minimal(entry) for entry in item]) - return item - - # copied from https://github.com/Rapptz/RoboDanny def human_join(seq: Sequence[str], *, delim: str = ", ", final: str = "or") -> str: size = len(seq) diff --git a/src/hyperspell/resources/memories.py b/src/hyperspell/resources/memories.py index 6f750b38..03a2875d 100644 --- a/src/hyperspell/resources/memories.py +++ b/src/hyperspell/resources/memories.py @@ -16,8 +16,9 @@ memory_upload_params, memory_add_bulk_params, ) +from .._files import deepcopy_with_paths from .._types import Body, Omit, Query, Headers, NotGiven, FileTypes, omit, not_given -from .._utils import extract_files, path_template, maybe_transform, deepcopy_minimal, async_maybe_transform +from .._utils import extract_files, path_template, maybe_transform, async_maybe_transform from .._compat import cached_property from .._resource import SyncAPIResource, AsyncAPIResource from .._response import ( @@ -587,12 +588,13 @@ def upload( timeout: Override the client-level default timeout for this request, in seconds """ - body = deepcopy_minimal( + body = deepcopy_with_paths( { "file": file, "collection": collection, "metadata": metadata, - } + }, + [["file"]], ) files = extract_files(cast(Mapping[str, object], body), paths=[["file"]]) # It should be noted that the actual Content-Type header that will be @@ -1158,12 +1160,13 @@ async def upload( timeout: Override the client-level default timeout for this request, in seconds """ - body = deepcopy_minimal( + body = deepcopy_with_paths( { "file": file, "collection": collection, "metadata": metadata, - } + }, + [["file"]], ) files = extract_files(cast(Mapping[str, object], body), paths=[["file"]]) # It should be noted that the actual Content-Type header that will be diff --git a/tests/test_deepcopy.py b/tests/test_deepcopy.py deleted file mode 100644 index 93ca9c04..00000000 --- a/tests/test_deepcopy.py +++ /dev/null @@ -1,58 +0,0 @@ -from hyperspell._utils import deepcopy_minimal - - -def assert_different_identities(obj1: object, obj2: object) -> None: - assert obj1 == obj2 - assert id(obj1) != id(obj2) - - -def test_simple_dict() -> None: - obj1 = {"foo": "bar"} - obj2 = deepcopy_minimal(obj1) - assert_different_identities(obj1, obj2) - - -def test_nested_dict() -> None: - obj1 = {"foo": {"bar": True}} - obj2 = deepcopy_minimal(obj1) - assert_different_identities(obj1, obj2) - assert_different_identities(obj1["foo"], obj2["foo"]) - - -def test_complex_nested_dict() -> None: - obj1 = {"foo": {"bar": [{"hello": "world"}]}} - obj2 = deepcopy_minimal(obj1) - assert_different_identities(obj1, obj2) - assert_different_identities(obj1["foo"], obj2["foo"]) - assert_different_identities(obj1["foo"]["bar"], obj2["foo"]["bar"]) - assert_different_identities(obj1["foo"]["bar"][0], obj2["foo"]["bar"][0]) - - -def test_simple_list() -> None: - obj1 = ["a", "b", "c"] - obj2 = deepcopy_minimal(obj1) - assert_different_identities(obj1, obj2) - - -def test_nested_list() -> None: - obj1 = ["a", [1, 2, 3]] - obj2 = deepcopy_minimal(obj1) - assert_different_identities(obj1, obj2) - assert_different_identities(obj1[1], obj2[1]) - - -class MyObject: ... - - -def test_ignores_other_types() -> None: - # custom classes - my_obj = MyObject() - obj1 = {"foo": my_obj} - obj2 = deepcopy_minimal(obj1) - assert_different_identities(obj1, obj2) - assert obj1["foo"] is my_obj - - # tuples - obj3 = ("a", "b") - obj4 = deepcopy_minimal(obj3) - assert obj3 is obj4 diff --git a/tests/test_files.py b/tests/test_files.py index aae00cb3..e51c3d06 100644 --- a/tests/test_files.py +++ b/tests/test_files.py @@ -4,7 +4,8 @@ import pytest from dirty_equals import IsDict, IsList, IsBytes, IsTuple -from hyperspell._files import to_httpx_files, async_to_httpx_files +from hyperspell._files import to_httpx_files, deepcopy_with_paths, async_to_httpx_files +from hyperspell._utils import extract_files readme_path = Path(__file__).parent.parent.joinpath("README.md") @@ -49,3 +50,99 @@ def test_string_not_allowed() -> None: "file": "foo", # type: ignore } ) + + +def assert_different_identities(obj1: object, obj2: object) -> None: + assert obj1 == obj2 + assert obj1 is not obj2 + + +class TestDeepcopyWithPaths: + def test_copies_top_level_dict(self) -> None: + original = {"file": b"data", "other": "value"} + result = deepcopy_with_paths(original, [["file"]]) + assert_different_identities(result, original) + + def test_file_value_is_same_reference(self) -> None: + file_bytes = b"contents" + original = {"file": file_bytes} + result = deepcopy_with_paths(original, [["file"]]) + assert_different_identities(result, original) + assert result["file"] is file_bytes + + def test_list_popped_wholesale(self) -> None: + files = [b"f1", b"f2"] + original = {"files": files, "title": "t"} + result = deepcopy_with_paths(original, [["files", ""]]) + assert_different_identities(result, original) + result_files = result["files"] + assert isinstance(result_files, list) + assert_different_identities(result_files, files) + + def test_nested_array_path_copies_list_and_elements(self) -> None: + elem1 = {"file": b"f1", "extra": 1} + elem2 = {"file": b"f2", "extra": 2} + original = {"items": [elem1, elem2]} + result = deepcopy_with_paths(original, [["items", "", "file"]]) + assert_different_identities(result, original) + result_items = result["items"] + assert isinstance(result_items, list) + assert_different_identities(result_items, original["items"]) + assert_different_identities(result_items[0], elem1) + assert_different_identities(result_items[1], elem2) + + def test_empty_paths_returns_same_object(self) -> None: + original = {"foo": "bar"} + result = deepcopy_with_paths(original, []) + assert result is original + + def test_multiple_paths(self) -> None: + f1 = b"file1" + f2 = b"file2" + original = {"a": f1, "b": f2, "c": "unchanged"} + result = deepcopy_with_paths(original, [["a"], ["b"]]) + assert_different_identities(result, original) + assert result["a"] is f1 + assert result["b"] is f2 + assert result["c"] is original["c"] + + def test_extract_files_does_not_mutate_original_top_level(self) -> None: + file_bytes = b"contents" + original = {"file": file_bytes, "other": "value"} + + copied = deepcopy_with_paths(original, [["file"]]) + extracted = extract_files(copied, paths=[["file"]]) + + assert extracted == [("file", file_bytes)] + assert original == {"file": file_bytes, "other": "value"} + assert copied == {"other": "value"} + + def test_extract_files_does_not_mutate_original_nested_array_path(self) -> None: + file1 = b"f1" + file2 = b"f2" + original = { + "items": [ + {"file": file1, "extra": 1}, + {"file": file2, "extra": 2}, + ], + "title": "example", + } + + copied = deepcopy_with_paths(original, [["items", "", "file"]]) + extracted = extract_files(copied, paths=[["items", "", "file"]]) + + assert extracted == [("items[][file]", file1), ("items[][file]", file2)] + assert original == { + "items": [ + {"file": file1, "extra": 1}, + {"file": file2, "extra": 2}, + ], + "title": "example", + } + assert copied == { + "items": [ + {"extra": 1}, + {"extra": 2}, + ], + "title": "example", + } From 7d67d91802b13e3110af4e1ab313cc36ed66ca74 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Sat, 18 Apr 2026 08:15:49 +0000 Subject: [PATCH 03/56] chore(tests): bump steady to v0.22.1 --- scripts/mock | 6 +++--- scripts/test | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/scripts/mock b/scripts/mock index 5cd7c157..feebe5ed 100755 --- a/scripts/mock +++ b/scripts/mock @@ -22,9 +22,9 @@ echo "==> Starting mock server with URL ${URL}" # Run steady mock on the given spec if [ "$1" == "--daemon" ]; then # Pre-install the package so the download doesn't eat into the startup timeout - npm exec --package=@stdy/cli@0.20.2 -- steady --version + npm exec --package=@stdy/cli@0.22.1 -- steady --version - npm exec --package=@stdy/cli@0.20.2 -- steady --host 127.0.0.1 -p 4010 --validator-query-array-format=comma --validator-form-array-format=comma --validator-query-object-format=brackets --validator-form-object-format=brackets "$URL" &> .stdy.log & + npm exec --package=@stdy/cli@0.22.1 -- steady --host 127.0.0.1 -p 4010 --validator-query-array-format=comma --validator-form-array-format=comma --validator-query-object-format=brackets --validator-form-object-format=brackets "$URL" &> .stdy.log & # Wait for server to come online via health endpoint (max 30s) echo -n "Waiting for server" @@ -48,5 +48,5 @@ if [ "$1" == "--daemon" ]; then echo else - npm exec --package=@stdy/cli@0.20.2 -- steady --host 127.0.0.1 -p 4010 --validator-query-array-format=comma --validator-form-array-format=comma --validator-query-object-format=brackets --validator-form-object-format=brackets "$URL" + npm exec --package=@stdy/cli@0.22.1 -- steady --host 127.0.0.1 -p 4010 --validator-query-array-format=comma --validator-form-array-format=comma --validator-query-object-format=brackets --validator-form-object-format=brackets "$URL" fi diff --git a/scripts/test b/scripts/test index b754adab..a47c5b42 100755 --- a/scripts/test +++ b/scripts/test @@ -43,7 +43,7 @@ elif ! steady_is_running ; then echo -e "To run the server, pass in the path or url of your OpenAPI" echo -e "spec to the steady command:" echo - echo -e " \$ ${YELLOW}npm exec --package=@stdy/cli@0.20.2 -- steady path/to/your.openapi.yml --host 127.0.0.1 -p 4010 --validator-query-array-format=comma --validator-form-array-format=comma --validator-query-object-format=brackets --validator-form-object-format=brackets${NC}" + echo -e " \$ ${YELLOW}npm exec --package=@stdy/cli@0.22.1 -- steady path/to/your.openapi.yml --host 127.0.0.1 -p 4010 --validator-query-array-format=comma --validator-form-array-format=comma --validator-query-object-format=brackets --validator-form-object-format=brackets${NC}" echo exit 1 From f50d5a32152fd0a33ad5634bc72e03a6332bc293 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 22 Apr 2026 18:30:28 +0000 Subject: [PATCH 04/56] codegen metadata --- .stats.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index 73fab0a4..19377f47 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 30 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/hyperspell%2Fhyperspell-864ec17bc07aef2b5985bc5e876c8a99a26c8f53cd0cee693deafbe752b6b7e1.yml -openapi_spec_hash: f1d9dbac709b8de23a5243f7ccaa984f +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/hyperspell%2Fhyperspell-a4bf4f3aaf1509541db646bc9ff7ec58e78cb4d42cf6bf83881b02739ad77b87.yml +openapi_spec_hash: 89cd02b2290061877e6badcddb7c8eb8 config_hash: bd8505e17db740d82e578d0edaa9bfe0 From 384db7ac2a8a40d8d4e72aaebf7a5c67d2a15ac2 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 22 Apr 2026 19:20:35 +0000 Subject: [PATCH 05/56] codegen metadata --- .stats.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.stats.yml b/.stats.yml index 19377f47..b925885d 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 30 openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/hyperspell%2Fhyperspell-a4bf4f3aaf1509541db646bc9ff7ec58e78cb4d42cf6bf83881b02739ad77b87.yml openapi_spec_hash: 89cd02b2290061877e6badcddb7c8eb8 -config_hash: bd8505e17db740d82e578d0edaa9bfe0 +config_hash: 2ac853a71ed8b421da86d06bd90cf23f From 3c63a3bb5093eb0cc3fe44ac30979ab006c95bb0 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 22 Apr 2026 19:26:40 +0000 Subject: [PATCH 06/56] codegen metadata --- .stats.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.stats.yml b/.stats.yml index b925885d..390cd289 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 30 openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/hyperspell%2Fhyperspell-a4bf4f3aaf1509541db646bc9ff7ec58e78cb4d42cf6bf83881b02739ad77b87.yml openapi_spec_hash: 89cd02b2290061877e6badcddb7c8eb8 -config_hash: 2ac853a71ed8b421da86d06bd90cf23f +config_hash: f779e7db9263cd21efe5e9469bc1d012 From 23c9221674f7d4d4d563b3e8d80d55c0b884114a Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 22 Apr 2026 19:38:43 +0000 Subject: [PATCH 07/56] feat(api): manual updates --- .stats.yml | 2 +- README.md | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.stats.yml b/.stats.yml index 390cd289..08bee8b2 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 30 openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/hyperspell%2Fhyperspell-a4bf4f3aaf1509541db646bc9ff7ec58e78cb4d42cf6bf83881b02739ad77b87.yml openapi_spec_hash: 89cd02b2290061877e6badcddb7c8eb8 -config_hash: f779e7db9263cd21efe5e9469bc1d012 +config_hash: 597eba5e5eaec83a5f0db3d946af8db5 diff --git a/README.md b/README.md index 4b0ec922..da027aea 100644 --- a/README.md +++ b/README.md @@ -13,8 +13,8 @@ It is generated with [Stainless](https://www.stainless.com/). Use the Hyperspell MCP Server to enable AI assistants to interact with this API, allowing them to explore endpoints, make test requests, and use documentation to help integrate this SDK into your application. -[![Add to Cursor](https://cursor.com/deeplink/mcp-install-dark.svg)](https://cursor.com/en-US/install-mcp?name=hyperspell-mcp&config=eyJuYW1lIjoiaHlwZXJzcGVsbC1tY3AiLCJ0cmFuc3BvcnQiOiJodHRwIiwidXJsIjoiaHR0cHM6Ly9oeXBlcnNwZWxsLnN0bG1jcC5jb20iLCJoZWFkZXJzIjp7IngtaHlwZXJzcGVsbC1hcGkta2V5IjoiTXkgQVBJIEtleSIsIlgtQXMtVXNlciI6Ik15IFVzZXIgSUQifX0) -[![Install in VS Code](https://img.shields.io/badge/_-Add_to_VS_Code-blue?style=for-the-badge&logo=data:image/svg%2bxml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGZpbGw9Im5vbmUiIHZpZXdCb3g9IjAgMCA0MCA0MCI+PHBhdGggZmlsbD0iI0VFRSIgZmlsbC1ydWxlPSJldmVub2RkIiBkPSJNMzAuMjM1IDM5Ljg4NGEyLjQ5MSAyLjQ5MSAwIDAgMS0xLjc4MS0uNzNMMTIuNyAyNC43OGwtMy40NiAyLjYyNC0zLjQwNiAyLjU4MmExLjY2NSAxLjY2NSAwIDAgMS0xLjA4Mi4zMzggMS42NjQgMS42NjQgMCAwIDEtMS4wNDYtLjQzMWwtMi4yLTJhMS42NjYgMS42NjYgMCAwIDEgMC0yLjQ2M0w3LjQ1OCAyMCA0LjY3IDE3LjQ1MyAxLjUwNyAxNC41N2ExLjY2NSAxLjY2NSAwIDAgMSAwLTIuNDYzbDIuMi0yYTEuNjY1IDEuNjY1IDAgMCAxIDIuMTMtLjA5N2w2Ljg2MyA1LjIwOUwyOC40NTIuODQ0YTIuNDg4IDIuNDg4IDAgMCAxIDEuODQxLS43MjljLjM1MS4wMDkuNjk5LjA5MSAxLjAxOS4yNDVsOC4yMzYgMy45NjFhMi41IDIuNSAwIDAgMSAxLjQxNSAyLjI1M3YuMDk5LS4wNDVWMzMuMzd2LS4wNDUuMDk1YTIuNTAxIDIuNTAxIDAgMCAxLTEuNDE2IDIuMjU3bC04LjIzNSAzLjk2MWEyLjQ5MiAyLjQ5MiAwIDAgMS0xLjA3Ny4yNDZabS43MTYtMjguOTQ3LTExLjk0OCA5LjA2MiAxMS45NTIgOS4wNjUtLjAwNC0xOC4xMjdaIi8+PC9zdmc+)](https://vscode.stainless.com/mcp/%7B%22name%22%3A%22hyperspell-mcp%22%2C%22type%22%3A%22http%22%2C%22url%22%3A%22https%3A%2F%2Fhyperspell.stlmcp.com%22%2C%22headers%22%3A%7B%22x-hyperspell-api-key%22%3A%22My%20API%20Key%22%2C%22X-As-User%22%3A%22My%20User%20ID%22%7D%7D) +[![Add to Cursor](https://cursor.com/deeplink/mcp-install-dark.svg)](https://cursor.com/en-US/install-mcp?name=%40hyperspell%2Fhyperspell-mcp&config=eyJuYW1lIjoiQGh5cGVyc3BlbGwvaHlwZXJzcGVsbC1tY3AiLCJ0cmFuc3BvcnQiOiJodHRwIiwidXJsIjoiaHR0cHM6Ly9oeXBlcnNwZWxsLnN0bG1jcC5jb20iLCJoZWFkZXJzIjp7IngtaHlwZXJzcGVsbC1hcGkta2V5IjoiTXkgQVBJIEtleSIsIlgtQXMtVXNlciI6Ik15IFVzZXIgSUQifX0) +[![Install in VS Code](https://img.shields.io/badge/_-Add_to_VS_Code-blue?style=for-the-badge&logo=data:image/svg%2bxml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGZpbGw9Im5vbmUiIHZpZXdCb3g9IjAgMCA0MCA0MCI+PHBhdGggZmlsbD0iI0VFRSIgZmlsbC1ydWxlPSJldmVub2RkIiBkPSJNMzAuMjM1IDM5Ljg4NGEyLjQ5MSAyLjQ5MSAwIDAgMS0xLjc4MS0uNzNMMTIuNyAyNC43OGwtMy40NiAyLjYyNC0zLjQwNiAyLjU4MmExLjY2NSAxLjY2NSAwIDAgMS0xLjA4Mi4zMzggMS42NjQgMS42NjQgMCAwIDEtMS4wNDYtLjQzMWwtMi4yLTJhMS42NjYgMS42NjYgMCAwIDEgMC0yLjQ2M0w3LjQ1OCAyMCA0LjY3IDE3LjQ1MyAxLjUwNyAxNC41N2ExLjY2NSAxLjY2NSAwIDAgMSAwLTIuNDYzbDIuMi0yYTEuNjY1IDEuNjY1IDAgMCAxIDIuMTMtLjA5N2w2Ljg2MyA1LjIwOUwyOC40NTIuODQ0YTIuNDg4IDIuNDg4IDAgMCAxIDEuODQxLS43MjljLjM1MS4wMDkuNjk5LjA5MSAxLjAxOS4yNDVsOC4yMzYgMy45NjFhMi41IDIuNSAwIDAgMSAxLjQxNSAyLjI1M3YuMDk5LS4wNDVWMzMuMzd2LS4wNDUuMDk1YTIuNTAxIDIuNTAxIDAgMCAxLTEuNDE2IDIuMjU3bC04LjIzNSAzLjk2MWEyLjQ5MiAyLjQ5MiAwIDAgMS0xLjA3Ny4yNDZabS43MTYtMjguOTQ3LTExLjk0OCA5LjA2MiAxMS45NTIgOS4wNjUtLjAwNC0xOC4xMjdaIi8+PC9zdmc+)](https://vscode.stainless.com/mcp/%7B%22name%22%3A%22%40hyperspell%2Fhyperspell-mcp%22%2C%22type%22%3A%22http%22%2C%22url%22%3A%22https%3A%2F%2Fhyperspell.stlmcp.com%22%2C%22headers%22%3A%7B%22x-hyperspell-api-key%22%3A%22My%20API%20Key%22%2C%22X-As-User%22%3A%22My%20User%20ID%22%7D%7D) > Note: You may need to set environment variables in your MCP client. From e5611df610fefaf3ed0cf98f7f53cb8aded5c8a6 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 22 Apr 2026 19:51:59 +0000 Subject: [PATCH 08/56] codegen metadata --- .stats.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.stats.yml b/.stats.yml index 08bee8b2..dba5310a 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 30 openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/hyperspell%2Fhyperspell-a4bf4f3aaf1509541db646bc9ff7ec58e78cb4d42cf6bf83881b02739ad77b87.yml openapi_spec_hash: 89cd02b2290061877e6badcddb7c8eb8 -config_hash: 597eba5e5eaec83a5f0db3d946af8db5 +config_hash: 09bb5ca4418f316f95d2b75ef7399cf0 From 9be7d849f4c646fd81ef78f7efe908ebd734de8d Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 22 Apr 2026 23:12:19 +0000 Subject: [PATCH 09/56] codegen metadata --- .stats.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.stats.yml b/.stats.yml index dba5310a..08bee8b2 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 30 openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/hyperspell%2Fhyperspell-a4bf4f3aaf1509541db646bc9ff7ec58e78cb4d42cf6bf83881b02739ad77b87.yml openapi_spec_hash: 89cd02b2290061877e6badcddb7c8eb8 -config_hash: 09bb5ca4418f316f95d2b75ef7399cf0 +config_hash: 597eba5e5eaec83a5f0db3d946af8db5 From d4a39dc3c6f710bf9b9c481197043eeb4a9f8ac9 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Thu, 23 Apr 2026 04:05:58 +0000 Subject: [PATCH 10/56] chore(internal): more robust bootstrap script --- scripts/bootstrap | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/bootstrap b/scripts/bootstrap index 4638ec69..5a23841b 100755 --- a/scripts/bootstrap +++ b/scripts/bootstrap @@ -4,7 +4,7 @@ set -e cd "$(dirname "$0")/.." -if [ -f "Brewfile" ] && [ "$(uname -s)" = "Darwin" ] && [ "$SKIP_BREW" != "1" ] && [ -t 0 ]; then +if [ -f "Brewfile" ] && [ "$(uname -s)" = "Darwin" ] && [ "${SKIP_BREW:-}" != "1" ] && [ -t 0 ]; then brew bundle check >/dev/null 2>&1 || { echo -n "==> Install Homebrew dependencies? (y/N): " read -r response From 0fbce5916bb7f0aab207d8a4a36a43f77316c4e6 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Thu, 23 Apr 2026 22:30:22 +0000 Subject: [PATCH 11/56] codegen metadata --- .stats.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index 08bee8b2..37d5f103 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 30 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/hyperspell%2Fhyperspell-a4bf4f3aaf1509541db646bc9ff7ec58e78cb4d42cf6bf83881b02739ad77b87.yml -openapi_spec_hash: 89cd02b2290061877e6badcddb7c8eb8 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/hyperspell%2Fhyperspell-a3b85873a872b138491163f359f262878d19b98e5ded51fb2ba5c2cc6dae8f5c.yml +openapi_spec_hash: 2914ac795845af1b80926da07bc5727f config_hash: 597eba5e5eaec83a5f0db3d946af8db5 From e7807c91fe07a6a738c82c764d66ea3cbcce03cd Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Fri, 24 Apr 2026 18:30:25 +0000 Subject: [PATCH 12/56] codegen metadata --- .stats.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index 37d5f103..5adbadba 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 30 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/hyperspell%2Fhyperspell-a3b85873a872b138491163f359f262878d19b98e5ded51fb2ba5c2cc6dae8f5c.yml -openapi_spec_hash: 2914ac795845af1b80926da07bc5727f +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/hyperspell%2Fhyperspell-69d534d74b0030f4226e05ad99a1c636cf271b664d60c4dac2daedbe59e7be0d.yml +openapi_spec_hash: e3e75812a20b93e40f599c9b865927c4 config_hash: 597eba5e5eaec83a5f0db3d946af8db5 From fcc771b7b0e0dc27bf466e3e643b97e385e7554e Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Sat, 25 Apr 2026 03:30:37 +0000 Subject: [PATCH 13/56] codegen metadata --- .stats.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index 5adbadba..51c308d8 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 30 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/hyperspell%2Fhyperspell-69d534d74b0030f4226e05ad99a1c636cf271b664d60c4dac2daedbe59e7be0d.yml -openapi_spec_hash: e3e75812a20b93e40f599c9b865927c4 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/hyperspell%2Fhyperspell-0b9bf804b7e67e6743eae14b04310e7efddb54d67f7d9c02e11acccd83169255.yml +openapi_spec_hash: 0feb465dcd08ad061bf0a0ce10c9df9f config_hash: 597eba5e5eaec83a5f0db3d946af8db5 From a56dcf8b31a493d99c3fea56d7f19d7893e2dbc0 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Sat, 25 Apr 2026 18:30:37 +0000 Subject: [PATCH 14/56] codegen metadata --- .stats.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index 51c308d8..61d253d9 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 30 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/hyperspell%2Fhyperspell-0b9bf804b7e67e6743eae14b04310e7efddb54d67f7d9c02e11acccd83169255.yml -openapi_spec_hash: 0feb465dcd08ad061bf0a0ce10c9df9f +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/hyperspell%2Fhyperspell-8689d273264324bb97b5d765b0b6811c655e3d25ac4f9a65f36bf8966dcf48e0.yml +openapi_spec_hash: edb49a26f338bafcc4b339c5f6618450 config_hash: 597eba5e5eaec83a5f0db3d946af8db5 From 41e71f23ad24f0f368a27ac73b9f9a873ce33c57 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Sat, 25 Apr 2026 20:30:38 +0000 Subject: [PATCH 15/56] codegen metadata --- .stats.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index 61d253d9..38acd593 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 30 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/hyperspell%2Fhyperspell-8689d273264324bb97b5d765b0b6811c655e3d25ac4f9a65f36bf8966dcf48e0.yml -openapi_spec_hash: edb49a26f338bafcc4b339c5f6618450 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/hyperspell%2Fhyperspell-b79d6d7c41fc55e5392e94c9c3a5251b638615f5324fb9b939e9dfd829dd1da1.yml +openapi_spec_hash: 6666715c859f216551868dcf8e602dee config_hash: 597eba5e5eaec83a5f0db3d946af8db5 From 92fd43a735c10a678fb2e9b3f052c43607b6fb8a Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Sun, 26 Apr 2026 02:30:54 +0000 Subject: [PATCH 16/56] feat(api): api update --- .stats.yml | 4 ++-- src/hyperspell/types/memory_search_params.py | 9 +++++++++ tests/api_resources/test_memories.py | 2 ++ 3 files changed, 13 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index 38acd593..2d998a96 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 30 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/hyperspell%2Fhyperspell-b79d6d7c41fc55e5392e94c9c3a5251b638615f5324fb9b939e9dfd829dd1da1.yml -openapi_spec_hash: 6666715c859f216551868dcf8e602dee +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/hyperspell%2Fhyperspell-7fa6cf3d29bd35dc57fbcd164d5d059790535463f31a354a32f2628e480443d7.yml +openapi_spec_hash: a541dd122cc17cd49c5ddf64699d24c5 config_hash: 597eba5e5eaec83a5f0db3d946af8db5 diff --git a/src/hyperspell/types/memory_search_params.py b/src/hyperspell/types/memory_search_params.py index 5719262c..81819341 100644 --- a/src/hyperspell/types/memory_search_params.py +++ b/src/hyperspell/types/memory_search_params.py @@ -275,6 +275,15 @@ class Options(TypedDict, total=False): notion: OptionsNotion """Search options for Notion""" + recency_half_life_days: Optional[float] + """ + When set, multiplies each result's score by an exponential-decay factor based on + the document's most recent activity timestamp (source-reported last_modified, + falling back to document_date). A document one half-life old gets its score + halved. Resources with no recency timestamp are passed through unchanged. Leave + unset to disable. + """ + reddit: OptionsReddit """Search options for Reddit""" diff --git a/tests/api_resources/test_memories.py b/tests/api_resources/test_memories.py index b16232f1..4d801436 100644 --- a/tests/api_resources/test_memories.py +++ b/tests/api_resources/test_memories.py @@ -315,6 +315,7 @@ def test_method_search_with_all_params(self, client: Hyperspell) -> None: "notion_page_ids": ["string"], "weight": 0, }, + "recency_half_life_days": 1, "reddit": { "period": "hour", "sort": "relevance", @@ -725,6 +726,7 @@ async def test_method_search_with_all_params(self, async_client: AsyncHyperspell "notion_page_ids": ["string"], "weight": 0, }, + "recency_half_life_days": 1, "reddit": { "period": "hour", "sort": "relevance", From dd446e0c34543e07160f08e2d11bb317bed4f889 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Mon, 27 Apr 2026 00:30:37 +0000 Subject: [PATCH 17/56] codegen metadata --- .stats.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index 2d998a96..3433ed72 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 30 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/hyperspell%2Fhyperspell-7fa6cf3d29bd35dc57fbcd164d5d059790535463f31a354a32f2628e480443d7.yml -openapi_spec_hash: a541dd122cc17cd49c5ddf64699d24c5 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/hyperspell%2Fhyperspell-a9b9447c6a65c54385fe3ae40350172c7539ece91f5cf982cd474a4afd86e050.yml +openapi_spec_hash: 1a2ca5653244b4e205d3df51991b4238 config_hash: 597eba5e5eaec83a5f0db3d946af8db5 From 0f569cccc70ea96a2da668846b62bf65af449561 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 28 Apr 2026 04:17:12 +0000 Subject: [PATCH 18/56] fix: use correct field name format for multipart file arrays --- src/hyperspell/_qs.py | 8 ++----- src/hyperspell/_types.py | 3 +++ src/hyperspell/_utils/_utils.py | 42 ++++++++++++++++++++++++++------- tests/test_extract_files.py | 28 ++++++++++++++++++---- tests/test_files.py | 2 +- 5 files changed, 63 insertions(+), 20 deletions(-) diff --git a/src/hyperspell/_qs.py b/src/hyperspell/_qs.py index de8c99bc..4127c19c 100644 --- a/src/hyperspell/_qs.py +++ b/src/hyperspell/_qs.py @@ -2,17 +2,13 @@ from typing import Any, List, Tuple, Union, Mapping, TypeVar from urllib.parse import parse_qs, urlencode -from typing_extensions import Literal, get_args +from typing_extensions import get_args -from ._types import NotGiven, not_given +from ._types import NotGiven, ArrayFormat, NestedFormat, not_given from ._utils import flatten _T = TypeVar("_T") - -ArrayFormat = Literal["comma", "repeat", "indices", "brackets"] -NestedFormat = Literal["dots", "brackets"] - PrimitiveData = Union[str, int, float, bool, None] # this should be Data = Union[PrimitiveData, "List[Data]", "Tuple[Data]", "Mapping[str, Data]"] # https://github.com/microsoft/pyright/issues/3555 diff --git a/src/hyperspell/_types.py b/src/hyperspell/_types.py index c331e84c..a0a7f696 100644 --- a/src/hyperspell/_types.py +++ b/src/hyperspell/_types.py @@ -47,6 +47,9 @@ ModelT = TypeVar("ModelT", bound=pydantic.BaseModel) _T = TypeVar("_T") +ArrayFormat = Literal["comma", "repeat", "indices", "brackets"] +NestedFormat = Literal["dots", "brackets"] + # Approximates httpx internal ProxiesTypes and RequestFiles types # while adding support for `PathLike` instances diff --git a/src/hyperspell/_utils/_utils.py b/src/hyperspell/_utils/_utils.py index 771859f5..199cd231 100644 --- a/src/hyperspell/_utils/_utils.py +++ b/src/hyperspell/_utils/_utils.py @@ -17,11 +17,11 @@ ) from pathlib import Path from datetime import date, datetime -from typing_extensions import TypeGuard +from typing_extensions import TypeGuard, get_args import sniffio -from .._types import Omit, NotGiven, FileTypes, HeadersLike +from .._types import Omit, NotGiven, FileTypes, ArrayFormat, HeadersLike _T = TypeVar("_T") _TupleT = TypeVar("_TupleT", bound=Tuple[object, ...]) @@ -40,25 +40,45 @@ def extract_files( query: Mapping[str, object], *, paths: Sequence[Sequence[str]], + array_format: ArrayFormat = "brackets", ) -> list[tuple[str, FileTypes]]: """Recursively extract files from the given dictionary based on specified paths. A path may look like this ['foo', 'files', '', 'data']. + ``array_format`` controls how ```` segments contribute to the emitted + field name. Supported values: ``"brackets"`` (``foo[]``), ``"repeat"`` and + ``"comma"`` (``foo``), ``"indices"`` (``foo[0]``, ``foo[1]``). + Note: this mutates the given dictionary. """ files: list[tuple[str, FileTypes]] = [] for path in paths: - files.extend(_extract_items(query, path, index=0, flattened_key=None)) + files.extend(_extract_items(query, path, index=0, flattened_key=None, array_format=array_format)) return files +def _array_suffix(array_format: ArrayFormat, array_index: int) -> str: + if array_format == "brackets": + return "[]" + if array_format == "indices": + return f"[{array_index}]" + if array_format == "repeat" or array_format == "comma": + # Both repeat the bare field name for each file part; there is no + # meaningful way to comma-join binary parts. + return "" + raise NotImplementedError( + f"Unknown array_format value: {array_format}, choose from {', '.join(get_args(ArrayFormat))}" + ) + + def _extract_items( obj: object, path: Sequence[str], *, index: int, flattened_key: str | None, + array_format: ArrayFormat, ) -> list[tuple[str, FileTypes]]: try: key = path[index] @@ -75,9 +95,11 @@ def _extract_items( if is_list(obj): files: list[tuple[str, FileTypes]] = [] - for entry in obj: - assert_is_file_content(entry, key=flattened_key + "[]" if flattened_key else "") - files.append((flattened_key + "[]", cast(FileTypes, entry))) + for array_index, entry in enumerate(obj): + suffix = _array_suffix(array_format, array_index) + emitted_key = (flattened_key + suffix) if flattened_key else suffix + assert_is_file_content(entry, key=emitted_key) + files.append((emitted_key, cast(FileTypes, entry))) return files assert_is_file_content(obj, key=flattened_key) @@ -106,6 +128,7 @@ def _extract_items( path, index=index, flattened_key=flattened_key, + array_format=array_format, ) elif is_list(obj): if key != "": @@ -117,9 +140,12 @@ def _extract_items( item, path, index=index, - flattened_key=flattened_key + "[]" if flattened_key is not None else "[]", + flattened_key=( + (flattened_key if flattened_key is not None else "") + _array_suffix(array_format, array_index) + ), + array_format=array_format, ) - for item in obj + for array_index, item in enumerate(obj) ] ) diff --git a/tests/test_extract_files.py b/tests/test_extract_files.py index da9fb3d5..e17802c5 100644 --- a/tests/test_extract_files.py +++ b/tests/test_extract_files.py @@ -4,7 +4,7 @@ import pytest -from hyperspell._types import FileTypes +from hyperspell._types import FileTypes, ArrayFormat from hyperspell._utils import extract_files @@ -37,10 +37,7 @@ def test_multiple_files() -> None: def test_top_level_file_array() -> None: query = {"files": [b"file one", b"file two"], "title": "hello"} - assert extract_files(query, paths=[["files", ""]]) == [ - ("files[]", b"file one"), - ("files[]", b"file two"), - ] + assert extract_files(query, paths=[["files", ""]]) == [("files[]", b"file one"), ("files[]", b"file two")] assert query == {"title": "hello"} @@ -71,3 +68,24 @@ def test_ignores_incorrect_paths( expected: list[tuple[str, FileTypes]], ) -> None: assert extract_files(query, paths=paths) == expected + + +@pytest.mark.parametrize( + "array_format,expected_top_level,expected_nested", + [ + ("brackets", [("files[]", b"a"), ("files[]", b"b")], [("items[][file]", b"a"), ("items[][file]", b"b")]), + ("repeat", [("files", b"a"), ("files", b"b")], [("items[file]", b"a"), ("items[file]", b"b")]), + ("comma", [("files", b"a"), ("files", b"b")], [("items[file]", b"a"), ("items[file]", b"b")]), + ("indices", [("files[0]", b"a"), ("files[1]", b"b")], [("items[0][file]", b"a"), ("items[1][file]", b"b")]), + ], +) +def test_array_format_controls_file_field_names( + array_format: ArrayFormat, + expected_top_level: list[tuple[str, FileTypes]], + expected_nested: list[tuple[str, FileTypes]], +) -> None: + top_level = {"files": [b"a", b"b"]} + assert extract_files(top_level, paths=[["files", ""]], array_format=array_format) == expected_top_level + + nested = {"items": [{"file": b"a"}, {"file": b"b"}]} + assert extract_files(nested, paths=[["items", "", "file"]], array_format=array_format) == expected_nested diff --git a/tests/test_files.py b/tests/test_files.py index e51c3d06..aded237c 100644 --- a/tests/test_files.py +++ b/tests/test_files.py @@ -131,7 +131,7 @@ def test_extract_files_does_not_mutate_original_nested_array_path(self) -> None: copied = deepcopy_with_paths(original, [["items", "", "file"]]) extracted = extract_files(copied, paths=[["items", "", "file"]]) - assert extracted == [("items[][file]", file1), ("items[][file]", file2)] + assert [entry for _, entry in extracted] == [file1, file2] assert original == { "items": [ {"file": file1, "extra": 1}, From eba039883cd57a0b9df0c4779d1370af59cd36ce Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 28 Apr 2026 04:19:02 +0000 Subject: [PATCH 19/56] feat: support setting headers via env --- src/hyperspell/_client.py | 24 +++++++++++++++++++++++- 1 file changed, 23 insertions(+), 1 deletion(-) diff --git a/src/hyperspell/_client.py b/src/hyperspell/_client.py index 78cfb089..20dbdf4a 100644 --- a/src/hyperspell/_client.py +++ b/src/hyperspell/_client.py @@ -19,7 +19,11 @@ RequestOptions, not_given, ) -from ._utils import is_given, get_async_library +from ._utils import ( + is_given, + is_mapping_t, + get_async_library, +) from ._compat import cached_property from ._version import __version__ from ._streaming import Stream as Stream, AsyncStream as AsyncStream @@ -102,6 +106,15 @@ def __init__( if base_url is None: base_url = f"https://api.hyperspell.com" + custom_headers_env = os.environ.get("HYPERSPELL_CUSTOM_HEADERS") + if custom_headers_env is not None: + parsed: dict[str, str] = {} + for line in custom_headers_env.split("\n"): + colon = line.find(":") + if colon >= 0: + parsed[line[:colon].strip()] = line[colon + 1 :].strip() + default_headers = {**parsed, **(default_headers if is_mapping_t(default_headers) else {})} + super().__init__( version=__version__, base_url=base_url, @@ -341,6 +354,15 @@ def __init__( if base_url is None: base_url = f"https://api.hyperspell.com" + custom_headers_env = os.environ.get("HYPERSPELL_CUSTOM_HEADERS") + if custom_headers_env is not None: + parsed: dict[str, str] = {} + for line in custom_headers_env.split("\n"): + colon = line.find(":") + if colon >= 0: + parsed[line[:colon].strip()] = line[colon + 1 :].strip() + default_headers = {**parsed, **(default_headers if is_mapping_t(default_headers) else {})} + super().__init__( version=__version__, base_url=base_url, From 36f7fd53dfda5aaead473fe141a4417df3ded9cc Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 28 Apr 2026 16:30:46 +0000 Subject: [PATCH 20/56] codegen metadata --- .stats.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.stats.yml b/.stats.yml index 3433ed72..1c1639a7 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 30 openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/hyperspell%2Fhyperspell-a9b9447c6a65c54385fe3ae40350172c7539ece91f5cf982cd474a4afd86e050.yml -openapi_spec_hash: 1a2ca5653244b4e205d3df51991b4238 +openapi_spec_hash: 0d1d6e45ba54d24c8262744d34192950 config_hash: 597eba5e5eaec83a5f0db3d946af8db5 From 34120cbbf4b232a30c138a46859d58b52eda1565 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 29 Apr 2026 05:46:34 +0000 Subject: [PATCH 21/56] codegen metadata --- .stats.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.stats.yml b/.stats.yml index 1c1639a7..ff65df7b 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 30 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/hyperspell%2Fhyperspell-a9b9447c6a65c54385fe3ae40350172c7539ece91f5cf982cd474a4afd86e050.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/hyperspell%2Fhyperspell-e124cba28023639d4e72808379668f874ed53285fdd75ff2a7f580c12e3815f0.yml openapi_spec_hash: 0d1d6e45ba54d24c8262744d34192950 config_hash: 597eba5e5eaec83a5f0db3d946af8db5 From 84f970242e9f6cd50f57531ad820d61b2908c48b Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Thu, 30 Apr 2026 08:01:49 +0000 Subject: [PATCH 22/56] codegen metadata --- .stats.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.stats.yml b/.stats.yml index ff65df7b..9e30a0e6 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 30 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/hyperspell%2Fhyperspell-e124cba28023639d4e72808379668f874ed53285fdd75ff2a7f580c12e3815f0.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/hyperspell/hyperspell-e124cba28023639d4e72808379668f874ed53285fdd75ff2a7f580c12e3815f0.yml openapi_spec_hash: 0d1d6e45ba54d24c8262744d34192950 config_hash: 597eba5e5eaec83a5f0db3d946af8db5 From 75d80bee62bfcf63efc6410365372248ad0f17ae Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Fri, 1 May 2026 00:30:44 +0000 Subject: [PATCH 23/56] codegen metadata --- .stats.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index 9e30a0e6..1c75d4f8 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 30 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/hyperspell/hyperspell-e124cba28023639d4e72808379668f874ed53285fdd75ff2a7f580c12e3815f0.yml -openapi_spec_hash: 0d1d6e45ba54d24c8262744d34192950 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/hyperspell/hyperspell-baf348c0f71316403deeb2d500f83b41b2a0affc38b130e0b3646f67a1166b7b.yml +openapi_spec_hash: 459a33fc87569764c4d041e37435b77a config_hash: 597eba5e5eaec83a5f0db3d946af8db5 From 3ffd91416383b948c38cce6aaa88dccff6914f37 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Fri, 1 May 2026 05:00:01 +0000 Subject: [PATCH 24/56] codegen metadata --- .stats.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.stats.yml b/.stats.yml index 1c75d4f8..82f42ade 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 30 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/hyperspell/hyperspell-baf348c0f71316403deeb2d500f83b41b2a0affc38b130e0b3646f67a1166b7b.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/hyperspell/hyperspell-65aaec91ce1035c25007430cbfd84b22a5f270da6488fcc3592fc86e320bf17a.yml openapi_spec_hash: 459a33fc87569764c4d041e37435b77a config_hash: 597eba5e5eaec83a5f0db3d946af8db5 From 19a83c32f936735d997727bda0bb0ba523f8086c Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Fri, 1 May 2026 05:04:10 +0000 Subject: [PATCH 25/56] chore(internal): reformat pyproject.toml --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 7a6fa077..9dec6210 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -154,7 +154,7 @@ show_error_codes = true # # We also exclude our `tests` as mypy doesn't always infer # types correctly and Pyright will still catch any type errors. -exclude = ['src/hyperspell/_files.py', '_dev/.*.py', 'tests/.*'] +exclude = ["src/hyperspell/_files.py", "_dev/.*.py", "tests/.*"] strict_equality = true implicit_reexport = true From 3b25c10a9f2be985dcfbfaf059f5595ea316d5f5 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 5 May 2026 19:30:57 +0000 Subject: [PATCH 26/56] feat(api): api update --- .stats.yml | 4 +-- src/hyperspell/resources/actions.py | 12 ++++++++ src/hyperspell/resources/memories.py | 30 +++++++++++++++++++ .../types/action_add_reaction_params.py | 3 ++ .../types/action_send_message_params.py | 3 ++ src/hyperspell/types/auth_me_response.py | 6 ++++ .../types/connection_list_response.py | 3 ++ .../types/integration_list_response.py | 3 ++ .../web_crawler_index_response.py | 3 ++ src/hyperspell/types/memory.py | 3 ++ .../types/memory_delete_response.py | 3 ++ src/hyperspell/types/memory_list_params.py | 3 ++ src/hyperspell/types/memory_search_params.py | 3 ++ src/hyperspell/types/memory_status.py | 3 ++ src/hyperspell/types/memory_update_params.py | 3 ++ src/hyperspell/types/shared/resource.py | 3 ++ 16 files changed, 86 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index 82f42ade..4e70c53a 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 30 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/hyperspell/hyperspell-65aaec91ce1035c25007430cbfd84b22a5f270da6488fcc3592fc86e320bf17a.yml -openapi_spec_hash: 459a33fc87569764c4d041e37435b77a +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/hyperspell/hyperspell-3ea7819d73f46347d7870c6238e12458921045b6386d6091bffe67906d7a017f.yml +openapi_spec_hash: 004b15cbe7b318ef25b91f6d45b4cba3 config_hash: 597eba5e5eaec83a5f0db3d946af8db5 diff --git a/src/hyperspell/resources/actions.py b/src/hyperspell/resources/actions.py index 2537a806..eeae142e 100644 --- a/src/hyperspell/resources/actions.py +++ b/src/hyperspell/resources/actions.py @@ -65,6 +65,9 @@ def add_reaction( "trace", "microsoft_teams", "gmail_actions", + "granola", + "fathom", + "linear", ], timestamp: str, connection: Optional[str] | Omit = omit, @@ -133,6 +136,9 @@ def send_message( "trace", "microsoft_teams", "gmail_actions", + "granola", + "fathom", + "linear", ], text: str, channel: Optional[str] | Omit = omit, @@ -226,6 +232,9 @@ async def add_reaction( "trace", "microsoft_teams", "gmail_actions", + "granola", + "fathom", + "linear", ], timestamp: str, connection: Optional[str] | Omit = omit, @@ -294,6 +303,9 @@ async def send_message( "trace", "microsoft_teams", "gmail_actions", + "granola", + "fathom", + "linear", ], text: str, channel: Optional[str] | Omit = omit, diff --git a/src/hyperspell/resources/memories.py b/src/hyperspell/resources/memories.py index 03a2875d..24fa2438 100644 --- a/src/hyperspell/resources/memories.py +++ b/src/hyperspell/resources/memories.py @@ -79,6 +79,9 @@ def update( "trace", "microsoft_teams", "gmail_actions", + "granola", + "fathom", + "linear", ], collection: Union[str, object, None] | Omit = omit, date: Union[Union[str, datetime], object, None] | Omit = omit, @@ -167,6 +170,9 @@ def list( "trace", "microsoft_teams", "gmail_actions", + "granola", + "fathom", + "linear", ] ] | Omit = omit, @@ -245,6 +251,9 @@ def delete( "trace", "microsoft_teams", "gmail_actions", + "granola", + "fathom", + "linear", ], # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. @@ -419,6 +428,9 @@ def get( "trace", "microsoft_teams", "gmail_actions", + "granola", + "fathom", + "linear", ], # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. @@ -475,6 +487,9 @@ def search( "trace", "microsoft_teams", "gmail_actions", + "granola", + "fathom", + "linear", ] ] | Omit = omit, @@ -651,6 +666,9 @@ async def update( "trace", "microsoft_teams", "gmail_actions", + "granola", + "fathom", + "linear", ], collection: Union[str, object, None] | Omit = omit, date: Union[Union[str, datetime], object, None] | Omit = omit, @@ -739,6 +757,9 @@ def list( "trace", "microsoft_teams", "gmail_actions", + "granola", + "fathom", + "linear", ] ] | Omit = omit, @@ -817,6 +838,9 @@ async def delete( "trace", "microsoft_teams", "gmail_actions", + "granola", + "fathom", + "linear", ], # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. @@ -991,6 +1015,9 @@ async def get( "trace", "microsoft_teams", "gmail_actions", + "granola", + "fathom", + "linear", ], # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. @@ -1047,6 +1074,9 @@ async def search( "trace", "microsoft_teams", "gmail_actions", + "granola", + "fathom", + "linear", ] ] | Omit = omit, diff --git a/src/hyperspell/types/action_add_reaction_params.py b/src/hyperspell/types/action_add_reaction_params.py index a72da448..2b0b9d67 100644 --- a/src/hyperspell/types/action_add_reaction_params.py +++ b/src/hyperspell/types/action_add_reaction_params.py @@ -31,6 +31,9 @@ class ActionAddReactionParams(TypedDict, total=False): "trace", "microsoft_teams", "gmail_actions", + "granola", + "fathom", + "linear", ] ] """Integration provider (e.g., slack)""" diff --git a/src/hyperspell/types/action_send_message_params.py b/src/hyperspell/types/action_send_message_params.py index 2df01983..bd0fe62d 100644 --- a/src/hyperspell/types/action_send_message_params.py +++ b/src/hyperspell/types/action_send_message_params.py @@ -25,6 +25,9 @@ class ActionSendMessageParams(TypedDict, total=False): "trace", "microsoft_teams", "gmail_actions", + "granola", + "fathom", + "linear", ] ] """Integration provider (e.g., slack)""" diff --git a/src/hyperspell/types/auth_me_response.py b/src/hyperspell/types/auth_me_response.py index 93ea0975..6188fd55 100644 --- a/src/hyperspell/types/auth_me_response.py +++ b/src/hyperspell/types/auth_me_response.py @@ -48,6 +48,9 @@ class AuthMeResponse(BaseModel): "trace", "microsoft_teams", "gmail_actions", + "granola", + "fathom", + "linear", ] ] """All integrations available for the app""" @@ -68,6 +71,9 @@ class AuthMeResponse(BaseModel): "trace", "microsoft_teams", "gmail_actions", + "granola", + "fathom", + "linear", ] ] """All integrations installed for the user""" diff --git a/src/hyperspell/types/connection_list_response.py b/src/hyperspell/types/connection_list_response.py index 8092529b..e6523e55 100644 --- a/src/hyperspell/types/connection_list_response.py +++ b/src/hyperspell/types/connection_list_response.py @@ -33,6 +33,9 @@ class Connection(BaseModel): "trace", "microsoft_teams", "gmail_actions", + "granola", + "fathom", + "linear", ] """The connection's provider""" diff --git a/src/hyperspell/types/integration_list_response.py b/src/hyperspell/types/integration_list_response.py index 47292e38..a1e9fd67 100644 --- a/src/hyperspell/types/integration_list_response.py +++ b/src/hyperspell/types/integration_list_response.py @@ -39,6 +39,9 @@ class Integration(BaseModel): "trace", "microsoft_teams", "gmail_actions", + "granola", + "fathom", + "linear", ] """The integration's provider""" diff --git a/src/hyperspell/types/integrations/web_crawler_index_response.py b/src/hyperspell/types/integrations/web_crawler_index_response.py index 16dc13e3..7d911280 100644 --- a/src/hyperspell/types/integrations/web_crawler_index_response.py +++ b/src/hyperspell/types/integrations/web_crawler_index_response.py @@ -25,6 +25,9 @@ class WebCrawlerIndexResponse(BaseModel): "trace", "microsoft_teams", "gmail_actions", + "granola", + "fathom", + "linear", ] status: Literal["pending", "processing", "completed", "failed", "pending_review", "skipped"] diff --git a/src/hyperspell/types/memory.py b/src/hyperspell/types/memory.py index 4ac829ef..d506bf55 100644 --- a/src/hyperspell/types/memory.py +++ b/src/hyperspell/types/memory.py @@ -31,6 +31,9 @@ class Memory(BaseModel): "trace", "microsoft_teams", "gmail_actions", + "granola", + "fathom", + "linear", ] type: str diff --git a/src/hyperspell/types/memory_delete_response.py b/src/hyperspell/types/memory_delete_response.py index 5f0432d1..ad8225a8 100644 --- a/src/hyperspell/types/memory_delete_response.py +++ b/src/hyperspell/types/memory_delete_response.py @@ -29,6 +29,9 @@ class MemoryDeleteResponse(BaseModel): "trace", "microsoft_teams", "gmail_actions", + "granola", + "fathom", + "linear", ] success: bool diff --git a/src/hyperspell/types/memory_list_params.py b/src/hyperspell/types/memory_list_params.py index 319f2917..b22c5e32 100644 --- a/src/hyperspell/types/memory_list_params.py +++ b/src/hyperspell/types/memory_list_params.py @@ -38,6 +38,9 @@ class MemoryListParams(TypedDict, total=False): "trace", "microsoft_teams", "gmail_actions", + "granola", + "fathom", + "linear", ] ] """Filter documents by source.""" diff --git a/src/hyperspell/types/memory_search_params.py b/src/hyperspell/types/memory_search_params.py index 81819341..4b98dc25 100644 --- a/src/hyperspell/types/memory_search_params.py +++ b/src/hyperspell/types/memory_search_params.py @@ -60,6 +60,9 @@ class MemorySearchParams(TypedDict, total=False): "trace", "microsoft_teams", "gmail_actions", + "granola", + "fathom", + "linear", ] ] """Only query documents from these sources.""" diff --git a/src/hyperspell/types/memory_status.py b/src/hyperspell/types/memory_status.py index f30b7c73..65b0bf64 100644 --- a/src/hyperspell/types/memory_status.py +++ b/src/hyperspell/types/memory_status.py @@ -25,6 +25,9 @@ class MemoryStatus(BaseModel): "trace", "microsoft_teams", "gmail_actions", + "granola", + "fathom", + "linear", ] status: Literal["pending", "processing", "completed", "failed", "pending_review", "skipped"] diff --git a/src/hyperspell/types/memory_update_params.py b/src/hyperspell/types/memory_update_params.py index c7a19384..f935cd7d 100644 --- a/src/hyperspell/types/memory_update_params.py +++ b/src/hyperspell/types/memory_update_params.py @@ -28,6 +28,9 @@ class MemoryUpdateParams(TypedDict, total=False): "trace", "microsoft_teams", "gmail_actions", + "granola", + "fathom", + "linear", ] ] diff --git a/src/hyperspell/types/shared/resource.py b/src/hyperspell/types/shared/resource.py index ccc16b91..4dfde146 100644 --- a/src/hyperspell/types/shared/resource.py +++ b/src/hyperspell/types/shared/resource.py @@ -27,6 +27,9 @@ class Resource(BaseModel): "trace", "microsoft_teams", "gmail_actions", + "granola", + "fathom", + "linear", ] folder_id: Optional[str] = None From b32aef88e020579eca63eba296c1cb83cadebf8b Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 6 May 2026 19:30:51 +0000 Subject: [PATCH 27/56] codegen metadata --- .stats.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index 4e70c53a..be9bc18a 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 30 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/hyperspell/hyperspell-3ea7819d73f46347d7870c6238e12458921045b6386d6091bffe67906d7a017f.yml -openapi_spec_hash: 004b15cbe7b318ef25b91f6d45b4cba3 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/hyperspell/hyperspell-65556393ee1b73d7aa80b6cdf194830148bd8ca311269345c64e6a14522f68d9.yml +openapi_spec_hash: d71925df7395382b9184ee8d55b99fdf config_hash: 597eba5e5eaec83a5f0db3d946af8db5 From bbfc21559a957dc4d64e57374933eebb3d398f2d Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 6 May 2026 20:30:52 +0000 Subject: [PATCH 28/56] codegen metadata --- .stats.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index be9bc18a..e690d820 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 30 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/hyperspell/hyperspell-65556393ee1b73d7aa80b6cdf194830148bd8ca311269345c64e6a14522f68d9.yml -openapi_spec_hash: d71925df7395382b9184ee8d55b99fdf +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/hyperspell/hyperspell-cff82eeac9caa392a1f8ea392a5ce41729b35768f7eaef96fb198366fae885cd.yml +openapi_spec_hash: 166e3610425ac0de0b51c2bcf3c63596 config_hash: 597eba5e5eaec83a5f0db3d946af8db5 From 335d0288f43e7f681a783f887ce1415ee57cad22 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Thu, 7 May 2026 19:30:56 +0000 Subject: [PATCH 29/56] feat(api): api update --- .stats.yml | 4 ++-- src/hyperspell/types/shared/resource.py | 10 +++++++++- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/.stats.yml b/.stats.yml index e690d820..3c80b735 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 30 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/hyperspell/hyperspell-cff82eeac9caa392a1f8ea392a5ce41729b35768f7eaef96fb198366fae885cd.yml -openapi_spec_hash: 166e3610425ac0de0b51c2bcf3c63596 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/hyperspell/hyperspell-0f1b9ea6ae3e53ac49e6a27f2a793b8e0048f53c554f98ded0e3040fe7447621.yml +openapi_spec_hash: f8419914fd519b2fe3e6bdb5f740ad68 config_hash: 597eba5e5eaec83a5f0db3d946af8db5 diff --git a/src/hyperspell/types/shared/resource.py b/src/hyperspell/types/shared/resource.py index 4dfde146..ac7a5c14 100644 --- a/src/hyperspell/types/shared/resource.py +++ b/src/hyperspell/types/shared/resource.py @@ -1,6 +1,6 @@ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -from typing import Optional +from typing import List, Optional from typing_extensions import Literal from .metadata import Metadata @@ -32,6 +32,14 @@ class Resource(BaseModel): "linear", ] + folder_ancestors: Optional[List[str]] = None + """ + Ordered list of provider folder IDs from immediate parent up to (but not + including) provider root. Used by resolve_sync_mode to walk the actual folder + tree without depending on intermediate policy records. Empty = resource lives at + provider root. + """ + folder_id: Optional[str] = None """Provider folder ID this resource belongs to""" From aa0cc7576de289e8e8dd152c773339e9ac27aafe Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Fri, 8 May 2026 03:30:51 +0000 Subject: [PATCH 30/56] feat(api): api update --- .stats.yml | 4 ++-- src/hyperspell/resources/memories.py | 22 ++++++++++++++------ src/hyperspell/types/memory_search_params.py | 14 ++++++++----- tests/api_resources/test_memories.py | 4 ++-- 4 files changed, 29 insertions(+), 15 deletions(-) diff --git a/.stats.yml b/.stats.yml index 3c80b735..7d27de54 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 30 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/hyperspell/hyperspell-0f1b9ea6ae3e53ac49e6a27f2a793b8e0048f53c554f98ded0e3040fe7447621.yml -openapi_spec_hash: f8419914fd519b2fe3e6bdb5f740ad68 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/hyperspell/hyperspell-5d5cf14a82b351c9d673a74d87b83f59f000ed244d8e83d9b677663f448cd689.yml +openapi_spec_hash: af0ed94c6c8466bd616c9d4b947130ec config_hash: 597eba5e5eaec83a5f0db3d946af8db5 diff --git a/src/hyperspell/resources/memories.py b/src/hyperspell/resources/memories.py index 24fa2438..da9472ca 100644 --- a/src/hyperspell/resources/memories.py +++ b/src/hyperspell/resources/memories.py @@ -468,7 +468,7 @@ def search( *, query: str, answer: bool | Omit = omit, - effort: int | Omit = omit, + effort: Literal["minimal", "low", "medium", "high"] | Omit = omit, max_results: int | Omit = omit, options: memory_search_params.Options | Omit = omit, sources: List[ @@ -508,8 +508,13 @@ def search( answer: If true, the query will be answered along with matching source documents. - effort: Effort level. 0 = pass query through verbatim. 1 = LLM rewrites the query for - better retrieval and extracts date filters. + effort: How much compute to spend on retrieval. Mirrors the dial popularized by + frontier-model APIs (OpenAI reasoning_effort, etc.). 'minimal' = verbatim + single-shot retrieval (fastest). 'low' = LLM rewrites the query for better + retrieval and extracts date filters. 'medium' = rewrite + agentic refinement + loop (the answer LLM may request additional retrieval rounds, up to 3). 'high' = + rewrite + extended refinement (up to 6 rounds). Higher = better recall, more + latency, more cost. max_results: Maximum number of results to return. @@ -1055,7 +1060,7 @@ async def search( *, query: str, answer: bool | Omit = omit, - effort: int | Omit = omit, + effort: Literal["minimal", "low", "medium", "high"] | Omit = omit, max_results: int | Omit = omit, options: memory_search_params.Options | Omit = omit, sources: List[ @@ -1095,8 +1100,13 @@ async def search( answer: If true, the query will be answered along with matching source documents. - effort: Effort level. 0 = pass query through verbatim. 1 = LLM rewrites the query for - better retrieval and extracts date filters. + effort: How much compute to spend on retrieval. Mirrors the dial popularized by + frontier-model APIs (OpenAI reasoning_effort, etc.). 'minimal' = verbatim + single-shot retrieval (fastest). 'low' = LLM rewrites the query for better + retrieval and extracts date filters. 'medium' = rewrite + agentic refinement + loop (the answer LLM may request additional retrieval rounds, up to 3). 'high' = + rewrite + extended refinement (up to 6 rounds). Higher = better recall, more + latency, more cost. max_results: Maximum number of results to return. diff --git a/src/hyperspell/types/memory_search_params.py b/src/hyperspell/types/memory_search_params.py index 4b98dc25..3e4abd85 100644 --- a/src/hyperspell/types/memory_search_params.py +++ b/src/hyperspell/types/memory_search_params.py @@ -31,11 +31,15 @@ class MemorySearchParams(TypedDict, total=False): answer: bool """If true, the query will be answered along with matching source documents.""" - effort: int - """Effort level. - - 0 = pass query through verbatim. 1 = LLM rewrites the query for better retrieval - and extracts date filters. + effort: Literal["minimal", "low", "medium", "high"] + """How much compute to spend on retrieval. + + Mirrors the dial popularized by frontier-model APIs (OpenAI reasoning_effort, + etc.). 'minimal' = verbatim single-shot retrieval (fastest). 'low' = LLM + rewrites the query for better retrieval and extracts date filters. 'medium' = + rewrite + agentic refinement loop (the answer LLM may request additional + retrieval rounds, up to 3). 'high' = rewrite + extended refinement (up to 6 + rounds). Higher = better recall, more latency, more cost. """ max_results: int diff --git a/tests/api_resources/test_memories.py b/tests/api_resources/test_memories.py index 4d801436..2108b62e 100644 --- a/tests/api_resources/test_memories.py +++ b/tests/api_resources/test_memories.py @@ -292,7 +292,7 @@ def test_method_search_with_all_params(self, client: Hyperspell) -> None: memory = client.memories.search( query="What does Hyperspell do?", answer=True, - effort=0, + effort="minimal", max_results=0, options={ "after": parse_datetime("2019-12-27T18:11:19.117Z"), @@ -703,7 +703,7 @@ async def test_method_search_with_all_params(self, async_client: AsyncHyperspell memory = await async_client.memories.search( query="What does Hyperspell do?", answer=True, - effort=0, + effort="minimal", max_results=0, options={ "after": parse_datetime("2019-12-27T18:11:19.117Z"), From 303776f90abd45d136a630d44d8942f3bb22550e Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Fri, 8 May 2026 17:30:58 +0000 Subject: [PATCH 31/56] codegen metadata --- .stats.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index 7d27de54..6ad3fcc5 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 30 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/hyperspell/hyperspell-5d5cf14a82b351c9d673a74d87b83f59f000ed244d8e83d9b677663f448cd689.yml -openapi_spec_hash: af0ed94c6c8466bd616c9d4b947130ec +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/hyperspell/hyperspell-8e3a528aec08c984925789a0e38be318828808754d4f24c45f8df552a81c55c1.yml +openapi_spec_hash: 9a50be5cf5b5eb3bc1203f1ee70a580f config_hash: 597eba5e5eaec83a5f0db3d946af8db5 From cc26c43e007a42b9ac4de6554d0280ef56b2b713 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Fri, 8 May 2026 18:31:23 +0000 Subject: [PATCH 32/56] feat(api): api update --- .stats.yml | 4 ++-- src/hyperspell/types/connection_list_response.py | 6 ++++++ src/hyperspell/types/integration_list_response.py | 3 +++ 3 files changed, 11 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index 6ad3fcc5..0083ac70 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 30 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/hyperspell/hyperspell-8e3a528aec08c984925789a0e38be318828808754d4f24c45f8df552a81c55c1.yml -openapi_spec_hash: 9a50be5cf5b5eb3bc1203f1ee70a580f +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/hyperspell/hyperspell-25f6e417d8ade75d7f759ed0a016931fbc51c01bdb990957d06cd8a5b81bd710.yml +openapi_spec_hash: ddcd074be4feadcc2c35db961e566a32 config_hash: 597eba5e5eaec83a5f0db3d946af8db5 diff --git a/src/hyperspell/types/connection_list_response.py b/src/hyperspell/types/connection_list_response.py index e6523e55..bbf6485e 100644 --- a/src/hyperspell/types/connection_list_response.py +++ b/src/hyperspell/types/connection_list_response.py @@ -39,6 +39,12 @@ class Connection(BaseModel): ] """The connection's provider""" + selected_count: Optional[int] = None + """ + Count of items in user_options.channels (Teams: workspaces selected; 0 means + nothing is being indexed for integrations that require selection). + """ + class ConnectionListResponse(BaseModel): connections: List[Connection] diff --git a/src/hyperspell/types/integration_list_response.py b/src/hyperspell/types/integration_list_response.py index a1e9fd67..b1da7bc5 100644 --- a/src/hyperspell/types/integration_list_response.py +++ b/src/hyperspell/types/integration_list_response.py @@ -48,6 +48,9 @@ class Integration(BaseModel): actions_only: Optional[bool] = None """Whether this integration only supports write actions (no sync)""" + requires_channel_selection: Optional[bool] = None + """Whether the user must select channels before indexing starts""" + class IntegrationListResponse(BaseModel): integrations: List[Integration] From 6dbd3ecf89c76051dde508e759d15db97acc4141 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Sat, 9 May 2026 04:06:13 +0000 Subject: [PATCH 33/56] fix(client): add missing f-string prefix in file type error message --- src/hyperspell/_files.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/hyperspell/_files.py b/src/hyperspell/_files.py index 34fa5459..e5146d91 100644 --- a/src/hyperspell/_files.py +++ b/src/hyperspell/_files.py @@ -99,7 +99,7 @@ async def async_to_httpx_files(files: RequestFiles | None) -> HttpxRequestFiles elif is_sequence_t(files): files = [(key, await _async_transform_file(file)) for key, file in files] else: - raise TypeError("Unexpected file type input {type(files)}, expected mapping or sequence") + raise TypeError(f"Unexpected file type input {type(files)}, expected mapping or sequence") return files From e47301a63173dd90013f6a2f127baf4cfd9e1553 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 12 May 2026 03:57:57 +0000 Subject: [PATCH 34/56] feat(internal/types): support eagerly validating pydantic iterators --- src/hyperspell/_models.py | 80 +++++++++++++++++++++++++++++++++++++++ tests/test_models.py | 60 +++++++++++++++++++++++++++-- 2 files changed, 137 insertions(+), 3 deletions(-) diff --git a/src/hyperspell/_models.py b/src/hyperspell/_models.py index 29070e05..8c5ab260 100644 --- a/src/hyperspell/_models.py +++ b/src/hyperspell/_models.py @@ -25,7 +25,9 @@ ClassVar, Protocol, Required, + Annotated, ParamSpec, + TypeAlias, TypedDict, TypeGuard, final, @@ -79,7 +81,15 @@ from ._constants import RAW_RESPONSE_HEADER if TYPE_CHECKING: + from pydantic import GetCoreSchemaHandler, ValidatorFunctionWrapHandler + from pydantic_core import CoreSchema, core_schema from pydantic_core.core_schema import ModelField, ModelSchema, LiteralSchema, ModelFieldsSchema +else: + try: + from pydantic_core import CoreSchema, core_schema + except ImportError: + CoreSchema = None + core_schema = None __all__ = ["BaseModel", "GenericModel"] @@ -396,6 +406,76 @@ def model_dump_json( ) +class _EagerIterable(list[_T], Generic[_T]): + """ + Accepts any Iterable[T] input (including generators), consumes it + eagerly, and validates all items upfront. + + Validation preserves the original container type where possible + (e.g. a set[T] stays a set[T]). Serialization (model_dump / JSON) + always emits a list — round-tripping through model_dump() will not + restore the original container type. + """ + + @classmethod + def __get_pydantic_core_schema__( + cls, + source_type: Any, + handler: GetCoreSchemaHandler, + ) -> CoreSchema: + (item_type,) = get_args(source_type) or (Any,) + item_schema: CoreSchema = handler.generate_schema(item_type) + list_of_items_schema: CoreSchema = core_schema.list_schema(item_schema) + + return core_schema.no_info_wrap_validator_function( + cls._validate, + list_of_items_schema, + serialization=core_schema.plain_serializer_function_ser_schema( + cls._serialize, + info_arg=False, + ), + ) + + @staticmethod + def _validate(v: Iterable[_T], handler: "ValidatorFunctionWrapHandler") -> Any: + original_type: type[Any] = type(v) + + # Normalize to list so list_schema can validate each item + if isinstance(v, list): + items: list[_T] = v + else: + try: + items = list(v) + except TypeError as e: + raise TypeError("Value is not iterable") from e + + # Validate items against the inner schema + validated: list[_T] = handler(items) + + # Reconstruct original container type + if original_type is list: + return validated + # str(list) produces the list's repr, not a string built from items, + # so skip reconstruction for str and its subclasses. + if issubclass(original_type, str): + return validated + try: + return original_type(validated) + except (TypeError, ValueError): + # If the type cannot be reconstructed, just return the validated list + return validated + + @staticmethod + def _serialize(v: Iterable[_T]) -> list[_T]: + """Always serialize as a list so Pydantic's JSON encoder is happy.""" + if isinstance(v, list): + return v + return list(v) + + +EagerIterable: TypeAlias = Annotated[Iterable[_T], _EagerIterable] + + def _construct_field(value: object, field: FieldInfo, key: str) -> object: if value is None: return field_get_default(field) diff --git a/tests/test_models.py b/tests/test_models.py index 88942a41..84a13569 100644 --- a/tests/test_models.py +++ b/tests/test_models.py @@ -1,7 +1,8 @@ import json -from typing import TYPE_CHECKING, Any, Dict, List, Union, Optional, cast +from typing import TYPE_CHECKING, Any, Dict, List, Union, Iterable, Optional, cast from datetime import datetime, timezone -from typing_extensions import Literal, Annotated, TypeAliasType +from collections import deque +from typing_extensions import Literal, Annotated, TypedDict, TypeAliasType import pytest import pydantic @@ -9,7 +10,7 @@ from hyperspell._utils import PropertyInfo from hyperspell._compat import PYDANTIC_V1, parse_obj, model_dump, model_json -from hyperspell._models import DISCRIMINATOR_CACHE, BaseModel, construct_type +from hyperspell._models import DISCRIMINATOR_CACHE, BaseModel, EagerIterable, construct_type class BasicModel(BaseModel): @@ -961,3 +962,56 @@ def __getattr__(self, attr: str) -> Item: ... assert model.a.prop == 1 assert isinstance(model.a, Item) assert model.other == "foo" + + +# NOTE: Workaround for Pydantic Iterable behavior. +# Iterable fields are replaced with a ValidatorIterator and may be consumed +# during serialization, which can cause subsequent dumps to return empty data. +# See: https://github.com/pydantic/pydantic/issues/9541 +@pytest.mark.parametrize( + "data, expected_validated", + [ + ([1, 2, 3], [1, 2, 3]), + ((1, 2, 3), (1, 2, 3)), + (set([1, 2, 3]), set([1, 2, 3])), + (iter([1, 2, 3]), [1, 2, 3]), + ([], []), + ((x for x in [1, 2, 3]), [1, 2, 3]), + (map(lambda x: x, [1, 2, 3]), [1, 2, 3]), + (frozenset([1, 2, 3]), frozenset([1, 2, 3])), + (deque([1, 2, 3]), deque([1, 2, 3])), + ], + ids=["list", "tuple", "set", "iterator", "empty", "generator", "map", "frozenset", "deque"], +) +@pytest.mark.skipif(PYDANTIC_V1, reason="this is only supported in pydantic v2") +def test_iterable_construction(data: Iterable[int], expected_validated: Iterable[int]) -> None: + class TypeWithIterable(TypedDict): + items: EagerIterable[int] + + class Model(BaseModel): + data: TypeWithIterable + + m = Model.model_validate({"data": {"items": data}}) + assert m.data["items"] == expected_validated + + # Verify repeated dumps don't lose data (the original bug) + assert m.model_dump()["data"]["items"] == list(expected_validated) + assert m.model_dump()["data"]["items"] == list(expected_validated) + + +@pytest.mark.skipif(PYDANTIC_V1, reason="this is only supported in pydantic v2") +def test_iterable_construction_str_falls_back_to_list() -> None: + # str is iterable (over chars), but str(list_of_chars) produces the list's repr + # rather than reconstructing a string from items. We special-case str to fall + # back to list instead of attempting reconstruction. + class TypeWithIterable(TypedDict): + items: EagerIterable[str] + + class Model(BaseModel): + data: TypeWithIterable + + m = Model.model_validate({"data": {"items": "hello"}}) + + # falls back to list of chars rather than calling str(["h", "e", "l", "l", "o"]) + assert m.data["items"] == ["h", "e", "l", "l", "o"] + assert m.model_dump()["data"]["items"] == ["h", "e", "l", "l", "o"] From b924f817d2ae7be3816833327a149a3932809d61 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 13 May 2026 03:05:50 +0000 Subject: [PATCH 35/56] ci: pin GitHub Actions to commit SHAs Pin all GitHub Actions referenced in generated workflows (both first-party `actions/*` and third-party) to immutable commit SHAs. Updating pinned actions is now a deliberate codegen-side bump rather than implicit on every workflow run. --- .github/workflows/ci.yml | 14 +++++++------- .github/workflows/publish-pypi.yml | 4 ++-- .github/workflows/release-doctor.yml | 2 +- 3 files changed, 10 insertions(+), 10 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 0185f06c..8a899fe0 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -21,10 +21,10 @@ jobs: runs-on: ${{ github.repository == 'stainless-sdks/hyperspell-python' && 'depot-ubuntu-24.04' || 'ubuntu-latest' }} if: (github.event_name == 'push' || github.event.pull_request.head.repo.fork) && (github.event_name != 'push' || github.event.head_commit.message != 'codegen metadata') steps: - - uses: actions/checkout@v6 + - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 - name: Install uv - uses: astral-sh/setup-uv@v5 + uses: astral-sh/setup-uv@d4b2f3b6ecc6e67c4457f6d3e41ec42d3d0fcb86 # v5.4.2 with: version: '0.10.2' @@ -43,10 +43,10 @@ jobs: id-token: write runs-on: ${{ github.repository == 'stainless-sdks/hyperspell-python' && 'depot-ubuntu-24.04' || 'ubuntu-latest' }} steps: - - uses: actions/checkout@v6 + - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 - name: Install uv - uses: astral-sh/setup-uv@v5 + uses: astral-sh/setup-uv@d4b2f3b6ecc6e67c4457f6d3e41ec42d3d0fcb86 # v5.4.2 with: version: '0.10.2' @@ -61,7 +61,7 @@ jobs: github.repository == 'stainless-sdks/hyperspell-python' && !startsWith(github.ref, 'refs/heads/stl/') id: github-oidc - uses: actions/github-script@v8 + uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8.0.0 with: script: core.setOutput('github_token', await core.getIDToken()); @@ -81,10 +81,10 @@ jobs: runs-on: ${{ github.repository == 'stainless-sdks/hyperspell-python' && 'depot-ubuntu-24.04' || 'ubuntu-latest' }} if: github.event_name == 'push' || github.event.pull_request.head.repo.fork steps: - - uses: actions/checkout@v6 + - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 - name: Install uv - uses: astral-sh/setup-uv@v5 + uses: astral-sh/setup-uv@d4b2f3b6ecc6e67c4457f6d3e41ec42d3d0fcb86 # v5.4.2 with: version: '0.10.2' diff --git a/.github/workflows/publish-pypi.yml b/.github/workflows/publish-pypi.yml index 585c39f2..ea7fb3fd 100644 --- a/.github/workflows/publish-pypi.yml +++ b/.github/workflows/publish-pypi.yml @@ -17,10 +17,10 @@ jobs: id-token: write steps: - - uses: actions/checkout@v6 + - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 - name: Install uv - uses: astral-sh/setup-uv@v5 + uses: astral-sh/setup-uv@d4b2f3b6ecc6e67c4457f6d3e41ec42d3d0fcb86 # v5.4.2 with: version: '0.9.13' diff --git a/.github/workflows/release-doctor.yml b/.github/workflows/release-doctor.yml index b7b5ce04..fe86cc65 100644 --- a/.github/workflows/release-doctor.yml +++ b/.github/workflows/release-doctor.yml @@ -12,7 +12,7 @@ jobs: if: github.repository == 'hyperspell/python-sdk' && (github.event_name == 'push' || github.event_name == 'workflow_dispatch' || startsWith(github.head_ref, 'release-please') || github.head_ref == 'next') steps: - - uses: actions/checkout@v6 + - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 - name: Check release environment run: | From d3cf6ceefcf91a434f04a924316376d809ce0364 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 13 May 2026 15:30:48 +0000 Subject: [PATCH 36/56] codegen metadata --- .stats.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index 0083ac70..cacedeef 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 30 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/hyperspell/hyperspell-25f6e417d8ade75d7f759ed0a016931fbc51c01bdb990957d06cd8a5b81bd710.yml -openapi_spec_hash: ddcd074be4feadcc2c35db961e566a32 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/hyperspell/hyperspell-ba1a1ffdf1f82ec862edf7a41bf2e8893e295cb593642eb6b2e1985d71a2b7c9.yml +openapi_spec_hash: f8597c91ff3994216848f7de61fb4c6a config_hash: 597eba5e5eaec83a5f0db3d946af8db5 From 44ff0f931011d61313229632f615cec41f233360 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 13 May 2026 19:30:53 +0000 Subject: [PATCH 37/56] codegen metadata --- .stats.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index cacedeef..14d6c220 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 30 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/hyperspell/hyperspell-ba1a1ffdf1f82ec862edf7a41bf2e8893e295cb593642eb6b2e1985d71a2b7c9.yml -openapi_spec_hash: f8597c91ff3994216848f7de61fb4c6a +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/hyperspell/hyperspell-a8de3a3dffaf1d9d9bc8dbbfc16e5cb93fab948fbfdf209b57e3772b86bb6c52.yml +openapi_spec_hash: 5dad3ffb41865ee6875d23037bb5ed8e config_hash: 597eba5e5eaec83a5f0db3d946af8db5 From 9d829b5c1caef335492991888e04e90dd1709945 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Fri, 15 May 2026 09:30:53 +0000 Subject: [PATCH 38/56] codegen metadata --- .stats.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index 14d6c220..6bf33ae8 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 30 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/hyperspell/hyperspell-a8de3a3dffaf1d9d9bc8dbbfc16e5cb93fab948fbfdf209b57e3772b86bb6c52.yml -openapi_spec_hash: 5dad3ffb41865ee6875d23037bb5ed8e +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/hyperspell/hyperspell-0ab273c4a6f51fde1028289c51ff0c66db65f786beefb57f5e83716502c738af.yml +openapi_spec_hash: 6eb64e0f9507bff9ab45727b0f872906 config_hash: 597eba5e5eaec83a5f0db3d946af8db5 From edd9b41ea428964bb74381e415df2e3616c6a46e Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Mon, 18 May 2026 23:30:56 +0000 Subject: [PATCH 39/56] feat(api): api update --- .stats.yml | 4 ++-- src/hyperspell/resources/actions.py | 8 ++++++++ src/hyperspell/resources/memories.py | 20 +++++++++++++++++++ .../types/action_add_reaction_params.py | 2 ++ .../types/action_send_message_params.py | 2 ++ src/hyperspell/types/auth_me_response.py | 4 ++++ .../types/connection_list_response.py | 2 ++ .../types/integration_list_response.py | 2 ++ .../web_crawler_index_response.py | 2 ++ src/hyperspell/types/memory.py | 2 ++ .../types/memory_delete_response.py | 2 ++ src/hyperspell/types/memory_list_params.py | 2 ++ src/hyperspell/types/memory_search_params.py | 2 ++ src/hyperspell/types/memory_status.py | 2 ++ src/hyperspell/types/memory_update_params.py | 2 ++ src/hyperspell/types/shared/resource.py | 2 ++ 16 files changed, 58 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index 6bf33ae8..088ceabb 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 30 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/hyperspell/hyperspell-0ab273c4a6f51fde1028289c51ff0c66db65f786beefb57f5e83716502c738af.yml -openapi_spec_hash: 6eb64e0f9507bff9ab45727b0f872906 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/hyperspell/hyperspell-c422b71013d310d2beb88faaaab8a6e46043a08111fb0a11b7b2077438475bcd.yml +openapi_spec_hash: becb157545f65519541a8a64c89c3cba config_hash: 597eba5e5eaec83a5f0db3d946af8db5 diff --git a/src/hyperspell/resources/actions.py b/src/hyperspell/resources/actions.py index eeae142e..a28b7a80 100644 --- a/src/hyperspell/resources/actions.py +++ b/src/hyperspell/resources/actions.py @@ -68,6 +68,8 @@ def add_reaction( "granola", "fathom", "linear", + "hubspot", + "salesforce", ], timestamp: str, connection: Optional[str] | Omit = omit, @@ -139,6 +141,8 @@ def send_message( "granola", "fathom", "linear", + "hubspot", + "salesforce", ], text: str, channel: Optional[str] | Omit = omit, @@ -235,6 +239,8 @@ async def add_reaction( "granola", "fathom", "linear", + "hubspot", + "salesforce", ], timestamp: str, connection: Optional[str] | Omit = omit, @@ -306,6 +312,8 @@ async def send_message( "granola", "fathom", "linear", + "hubspot", + "salesforce", ], text: str, channel: Optional[str] | Omit = omit, diff --git a/src/hyperspell/resources/memories.py b/src/hyperspell/resources/memories.py index da9472ca..6f8defdf 100644 --- a/src/hyperspell/resources/memories.py +++ b/src/hyperspell/resources/memories.py @@ -82,6 +82,8 @@ def update( "granola", "fathom", "linear", + "hubspot", + "salesforce", ], collection: Union[str, object, None] | Omit = omit, date: Union[Union[str, datetime], object, None] | Omit = omit, @@ -173,6 +175,8 @@ def list( "granola", "fathom", "linear", + "hubspot", + "salesforce", ] ] | Omit = omit, @@ -254,6 +258,8 @@ def delete( "granola", "fathom", "linear", + "hubspot", + "salesforce", ], # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. @@ -431,6 +437,8 @@ def get( "granola", "fathom", "linear", + "hubspot", + "salesforce", ], # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. @@ -490,6 +498,8 @@ def search( "granola", "fathom", "linear", + "hubspot", + "salesforce", ] ] | Omit = omit, @@ -674,6 +684,8 @@ async def update( "granola", "fathom", "linear", + "hubspot", + "salesforce", ], collection: Union[str, object, None] | Omit = omit, date: Union[Union[str, datetime], object, None] | Omit = omit, @@ -765,6 +777,8 @@ def list( "granola", "fathom", "linear", + "hubspot", + "salesforce", ] ] | Omit = omit, @@ -846,6 +860,8 @@ async def delete( "granola", "fathom", "linear", + "hubspot", + "salesforce", ], # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. @@ -1023,6 +1039,8 @@ async def get( "granola", "fathom", "linear", + "hubspot", + "salesforce", ], # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. @@ -1082,6 +1100,8 @@ async def search( "granola", "fathom", "linear", + "hubspot", + "salesforce", ] ] | Omit = omit, diff --git a/src/hyperspell/types/action_add_reaction_params.py b/src/hyperspell/types/action_add_reaction_params.py index 2b0b9d67..5a2ca027 100644 --- a/src/hyperspell/types/action_add_reaction_params.py +++ b/src/hyperspell/types/action_add_reaction_params.py @@ -34,6 +34,8 @@ class ActionAddReactionParams(TypedDict, total=False): "granola", "fathom", "linear", + "hubspot", + "salesforce", ] ] """Integration provider (e.g., slack)""" diff --git a/src/hyperspell/types/action_send_message_params.py b/src/hyperspell/types/action_send_message_params.py index bd0fe62d..04ac3442 100644 --- a/src/hyperspell/types/action_send_message_params.py +++ b/src/hyperspell/types/action_send_message_params.py @@ -28,6 +28,8 @@ class ActionSendMessageParams(TypedDict, total=False): "granola", "fathom", "linear", + "hubspot", + "salesforce", ] ] """Integration provider (e.g., slack)""" diff --git a/src/hyperspell/types/auth_me_response.py b/src/hyperspell/types/auth_me_response.py index 6188fd55..efc261a5 100644 --- a/src/hyperspell/types/auth_me_response.py +++ b/src/hyperspell/types/auth_me_response.py @@ -51,6 +51,8 @@ class AuthMeResponse(BaseModel): "granola", "fathom", "linear", + "hubspot", + "salesforce", ] ] """All integrations available for the app""" @@ -74,6 +76,8 @@ class AuthMeResponse(BaseModel): "granola", "fathom", "linear", + "hubspot", + "salesforce", ] ] """All integrations installed for the user""" diff --git a/src/hyperspell/types/connection_list_response.py b/src/hyperspell/types/connection_list_response.py index bbf6485e..051b9af8 100644 --- a/src/hyperspell/types/connection_list_response.py +++ b/src/hyperspell/types/connection_list_response.py @@ -36,6 +36,8 @@ class Connection(BaseModel): "granola", "fathom", "linear", + "hubspot", + "salesforce", ] """The connection's provider""" diff --git a/src/hyperspell/types/integration_list_response.py b/src/hyperspell/types/integration_list_response.py index b1da7bc5..ef450f81 100644 --- a/src/hyperspell/types/integration_list_response.py +++ b/src/hyperspell/types/integration_list_response.py @@ -42,6 +42,8 @@ class Integration(BaseModel): "granola", "fathom", "linear", + "hubspot", + "salesforce", ] """The integration's provider""" diff --git a/src/hyperspell/types/integrations/web_crawler_index_response.py b/src/hyperspell/types/integrations/web_crawler_index_response.py index 7d911280..6f95614a 100644 --- a/src/hyperspell/types/integrations/web_crawler_index_response.py +++ b/src/hyperspell/types/integrations/web_crawler_index_response.py @@ -28,6 +28,8 @@ class WebCrawlerIndexResponse(BaseModel): "granola", "fathom", "linear", + "hubspot", + "salesforce", ] status: Literal["pending", "processing", "completed", "failed", "pending_review", "skipped"] diff --git a/src/hyperspell/types/memory.py b/src/hyperspell/types/memory.py index d506bf55..783dfcf8 100644 --- a/src/hyperspell/types/memory.py +++ b/src/hyperspell/types/memory.py @@ -34,6 +34,8 @@ class Memory(BaseModel): "granola", "fathom", "linear", + "hubspot", + "salesforce", ] type: str diff --git a/src/hyperspell/types/memory_delete_response.py b/src/hyperspell/types/memory_delete_response.py index ad8225a8..07b28fe8 100644 --- a/src/hyperspell/types/memory_delete_response.py +++ b/src/hyperspell/types/memory_delete_response.py @@ -32,6 +32,8 @@ class MemoryDeleteResponse(BaseModel): "granola", "fathom", "linear", + "hubspot", + "salesforce", ] success: bool diff --git a/src/hyperspell/types/memory_list_params.py b/src/hyperspell/types/memory_list_params.py index b22c5e32..0a3bdc9c 100644 --- a/src/hyperspell/types/memory_list_params.py +++ b/src/hyperspell/types/memory_list_params.py @@ -41,6 +41,8 @@ class MemoryListParams(TypedDict, total=False): "granola", "fathom", "linear", + "hubspot", + "salesforce", ] ] """Filter documents by source.""" diff --git a/src/hyperspell/types/memory_search_params.py b/src/hyperspell/types/memory_search_params.py index 3e4abd85..7e71a447 100644 --- a/src/hyperspell/types/memory_search_params.py +++ b/src/hyperspell/types/memory_search_params.py @@ -67,6 +67,8 @@ class MemorySearchParams(TypedDict, total=False): "granola", "fathom", "linear", + "hubspot", + "salesforce", ] ] """Only query documents from these sources.""" diff --git a/src/hyperspell/types/memory_status.py b/src/hyperspell/types/memory_status.py index 65b0bf64..3c878512 100644 --- a/src/hyperspell/types/memory_status.py +++ b/src/hyperspell/types/memory_status.py @@ -28,6 +28,8 @@ class MemoryStatus(BaseModel): "granola", "fathom", "linear", + "hubspot", + "salesforce", ] status: Literal["pending", "processing", "completed", "failed", "pending_review", "skipped"] diff --git a/src/hyperspell/types/memory_update_params.py b/src/hyperspell/types/memory_update_params.py index f935cd7d..5b75f33b 100644 --- a/src/hyperspell/types/memory_update_params.py +++ b/src/hyperspell/types/memory_update_params.py @@ -31,6 +31,8 @@ class MemoryUpdateParams(TypedDict, total=False): "granola", "fathom", "linear", + "hubspot", + "salesforce", ] ] diff --git a/src/hyperspell/types/shared/resource.py b/src/hyperspell/types/shared/resource.py index ac7a5c14..d3513a1f 100644 --- a/src/hyperspell/types/shared/resource.py +++ b/src/hyperspell/types/shared/resource.py @@ -30,6 +30,8 @@ class Resource(BaseModel): "granola", "fathom", "linear", + "hubspot", + "salesforce", ] folder_ancestors: Optional[List[str]] = None From 42d3c825a891a655d999e55ab02572c8cf7d283b Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 20 May 2026 17:30:53 +0000 Subject: [PATCH 40/56] feat(api): api update --- .stats.yml | 4 ++-- src/hyperspell/resources/actions.py | 4 ++++ src/hyperspell/resources/memories.py | 10 ++++++++++ src/hyperspell/types/action_add_reaction_params.py | 1 + src/hyperspell/types/action_send_message_params.py | 1 + src/hyperspell/types/auth_me_response.py | 2 ++ src/hyperspell/types/connection_list_response.py | 1 + src/hyperspell/types/integration_list_response.py | 1 + .../types/integrations/web_crawler_index_response.py | 1 + src/hyperspell/types/memory.py | 1 + src/hyperspell/types/memory_delete_response.py | 1 + src/hyperspell/types/memory_list_params.py | 1 + src/hyperspell/types/memory_search_params.py | 1 + src/hyperspell/types/memory_status.py | 1 + src/hyperspell/types/memory_update_params.py | 1 + src/hyperspell/types/shared/resource.py | 1 + 16 files changed, 30 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index 088ceabb..0dcd4b1b 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 30 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/hyperspell/hyperspell-c422b71013d310d2beb88faaaab8a6e46043a08111fb0a11b7b2077438475bcd.yml -openapi_spec_hash: becb157545f65519541a8a64c89c3cba +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/hyperspell/hyperspell-67e5580c2192db89f9b4918475feb225f402998b26688dc4686f578558fc67b1.yml +openapi_spec_hash: 3e33a2921eff123bb0914875391d63ab config_hash: 597eba5e5eaec83a5f0db3d946af8db5 diff --git a/src/hyperspell/resources/actions.py b/src/hyperspell/resources/actions.py index a28b7a80..f0b35945 100644 --- a/src/hyperspell/resources/actions.py +++ b/src/hyperspell/resources/actions.py @@ -70,6 +70,7 @@ def add_reaction( "linear", "hubspot", "salesforce", + "coda", ], timestamp: str, connection: Optional[str] | Omit = omit, @@ -143,6 +144,7 @@ def send_message( "linear", "hubspot", "salesforce", + "coda", ], text: str, channel: Optional[str] | Omit = omit, @@ -241,6 +243,7 @@ async def add_reaction( "linear", "hubspot", "salesforce", + "coda", ], timestamp: str, connection: Optional[str] | Omit = omit, @@ -314,6 +317,7 @@ async def send_message( "linear", "hubspot", "salesforce", + "coda", ], text: str, channel: Optional[str] | Omit = omit, diff --git a/src/hyperspell/resources/memories.py b/src/hyperspell/resources/memories.py index 6f8defdf..2b3c3da8 100644 --- a/src/hyperspell/resources/memories.py +++ b/src/hyperspell/resources/memories.py @@ -84,6 +84,7 @@ def update( "linear", "hubspot", "salesforce", + "coda", ], collection: Union[str, object, None] | Omit = omit, date: Union[Union[str, datetime], object, None] | Omit = omit, @@ -177,6 +178,7 @@ def list( "linear", "hubspot", "salesforce", + "coda", ] ] | Omit = omit, @@ -260,6 +262,7 @@ def delete( "linear", "hubspot", "salesforce", + "coda", ], # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. @@ -439,6 +442,7 @@ def get( "linear", "hubspot", "salesforce", + "coda", ], # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. @@ -500,6 +504,7 @@ def search( "linear", "hubspot", "salesforce", + "coda", ] ] | Omit = omit, @@ -686,6 +691,7 @@ async def update( "linear", "hubspot", "salesforce", + "coda", ], collection: Union[str, object, None] | Omit = omit, date: Union[Union[str, datetime], object, None] | Omit = omit, @@ -779,6 +785,7 @@ def list( "linear", "hubspot", "salesforce", + "coda", ] ] | Omit = omit, @@ -862,6 +869,7 @@ async def delete( "linear", "hubspot", "salesforce", + "coda", ], # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. @@ -1041,6 +1049,7 @@ async def get( "linear", "hubspot", "salesforce", + "coda", ], # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. @@ -1102,6 +1111,7 @@ async def search( "linear", "hubspot", "salesforce", + "coda", ] ] | Omit = omit, diff --git a/src/hyperspell/types/action_add_reaction_params.py b/src/hyperspell/types/action_add_reaction_params.py index 5a2ca027..11f74536 100644 --- a/src/hyperspell/types/action_add_reaction_params.py +++ b/src/hyperspell/types/action_add_reaction_params.py @@ -36,6 +36,7 @@ class ActionAddReactionParams(TypedDict, total=False): "linear", "hubspot", "salesforce", + "coda", ] ] """Integration provider (e.g., slack)""" diff --git a/src/hyperspell/types/action_send_message_params.py b/src/hyperspell/types/action_send_message_params.py index 04ac3442..d6caa6e6 100644 --- a/src/hyperspell/types/action_send_message_params.py +++ b/src/hyperspell/types/action_send_message_params.py @@ -30,6 +30,7 @@ class ActionSendMessageParams(TypedDict, total=False): "linear", "hubspot", "salesforce", + "coda", ] ] """Integration provider (e.g., slack)""" diff --git a/src/hyperspell/types/auth_me_response.py b/src/hyperspell/types/auth_me_response.py index efc261a5..8617c10e 100644 --- a/src/hyperspell/types/auth_me_response.py +++ b/src/hyperspell/types/auth_me_response.py @@ -53,6 +53,7 @@ class AuthMeResponse(BaseModel): "linear", "hubspot", "salesforce", + "coda", ] ] """All integrations available for the app""" @@ -78,6 +79,7 @@ class AuthMeResponse(BaseModel): "linear", "hubspot", "salesforce", + "coda", ] ] """All integrations installed for the user""" diff --git a/src/hyperspell/types/connection_list_response.py b/src/hyperspell/types/connection_list_response.py index 051b9af8..f4bf9bbc 100644 --- a/src/hyperspell/types/connection_list_response.py +++ b/src/hyperspell/types/connection_list_response.py @@ -38,6 +38,7 @@ class Connection(BaseModel): "linear", "hubspot", "salesforce", + "coda", ] """The connection's provider""" diff --git a/src/hyperspell/types/integration_list_response.py b/src/hyperspell/types/integration_list_response.py index ef450f81..f96fa881 100644 --- a/src/hyperspell/types/integration_list_response.py +++ b/src/hyperspell/types/integration_list_response.py @@ -44,6 +44,7 @@ class Integration(BaseModel): "linear", "hubspot", "salesforce", + "coda", ] """The integration's provider""" diff --git a/src/hyperspell/types/integrations/web_crawler_index_response.py b/src/hyperspell/types/integrations/web_crawler_index_response.py index 6f95614a..386a8c49 100644 --- a/src/hyperspell/types/integrations/web_crawler_index_response.py +++ b/src/hyperspell/types/integrations/web_crawler_index_response.py @@ -30,6 +30,7 @@ class WebCrawlerIndexResponse(BaseModel): "linear", "hubspot", "salesforce", + "coda", ] status: Literal["pending", "processing", "completed", "failed", "pending_review", "skipped"] diff --git a/src/hyperspell/types/memory.py b/src/hyperspell/types/memory.py index 783dfcf8..8f8517ea 100644 --- a/src/hyperspell/types/memory.py +++ b/src/hyperspell/types/memory.py @@ -36,6 +36,7 @@ class Memory(BaseModel): "linear", "hubspot", "salesforce", + "coda", ] type: str diff --git a/src/hyperspell/types/memory_delete_response.py b/src/hyperspell/types/memory_delete_response.py index 07b28fe8..6f9af141 100644 --- a/src/hyperspell/types/memory_delete_response.py +++ b/src/hyperspell/types/memory_delete_response.py @@ -34,6 +34,7 @@ class MemoryDeleteResponse(BaseModel): "linear", "hubspot", "salesforce", + "coda", ] success: bool diff --git a/src/hyperspell/types/memory_list_params.py b/src/hyperspell/types/memory_list_params.py index 0a3bdc9c..03accaa1 100644 --- a/src/hyperspell/types/memory_list_params.py +++ b/src/hyperspell/types/memory_list_params.py @@ -43,6 +43,7 @@ class MemoryListParams(TypedDict, total=False): "linear", "hubspot", "salesforce", + "coda", ] ] """Filter documents by source.""" diff --git a/src/hyperspell/types/memory_search_params.py b/src/hyperspell/types/memory_search_params.py index 7e71a447..8abd5348 100644 --- a/src/hyperspell/types/memory_search_params.py +++ b/src/hyperspell/types/memory_search_params.py @@ -69,6 +69,7 @@ class MemorySearchParams(TypedDict, total=False): "linear", "hubspot", "salesforce", + "coda", ] ] """Only query documents from these sources.""" diff --git a/src/hyperspell/types/memory_status.py b/src/hyperspell/types/memory_status.py index 3c878512..c5f5d912 100644 --- a/src/hyperspell/types/memory_status.py +++ b/src/hyperspell/types/memory_status.py @@ -30,6 +30,7 @@ class MemoryStatus(BaseModel): "linear", "hubspot", "salesforce", + "coda", ] status: Literal["pending", "processing", "completed", "failed", "pending_review", "skipped"] diff --git a/src/hyperspell/types/memory_update_params.py b/src/hyperspell/types/memory_update_params.py index 5b75f33b..505373a4 100644 --- a/src/hyperspell/types/memory_update_params.py +++ b/src/hyperspell/types/memory_update_params.py @@ -33,6 +33,7 @@ class MemoryUpdateParams(TypedDict, total=False): "linear", "hubspot", "salesforce", + "coda", ] ] diff --git a/src/hyperspell/types/shared/resource.py b/src/hyperspell/types/shared/resource.py index d3513a1f..1f7084ff 100644 --- a/src/hyperspell/types/shared/resource.py +++ b/src/hyperspell/types/shared/resource.py @@ -32,6 +32,7 @@ class Resource(BaseModel): "linear", "hubspot", "salesforce", + "coda", ] folder_ancestors: Optional[List[str]] = None From 58c8d7cd0aeb73b2a28dcc30dadac3b5d63bdcb8 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 20 May 2026 23:30:50 +0000 Subject: [PATCH 41/56] feat(api): api update --- .stats.yml | 4 ++-- src/hyperspell/resources/actions.py | 4 ++++ src/hyperspell/resources/memories.py | 10 ++++++++++ src/hyperspell/types/action_add_reaction_params.py | 1 + src/hyperspell/types/action_send_message_params.py | 1 + src/hyperspell/types/auth_me_response.py | 2 ++ src/hyperspell/types/connection_list_response.py | 1 + src/hyperspell/types/integration_list_response.py | 1 + .../types/integrations/web_crawler_index_response.py | 1 + src/hyperspell/types/memory.py | 1 + src/hyperspell/types/memory_delete_response.py | 1 + src/hyperspell/types/memory_list_params.py | 1 + src/hyperspell/types/memory_search_params.py | 1 + src/hyperspell/types/memory_status.py | 1 + src/hyperspell/types/memory_update_params.py | 1 + src/hyperspell/types/shared/resource.py | 1 + 16 files changed, 30 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index 0dcd4b1b..9c77ed91 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 30 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/hyperspell/hyperspell-67e5580c2192db89f9b4918475feb225f402998b26688dc4686f578558fc67b1.yml -openapi_spec_hash: 3e33a2921eff123bb0914875391d63ab +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/hyperspell/hyperspell-feee340a746833ce5d11da1ac2b1ceb543d72c923a3e520120ca1a85722ad19e.yml +openapi_spec_hash: fc6079b58022a3ab9aa513729dacbf64 config_hash: 597eba5e5eaec83a5f0db3d946af8db5 diff --git a/src/hyperspell/resources/actions.py b/src/hyperspell/resources/actions.py index f0b35945..1f3f7d0e 100644 --- a/src/hyperspell/resources/actions.py +++ b/src/hyperspell/resources/actions.py @@ -71,6 +71,7 @@ def add_reaction( "hubspot", "salesforce", "coda", + "lightfield", ], timestamp: str, connection: Optional[str] | Omit = omit, @@ -145,6 +146,7 @@ def send_message( "hubspot", "salesforce", "coda", + "lightfield", ], text: str, channel: Optional[str] | Omit = omit, @@ -244,6 +246,7 @@ async def add_reaction( "hubspot", "salesforce", "coda", + "lightfield", ], timestamp: str, connection: Optional[str] | Omit = omit, @@ -318,6 +321,7 @@ async def send_message( "hubspot", "salesforce", "coda", + "lightfield", ], text: str, channel: Optional[str] | Omit = omit, diff --git a/src/hyperspell/resources/memories.py b/src/hyperspell/resources/memories.py index 2b3c3da8..076c7860 100644 --- a/src/hyperspell/resources/memories.py +++ b/src/hyperspell/resources/memories.py @@ -85,6 +85,7 @@ def update( "hubspot", "salesforce", "coda", + "lightfield", ], collection: Union[str, object, None] | Omit = omit, date: Union[Union[str, datetime], object, None] | Omit = omit, @@ -179,6 +180,7 @@ def list( "hubspot", "salesforce", "coda", + "lightfield", ] ] | Omit = omit, @@ -263,6 +265,7 @@ def delete( "hubspot", "salesforce", "coda", + "lightfield", ], # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. @@ -443,6 +446,7 @@ def get( "hubspot", "salesforce", "coda", + "lightfield", ], # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. @@ -505,6 +509,7 @@ def search( "hubspot", "salesforce", "coda", + "lightfield", ] ] | Omit = omit, @@ -692,6 +697,7 @@ async def update( "hubspot", "salesforce", "coda", + "lightfield", ], collection: Union[str, object, None] | Omit = omit, date: Union[Union[str, datetime], object, None] | Omit = omit, @@ -786,6 +792,7 @@ def list( "hubspot", "salesforce", "coda", + "lightfield", ] ] | Omit = omit, @@ -870,6 +877,7 @@ async def delete( "hubspot", "salesforce", "coda", + "lightfield", ], # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. @@ -1050,6 +1058,7 @@ async def get( "hubspot", "salesforce", "coda", + "lightfield", ], # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. @@ -1112,6 +1121,7 @@ async def search( "hubspot", "salesforce", "coda", + "lightfield", ] ] | Omit = omit, diff --git a/src/hyperspell/types/action_add_reaction_params.py b/src/hyperspell/types/action_add_reaction_params.py index 11f74536..618cacd4 100644 --- a/src/hyperspell/types/action_add_reaction_params.py +++ b/src/hyperspell/types/action_add_reaction_params.py @@ -37,6 +37,7 @@ class ActionAddReactionParams(TypedDict, total=False): "hubspot", "salesforce", "coda", + "lightfield", ] ] """Integration provider (e.g., slack)""" diff --git a/src/hyperspell/types/action_send_message_params.py b/src/hyperspell/types/action_send_message_params.py index d6caa6e6..a7af7988 100644 --- a/src/hyperspell/types/action_send_message_params.py +++ b/src/hyperspell/types/action_send_message_params.py @@ -31,6 +31,7 @@ class ActionSendMessageParams(TypedDict, total=False): "hubspot", "salesforce", "coda", + "lightfield", ] ] """Integration provider (e.g., slack)""" diff --git a/src/hyperspell/types/auth_me_response.py b/src/hyperspell/types/auth_me_response.py index 8617c10e..fb5e0815 100644 --- a/src/hyperspell/types/auth_me_response.py +++ b/src/hyperspell/types/auth_me_response.py @@ -54,6 +54,7 @@ class AuthMeResponse(BaseModel): "hubspot", "salesforce", "coda", + "lightfield", ] ] """All integrations available for the app""" @@ -80,6 +81,7 @@ class AuthMeResponse(BaseModel): "hubspot", "salesforce", "coda", + "lightfield", ] ] """All integrations installed for the user""" diff --git a/src/hyperspell/types/connection_list_response.py b/src/hyperspell/types/connection_list_response.py index f4bf9bbc..02ae4384 100644 --- a/src/hyperspell/types/connection_list_response.py +++ b/src/hyperspell/types/connection_list_response.py @@ -39,6 +39,7 @@ class Connection(BaseModel): "hubspot", "salesforce", "coda", + "lightfield", ] """The connection's provider""" diff --git a/src/hyperspell/types/integration_list_response.py b/src/hyperspell/types/integration_list_response.py index f96fa881..d72e3cbb 100644 --- a/src/hyperspell/types/integration_list_response.py +++ b/src/hyperspell/types/integration_list_response.py @@ -45,6 +45,7 @@ class Integration(BaseModel): "hubspot", "salesforce", "coda", + "lightfield", ] """The integration's provider""" diff --git a/src/hyperspell/types/integrations/web_crawler_index_response.py b/src/hyperspell/types/integrations/web_crawler_index_response.py index 386a8c49..ac939a55 100644 --- a/src/hyperspell/types/integrations/web_crawler_index_response.py +++ b/src/hyperspell/types/integrations/web_crawler_index_response.py @@ -31,6 +31,7 @@ class WebCrawlerIndexResponse(BaseModel): "hubspot", "salesforce", "coda", + "lightfield", ] status: Literal["pending", "processing", "completed", "failed", "pending_review", "skipped"] diff --git a/src/hyperspell/types/memory.py b/src/hyperspell/types/memory.py index 8f8517ea..e1debfcc 100644 --- a/src/hyperspell/types/memory.py +++ b/src/hyperspell/types/memory.py @@ -37,6 +37,7 @@ class Memory(BaseModel): "hubspot", "salesforce", "coda", + "lightfield", ] type: str diff --git a/src/hyperspell/types/memory_delete_response.py b/src/hyperspell/types/memory_delete_response.py index 6f9af141..a5e77ee0 100644 --- a/src/hyperspell/types/memory_delete_response.py +++ b/src/hyperspell/types/memory_delete_response.py @@ -35,6 +35,7 @@ class MemoryDeleteResponse(BaseModel): "hubspot", "salesforce", "coda", + "lightfield", ] success: bool diff --git a/src/hyperspell/types/memory_list_params.py b/src/hyperspell/types/memory_list_params.py index 03accaa1..b146af64 100644 --- a/src/hyperspell/types/memory_list_params.py +++ b/src/hyperspell/types/memory_list_params.py @@ -44,6 +44,7 @@ class MemoryListParams(TypedDict, total=False): "hubspot", "salesforce", "coda", + "lightfield", ] ] """Filter documents by source.""" diff --git a/src/hyperspell/types/memory_search_params.py b/src/hyperspell/types/memory_search_params.py index 8abd5348..af8d59ef 100644 --- a/src/hyperspell/types/memory_search_params.py +++ b/src/hyperspell/types/memory_search_params.py @@ -70,6 +70,7 @@ class MemorySearchParams(TypedDict, total=False): "hubspot", "salesforce", "coda", + "lightfield", ] ] """Only query documents from these sources.""" diff --git a/src/hyperspell/types/memory_status.py b/src/hyperspell/types/memory_status.py index c5f5d912..ae92d78f 100644 --- a/src/hyperspell/types/memory_status.py +++ b/src/hyperspell/types/memory_status.py @@ -31,6 +31,7 @@ class MemoryStatus(BaseModel): "hubspot", "salesforce", "coda", + "lightfield", ] status: Literal["pending", "processing", "completed", "failed", "pending_review", "skipped"] diff --git a/src/hyperspell/types/memory_update_params.py b/src/hyperspell/types/memory_update_params.py index 505373a4..24b72420 100644 --- a/src/hyperspell/types/memory_update_params.py +++ b/src/hyperspell/types/memory_update_params.py @@ -34,6 +34,7 @@ class MemoryUpdateParams(TypedDict, total=False): "hubspot", "salesforce", "coda", + "lightfield", ] ] diff --git a/src/hyperspell/types/shared/resource.py b/src/hyperspell/types/shared/resource.py index 1f7084ff..e2ec6343 100644 --- a/src/hyperspell/types/shared/resource.py +++ b/src/hyperspell/types/shared/resource.py @@ -33,6 +33,7 @@ class Resource(BaseModel): "hubspot", "salesforce", "coda", + "lightfield", ] folder_ancestors: Optional[List[str]] = None From 9bdc36238faeadd39c22d177966111c00a1f001a Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 27 May 2026 23:30:50 +0000 Subject: [PATCH 42/56] codegen metadata --- .stats.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index 9c77ed91..a70a056e 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 30 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/hyperspell/hyperspell-feee340a746833ce5d11da1ac2b1ceb543d72c923a3e520120ca1a85722ad19e.yml -openapi_spec_hash: fc6079b58022a3ab9aa513729dacbf64 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/hyperspell/hyperspell-50d9e60138e8f37a49c24401dbbaffd32d1a468030e5b791bab75bd63e5e8648.yml +openapi_spec_hash: 52fe32c51e8ff712ad35940c928086f6 config_hash: 597eba5e5eaec83a5f0db3d946af8db5 From 11362d176d460f15fbd139dea7701af4a8380752 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Thu, 28 May 2026 19:30:57 +0000 Subject: [PATCH 43/56] codegen metadata --- .stats.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index a70a056e..9907baa1 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 30 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/hyperspell/hyperspell-50d9e60138e8f37a49c24401dbbaffd32d1a468030e5b791bab75bd63e5e8648.yml -openapi_spec_hash: 52fe32c51e8ff712ad35940c928086f6 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/hyperspell/hyperspell-a48110f0ec14e9e1057ba66017ef59291f83d8bb50b284c0498b017d23d579e9.yml +openapi_spec_hash: 9cb303d8c53e5588a122eb8da6e7ad3f config_hash: 597eba5e5eaec83a5f0db3d946af8db5 From 542fb7b28ed73b52f485327512604fce0fdfd70f Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Thu, 28 May 2026 23:30:47 +0000 Subject: [PATCH 44/56] codegen metadata --- .stats.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index 9907baa1..a70a056e 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 30 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/hyperspell/hyperspell-a48110f0ec14e9e1057ba66017ef59291f83d8bb50b284c0498b017d23d579e9.yml -openapi_spec_hash: 9cb303d8c53e5588a122eb8da6e7ad3f +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/hyperspell/hyperspell-50d9e60138e8f37a49c24401dbbaffd32d1a468030e5b791bab75bd63e5e8648.yml +openapi_spec_hash: 52fe32c51e8ff712ad35940c928086f6 config_hash: 597eba5e5eaec83a5f0db3d946af8db5 From e160f73c629eff27681b2d13d8cdd9c645cad17e Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Fri, 29 May 2026 03:30:55 +0000 Subject: [PATCH 45/56] feat(api): api update --- .stats.yml | 4 ++-- src/hyperspell/resources/actions.py | 4 ++++ src/hyperspell/resources/memories.py | 10 ++++++++++ src/hyperspell/types/action_add_reaction_params.py | 1 + src/hyperspell/types/action_send_message_params.py | 1 + src/hyperspell/types/auth_me_response.py | 2 ++ src/hyperspell/types/connection_list_response.py | 1 + src/hyperspell/types/integration_list_response.py | 1 + .../types/integrations/web_crawler_index_response.py | 1 + src/hyperspell/types/memory.py | 1 + src/hyperspell/types/memory_delete_response.py | 1 + src/hyperspell/types/memory_list_params.py | 1 + src/hyperspell/types/memory_search_params.py | 1 + src/hyperspell/types/memory_status.py | 1 + src/hyperspell/types/memory_update_params.py | 1 + src/hyperspell/types/shared/resource.py | 1 + 16 files changed, 30 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index a70a056e..c85b8c7e 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 30 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/hyperspell/hyperspell-50d9e60138e8f37a49c24401dbbaffd32d1a468030e5b791bab75bd63e5e8648.yml -openapi_spec_hash: 52fe32c51e8ff712ad35940c928086f6 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/hyperspell/hyperspell-cec6507dd37a73b074fd57ef2cd54479cddf3d5efceab2d36b906485ed36ec86.yml +openapi_spec_hash: 58ed64e4179f15f76c7ca0cef2e68f03 config_hash: 597eba5e5eaec83a5f0db3d946af8db5 diff --git a/src/hyperspell/resources/actions.py b/src/hyperspell/resources/actions.py index 1f3f7d0e..6cb1bbc1 100644 --- a/src/hyperspell/resources/actions.py +++ b/src/hyperspell/resources/actions.py @@ -67,6 +67,7 @@ def add_reaction( "gmail_actions", "granola", "fathom", + "fireflies", "linear", "hubspot", "salesforce", @@ -142,6 +143,7 @@ def send_message( "gmail_actions", "granola", "fathom", + "fireflies", "linear", "hubspot", "salesforce", @@ -242,6 +244,7 @@ async def add_reaction( "gmail_actions", "granola", "fathom", + "fireflies", "linear", "hubspot", "salesforce", @@ -317,6 +320,7 @@ async def send_message( "gmail_actions", "granola", "fathom", + "fireflies", "linear", "hubspot", "salesforce", diff --git a/src/hyperspell/resources/memories.py b/src/hyperspell/resources/memories.py index 076c7860..61c38222 100644 --- a/src/hyperspell/resources/memories.py +++ b/src/hyperspell/resources/memories.py @@ -81,6 +81,7 @@ def update( "gmail_actions", "granola", "fathom", + "fireflies", "linear", "hubspot", "salesforce", @@ -176,6 +177,7 @@ def list( "gmail_actions", "granola", "fathom", + "fireflies", "linear", "hubspot", "salesforce", @@ -261,6 +263,7 @@ def delete( "gmail_actions", "granola", "fathom", + "fireflies", "linear", "hubspot", "salesforce", @@ -442,6 +445,7 @@ def get( "gmail_actions", "granola", "fathom", + "fireflies", "linear", "hubspot", "salesforce", @@ -505,6 +509,7 @@ def search( "gmail_actions", "granola", "fathom", + "fireflies", "linear", "hubspot", "salesforce", @@ -693,6 +698,7 @@ async def update( "gmail_actions", "granola", "fathom", + "fireflies", "linear", "hubspot", "salesforce", @@ -788,6 +794,7 @@ def list( "gmail_actions", "granola", "fathom", + "fireflies", "linear", "hubspot", "salesforce", @@ -873,6 +880,7 @@ async def delete( "gmail_actions", "granola", "fathom", + "fireflies", "linear", "hubspot", "salesforce", @@ -1054,6 +1062,7 @@ async def get( "gmail_actions", "granola", "fathom", + "fireflies", "linear", "hubspot", "salesforce", @@ -1117,6 +1126,7 @@ async def search( "gmail_actions", "granola", "fathom", + "fireflies", "linear", "hubspot", "salesforce", diff --git a/src/hyperspell/types/action_add_reaction_params.py b/src/hyperspell/types/action_add_reaction_params.py index 618cacd4..5bd9d41f 100644 --- a/src/hyperspell/types/action_add_reaction_params.py +++ b/src/hyperspell/types/action_add_reaction_params.py @@ -33,6 +33,7 @@ class ActionAddReactionParams(TypedDict, total=False): "gmail_actions", "granola", "fathom", + "fireflies", "linear", "hubspot", "salesforce", diff --git a/src/hyperspell/types/action_send_message_params.py b/src/hyperspell/types/action_send_message_params.py index a7af7988..56da6bd7 100644 --- a/src/hyperspell/types/action_send_message_params.py +++ b/src/hyperspell/types/action_send_message_params.py @@ -27,6 +27,7 @@ class ActionSendMessageParams(TypedDict, total=False): "gmail_actions", "granola", "fathom", + "fireflies", "linear", "hubspot", "salesforce", diff --git a/src/hyperspell/types/auth_me_response.py b/src/hyperspell/types/auth_me_response.py index fb5e0815..1232ee92 100644 --- a/src/hyperspell/types/auth_me_response.py +++ b/src/hyperspell/types/auth_me_response.py @@ -50,6 +50,7 @@ class AuthMeResponse(BaseModel): "gmail_actions", "granola", "fathom", + "fireflies", "linear", "hubspot", "salesforce", @@ -77,6 +78,7 @@ class AuthMeResponse(BaseModel): "gmail_actions", "granola", "fathom", + "fireflies", "linear", "hubspot", "salesforce", diff --git a/src/hyperspell/types/connection_list_response.py b/src/hyperspell/types/connection_list_response.py index 02ae4384..da54b21a 100644 --- a/src/hyperspell/types/connection_list_response.py +++ b/src/hyperspell/types/connection_list_response.py @@ -35,6 +35,7 @@ class Connection(BaseModel): "gmail_actions", "granola", "fathom", + "fireflies", "linear", "hubspot", "salesforce", diff --git a/src/hyperspell/types/integration_list_response.py b/src/hyperspell/types/integration_list_response.py index d72e3cbb..04d6d807 100644 --- a/src/hyperspell/types/integration_list_response.py +++ b/src/hyperspell/types/integration_list_response.py @@ -41,6 +41,7 @@ class Integration(BaseModel): "gmail_actions", "granola", "fathom", + "fireflies", "linear", "hubspot", "salesforce", diff --git a/src/hyperspell/types/integrations/web_crawler_index_response.py b/src/hyperspell/types/integrations/web_crawler_index_response.py index ac939a55..c8b9dca6 100644 --- a/src/hyperspell/types/integrations/web_crawler_index_response.py +++ b/src/hyperspell/types/integrations/web_crawler_index_response.py @@ -27,6 +27,7 @@ class WebCrawlerIndexResponse(BaseModel): "gmail_actions", "granola", "fathom", + "fireflies", "linear", "hubspot", "salesforce", diff --git a/src/hyperspell/types/memory.py b/src/hyperspell/types/memory.py index e1debfcc..ab77fc03 100644 --- a/src/hyperspell/types/memory.py +++ b/src/hyperspell/types/memory.py @@ -33,6 +33,7 @@ class Memory(BaseModel): "gmail_actions", "granola", "fathom", + "fireflies", "linear", "hubspot", "salesforce", diff --git a/src/hyperspell/types/memory_delete_response.py b/src/hyperspell/types/memory_delete_response.py index a5e77ee0..ea0b4ed1 100644 --- a/src/hyperspell/types/memory_delete_response.py +++ b/src/hyperspell/types/memory_delete_response.py @@ -31,6 +31,7 @@ class MemoryDeleteResponse(BaseModel): "gmail_actions", "granola", "fathom", + "fireflies", "linear", "hubspot", "salesforce", diff --git a/src/hyperspell/types/memory_list_params.py b/src/hyperspell/types/memory_list_params.py index b146af64..9c12ba88 100644 --- a/src/hyperspell/types/memory_list_params.py +++ b/src/hyperspell/types/memory_list_params.py @@ -40,6 +40,7 @@ class MemoryListParams(TypedDict, total=False): "gmail_actions", "granola", "fathom", + "fireflies", "linear", "hubspot", "salesforce", diff --git a/src/hyperspell/types/memory_search_params.py b/src/hyperspell/types/memory_search_params.py index af8d59ef..2e2cb797 100644 --- a/src/hyperspell/types/memory_search_params.py +++ b/src/hyperspell/types/memory_search_params.py @@ -66,6 +66,7 @@ class MemorySearchParams(TypedDict, total=False): "gmail_actions", "granola", "fathom", + "fireflies", "linear", "hubspot", "salesforce", diff --git a/src/hyperspell/types/memory_status.py b/src/hyperspell/types/memory_status.py index ae92d78f..440cbbda 100644 --- a/src/hyperspell/types/memory_status.py +++ b/src/hyperspell/types/memory_status.py @@ -27,6 +27,7 @@ class MemoryStatus(BaseModel): "gmail_actions", "granola", "fathom", + "fireflies", "linear", "hubspot", "salesforce", diff --git a/src/hyperspell/types/memory_update_params.py b/src/hyperspell/types/memory_update_params.py index 24b72420..d899f850 100644 --- a/src/hyperspell/types/memory_update_params.py +++ b/src/hyperspell/types/memory_update_params.py @@ -30,6 +30,7 @@ class MemoryUpdateParams(TypedDict, total=False): "gmail_actions", "granola", "fathom", + "fireflies", "linear", "hubspot", "salesforce", diff --git a/src/hyperspell/types/shared/resource.py b/src/hyperspell/types/shared/resource.py index e2ec6343..b91d0142 100644 --- a/src/hyperspell/types/shared/resource.py +++ b/src/hyperspell/types/shared/resource.py @@ -29,6 +29,7 @@ class Resource(BaseModel): "gmail_actions", "granola", "fathom", + "fireflies", "linear", "hubspot", "salesforce", From a95dee2cb72e8c64be1a4523d7325848c6d9e227 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 3 Jun 2026 00:30:56 +0000 Subject: [PATCH 46/56] feat(api): api update --- .stats.yml | 4 +- src/hyperspell/resources/memories.py | 20 ++++- src/hyperspell/types/memory_search_params.py | 10 ++- src/hyperspell/types/shared/query_result.py | 89 +++++++++++++++++++- tests/api_resources/test_memories.py | 2 + 5 files changed, 119 insertions(+), 6 deletions(-) diff --git a/.stats.yml b/.stats.yml index c85b8c7e..d7cb9a60 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 30 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/hyperspell/hyperspell-cec6507dd37a73b074fd57ef2cd54479cddf3d5efceab2d36b906485ed36ec86.yml -openapi_spec_hash: 58ed64e4179f15f76c7ca0cef2e68f03 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/hyperspell/hyperspell-493dec570e1a8889531cb2ffe48bf1759158ebed34704a75c765b8166e6d1924.yml +openapi_spec_hash: 2a812af080706b2e63bee6ad9707c567 config_hash: 597eba5e5eaec83a5f0db3d946af8db5 diff --git a/src/hyperspell/resources/memories.py b/src/hyperspell/resources/memories.py index 61c38222..5e7f80c3 100644 --- a/src/hyperspell/resources/memories.py +++ b/src/hyperspell/resources/memories.py @@ -488,9 +488,10 @@ def search( *, query: str, answer: bool | Omit = omit, - effort: Literal["minimal", "low", "medium", "high"] | Omit = omit, + effort: Literal["minimal", "low", "medium", "high", "very_high"] | Omit = omit, max_results: int | Omit = omit, options: memory_search_params.Options | Omit = omit, + provenance: bool | Omit = omit, sources: List[ Literal[ "reddit", @@ -545,6 +546,12 @@ def search( options: Search options for the query. + provenance: + If true (effort='very_high' only), attach a provenance record to the response: + the source documents and entities the answer was grounded in, the agent's search + trajectory, and any sources that failed. Adds one indexed lookup; intended for + auditability / compliance use cases. + sources: Only query documents from these sources. extra_headers: Send extra headers @@ -564,6 +571,7 @@ def search( "effort": effort, "max_results": max_results, "options": options, + "provenance": provenance, "sources": sources, }, memory_search_params.MemorySearchParams, @@ -1105,9 +1113,10 @@ async def search( *, query: str, answer: bool | Omit = omit, - effort: Literal["minimal", "low", "medium", "high"] | Omit = omit, + effort: Literal["minimal", "low", "medium", "high", "very_high"] | Omit = omit, max_results: int | Omit = omit, options: memory_search_params.Options | Omit = omit, + provenance: bool | Omit = omit, sources: List[ Literal[ "reddit", @@ -1162,6 +1171,12 @@ async def search( options: Search options for the query. + provenance: + If true (effort='very_high' only), attach a provenance record to the response: + the source documents and entities the answer was grounded in, the agent's search + trajectory, and any sources that failed. Adds one indexed lookup; intended for + auditability / compliance use cases. + sources: Only query documents from these sources. extra_headers: Send extra headers @@ -1181,6 +1196,7 @@ async def search( "effort": effort, "max_results": max_results, "options": options, + "provenance": provenance, "sources": sources, }, memory_search_params.MemorySearchParams, diff --git a/src/hyperspell/types/memory_search_params.py b/src/hyperspell/types/memory_search_params.py index 2e2cb797..00fd8039 100644 --- a/src/hyperspell/types/memory_search_params.py +++ b/src/hyperspell/types/memory_search_params.py @@ -31,7 +31,7 @@ class MemorySearchParams(TypedDict, total=False): answer: bool """If true, the query will be answered along with matching source documents.""" - effort: Literal["minimal", "low", "medium", "high"] + effort: Literal["minimal", "low", "medium", "high", "very_high"] """How much compute to spend on retrieval. Mirrors the dial popularized by frontier-model APIs (OpenAI reasoning_effort, @@ -48,6 +48,14 @@ class MemorySearchParams(TypedDict, total=False): options: Options """Search options for the query.""" + provenance: bool + """ + If true (effort='very_high' only), attach a provenance record to the response: + the source documents and entities the answer was grounded in, the agent's search + trajectory, and any sources that failed. Adds one indexed lookup; intended for + auditability / compliance use cases. + """ + sources: List[ Literal[ "reddit", diff --git a/src/hyperspell/types/shared/query_result.py b/src/hyperspell/types/shared/query_result.py index 99efa3d0..eb4b115f 100644 --- a/src/hyperspell/types/shared/query_result.py +++ b/src/hyperspell/types/shared/query_result.py @@ -1,11 +1,90 @@ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. from typing import Dict, List, Optional +from typing_extensions import Literal from .resource import Resource from ..._models import BaseModel -__all__ = ["QueryResult"] +__all__ = ["QueryResult", "Provenance", "ProvenanceEntity", "ProvenanceSource", "ProvenanceStep"] + + +class ProvenanceEntity(BaseModel): + """A canonical entity referenced by the answer's source documents.""" + + id: str + + name: str + + type: str + + +class ProvenanceSource(BaseModel): + """A source document that informed the final answer (the post-rank result set).""" + + resource_id: str + + source: Literal[ + "reddit", + "notion", + "slack", + "google_calendar", + "google_mail", + "box", + "dropbox", + "github", + "google_drive", + "vault", + "web_crawler", + "trace", + "microsoft_teams", + "gmail_actions", + "granola", + "fathom", + "fireflies", + "linear", + "hubspot", + "salesforce", + "coda", + "lightfield", + ] + + score: Optional[float] = None + + title: Optional[str] = None + + +class ProvenanceStep(BaseModel): + """One tool invocation in the agent's search trajectory (audit trail).""" + + iteration: int + + status: str + + tool: str + + query: Optional[str] = None + + result_count: Optional[int] = None + + source: Optional[str] = None + + +class Provenance(BaseModel): + """Auditability record attached to an agentic answer. + + Gated behind ``provenance=true`` on the request: the cheap parts (sources, + steps, failed_sources) are derived from in-memory loop state, but ``entities`` + costs one indexed DB lookup, so the whole record is only built on request. + """ + + entities: Optional[List[ProvenanceEntity]] = None + + failed_sources: Optional[List[str]] = None + + sources: Optional[List[ProvenanceSource]] = None + + steps: Optional[List[ProvenanceStep]] = None class QueryResult(BaseModel): @@ -21,6 +100,14 @@ class QueryResult(BaseModel): shown to the user. """ + provenance: Optional[Provenance] = None + """Auditability record attached to an agentic answer. + + Gated behind `provenance=true` on the request: the cheap parts (sources, steps, + failed_sources) are derived from in-memory loop state, but `entities` costs one + indexed DB lookup, so the whole record is only built on request. + """ + query_id: Optional[str] = None """The ID of the query. diff --git a/tests/api_resources/test_memories.py b/tests/api_resources/test_memories.py index 2108b62e..1f8664e3 100644 --- a/tests/api_resources/test_memories.py +++ b/tests/api_resources/test_memories.py @@ -338,6 +338,7 @@ def test_method_search_with_all_params(self, client: Hyperspell) -> None: "weight": 0, }, }, + provenance=True, sources=["vault"], ) assert_matches_type(QueryResult, memory, path=["response"]) @@ -749,6 +750,7 @@ async def test_method_search_with_all_params(self, async_client: AsyncHyperspell "weight": 0, }, }, + provenance=True, sources=["vault"], ) assert_matches_type(QueryResult, memory, path=["response"]) From 6d4f38fc85ee8ffaad471581156bc473e431c4b0 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Thu, 4 Jun 2026 17:30:58 +0000 Subject: [PATCH 47/56] codegen metadata --- .stats.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index d7cb9a60..d1d4c4e4 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 30 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/hyperspell/hyperspell-493dec570e1a8889531cb2ffe48bf1759158ebed34704a75c765b8166e6d1924.yml -openapi_spec_hash: 2a812af080706b2e63bee6ad9707c567 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/hyperspell/hyperspell-a53c00064ad904308dd95d318d5b0d12e92908d69c7f5077280099cbae2e3d2d.yml +openapi_spec_hash: 2a412fc5b51b96e1e49fc7fba9b4d9b3 config_hash: 597eba5e5eaec83a5f0db3d946af8db5 From 7cea99d60810d453d8d3e8d8e40582746103f158 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Thu, 4 Jun 2026 18:31:00 +0000 Subject: [PATCH 48/56] codegen metadata --- .stats.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index d1d4c4e4..d9ef6be9 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 30 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/hyperspell/hyperspell-a53c00064ad904308dd95d318d5b0d12e92908d69c7f5077280099cbae2e3d2d.yml -openapi_spec_hash: 2a412fc5b51b96e1e49fc7fba9b4d9b3 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/hyperspell/hyperspell-22273790272ed8e902664f76fa66c1953ce3334559fca6f37f988a33b0674ba2.yml +openapi_spec_hash: 98c40dfed4177be137a863767541ba68 config_hash: 597eba5e5eaec83a5f0db3d946af8db5 From 42817b5252919abb3a82b7c2bcb0c2cb5767c36a Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Thu, 4 Jun 2026 20:31:27 +0000 Subject: [PATCH 49/56] codegen metadata --- .stats.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index d9ef6be9..92d6f82c 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 30 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/hyperspell/hyperspell-22273790272ed8e902664f76fa66c1953ce3334559fca6f37f988a33b0674ba2.yml -openapi_spec_hash: 98c40dfed4177be137a863767541ba68 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/hyperspell/hyperspell-00a9ee3f1daef1d1862a32e05d5c50bec86c4cf09d7e0b7db0581c46c90360ce.yml +openapi_spec_hash: f9a3e210aeaecc0ee43fd7a935f1a9a8 config_hash: 597eba5e5eaec83a5f0db3d946af8db5 From e991d68d0bd84df2fc52804c431a03127374d1bb Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 10 Jun 2026 17:30:54 +0000 Subject: [PATCH 50/56] feat(api): api update --- .stats.yml | 4 ++-- src/hyperspell/types/shared/query_result.py | 3 +++ 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index 92d6f82c..2ec906d7 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 30 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/hyperspell/hyperspell-00a9ee3f1daef1d1862a32e05d5c50bec86c4cf09d7e0b7db0581c46c90360ce.yml -openapi_spec_hash: f9a3e210aeaecc0ee43fd7a935f1a9a8 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/hyperspell/hyperspell-b7a1ecaac1eea2cd3acc2c309ed9834bd85263d5df5f4af61ca0dbc5936e1c7e.yml +openapi_spec_hash: 9f93b7d272ef2483d41541a571285269 config_hash: 597eba5e5eaec83a5f0db3d946af8db5 diff --git a/src/hyperspell/types/shared/query_result.py b/src/hyperspell/types/shared/query_result.py index eb4b115f..4b5d806a 100644 --- a/src/hyperspell/types/shared/query_result.py +++ b/src/hyperspell/types/shared/query_result.py @@ -108,6 +108,9 @@ class QueryResult(BaseModel): indexed DB lookup, so the whole record is only built on request. """ + query: Optional[str] = None + """The query string that was issued.""" + query_id: Optional[str] = None """The ID of the query. From cb78a3e76e04a5ead28e3ea0d5433d05cc6a64d1 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 10 Jun 2026 20:25:13 +0000 Subject: [PATCH 51/56] feat(api): manual updates --- .stats.yml | 6 +- api.md | 7 +- src/hyperspell/resources/evaluate.py | 113 +++++++++++++++++- src/hyperspell/types/__init__.py | 2 + .../types/evaluate_queries_params.py | 17 +++ .../types/evaluate_queries_response.py | 28 +++++ tests/api_resources/test_evaluate.py | 69 +++++++++++ 7 files changed, 237 insertions(+), 5 deletions(-) create mode 100644 src/hyperspell/types/evaluate_queries_params.py create mode 100644 src/hyperspell/types/evaluate_queries_response.py diff --git a/.stats.yml b/.stats.yml index 2ec906d7..688d7684 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ -configured_endpoints: 30 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/hyperspell/hyperspell-b7a1ecaac1eea2cd3acc2c309ed9834bd85263d5df5f4af61ca0dbc5936e1c7e.yml +configured_endpoints: 31 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/hyperspell/hyperspell-66d3859b605874f1c8adf23444ec4da5935c5dbbbbfffcd0864bba8399990d3f.yml openapi_spec_hash: 9f93b7d272ef2483d41541a571285269 -config_hash: 597eba5e5eaec83a5f0db3d946af8db5 +config_hash: 6c457bd34b7d189135ae61619da59f44 diff --git a/api.md b/api.md index b7b2c535..bb54e3d7 100644 --- a/api.md +++ b/api.md @@ -111,12 +111,17 @@ Methods: Types: ```python -from hyperspell.types import EvaluateScoreHighlightResponse, EvaluateScoreQueryResponse +from hyperspell.types import ( + EvaluateQueriesResponse, + EvaluateScoreHighlightResponse, + EvaluateScoreQueryResponse, +) ``` Methods: - client.evaluate.get_query(query_id) -> QueryResult +- client.evaluate.queries(\*\*params) -> EvaluateQueriesResponse - client.evaluate.score_highlight(highlight_id, \*\*params) -> EvaluateScoreHighlightResponse - client.evaluate.score_query(query_id, \*\*params) -> EvaluateScoreQueryResponse diff --git a/src/hyperspell/resources/evaluate.py b/src/hyperspell/resources/evaluate.py index 02b1c4d1..be7ad318 100644 --- a/src/hyperspell/resources/evaluate.py +++ b/src/hyperspell/resources/evaluate.py @@ -6,7 +6,7 @@ import httpx -from ..types import evaluate_score_query_params, evaluate_score_highlight_params +from ..types import evaluate_queries_params, evaluate_score_query_params, evaluate_score_highlight_params from .._types import Body, Omit, Query, Headers, NotGiven, omit, not_given from .._utils import path_template, maybe_transform, async_maybe_transform from .._compat import cached_property @@ -19,6 +19,7 @@ ) from .._base_client import make_request_options from ..types.shared.query_result import QueryResult +from ..types.evaluate_queries_response import EvaluateQueriesResponse from ..types.evaluate_score_query_response import EvaluateScoreQueryResponse from ..types.evaluate_score_highlight_response import EvaluateScoreHighlightResponse @@ -78,6 +79,55 @@ def get_query( cast_to=QueryResult, ) + def queries( + self, + *, + cursor: Optional[str] | Omit = omit, + size: int | Omit = omit, + user_id: Optional[str] | Omit = omit, + # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. + # The extra values given here take precedence over values defined on the client or passed to this method. + extra_headers: Headers | None = None, + extra_query: Query | None = None, + extra_body: Body | None = None, + timeout: float | httpx.Timeout | None | NotGiven = not_given, + ) -> EvaluateQueriesResponse: + """ + Paginate through all prior queries for the app, newest first. + + User tokens only see their own queries; admin tokens see every query in the app + and can narrow to a single user with the `user_id` filter. + + Args: + user_id: Filter queries by the user that issued them. + + extra_headers: Send extra headers + + extra_query: Add additional query parameters to the request + + extra_body: Add additional JSON properties to the request + + timeout: Override the client-level default timeout for this request, in seconds + """ + return self._get( + "/evaluate/queries", + options=make_request_options( + extra_headers=extra_headers, + extra_query=extra_query, + extra_body=extra_body, + timeout=timeout, + query=maybe_transform( + { + "cursor": cursor, + "size": size, + "user_id": user_id, + }, + evaluate_queries_params.EvaluateQueriesParams, + ), + ), + cast_to=EvaluateQueriesResponse, + ) + def score_highlight( self, highlight_id: str, @@ -215,6 +265,55 @@ async def get_query( cast_to=QueryResult, ) + async def queries( + self, + *, + cursor: Optional[str] | Omit = omit, + size: int | Omit = omit, + user_id: Optional[str] | Omit = omit, + # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. + # The extra values given here take precedence over values defined on the client or passed to this method. + extra_headers: Headers | None = None, + extra_query: Query | None = None, + extra_body: Body | None = None, + timeout: float | httpx.Timeout | None | NotGiven = not_given, + ) -> EvaluateQueriesResponse: + """ + Paginate through all prior queries for the app, newest first. + + User tokens only see their own queries; admin tokens see every query in the app + and can narrow to a single user with the `user_id` filter. + + Args: + user_id: Filter queries by the user that issued them. + + extra_headers: Send extra headers + + extra_query: Add additional query parameters to the request + + extra_body: Add additional JSON properties to the request + + timeout: Override the client-level default timeout for this request, in seconds + """ + return await self._get( + "/evaluate/queries", + options=make_request_options( + extra_headers=extra_headers, + extra_query=extra_query, + extra_body=extra_body, + timeout=timeout, + query=await async_maybe_transform( + { + "cursor": cursor, + "size": size, + "user_id": user_id, + }, + evaluate_queries_params.EvaluateQueriesParams, + ), + ), + cast_to=EvaluateQueriesResponse, + ) + async def score_highlight( self, highlight_id: str, @@ -306,6 +405,9 @@ def __init__(self, evaluate: EvaluateResource) -> None: self.get_query = to_raw_response_wrapper( evaluate.get_query, ) + self.queries = to_raw_response_wrapper( + evaluate.queries, + ) self.score_highlight = to_raw_response_wrapper( evaluate.score_highlight, ) @@ -321,6 +423,9 @@ def __init__(self, evaluate: AsyncEvaluateResource) -> None: self.get_query = async_to_raw_response_wrapper( evaluate.get_query, ) + self.queries = async_to_raw_response_wrapper( + evaluate.queries, + ) self.score_highlight = async_to_raw_response_wrapper( evaluate.score_highlight, ) @@ -336,6 +441,9 @@ def __init__(self, evaluate: EvaluateResource) -> None: self.get_query = to_streamed_response_wrapper( evaluate.get_query, ) + self.queries = to_streamed_response_wrapper( + evaluate.queries, + ) self.score_highlight = to_streamed_response_wrapper( evaluate.score_highlight, ) @@ -351,6 +459,9 @@ def __init__(self, evaluate: AsyncEvaluateResource) -> None: self.get_query = async_to_streamed_response_wrapper( evaluate.get_query, ) + self.queries = async_to_streamed_response_wrapper( + evaluate.queries, + ) self.score_highlight = async_to_streamed_response_wrapper( evaluate.score_highlight, ) diff --git a/src/hyperspell/types/__init__.py b/src/hyperspell/types/__init__.py index ce27266d..cbd9ace0 100644 --- a/src/hyperspell/types/__init__.py +++ b/src/hyperspell/types/__init__.py @@ -21,9 +21,11 @@ from .memory_add_bulk_params import MemoryAddBulkParams as MemoryAddBulkParams from .memory_delete_response import MemoryDeleteResponse as MemoryDeleteResponse from .memory_status_response import MemoryStatusResponse as MemoryStatusResponse +from .evaluate_queries_params import EvaluateQueriesParams as EvaluateQueriesParams from .connection_list_response import ConnectionListResponse as ConnectionListResponse from .memory_add_bulk_response import MemoryAddBulkResponse as MemoryAddBulkResponse from .auth_delete_user_response import AuthDeleteUserResponse as AuthDeleteUserResponse +from .evaluate_queries_response import EvaluateQueriesResponse as EvaluateQueriesResponse from .integration_list_response import IntegrationListResponse as IntegrationListResponse from .action_add_reaction_params import ActionAddReactionParams as ActionAddReactionParams from .action_send_message_params import ActionSendMessageParams as ActionSendMessageParams diff --git a/src/hyperspell/types/evaluate_queries_params.py b/src/hyperspell/types/evaluate_queries_params.py new file mode 100644 index 00000000..c21105cf --- /dev/null +++ b/src/hyperspell/types/evaluate_queries_params.py @@ -0,0 +1,17 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +from __future__ import annotations + +from typing import Optional +from typing_extensions import TypedDict + +__all__ = ["EvaluateQueriesParams"] + + +class EvaluateQueriesParams(TypedDict, total=False): + cursor: Optional[str] + + size: int + + user_id: Optional[str] + """Filter queries by the user that issued them.""" diff --git a/src/hyperspell/types/evaluate_queries_response.py b/src/hyperspell/types/evaluate_queries_response.py new file mode 100644 index 00000000..89796aed --- /dev/null +++ b/src/hyperspell/types/evaluate_queries_response.py @@ -0,0 +1,28 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +from typing import List, Optional +from datetime import datetime + +from .._models import BaseModel + +__all__ = ["EvaluateQueriesResponse", "Item"] + + +class Item(BaseModel): + query: str + """The query string that was issued.""" + + query_id: str + """The ID of the query.""" + + time: datetime + """When the query was issued.""" + + user_id: Optional[str] = None + """The ID of the user that issued the query, if any.""" + + +class EvaluateQueriesResponse(BaseModel): + items: List[Item] + + next_cursor: Optional[str] = None diff --git a/tests/api_resources/test_evaluate.py b/tests/api_resources/test_evaluate.py index c8ab9f33..292f12b7 100644 --- a/tests/api_resources/test_evaluate.py +++ b/tests/api_resources/test_evaluate.py @@ -10,6 +10,7 @@ from hyperspell import Hyperspell, AsyncHyperspell from tests.utils import assert_matches_type from hyperspell.types import ( + EvaluateQueriesResponse, EvaluateScoreQueryResponse, EvaluateScoreHighlightResponse, ) @@ -59,6 +60,40 @@ def test_path_params_get_query(self, client: Hyperspell) -> None: "", ) + @parametrize + def test_method_queries(self, client: Hyperspell) -> None: + evaluate = client.evaluate.queries() + assert_matches_type(EvaluateQueriesResponse, evaluate, path=["response"]) + + @parametrize + def test_method_queries_with_all_params(self, client: Hyperspell) -> None: + evaluate = client.evaluate.queries( + cursor="cursor", + size=0, + user_id="user_id", + ) + assert_matches_type(EvaluateQueriesResponse, evaluate, path=["response"]) + + @parametrize + def test_raw_response_queries(self, client: Hyperspell) -> None: + response = client.evaluate.with_raw_response.queries() + + assert response.is_closed is True + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + evaluate = response.parse() + assert_matches_type(EvaluateQueriesResponse, evaluate, path=["response"]) + + @parametrize + def test_streaming_response_queries(self, client: Hyperspell) -> None: + with client.evaluate.with_streaming_response.queries() as response: + assert not response.is_closed + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + + evaluate = response.parse() + assert_matches_type(EvaluateQueriesResponse, evaluate, path=["response"]) + + assert cast(Any, response.is_closed) is True + @parametrize def test_method_score_highlight(self, client: Hyperspell) -> None: evaluate = client.evaluate.score_highlight( @@ -196,6 +231,40 @@ async def test_path_params_get_query(self, async_client: AsyncHyperspell) -> Non "", ) + @parametrize + async def test_method_queries(self, async_client: AsyncHyperspell) -> None: + evaluate = await async_client.evaluate.queries() + assert_matches_type(EvaluateQueriesResponse, evaluate, path=["response"]) + + @parametrize + async def test_method_queries_with_all_params(self, async_client: AsyncHyperspell) -> None: + evaluate = await async_client.evaluate.queries( + cursor="cursor", + size=0, + user_id="user_id", + ) + assert_matches_type(EvaluateQueriesResponse, evaluate, path=["response"]) + + @parametrize + async def test_raw_response_queries(self, async_client: AsyncHyperspell) -> None: + response = await async_client.evaluate.with_raw_response.queries() + + assert response.is_closed is True + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + evaluate = await response.parse() + assert_matches_type(EvaluateQueriesResponse, evaluate, path=["response"]) + + @parametrize + async def test_streaming_response_queries(self, async_client: AsyncHyperspell) -> None: + async with async_client.evaluate.with_streaming_response.queries() as response: + assert not response.is_closed + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + + evaluate = await response.parse() + assert_matches_type(EvaluateQueriesResponse, evaluate, path=["response"]) + + assert cast(Any, response.is_closed) is True + @parametrize async def test_method_score_highlight(self, async_client: AsyncHyperspell) -> None: evaluate = await async_client.evaluate.score_highlight( From 5e31b8a01c916a8e9afaf744f7bb8e670c8692c4 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 10 Jun 2026 20:25:32 +0000 Subject: [PATCH 52/56] feat(api): manual updates --- .stats.yml | 4 +- api.md | 4 +- src/hyperspell/resources/evaluate.py | 47 +++++++++-------- src/hyperspell/types/__init__.py | 4 +- ...ams.py => evaluate_list_queries_params.py} | 4 +- ...e.py => evaluate_list_queries_response.py} | 12 ++--- tests/api_resources/test_evaluate.py | 51 ++++++++++--------- 7 files changed, 62 insertions(+), 64 deletions(-) rename src/hyperspell/types/{evaluate_queries_params.py => evaluate_list_queries_params.py} (76%) rename src/hyperspell/types/{evaluate_queries_response.py => evaluate_list_queries_response.py} (66%) diff --git a/.stats.yml b/.stats.yml index 688d7684..1bdc1205 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 31 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/hyperspell/hyperspell-66d3859b605874f1c8adf23444ec4da5935c5dbbbbfffcd0864bba8399990d3f.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/hyperspell/hyperspell-b92bcfe4385d275daa16dd9a9552afcd31fa1e4ffa9eb568e2b0f0d61c5d4bf9.yml openapi_spec_hash: 9f93b7d272ef2483d41541a571285269 -config_hash: 6c457bd34b7d189135ae61619da59f44 +config_hash: e94cd277a0f8a93fc9dbadfd0a99ffcb diff --git a/api.md b/api.md index bb54e3d7..a5384fac 100644 --- a/api.md +++ b/api.md @@ -112,7 +112,7 @@ Types: ```python from hyperspell.types import ( - EvaluateQueriesResponse, + EvaluateListQueriesResponse, EvaluateScoreHighlightResponse, EvaluateScoreQueryResponse, ) @@ -121,7 +121,7 @@ from hyperspell.types import ( Methods: - client.evaluate.get_query(query_id) -> QueryResult -- client.evaluate.queries(\*\*params) -> EvaluateQueriesResponse +- client.evaluate.list_queries(\*\*params) -> SyncCursorPage[EvaluateListQueriesResponse] - client.evaluate.score_highlight(highlight_id, \*\*params) -> EvaluateScoreHighlightResponse - client.evaluate.score_query(query_id, \*\*params) -> EvaluateScoreQueryResponse diff --git a/src/hyperspell/resources/evaluate.py b/src/hyperspell/resources/evaluate.py index be7ad318..5dee99db 100644 --- a/src/hyperspell/resources/evaluate.py +++ b/src/hyperspell/resources/evaluate.py @@ -6,7 +6,7 @@ import httpx -from ..types import evaluate_queries_params, evaluate_score_query_params, evaluate_score_highlight_params +from ..types import evaluate_score_query_params, evaluate_list_queries_params, evaluate_score_highlight_params from .._types import Body, Omit, Query, Headers, NotGiven, omit, not_given from .._utils import path_template, maybe_transform, async_maybe_transform from .._compat import cached_property @@ -17,10 +17,11 @@ async_to_raw_response_wrapper, async_to_streamed_response_wrapper, ) -from .._base_client import make_request_options +from ..pagination import SyncCursorPage, AsyncCursorPage +from .._base_client import AsyncPaginator, make_request_options from ..types.shared.query_result import QueryResult -from ..types.evaluate_queries_response import EvaluateQueriesResponse from ..types.evaluate_score_query_response import EvaluateScoreQueryResponse +from ..types.evaluate_list_queries_response import EvaluateListQueriesResponse from ..types.evaluate_score_highlight_response import EvaluateScoreHighlightResponse __all__ = ["EvaluateResource", "AsyncEvaluateResource"] @@ -79,7 +80,7 @@ def get_query( cast_to=QueryResult, ) - def queries( + def list_queries( self, *, cursor: Optional[str] | Omit = omit, @@ -91,7 +92,7 @@ def queries( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = not_given, - ) -> EvaluateQueriesResponse: + ) -> SyncCursorPage[EvaluateListQueriesResponse]: """ Paginate through all prior queries for the app, newest first. @@ -109,8 +110,9 @@ def queries( timeout: Override the client-level default timeout for this request, in seconds """ - return self._get( + return self._get_api_list( "/evaluate/queries", + page=SyncCursorPage[EvaluateListQueriesResponse], options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, @@ -122,10 +124,10 @@ def queries( "size": size, "user_id": user_id, }, - evaluate_queries_params.EvaluateQueriesParams, + evaluate_list_queries_params.EvaluateListQueriesParams, ), ), - cast_to=EvaluateQueriesResponse, + model=EvaluateListQueriesResponse, ) def score_highlight( @@ -265,7 +267,7 @@ async def get_query( cast_to=QueryResult, ) - async def queries( + def list_queries( self, *, cursor: Optional[str] | Omit = omit, @@ -277,7 +279,7 @@ async def queries( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = not_given, - ) -> EvaluateQueriesResponse: + ) -> AsyncPaginator[EvaluateListQueriesResponse, AsyncCursorPage[EvaluateListQueriesResponse]]: """ Paginate through all prior queries for the app, newest first. @@ -295,23 +297,24 @@ async def queries( timeout: Override the client-level default timeout for this request, in seconds """ - return await self._get( + return self._get_api_list( "/evaluate/queries", + page=AsyncCursorPage[EvaluateListQueriesResponse], options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout, - query=await async_maybe_transform( + query=maybe_transform( { "cursor": cursor, "size": size, "user_id": user_id, }, - evaluate_queries_params.EvaluateQueriesParams, + evaluate_list_queries_params.EvaluateListQueriesParams, ), ), - cast_to=EvaluateQueriesResponse, + model=EvaluateListQueriesResponse, ) async def score_highlight( @@ -405,8 +408,8 @@ def __init__(self, evaluate: EvaluateResource) -> None: self.get_query = to_raw_response_wrapper( evaluate.get_query, ) - self.queries = to_raw_response_wrapper( - evaluate.queries, + self.list_queries = to_raw_response_wrapper( + evaluate.list_queries, ) self.score_highlight = to_raw_response_wrapper( evaluate.score_highlight, @@ -423,8 +426,8 @@ def __init__(self, evaluate: AsyncEvaluateResource) -> None: self.get_query = async_to_raw_response_wrapper( evaluate.get_query, ) - self.queries = async_to_raw_response_wrapper( - evaluate.queries, + self.list_queries = async_to_raw_response_wrapper( + evaluate.list_queries, ) self.score_highlight = async_to_raw_response_wrapper( evaluate.score_highlight, @@ -441,8 +444,8 @@ def __init__(self, evaluate: EvaluateResource) -> None: self.get_query = to_streamed_response_wrapper( evaluate.get_query, ) - self.queries = to_streamed_response_wrapper( - evaluate.queries, + self.list_queries = to_streamed_response_wrapper( + evaluate.list_queries, ) self.score_highlight = to_streamed_response_wrapper( evaluate.score_highlight, @@ -459,8 +462,8 @@ def __init__(self, evaluate: AsyncEvaluateResource) -> None: self.get_query = async_to_streamed_response_wrapper( evaluate.get_query, ) - self.queries = async_to_streamed_response_wrapper( - evaluate.queries, + self.list_queries = async_to_streamed_response_wrapper( + evaluate.list_queries, ) self.score_highlight = async_to_streamed_response_wrapper( evaluate.score_highlight, diff --git a/src/hyperspell/types/__init__.py b/src/hyperspell/types/__init__.py index cbd9ace0..ec89168f 100644 --- a/src/hyperspell/types/__init__.py +++ b/src/hyperspell/types/__init__.py @@ -21,11 +21,9 @@ from .memory_add_bulk_params import MemoryAddBulkParams as MemoryAddBulkParams from .memory_delete_response import MemoryDeleteResponse as MemoryDeleteResponse from .memory_status_response import MemoryStatusResponse as MemoryStatusResponse -from .evaluate_queries_params import EvaluateQueriesParams as EvaluateQueriesParams from .connection_list_response import ConnectionListResponse as ConnectionListResponse from .memory_add_bulk_response import MemoryAddBulkResponse as MemoryAddBulkResponse from .auth_delete_user_response import AuthDeleteUserResponse as AuthDeleteUserResponse -from .evaluate_queries_response import EvaluateQueriesResponse as EvaluateQueriesResponse from .integration_list_response import IntegrationListResponse as IntegrationListResponse from .action_add_reaction_params import ActionAddReactionParams as ActionAddReactionParams from .action_send_message_params import ActionSendMessageParams as ActionSendMessageParams @@ -35,10 +33,12 @@ from .evaluate_score_query_params import EvaluateScoreQueryParams as EvaluateScoreQueryParams from .action_add_reaction_response import ActionAddReactionResponse as ActionAddReactionResponse from .action_send_message_response import ActionSendMessageResponse as ActionSendMessageResponse +from .evaluate_list_queries_params import EvaluateListQueriesParams as EvaluateListQueriesParams from .folder_set_policies_response import FolderSetPoliciesResponse as FolderSetPoliciesResponse from .integration_connect_response import IntegrationConnectResponse as IntegrationConnectResponse from .evaluate_score_query_response import EvaluateScoreQueryResponse as EvaluateScoreQueryResponse from .folder_delete_policy_response import FolderDeletePolicyResponse as FolderDeletePolicyResponse from .folder_list_policies_response import FolderListPoliciesResponse as FolderListPoliciesResponse +from .evaluate_list_queries_response import EvaluateListQueriesResponse as EvaluateListQueriesResponse from .evaluate_score_highlight_params import EvaluateScoreHighlightParams as EvaluateScoreHighlightParams from .evaluate_score_highlight_response import EvaluateScoreHighlightResponse as EvaluateScoreHighlightResponse diff --git a/src/hyperspell/types/evaluate_queries_params.py b/src/hyperspell/types/evaluate_list_queries_params.py similarity index 76% rename from src/hyperspell/types/evaluate_queries_params.py rename to src/hyperspell/types/evaluate_list_queries_params.py index c21105cf..2c9b765d 100644 --- a/src/hyperspell/types/evaluate_queries_params.py +++ b/src/hyperspell/types/evaluate_list_queries_params.py @@ -5,10 +5,10 @@ from typing import Optional from typing_extensions import TypedDict -__all__ = ["EvaluateQueriesParams"] +__all__ = ["EvaluateListQueriesParams"] -class EvaluateQueriesParams(TypedDict, total=False): +class EvaluateListQueriesParams(TypedDict, total=False): cursor: Optional[str] size: int diff --git a/src/hyperspell/types/evaluate_queries_response.py b/src/hyperspell/types/evaluate_list_queries_response.py similarity index 66% rename from src/hyperspell/types/evaluate_queries_response.py rename to src/hyperspell/types/evaluate_list_queries_response.py index 89796aed..1f1692d1 100644 --- a/src/hyperspell/types/evaluate_queries_response.py +++ b/src/hyperspell/types/evaluate_list_queries_response.py @@ -1,14 +1,14 @@ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -from typing import List, Optional +from typing import Optional from datetime import datetime from .._models import BaseModel -__all__ = ["EvaluateQueriesResponse", "Item"] +__all__ = ["EvaluateListQueriesResponse"] -class Item(BaseModel): +class EvaluateListQueriesResponse(BaseModel): query: str """The query string that was issued.""" @@ -20,9 +20,3 @@ class Item(BaseModel): user_id: Optional[str] = None """The ID of the user that issued the query, if any.""" - - -class EvaluateQueriesResponse(BaseModel): - items: List[Item] - - next_cursor: Optional[str] = None diff --git a/tests/api_resources/test_evaluate.py b/tests/api_resources/test_evaluate.py index 292f12b7..6a5cc524 100644 --- a/tests/api_resources/test_evaluate.py +++ b/tests/api_resources/test_evaluate.py @@ -10,10 +10,11 @@ from hyperspell import Hyperspell, AsyncHyperspell from tests.utils import assert_matches_type from hyperspell.types import ( - EvaluateQueriesResponse, EvaluateScoreQueryResponse, + EvaluateListQueriesResponse, EvaluateScoreHighlightResponse, ) +from hyperspell.pagination import SyncCursorPage, AsyncCursorPage from hyperspell.types.shared import QueryResult base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -61,36 +62,36 @@ def test_path_params_get_query(self, client: Hyperspell) -> None: ) @parametrize - def test_method_queries(self, client: Hyperspell) -> None: - evaluate = client.evaluate.queries() - assert_matches_type(EvaluateQueriesResponse, evaluate, path=["response"]) + def test_method_list_queries(self, client: Hyperspell) -> None: + evaluate = client.evaluate.list_queries() + assert_matches_type(SyncCursorPage[EvaluateListQueriesResponse], evaluate, path=["response"]) @parametrize - def test_method_queries_with_all_params(self, client: Hyperspell) -> None: - evaluate = client.evaluate.queries( + def test_method_list_queries_with_all_params(self, client: Hyperspell) -> None: + evaluate = client.evaluate.list_queries( cursor="cursor", size=0, user_id="user_id", ) - assert_matches_type(EvaluateQueriesResponse, evaluate, path=["response"]) + assert_matches_type(SyncCursorPage[EvaluateListQueriesResponse], evaluate, path=["response"]) @parametrize - def test_raw_response_queries(self, client: Hyperspell) -> None: - response = client.evaluate.with_raw_response.queries() + def test_raw_response_list_queries(self, client: Hyperspell) -> None: + response = client.evaluate.with_raw_response.list_queries() assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" evaluate = response.parse() - assert_matches_type(EvaluateQueriesResponse, evaluate, path=["response"]) + assert_matches_type(SyncCursorPage[EvaluateListQueriesResponse], evaluate, path=["response"]) @parametrize - def test_streaming_response_queries(self, client: Hyperspell) -> None: - with client.evaluate.with_streaming_response.queries() as response: + def test_streaming_response_list_queries(self, client: Hyperspell) -> None: + with client.evaluate.with_streaming_response.list_queries() as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" evaluate = response.parse() - assert_matches_type(EvaluateQueriesResponse, evaluate, path=["response"]) + assert_matches_type(SyncCursorPage[EvaluateListQueriesResponse], evaluate, path=["response"]) assert cast(Any, response.is_closed) is True @@ -232,36 +233,36 @@ async def test_path_params_get_query(self, async_client: AsyncHyperspell) -> Non ) @parametrize - async def test_method_queries(self, async_client: AsyncHyperspell) -> None: - evaluate = await async_client.evaluate.queries() - assert_matches_type(EvaluateQueriesResponse, evaluate, path=["response"]) + async def test_method_list_queries(self, async_client: AsyncHyperspell) -> None: + evaluate = await async_client.evaluate.list_queries() + assert_matches_type(AsyncCursorPage[EvaluateListQueriesResponse], evaluate, path=["response"]) @parametrize - async def test_method_queries_with_all_params(self, async_client: AsyncHyperspell) -> None: - evaluate = await async_client.evaluate.queries( + async def test_method_list_queries_with_all_params(self, async_client: AsyncHyperspell) -> None: + evaluate = await async_client.evaluate.list_queries( cursor="cursor", size=0, user_id="user_id", ) - assert_matches_type(EvaluateQueriesResponse, evaluate, path=["response"]) + assert_matches_type(AsyncCursorPage[EvaluateListQueriesResponse], evaluate, path=["response"]) @parametrize - async def test_raw_response_queries(self, async_client: AsyncHyperspell) -> None: - response = await async_client.evaluate.with_raw_response.queries() + async def test_raw_response_list_queries(self, async_client: AsyncHyperspell) -> None: + response = await async_client.evaluate.with_raw_response.list_queries() assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" evaluate = await response.parse() - assert_matches_type(EvaluateQueriesResponse, evaluate, path=["response"]) + assert_matches_type(AsyncCursorPage[EvaluateListQueriesResponse], evaluate, path=["response"]) @parametrize - async def test_streaming_response_queries(self, async_client: AsyncHyperspell) -> None: - async with async_client.evaluate.with_streaming_response.queries() as response: + async def test_streaming_response_list_queries(self, async_client: AsyncHyperspell) -> None: + async with async_client.evaluate.with_streaming_response.list_queries() as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" evaluate = await response.parse() - assert_matches_type(EvaluateQueriesResponse, evaluate, path=["response"]) + assert_matches_type(AsyncCursorPage[EvaluateListQueriesResponse], evaluate, path=["response"]) assert cast(Any, response.is_closed) is True From 02ef6374b47293a4b3cd5c5f1bd179a80973aac2 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Thu, 11 Jun 2026 17:30:50 +0000 Subject: [PATCH 53/56] feat(api): api update --- .stats.yml | 4 ++-- src/hyperspell/resources/memories.py | 8 ++++++-- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/.stats.yml b/.stats.yml index 1bdc1205..e2c9f924 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 31 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/hyperspell/hyperspell-b92bcfe4385d275daa16dd9a9552afcd31fa1e4ffa9eb568e2b0f0d61c5d4bf9.yml -openapi_spec_hash: 9f93b7d272ef2483d41541a571285269 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/hyperspell/hyperspell-103e5dc7c922ecd69d844179d9823084f9fb73d742b209ae7e9eab0db062322c.yml +openapi_spec_hash: f02fa981c8abd9cb9a92c2f6204c520c config_hash: e94cd277a0f8a93fc9dbadfd0a99ffcb diff --git a/src/hyperspell/resources/memories.py b/src/hyperspell/resources/memories.py index 5e7f80c3..67a080e9 100644 --- a/src/hyperspell/resources/memories.py +++ b/src/hyperspell/resources/memories.py @@ -284,7 +284,9 @@ def delete( operation deletes: 1. All chunks associated with the resource (including embeddings) - 2. The resource record itself + 2. The documents row AND any legacy resources rows sharing the identity — + leaving either one behind would resurrect the memory through the double-read + path (ENG-2477). Args: source: The document provider (e.g., gmail, notion, vault) resource_id: The unique identifier of the resource to delete api_token: Authentication token @@ -909,7 +911,9 @@ async def delete( operation deletes: 1. All chunks associated with the resource (including embeddings) - 2. The resource record itself + 2. The documents row AND any legacy resources rows sharing the identity — + leaving either one behind would resurrect the memory through the double-read + path (ENG-2477). Args: source: The document provider (e.g., gmail, notion, vault) resource_id: The unique identifier of the resource to delete api_token: Authentication token From eeb82b767927c783df8233b637e63f7c4c14640c Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Thu, 11 Jun 2026 23:31:17 +0000 Subject: [PATCH 54/56] feat(api): api update --- .stats.yml | 4 +- api.md | 9 +- src/hyperspell/resources/memories.py | 30 +- src/hyperspell/types/__init__.py | 5 +- src/hyperspell/types/memory.py | 67 - src/hyperspell/types/memory_get_response.py | 20943 ++++++++++++++++ src/hyperspell/types/memory_list_response.py | 20943 ++++++++++++++++ src/hyperspell/types/shared/__init__.py | 3 - src/hyperspell/types/shared/metadata.py | 38 - src/hyperspell/types/shared/notification.py | 17 - src/hyperspell/types/shared/query_result.py | 20970 ++++++++++++++++- src/hyperspell/types/shared/resource.py | 59 - tests/api_resources/test_memories.py | 33 +- 13 files changed, 62893 insertions(+), 228 deletions(-) delete mode 100644 src/hyperspell/types/memory.py create mode 100644 src/hyperspell/types/memory_get_response.py create mode 100644 src/hyperspell/types/memory_list_response.py delete mode 100644 src/hyperspell/types/shared/metadata.py delete mode 100644 src/hyperspell/types/shared/notification.py delete mode 100644 src/hyperspell/types/shared/resource.py diff --git a/.stats.yml b/.stats.yml index e2c9f924..95cd499d 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 31 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/hyperspell/hyperspell-103e5dc7c922ecd69d844179d9823084f9fb73d742b209ae7e9eab0db062322c.yml -openapi_spec_hash: f02fa981c8abd9cb9a92c2f6204c520c +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/hyperspell/hyperspell-9538444341151dbbcc629fd9cd0b553097c397747b1285b9f8dfca6d81157d34.yml +openapi_spec_hash: 95f25b343410e9610f13fe645eb11a8d config_hash: e94cd277a0f8a93fc9dbadfd0a99ffcb diff --git a/api.md b/api.md index a5384fac..b85a5d04 100644 --- a/api.md +++ b/api.md @@ -1,7 +1,7 @@ # Shared Types ```python -from hyperspell.types import Metadata, Notification, QueryResult, Resource +from hyperspell.types import QueryResult ``` # Connections @@ -86,10 +86,11 @@ Types: ```python from hyperspell.types import ( - Memory, MemoryStatus, + MemoryListResponse, MemoryDeleteResponse, MemoryAddBulkResponse, + MemoryGetResponse, MemoryStatusResponse, ) ``` @@ -97,11 +98,11 @@ from hyperspell.types import ( Methods: - client.memories.update(resource_id, \*, source, \*\*params) -> MemoryStatus -- client.memories.list(\*\*params) -> SyncCursorPage[Resource] +- client.memories.list(\*\*params) -> SyncCursorPage[MemoryListResponse] - client.memories.delete(resource_id, \*, source) -> MemoryDeleteResponse - client.memories.add(\*\*params) -> MemoryStatus - client.memories.add_bulk(\*\*params) -> MemoryAddBulkResponse -- client.memories.get(resource_id, \*, source) -> Memory +- client.memories.get(resource_id, \*, source) -> MemoryGetResponse - client.memories.search(\*\*params) -> QueryResult - client.memories.status() -> MemoryStatusResponse - client.memories.upload(\*\*params) -> MemoryStatus diff --git a/src/hyperspell/resources/memories.py b/src/hyperspell/resources/memories.py index 67a080e9..01b9e145 100644 --- a/src/hyperspell/resources/memories.py +++ b/src/hyperspell/resources/memories.py @@ -29,10 +29,10 @@ ) from ..pagination import SyncCursorPage, AsyncCursorPage from .._base_client import AsyncPaginator, make_request_options -from ..types.memory import Memory from ..types.memory_status import MemoryStatus -from ..types.shared.resource import Resource +from ..types.memory_get_response import MemoryGetResponse from ..types.shared.query_result import QueryResult +from ..types.memory_list_response import MemoryListResponse from ..types.memory_delete_response import MemoryDeleteResponse from ..types.memory_status_response import MemoryStatusResponse from ..types.memory_add_bulk_response import MemoryAddBulkResponse @@ -194,7 +194,7 @@ def list( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = not_given, - ) -> SyncCursorPage[Resource]: + ) -> SyncCursorPage[MemoryListResponse]: """This endpoint allows you to paginate through all documents in the index. You can @@ -221,7 +221,7 @@ def list( """ return self._get_api_list( "/memories/list", - page=SyncCursorPage[Resource], + page=SyncCursorPage[MemoryListResponse], options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, @@ -239,7 +239,7 @@ def list( memory_list_params.MemoryListParams, ), ), - model=Resource, + model=MemoryListResponse, ) def delete( @@ -460,9 +460,10 @@ def get( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = not_given, - ) -> Memory: + ) -> MemoryGetResponse: """ - Retrieves a document by provider and resource_id. + Retrieves a document by provider and resource_id, as a document-shaped response + carrying the full hyperdoc tree (ENG-2479 Phase 4). Args: extra_headers: Send extra headers @@ -482,7 +483,7 @@ def get( options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout ), - cast_to=Memory, + cast_to=MemoryGetResponse, ) def search( @@ -821,7 +822,7 @@ def list( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = not_given, - ) -> AsyncPaginator[Resource, AsyncCursorPage[Resource]]: + ) -> AsyncPaginator[MemoryListResponse, AsyncCursorPage[MemoryListResponse]]: """This endpoint allows you to paginate through all documents in the index. You can @@ -848,7 +849,7 @@ def list( """ return self._get_api_list( "/memories/list", - page=AsyncCursorPage[Resource], + page=AsyncCursorPage[MemoryListResponse], options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, @@ -866,7 +867,7 @@ def list( memory_list_params.MemoryListParams, ), ), - model=Resource, + model=MemoryListResponse, ) async def delete( @@ -1087,9 +1088,10 @@ async def get( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = not_given, - ) -> Memory: + ) -> MemoryGetResponse: """ - Retrieves a document by provider and resource_id. + Retrieves a document by provider and resource_id, as a document-shaped response + carrying the full hyperdoc tree (ENG-2479 Phase 4). Args: extra_headers: Send extra headers @@ -1109,7 +1111,7 @@ async def get( options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout ), - cast_to=Memory, + cast_to=MemoryGetResponse, ) async def search( diff --git a/src/hyperspell/types/__init__.py b/src/hyperspell/types/__init__.py index ec89168f..e06c0ea0 100644 --- a/src/hyperspell/types/__init__.py +++ b/src/hyperspell/types/__init__.py @@ -3,8 +3,7 @@ from __future__ import annotations from .token import Token as Token -from .memory import Memory as Memory -from .shared import Metadata as Metadata, Resource as Resource, QueryResult as QueryResult, Notification as Notification +from .shared import QueryResult as QueryResult from .memory_status import MemoryStatus as MemoryStatus from .auth_me_response import AuthMeResponse as AuthMeResponse from .memory_add_params import MemoryAddParams as MemoryAddParams @@ -12,8 +11,10 @@ from .folder_list_params import FolderListParams as FolderListParams from .memory_list_params import MemoryListParams as MemoryListParams from .session_add_params import SessionAddParams as SessionAddParams +from .memory_get_response import MemoryGetResponse as MemoryGetResponse from .vault_list_response import VaultListResponse as VaultListResponse from .folder_list_response import FolderListResponse as FolderListResponse +from .memory_list_response import MemoryListResponse as MemoryListResponse from .memory_search_params import MemorySearchParams as MemorySearchParams from .memory_update_params import MemoryUpdateParams as MemoryUpdateParams from .memory_upload_params import MemoryUploadParams as MemoryUploadParams diff --git a/src/hyperspell/types/memory.py b/src/hyperspell/types/memory.py deleted file mode 100644 index ab77fc03..00000000 --- a/src/hyperspell/types/memory.py +++ /dev/null @@ -1,67 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - -from typing import TYPE_CHECKING, Dict, List, Optional -from typing_extensions import Literal - -from pydantic import Field as FieldInfo - -from .._models import BaseModel -from .shared.metadata import Metadata - -__all__ = ["Memory"] - - -class Memory(BaseModel): - """Response model for the GET /memories/get endpoint.""" - - resource_id: str - - source: Literal[ - "reddit", - "notion", - "slack", - "google_calendar", - "google_mail", - "box", - "dropbox", - "github", - "google_drive", - "vault", - "web_crawler", - "trace", - "microsoft_teams", - "gmail_actions", - "granola", - "fathom", - "fireflies", - "linear", - "hubspot", - "salesforce", - "coda", - "lightfield", - ] - - type: str - """The type of document (e.g. Document, Website, Email)""" - - data: Optional[List[object]] = None - """The structured content of the document""" - - memories: Optional[List[str]] = None - """Summaries of all memories extracted from this document""" - - metadata: Optional[Metadata] = None - - title: Optional[str] = None - - if TYPE_CHECKING: - # Some versions of Pydantic <2.8.0 have a bug and don’t allow assigning a - # value to this field, so for compatibility we avoid doing it at runtime. - __pydantic_extra__: Dict[str, object] = FieldInfo(init=False) # pyright: ignore[reportIncompatibleVariableOverride] - - # Stub to indicate that arbitrary properties are accepted. - # To access properties that are not valid identifiers you can use `getattr`, e.g. - # `getattr(obj, '$type')` - def __getattr__(self, attr: str) -> object: ... - else: - __pydantic_extra__: Dict[str, object] diff --git a/src/hyperspell/types/memory_get_response.py b/src/hyperspell/types/memory_get_response.py new file mode 100644 index 00000000..6b546f09 --- /dev/null +++ b/src/hyperspell/types/memory_get_response.py @@ -0,0 +1,20943 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +from typing import Dict, List, Union, Optional +from datetime import date, datetime +from typing_extensions import Literal, Annotated, TypeAlias + +from .._utils import PropertyInfo +from .._models import BaseModel + +__all__ = [ + "MemoryGetResponse", + "Document", + "DocumentDocument", + "DocumentDocumentChild", + "DocumentDocumentChildBlob", + "DocumentDocumentChildCallout", + "DocumentDocumentChildCalloutChild", + "DocumentDocumentChildCalloutChildBlob", + "DocumentDocumentChildCalloutChildCode", + "DocumentDocumentChildCalloutChildComment", + "DocumentDocumentChildCalloutChildDivider", + "DocumentDocumentChildCalloutChildImage", + "DocumentDocumentChildCalloutChildLink", + "DocumentDocumentChildCalloutChildLineBreak", + "DocumentDocumentChildCalloutChildText", + "DocumentDocumentChildCalloutChildToolCall", + "DocumentDocumentChildCalloutChildToolResult", + "DocumentDocumentChildCalloutChildTraceMessage", + "DocumentDocumentChildChunk", + "DocumentDocumentChildChunkChild", + "DocumentDocumentChildChunkChildBlob", + "DocumentDocumentChildChunkChildCode", + "DocumentDocumentChildChunkChildComment", + "DocumentDocumentChildChunkChildDivider", + "DocumentDocumentChildChunkChildImage", + "DocumentDocumentChildChunkChildLink", + "DocumentDocumentChildChunkChildLineBreak", + "DocumentDocumentChildChunkChildText", + "DocumentDocumentChildChunkChildToolCall", + "DocumentDocumentChildChunkChildToolResult", + "DocumentDocumentChildChunkChildTraceMessage", + "DocumentDocumentChildCode", + "DocumentDocumentChildComment", + "DocumentDocumentChildDivider", + "DocumentDocumentChildEquation", + "DocumentDocumentChildEquationChild", + "DocumentDocumentChildEquationChildBlob", + "DocumentDocumentChildEquationChildCode", + "DocumentDocumentChildEquationChildComment", + "DocumentDocumentChildEquationChildDivider", + "DocumentDocumentChildEquationChildImage", + "DocumentDocumentChildEquationChildLink", + "DocumentDocumentChildEquationChildLineBreak", + "DocumentDocumentChildEquationChildText", + "DocumentDocumentChildEquationChildToolCall", + "DocumentDocumentChildEquationChildToolResult", + "DocumentDocumentChildEquationChildTraceMessage", + "DocumentDocumentChildFootnote", + "DocumentDocumentChildFootnoteChild", + "DocumentDocumentChildFootnoteChildBlob", + "DocumentDocumentChildFootnoteChildCode", + "DocumentDocumentChildFootnoteChildComment", + "DocumentDocumentChildFootnoteChildDivider", + "DocumentDocumentChildFootnoteChildImage", + "DocumentDocumentChildFootnoteChildLink", + "DocumentDocumentChildFootnoteChildLineBreak", + "DocumentDocumentChildFootnoteChildText", + "DocumentDocumentChildFootnoteChildToolCall", + "DocumentDocumentChildFootnoteChildToolResult", + "DocumentDocumentChildFootnoteChildTraceMessage", + "DocumentDocumentChildHeading", + "DocumentDocumentChildHeadingChild", + "DocumentDocumentChildHeadingChildBlob", + "DocumentDocumentChildHeadingChildCode", + "DocumentDocumentChildHeadingChildComment", + "DocumentDocumentChildHeadingChildDivider", + "DocumentDocumentChildHeadingChildImage", + "DocumentDocumentChildHeadingChildLink", + "DocumentDocumentChildHeadingChildLineBreak", + "DocumentDocumentChildHeadingChildText", + "DocumentDocumentChildHeadingChildToolCall", + "DocumentDocumentChildHeadingChildToolResult", + "DocumentDocumentChildHeadingChildTraceMessage", + "DocumentDocumentChildImage", + "DocumentDocumentChildLink", + "DocumentDocumentChildLineBreak", + "DocumentDocumentChildList", + "DocumentDocumentChildListItem", + "DocumentDocumentChildListItemChild", + "DocumentDocumentChildListItemChildBlob", + "DocumentDocumentChildListItemChildCode", + "DocumentDocumentChildListItemChildComment", + "DocumentDocumentChildListItemChildDivider", + "DocumentDocumentChildListItemChildImage", + "DocumentDocumentChildListItemChildLink", + "DocumentDocumentChildListItemChildLineBreak", + "DocumentDocumentChildListItemChildText", + "DocumentDocumentChildListItemChildToolCall", + "DocumentDocumentChildListItemChildToolResult", + "DocumentDocumentChildListItemChildTraceMessage", + "DocumentDocumentChildParagraph", + "DocumentDocumentChildParagraphChild", + "DocumentDocumentChildParagraphChildBlob", + "DocumentDocumentChildParagraphChildCode", + "DocumentDocumentChildParagraphChildComment", + "DocumentDocumentChildParagraphChildDivider", + "DocumentDocumentChildParagraphChildImage", + "DocumentDocumentChildParagraphChildLink", + "DocumentDocumentChildParagraphChildLineBreak", + "DocumentDocumentChildParagraphChildText", + "DocumentDocumentChildParagraphChildToolCall", + "DocumentDocumentChildParagraphChildToolResult", + "DocumentDocumentChildParagraphChildTraceMessage", + "DocumentDocumentChildQuote", + "DocumentDocumentChildQuoteChild", + "DocumentDocumentChildQuoteChildBlob", + "DocumentDocumentChildQuoteChildCode", + "DocumentDocumentChildQuoteChildComment", + "DocumentDocumentChildQuoteChildDivider", + "DocumentDocumentChildQuoteChildImage", + "DocumentDocumentChildQuoteChildLink", + "DocumentDocumentChildQuoteChildLineBreak", + "DocumentDocumentChildQuoteChildText", + "DocumentDocumentChildQuoteChildToolCall", + "DocumentDocumentChildQuoteChildToolResult", + "DocumentDocumentChildQuoteChildTraceMessage", + "DocumentDocumentChildTable", + "DocumentDocumentChildTableCell", + "DocumentDocumentChildTableCellChild", + "DocumentDocumentChildTableCellChildBlob", + "DocumentDocumentChildTableCellChildCode", + "DocumentDocumentChildTableCellChildComment", + "DocumentDocumentChildTableCellChildDivider", + "DocumentDocumentChildTableCellChildImage", + "DocumentDocumentChildTableCellChildLink", + "DocumentDocumentChildTableCellChildLineBreak", + "DocumentDocumentChildTableCellChildText", + "DocumentDocumentChildTableCellChildToolCall", + "DocumentDocumentChildTableCellChildToolResult", + "DocumentDocumentChildTableCellChildTraceMessage", + "DocumentDocumentChildTableRow", + "DocumentDocumentChildText", + "DocumentDocumentChildToDo", + "DocumentDocumentChildToDoChild", + "DocumentDocumentChildToDoChildBlob", + "DocumentDocumentChildToDoChildCode", + "DocumentDocumentChildToDoChildComment", + "DocumentDocumentChildToDoChildDivider", + "DocumentDocumentChildToDoChildImage", + "DocumentDocumentChildToDoChildLink", + "DocumentDocumentChildToDoChildLineBreak", + "DocumentDocumentChildToDoChildText", + "DocumentDocumentChildToDoChildToolCall", + "DocumentDocumentChildToDoChildToolResult", + "DocumentDocumentChildToDoChildTraceMessage", + "DocumentDocumentChildToolCall", + "DocumentDocumentChildToolResult", + "DocumentDocumentChildTraceMessage", + "DocumentDocumentChildUtterance", + "DocumentWebsite", + "DocumentWebsiteChild", + "DocumentWebsiteChildBlob", + "DocumentWebsiteChildCallout", + "DocumentWebsiteChildCalloutChild", + "DocumentWebsiteChildCalloutChildBlob", + "DocumentWebsiteChildCalloutChildCode", + "DocumentWebsiteChildCalloutChildComment", + "DocumentWebsiteChildCalloutChildDivider", + "DocumentWebsiteChildCalloutChildImage", + "DocumentWebsiteChildCalloutChildLink", + "DocumentWebsiteChildCalloutChildLineBreak", + "DocumentWebsiteChildCalloutChildText", + "DocumentWebsiteChildCalloutChildToolCall", + "DocumentWebsiteChildCalloutChildToolResult", + "DocumentWebsiteChildCalloutChildTraceMessage", + "DocumentWebsiteChildChunk", + "DocumentWebsiteChildChunkChild", + "DocumentWebsiteChildChunkChildBlob", + "DocumentWebsiteChildChunkChildCode", + "DocumentWebsiteChildChunkChildComment", + "DocumentWebsiteChildChunkChildDivider", + "DocumentWebsiteChildChunkChildImage", + "DocumentWebsiteChildChunkChildLink", + "DocumentWebsiteChildChunkChildLineBreak", + "DocumentWebsiteChildChunkChildText", + "DocumentWebsiteChildChunkChildToolCall", + "DocumentWebsiteChildChunkChildToolResult", + "DocumentWebsiteChildChunkChildTraceMessage", + "DocumentWebsiteChildCode", + "DocumentWebsiteChildComment", + "DocumentWebsiteChildDivider", + "DocumentWebsiteChildEquation", + "DocumentWebsiteChildEquationChild", + "DocumentWebsiteChildEquationChildBlob", + "DocumentWebsiteChildEquationChildCode", + "DocumentWebsiteChildEquationChildComment", + "DocumentWebsiteChildEquationChildDivider", + "DocumentWebsiteChildEquationChildImage", + "DocumentWebsiteChildEquationChildLink", + "DocumentWebsiteChildEquationChildLineBreak", + "DocumentWebsiteChildEquationChildText", + "DocumentWebsiteChildEquationChildToolCall", + "DocumentWebsiteChildEquationChildToolResult", + "DocumentWebsiteChildEquationChildTraceMessage", + "DocumentWebsiteChildFootnote", + "DocumentWebsiteChildFootnoteChild", + "DocumentWebsiteChildFootnoteChildBlob", + "DocumentWebsiteChildFootnoteChildCode", + "DocumentWebsiteChildFootnoteChildComment", + "DocumentWebsiteChildFootnoteChildDivider", + "DocumentWebsiteChildFootnoteChildImage", + "DocumentWebsiteChildFootnoteChildLink", + "DocumentWebsiteChildFootnoteChildLineBreak", + "DocumentWebsiteChildFootnoteChildText", + "DocumentWebsiteChildFootnoteChildToolCall", + "DocumentWebsiteChildFootnoteChildToolResult", + "DocumentWebsiteChildFootnoteChildTraceMessage", + "DocumentWebsiteChildHeading", + "DocumentWebsiteChildHeadingChild", + "DocumentWebsiteChildHeadingChildBlob", + "DocumentWebsiteChildHeadingChildCode", + "DocumentWebsiteChildHeadingChildComment", + "DocumentWebsiteChildHeadingChildDivider", + "DocumentWebsiteChildHeadingChildImage", + "DocumentWebsiteChildHeadingChildLink", + "DocumentWebsiteChildHeadingChildLineBreak", + "DocumentWebsiteChildHeadingChildText", + "DocumentWebsiteChildHeadingChildToolCall", + "DocumentWebsiteChildHeadingChildToolResult", + "DocumentWebsiteChildHeadingChildTraceMessage", + "DocumentWebsiteChildImage", + "DocumentWebsiteChildLink", + "DocumentWebsiteChildLineBreak", + "DocumentWebsiteChildList", + "DocumentWebsiteChildListItem", + "DocumentWebsiteChildListItemChild", + "DocumentWebsiteChildListItemChildBlob", + "DocumentWebsiteChildListItemChildCode", + "DocumentWebsiteChildListItemChildComment", + "DocumentWebsiteChildListItemChildDivider", + "DocumentWebsiteChildListItemChildImage", + "DocumentWebsiteChildListItemChildLink", + "DocumentWebsiteChildListItemChildLineBreak", + "DocumentWebsiteChildListItemChildText", + "DocumentWebsiteChildListItemChildToolCall", + "DocumentWebsiteChildListItemChildToolResult", + "DocumentWebsiteChildListItemChildTraceMessage", + "DocumentWebsiteChildParagraph", + "DocumentWebsiteChildParagraphChild", + "DocumentWebsiteChildParagraphChildBlob", + "DocumentWebsiteChildParagraphChildCode", + "DocumentWebsiteChildParagraphChildComment", + "DocumentWebsiteChildParagraphChildDivider", + "DocumentWebsiteChildParagraphChildImage", + "DocumentWebsiteChildParagraphChildLink", + "DocumentWebsiteChildParagraphChildLineBreak", + "DocumentWebsiteChildParagraphChildText", + "DocumentWebsiteChildParagraphChildToolCall", + "DocumentWebsiteChildParagraphChildToolResult", + "DocumentWebsiteChildParagraphChildTraceMessage", + "DocumentWebsiteChildQuote", + "DocumentWebsiteChildQuoteChild", + "DocumentWebsiteChildQuoteChildBlob", + "DocumentWebsiteChildQuoteChildCode", + "DocumentWebsiteChildQuoteChildComment", + "DocumentWebsiteChildQuoteChildDivider", + "DocumentWebsiteChildQuoteChildImage", + "DocumentWebsiteChildQuoteChildLink", + "DocumentWebsiteChildQuoteChildLineBreak", + "DocumentWebsiteChildQuoteChildText", + "DocumentWebsiteChildQuoteChildToolCall", + "DocumentWebsiteChildQuoteChildToolResult", + "DocumentWebsiteChildQuoteChildTraceMessage", + "DocumentWebsiteChildTable", + "DocumentWebsiteChildTableCell", + "DocumentWebsiteChildTableCellChild", + "DocumentWebsiteChildTableCellChildBlob", + "DocumentWebsiteChildTableCellChildCode", + "DocumentWebsiteChildTableCellChildComment", + "DocumentWebsiteChildTableCellChildDivider", + "DocumentWebsiteChildTableCellChildImage", + "DocumentWebsiteChildTableCellChildLink", + "DocumentWebsiteChildTableCellChildLineBreak", + "DocumentWebsiteChildTableCellChildText", + "DocumentWebsiteChildTableCellChildToolCall", + "DocumentWebsiteChildTableCellChildToolResult", + "DocumentWebsiteChildTableCellChildTraceMessage", + "DocumentWebsiteChildTableRow", + "DocumentWebsiteChildText", + "DocumentWebsiteChildToDo", + "DocumentWebsiteChildToDoChild", + "DocumentWebsiteChildToDoChildBlob", + "DocumentWebsiteChildToDoChildCode", + "DocumentWebsiteChildToDoChildComment", + "DocumentWebsiteChildToDoChildDivider", + "DocumentWebsiteChildToDoChildImage", + "DocumentWebsiteChildToDoChildLink", + "DocumentWebsiteChildToDoChildLineBreak", + "DocumentWebsiteChildToDoChildText", + "DocumentWebsiteChildToDoChildToolCall", + "DocumentWebsiteChildToDoChildToolResult", + "DocumentWebsiteChildToDoChildTraceMessage", + "DocumentWebsiteChildToolCall", + "DocumentWebsiteChildToolResult", + "DocumentWebsiteChildTraceMessage", + "DocumentWebsiteChildUtterance", + "DocumentTask", + "DocumentTaskChild", + "DocumentTaskChildBlob", + "DocumentTaskChildCallout", + "DocumentTaskChildCalloutChild", + "DocumentTaskChildCalloutChildBlob", + "DocumentTaskChildCalloutChildCode", + "DocumentTaskChildCalloutChildComment", + "DocumentTaskChildCalloutChildDivider", + "DocumentTaskChildCalloutChildImage", + "DocumentTaskChildCalloutChildLink", + "DocumentTaskChildCalloutChildLineBreak", + "DocumentTaskChildCalloutChildText", + "DocumentTaskChildCalloutChildToolCall", + "DocumentTaskChildCalloutChildToolResult", + "DocumentTaskChildCalloutChildTraceMessage", + "DocumentTaskChildChunk", + "DocumentTaskChildChunkChild", + "DocumentTaskChildChunkChildBlob", + "DocumentTaskChildChunkChildCode", + "DocumentTaskChildChunkChildComment", + "DocumentTaskChildChunkChildDivider", + "DocumentTaskChildChunkChildImage", + "DocumentTaskChildChunkChildLink", + "DocumentTaskChildChunkChildLineBreak", + "DocumentTaskChildChunkChildText", + "DocumentTaskChildChunkChildToolCall", + "DocumentTaskChildChunkChildToolResult", + "DocumentTaskChildChunkChildTraceMessage", + "DocumentTaskChildCode", + "DocumentTaskChildComment", + "DocumentTaskChildDivider", + "DocumentTaskChildEquation", + "DocumentTaskChildEquationChild", + "DocumentTaskChildEquationChildBlob", + "DocumentTaskChildEquationChildCode", + "DocumentTaskChildEquationChildComment", + "DocumentTaskChildEquationChildDivider", + "DocumentTaskChildEquationChildImage", + "DocumentTaskChildEquationChildLink", + "DocumentTaskChildEquationChildLineBreak", + "DocumentTaskChildEquationChildText", + "DocumentTaskChildEquationChildToolCall", + "DocumentTaskChildEquationChildToolResult", + "DocumentTaskChildEquationChildTraceMessage", + "DocumentTaskChildFootnote", + "DocumentTaskChildFootnoteChild", + "DocumentTaskChildFootnoteChildBlob", + "DocumentTaskChildFootnoteChildCode", + "DocumentTaskChildFootnoteChildComment", + "DocumentTaskChildFootnoteChildDivider", + "DocumentTaskChildFootnoteChildImage", + "DocumentTaskChildFootnoteChildLink", + "DocumentTaskChildFootnoteChildLineBreak", + "DocumentTaskChildFootnoteChildText", + "DocumentTaskChildFootnoteChildToolCall", + "DocumentTaskChildFootnoteChildToolResult", + "DocumentTaskChildFootnoteChildTraceMessage", + "DocumentTaskChildHeading", + "DocumentTaskChildHeadingChild", + "DocumentTaskChildHeadingChildBlob", + "DocumentTaskChildHeadingChildCode", + "DocumentTaskChildHeadingChildComment", + "DocumentTaskChildHeadingChildDivider", + "DocumentTaskChildHeadingChildImage", + "DocumentTaskChildHeadingChildLink", + "DocumentTaskChildHeadingChildLineBreak", + "DocumentTaskChildHeadingChildText", + "DocumentTaskChildHeadingChildToolCall", + "DocumentTaskChildHeadingChildToolResult", + "DocumentTaskChildHeadingChildTraceMessage", + "DocumentTaskChildImage", + "DocumentTaskChildLink", + "DocumentTaskChildLineBreak", + "DocumentTaskChildList", + "DocumentTaskChildListItem", + "DocumentTaskChildListItemChild", + "DocumentTaskChildListItemChildBlob", + "DocumentTaskChildListItemChildCode", + "DocumentTaskChildListItemChildComment", + "DocumentTaskChildListItemChildDivider", + "DocumentTaskChildListItemChildImage", + "DocumentTaskChildListItemChildLink", + "DocumentTaskChildListItemChildLineBreak", + "DocumentTaskChildListItemChildText", + "DocumentTaskChildListItemChildToolCall", + "DocumentTaskChildListItemChildToolResult", + "DocumentTaskChildListItemChildTraceMessage", + "DocumentTaskChildParagraph", + "DocumentTaskChildParagraphChild", + "DocumentTaskChildParagraphChildBlob", + "DocumentTaskChildParagraphChildCode", + "DocumentTaskChildParagraphChildComment", + "DocumentTaskChildParagraphChildDivider", + "DocumentTaskChildParagraphChildImage", + "DocumentTaskChildParagraphChildLink", + "DocumentTaskChildParagraphChildLineBreak", + "DocumentTaskChildParagraphChildText", + "DocumentTaskChildParagraphChildToolCall", + "DocumentTaskChildParagraphChildToolResult", + "DocumentTaskChildParagraphChildTraceMessage", + "DocumentTaskChildQuote", + "DocumentTaskChildQuoteChild", + "DocumentTaskChildQuoteChildBlob", + "DocumentTaskChildQuoteChildCode", + "DocumentTaskChildQuoteChildComment", + "DocumentTaskChildQuoteChildDivider", + "DocumentTaskChildQuoteChildImage", + "DocumentTaskChildQuoteChildLink", + "DocumentTaskChildQuoteChildLineBreak", + "DocumentTaskChildQuoteChildText", + "DocumentTaskChildQuoteChildToolCall", + "DocumentTaskChildQuoteChildToolResult", + "DocumentTaskChildQuoteChildTraceMessage", + "DocumentTaskChildTable", + "DocumentTaskChildTableCell", + "DocumentTaskChildTableCellChild", + "DocumentTaskChildTableCellChildBlob", + "DocumentTaskChildTableCellChildCode", + "DocumentTaskChildTableCellChildComment", + "DocumentTaskChildTableCellChildDivider", + "DocumentTaskChildTableCellChildImage", + "DocumentTaskChildTableCellChildLink", + "DocumentTaskChildTableCellChildLineBreak", + "DocumentTaskChildTableCellChildText", + "DocumentTaskChildTableCellChildToolCall", + "DocumentTaskChildTableCellChildToolResult", + "DocumentTaskChildTableCellChildTraceMessage", + "DocumentTaskChildTableRow", + "DocumentTaskChildText", + "DocumentTaskChildToDo", + "DocumentTaskChildToDoChild", + "DocumentTaskChildToDoChildBlob", + "DocumentTaskChildToDoChildCode", + "DocumentTaskChildToDoChildComment", + "DocumentTaskChildToDoChildDivider", + "DocumentTaskChildToDoChildImage", + "DocumentTaskChildToDoChildLink", + "DocumentTaskChildToDoChildLineBreak", + "DocumentTaskChildToDoChildText", + "DocumentTaskChildToDoChildToolCall", + "DocumentTaskChildToDoChildToolResult", + "DocumentTaskChildToDoChildTraceMessage", + "DocumentTaskChildToolCall", + "DocumentTaskChildToolResult", + "DocumentTaskChildTraceMessage", + "DocumentTaskChildUtterance", + "DocumentTaskComment", + "DocumentTaskCommentSender", + "DocumentTaskCommentSenderChild", + "DocumentTaskCommentSenderChildBlob", + "DocumentTaskCommentSenderChildCode", + "DocumentTaskCommentSenderChildComment", + "DocumentTaskCommentSenderChildDivider", + "DocumentTaskCommentSenderChildImage", + "DocumentTaskCommentSenderChildLink", + "DocumentTaskCommentSenderChildLineBreak", + "DocumentTaskCommentSenderChildText", + "DocumentTaskCommentSenderChildToolCall", + "DocumentTaskCommentSenderChildToolResult", + "DocumentTaskCommentSenderChildTraceMessage", + "DocumentTaskCommentChild", + "DocumentTaskCommentChildBlob", + "DocumentTaskCommentChildCallout", + "DocumentTaskCommentChildCalloutChild", + "DocumentTaskCommentChildCalloutChildBlob", + "DocumentTaskCommentChildCalloutChildCode", + "DocumentTaskCommentChildCalloutChildComment", + "DocumentTaskCommentChildCalloutChildDivider", + "DocumentTaskCommentChildCalloutChildImage", + "DocumentTaskCommentChildCalloutChildLink", + "DocumentTaskCommentChildCalloutChildLineBreak", + "DocumentTaskCommentChildCalloutChildText", + "DocumentTaskCommentChildCalloutChildToolCall", + "DocumentTaskCommentChildCalloutChildToolResult", + "DocumentTaskCommentChildCalloutChildTraceMessage", + "DocumentTaskCommentChildChunk", + "DocumentTaskCommentChildChunkChild", + "DocumentTaskCommentChildChunkChildBlob", + "DocumentTaskCommentChildChunkChildCode", + "DocumentTaskCommentChildChunkChildComment", + "DocumentTaskCommentChildChunkChildDivider", + "DocumentTaskCommentChildChunkChildImage", + "DocumentTaskCommentChildChunkChildLink", + "DocumentTaskCommentChildChunkChildLineBreak", + "DocumentTaskCommentChildChunkChildText", + "DocumentTaskCommentChildChunkChildToolCall", + "DocumentTaskCommentChildChunkChildToolResult", + "DocumentTaskCommentChildChunkChildTraceMessage", + "DocumentTaskCommentChildCode", + "DocumentTaskCommentChildComment", + "DocumentTaskCommentChildDivider", + "DocumentTaskCommentChildEquation", + "DocumentTaskCommentChildEquationChild", + "DocumentTaskCommentChildEquationChildBlob", + "DocumentTaskCommentChildEquationChildCode", + "DocumentTaskCommentChildEquationChildComment", + "DocumentTaskCommentChildEquationChildDivider", + "DocumentTaskCommentChildEquationChildImage", + "DocumentTaskCommentChildEquationChildLink", + "DocumentTaskCommentChildEquationChildLineBreak", + "DocumentTaskCommentChildEquationChildText", + "DocumentTaskCommentChildEquationChildToolCall", + "DocumentTaskCommentChildEquationChildToolResult", + "DocumentTaskCommentChildEquationChildTraceMessage", + "DocumentTaskCommentChildFootnote", + "DocumentTaskCommentChildFootnoteChild", + "DocumentTaskCommentChildFootnoteChildBlob", + "DocumentTaskCommentChildFootnoteChildCode", + "DocumentTaskCommentChildFootnoteChildComment", + "DocumentTaskCommentChildFootnoteChildDivider", + "DocumentTaskCommentChildFootnoteChildImage", + "DocumentTaskCommentChildFootnoteChildLink", + "DocumentTaskCommentChildFootnoteChildLineBreak", + "DocumentTaskCommentChildFootnoteChildText", + "DocumentTaskCommentChildFootnoteChildToolCall", + "DocumentTaskCommentChildFootnoteChildToolResult", + "DocumentTaskCommentChildFootnoteChildTraceMessage", + "DocumentTaskCommentChildHeading", + "DocumentTaskCommentChildHeadingChild", + "DocumentTaskCommentChildHeadingChildBlob", + "DocumentTaskCommentChildHeadingChildCode", + "DocumentTaskCommentChildHeadingChildComment", + "DocumentTaskCommentChildHeadingChildDivider", + "DocumentTaskCommentChildHeadingChildImage", + "DocumentTaskCommentChildHeadingChildLink", + "DocumentTaskCommentChildHeadingChildLineBreak", + "DocumentTaskCommentChildHeadingChildText", + "DocumentTaskCommentChildHeadingChildToolCall", + "DocumentTaskCommentChildHeadingChildToolResult", + "DocumentTaskCommentChildHeadingChildTraceMessage", + "DocumentTaskCommentChildImage", + "DocumentTaskCommentChildLink", + "DocumentTaskCommentChildLineBreak", + "DocumentTaskCommentChildList", + "DocumentTaskCommentChildListItem", + "DocumentTaskCommentChildListItemChild", + "DocumentTaskCommentChildListItemChildBlob", + "DocumentTaskCommentChildListItemChildCode", + "DocumentTaskCommentChildListItemChildComment", + "DocumentTaskCommentChildListItemChildDivider", + "DocumentTaskCommentChildListItemChildImage", + "DocumentTaskCommentChildListItemChildLink", + "DocumentTaskCommentChildListItemChildLineBreak", + "DocumentTaskCommentChildListItemChildText", + "DocumentTaskCommentChildListItemChildToolCall", + "DocumentTaskCommentChildListItemChildToolResult", + "DocumentTaskCommentChildListItemChildTraceMessage", + "DocumentTaskCommentChildParagraph", + "DocumentTaskCommentChildParagraphChild", + "DocumentTaskCommentChildParagraphChildBlob", + "DocumentTaskCommentChildParagraphChildCode", + "DocumentTaskCommentChildParagraphChildComment", + "DocumentTaskCommentChildParagraphChildDivider", + "DocumentTaskCommentChildParagraphChildImage", + "DocumentTaskCommentChildParagraphChildLink", + "DocumentTaskCommentChildParagraphChildLineBreak", + "DocumentTaskCommentChildParagraphChildText", + "DocumentTaskCommentChildParagraphChildToolCall", + "DocumentTaskCommentChildParagraphChildToolResult", + "DocumentTaskCommentChildParagraphChildTraceMessage", + "DocumentTaskCommentChildQuote", + "DocumentTaskCommentChildQuoteChild", + "DocumentTaskCommentChildQuoteChildBlob", + "DocumentTaskCommentChildQuoteChildCode", + "DocumentTaskCommentChildQuoteChildComment", + "DocumentTaskCommentChildQuoteChildDivider", + "DocumentTaskCommentChildQuoteChildImage", + "DocumentTaskCommentChildQuoteChildLink", + "DocumentTaskCommentChildQuoteChildLineBreak", + "DocumentTaskCommentChildQuoteChildText", + "DocumentTaskCommentChildQuoteChildToolCall", + "DocumentTaskCommentChildQuoteChildToolResult", + "DocumentTaskCommentChildQuoteChildTraceMessage", + "DocumentTaskCommentChildTable", + "DocumentTaskCommentChildTableCell", + "DocumentTaskCommentChildTableCellChild", + "DocumentTaskCommentChildTableCellChildBlob", + "DocumentTaskCommentChildTableCellChildCode", + "DocumentTaskCommentChildTableCellChildComment", + "DocumentTaskCommentChildTableCellChildDivider", + "DocumentTaskCommentChildTableCellChildImage", + "DocumentTaskCommentChildTableCellChildLink", + "DocumentTaskCommentChildTableCellChildLineBreak", + "DocumentTaskCommentChildTableCellChildText", + "DocumentTaskCommentChildTableCellChildToolCall", + "DocumentTaskCommentChildTableCellChildToolResult", + "DocumentTaskCommentChildTableCellChildTraceMessage", + "DocumentTaskCommentChildTableRow", + "DocumentTaskCommentChildText", + "DocumentTaskCommentChildToDo", + "DocumentTaskCommentChildToDoChild", + "DocumentTaskCommentChildToDoChildBlob", + "DocumentTaskCommentChildToDoChildCode", + "DocumentTaskCommentChildToDoChildComment", + "DocumentTaskCommentChildToDoChildDivider", + "DocumentTaskCommentChildToDoChildImage", + "DocumentTaskCommentChildToDoChildLink", + "DocumentTaskCommentChildToDoChildLineBreak", + "DocumentTaskCommentChildToDoChildText", + "DocumentTaskCommentChildToDoChildToolCall", + "DocumentTaskCommentChildToDoChildToolResult", + "DocumentTaskCommentChildToDoChildTraceMessage", + "DocumentTaskCommentChildToolCall", + "DocumentTaskCommentChildToolResult", + "DocumentTaskCommentChildTraceMessage", + "DocumentTaskCommentChildUtterance", + "DocumentTaskCommentMentionedUser", + "DocumentTaskCommentMentionedUserChild", + "DocumentTaskCommentMentionedUserChildBlob", + "DocumentTaskCommentMentionedUserChildCode", + "DocumentTaskCommentMentionedUserChildComment", + "DocumentTaskCommentMentionedUserChildDivider", + "DocumentTaskCommentMentionedUserChildImage", + "DocumentTaskCommentMentionedUserChildLink", + "DocumentTaskCommentMentionedUserChildLineBreak", + "DocumentTaskCommentMentionedUserChildText", + "DocumentTaskCommentMentionedUserChildToolCall", + "DocumentTaskCommentMentionedUserChildToolResult", + "DocumentTaskCommentMentionedUserChildTraceMessage", + "DocumentPerson", + "DocumentPersonChild", + "DocumentPersonChildBlob", + "DocumentPersonChildCode", + "DocumentPersonChildComment", + "DocumentPersonChildDivider", + "DocumentPersonChildImage", + "DocumentPersonChildLink", + "DocumentPersonChildLineBreak", + "DocumentPersonChildText", + "DocumentPersonChildToolCall", + "DocumentPersonChildToolResult", + "DocumentPersonChildTraceMessage", + "DocumentMessage", + "DocumentMessageSender", + "DocumentMessageSenderChild", + "DocumentMessageSenderChildBlob", + "DocumentMessageSenderChildCode", + "DocumentMessageSenderChildComment", + "DocumentMessageSenderChildDivider", + "DocumentMessageSenderChildImage", + "DocumentMessageSenderChildLink", + "DocumentMessageSenderChildLineBreak", + "DocumentMessageSenderChildText", + "DocumentMessageSenderChildToolCall", + "DocumentMessageSenderChildToolResult", + "DocumentMessageSenderChildTraceMessage", + "DocumentMessageChild", + "DocumentMessageChildBlob", + "DocumentMessageChildCallout", + "DocumentMessageChildCalloutChild", + "DocumentMessageChildCalloutChildBlob", + "DocumentMessageChildCalloutChildCode", + "DocumentMessageChildCalloutChildComment", + "DocumentMessageChildCalloutChildDivider", + "DocumentMessageChildCalloutChildImage", + "DocumentMessageChildCalloutChildLink", + "DocumentMessageChildCalloutChildLineBreak", + "DocumentMessageChildCalloutChildText", + "DocumentMessageChildCalloutChildToolCall", + "DocumentMessageChildCalloutChildToolResult", + "DocumentMessageChildCalloutChildTraceMessage", + "DocumentMessageChildChunk", + "DocumentMessageChildChunkChild", + "DocumentMessageChildChunkChildBlob", + "DocumentMessageChildChunkChildCode", + "DocumentMessageChildChunkChildComment", + "DocumentMessageChildChunkChildDivider", + "DocumentMessageChildChunkChildImage", + "DocumentMessageChildChunkChildLink", + "DocumentMessageChildChunkChildLineBreak", + "DocumentMessageChildChunkChildText", + "DocumentMessageChildChunkChildToolCall", + "DocumentMessageChildChunkChildToolResult", + "DocumentMessageChildChunkChildTraceMessage", + "DocumentMessageChildCode", + "DocumentMessageChildComment", + "DocumentMessageChildDivider", + "DocumentMessageChildEquation", + "DocumentMessageChildEquationChild", + "DocumentMessageChildEquationChildBlob", + "DocumentMessageChildEquationChildCode", + "DocumentMessageChildEquationChildComment", + "DocumentMessageChildEquationChildDivider", + "DocumentMessageChildEquationChildImage", + "DocumentMessageChildEquationChildLink", + "DocumentMessageChildEquationChildLineBreak", + "DocumentMessageChildEquationChildText", + "DocumentMessageChildEquationChildToolCall", + "DocumentMessageChildEquationChildToolResult", + "DocumentMessageChildEquationChildTraceMessage", + "DocumentMessageChildFootnote", + "DocumentMessageChildFootnoteChild", + "DocumentMessageChildFootnoteChildBlob", + "DocumentMessageChildFootnoteChildCode", + "DocumentMessageChildFootnoteChildComment", + "DocumentMessageChildFootnoteChildDivider", + "DocumentMessageChildFootnoteChildImage", + "DocumentMessageChildFootnoteChildLink", + "DocumentMessageChildFootnoteChildLineBreak", + "DocumentMessageChildFootnoteChildText", + "DocumentMessageChildFootnoteChildToolCall", + "DocumentMessageChildFootnoteChildToolResult", + "DocumentMessageChildFootnoteChildTraceMessage", + "DocumentMessageChildHeading", + "DocumentMessageChildHeadingChild", + "DocumentMessageChildHeadingChildBlob", + "DocumentMessageChildHeadingChildCode", + "DocumentMessageChildHeadingChildComment", + "DocumentMessageChildHeadingChildDivider", + "DocumentMessageChildHeadingChildImage", + "DocumentMessageChildHeadingChildLink", + "DocumentMessageChildHeadingChildLineBreak", + "DocumentMessageChildHeadingChildText", + "DocumentMessageChildHeadingChildToolCall", + "DocumentMessageChildHeadingChildToolResult", + "DocumentMessageChildHeadingChildTraceMessage", + "DocumentMessageChildImage", + "DocumentMessageChildLink", + "DocumentMessageChildLineBreak", + "DocumentMessageChildList", + "DocumentMessageChildListItem", + "DocumentMessageChildListItemChild", + "DocumentMessageChildListItemChildBlob", + "DocumentMessageChildListItemChildCode", + "DocumentMessageChildListItemChildComment", + "DocumentMessageChildListItemChildDivider", + "DocumentMessageChildListItemChildImage", + "DocumentMessageChildListItemChildLink", + "DocumentMessageChildListItemChildLineBreak", + "DocumentMessageChildListItemChildText", + "DocumentMessageChildListItemChildToolCall", + "DocumentMessageChildListItemChildToolResult", + "DocumentMessageChildListItemChildTraceMessage", + "DocumentMessageChildParagraph", + "DocumentMessageChildParagraphChild", + "DocumentMessageChildParagraphChildBlob", + "DocumentMessageChildParagraphChildCode", + "DocumentMessageChildParagraphChildComment", + "DocumentMessageChildParagraphChildDivider", + "DocumentMessageChildParagraphChildImage", + "DocumentMessageChildParagraphChildLink", + "DocumentMessageChildParagraphChildLineBreak", + "DocumentMessageChildParagraphChildText", + "DocumentMessageChildParagraphChildToolCall", + "DocumentMessageChildParagraphChildToolResult", + "DocumentMessageChildParagraphChildTraceMessage", + "DocumentMessageChildQuote", + "DocumentMessageChildQuoteChild", + "DocumentMessageChildQuoteChildBlob", + "DocumentMessageChildQuoteChildCode", + "DocumentMessageChildQuoteChildComment", + "DocumentMessageChildQuoteChildDivider", + "DocumentMessageChildQuoteChildImage", + "DocumentMessageChildQuoteChildLink", + "DocumentMessageChildQuoteChildLineBreak", + "DocumentMessageChildQuoteChildText", + "DocumentMessageChildQuoteChildToolCall", + "DocumentMessageChildQuoteChildToolResult", + "DocumentMessageChildQuoteChildTraceMessage", + "DocumentMessageChildTable", + "DocumentMessageChildTableCell", + "DocumentMessageChildTableCellChild", + "DocumentMessageChildTableCellChildBlob", + "DocumentMessageChildTableCellChildCode", + "DocumentMessageChildTableCellChildComment", + "DocumentMessageChildTableCellChildDivider", + "DocumentMessageChildTableCellChildImage", + "DocumentMessageChildTableCellChildLink", + "DocumentMessageChildTableCellChildLineBreak", + "DocumentMessageChildTableCellChildText", + "DocumentMessageChildTableCellChildToolCall", + "DocumentMessageChildTableCellChildToolResult", + "DocumentMessageChildTableCellChildTraceMessage", + "DocumentMessageChildTableRow", + "DocumentMessageChildText", + "DocumentMessageChildToDo", + "DocumentMessageChildToDoChild", + "DocumentMessageChildToDoChildBlob", + "DocumentMessageChildToDoChildCode", + "DocumentMessageChildToDoChildComment", + "DocumentMessageChildToDoChildDivider", + "DocumentMessageChildToDoChildImage", + "DocumentMessageChildToDoChildLink", + "DocumentMessageChildToDoChildLineBreak", + "DocumentMessageChildToDoChildText", + "DocumentMessageChildToDoChildToolCall", + "DocumentMessageChildToDoChildToolResult", + "DocumentMessageChildToDoChildTraceMessage", + "DocumentMessageChildToolCall", + "DocumentMessageChildToolResult", + "DocumentMessageChildTraceMessage", + "DocumentMessageChildUtterance", + "DocumentMessageMentionedUser", + "DocumentMessageMentionedUserChild", + "DocumentMessageMentionedUserChildBlob", + "DocumentMessageMentionedUserChildCode", + "DocumentMessageMentionedUserChildComment", + "DocumentMessageMentionedUserChildDivider", + "DocumentMessageMentionedUserChildImage", + "DocumentMessageMentionedUserChildLink", + "DocumentMessageMentionedUserChildLineBreak", + "DocumentMessageMentionedUserChildText", + "DocumentMessageMentionedUserChildToolCall", + "DocumentMessageMentionedUserChildToolResult", + "DocumentMessageMentionedUserChildTraceMessage", + "DocumentEvent", + "DocumentEventAttendee", + "DocumentEventAttendeeChild", + "DocumentEventAttendeeChildBlob", + "DocumentEventAttendeeChildCode", + "DocumentEventAttendeeChildComment", + "DocumentEventAttendeeChildDivider", + "DocumentEventAttendeeChildImage", + "DocumentEventAttendeeChildLink", + "DocumentEventAttendeeChildLineBreak", + "DocumentEventAttendeeChildText", + "DocumentEventAttendeeChildToolCall", + "DocumentEventAttendeeChildToolResult", + "DocumentEventAttendeeChildTraceMessage", + "DocumentEventChild", + "DocumentEventChildBlob", + "DocumentEventChildCallout", + "DocumentEventChildCalloutChild", + "DocumentEventChildCalloutChildBlob", + "DocumentEventChildCalloutChildCode", + "DocumentEventChildCalloutChildComment", + "DocumentEventChildCalloutChildDivider", + "DocumentEventChildCalloutChildImage", + "DocumentEventChildCalloutChildLink", + "DocumentEventChildCalloutChildLineBreak", + "DocumentEventChildCalloutChildText", + "DocumentEventChildCalloutChildToolCall", + "DocumentEventChildCalloutChildToolResult", + "DocumentEventChildCalloutChildTraceMessage", + "DocumentEventChildChunk", + "DocumentEventChildChunkChild", + "DocumentEventChildChunkChildBlob", + "DocumentEventChildChunkChildCode", + "DocumentEventChildChunkChildComment", + "DocumentEventChildChunkChildDivider", + "DocumentEventChildChunkChildImage", + "DocumentEventChildChunkChildLink", + "DocumentEventChildChunkChildLineBreak", + "DocumentEventChildChunkChildText", + "DocumentEventChildChunkChildToolCall", + "DocumentEventChildChunkChildToolResult", + "DocumentEventChildChunkChildTraceMessage", + "DocumentEventChildCode", + "DocumentEventChildComment", + "DocumentEventChildDivider", + "DocumentEventChildEquation", + "DocumentEventChildEquationChild", + "DocumentEventChildEquationChildBlob", + "DocumentEventChildEquationChildCode", + "DocumentEventChildEquationChildComment", + "DocumentEventChildEquationChildDivider", + "DocumentEventChildEquationChildImage", + "DocumentEventChildEquationChildLink", + "DocumentEventChildEquationChildLineBreak", + "DocumentEventChildEquationChildText", + "DocumentEventChildEquationChildToolCall", + "DocumentEventChildEquationChildToolResult", + "DocumentEventChildEquationChildTraceMessage", + "DocumentEventChildFootnote", + "DocumentEventChildFootnoteChild", + "DocumentEventChildFootnoteChildBlob", + "DocumentEventChildFootnoteChildCode", + "DocumentEventChildFootnoteChildComment", + "DocumentEventChildFootnoteChildDivider", + "DocumentEventChildFootnoteChildImage", + "DocumentEventChildFootnoteChildLink", + "DocumentEventChildFootnoteChildLineBreak", + "DocumentEventChildFootnoteChildText", + "DocumentEventChildFootnoteChildToolCall", + "DocumentEventChildFootnoteChildToolResult", + "DocumentEventChildFootnoteChildTraceMessage", + "DocumentEventChildHeading", + "DocumentEventChildHeadingChild", + "DocumentEventChildHeadingChildBlob", + "DocumentEventChildHeadingChildCode", + "DocumentEventChildHeadingChildComment", + "DocumentEventChildHeadingChildDivider", + "DocumentEventChildHeadingChildImage", + "DocumentEventChildHeadingChildLink", + "DocumentEventChildHeadingChildLineBreak", + "DocumentEventChildHeadingChildText", + "DocumentEventChildHeadingChildToolCall", + "DocumentEventChildHeadingChildToolResult", + "DocumentEventChildHeadingChildTraceMessage", + "DocumentEventChildImage", + "DocumentEventChildLink", + "DocumentEventChildLineBreak", + "DocumentEventChildList", + "DocumentEventChildListItem", + "DocumentEventChildListItemChild", + "DocumentEventChildListItemChildBlob", + "DocumentEventChildListItemChildCode", + "DocumentEventChildListItemChildComment", + "DocumentEventChildListItemChildDivider", + "DocumentEventChildListItemChildImage", + "DocumentEventChildListItemChildLink", + "DocumentEventChildListItemChildLineBreak", + "DocumentEventChildListItemChildText", + "DocumentEventChildListItemChildToolCall", + "DocumentEventChildListItemChildToolResult", + "DocumentEventChildListItemChildTraceMessage", + "DocumentEventChildParagraph", + "DocumentEventChildParagraphChild", + "DocumentEventChildParagraphChildBlob", + "DocumentEventChildParagraphChildCode", + "DocumentEventChildParagraphChildComment", + "DocumentEventChildParagraphChildDivider", + "DocumentEventChildParagraphChildImage", + "DocumentEventChildParagraphChildLink", + "DocumentEventChildParagraphChildLineBreak", + "DocumentEventChildParagraphChildText", + "DocumentEventChildParagraphChildToolCall", + "DocumentEventChildParagraphChildToolResult", + "DocumentEventChildParagraphChildTraceMessage", + "DocumentEventChildQuote", + "DocumentEventChildQuoteChild", + "DocumentEventChildQuoteChildBlob", + "DocumentEventChildQuoteChildCode", + "DocumentEventChildQuoteChildComment", + "DocumentEventChildQuoteChildDivider", + "DocumentEventChildQuoteChildImage", + "DocumentEventChildQuoteChildLink", + "DocumentEventChildQuoteChildLineBreak", + "DocumentEventChildQuoteChildText", + "DocumentEventChildQuoteChildToolCall", + "DocumentEventChildQuoteChildToolResult", + "DocumentEventChildQuoteChildTraceMessage", + "DocumentEventChildTable", + "DocumentEventChildTableCell", + "DocumentEventChildTableCellChild", + "DocumentEventChildTableCellChildBlob", + "DocumentEventChildTableCellChildCode", + "DocumentEventChildTableCellChildComment", + "DocumentEventChildTableCellChildDivider", + "DocumentEventChildTableCellChildImage", + "DocumentEventChildTableCellChildLink", + "DocumentEventChildTableCellChildLineBreak", + "DocumentEventChildTableCellChildText", + "DocumentEventChildTableCellChildToolCall", + "DocumentEventChildTableCellChildToolResult", + "DocumentEventChildTableCellChildTraceMessage", + "DocumentEventChildTableRow", + "DocumentEventChildText", + "DocumentEventChildToDo", + "DocumentEventChildToDoChild", + "DocumentEventChildToDoChildBlob", + "DocumentEventChildToDoChildCode", + "DocumentEventChildToDoChildComment", + "DocumentEventChildToDoChildDivider", + "DocumentEventChildToDoChildImage", + "DocumentEventChildToDoChildLink", + "DocumentEventChildToDoChildLineBreak", + "DocumentEventChildToDoChildText", + "DocumentEventChildToDoChildToolCall", + "DocumentEventChildToDoChildToolResult", + "DocumentEventChildToDoChildTraceMessage", + "DocumentEventChildToolCall", + "DocumentEventChildToolResult", + "DocumentEventChildTraceMessage", + "DocumentEventChildUtterance", + "DocumentFile", + "DocumentFileChild", + "DocumentFileChildBlob", + "DocumentFileChildCallout", + "DocumentFileChildCalloutChild", + "DocumentFileChildCalloutChildBlob", + "DocumentFileChildCalloutChildCode", + "DocumentFileChildCalloutChildComment", + "DocumentFileChildCalloutChildDivider", + "DocumentFileChildCalloutChildImage", + "DocumentFileChildCalloutChildLink", + "DocumentFileChildCalloutChildLineBreak", + "DocumentFileChildCalloutChildText", + "DocumentFileChildCalloutChildToolCall", + "DocumentFileChildCalloutChildToolResult", + "DocumentFileChildCalloutChildTraceMessage", + "DocumentFileChildChunk", + "DocumentFileChildChunkChild", + "DocumentFileChildChunkChildBlob", + "DocumentFileChildChunkChildCode", + "DocumentFileChildChunkChildComment", + "DocumentFileChildChunkChildDivider", + "DocumentFileChildChunkChildImage", + "DocumentFileChildChunkChildLink", + "DocumentFileChildChunkChildLineBreak", + "DocumentFileChildChunkChildText", + "DocumentFileChildChunkChildToolCall", + "DocumentFileChildChunkChildToolResult", + "DocumentFileChildChunkChildTraceMessage", + "DocumentFileChildCode", + "DocumentFileChildComment", + "DocumentFileChildDivider", + "DocumentFileChildEquation", + "DocumentFileChildEquationChild", + "DocumentFileChildEquationChildBlob", + "DocumentFileChildEquationChildCode", + "DocumentFileChildEquationChildComment", + "DocumentFileChildEquationChildDivider", + "DocumentFileChildEquationChildImage", + "DocumentFileChildEquationChildLink", + "DocumentFileChildEquationChildLineBreak", + "DocumentFileChildEquationChildText", + "DocumentFileChildEquationChildToolCall", + "DocumentFileChildEquationChildToolResult", + "DocumentFileChildEquationChildTraceMessage", + "DocumentFileChildFootnote", + "DocumentFileChildFootnoteChild", + "DocumentFileChildFootnoteChildBlob", + "DocumentFileChildFootnoteChildCode", + "DocumentFileChildFootnoteChildComment", + "DocumentFileChildFootnoteChildDivider", + "DocumentFileChildFootnoteChildImage", + "DocumentFileChildFootnoteChildLink", + "DocumentFileChildFootnoteChildLineBreak", + "DocumentFileChildFootnoteChildText", + "DocumentFileChildFootnoteChildToolCall", + "DocumentFileChildFootnoteChildToolResult", + "DocumentFileChildFootnoteChildTraceMessage", + "DocumentFileChildHeading", + "DocumentFileChildHeadingChild", + "DocumentFileChildHeadingChildBlob", + "DocumentFileChildHeadingChildCode", + "DocumentFileChildHeadingChildComment", + "DocumentFileChildHeadingChildDivider", + "DocumentFileChildHeadingChildImage", + "DocumentFileChildHeadingChildLink", + "DocumentFileChildHeadingChildLineBreak", + "DocumentFileChildHeadingChildText", + "DocumentFileChildHeadingChildToolCall", + "DocumentFileChildHeadingChildToolResult", + "DocumentFileChildHeadingChildTraceMessage", + "DocumentFileChildImage", + "DocumentFileChildLink", + "DocumentFileChildLineBreak", + "DocumentFileChildList", + "DocumentFileChildListItem", + "DocumentFileChildListItemChild", + "DocumentFileChildListItemChildBlob", + "DocumentFileChildListItemChildCode", + "DocumentFileChildListItemChildComment", + "DocumentFileChildListItemChildDivider", + "DocumentFileChildListItemChildImage", + "DocumentFileChildListItemChildLink", + "DocumentFileChildListItemChildLineBreak", + "DocumentFileChildListItemChildText", + "DocumentFileChildListItemChildToolCall", + "DocumentFileChildListItemChildToolResult", + "DocumentFileChildListItemChildTraceMessage", + "DocumentFileChildParagraph", + "DocumentFileChildParagraphChild", + "DocumentFileChildParagraphChildBlob", + "DocumentFileChildParagraphChildCode", + "DocumentFileChildParagraphChildComment", + "DocumentFileChildParagraphChildDivider", + "DocumentFileChildParagraphChildImage", + "DocumentFileChildParagraphChildLink", + "DocumentFileChildParagraphChildLineBreak", + "DocumentFileChildParagraphChildText", + "DocumentFileChildParagraphChildToolCall", + "DocumentFileChildParagraphChildToolResult", + "DocumentFileChildParagraphChildTraceMessage", + "DocumentFileChildQuote", + "DocumentFileChildQuoteChild", + "DocumentFileChildQuoteChildBlob", + "DocumentFileChildQuoteChildCode", + "DocumentFileChildQuoteChildComment", + "DocumentFileChildQuoteChildDivider", + "DocumentFileChildQuoteChildImage", + "DocumentFileChildQuoteChildLink", + "DocumentFileChildQuoteChildLineBreak", + "DocumentFileChildQuoteChildText", + "DocumentFileChildQuoteChildToolCall", + "DocumentFileChildQuoteChildToolResult", + "DocumentFileChildQuoteChildTraceMessage", + "DocumentFileChildTable", + "DocumentFileChildTableCell", + "DocumentFileChildTableCellChild", + "DocumentFileChildTableCellChildBlob", + "DocumentFileChildTableCellChildCode", + "DocumentFileChildTableCellChildComment", + "DocumentFileChildTableCellChildDivider", + "DocumentFileChildTableCellChildImage", + "DocumentFileChildTableCellChildLink", + "DocumentFileChildTableCellChildLineBreak", + "DocumentFileChildTableCellChildText", + "DocumentFileChildTableCellChildToolCall", + "DocumentFileChildTableCellChildToolResult", + "DocumentFileChildTableCellChildTraceMessage", + "DocumentFileChildTableRow", + "DocumentFileChildText", + "DocumentFileChildToDo", + "DocumentFileChildToDoChild", + "DocumentFileChildToDoChildBlob", + "DocumentFileChildToDoChildCode", + "DocumentFileChildToDoChildComment", + "DocumentFileChildToDoChildDivider", + "DocumentFileChildToDoChildImage", + "DocumentFileChildToDoChildLink", + "DocumentFileChildToDoChildLineBreak", + "DocumentFileChildToDoChildText", + "DocumentFileChildToDoChildToolCall", + "DocumentFileChildToDoChildToolResult", + "DocumentFileChildToDoChildTraceMessage", + "DocumentFileChildToolCall", + "DocumentFileChildToolResult", + "DocumentFileChildTraceMessage", + "DocumentFileChildUtterance", + "DocumentConversation", + "DocumentConversationChild", + "DocumentConversationChildSender", + "DocumentConversationChildSenderChild", + "DocumentConversationChildSenderChildBlob", + "DocumentConversationChildSenderChildCode", + "DocumentConversationChildSenderChildComment", + "DocumentConversationChildSenderChildDivider", + "DocumentConversationChildSenderChildImage", + "DocumentConversationChildSenderChildLink", + "DocumentConversationChildSenderChildLineBreak", + "DocumentConversationChildSenderChildText", + "DocumentConversationChildSenderChildToolCall", + "DocumentConversationChildSenderChildToolResult", + "DocumentConversationChildSenderChildTraceMessage", + "DocumentConversationChildChild", + "DocumentConversationChildChildBlob", + "DocumentConversationChildChildCallout", + "DocumentConversationChildChildCalloutChild", + "DocumentConversationChildChildCalloutChildBlob", + "DocumentConversationChildChildCalloutChildCode", + "DocumentConversationChildChildCalloutChildComment", + "DocumentConversationChildChildCalloutChildDivider", + "DocumentConversationChildChildCalloutChildImage", + "DocumentConversationChildChildCalloutChildLink", + "DocumentConversationChildChildCalloutChildLineBreak", + "DocumentConversationChildChildCalloutChildText", + "DocumentConversationChildChildCalloutChildToolCall", + "DocumentConversationChildChildCalloutChildToolResult", + "DocumentConversationChildChildCalloutChildTraceMessage", + "DocumentConversationChildChildChunk", + "DocumentConversationChildChildChunkChild", + "DocumentConversationChildChildChunkChildBlob", + "DocumentConversationChildChildChunkChildCode", + "DocumentConversationChildChildChunkChildComment", + "DocumentConversationChildChildChunkChildDivider", + "DocumentConversationChildChildChunkChildImage", + "DocumentConversationChildChildChunkChildLink", + "DocumentConversationChildChildChunkChildLineBreak", + "DocumentConversationChildChildChunkChildText", + "DocumentConversationChildChildChunkChildToolCall", + "DocumentConversationChildChildChunkChildToolResult", + "DocumentConversationChildChildChunkChildTraceMessage", + "DocumentConversationChildChildCode", + "DocumentConversationChildChildComment", + "DocumentConversationChildChildDivider", + "DocumentConversationChildChildEquation", + "DocumentConversationChildChildEquationChild", + "DocumentConversationChildChildEquationChildBlob", + "DocumentConversationChildChildEquationChildCode", + "DocumentConversationChildChildEquationChildComment", + "DocumentConversationChildChildEquationChildDivider", + "DocumentConversationChildChildEquationChildImage", + "DocumentConversationChildChildEquationChildLink", + "DocumentConversationChildChildEquationChildLineBreak", + "DocumentConversationChildChildEquationChildText", + "DocumentConversationChildChildEquationChildToolCall", + "DocumentConversationChildChildEquationChildToolResult", + "DocumentConversationChildChildEquationChildTraceMessage", + "DocumentConversationChildChildFootnote", + "DocumentConversationChildChildFootnoteChild", + "DocumentConversationChildChildFootnoteChildBlob", + "DocumentConversationChildChildFootnoteChildCode", + "DocumentConversationChildChildFootnoteChildComment", + "DocumentConversationChildChildFootnoteChildDivider", + "DocumentConversationChildChildFootnoteChildImage", + "DocumentConversationChildChildFootnoteChildLink", + "DocumentConversationChildChildFootnoteChildLineBreak", + "DocumentConversationChildChildFootnoteChildText", + "DocumentConversationChildChildFootnoteChildToolCall", + "DocumentConversationChildChildFootnoteChildToolResult", + "DocumentConversationChildChildFootnoteChildTraceMessage", + "DocumentConversationChildChildHeading", + "DocumentConversationChildChildHeadingChild", + "DocumentConversationChildChildHeadingChildBlob", + "DocumentConversationChildChildHeadingChildCode", + "DocumentConversationChildChildHeadingChildComment", + "DocumentConversationChildChildHeadingChildDivider", + "DocumentConversationChildChildHeadingChildImage", + "DocumentConversationChildChildHeadingChildLink", + "DocumentConversationChildChildHeadingChildLineBreak", + "DocumentConversationChildChildHeadingChildText", + "DocumentConversationChildChildHeadingChildToolCall", + "DocumentConversationChildChildHeadingChildToolResult", + "DocumentConversationChildChildHeadingChildTraceMessage", + "DocumentConversationChildChildImage", + "DocumentConversationChildChildLink", + "DocumentConversationChildChildLineBreak", + "DocumentConversationChildChildList", + "DocumentConversationChildChildListItem", + "DocumentConversationChildChildListItemChild", + "DocumentConversationChildChildListItemChildBlob", + "DocumentConversationChildChildListItemChildCode", + "DocumentConversationChildChildListItemChildComment", + "DocumentConversationChildChildListItemChildDivider", + "DocumentConversationChildChildListItemChildImage", + "DocumentConversationChildChildListItemChildLink", + "DocumentConversationChildChildListItemChildLineBreak", + "DocumentConversationChildChildListItemChildText", + "DocumentConversationChildChildListItemChildToolCall", + "DocumentConversationChildChildListItemChildToolResult", + "DocumentConversationChildChildListItemChildTraceMessage", + "DocumentConversationChildChildParagraph", + "DocumentConversationChildChildParagraphChild", + "DocumentConversationChildChildParagraphChildBlob", + "DocumentConversationChildChildParagraphChildCode", + "DocumentConversationChildChildParagraphChildComment", + "DocumentConversationChildChildParagraphChildDivider", + "DocumentConversationChildChildParagraphChildImage", + "DocumentConversationChildChildParagraphChildLink", + "DocumentConversationChildChildParagraphChildLineBreak", + "DocumentConversationChildChildParagraphChildText", + "DocumentConversationChildChildParagraphChildToolCall", + "DocumentConversationChildChildParagraphChildToolResult", + "DocumentConversationChildChildParagraphChildTraceMessage", + "DocumentConversationChildChildQuote", + "DocumentConversationChildChildQuoteChild", + "DocumentConversationChildChildQuoteChildBlob", + "DocumentConversationChildChildQuoteChildCode", + "DocumentConversationChildChildQuoteChildComment", + "DocumentConversationChildChildQuoteChildDivider", + "DocumentConversationChildChildQuoteChildImage", + "DocumentConversationChildChildQuoteChildLink", + "DocumentConversationChildChildQuoteChildLineBreak", + "DocumentConversationChildChildQuoteChildText", + "DocumentConversationChildChildQuoteChildToolCall", + "DocumentConversationChildChildQuoteChildToolResult", + "DocumentConversationChildChildQuoteChildTraceMessage", + "DocumentConversationChildChildTable", + "DocumentConversationChildChildTableCell", + "DocumentConversationChildChildTableCellChild", + "DocumentConversationChildChildTableCellChildBlob", + "DocumentConversationChildChildTableCellChildCode", + "DocumentConversationChildChildTableCellChildComment", + "DocumentConversationChildChildTableCellChildDivider", + "DocumentConversationChildChildTableCellChildImage", + "DocumentConversationChildChildTableCellChildLink", + "DocumentConversationChildChildTableCellChildLineBreak", + "DocumentConversationChildChildTableCellChildText", + "DocumentConversationChildChildTableCellChildToolCall", + "DocumentConversationChildChildTableCellChildToolResult", + "DocumentConversationChildChildTableCellChildTraceMessage", + "DocumentConversationChildChildTableRow", + "DocumentConversationChildChildText", + "DocumentConversationChildChildToDo", + "DocumentConversationChildChildToDoChild", + "DocumentConversationChildChildToDoChildBlob", + "DocumentConversationChildChildToDoChildCode", + "DocumentConversationChildChildToDoChildComment", + "DocumentConversationChildChildToDoChildDivider", + "DocumentConversationChildChildToDoChildImage", + "DocumentConversationChildChildToDoChildLink", + "DocumentConversationChildChildToDoChildLineBreak", + "DocumentConversationChildChildToDoChildText", + "DocumentConversationChildChildToDoChildToolCall", + "DocumentConversationChildChildToDoChildToolResult", + "DocumentConversationChildChildToDoChildTraceMessage", + "DocumentConversationChildChildToolCall", + "DocumentConversationChildChildToolResult", + "DocumentConversationChildChildTraceMessage", + "DocumentConversationChildChildUtterance", + "DocumentConversationChildMentionedUser", + "DocumentConversationChildMentionedUserChild", + "DocumentConversationChildMentionedUserChildBlob", + "DocumentConversationChildMentionedUserChildCode", + "DocumentConversationChildMentionedUserChildComment", + "DocumentConversationChildMentionedUserChildDivider", + "DocumentConversationChildMentionedUserChildImage", + "DocumentConversationChildMentionedUserChildLink", + "DocumentConversationChildMentionedUserChildLineBreak", + "DocumentConversationChildMentionedUserChildText", + "DocumentConversationChildMentionedUserChildToolCall", + "DocumentConversationChildMentionedUserChildToolResult", + "DocumentConversationChildMentionedUserChildTraceMessage", + "DocumentTrace", + "DocumentTraceChild", + "DocumentTraceChildTraceMessage", + "DocumentTraceChildToolCall", + "DocumentTraceChildToolResult", + "DocumentTranscript", + "DocumentTranscriptChild", + "DocumentTranscriptParticipant", + "DocumentTranscriptParticipantChild", + "DocumentTranscriptParticipantChildBlob", + "DocumentTranscriptParticipantChildCode", + "DocumentTranscriptParticipantChildComment", + "DocumentTranscriptParticipantChildDivider", + "DocumentTranscriptParticipantChildImage", + "DocumentTranscriptParticipantChildLink", + "DocumentTranscriptParticipantChildLineBreak", + "DocumentTranscriptParticipantChildText", + "DocumentTranscriptParticipantChildToolCall", + "DocumentTranscriptParticipantChildToolResult", + "DocumentTranscriptParticipantChildTraceMessage", + "DocumentCompany", + "DocumentCompanyChild", + "DocumentCompanyChildBlob", + "DocumentCompanyChildCallout", + "DocumentCompanyChildCalloutChild", + "DocumentCompanyChildCalloutChildBlob", + "DocumentCompanyChildCalloutChildCode", + "DocumentCompanyChildCalloutChildComment", + "DocumentCompanyChildCalloutChildDivider", + "DocumentCompanyChildCalloutChildImage", + "DocumentCompanyChildCalloutChildLink", + "DocumentCompanyChildCalloutChildLineBreak", + "DocumentCompanyChildCalloutChildText", + "DocumentCompanyChildCalloutChildToolCall", + "DocumentCompanyChildCalloutChildToolResult", + "DocumentCompanyChildCalloutChildTraceMessage", + "DocumentCompanyChildChunk", + "DocumentCompanyChildChunkChild", + "DocumentCompanyChildChunkChildBlob", + "DocumentCompanyChildChunkChildCode", + "DocumentCompanyChildChunkChildComment", + "DocumentCompanyChildChunkChildDivider", + "DocumentCompanyChildChunkChildImage", + "DocumentCompanyChildChunkChildLink", + "DocumentCompanyChildChunkChildLineBreak", + "DocumentCompanyChildChunkChildText", + "DocumentCompanyChildChunkChildToolCall", + "DocumentCompanyChildChunkChildToolResult", + "DocumentCompanyChildChunkChildTraceMessage", + "DocumentCompanyChildCode", + "DocumentCompanyChildComment", + "DocumentCompanyChildDivider", + "DocumentCompanyChildEquation", + "DocumentCompanyChildEquationChild", + "DocumentCompanyChildEquationChildBlob", + "DocumentCompanyChildEquationChildCode", + "DocumentCompanyChildEquationChildComment", + "DocumentCompanyChildEquationChildDivider", + "DocumentCompanyChildEquationChildImage", + "DocumentCompanyChildEquationChildLink", + "DocumentCompanyChildEquationChildLineBreak", + "DocumentCompanyChildEquationChildText", + "DocumentCompanyChildEquationChildToolCall", + "DocumentCompanyChildEquationChildToolResult", + "DocumentCompanyChildEquationChildTraceMessage", + "DocumentCompanyChildFootnote", + "DocumentCompanyChildFootnoteChild", + "DocumentCompanyChildFootnoteChildBlob", + "DocumentCompanyChildFootnoteChildCode", + "DocumentCompanyChildFootnoteChildComment", + "DocumentCompanyChildFootnoteChildDivider", + "DocumentCompanyChildFootnoteChildImage", + "DocumentCompanyChildFootnoteChildLink", + "DocumentCompanyChildFootnoteChildLineBreak", + "DocumentCompanyChildFootnoteChildText", + "DocumentCompanyChildFootnoteChildToolCall", + "DocumentCompanyChildFootnoteChildToolResult", + "DocumentCompanyChildFootnoteChildTraceMessage", + "DocumentCompanyChildHeading", + "DocumentCompanyChildHeadingChild", + "DocumentCompanyChildHeadingChildBlob", + "DocumentCompanyChildHeadingChildCode", + "DocumentCompanyChildHeadingChildComment", + "DocumentCompanyChildHeadingChildDivider", + "DocumentCompanyChildHeadingChildImage", + "DocumentCompanyChildHeadingChildLink", + "DocumentCompanyChildHeadingChildLineBreak", + "DocumentCompanyChildHeadingChildText", + "DocumentCompanyChildHeadingChildToolCall", + "DocumentCompanyChildHeadingChildToolResult", + "DocumentCompanyChildHeadingChildTraceMessage", + "DocumentCompanyChildImage", + "DocumentCompanyChildLink", + "DocumentCompanyChildLineBreak", + "DocumentCompanyChildList", + "DocumentCompanyChildListItem", + "DocumentCompanyChildListItemChild", + "DocumentCompanyChildListItemChildBlob", + "DocumentCompanyChildListItemChildCode", + "DocumentCompanyChildListItemChildComment", + "DocumentCompanyChildListItemChildDivider", + "DocumentCompanyChildListItemChildImage", + "DocumentCompanyChildListItemChildLink", + "DocumentCompanyChildListItemChildLineBreak", + "DocumentCompanyChildListItemChildText", + "DocumentCompanyChildListItemChildToolCall", + "DocumentCompanyChildListItemChildToolResult", + "DocumentCompanyChildListItemChildTraceMessage", + "DocumentCompanyChildParagraph", + "DocumentCompanyChildParagraphChild", + "DocumentCompanyChildParagraphChildBlob", + "DocumentCompanyChildParagraphChildCode", + "DocumentCompanyChildParagraphChildComment", + "DocumentCompanyChildParagraphChildDivider", + "DocumentCompanyChildParagraphChildImage", + "DocumentCompanyChildParagraphChildLink", + "DocumentCompanyChildParagraphChildLineBreak", + "DocumentCompanyChildParagraphChildText", + "DocumentCompanyChildParagraphChildToolCall", + "DocumentCompanyChildParagraphChildToolResult", + "DocumentCompanyChildParagraphChildTraceMessage", + "DocumentCompanyChildQuote", + "DocumentCompanyChildQuoteChild", + "DocumentCompanyChildQuoteChildBlob", + "DocumentCompanyChildQuoteChildCode", + "DocumentCompanyChildQuoteChildComment", + "DocumentCompanyChildQuoteChildDivider", + "DocumentCompanyChildQuoteChildImage", + "DocumentCompanyChildQuoteChildLink", + "DocumentCompanyChildQuoteChildLineBreak", + "DocumentCompanyChildQuoteChildText", + "DocumentCompanyChildQuoteChildToolCall", + "DocumentCompanyChildQuoteChildToolResult", + "DocumentCompanyChildQuoteChildTraceMessage", + "DocumentCompanyChildTable", + "DocumentCompanyChildTableCell", + "DocumentCompanyChildTableCellChild", + "DocumentCompanyChildTableCellChildBlob", + "DocumentCompanyChildTableCellChildCode", + "DocumentCompanyChildTableCellChildComment", + "DocumentCompanyChildTableCellChildDivider", + "DocumentCompanyChildTableCellChildImage", + "DocumentCompanyChildTableCellChildLink", + "DocumentCompanyChildTableCellChildLineBreak", + "DocumentCompanyChildTableCellChildText", + "DocumentCompanyChildTableCellChildToolCall", + "DocumentCompanyChildTableCellChildToolResult", + "DocumentCompanyChildTableCellChildTraceMessage", + "DocumentCompanyChildTableRow", + "DocumentCompanyChildText", + "DocumentCompanyChildToDo", + "DocumentCompanyChildToDoChild", + "DocumentCompanyChildToDoChildBlob", + "DocumentCompanyChildToDoChildCode", + "DocumentCompanyChildToDoChildComment", + "DocumentCompanyChildToDoChildDivider", + "DocumentCompanyChildToDoChildImage", + "DocumentCompanyChildToDoChildLink", + "DocumentCompanyChildToDoChildLineBreak", + "DocumentCompanyChildToDoChildText", + "DocumentCompanyChildToDoChildToolCall", + "DocumentCompanyChildToDoChildToolResult", + "DocumentCompanyChildToDoChildTraceMessage", + "DocumentCompanyChildToolCall", + "DocumentCompanyChildToolResult", + "DocumentCompanyChildTraceMessage", + "DocumentCompanyChildUtterance", + "DocumentDeal", + "DocumentDealChild", + "DocumentDealChildBlob", + "DocumentDealChildCallout", + "DocumentDealChildCalloutChild", + "DocumentDealChildCalloutChildBlob", + "DocumentDealChildCalloutChildCode", + "DocumentDealChildCalloutChildComment", + "DocumentDealChildCalloutChildDivider", + "DocumentDealChildCalloutChildImage", + "DocumentDealChildCalloutChildLink", + "DocumentDealChildCalloutChildLineBreak", + "DocumentDealChildCalloutChildText", + "DocumentDealChildCalloutChildToolCall", + "DocumentDealChildCalloutChildToolResult", + "DocumentDealChildCalloutChildTraceMessage", + "DocumentDealChildChunk", + "DocumentDealChildChunkChild", + "DocumentDealChildChunkChildBlob", + "DocumentDealChildChunkChildCode", + "DocumentDealChildChunkChildComment", + "DocumentDealChildChunkChildDivider", + "DocumentDealChildChunkChildImage", + "DocumentDealChildChunkChildLink", + "DocumentDealChildChunkChildLineBreak", + "DocumentDealChildChunkChildText", + "DocumentDealChildChunkChildToolCall", + "DocumentDealChildChunkChildToolResult", + "DocumentDealChildChunkChildTraceMessage", + "DocumentDealChildCode", + "DocumentDealChildComment", + "DocumentDealChildDivider", + "DocumentDealChildEquation", + "DocumentDealChildEquationChild", + "DocumentDealChildEquationChildBlob", + "DocumentDealChildEquationChildCode", + "DocumentDealChildEquationChildComment", + "DocumentDealChildEquationChildDivider", + "DocumentDealChildEquationChildImage", + "DocumentDealChildEquationChildLink", + "DocumentDealChildEquationChildLineBreak", + "DocumentDealChildEquationChildText", + "DocumentDealChildEquationChildToolCall", + "DocumentDealChildEquationChildToolResult", + "DocumentDealChildEquationChildTraceMessage", + "DocumentDealChildFootnote", + "DocumentDealChildFootnoteChild", + "DocumentDealChildFootnoteChildBlob", + "DocumentDealChildFootnoteChildCode", + "DocumentDealChildFootnoteChildComment", + "DocumentDealChildFootnoteChildDivider", + "DocumentDealChildFootnoteChildImage", + "DocumentDealChildFootnoteChildLink", + "DocumentDealChildFootnoteChildLineBreak", + "DocumentDealChildFootnoteChildText", + "DocumentDealChildFootnoteChildToolCall", + "DocumentDealChildFootnoteChildToolResult", + "DocumentDealChildFootnoteChildTraceMessage", + "DocumentDealChildHeading", + "DocumentDealChildHeadingChild", + "DocumentDealChildHeadingChildBlob", + "DocumentDealChildHeadingChildCode", + "DocumentDealChildHeadingChildComment", + "DocumentDealChildHeadingChildDivider", + "DocumentDealChildHeadingChildImage", + "DocumentDealChildHeadingChildLink", + "DocumentDealChildHeadingChildLineBreak", + "DocumentDealChildHeadingChildText", + "DocumentDealChildHeadingChildToolCall", + "DocumentDealChildHeadingChildToolResult", + "DocumentDealChildHeadingChildTraceMessage", + "DocumentDealChildImage", + "DocumentDealChildLink", + "DocumentDealChildLineBreak", + "DocumentDealChildList", + "DocumentDealChildListItem", + "DocumentDealChildListItemChild", + "DocumentDealChildListItemChildBlob", + "DocumentDealChildListItemChildCode", + "DocumentDealChildListItemChildComment", + "DocumentDealChildListItemChildDivider", + "DocumentDealChildListItemChildImage", + "DocumentDealChildListItemChildLink", + "DocumentDealChildListItemChildLineBreak", + "DocumentDealChildListItemChildText", + "DocumentDealChildListItemChildToolCall", + "DocumentDealChildListItemChildToolResult", + "DocumentDealChildListItemChildTraceMessage", + "DocumentDealChildParagraph", + "DocumentDealChildParagraphChild", + "DocumentDealChildParagraphChildBlob", + "DocumentDealChildParagraphChildCode", + "DocumentDealChildParagraphChildComment", + "DocumentDealChildParagraphChildDivider", + "DocumentDealChildParagraphChildImage", + "DocumentDealChildParagraphChildLink", + "DocumentDealChildParagraphChildLineBreak", + "DocumentDealChildParagraphChildText", + "DocumentDealChildParagraphChildToolCall", + "DocumentDealChildParagraphChildToolResult", + "DocumentDealChildParagraphChildTraceMessage", + "DocumentDealChildQuote", + "DocumentDealChildQuoteChild", + "DocumentDealChildQuoteChildBlob", + "DocumentDealChildQuoteChildCode", + "DocumentDealChildQuoteChildComment", + "DocumentDealChildQuoteChildDivider", + "DocumentDealChildQuoteChildImage", + "DocumentDealChildQuoteChildLink", + "DocumentDealChildQuoteChildLineBreak", + "DocumentDealChildQuoteChildText", + "DocumentDealChildQuoteChildToolCall", + "DocumentDealChildQuoteChildToolResult", + "DocumentDealChildQuoteChildTraceMessage", + "DocumentDealChildTable", + "DocumentDealChildTableCell", + "DocumentDealChildTableCellChild", + "DocumentDealChildTableCellChildBlob", + "DocumentDealChildTableCellChildCode", + "DocumentDealChildTableCellChildComment", + "DocumentDealChildTableCellChildDivider", + "DocumentDealChildTableCellChildImage", + "DocumentDealChildTableCellChildLink", + "DocumentDealChildTableCellChildLineBreak", + "DocumentDealChildTableCellChildText", + "DocumentDealChildTableCellChildToolCall", + "DocumentDealChildTableCellChildToolResult", + "DocumentDealChildTableCellChildTraceMessage", + "DocumentDealChildTableRow", + "DocumentDealChildText", + "DocumentDealChildToDo", + "DocumentDealChildToDoChild", + "DocumentDealChildToDoChildBlob", + "DocumentDealChildToDoChildCode", + "DocumentDealChildToDoChildComment", + "DocumentDealChildToDoChildDivider", + "DocumentDealChildToDoChildImage", + "DocumentDealChildToDoChildLink", + "DocumentDealChildToDoChildLineBreak", + "DocumentDealChildToDoChildText", + "DocumentDealChildToDoChildToolCall", + "DocumentDealChildToDoChildToolResult", + "DocumentDealChildToDoChildTraceMessage", + "DocumentDealChildToolCall", + "DocumentDealChildToolResult", + "DocumentDealChildTraceMessage", + "DocumentDealChildUtterance", +] + + +class DocumentDocumentChildBlob(BaseModel): + """Represents embedded binary data using data URI scheme. + + Format: data:[][;base64], + Example: data:text/html;base64,PGh0bWw+... + """ + + data: str + + mimetype: str + + id: Optional[str] = None + + type: Optional[Literal["blob"]] = None + + +class DocumentDocumentChildCalloutChildBlob(BaseModel): + """Represents embedded binary data using data URI scheme. + + Format: data:[][;base64], + Example: data:text/html;base64,PGh0bWw+... + """ + + data: str + + mimetype: str + + id: Optional[str] = None + + type: Optional[Literal["blob"]] = None + + +class DocumentDocumentChildCalloutChildCode(BaseModel): + text: str + + id: Optional[str] = None + + language: Optional[str] = None + + type: Optional[Literal["code"]] = None + + +class DocumentDocumentChildCalloutChildComment(BaseModel): + text: str + + id: Optional[str] = None + + created_at: Optional[datetime] = None + + type: Optional[Literal["comment"]] = None + + +class DocumentDocumentChildCalloutChildDivider(BaseModel): + id: Optional[str] = None + + type: Optional[Literal["divider"]] = None + + +class DocumentDocumentChildCalloutChildImage(BaseModel): + src: str + + text: str + + id: Optional[str] = None + + type: Optional[Literal["image"]] = None + + +class DocumentDocumentChildCalloutChildLink(BaseModel): + text: str + + url: str + + id: Optional[str] = None + + type: Optional[Literal["link"]] = None + + +class DocumentDocumentChildCalloutChildLineBreak(BaseModel): + id: Optional[str] = None + + type: Optional[Literal["line_break"]] = None + + +class DocumentDocumentChildCalloutChildText(BaseModel): + text: str + + id: Optional[str] = None + + marks: Optional[List[Literal["bold", "italic", "underline", "strikethrough", "code", "math"]]] = None + + type: Optional[Literal["text"]] = None + + +class DocumentDocumentChildCalloutChildToolCall(BaseModel): + """A tool/function call made by the assistant.""" + + tool_call_id: str + + tool_name: str + + id: Optional[str] = None + + args: Optional[Dict[str, object]] = None + + type: Optional[Literal["tool_call"]] = None + + +class DocumentDocumentChildCalloutChildToolResult(BaseModel): + """The result of a tool call.""" + + output: Union[str, Dict[str, object], List[object]] + + tool_call_id: str + + tool_name: str + + id: Optional[str] = None + + is_error: Optional[bool] = None + + type: Optional[Literal["tool_result"]] = None + + +class DocumentDocumentChildCalloutChildTraceMessage(BaseModel): + """A message in an agent trace (user message, assistant message, or thinking).""" + + text: str + + id: Optional[str] = None + + message_type: Optional[Literal["message", "thinking"]] = None + + role: Optional[Literal["user", "assistant"]] = None + + timestamp: Optional[datetime] = None + + type: Optional[Literal["trace_message"]] = None + + +DocumentDocumentChildCalloutChild: TypeAlias = Union[ + DocumentDocumentChildCalloutChildBlob, + DocumentDocumentChildCalloutChildCode, + DocumentDocumentChildCalloutChildComment, + DocumentDocumentChildCalloutChildDivider, + DocumentDocumentChildCalloutChildImage, + DocumentDocumentChildCalloutChildLink, + DocumentDocumentChildCalloutChildLineBreak, + DocumentDocumentChildCalloutChildText, + DocumentDocumentChildCalloutChildToolCall, + DocumentDocumentChildCalloutChildToolResult, + DocumentDocumentChildCalloutChildTraceMessage, + object, +] + + +class DocumentDocumentChildCallout(BaseModel): + id: Optional[str] = None + + children: Optional[List[DocumentDocumentChildCalloutChild]] = None + + text: Optional[str] = None + + title: Optional[str] = None + + type: Optional[Literal["callout"]] = None + + +class DocumentDocumentChildChunkChildBlob(BaseModel): + """Represents embedded binary data using data URI scheme. + + Format: data:[][;base64], + Example: data:text/html;base64,PGh0bWw+... + """ + + data: str + + mimetype: str + + id: Optional[str] = None + + type: Optional[Literal["blob"]] = None + + +class DocumentDocumentChildChunkChildCode(BaseModel): + text: str + + id: Optional[str] = None + + language: Optional[str] = None + + type: Optional[Literal["code"]] = None + + +class DocumentDocumentChildChunkChildComment(BaseModel): + text: str + + id: Optional[str] = None + + created_at: Optional[datetime] = None + + type: Optional[Literal["comment"]] = None + + +class DocumentDocumentChildChunkChildDivider(BaseModel): + id: Optional[str] = None + + type: Optional[Literal["divider"]] = None + + +class DocumentDocumentChildChunkChildImage(BaseModel): + src: str + + text: str + + id: Optional[str] = None + + type: Optional[Literal["image"]] = None + + +class DocumentDocumentChildChunkChildLink(BaseModel): + text: str + + url: str + + id: Optional[str] = None + + type: Optional[Literal["link"]] = None + + +class DocumentDocumentChildChunkChildLineBreak(BaseModel): + id: Optional[str] = None + + type: Optional[Literal["line_break"]] = None + + +class DocumentDocumentChildChunkChildText(BaseModel): + text: str + + id: Optional[str] = None + + marks: Optional[List[Literal["bold", "italic", "underline", "strikethrough", "code", "math"]]] = None + + type: Optional[Literal["text"]] = None + + +class DocumentDocumentChildChunkChildToolCall(BaseModel): + """A tool/function call made by the assistant.""" + + tool_call_id: str + + tool_name: str + + id: Optional[str] = None + + args: Optional[Dict[str, object]] = None + + type: Optional[Literal["tool_call"]] = None + + +class DocumentDocumentChildChunkChildToolResult(BaseModel): + """The result of a tool call.""" + + output: Union[str, Dict[str, object], List[object]] + + tool_call_id: str + + tool_name: str + + id: Optional[str] = None + + is_error: Optional[bool] = None + + type: Optional[Literal["tool_result"]] = None + + +class DocumentDocumentChildChunkChildTraceMessage(BaseModel): + """A message in an agent trace (user message, assistant message, or thinking).""" + + text: str + + id: Optional[str] = None + + message_type: Optional[Literal["message", "thinking"]] = None + + role: Optional[Literal["user", "assistant"]] = None + + timestamp: Optional[datetime] = None + + type: Optional[Literal["trace_message"]] = None + + +DocumentDocumentChildChunkChild: TypeAlias = Union[ + DocumentDocumentChildChunkChildBlob, + DocumentDocumentChildChunkChildCode, + DocumentDocumentChildChunkChildComment, + DocumentDocumentChildChunkChildDivider, + DocumentDocumentChildChunkChildImage, + DocumentDocumentChildChunkChildLink, + DocumentDocumentChildChunkChildLineBreak, + DocumentDocumentChildChunkChildText, + DocumentDocumentChildChunkChildToolCall, + DocumentDocumentChildChunkChildToolResult, + DocumentDocumentChildChunkChildTraceMessage, + object, +] + + +class DocumentDocumentChildChunk(BaseModel): + id: Optional[str] = None + + children: Optional[List[DocumentDocumentChildChunkChild]] = None + + text: Optional[str] = None + + type: Optional[Literal["chunk"]] = None + + +class DocumentDocumentChildCode(BaseModel): + text: str + + id: Optional[str] = None + + language: Optional[str] = None + + type: Optional[Literal["code"]] = None + + +class DocumentDocumentChildComment(BaseModel): + text: str + + id: Optional[str] = None + + created_at: Optional[datetime] = None + + type: Optional[Literal["comment"]] = None + + +class DocumentDocumentChildDivider(BaseModel): + id: Optional[str] = None + + type: Optional[Literal["divider"]] = None + + +class DocumentDocumentChildEquationChildBlob(BaseModel): + """Represents embedded binary data using data URI scheme. + + Format: data:[][;base64], + Example: data:text/html;base64,PGh0bWw+... + """ + + data: str + + mimetype: str + + id: Optional[str] = None + + type: Optional[Literal["blob"]] = None + + +class DocumentDocumentChildEquationChildCode(BaseModel): + text: str + + id: Optional[str] = None + + language: Optional[str] = None + + type: Optional[Literal["code"]] = None + + +class DocumentDocumentChildEquationChildComment(BaseModel): + text: str + + id: Optional[str] = None + + created_at: Optional[datetime] = None + + type: Optional[Literal["comment"]] = None + + +class DocumentDocumentChildEquationChildDivider(BaseModel): + id: Optional[str] = None + + type: Optional[Literal["divider"]] = None + + +class DocumentDocumentChildEquationChildImage(BaseModel): + src: str + + text: str + + id: Optional[str] = None + + type: Optional[Literal["image"]] = None + + +class DocumentDocumentChildEquationChildLink(BaseModel): + text: str + + url: str + + id: Optional[str] = None + + type: Optional[Literal["link"]] = None + + +class DocumentDocumentChildEquationChildLineBreak(BaseModel): + id: Optional[str] = None + + type: Optional[Literal["line_break"]] = None + + +class DocumentDocumentChildEquationChildText(BaseModel): + text: str + + id: Optional[str] = None + + marks: Optional[List[Literal["bold", "italic", "underline", "strikethrough", "code", "math"]]] = None + + type: Optional[Literal["text"]] = None + + +class DocumentDocumentChildEquationChildToolCall(BaseModel): + """A tool/function call made by the assistant.""" + + tool_call_id: str + + tool_name: str + + id: Optional[str] = None + + args: Optional[Dict[str, object]] = None + + type: Optional[Literal["tool_call"]] = None + + +class DocumentDocumentChildEquationChildToolResult(BaseModel): + """The result of a tool call.""" + + output: Union[str, Dict[str, object], List[object]] + + tool_call_id: str + + tool_name: str + + id: Optional[str] = None + + is_error: Optional[bool] = None + + type: Optional[Literal["tool_result"]] = None + + +class DocumentDocumentChildEquationChildTraceMessage(BaseModel): + """A message in an agent trace (user message, assistant message, or thinking).""" + + text: str + + id: Optional[str] = None + + message_type: Optional[Literal["message", "thinking"]] = None + + role: Optional[Literal["user", "assistant"]] = None + + timestamp: Optional[datetime] = None + + type: Optional[Literal["trace_message"]] = None + + +DocumentDocumentChildEquationChild: TypeAlias = Union[ + DocumentDocumentChildEquationChildBlob, + DocumentDocumentChildEquationChildCode, + DocumentDocumentChildEquationChildComment, + DocumentDocumentChildEquationChildDivider, + DocumentDocumentChildEquationChildImage, + DocumentDocumentChildEquationChildLink, + DocumentDocumentChildEquationChildLineBreak, + DocumentDocumentChildEquationChildText, + DocumentDocumentChildEquationChildToolCall, + DocumentDocumentChildEquationChildToolResult, + DocumentDocumentChildEquationChildTraceMessage, + object, +] + + +class DocumentDocumentChildEquation(BaseModel): + id: Optional[str] = None + + children: Optional[List[DocumentDocumentChildEquationChild]] = None + + text: Optional[str] = None + + type: Optional[Literal["equation"]] = None + + +class DocumentDocumentChildFootnoteChildBlob(BaseModel): + """Represents embedded binary data using data URI scheme. + + Format: data:[][;base64], + Example: data:text/html;base64,PGh0bWw+... + """ + + data: str + + mimetype: str + + id: Optional[str] = None + + type: Optional[Literal["blob"]] = None + + +class DocumentDocumentChildFootnoteChildCode(BaseModel): + text: str + + id: Optional[str] = None + + language: Optional[str] = None + + type: Optional[Literal["code"]] = None + + +class DocumentDocumentChildFootnoteChildComment(BaseModel): + text: str + + id: Optional[str] = None + + created_at: Optional[datetime] = None + + type: Optional[Literal["comment"]] = None + + +class DocumentDocumentChildFootnoteChildDivider(BaseModel): + id: Optional[str] = None + + type: Optional[Literal["divider"]] = None + + +class DocumentDocumentChildFootnoteChildImage(BaseModel): + src: str + + text: str + + id: Optional[str] = None + + type: Optional[Literal["image"]] = None + + +class DocumentDocumentChildFootnoteChildLink(BaseModel): + text: str + + url: str + + id: Optional[str] = None + + type: Optional[Literal["link"]] = None + + +class DocumentDocumentChildFootnoteChildLineBreak(BaseModel): + id: Optional[str] = None + + type: Optional[Literal["line_break"]] = None + + +class DocumentDocumentChildFootnoteChildText(BaseModel): + text: str + + id: Optional[str] = None + + marks: Optional[List[Literal["bold", "italic", "underline", "strikethrough", "code", "math"]]] = None + + type: Optional[Literal["text"]] = None + + +class DocumentDocumentChildFootnoteChildToolCall(BaseModel): + """A tool/function call made by the assistant.""" + + tool_call_id: str + + tool_name: str + + id: Optional[str] = None + + args: Optional[Dict[str, object]] = None + + type: Optional[Literal["tool_call"]] = None + + +class DocumentDocumentChildFootnoteChildToolResult(BaseModel): + """The result of a tool call.""" + + output: Union[str, Dict[str, object], List[object]] + + tool_call_id: str + + tool_name: str + + id: Optional[str] = None + + is_error: Optional[bool] = None + + type: Optional[Literal["tool_result"]] = None + + +class DocumentDocumentChildFootnoteChildTraceMessage(BaseModel): + """A message in an agent trace (user message, assistant message, or thinking).""" + + text: str + + id: Optional[str] = None + + message_type: Optional[Literal["message", "thinking"]] = None + + role: Optional[Literal["user", "assistant"]] = None + + timestamp: Optional[datetime] = None + + type: Optional[Literal["trace_message"]] = None + + +DocumentDocumentChildFootnoteChild: TypeAlias = Union[ + DocumentDocumentChildFootnoteChildBlob, + DocumentDocumentChildFootnoteChildCode, + DocumentDocumentChildFootnoteChildComment, + DocumentDocumentChildFootnoteChildDivider, + DocumentDocumentChildFootnoteChildImage, + DocumentDocumentChildFootnoteChildLink, + DocumentDocumentChildFootnoteChildLineBreak, + DocumentDocumentChildFootnoteChildText, + DocumentDocumentChildFootnoteChildToolCall, + DocumentDocumentChildFootnoteChildToolResult, + DocumentDocumentChildFootnoteChildTraceMessage, + object, +] + + +class DocumentDocumentChildFootnote(BaseModel): + id: Optional[str] = None + + children: Optional[List[DocumentDocumentChildFootnoteChild]] = None + + text: Optional[str] = None + + type: Optional[Literal["footnote"]] = None + + +class DocumentDocumentChildHeadingChildBlob(BaseModel): + """Represents embedded binary data using data URI scheme. + + Format: data:[][;base64], + Example: data:text/html;base64,PGh0bWw+... + """ + + data: str + + mimetype: str + + id: Optional[str] = None + + type: Optional[Literal["blob"]] = None + + +class DocumentDocumentChildHeadingChildCode(BaseModel): + text: str + + id: Optional[str] = None + + language: Optional[str] = None + + type: Optional[Literal["code"]] = None + + +class DocumentDocumentChildHeadingChildComment(BaseModel): + text: str + + id: Optional[str] = None + + created_at: Optional[datetime] = None + + type: Optional[Literal["comment"]] = None + + +class DocumentDocumentChildHeadingChildDivider(BaseModel): + id: Optional[str] = None + + type: Optional[Literal["divider"]] = None + + +class DocumentDocumentChildHeadingChildImage(BaseModel): + src: str + + text: str + + id: Optional[str] = None + + type: Optional[Literal["image"]] = None + + +class DocumentDocumentChildHeadingChildLink(BaseModel): + text: str + + url: str + + id: Optional[str] = None + + type: Optional[Literal["link"]] = None + + +class DocumentDocumentChildHeadingChildLineBreak(BaseModel): + id: Optional[str] = None + + type: Optional[Literal["line_break"]] = None + + +class DocumentDocumentChildHeadingChildText(BaseModel): + text: str + + id: Optional[str] = None + + marks: Optional[List[Literal["bold", "italic", "underline", "strikethrough", "code", "math"]]] = None + + type: Optional[Literal["text"]] = None + + +class DocumentDocumentChildHeadingChildToolCall(BaseModel): + """A tool/function call made by the assistant.""" + + tool_call_id: str + + tool_name: str + + id: Optional[str] = None + + args: Optional[Dict[str, object]] = None + + type: Optional[Literal["tool_call"]] = None + + +class DocumentDocumentChildHeadingChildToolResult(BaseModel): + """The result of a tool call.""" + + output: Union[str, Dict[str, object], List[object]] + + tool_call_id: str + + tool_name: str + + id: Optional[str] = None + + is_error: Optional[bool] = None + + type: Optional[Literal["tool_result"]] = None + + +class DocumentDocumentChildHeadingChildTraceMessage(BaseModel): + """A message in an agent trace (user message, assistant message, or thinking).""" + + text: str + + id: Optional[str] = None + + message_type: Optional[Literal["message", "thinking"]] = None + + role: Optional[Literal["user", "assistant"]] = None + + timestamp: Optional[datetime] = None + + type: Optional[Literal["trace_message"]] = None + + +DocumentDocumentChildHeadingChild: TypeAlias = Union[ + DocumentDocumentChildHeadingChildBlob, + DocumentDocumentChildHeadingChildCode, + DocumentDocumentChildHeadingChildComment, + DocumentDocumentChildHeadingChildDivider, + DocumentDocumentChildHeadingChildImage, + DocumentDocumentChildHeadingChildLink, + DocumentDocumentChildHeadingChildLineBreak, + DocumentDocumentChildHeadingChildText, + DocumentDocumentChildHeadingChildToolCall, + DocumentDocumentChildHeadingChildToolResult, + DocumentDocumentChildHeadingChildTraceMessage, + object, +] + + +class DocumentDocumentChildHeading(BaseModel): + level: int + + id: Optional[str] = None + + children: Optional[List[DocumentDocumentChildHeadingChild]] = None + + text: Optional[str] = None + + type: Optional[Literal["heading"]] = None + + +class DocumentDocumentChildImage(BaseModel): + src: str + + text: str + + id: Optional[str] = None + + type: Optional[Literal["image"]] = None + + +class DocumentDocumentChildLink(BaseModel): + text: str + + url: str + + id: Optional[str] = None + + type: Optional[Literal["link"]] = None + + +class DocumentDocumentChildLineBreak(BaseModel): + id: Optional[str] = None + + type: Optional[Literal["line_break"]] = None + + +class DocumentDocumentChildList(BaseModel): + id: Optional[str] = None + + children: Optional[List[object]] = None + + ordered: Optional[bool] = None + + text: Optional[str] = None + + type: Optional[Literal["list"]] = None + + +class DocumentDocumentChildListItemChildBlob(BaseModel): + """Represents embedded binary data using data URI scheme. + + Format: data:[][;base64], + Example: data:text/html;base64,PGh0bWw+... + """ + + data: str + + mimetype: str + + id: Optional[str] = None + + type: Optional[Literal["blob"]] = None + + +class DocumentDocumentChildListItemChildCode(BaseModel): + text: str + + id: Optional[str] = None + + language: Optional[str] = None + + type: Optional[Literal["code"]] = None + + +class DocumentDocumentChildListItemChildComment(BaseModel): + text: str + + id: Optional[str] = None + + created_at: Optional[datetime] = None + + type: Optional[Literal["comment"]] = None + + +class DocumentDocumentChildListItemChildDivider(BaseModel): + id: Optional[str] = None + + type: Optional[Literal["divider"]] = None + + +class DocumentDocumentChildListItemChildImage(BaseModel): + src: str + + text: str + + id: Optional[str] = None + + type: Optional[Literal["image"]] = None + + +class DocumentDocumentChildListItemChildLink(BaseModel): + text: str + + url: str + + id: Optional[str] = None + + type: Optional[Literal["link"]] = None + + +class DocumentDocumentChildListItemChildLineBreak(BaseModel): + id: Optional[str] = None + + type: Optional[Literal["line_break"]] = None + + +class DocumentDocumentChildListItemChildText(BaseModel): + text: str + + id: Optional[str] = None + + marks: Optional[List[Literal["bold", "italic", "underline", "strikethrough", "code", "math"]]] = None + + type: Optional[Literal["text"]] = None + + +class DocumentDocumentChildListItemChildToolCall(BaseModel): + """A tool/function call made by the assistant.""" + + tool_call_id: str + + tool_name: str + + id: Optional[str] = None + + args: Optional[Dict[str, object]] = None + + type: Optional[Literal["tool_call"]] = None + + +class DocumentDocumentChildListItemChildToolResult(BaseModel): + """The result of a tool call.""" + + output: Union[str, Dict[str, object], List[object]] + + tool_call_id: str + + tool_name: str + + id: Optional[str] = None + + is_error: Optional[bool] = None + + type: Optional[Literal["tool_result"]] = None + + +class DocumentDocumentChildListItemChildTraceMessage(BaseModel): + """A message in an agent trace (user message, assistant message, or thinking).""" + + text: str + + id: Optional[str] = None + + message_type: Optional[Literal["message", "thinking"]] = None + + role: Optional[Literal["user", "assistant"]] = None + + timestamp: Optional[datetime] = None + + type: Optional[Literal["trace_message"]] = None + + +DocumentDocumentChildListItemChild: TypeAlias = Union[ + DocumentDocumentChildListItemChildBlob, + DocumentDocumentChildListItemChildCode, + DocumentDocumentChildListItemChildComment, + DocumentDocumentChildListItemChildDivider, + DocumentDocumentChildListItemChildImage, + DocumentDocumentChildListItemChildLink, + DocumentDocumentChildListItemChildLineBreak, + DocumentDocumentChildListItemChildText, + DocumentDocumentChildListItemChildToolCall, + DocumentDocumentChildListItemChildToolResult, + DocumentDocumentChildListItemChildTraceMessage, + object, +] + + +class DocumentDocumentChildListItem(BaseModel): + id: Optional[str] = None + + children: Optional[List[DocumentDocumentChildListItemChild]] = None + + text: Optional[str] = None + + type: Optional[Literal["list_item"]] = None + + +class DocumentDocumentChildParagraphChildBlob(BaseModel): + """Represents embedded binary data using data URI scheme. + + Format: data:[][;base64], + Example: data:text/html;base64,PGh0bWw+... + """ + + data: str + + mimetype: str + + id: Optional[str] = None + + type: Optional[Literal["blob"]] = None + + +class DocumentDocumentChildParagraphChildCode(BaseModel): + text: str + + id: Optional[str] = None + + language: Optional[str] = None + + type: Optional[Literal["code"]] = None + + +class DocumentDocumentChildParagraphChildComment(BaseModel): + text: str + + id: Optional[str] = None + + created_at: Optional[datetime] = None + + type: Optional[Literal["comment"]] = None + + +class DocumentDocumentChildParagraphChildDivider(BaseModel): + id: Optional[str] = None + + type: Optional[Literal["divider"]] = None + + +class DocumentDocumentChildParagraphChildImage(BaseModel): + src: str + + text: str + + id: Optional[str] = None + + type: Optional[Literal["image"]] = None + + +class DocumentDocumentChildParagraphChildLink(BaseModel): + text: str + + url: str + + id: Optional[str] = None + + type: Optional[Literal["link"]] = None + + +class DocumentDocumentChildParagraphChildLineBreak(BaseModel): + id: Optional[str] = None + + type: Optional[Literal["line_break"]] = None + + +class DocumentDocumentChildParagraphChildText(BaseModel): + text: str + + id: Optional[str] = None + + marks: Optional[List[Literal["bold", "italic", "underline", "strikethrough", "code", "math"]]] = None + + type: Optional[Literal["text"]] = None + + +class DocumentDocumentChildParagraphChildToolCall(BaseModel): + """A tool/function call made by the assistant.""" + + tool_call_id: str + + tool_name: str + + id: Optional[str] = None + + args: Optional[Dict[str, object]] = None + + type: Optional[Literal["tool_call"]] = None + + +class DocumentDocumentChildParagraphChildToolResult(BaseModel): + """The result of a tool call.""" + + output: Union[str, Dict[str, object], List[object]] + + tool_call_id: str + + tool_name: str + + id: Optional[str] = None + + is_error: Optional[bool] = None + + type: Optional[Literal["tool_result"]] = None + + +class DocumentDocumentChildParagraphChildTraceMessage(BaseModel): + """A message in an agent trace (user message, assistant message, or thinking).""" + + text: str + + id: Optional[str] = None + + message_type: Optional[Literal["message", "thinking"]] = None + + role: Optional[Literal["user", "assistant"]] = None + + timestamp: Optional[datetime] = None + + type: Optional[Literal["trace_message"]] = None + + +DocumentDocumentChildParagraphChild: TypeAlias = Union[ + DocumentDocumentChildParagraphChildBlob, + DocumentDocumentChildParagraphChildCode, + DocumentDocumentChildParagraphChildComment, + DocumentDocumentChildParagraphChildDivider, + DocumentDocumentChildParagraphChildImage, + DocumentDocumentChildParagraphChildLink, + DocumentDocumentChildParagraphChildLineBreak, + DocumentDocumentChildParagraphChildText, + DocumentDocumentChildParagraphChildToolCall, + DocumentDocumentChildParagraphChildToolResult, + DocumentDocumentChildParagraphChildTraceMessage, + object, +] + + +class DocumentDocumentChildParagraph(BaseModel): + id: Optional[str] = None + + children: Optional[List[DocumentDocumentChildParagraphChild]] = None + + text: Optional[str] = None + + type: Optional[Literal["paragraph"]] = None + + +class DocumentDocumentChildQuoteChildBlob(BaseModel): + """Represents embedded binary data using data URI scheme. + + Format: data:[][;base64], + Example: data:text/html;base64,PGh0bWw+... + """ + + data: str + + mimetype: str + + id: Optional[str] = None + + type: Optional[Literal["blob"]] = None + + +class DocumentDocumentChildQuoteChildCode(BaseModel): + text: str + + id: Optional[str] = None + + language: Optional[str] = None + + type: Optional[Literal["code"]] = None + + +class DocumentDocumentChildQuoteChildComment(BaseModel): + text: str + + id: Optional[str] = None + + created_at: Optional[datetime] = None + + type: Optional[Literal["comment"]] = None + + +class DocumentDocumentChildQuoteChildDivider(BaseModel): + id: Optional[str] = None + + type: Optional[Literal["divider"]] = None + + +class DocumentDocumentChildQuoteChildImage(BaseModel): + src: str + + text: str + + id: Optional[str] = None + + type: Optional[Literal["image"]] = None + + +class DocumentDocumentChildQuoteChildLink(BaseModel): + text: str + + url: str + + id: Optional[str] = None + + type: Optional[Literal["link"]] = None + + +class DocumentDocumentChildQuoteChildLineBreak(BaseModel): + id: Optional[str] = None + + type: Optional[Literal["line_break"]] = None + + +class DocumentDocumentChildQuoteChildText(BaseModel): + text: str + + id: Optional[str] = None + + marks: Optional[List[Literal["bold", "italic", "underline", "strikethrough", "code", "math"]]] = None + + type: Optional[Literal["text"]] = None + + +class DocumentDocumentChildQuoteChildToolCall(BaseModel): + """A tool/function call made by the assistant.""" + + tool_call_id: str + + tool_name: str + + id: Optional[str] = None + + args: Optional[Dict[str, object]] = None + + type: Optional[Literal["tool_call"]] = None + + +class DocumentDocumentChildQuoteChildToolResult(BaseModel): + """The result of a tool call.""" + + output: Union[str, Dict[str, object], List[object]] + + tool_call_id: str + + tool_name: str + + id: Optional[str] = None + + is_error: Optional[bool] = None + + type: Optional[Literal["tool_result"]] = None + + +class DocumentDocumentChildQuoteChildTraceMessage(BaseModel): + """A message in an agent trace (user message, assistant message, or thinking).""" + + text: str + + id: Optional[str] = None + + message_type: Optional[Literal["message", "thinking"]] = None + + role: Optional[Literal["user", "assistant"]] = None + + timestamp: Optional[datetime] = None + + type: Optional[Literal["trace_message"]] = None + + +DocumentDocumentChildQuoteChild: TypeAlias = Union[ + DocumentDocumentChildQuoteChildBlob, + DocumentDocumentChildQuoteChildCode, + DocumentDocumentChildQuoteChildComment, + DocumentDocumentChildQuoteChildDivider, + DocumentDocumentChildQuoteChildImage, + DocumentDocumentChildQuoteChildLink, + DocumentDocumentChildQuoteChildLineBreak, + DocumentDocumentChildQuoteChildText, + DocumentDocumentChildQuoteChildToolCall, + DocumentDocumentChildQuoteChildToolResult, + DocumentDocumentChildQuoteChildTraceMessage, + object, +] + + +class DocumentDocumentChildQuote(BaseModel): + id: Optional[str] = None + + children: Optional[List[DocumentDocumentChildQuoteChild]] = None + + text: Optional[str] = None + + type: Optional[Literal["quote"]] = None + + +class DocumentDocumentChildTable(BaseModel): + id: Optional[str] = None + + children: Optional[List[object]] = None + + has_header: Optional[bool] = None + """Whether the first row should be treated as a header""" + + text: Optional[str] = None + + type: Optional[Literal["table"]] = None + + +class DocumentDocumentChildTableCellChildBlob(BaseModel): + """Represents embedded binary data using data URI scheme. + + Format: data:[][;base64], + Example: data:text/html;base64,PGh0bWw+... + """ + + data: str + + mimetype: str + + id: Optional[str] = None + + type: Optional[Literal["blob"]] = None + + +class DocumentDocumentChildTableCellChildCode(BaseModel): + text: str + + id: Optional[str] = None + + language: Optional[str] = None + + type: Optional[Literal["code"]] = None + + +class DocumentDocumentChildTableCellChildComment(BaseModel): + text: str + + id: Optional[str] = None + + created_at: Optional[datetime] = None + + type: Optional[Literal["comment"]] = None + + +class DocumentDocumentChildTableCellChildDivider(BaseModel): + id: Optional[str] = None + + type: Optional[Literal["divider"]] = None + + +class DocumentDocumentChildTableCellChildImage(BaseModel): + src: str + + text: str + + id: Optional[str] = None + + type: Optional[Literal["image"]] = None + + +class DocumentDocumentChildTableCellChildLink(BaseModel): + text: str + + url: str + + id: Optional[str] = None + + type: Optional[Literal["link"]] = None + + +class DocumentDocumentChildTableCellChildLineBreak(BaseModel): + id: Optional[str] = None + + type: Optional[Literal["line_break"]] = None + + +class DocumentDocumentChildTableCellChildText(BaseModel): + text: str + + id: Optional[str] = None + + marks: Optional[List[Literal["bold", "italic", "underline", "strikethrough", "code", "math"]]] = None + + type: Optional[Literal["text"]] = None + + +class DocumentDocumentChildTableCellChildToolCall(BaseModel): + """A tool/function call made by the assistant.""" + + tool_call_id: str + + tool_name: str + + id: Optional[str] = None + + args: Optional[Dict[str, object]] = None + + type: Optional[Literal["tool_call"]] = None + + +class DocumentDocumentChildTableCellChildToolResult(BaseModel): + """The result of a tool call.""" + + output: Union[str, Dict[str, object], List[object]] + + tool_call_id: str + + tool_name: str + + id: Optional[str] = None + + is_error: Optional[bool] = None + + type: Optional[Literal["tool_result"]] = None + + +class DocumentDocumentChildTableCellChildTraceMessage(BaseModel): + """A message in an agent trace (user message, assistant message, or thinking).""" + + text: str + + id: Optional[str] = None + + message_type: Optional[Literal["message", "thinking"]] = None + + role: Optional[Literal["user", "assistant"]] = None + + timestamp: Optional[datetime] = None + + type: Optional[Literal["trace_message"]] = None + + +DocumentDocumentChildTableCellChild: TypeAlias = Union[ + DocumentDocumentChildTableCellChildBlob, + DocumentDocumentChildTableCellChildCode, + DocumentDocumentChildTableCellChildComment, + DocumentDocumentChildTableCellChildDivider, + DocumentDocumentChildTableCellChildImage, + DocumentDocumentChildTableCellChildLink, + DocumentDocumentChildTableCellChildLineBreak, + DocumentDocumentChildTableCellChildText, + DocumentDocumentChildTableCellChildToolCall, + DocumentDocumentChildTableCellChildToolResult, + DocumentDocumentChildTableCellChildTraceMessage, + object, +] + + +class DocumentDocumentChildTableCell(BaseModel): + id: Optional[str] = None + + align: Optional[Literal["left", "center", "right"]] = None + + children: Optional[List[DocumentDocumentChildTableCellChild]] = None + + text: Optional[str] = None + + type: Optional[Literal["table_cell"]] = None + + +class DocumentDocumentChildTableRow(BaseModel): + id: Optional[str] = None + + children: Optional[List[object]] = None + + text: Optional[str] = None + + type: Optional[Literal["table_row"]] = None + + +class DocumentDocumentChildText(BaseModel): + text: str + + id: Optional[str] = None + + marks: Optional[List[Literal["bold", "italic", "underline", "strikethrough", "code", "math"]]] = None + + type: Optional[Literal["text"]] = None + + +class DocumentDocumentChildToDoChildBlob(BaseModel): + """Represents embedded binary data using data URI scheme. + + Format: data:[][;base64], + Example: data:text/html;base64,PGh0bWw+... + """ + + data: str + + mimetype: str + + id: Optional[str] = None + + type: Optional[Literal["blob"]] = None + + +class DocumentDocumentChildToDoChildCode(BaseModel): + text: str + + id: Optional[str] = None + + language: Optional[str] = None + + type: Optional[Literal["code"]] = None + + +class DocumentDocumentChildToDoChildComment(BaseModel): + text: str + + id: Optional[str] = None + + created_at: Optional[datetime] = None + + type: Optional[Literal["comment"]] = None + + +class DocumentDocumentChildToDoChildDivider(BaseModel): + id: Optional[str] = None + + type: Optional[Literal["divider"]] = None + + +class DocumentDocumentChildToDoChildImage(BaseModel): + src: str + + text: str + + id: Optional[str] = None + + type: Optional[Literal["image"]] = None + + +class DocumentDocumentChildToDoChildLink(BaseModel): + text: str + + url: str + + id: Optional[str] = None + + type: Optional[Literal["link"]] = None + + +class DocumentDocumentChildToDoChildLineBreak(BaseModel): + id: Optional[str] = None + + type: Optional[Literal["line_break"]] = None + + +class DocumentDocumentChildToDoChildText(BaseModel): + text: str + + id: Optional[str] = None + + marks: Optional[List[Literal["bold", "italic", "underline", "strikethrough", "code", "math"]]] = None + + type: Optional[Literal["text"]] = None + + +class DocumentDocumentChildToDoChildToolCall(BaseModel): + """A tool/function call made by the assistant.""" + + tool_call_id: str + + tool_name: str + + id: Optional[str] = None + + args: Optional[Dict[str, object]] = None + + type: Optional[Literal["tool_call"]] = None + + +class DocumentDocumentChildToDoChildToolResult(BaseModel): + """The result of a tool call.""" + + output: Union[str, Dict[str, object], List[object]] + + tool_call_id: str + + tool_name: str + + id: Optional[str] = None + + is_error: Optional[bool] = None + + type: Optional[Literal["tool_result"]] = None + + +class DocumentDocumentChildToDoChildTraceMessage(BaseModel): + """A message in an agent trace (user message, assistant message, or thinking).""" + + text: str + + id: Optional[str] = None + + message_type: Optional[Literal["message", "thinking"]] = None + + role: Optional[Literal["user", "assistant"]] = None + + timestamp: Optional[datetime] = None + + type: Optional[Literal["trace_message"]] = None + + +DocumentDocumentChildToDoChild: TypeAlias = Union[ + DocumentDocumentChildToDoChildBlob, + DocumentDocumentChildToDoChildCode, + DocumentDocumentChildToDoChildComment, + DocumentDocumentChildToDoChildDivider, + DocumentDocumentChildToDoChildImage, + DocumentDocumentChildToDoChildLink, + DocumentDocumentChildToDoChildLineBreak, + DocumentDocumentChildToDoChildText, + DocumentDocumentChildToDoChildToolCall, + DocumentDocumentChildToDoChildToolResult, + DocumentDocumentChildToDoChildTraceMessage, + object, +] + + +class DocumentDocumentChildToDo(BaseModel): + id: Optional[str] = None + + checked: Optional[bool] = None + + children: Optional[List[DocumentDocumentChildToDoChild]] = None + + text: Optional[str] = None + + type: Optional[Literal["todo"]] = None + + +class DocumentDocumentChildToolCall(BaseModel): + """A tool/function call made by the assistant.""" + + tool_call_id: str + + tool_name: str + + id: Optional[str] = None + + args: Optional[Dict[str, object]] = None + + type: Optional[Literal["tool_call"]] = None + + +class DocumentDocumentChildToolResult(BaseModel): + """The result of a tool call.""" + + output: Union[str, Dict[str, object], List[object]] + + tool_call_id: str + + tool_name: str + + id: Optional[str] = None + + is_error: Optional[bool] = None + + type: Optional[Literal["tool_result"]] = None + + +class DocumentDocumentChildTraceMessage(BaseModel): + """A message in an agent trace (user message, assistant message, or thinking).""" + + text: str + + id: Optional[str] = None + + message_type: Optional[Literal["message", "thinking"]] = None + + role: Optional[Literal["user", "assistant"]] = None + + timestamp: Optional[datetime] = None + + type: Optional[Literal["trace_message"]] = None + + +class DocumentDocumentChildUtterance(BaseModel): + """A speaker-attributed segment of a transcript (ENG-2476/D10). + + "Utterance" is the standard name for this across transcription providers + (AssemblyAI, Deepgram, Rev). Timestamps are relative offsets in seconds — + provider-native; absolute times derive from `Transcript.started_at`. + """ + + text: str + + id: Optional[str] = None + + end: Optional[float] = None + + speaker: Optional[object] = None + + start: Optional[float] = None + + type: Optional[Literal["utterance"]] = None + + +DocumentDocumentChild: TypeAlias = Annotated[ + Union[ + DocumentDocumentChildBlob, + DocumentDocumentChildCallout, + DocumentDocumentChildChunk, + DocumentDocumentChildCode, + DocumentDocumentChildComment, + DocumentDocumentChildDivider, + DocumentDocumentChildEquation, + DocumentDocumentChildFootnote, + DocumentDocumentChildHeading, + DocumentDocumentChildImage, + DocumentDocumentChildLink, + DocumentDocumentChildLineBreak, + DocumentDocumentChildList, + DocumentDocumentChildListItem, + DocumentDocumentChildParagraph, + DocumentDocumentChildQuote, + DocumentDocumentChildTable, + DocumentDocumentChildTableCell, + DocumentDocumentChildTableRow, + DocumentDocumentChildText, + DocumentDocumentChildToDo, + DocumentDocumentChildToolCall, + DocumentDocumentChildToolResult, + DocumentDocumentChildTraceMessage, + DocumentDocumentChildUtterance, + ], + PropertyInfo(discriminator="type"), +] + + +class DocumentDocument(BaseModel): + id: Optional[str] = None + + children: Optional[List[DocumentDocumentChild]] = None + + text: Optional[str] = None + + title: Optional[str] = None + + type: Optional[Literal["document"]] = None + + +class DocumentWebsiteChildBlob(BaseModel): + """Represents embedded binary data using data URI scheme. + + Format: data:[][;base64], + Example: data:text/html;base64,PGh0bWw+... + """ + + data: str + + mimetype: str + + id: Optional[str] = None + + type: Optional[Literal["blob"]] = None + + +class DocumentWebsiteChildCalloutChildBlob(BaseModel): + """Represents embedded binary data using data URI scheme. + + Format: data:[][;base64], + Example: data:text/html;base64,PGh0bWw+... + """ + + data: str + + mimetype: str + + id: Optional[str] = None + + type: Optional[Literal["blob"]] = None + + +class DocumentWebsiteChildCalloutChildCode(BaseModel): + text: str + + id: Optional[str] = None + + language: Optional[str] = None + + type: Optional[Literal["code"]] = None + + +class DocumentWebsiteChildCalloutChildComment(BaseModel): + text: str + + id: Optional[str] = None + + created_at: Optional[datetime] = None + + type: Optional[Literal["comment"]] = None + + +class DocumentWebsiteChildCalloutChildDivider(BaseModel): + id: Optional[str] = None + + type: Optional[Literal["divider"]] = None + + +class DocumentWebsiteChildCalloutChildImage(BaseModel): + src: str + + text: str + + id: Optional[str] = None + + type: Optional[Literal["image"]] = None + + +class DocumentWebsiteChildCalloutChildLink(BaseModel): + text: str + + url: str + + id: Optional[str] = None + + type: Optional[Literal["link"]] = None + + +class DocumentWebsiteChildCalloutChildLineBreak(BaseModel): + id: Optional[str] = None + + type: Optional[Literal["line_break"]] = None + + +class DocumentWebsiteChildCalloutChildText(BaseModel): + text: str + + id: Optional[str] = None + + marks: Optional[List[Literal["bold", "italic", "underline", "strikethrough", "code", "math"]]] = None + + type: Optional[Literal["text"]] = None + + +class DocumentWebsiteChildCalloutChildToolCall(BaseModel): + """A tool/function call made by the assistant.""" + + tool_call_id: str + + tool_name: str + + id: Optional[str] = None + + args: Optional[Dict[str, object]] = None + + type: Optional[Literal["tool_call"]] = None + + +class DocumentWebsiteChildCalloutChildToolResult(BaseModel): + """The result of a tool call.""" + + output: Union[str, Dict[str, object], List[object]] + + tool_call_id: str + + tool_name: str + + id: Optional[str] = None + + is_error: Optional[bool] = None + + type: Optional[Literal["tool_result"]] = None + + +class DocumentWebsiteChildCalloutChildTraceMessage(BaseModel): + """A message in an agent trace (user message, assistant message, or thinking).""" + + text: str + + id: Optional[str] = None + + message_type: Optional[Literal["message", "thinking"]] = None + + role: Optional[Literal["user", "assistant"]] = None + + timestamp: Optional[datetime] = None + + type: Optional[Literal["trace_message"]] = None + + +DocumentWebsiteChildCalloutChild: TypeAlias = Union[ + DocumentWebsiteChildCalloutChildBlob, + DocumentWebsiteChildCalloutChildCode, + DocumentWebsiteChildCalloutChildComment, + DocumentWebsiteChildCalloutChildDivider, + DocumentWebsiteChildCalloutChildImage, + DocumentWebsiteChildCalloutChildLink, + DocumentWebsiteChildCalloutChildLineBreak, + DocumentWebsiteChildCalloutChildText, + DocumentWebsiteChildCalloutChildToolCall, + DocumentWebsiteChildCalloutChildToolResult, + DocumentWebsiteChildCalloutChildTraceMessage, + object, +] + + +class DocumentWebsiteChildCallout(BaseModel): + id: Optional[str] = None + + children: Optional[List[DocumentWebsiteChildCalloutChild]] = None + + text: Optional[str] = None + + title: Optional[str] = None + + type: Optional[Literal["callout"]] = None + + +class DocumentWebsiteChildChunkChildBlob(BaseModel): + """Represents embedded binary data using data URI scheme. + + Format: data:[][;base64], + Example: data:text/html;base64,PGh0bWw+... + """ + + data: str + + mimetype: str + + id: Optional[str] = None + + type: Optional[Literal["blob"]] = None + + +class DocumentWebsiteChildChunkChildCode(BaseModel): + text: str + + id: Optional[str] = None + + language: Optional[str] = None + + type: Optional[Literal["code"]] = None + + +class DocumentWebsiteChildChunkChildComment(BaseModel): + text: str + + id: Optional[str] = None + + created_at: Optional[datetime] = None + + type: Optional[Literal["comment"]] = None + + +class DocumentWebsiteChildChunkChildDivider(BaseModel): + id: Optional[str] = None + + type: Optional[Literal["divider"]] = None + + +class DocumentWebsiteChildChunkChildImage(BaseModel): + src: str + + text: str + + id: Optional[str] = None + + type: Optional[Literal["image"]] = None + + +class DocumentWebsiteChildChunkChildLink(BaseModel): + text: str + + url: str + + id: Optional[str] = None + + type: Optional[Literal["link"]] = None + + +class DocumentWebsiteChildChunkChildLineBreak(BaseModel): + id: Optional[str] = None + + type: Optional[Literal["line_break"]] = None + + +class DocumentWebsiteChildChunkChildText(BaseModel): + text: str + + id: Optional[str] = None + + marks: Optional[List[Literal["bold", "italic", "underline", "strikethrough", "code", "math"]]] = None + + type: Optional[Literal["text"]] = None + + +class DocumentWebsiteChildChunkChildToolCall(BaseModel): + """A tool/function call made by the assistant.""" + + tool_call_id: str + + tool_name: str + + id: Optional[str] = None + + args: Optional[Dict[str, object]] = None + + type: Optional[Literal["tool_call"]] = None + + +class DocumentWebsiteChildChunkChildToolResult(BaseModel): + """The result of a tool call.""" + + output: Union[str, Dict[str, object], List[object]] + + tool_call_id: str + + tool_name: str + + id: Optional[str] = None + + is_error: Optional[bool] = None + + type: Optional[Literal["tool_result"]] = None + + +class DocumentWebsiteChildChunkChildTraceMessage(BaseModel): + """A message in an agent trace (user message, assistant message, or thinking).""" + + text: str + + id: Optional[str] = None + + message_type: Optional[Literal["message", "thinking"]] = None + + role: Optional[Literal["user", "assistant"]] = None + + timestamp: Optional[datetime] = None + + type: Optional[Literal["trace_message"]] = None + + +DocumentWebsiteChildChunkChild: TypeAlias = Union[ + DocumentWebsiteChildChunkChildBlob, + DocumentWebsiteChildChunkChildCode, + DocumentWebsiteChildChunkChildComment, + DocumentWebsiteChildChunkChildDivider, + DocumentWebsiteChildChunkChildImage, + DocumentWebsiteChildChunkChildLink, + DocumentWebsiteChildChunkChildLineBreak, + DocumentWebsiteChildChunkChildText, + DocumentWebsiteChildChunkChildToolCall, + DocumentWebsiteChildChunkChildToolResult, + DocumentWebsiteChildChunkChildTraceMessage, + object, +] + + +class DocumentWebsiteChildChunk(BaseModel): + id: Optional[str] = None + + children: Optional[List[DocumentWebsiteChildChunkChild]] = None + + text: Optional[str] = None + + type: Optional[Literal["chunk"]] = None + + +class DocumentWebsiteChildCode(BaseModel): + text: str + + id: Optional[str] = None + + language: Optional[str] = None + + type: Optional[Literal["code"]] = None + + +class DocumentWebsiteChildComment(BaseModel): + text: str + + id: Optional[str] = None + + created_at: Optional[datetime] = None + + type: Optional[Literal["comment"]] = None + + +class DocumentWebsiteChildDivider(BaseModel): + id: Optional[str] = None + + type: Optional[Literal["divider"]] = None + + +class DocumentWebsiteChildEquationChildBlob(BaseModel): + """Represents embedded binary data using data URI scheme. + + Format: data:[][;base64], + Example: data:text/html;base64,PGh0bWw+... + """ + + data: str + + mimetype: str + + id: Optional[str] = None + + type: Optional[Literal["blob"]] = None + + +class DocumentWebsiteChildEquationChildCode(BaseModel): + text: str + + id: Optional[str] = None + + language: Optional[str] = None + + type: Optional[Literal["code"]] = None + + +class DocumentWebsiteChildEquationChildComment(BaseModel): + text: str + + id: Optional[str] = None + + created_at: Optional[datetime] = None + + type: Optional[Literal["comment"]] = None + + +class DocumentWebsiteChildEquationChildDivider(BaseModel): + id: Optional[str] = None + + type: Optional[Literal["divider"]] = None + + +class DocumentWebsiteChildEquationChildImage(BaseModel): + src: str + + text: str + + id: Optional[str] = None + + type: Optional[Literal["image"]] = None + + +class DocumentWebsiteChildEquationChildLink(BaseModel): + text: str + + url: str + + id: Optional[str] = None + + type: Optional[Literal["link"]] = None + + +class DocumentWebsiteChildEquationChildLineBreak(BaseModel): + id: Optional[str] = None + + type: Optional[Literal["line_break"]] = None + + +class DocumentWebsiteChildEquationChildText(BaseModel): + text: str + + id: Optional[str] = None + + marks: Optional[List[Literal["bold", "italic", "underline", "strikethrough", "code", "math"]]] = None + + type: Optional[Literal["text"]] = None + + +class DocumentWebsiteChildEquationChildToolCall(BaseModel): + """A tool/function call made by the assistant.""" + + tool_call_id: str + + tool_name: str + + id: Optional[str] = None + + args: Optional[Dict[str, object]] = None + + type: Optional[Literal["tool_call"]] = None + + +class DocumentWebsiteChildEquationChildToolResult(BaseModel): + """The result of a tool call.""" + + output: Union[str, Dict[str, object], List[object]] + + tool_call_id: str + + tool_name: str + + id: Optional[str] = None + + is_error: Optional[bool] = None + + type: Optional[Literal["tool_result"]] = None + + +class DocumentWebsiteChildEquationChildTraceMessage(BaseModel): + """A message in an agent trace (user message, assistant message, or thinking).""" + + text: str + + id: Optional[str] = None + + message_type: Optional[Literal["message", "thinking"]] = None + + role: Optional[Literal["user", "assistant"]] = None + + timestamp: Optional[datetime] = None + + type: Optional[Literal["trace_message"]] = None + + +DocumentWebsiteChildEquationChild: TypeAlias = Union[ + DocumentWebsiteChildEquationChildBlob, + DocumentWebsiteChildEquationChildCode, + DocumentWebsiteChildEquationChildComment, + DocumentWebsiteChildEquationChildDivider, + DocumentWebsiteChildEquationChildImage, + DocumentWebsiteChildEquationChildLink, + DocumentWebsiteChildEquationChildLineBreak, + DocumentWebsiteChildEquationChildText, + DocumentWebsiteChildEquationChildToolCall, + DocumentWebsiteChildEquationChildToolResult, + DocumentWebsiteChildEquationChildTraceMessage, + object, +] + + +class DocumentWebsiteChildEquation(BaseModel): + id: Optional[str] = None + + children: Optional[List[DocumentWebsiteChildEquationChild]] = None + + text: Optional[str] = None + + type: Optional[Literal["equation"]] = None + + +class DocumentWebsiteChildFootnoteChildBlob(BaseModel): + """Represents embedded binary data using data URI scheme. + + Format: data:[][;base64], + Example: data:text/html;base64,PGh0bWw+... + """ + + data: str + + mimetype: str + + id: Optional[str] = None + + type: Optional[Literal["blob"]] = None + + +class DocumentWebsiteChildFootnoteChildCode(BaseModel): + text: str + + id: Optional[str] = None + + language: Optional[str] = None + + type: Optional[Literal["code"]] = None + + +class DocumentWebsiteChildFootnoteChildComment(BaseModel): + text: str + + id: Optional[str] = None + + created_at: Optional[datetime] = None + + type: Optional[Literal["comment"]] = None + + +class DocumentWebsiteChildFootnoteChildDivider(BaseModel): + id: Optional[str] = None + + type: Optional[Literal["divider"]] = None + + +class DocumentWebsiteChildFootnoteChildImage(BaseModel): + src: str + + text: str + + id: Optional[str] = None + + type: Optional[Literal["image"]] = None + + +class DocumentWebsiteChildFootnoteChildLink(BaseModel): + text: str + + url: str + + id: Optional[str] = None + + type: Optional[Literal["link"]] = None + + +class DocumentWebsiteChildFootnoteChildLineBreak(BaseModel): + id: Optional[str] = None + + type: Optional[Literal["line_break"]] = None + + +class DocumentWebsiteChildFootnoteChildText(BaseModel): + text: str + + id: Optional[str] = None + + marks: Optional[List[Literal["bold", "italic", "underline", "strikethrough", "code", "math"]]] = None + + type: Optional[Literal["text"]] = None + + +class DocumentWebsiteChildFootnoteChildToolCall(BaseModel): + """A tool/function call made by the assistant.""" + + tool_call_id: str + + tool_name: str + + id: Optional[str] = None + + args: Optional[Dict[str, object]] = None + + type: Optional[Literal["tool_call"]] = None + + +class DocumentWebsiteChildFootnoteChildToolResult(BaseModel): + """The result of a tool call.""" + + output: Union[str, Dict[str, object], List[object]] + + tool_call_id: str + + tool_name: str + + id: Optional[str] = None + + is_error: Optional[bool] = None + + type: Optional[Literal["tool_result"]] = None + + +class DocumentWebsiteChildFootnoteChildTraceMessage(BaseModel): + """A message in an agent trace (user message, assistant message, or thinking).""" + + text: str + + id: Optional[str] = None + + message_type: Optional[Literal["message", "thinking"]] = None + + role: Optional[Literal["user", "assistant"]] = None + + timestamp: Optional[datetime] = None + + type: Optional[Literal["trace_message"]] = None + + +DocumentWebsiteChildFootnoteChild: TypeAlias = Union[ + DocumentWebsiteChildFootnoteChildBlob, + DocumentWebsiteChildFootnoteChildCode, + DocumentWebsiteChildFootnoteChildComment, + DocumentWebsiteChildFootnoteChildDivider, + DocumentWebsiteChildFootnoteChildImage, + DocumentWebsiteChildFootnoteChildLink, + DocumentWebsiteChildFootnoteChildLineBreak, + DocumentWebsiteChildFootnoteChildText, + DocumentWebsiteChildFootnoteChildToolCall, + DocumentWebsiteChildFootnoteChildToolResult, + DocumentWebsiteChildFootnoteChildTraceMessage, + object, +] + + +class DocumentWebsiteChildFootnote(BaseModel): + id: Optional[str] = None + + children: Optional[List[DocumentWebsiteChildFootnoteChild]] = None + + text: Optional[str] = None + + type: Optional[Literal["footnote"]] = None + + +class DocumentWebsiteChildHeadingChildBlob(BaseModel): + """Represents embedded binary data using data URI scheme. + + Format: data:[][;base64], + Example: data:text/html;base64,PGh0bWw+... + """ + + data: str + + mimetype: str + + id: Optional[str] = None + + type: Optional[Literal["blob"]] = None + + +class DocumentWebsiteChildHeadingChildCode(BaseModel): + text: str + + id: Optional[str] = None + + language: Optional[str] = None + + type: Optional[Literal["code"]] = None + + +class DocumentWebsiteChildHeadingChildComment(BaseModel): + text: str + + id: Optional[str] = None + + created_at: Optional[datetime] = None + + type: Optional[Literal["comment"]] = None + + +class DocumentWebsiteChildHeadingChildDivider(BaseModel): + id: Optional[str] = None + + type: Optional[Literal["divider"]] = None + + +class DocumentWebsiteChildHeadingChildImage(BaseModel): + src: str + + text: str + + id: Optional[str] = None + + type: Optional[Literal["image"]] = None + + +class DocumentWebsiteChildHeadingChildLink(BaseModel): + text: str + + url: str + + id: Optional[str] = None + + type: Optional[Literal["link"]] = None + + +class DocumentWebsiteChildHeadingChildLineBreak(BaseModel): + id: Optional[str] = None + + type: Optional[Literal["line_break"]] = None + + +class DocumentWebsiteChildHeadingChildText(BaseModel): + text: str + + id: Optional[str] = None + + marks: Optional[List[Literal["bold", "italic", "underline", "strikethrough", "code", "math"]]] = None + + type: Optional[Literal["text"]] = None + + +class DocumentWebsiteChildHeadingChildToolCall(BaseModel): + """A tool/function call made by the assistant.""" + + tool_call_id: str + + tool_name: str + + id: Optional[str] = None + + args: Optional[Dict[str, object]] = None + + type: Optional[Literal["tool_call"]] = None + + +class DocumentWebsiteChildHeadingChildToolResult(BaseModel): + """The result of a tool call.""" + + output: Union[str, Dict[str, object], List[object]] + + tool_call_id: str + + tool_name: str + + id: Optional[str] = None + + is_error: Optional[bool] = None + + type: Optional[Literal["tool_result"]] = None + + +class DocumentWebsiteChildHeadingChildTraceMessage(BaseModel): + """A message in an agent trace (user message, assistant message, or thinking).""" + + text: str + + id: Optional[str] = None + + message_type: Optional[Literal["message", "thinking"]] = None + + role: Optional[Literal["user", "assistant"]] = None + + timestamp: Optional[datetime] = None + + type: Optional[Literal["trace_message"]] = None + + +DocumentWebsiteChildHeadingChild: TypeAlias = Union[ + DocumentWebsiteChildHeadingChildBlob, + DocumentWebsiteChildHeadingChildCode, + DocumentWebsiteChildHeadingChildComment, + DocumentWebsiteChildHeadingChildDivider, + DocumentWebsiteChildHeadingChildImage, + DocumentWebsiteChildHeadingChildLink, + DocumentWebsiteChildHeadingChildLineBreak, + DocumentWebsiteChildHeadingChildText, + DocumentWebsiteChildHeadingChildToolCall, + DocumentWebsiteChildHeadingChildToolResult, + DocumentWebsiteChildHeadingChildTraceMessage, + object, +] + + +class DocumentWebsiteChildHeading(BaseModel): + level: int + + id: Optional[str] = None + + children: Optional[List[DocumentWebsiteChildHeadingChild]] = None + + text: Optional[str] = None + + type: Optional[Literal["heading"]] = None + + +class DocumentWebsiteChildImage(BaseModel): + src: str + + text: str + + id: Optional[str] = None + + type: Optional[Literal["image"]] = None + + +class DocumentWebsiteChildLink(BaseModel): + text: str + + url: str + + id: Optional[str] = None + + type: Optional[Literal["link"]] = None + + +class DocumentWebsiteChildLineBreak(BaseModel): + id: Optional[str] = None + + type: Optional[Literal["line_break"]] = None + + +class DocumentWebsiteChildList(BaseModel): + id: Optional[str] = None + + children: Optional[List[object]] = None + + ordered: Optional[bool] = None + + text: Optional[str] = None + + type: Optional[Literal["list"]] = None + + +class DocumentWebsiteChildListItemChildBlob(BaseModel): + """Represents embedded binary data using data URI scheme. + + Format: data:[][;base64], + Example: data:text/html;base64,PGh0bWw+... + """ + + data: str + + mimetype: str + + id: Optional[str] = None + + type: Optional[Literal["blob"]] = None + + +class DocumentWebsiteChildListItemChildCode(BaseModel): + text: str + + id: Optional[str] = None + + language: Optional[str] = None + + type: Optional[Literal["code"]] = None + + +class DocumentWebsiteChildListItemChildComment(BaseModel): + text: str + + id: Optional[str] = None + + created_at: Optional[datetime] = None + + type: Optional[Literal["comment"]] = None + + +class DocumentWebsiteChildListItemChildDivider(BaseModel): + id: Optional[str] = None + + type: Optional[Literal["divider"]] = None + + +class DocumentWebsiteChildListItemChildImage(BaseModel): + src: str + + text: str + + id: Optional[str] = None + + type: Optional[Literal["image"]] = None + + +class DocumentWebsiteChildListItemChildLink(BaseModel): + text: str + + url: str + + id: Optional[str] = None + + type: Optional[Literal["link"]] = None + + +class DocumentWebsiteChildListItemChildLineBreak(BaseModel): + id: Optional[str] = None + + type: Optional[Literal["line_break"]] = None + + +class DocumentWebsiteChildListItemChildText(BaseModel): + text: str + + id: Optional[str] = None + + marks: Optional[List[Literal["bold", "italic", "underline", "strikethrough", "code", "math"]]] = None + + type: Optional[Literal["text"]] = None + + +class DocumentWebsiteChildListItemChildToolCall(BaseModel): + """A tool/function call made by the assistant.""" + + tool_call_id: str + + tool_name: str + + id: Optional[str] = None + + args: Optional[Dict[str, object]] = None + + type: Optional[Literal["tool_call"]] = None + + +class DocumentWebsiteChildListItemChildToolResult(BaseModel): + """The result of a tool call.""" + + output: Union[str, Dict[str, object], List[object]] + + tool_call_id: str + + tool_name: str + + id: Optional[str] = None + + is_error: Optional[bool] = None + + type: Optional[Literal["tool_result"]] = None + + +class DocumentWebsiteChildListItemChildTraceMessage(BaseModel): + """A message in an agent trace (user message, assistant message, or thinking).""" + + text: str + + id: Optional[str] = None + + message_type: Optional[Literal["message", "thinking"]] = None + + role: Optional[Literal["user", "assistant"]] = None + + timestamp: Optional[datetime] = None + + type: Optional[Literal["trace_message"]] = None + + +DocumentWebsiteChildListItemChild: TypeAlias = Union[ + DocumentWebsiteChildListItemChildBlob, + DocumentWebsiteChildListItemChildCode, + DocumentWebsiteChildListItemChildComment, + DocumentWebsiteChildListItemChildDivider, + DocumentWebsiteChildListItemChildImage, + DocumentWebsiteChildListItemChildLink, + DocumentWebsiteChildListItemChildLineBreak, + DocumentWebsiteChildListItemChildText, + DocumentWebsiteChildListItemChildToolCall, + DocumentWebsiteChildListItemChildToolResult, + DocumentWebsiteChildListItemChildTraceMessage, + object, +] + + +class DocumentWebsiteChildListItem(BaseModel): + id: Optional[str] = None + + children: Optional[List[DocumentWebsiteChildListItemChild]] = None + + text: Optional[str] = None + + type: Optional[Literal["list_item"]] = None + + +class DocumentWebsiteChildParagraphChildBlob(BaseModel): + """Represents embedded binary data using data URI scheme. + + Format: data:[][;base64], + Example: data:text/html;base64,PGh0bWw+... + """ + + data: str + + mimetype: str + + id: Optional[str] = None + + type: Optional[Literal["blob"]] = None + + +class DocumentWebsiteChildParagraphChildCode(BaseModel): + text: str + + id: Optional[str] = None + + language: Optional[str] = None + + type: Optional[Literal["code"]] = None + + +class DocumentWebsiteChildParagraphChildComment(BaseModel): + text: str + + id: Optional[str] = None + + created_at: Optional[datetime] = None + + type: Optional[Literal["comment"]] = None + + +class DocumentWebsiteChildParagraphChildDivider(BaseModel): + id: Optional[str] = None + + type: Optional[Literal["divider"]] = None + + +class DocumentWebsiteChildParagraphChildImage(BaseModel): + src: str + + text: str + + id: Optional[str] = None + + type: Optional[Literal["image"]] = None + + +class DocumentWebsiteChildParagraphChildLink(BaseModel): + text: str + + url: str + + id: Optional[str] = None + + type: Optional[Literal["link"]] = None + + +class DocumentWebsiteChildParagraphChildLineBreak(BaseModel): + id: Optional[str] = None + + type: Optional[Literal["line_break"]] = None + + +class DocumentWebsiteChildParagraphChildText(BaseModel): + text: str + + id: Optional[str] = None + + marks: Optional[List[Literal["bold", "italic", "underline", "strikethrough", "code", "math"]]] = None + + type: Optional[Literal["text"]] = None + + +class DocumentWebsiteChildParagraphChildToolCall(BaseModel): + """A tool/function call made by the assistant.""" + + tool_call_id: str + + tool_name: str + + id: Optional[str] = None + + args: Optional[Dict[str, object]] = None + + type: Optional[Literal["tool_call"]] = None + + +class DocumentWebsiteChildParagraphChildToolResult(BaseModel): + """The result of a tool call.""" + + output: Union[str, Dict[str, object], List[object]] + + tool_call_id: str + + tool_name: str + + id: Optional[str] = None + + is_error: Optional[bool] = None + + type: Optional[Literal["tool_result"]] = None + + +class DocumentWebsiteChildParagraphChildTraceMessage(BaseModel): + """A message in an agent trace (user message, assistant message, or thinking).""" + + text: str + + id: Optional[str] = None + + message_type: Optional[Literal["message", "thinking"]] = None + + role: Optional[Literal["user", "assistant"]] = None + + timestamp: Optional[datetime] = None + + type: Optional[Literal["trace_message"]] = None + + +DocumentWebsiteChildParagraphChild: TypeAlias = Union[ + DocumentWebsiteChildParagraphChildBlob, + DocumentWebsiteChildParagraphChildCode, + DocumentWebsiteChildParagraphChildComment, + DocumentWebsiteChildParagraphChildDivider, + DocumentWebsiteChildParagraphChildImage, + DocumentWebsiteChildParagraphChildLink, + DocumentWebsiteChildParagraphChildLineBreak, + DocumentWebsiteChildParagraphChildText, + DocumentWebsiteChildParagraphChildToolCall, + DocumentWebsiteChildParagraphChildToolResult, + DocumentWebsiteChildParagraphChildTraceMessage, + object, +] + + +class DocumentWebsiteChildParagraph(BaseModel): + id: Optional[str] = None + + children: Optional[List[DocumentWebsiteChildParagraphChild]] = None + + text: Optional[str] = None + + type: Optional[Literal["paragraph"]] = None + + +class DocumentWebsiteChildQuoteChildBlob(BaseModel): + """Represents embedded binary data using data URI scheme. + + Format: data:[][;base64], + Example: data:text/html;base64,PGh0bWw+... + """ + + data: str + + mimetype: str + + id: Optional[str] = None + + type: Optional[Literal["blob"]] = None + + +class DocumentWebsiteChildQuoteChildCode(BaseModel): + text: str + + id: Optional[str] = None + + language: Optional[str] = None + + type: Optional[Literal["code"]] = None + + +class DocumentWebsiteChildQuoteChildComment(BaseModel): + text: str + + id: Optional[str] = None + + created_at: Optional[datetime] = None + + type: Optional[Literal["comment"]] = None + + +class DocumentWebsiteChildQuoteChildDivider(BaseModel): + id: Optional[str] = None + + type: Optional[Literal["divider"]] = None + + +class DocumentWebsiteChildQuoteChildImage(BaseModel): + src: str + + text: str + + id: Optional[str] = None + + type: Optional[Literal["image"]] = None + + +class DocumentWebsiteChildQuoteChildLink(BaseModel): + text: str + + url: str + + id: Optional[str] = None + + type: Optional[Literal["link"]] = None + + +class DocumentWebsiteChildQuoteChildLineBreak(BaseModel): + id: Optional[str] = None + + type: Optional[Literal["line_break"]] = None + + +class DocumentWebsiteChildQuoteChildText(BaseModel): + text: str + + id: Optional[str] = None + + marks: Optional[List[Literal["bold", "italic", "underline", "strikethrough", "code", "math"]]] = None + + type: Optional[Literal["text"]] = None + + +class DocumentWebsiteChildQuoteChildToolCall(BaseModel): + """A tool/function call made by the assistant.""" + + tool_call_id: str + + tool_name: str + + id: Optional[str] = None + + args: Optional[Dict[str, object]] = None + + type: Optional[Literal["tool_call"]] = None + + +class DocumentWebsiteChildQuoteChildToolResult(BaseModel): + """The result of a tool call.""" + + output: Union[str, Dict[str, object], List[object]] + + tool_call_id: str + + tool_name: str + + id: Optional[str] = None + + is_error: Optional[bool] = None + + type: Optional[Literal["tool_result"]] = None + + +class DocumentWebsiteChildQuoteChildTraceMessage(BaseModel): + """A message in an agent trace (user message, assistant message, or thinking).""" + + text: str + + id: Optional[str] = None + + message_type: Optional[Literal["message", "thinking"]] = None + + role: Optional[Literal["user", "assistant"]] = None + + timestamp: Optional[datetime] = None + + type: Optional[Literal["trace_message"]] = None + + +DocumentWebsiteChildQuoteChild: TypeAlias = Union[ + DocumentWebsiteChildQuoteChildBlob, + DocumentWebsiteChildQuoteChildCode, + DocumentWebsiteChildQuoteChildComment, + DocumentWebsiteChildQuoteChildDivider, + DocumentWebsiteChildQuoteChildImage, + DocumentWebsiteChildQuoteChildLink, + DocumentWebsiteChildQuoteChildLineBreak, + DocumentWebsiteChildQuoteChildText, + DocumentWebsiteChildQuoteChildToolCall, + DocumentWebsiteChildQuoteChildToolResult, + DocumentWebsiteChildQuoteChildTraceMessage, + object, +] + + +class DocumentWebsiteChildQuote(BaseModel): + id: Optional[str] = None + + children: Optional[List[DocumentWebsiteChildQuoteChild]] = None + + text: Optional[str] = None + + type: Optional[Literal["quote"]] = None + + +class DocumentWebsiteChildTable(BaseModel): + id: Optional[str] = None + + children: Optional[List[object]] = None + + has_header: Optional[bool] = None + """Whether the first row should be treated as a header""" + + text: Optional[str] = None + + type: Optional[Literal["table"]] = None + + +class DocumentWebsiteChildTableCellChildBlob(BaseModel): + """Represents embedded binary data using data URI scheme. + + Format: data:[][;base64], + Example: data:text/html;base64,PGh0bWw+... + """ + + data: str + + mimetype: str + + id: Optional[str] = None + + type: Optional[Literal["blob"]] = None + + +class DocumentWebsiteChildTableCellChildCode(BaseModel): + text: str + + id: Optional[str] = None + + language: Optional[str] = None + + type: Optional[Literal["code"]] = None + + +class DocumentWebsiteChildTableCellChildComment(BaseModel): + text: str + + id: Optional[str] = None + + created_at: Optional[datetime] = None + + type: Optional[Literal["comment"]] = None + + +class DocumentWebsiteChildTableCellChildDivider(BaseModel): + id: Optional[str] = None + + type: Optional[Literal["divider"]] = None + + +class DocumentWebsiteChildTableCellChildImage(BaseModel): + src: str + + text: str + + id: Optional[str] = None + + type: Optional[Literal["image"]] = None + + +class DocumentWebsiteChildTableCellChildLink(BaseModel): + text: str + + url: str + + id: Optional[str] = None + + type: Optional[Literal["link"]] = None + + +class DocumentWebsiteChildTableCellChildLineBreak(BaseModel): + id: Optional[str] = None + + type: Optional[Literal["line_break"]] = None + + +class DocumentWebsiteChildTableCellChildText(BaseModel): + text: str + + id: Optional[str] = None + + marks: Optional[List[Literal["bold", "italic", "underline", "strikethrough", "code", "math"]]] = None + + type: Optional[Literal["text"]] = None + + +class DocumentWebsiteChildTableCellChildToolCall(BaseModel): + """A tool/function call made by the assistant.""" + + tool_call_id: str + + tool_name: str + + id: Optional[str] = None + + args: Optional[Dict[str, object]] = None + + type: Optional[Literal["tool_call"]] = None + + +class DocumentWebsiteChildTableCellChildToolResult(BaseModel): + """The result of a tool call.""" + + output: Union[str, Dict[str, object], List[object]] + + tool_call_id: str + + tool_name: str + + id: Optional[str] = None + + is_error: Optional[bool] = None + + type: Optional[Literal["tool_result"]] = None + + +class DocumentWebsiteChildTableCellChildTraceMessage(BaseModel): + """A message in an agent trace (user message, assistant message, or thinking).""" + + text: str + + id: Optional[str] = None + + message_type: Optional[Literal["message", "thinking"]] = None + + role: Optional[Literal["user", "assistant"]] = None + + timestamp: Optional[datetime] = None + + type: Optional[Literal["trace_message"]] = None + + +DocumentWebsiteChildTableCellChild: TypeAlias = Union[ + DocumentWebsiteChildTableCellChildBlob, + DocumentWebsiteChildTableCellChildCode, + DocumentWebsiteChildTableCellChildComment, + DocumentWebsiteChildTableCellChildDivider, + DocumentWebsiteChildTableCellChildImage, + DocumentWebsiteChildTableCellChildLink, + DocumentWebsiteChildTableCellChildLineBreak, + DocumentWebsiteChildTableCellChildText, + DocumentWebsiteChildTableCellChildToolCall, + DocumentWebsiteChildTableCellChildToolResult, + DocumentWebsiteChildTableCellChildTraceMessage, + object, +] + + +class DocumentWebsiteChildTableCell(BaseModel): + id: Optional[str] = None + + align: Optional[Literal["left", "center", "right"]] = None + + children: Optional[List[DocumentWebsiteChildTableCellChild]] = None + + text: Optional[str] = None + + type: Optional[Literal["table_cell"]] = None + + +class DocumentWebsiteChildTableRow(BaseModel): + id: Optional[str] = None + + children: Optional[List[object]] = None + + text: Optional[str] = None + + type: Optional[Literal["table_row"]] = None + + +class DocumentWebsiteChildText(BaseModel): + text: str + + id: Optional[str] = None + + marks: Optional[List[Literal["bold", "italic", "underline", "strikethrough", "code", "math"]]] = None + + type: Optional[Literal["text"]] = None + + +class DocumentWebsiteChildToDoChildBlob(BaseModel): + """Represents embedded binary data using data URI scheme. + + Format: data:[][;base64], + Example: data:text/html;base64,PGh0bWw+... + """ + + data: str + + mimetype: str + + id: Optional[str] = None + + type: Optional[Literal["blob"]] = None + + +class DocumentWebsiteChildToDoChildCode(BaseModel): + text: str + + id: Optional[str] = None + + language: Optional[str] = None + + type: Optional[Literal["code"]] = None + + +class DocumentWebsiteChildToDoChildComment(BaseModel): + text: str + + id: Optional[str] = None + + created_at: Optional[datetime] = None + + type: Optional[Literal["comment"]] = None + + +class DocumentWebsiteChildToDoChildDivider(BaseModel): + id: Optional[str] = None + + type: Optional[Literal["divider"]] = None + + +class DocumentWebsiteChildToDoChildImage(BaseModel): + src: str + + text: str + + id: Optional[str] = None + + type: Optional[Literal["image"]] = None + + +class DocumentWebsiteChildToDoChildLink(BaseModel): + text: str + + url: str + + id: Optional[str] = None + + type: Optional[Literal["link"]] = None + + +class DocumentWebsiteChildToDoChildLineBreak(BaseModel): + id: Optional[str] = None + + type: Optional[Literal["line_break"]] = None + + +class DocumentWebsiteChildToDoChildText(BaseModel): + text: str + + id: Optional[str] = None + + marks: Optional[List[Literal["bold", "italic", "underline", "strikethrough", "code", "math"]]] = None + + type: Optional[Literal["text"]] = None + + +class DocumentWebsiteChildToDoChildToolCall(BaseModel): + """A tool/function call made by the assistant.""" + + tool_call_id: str + + tool_name: str + + id: Optional[str] = None + + args: Optional[Dict[str, object]] = None + + type: Optional[Literal["tool_call"]] = None + + +class DocumentWebsiteChildToDoChildToolResult(BaseModel): + """The result of a tool call.""" + + output: Union[str, Dict[str, object], List[object]] + + tool_call_id: str + + tool_name: str + + id: Optional[str] = None + + is_error: Optional[bool] = None + + type: Optional[Literal["tool_result"]] = None + + +class DocumentWebsiteChildToDoChildTraceMessage(BaseModel): + """A message in an agent trace (user message, assistant message, or thinking).""" + + text: str + + id: Optional[str] = None + + message_type: Optional[Literal["message", "thinking"]] = None + + role: Optional[Literal["user", "assistant"]] = None + + timestamp: Optional[datetime] = None + + type: Optional[Literal["trace_message"]] = None + + +DocumentWebsiteChildToDoChild: TypeAlias = Union[ + DocumentWebsiteChildToDoChildBlob, + DocumentWebsiteChildToDoChildCode, + DocumentWebsiteChildToDoChildComment, + DocumentWebsiteChildToDoChildDivider, + DocumentWebsiteChildToDoChildImage, + DocumentWebsiteChildToDoChildLink, + DocumentWebsiteChildToDoChildLineBreak, + DocumentWebsiteChildToDoChildText, + DocumentWebsiteChildToDoChildToolCall, + DocumentWebsiteChildToDoChildToolResult, + DocumentWebsiteChildToDoChildTraceMessage, + object, +] + + +class DocumentWebsiteChildToDo(BaseModel): + id: Optional[str] = None + + checked: Optional[bool] = None + + children: Optional[List[DocumentWebsiteChildToDoChild]] = None + + text: Optional[str] = None + + type: Optional[Literal["todo"]] = None + + +class DocumentWebsiteChildToolCall(BaseModel): + """A tool/function call made by the assistant.""" + + tool_call_id: str + + tool_name: str + + id: Optional[str] = None + + args: Optional[Dict[str, object]] = None + + type: Optional[Literal["tool_call"]] = None + + +class DocumentWebsiteChildToolResult(BaseModel): + """The result of a tool call.""" + + output: Union[str, Dict[str, object], List[object]] + + tool_call_id: str + + tool_name: str + + id: Optional[str] = None + + is_error: Optional[bool] = None + + type: Optional[Literal["tool_result"]] = None + + +class DocumentWebsiteChildTraceMessage(BaseModel): + """A message in an agent trace (user message, assistant message, or thinking).""" + + text: str + + id: Optional[str] = None + + message_type: Optional[Literal["message", "thinking"]] = None + + role: Optional[Literal["user", "assistant"]] = None + + timestamp: Optional[datetime] = None + + type: Optional[Literal["trace_message"]] = None + + +class DocumentWebsiteChildUtterance(BaseModel): + """A speaker-attributed segment of a transcript (ENG-2476/D10). + + "Utterance" is the standard name for this across transcription providers + (AssemblyAI, Deepgram, Rev). Timestamps are relative offsets in seconds — + provider-native; absolute times derive from `Transcript.started_at`. + """ + + text: str + + id: Optional[str] = None + + end: Optional[float] = None + + speaker: Optional[object] = None + + start: Optional[float] = None + + type: Optional[Literal["utterance"]] = None + + +DocumentWebsiteChild: TypeAlias = Annotated[ + Union[ + DocumentWebsiteChildBlob, + DocumentWebsiteChildCallout, + DocumentWebsiteChildChunk, + DocumentWebsiteChildCode, + DocumentWebsiteChildComment, + DocumentWebsiteChildDivider, + DocumentWebsiteChildEquation, + DocumentWebsiteChildFootnote, + DocumentWebsiteChildHeading, + DocumentWebsiteChildImage, + DocumentWebsiteChildLink, + DocumentWebsiteChildLineBreak, + DocumentWebsiteChildList, + DocumentWebsiteChildListItem, + DocumentWebsiteChildParagraph, + DocumentWebsiteChildQuote, + DocumentWebsiteChildTable, + DocumentWebsiteChildTableCell, + DocumentWebsiteChildTableRow, + DocumentWebsiteChildText, + DocumentWebsiteChildToDo, + DocumentWebsiteChildToolCall, + DocumentWebsiteChildToolResult, + DocumentWebsiteChildTraceMessage, + DocumentWebsiteChildUtterance, + ], + PropertyInfo(discriminator="type"), +] + + +class DocumentWebsite(BaseModel): + url: str + + id: Optional[str] = None + + children: Optional[List[DocumentWebsiteChild]] = None + + description: Optional[str] = None + + favicon: Optional[str] = None + + image_url: Optional[str] = None + + language: Optional[str] = None + + text: Optional[str] = None + + title: Optional[str] = None + + type: Optional[Literal["website"]] = None + + +class DocumentTaskChildBlob(BaseModel): + """Represents embedded binary data using data URI scheme. + + Format: data:[][;base64], + Example: data:text/html;base64,PGh0bWw+... + """ + + data: str + + mimetype: str + + id: Optional[str] = None + + type: Optional[Literal["blob"]] = None + + +class DocumentTaskChildCalloutChildBlob(BaseModel): + """Represents embedded binary data using data URI scheme. + + Format: data:[][;base64], + Example: data:text/html;base64,PGh0bWw+... + """ + + data: str + + mimetype: str + + id: Optional[str] = None + + type: Optional[Literal["blob"]] = None + + +class DocumentTaskChildCalloutChildCode(BaseModel): + text: str + + id: Optional[str] = None + + language: Optional[str] = None + + type: Optional[Literal["code"]] = None + + +class DocumentTaskChildCalloutChildComment(BaseModel): + text: str + + id: Optional[str] = None + + created_at: Optional[datetime] = None + + type: Optional[Literal["comment"]] = None + + +class DocumentTaskChildCalloutChildDivider(BaseModel): + id: Optional[str] = None + + type: Optional[Literal["divider"]] = None + + +class DocumentTaskChildCalloutChildImage(BaseModel): + src: str + + text: str + + id: Optional[str] = None + + type: Optional[Literal["image"]] = None + + +class DocumentTaskChildCalloutChildLink(BaseModel): + text: str + + url: str + + id: Optional[str] = None + + type: Optional[Literal["link"]] = None + + +class DocumentTaskChildCalloutChildLineBreak(BaseModel): + id: Optional[str] = None + + type: Optional[Literal["line_break"]] = None + + +class DocumentTaskChildCalloutChildText(BaseModel): + text: str + + id: Optional[str] = None + + marks: Optional[List[Literal["bold", "italic", "underline", "strikethrough", "code", "math"]]] = None + + type: Optional[Literal["text"]] = None + + +class DocumentTaskChildCalloutChildToolCall(BaseModel): + """A tool/function call made by the assistant.""" + + tool_call_id: str + + tool_name: str + + id: Optional[str] = None + + args: Optional[Dict[str, object]] = None + + type: Optional[Literal["tool_call"]] = None + + +class DocumentTaskChildCalloutChildToolResult(BaseModel): + """The result of a tool call.""" + + output: Union[str, Dict[str, object], List[object]] + + tool_call_id: str + + tool_name: str + + id: Optional[str] = None + + is_error: Optional[bool] = None + + type: Optional[Literal["tool_result"]] = None + + +class DocumentTaskChildCalloutChildTraceMessage(BaseModel): + """A message in an agent trace (user message, assistant message, or thinking).""" + + text: str + + id: Optional[str] = None + + message_type: Optional[Literal["message", "thinking"]] = None + + role: Optional[Literal["user", "assistant"]] = None + + timestamp: Optional[datetime] = None + + type: Optional[Literal["trace_message"]] = None + + +DocumentTaskChildCalloutChild: TypeAlias = Union[ + DocumentTaskChildCalloutChildBlob, + DocumentTaskChildCalloutChildCode, + DocumentTaskChildCalloutChildComment, + DocumentTaskChildCalloutChildDivider, + DocumentTaskChildCalloutChildImage, + DocumentTaskChildCalloutChildLink, + DocumentTaskChildCalloutChildLineBreak, + DocumentTaskChildCalloutChildText, + DocumentTaskChildCalloutChildToolCall, + DocumentTaskChildCalloutChildToolResult, + DocumentTaskChildCalloutChildTraceMessage, + object, +] + + +class DocumentTaskChildCallout(BaseModel): + id: Optional[str] = None + + children: Optional[List[DocumentTaskChildCalloutChild]] = None + + text: Optional[str] = None + + title: Optional[str] = None + + type: Optional[Literal["callout"]] = None + + +class DocumentTaskChildChunkChildBlob(BaseModel): + """Represents embedded binary data using data URI scheme. + + Format: data:[][;base64], + Example: data:text/html;base64,PGh0bWw+... + """ + + data: str + + mimetype: str + + id: Optional[str] = None + + type: Optional[Literal["blob"]] = None + + +class DocumentTaskChildChunkChildCode(BaseModel): + text: str + + id: Optional[str] = None + + language: Optional[str] = None + + type: Optional[Literal["code"]] = None + + +class DocumentTaskChildChunkChildComment(BaseModel): + text: str + + id: Optional[str] = None + + created_at: Optional[datetime] = None + + type: Optional[Literal["comment"]] = None + + +class DocumentTaskChildChunkChildDivider(BaseModel): + id: Optional[str] = None + + type: Optional[Literal["divider"]] = None + + +class DocumentTaskChildChunkChildImage(BaseModel): + src: str + + text: str + + id: Optional[str] = None + + type: Optional[Literal["image"]] = None + + +class DocumentTaskChildChunkChildLink(BaseModel): + text: str + + url: str + + id: Optional[str] = None + + type: Optional[Literal["link"]] = None + + +class DocumentTaskChildChunkChildLineBreak(BaseModel): + id: Optional[str] = None + + type: Optional[Literal["line_break"]] = None + + +class DocumentTaskChildChunkChildText(BaseModel): + text: str + + id: Optional[str] = None + + marks: Optional[List[Literal["bold", "italic", "underline", "strikethrough", "code", "math"]]] = None + + type: Optional[Literal["text"]] = None + + +class DocumentTaskChildChunkChildToolCall(BaseModel): + """A tool/function call made by the assistant.""" + + tool_call_id: str + + tool_name: str + + id: Optional[str] = None + + args: Optional[Dict[str, object]] = None + + type: Optional[Literal["tool_call"]] = None + + +class DocumentTaskChildChunkChildToolResult(BaseModel): + """The result of a tool call.""" + + output: Union[str, Dict[str, object], List[object]] + + tool_call_id: str + + tool_name: str + + id: Optional[str] = None + + is_error: Optional[bool] = None + + type: Optional[Literal["tool_result"]] = None + + +class DocumentTaskChildChunkChildTraceMessage(BaseModel): + """A message in an agent trace (user message, assistant message, or thinking).""" + + text: str + + id: Optional[str] = None + + message_type: Optional[Literal["message", "thinking"]] = None + + role: Optional[Literal["user", "assistant"]] = None + + timestamp: Optional[datetime] = None + + type: Optional[Literal["trace_message"]] = None + + +DocumentTaskChildChunkChild: TypeAlias = Union[ + DocumentTaskChildChunkChildBlob, + DocumentTaskChildChunkChildCode, + DocumentTaskChildChunkChildComment, + DocumentTaskChildChunkChildDivider, + DocumentTaskChildChunkChildImage, + DocumentTaskChildChunkChildLink, + DocumentTaskChildChunkChildLineBreak, + DocumentTaskChildChunkChildText, + DocumentTaskChildChunkChildToolCall, + DocumentTaskChildChunkChildToolResult, + DocumentTaskChildChunkChildTraceMessage, + object, +] + + +class DocumentTaskChildChunk(BaseModel): + id: Optional[str] = None + + children: Optional[List[DocumentTaskChildChunkChild]] = None + + text: Optional[str] = None + + type: Optional[Literal["chunk"]] = None + + +class DocumentTaskChildCode(BaseModel): + text: str + + id: Optional[str] = None + + language: Optional[str] = None + + type: Optional[Literal["code"]] = None + + +class DocumentTaskChildComment(BaseModel): + text: str + + id: Optional[str] = None + + created_at: Optional[datetime] = None + + type: Optional[Literal["comment"]] = None + + +class DocumentTaskChildDivider(BaseModel): + id: Optional[str] = None + + type: Optional[Literal["divider"]] = None + + +class DocumentTaskChildEquationChildBlob(BaseModel): + """Represents embedded binary data using data URI scheme. + + Format: data:[][;base64], + Example: data:text/html;base64,PGh0bWw+... + """ + + data: str + + mimetype: str + + id: Optional[str] = None + + type: Optional[Literal["blob"]] = None + + +class DocumentTaskChildEquationChildCode(BaseModel): + text: str + + id: Optional[str] = None + + language: Optional[str] = None + + type: Optional[Literal["code"]] = None + + +class DocumentTaskChildEquationChildComment(BaseModel): + text: str + + id: Optional[str] = None + + created_at: Optional[datetime] = None + + type: Optional[Literal["comment"]] = None + + +class DocumentTaskChildEquationChildDivider(BaseModel): + id: Optional[str] = None + + type: Optional[Literal["divider"]] = None + + +class DocumentTaskChildEquationChildImage(BaseModel): + src: str + + text: str + + id: Optional[str] = None + + type: Optional[Literal["image"]] = None + + +class DocumentTaskChildEquationChildLink(BaseModel): + text: str + + url: str + + id: Optional[str] = None + + type: Optional[Literal["link"]] = None + + +class DocumentTaskChildEquationChildLineBreak(BaseModel): + id: Optional[str] = None + + type: Optional[Literal["line_break"]] = None + + +class DocumentTaskChildEquationChildText(BaseModel): + text: str + + id: Optional[str] = None + + marks: Optional[List[Literal["bold", "italic", "underline", "strikethrough", "code", "math"]]] = None + + type: Optional[Literal["text"]] = None + + +class DocumentTaskChildEquationChildToolCall(BaseModel): + """A tool/function call made by the assistant.""" + + tool_call_id: str + + tool_name: str + + id: Optional[str] = None + + args: Optional[Dict[str, object]] = None + + type: Optional[Literal["tool_call"]] = None + + +class DocumentTaskChildEquationChildToolResult(BaseModel): + """The result of a tool call.""" + + output: Union[str, Dict[str, object], List[object]] + + tool_call_id: str + + tool_name: str + + id: Optional[str] = None + + is_error: Optional[bool] = None + + type: Optional[Literal["tool_result"]] = None + + +class DocumentTaskChildEquationChildTraceMessage(BaseModel): + """A message in an agent trace (user message, assistant message, or thinking).""" + + text: str + + id: Optional[str] = None + + message_type: Optional[Literal["message", "thinking"]] = None + + role: Optional[Literal["user", "assistant"]] = None + + timestamp: Optional[datetime] = None + + type: Optional[Literal["trace_message"]] = None + + +DocumentTaskChildEquationChild: TypeAlias = Union[ + DocumentTaskChildEquationChildBlob, + DocumentTaskChildEquationChildCode, + DocumentTaskChildEquationChildComment, + DocumentTaskChildEquationChildDivider, + DocumentTaskChildEquationChildImage, + DocumentTaskChildEquationChildLink, + DocumentTaskChildEquationChildLineBreak, + DocumentTaskChildEquationChildText, + DocumentTaskChildEquationChildToolCall, + DocumentTaskChildEquationChildToolResult, + DocumentTaskChildEquationChildTraceMessage, + object, +] + + +class DocumentTaskChildEquation(BaseModel): + id: Optional[str] = None + + children: Optional[List[DocumentTaskChildEquationChild]] = None + + text: Optional[str] = None + + type: Optional[Literal["equation"]] = None + + +class DocumentTaskChildFootnoteChildBlob(BaseModel): + """Represents embedded binary data using data URI scheme. + + Format: data:[][;base64], + Example: data:text/html;base64,PGh0bWw+... + """ + + data: str + + mimetype: str + + id: Optional[str] = None + + type: Optional[Literal["blob"]] = None + + +class DocumentTaskChildFootnoteChildCode(BaseModel): + text: str + + id: Optional[str] = None + + language: Optional[str] = None + + type: Optional[Literal["code"]] = None + + +class DocumentTaskChildFootnoteChildComment(BaseModel): + text: str + + id: Optional[str] = None + + created_at: Optional[datetime] = None + + type: Optional[Literal["comment"]] = None + + +class DocumentTaskChildFootnoteChildDivider(BaseModel): + id: Optional[str] = None + + type: Optional[Literal["divider"]] = None + + +class DocumentTaskChildFootnoteChildImage(BaseModel): + src: str + + text: str + + id: Optional[str] = None + + type: Optional[Literal["image"]] = None + + +class DocumentTaskChildFootnoteChildLink(BaseModel): + text: str + + url: str + + id: Optional[str] = None + + type: Optional[Literal["link"]] = None + + +class DocumentTaskChildFootnoteChildLineBreak(BaseModel): + id: Optional[str] = None + + type: Optional[Literal["line_break"]] = None + + +class DocumentTaskChildFootnoteChildText(BaseModel): + text: str + + id: Optional[str] = None + + marks: Optional[List[Literal["bold", "italic", "underline", "strikethrough", "code", "math"]]] = None + + type: Optional[Literal["text"]] = None + + +class DocumentTaskChildFootnoteChildToolCall(BaseModel): + """A tool/function call made by the assistant.""" + + tool_call_id: str + + tool_name: str + + id: Optional[str] = None + + args: Optional[Dict[str, object]] = None + + type: Optional[Literal["tool_call"]] = None + + +class DocumentTaskChildFootnoteChildToolResult(BaseModel): + """The result of a tool call.""" + + output: Union[str, Dict[str, object], List[object]] + + tool_call_id: str + + tool_name: str + + id: Optional[str] = None + + is_error: Optional[bool] = None + + type: Optional[Literal["tool_result"]] = None + + +class DocumentTaskChildFootnoteChildTraceMessage(BaseModel): + """A message in an agent trace (user message, assistant message, or thinking).""" + + text: str + + id: Optional[str] = None + + message_type: Optional[Literal["message", "thinking"]] = None + + role: Optional[Literal["user", "assistant"]] = None + + timestamp: Optional[datetime] = None + + type: Optional[Literal["trace_message"]] = None + + +DocumentTaskChildFootnoteChild: TypeAlias = Union[ + DocumentTaskChildFootnoteChildBlob, + DocumentTaskChildFootnoteChildCode, + DocumentTaskChildFootnoteChildComment, + DocumentTaskChildFootnoteChildDivider, + DocumentTaskChildFootnoteChildImage, + DocumentTaskChildFootnoteChildLink, + DocumentTaskChildFootnoteChildLineBreak, + DocumentTaskChildFootnoteChildText, + DocumentTaskChildFootnoteChildToolCall, + DocumentTaskChildFootnoteChildToolResult, + DocumentTaskChildFootnoteChildTraceMessage, + object, +] + + +class DocumentTaskChildFootnote(BaseModel): + id: Optional[str] = None + + children: Optional[List[DocumentTaskChildFootnoteChild]] = None + + text: Optional[str] = None + + type: Optional[Literal["footnote"]] = None + + +class DocumentTaskChildHeadingChildBlob(BaseModel): + """Represents embedded binary data using data URI scheme. + + Format: data:[][;base64], + Example: data:text/html;base64,PGh0bWw+... + """ + + data: str + + mimetype: str + + id: Optional[str] = None + + type: Optional[Literal["blob"]] = None + + +class DocumentTaskChildHeadingChildCode(BaseModel): + text: str + + id: Optional[str] = None + + language: Optional[str] = None + + type: Optional[Literal["code"]] = None + + +class DocumentTaskChildHeadingChildComment(BaseModel): + text: str + + id: Optional[str] = None + + created_at: Optional[datetime] = None + + type: Optional[Literal["comment"]] = None + + +class DocumentTaskChildHeadingChildDivider(BaseModel): + id: Optional[str] = None + + type: Optional[Literal["divider"]] = None + + +class DocumentTaskChildHeadingChildImage(BaseModel): + src: str + + text: str + + id: Optional[str] = None + + type: Optional[Literal["image"]] = None + + +class DocumentTaskChildHeadingChildLink(BaseModel): + text: str + + url: str + + id: Optional[str] = None + + type: Optional[Literal["link"]] = None + + +class DocumentTaskChildHeadingChildLineBreak(BaseModel): + id: Optional[str] = None + + type: Optional[Literal["line_break"]] = None + + +class DocumentTaskChildHeadingChildText(BaseModel): + text: str + + id: Optional[str] = None + + marks: Optional[List[Literal["bold", "italic", "underline", "strikethrough", "code", "math"]]] = None + + type: Optional[Literal["text"]] = None + + +class DocumentTaskChildHeadingChildToolCall(BaseModel): + """A tool/function call made by the assistant.""" + + tool_call_id: str + + tool_name: str + + id: Optional[str] = None + + args: Optional[Dict[str, object]] = None + + type: Optional[Literal["tool_call"]] = None + + +class DocumentTaskChildHeadingChildToolResult(BaseModel): + """The result of a tool call.""" + + output: Union[str, Dict[str, object], List[object]] + + tool_call_id: str + + tool_name: str + + id: Optional[str] = None + + is_error: Optional[bool] = None + + type: Optional[Literal["tool_result"]] = None + + +class DocumentTaskChildHeadingChildTraceMessage(BaseModel): + """A message in an agent trace (user message, assistant message, or thinking).""" + + text: str + + id: Optional[str] = None + + message_type: Optional[Literal["message", "thinking"]] = None + + role: Optional[Literal["user", "assistant"]] = None + + timestamp: Optional[datetime] = None + + type: Optional[Literal["trace_message"]] = None + + +DocumentTaskChildHeadingChild: TypeAlias = Union[ + DocumentTaskChildHeadingChildBlob, + DocumentTaskChildHeadingChildCode, + DocumentTaskChildHeadingChildComment, + DocumentTaskChildHeadingChildDivider, + DocumentTaskChildHeadingChildImage, + DocumentTaskChildHeadingChildLink, + DocumentTaskChildHeadingChildLineBreak, + DocumentTaskChildHeadingChildText, + DocumentTaskChildHeadingChildToolCall, + DocumentTaskChildHeadingChildToolResult, + DocumentTaskChildHeadingChildTraceMessage, + object, +] + + +class DocumentTaskChildHeading(BaseModel): + level: int + + id: Optional[str] = None + + children: Optional[List[DocumentTaskChildHeadingChild]] = None + + text: Optional[str] = None + + type: Optional[Literal["heading"]] = None + + +class DocumentTaskChildImage(BaseModel): + src: str + + text: str + + id: Optional[str] = None + + type: Optional[Literal["image"]] = None + + +class DocumentTaskChildLink(BaseModel): + text: str + + url: str + + id: Optional[str] = None + + type: Optional[Literal["link"]] = None + + +class DocumentTaskChildLineBreak(BaseModel): + id: Optional[str] = None + + type: Optional[Literal["line_break"]] = None + + +class DocumentTaskChildList(BaseModel): + id: Optional[str] = None + + children: Optional[List[object]] = None + + ordered: Optional[bool] = None + + text: Optional[str] = None + + type: Optional[Literal["list"]] = None + + +class DocumentTaskChildListItemChildBlob(BaseModel): + """Represents embedded binary data using data URI scheme. + + Format: data:[][;base64], + Example: data:text/html;base64,PGh0bWw+... + """ + + data: str + + mimetype: str + + id: Optional[str] = None + + type: Optional[Literal["blob"]] = None + + +class DocumentTaskChildListItemChildCode(BaseModel): + text: str + + id: Optional[str] = None + + language: Optional[str] = None + + type: Optional[Literal["code"]] = None + + +class DocumentTaskChildListItemChildComment(BaseModel): + text: str + + id: Optional[str] = None + + created_at: Optional[datetime] = None + + type: Optional[Literal["comment"]] = None + + +class DocumentTaskChildListItemChildDivider(BaseModel): + id: Optional[str] = None + + type: Optional[Literal["divider"]] = None + + +class DocumentTaskChildListItemChildImage(BaseModel): + src: str + + text: str + + id: Optional[str] = None + + type: Optional[Literal["image"]] = None + + +class DocumentTaskChildListItemChildLink(BaseModel): + text: str + + url: str + + id: Optional[str] = None + + type: Optional[Literal["link"]] = None + + +class DocumentTaskChildListItemChildLineBreak(BaseModel): + id: Optional[str] = None + + type: Optional[Literal["line_break"]] = None + + +class DocumentTaskChildListItemChildText(BaseModel): + text: str + + id: Optional[str] = None + + marks: Optional[List[Literal["bold", "italic", "underline", "strikethrough", "code", "math"]]] = None + + type: Optional[Literal["text"]] = None + + +class DocumentTaskChildListItemChildToolCall(BaseModel): + """A tool/function call made by the assistant.""" + + tool_call_id: str + + tool_name: str + + id: Optional[str] = None + + args: Optional[Dict[str, object]] = None + + type: Optional[Literal["tool_call"]] = None + + +class DocumentTaskChildListItemChildToolResult(BaseModel): + """The result of a tool call.""" + + output: Union[str, Dict[str, object], List[object]] + + tool_call_id: str + + tool_name: str + + id: Optional[str] = None + + is_error: Optional[bool] = None + + type: Optional[Literal["tool_result"]] = None + + +class DocumentTaskChildListItemChildTraceMessage(BaseModel): + """A message in an agent trace (user message, assistant message, or thinking).""" + + text: str + + id: Optional[str] = None + + message_type: Optional[Literal["message", "thinking"]] = None + + role: Optional[Literal["user", "assistant"]] = None + + timestamp: Optional[datetime] = None + + type: Optional[Literal["trace_message"]] = None + + +DocumentTaskChildListItemChild: TypeAlias = Union[ + DocumentTaskChildListItemChildBlob, + DocumentTaskChildListItemChildCode, + DocumentTaskChildListItemChildComment, + DocumentTaskChildListItemChildDivider, + DocumentTaskChildListItemChildImage, + DocumentTaskChildListItemChildLink, + DocumentTaskChildListItemChildLineBreak, + DocumentTaskChildListItemChildText, + DocumentTaskChildListItemChildToolCall, + DocumentTaskChildListItemChildToolResult, + DocumentTaskChildListItemChildTraceMessage, + object, +] + + +class DocumentTaskChildListItem(BaseModel): + id: Optional[str] = None + + children: Optional[List[DocumentTaskChildListItemChild]] = None + + text: Optional[str] = None + + type: Optional[Literal["list_item"]] = None + + +class DocumentTaskChildParagraphChildBlob(BaseModel): + """Represents embedded binary data using data URI scheme. + + Format: data:[][;base64], + Example: data:text/html;base64,PGh0bWw+... + """ + + data: str + + mimetype: str + + id: Optional[str] = None + + type: Optional[Literal["blob"]] = None + + +class DocumentTaskChildParagraphChildCode(BaseModel): + text: str + + id: Optional[str] = None + + language: Optional[str] = None + + type: Optional[Literal["code"]] = None + + +class DocumentTaskChildParagraphChildComment(BaseModel): + text: str + + id: Optional[str] = None + + created_at: Optional[datetime] = None + + type: Optional[Literal["comment"]] = None + + +class DocumentTaskChildParagraphChildDivider(BaseModel): + id: Optional[str] = None + + type: Optional[Literal["divider"]] = None + + +class DocumentTaskChildParagraphChildImage(BaseModel): + src: str + + text: str + + id: Optional[str] = None + + type: Optional[Literal["image"]] = None + + +class DocumentTaskChildParagraphChildLink(BaseModel): + text: str + + url: str + + id: Optional[str] = None + + type: Optional[Literal["link"]] = None + + +class DocumentTaskChildParagraphChildLineBreak(BaseModel): + id: Optional[str] = None + + type: Optional[Literal["line_break"]] = None + + +class DocumentTaskChildParagraphChildText(BaseModel): + text: str + + id: Optional[str] = None + + marks: Optional[List[Literal["bold", "italic", "underline", "strikethrough", "code", "math"]]] = None + + type: Optional[Literal["text"]] = None + + +class DocumentTaskChildParagraphChildToolCall(BaseModel): + """A tool/function call made by the assistant.""" + + tool_call_id: str + + tool_name: str + + id: Optional[str] = None + + args: Optional[Dict[str, object]] = None + + type: Optional[Literal["tool_call"]] = None + + +class DocumentTaskChildParagraphChildToolResult(BaseModel): + """The result of a tool call.""" + + output: Union[str, Dict[str, object], List[object]] + + tool_call_id: str + + tool_name: str + + id: Optional[str] = None + + is_error: Optional[bool] = None + + type: Optional[Literal["tool_result"]] = None + + +class DocumentTaskChildParagraphChildTraceMessage(BaseModel): + """A message in an agent trace (user message, assistant message, or thinking).""" + + text: str + + id: Optional[str] = None + + message_type: Optional[Literal["message", "thinking"]] = None + + role: Optional[Literal["user", "assistant"]] = None + + timestamp: Optional[datetime] = None + + type: Optional[Literal["trace_message"]] = None + + +DocumentTaskChildParagraphChild: TypeAlias = Union[ + DocumentTaskChildParagraphChildBlob, + DocumentTaskChildParagraphChildCode, + DocumentTaskChildParagraphChildComment, + DocumentTaskChildParagraphChildDivider, + DocumentTaskChildParagraphChildImage, + DocumentTaskChildParagraphChildLink, + DocumentTaskChildParagraphChildLineBreak, + DocumentTaskChildParagraphChildText, + DocumentTaskChildParagraphChildToolCall, + DocumentTaskChildParagraphChildToolResult, + DocumentTaskChildParagraphChildTraceMessage, + object, +] + + +class DocumentTaskChildParagraph(BaseModel): + id: Optional[str] = None + + children: Optional[List[DocumentTaskChildParagraphChild]] = None + + text: Optional[str] = None + + type: Optional[Literal["paragraph"]] = None + + +class DocumentTaskChildQuoteChildBlob(BaseModel): + """Represents embedded binary data using data URI scheme. + + Format: data:[][;base64], + Example: data:text/html;base64,PGh0bWw+... + """ + + data: str + + mimetype: str + + id: Optional[str] = None + + type: Optional[Literal["blob"]] = None + + +class DocumentTaskChildQuoteChildCode(BaseModel): + text: str + + id: Optional[str] = None + + language: Optional[str] = None + + type: Optional[Literal["code"]] = None + + +class DocumentTaskChildQuoteChildComment(BaseModel): + text: str + + id: Optional[str] = None + + created_at: Optional[datetime] = None + + type: Optional[Literal["comment"]] = None + + +class DocumentTaskChildQuoteChildDivider(BaseModel): + id: Optional[str] = None + + type: Optional[Literal["divider"]] = None + + +class DocumentTaskChildQuoteChildImage(BaseModel): + src: str + + text: str + + id: Optional[str] = None + + type: Optional[Literal["image"]] = None + + +class DocumentTaskChildQuoteChildLink(BaseModel): + text: str + + url: str + + id: Optional[str] = None + + type: Optional[Literal["link"]] = None + + +class DocumentTaskChildQuoteChildLineBreak(BaseModel): + id: Optional[str] = None + + type: Optional[Literal["line_break"]] = None + + +class DocumentTaskChildQuoteChildText(BaseModel): + text: str + + id: Optional[str] = None + + marks: Optional[List[Literal["bold", "italic", "underline", "strikethrough", "code", "math"]]] = None + + type: Optional[Literal["text"]] = None + + +class DocumentTaskChildQuoteChildToolCall(BaseModel): + """A tool/function call made by the assistant.""" + + tool_call_id: str + + tool_name: str + + id: Optional[str] = None + + args: Optional[Dict[str, object]] = None + + type: Optional[Literal["tool_call"]] = None + + +class DocumentTaskChildQuoteChildToolResult(BaseModel): + """The result of a tool call.""" + + output: Union[str, Dict[str, object], List[object]] + + tool_call_id: str + + tool_name: str + + id: Optional[str] = None + + is_error: Optional[bool] = None + + type: Optional[Literal["tool_result"]] = None + + +class DocumentTaskChildQuoteChildTraceMessage(BaseModel): + """A message in an agent trace (user message, assistant message, or thinking).""" + + text: str + + id: Optional[str] = None + + message_type: Optional[Literal["message", "thinking"]] = None + + role: Optional[Literal["user", "assistant"]] = None + + timestamp: Optional[datetime] = None + + type: Optional[Literal["trace_message"]] = None + + +DocumentTaskChildQuoteChild: TypeAlias = Union[ + DocumentTaskChildQuoteChildBlob, + DocumentTaskChildQuoteChildCode, + DocumentTaskChildQuoteChildComment, + DocumentTaskChildQuoteChildDivider, + DocumentTaskChildQuoteChildImage, + DocumentTaskChildQuoteChildLink, + DocumentTaskChildQuoteChildLineBreak, + DocumentTaskChildQuoteChildText, + DocumentTaskChildQuoteChildToolCall, + DocumentTaskChildQuoteChildToolResult, + DocumentTaskChildQuoteChildTraceMessage, + object, +] + + +class DocumentTaskChildQuote(BaseModel): + id: Optional[str] = None + + children: Optional[List[DocumentTaskChildQuoteChild]] = None + + text: Optional[str] = None + + type: Optional[Literal["quote"]] = None + + +class DocumentTaskChildTable(BaseModel): + id: Optional[str] = None + + children: Optional[List[object]] = None + + has_header: Optional[bool] = None + """Whether the first row should be treated as a header""" + + text: Optional[str] = None + + type: Optional[Literal["table"]] = None + + +class DocumentTaskChildTableCellChildBlob(BaseModel): + """Represents embedded binary data using data URI scheme. + + Format: data:[][;base64], + Example: data:text/html;base64,PGh0bWw+... + """ + + data: str + + mimetype: str + + id: Optional[str] = None + + type: Optional[Literal["blob"]] = None + + +class DocumentTaskChildTableCellChildCode(BaseModel): + text: str + + id: Optional[str] = None + + language: Optional[str] = None + + type: Optional[Literal["code"]] = None + + +class DocumentTaskChildTableCellChildComment(BaseModel): + text: str + + id: Optional[str] = None + + created_at: Optional[datetime] = None + + type: Optional[Literal["comment"]] = None + + +class DocumentTaskChildTableCellChildDivider(BaseModel): + id: Optional[str] = None + + type: Optional[Literal["divider"]] = None + + +class DocumentTaskChildTableCellChildImage(BaseModel): + src: str + + text: str + + id: Optional[str] = None + + type: Optional[Literal["image"]] = None + + +class DocumentTaskChildTableCellChildLink(BaseModel): + text: str + + url: str + + id: Optional[str] = None + + type: Optional[Literal["link"]] = None + + +class DocumentTaskChildTableCellChildLineBreak(BaseModel): + id: Optional[str] = None + + type: Optional[Literal["line_break"]] = None + + +class DocumentTaskChildTableCellChildText(BaseModel): + text: str + + id: Optional[str] = None + + marks: Optional[List[Literal["bold", "italic", "underline", "strikethrough", "code", "math"]]] = None + + type: Optional[Literal["text"]] = None + + +class DocumentTaskChildTableCellChildToolCall(BaseModel): + """A tool/function call made by the assistant.""" + + tool_call_id: str + + tool_name: str + + id: Optional[str] = None + + args: Optional[Dict[str, object]] = None + + type: Optional[Literal["tool_call"]] = None + + +class DocumentTaskChildTableCellChildToolResult(BaseModel): + """The result of a tool call.""" + + output: Union[str, Dict[str, object], List[object]] + + tool_call_id: str + + tool_name: str + + id: Optional[str] = None + + is_error: Optional[bool] = None + + type: Optional[Literal["tool_result"]] = None + + +class DocumentTaskChildTableCellChildTraceMessage(BaseModel): + """A message in an agent trace (user message, assistant message, or thinking).""" + + text: str + + id: Optional[str] = None + + message_type: Optional[Literal["message", "thinking"]] = None + + role: Optional[Literal["user", "assistant"]] = None + + timestamp: Optional[datetime] = None + + type: Optional[Literal["trace_message"]] = None + + +DocumentTaskChildTableCellChild: TypeAlias = Union[ + DocumentTaskChildTableCellChildBlob, + DocumentTaskChildTableCellChildCode, + DocumentTaskChildTableCellChildComment, + DocumentTaskChildTableCellChildDivider, + DocumentTaskChildTableCellChildImage, + DocumentTaskChildTableCellChildLink, + DocumentTaskChildTableCellChildLineBreak, + DocumentTaskChildTableCellChildText, + DocumentTaskChildTableCellChildToolCall, + DocumentTaskChildTableCellChildToolResult, + DocumentTaskChildTableCellChildTraceMessage, + object, +] + + +class DocumentTaskChildTableCell(BaseModel): + id: Optional[str] = None + + align: Optional[Literal["left", "center", "right"]] = None + + children: Optional[List[DocumentTaskChildTableCellChild]] = None + + text: Optional[str] = None + + type: Optional[Literal["table_cell"]] = None + + +class DocumentTaskChildTableRow(BaseModel): + id: Optional[str] = None + + children: Optional[List[object]] = None + + text: Optional[str] = None + + type: Optional[Literal["table_row"]] = None + + +class DocumentTaskChildText(BaseModel): + text: str + + id: Optional[str] = None + + marks: Optional[List[Literal["bold", "italic", "underline", "strikethrough", "code", "math"]]] = None + + type: Optional[Literal["text"]] = None + + +class DocumentTaskChildToDoChildBlob(BaseModel): + """Represents embedded binary data using data URI scheme. + + Format: data:[][;base64], + Example: data:text/html;base64,PGh0bWw+... + """ + + data: str + + mimetype: str + + id: Optional[str] = None + + type: Optional[Literal["blob"]] = None + + +class DocumentTaskChildToDoChildCode(BaseModel): + text: str + + id: Optional[str] = None + + language: Optional[str] = None + + type: Optional[Literal["code"]] = None + + +class DocumentTaskChildToDoChildComment(BaseModel): + text: str + + id: Optional[str] = None + + created_at: Optional[datetime] = None + + type: Optional[Literal["comment"]] = None + + +class DocumentTaskChildToDoChildDivider(BaseModel): + id: Optional[str] = None + + type: Optional[Literal["divider"]] = None + + +class DocumentTaskChildToDoChildImage(BaseModel): + src: str + + text: str + + id: Optional[str] = None + + type: Optional[Literal["image"]] = None + + +class DocumentTaskChildToDoChildLink(BaseModel): + text: str + + url: str + + id: Optional[str] = None + + type: Optional[Literal["link"]] = None + + +class DocumentTaskChildToDoChildLineBreak(BaseModel): + id: Optional[str] = None + + type: Optional[Literal["line_break"]] = None + + +class DocumentTaskChildToDoChildText(BaseModel): + text: str + + id: Optional[str] = None + + marks: Optional[List[Literal["bold", "italic", "underline", "strikethrough", "code", "math"]]] = None + + type: Optional[Literal["text"]] = None + + +class DocumentTaskChildToDoChildToolCall(BaseModel): + """A tool/function call made by the assistant.""" + + tool_call_id: str + + tool_name: str + + id: Optional[str] = None + + args: Optional[Dict[str, object]] = None + + type: Optional[Literal["tool_call"]] = None + + +class DocumentTaskChildToDoChildToolResult(BaseModel): + """The result of a tool call.""" + + output: Union[str, Dict[str, object], List[object]] + + tool_call_id: str + + tool_name: str + + id: Optional[str] = None + + is_error: Optional[bool] = None + + type: Optional[Literal["tool_result"]] = None + + +class DocumentTaskChildToDoChildTraceMessage(BaseModel): + """A message in an agent trace (user message, assistant message, or thinking).""" + + text: str + + id: Optional[str] = None + + message_type: Optional[Literal["message", "thinking"]] = None + + role: Optional[Literal["user", "assistant"]] = None + + timestamp: Optional[datetime] = None + + type: Optional[Literal["trace_message"]] = None + + +DocumentTaskChildToDoChild: TypeAlias = Union[ + DocumentTaskChildToDoChildBlob, + DocumentTaskChildToDoChildCode, + DocumentTaskChildToDoChildComment, + DocumentTaskChildToDoChildDivider, + DocumentTaskChildToDoChildImage, + DocumentTaskChildToDoChildLink, + DocumentTaskChildToDoChildLineBreak, + DocumentTaskChildToDoChildText, + DocumentTaskChildToDoChildToolCall, + DocumentTaskChildToDoChildToolResult, + DocumentTaskChildToDoChildTraceMessage, + object, +] + + +class DocumentTaskChildToDo(BaseModel): + id: Optional[str] = None + + checked: Optional[bool] = None + + children: Optional[List[DocumentTaskChildToDoChild]] = None + + text: Optional[str] = None + + type: Optional[Literal["todo"]] = None + + +class DocumentTaskChildToolCall(BaseModel): + """A tool/function call made by the assistant.""" + + tool_call_id: str + + tool_name: str + + id: Optional[str] = None + + args: Optional[Dict[str, object]] = None + + type: Optional[Literal["tool_call"]] = None + + +class DocumentTaskChildToolResult(BaseModel): + """The result of a tool call.""" + + output: Union[str, Dict[str, object], List[object]] + + tool_call_id: str + + tool_name: str + + id: Optional[str] = None + + is_error: Optional[bool] = None + + type: Optional[Literal["tool_result"]] = None + + +class DocumentTaskChildTraceMessage(BaseModel): + """A message in an agent trace (user message, assistant message, or thinking).""" + + text: str + + id: Optional[str] = None + + message_type: Optional[Literal["message", "thinking"]] = None + + role: Optional[Literal["user", "assistant"]] = None + + timestamp: Optional[datetime] = None + + type: Optional[Literal["trace_message"]] = None + + +class DocumentTaskChildUtterance(BaseModel): + """A speaker-attributed segment of a transcript (ENG-2476/D10). + + "Utterance" is the standard name for this across transcription providers + (AssemblyAI, Deepgram, Rev). Timestamps are relative offsets in seconds — + provider-native; absolute times derive from `Transcript.started_at`. + """ + + text: str + + id: Optional[str] = None + + end: Optional[float] = None + + speaker: Optional[object] = None + + start: Optional[float] = None + + type: Optional[Literal["utterance"]] = None + + +DocumentTaskChild: TypeAlias = Annotated[ + Union[ + DocumentTaskChildBlob, + DocumentTaskChildCallout, + DocumentTaskChildChunk, + DocumentTaskChildCode, + DocumentTaskChildComment, + DocumentTaskChildDivider, + DocumentTaskChildEquation, + DocumentTaskChildFootnote, + DocumentTaskChildHeading, + DocumentTaskChildImage, + DocumentTaskChildLink, + DocumentTaskChildLineBreak, + DocumentTaskChildList, + DocumentTaskChildListItem, + DocumentTaskChildParagraph, + DocumentTaskChildQuote, + DocumentTaskChildTable, + DocumentTaskChildTableCell, + DocumentTaskChildTableRow, + DocumentTaskChildText, + DocumentTaskChildToDo, + DocumentTaskChildToolCall, + DocumentTaskChildToolResult, + DocumentTaskChildTraceMessage, + DocumentTaskChildUtterance, + ], + PropertyInfo(discriminator="type"), +] + + +class DocumentTaskCommentSenderChildBlob(BaseModel): + """Represents embedded binary data using data URI scheme. + + Format: data:[][;base64], + Example: data:text/html;base64,PGh0bWw+... + """ + + data: str + + mimetype: str + + id: Optional[str] = None + + type: Optional[Literal["blob"]] = None + + +class DocumentTaskCommentSenderChildCode(BaseModel): + text: str + + id: Optional[str] = None + + language: Optional[str] = None + + type: Optional[Literal["code"]] = None + + +class DocumentTaskCommentSenderChildComment(BaseModel): + text: str + + id: Optional[str] = None + + created_at: Optional[datetime] = None + + type: Optional[Literal["comment"]] = None + + +class DocumentTaskCommentSenderChildDivider(BaseModel): + id: Optional[str] = None + + type: Optional[Literal["divider"]] = None + + +class DocumentTaskCommentSenderChildImage(BaseModel): + src: str + + text: str + + id: Optional[str] = None + + type: Optional[Literal["image"]] = None + + +class DocumentTaskCommentSenderChildLink(BaseModel): + text: str + + url: str + + id: Optional[str] = None + + type: Optional[Literal["link"]] = None + + +class DocumentTaskCommentSenderChildLineBreak(BaseModel): + id: Optional[str] = None + + type: Optional[Literal["line_break"]] = None + + +class DocumentTaskCommentSenderChildText(BaseModel): + text: str + + id: Optional[str] = None + + marks: Optional[List[Literal["bold", "italic", "underline", "strikethrough", "code", "math"]]] = None + + type: Optional[Literal["text"]] = None + + +class DocumentTaskCommentSenderChildToolCall(BaseModel): + """A tool/function call made by the assistant.""" + + tool_call_id: str + + tool_name: str + + id: Optional[str] = None + + args: Optional[Dict[str, object]] = None + + type: Optional[Literal["tool_call"]] = None + + +class DocumentTaskCommentSenderChildToolResult(BaseModel): + """The result of a tool call.""" + + output: Union[str, Dict[str, object], List[object]] + + tool_call_id: str + + tool_name: str + + id: Optional[str] = None + + is_error: Optional[bool] = None + + type: Optional[Literal["tool_result"]] = None + + +class DocumentTaskCommentSenderChildTraceMessage(BaseModel): + """A message in an agent trace (user message, assistant message, or thinking).""" + + text: str + + id: Optional[str] = None + + message_type: Optional[Literal["message", "thinking"]] = None + + role: Optional[Literal["user", "assistant"]] = None + + timestamp: Optional[datetime] = None + + type: Optional[Literal["trace_message"]] = None + + +DocumentTaskCommentSenderChild: TypeAlias = Union[ + DocumentTaskCommentSenderChildBlob, + DocumentTaskCommentSenderChildCode, + DocumentTaskCommentSenderChildComment, + DocumentTaskCommentSenderChildDivider, + DocumentTaskCommentSenderChildImage, + DocumentTaskCommentSenderChildLink, + DocumentTaskCommentSenderChildLineBreak, + DocumentTaskCommentSenderChildText, + DocumentTaskCommentSenderChildToolCall, + DocumentTaskCommentSenderChildToolResult, + DocumentTaskCommentSenderChildTraceMessage, + object, +] + + +class DocumentTaskCommentSender(BaseModel): + id: Optional[str] = None + + address: Optional[str] = None + + alt_names: Optional[List[str]] = None + + children: Optional[List[DocumentTaskCommentSenderChild]] = None + + company: Optional[str] = None + + company_ids: Optional[List[str]] = None + + date_of_birth: Optional[date] = None + + deal_ids: Optional[List[str]] = None + + email: Optional[str] = None + + emails: Optional[List[str]] = None + """All known email addresses; `email` holds the primary one""" + + image_url: Optional[str] = None + + job_title: Optional[str] = None + + link_urls: Optional[List[str]] = None + + name: Optional[str] = None + + phone_numbers: Optional[List[str]] = None + + tags: Optional[List[str]] = None + + text: Optional[str] = None + + type: Optional[Literal["person"]] = None + + username: Optional[str] = None + + +class DocumentTaskCommentChildBlob(BaseModel): + """Represents embedded binary data using data URI scheme. + + Format: data:[][;base64], + Example: data:text/html;base64,PGh0bWw+... + """ + + data: str + + mimetype: str + + id: Optional[str] = None + + type: Optional[Literal["blob"]] = None + + +class DocumentTaskCommentChildCalloutChildBlob(BaseModel): + """Represents embedded binary data using data URI scheme. + + Format: data:[][;base64], + Example: data:text/html;base64,PGh0bWw+... + """ + + data: str + + mimetype: str + + id: Optional[str] = None + + type: Optional[Literal["blob"]] = None + + +class DocumentTaskCommentChildCalloutChildCode(BaseModel): + text: str + + id: Optional[str] = None + + language: Optional[str] = None + + type: Optional[Literal["code"]] = None + + +class DocumentTaskCommentChildCalloutChildComment(BaseModel): + text: str + + id: Optional[str] = None + + created_at: Optional[datetime] = None + + type: Optional[Literal["comment"]] = None + + +class DocumentTaskCommentChildCalloutChildDivider(BaseModel): + id: Optional[str] = None + + type: Optional[Literal["divider"]] = None + + +class DocumentTaskCommentChildCalloutChildImage(BaseModel): + src: str + + text: str + + id: Optional[str] = None + + type: Optional[Literal["image"]] = None + + +class DocumentTaskCommentChildCalloutChildLink(BaseModel): + text: str + + url: str + + id: Optional[str] = None + + type: Optional[Literal["link"]] = None + + +class DocumentTaskCommentChildCalloutChildLineBreak(BaseModel): + id: Optional[str] = None + + type: Optional[Literal["line_break"]] = None + + +class DocumentTaskCommentChildCalloutChildText(BaseModel): + text: str + + id: Optional[str] = None + + marks: Optional[List[Literal["bold", "italic", "underline", "strikethrough", "code", "math"]]] = None + + type: Optional[Literal["text"]] = None + + +class DocumentTaskCommentChildCalloutChildToolCall(BaseModel): + """A tool/function call made by the assistant.""" + + tool_call_id: str + + tool_name: str + + id: Optional[str] = None + + args: Optional[Dict[str, object]] = None + + type: Optional[Literal["tool_call"]] = None + + +class DocumentTaskCommentChildCalloutChildToolResult(BaseModel): + """The result of a tool call.""" + + output: Union[str, Dict[str, object], List[object]] + + tool_call_id: str + + tool_name: str + + id: Optional[str] = None + + is_error: Optional[bool] = None + + type: Optional[Literal["tool_result"]] = None + + +class DocumentTaskCommentChildCalloutChildTraceMessage(BaseModel): + """A message in an agent trace (user message, assistant message, or thinking).""" + + text: str + + id: Optional[str] = None + + message_type: Optional[Literal["message", "thinking"]] = None + + role: Optional[Literal["user", "assistant"]] = None + + timestamp: Optional[datetime] = None + + type: Optional[Literal["trace_message"]] = None + + +DocumentTaskCommentChildCalloutChild: TypeAlias = Union[ + DocumentTaskCommentChildCalloutChildBlob, + DocumentTaskCommentChildCalloutChildCode, + DocumentTaskCommentChildCalloutChildComment, + DocumentTaskCommentChildCalloutChildDivider, + DocumentTaskCommentChildCalloutChildImage, + DocumentTaskCommentChildCalloutChildLink, + DocumentTaskCommentChildCalloutChildLineBreak, + DocumentTaskCommentChildCalloutChildText, + DocumentTaskCommentChildCalloutChildToolCall, + DocumentTaskCommentChildCalloutChildToolResult, + DocumentTaskCommentChildCalloutChildTraceMessage, + object, +] + + +class DocumentTaskCommentChildCallout(BaseModel): + id: Optional[str] = None + + children: Optional[List[DocumentTaskCommentChildCalloutChild]] = None + + text: Optional[str] = None + + title: Optional[str] = None + + type: Optional[Literal["callout"]] = None + + +class DocumentTaskCommentChildChunkChildBlob(BaseModel): + """Represents embedded binary data using data URI scheme. + + Format: data:[][;base64], + Example: data:text/html;base64,PGh0bWw+... + """ + + data: str + + mimetype: str + + id: Optional[str] = None + + type: Optional[Literal["blob"]] = None + + +class DocumentTaskCommentChildChunkChildCode(BaseModel): + text: str + + id: Optional[str] = None + + language: Optional[str] = None + + type: Optional[Literal["code"]] = None + + +class DocumentTaskCommentChildChunkChildComment(BaseModel): + text: str + + id: Optional[str] = None + + created_at: Optional[datetime] = None + + type: Optional[Literal["comment"]] = None + + +class DocumentTaskCommentChildChunkChildDivider(BaseModel): + id: Optional[str] = None + + type: Optional[Literal["divider"]] = None + + +class DocumentTaskCommentChildChunkChildImage(BaseModel): + src: str + + text: str + + id: Optional[str] = None + + type: Optional[Literal["image"]] = None + + +class DocumentTaskCommentChildChunkChildLink(BaseModel): + text: str + + url: str + + id: Optional[str] = None + + type: Optional[Literal["link"]] = None + + +class DocumentTaskCommentChildChunkChildLineBreak(BaseModel): + id: Optional[str] = None + + type: Optional[Literal["line_break"]] = None + + +class DocumentTaskCommentChildChunkChildText(BaseModel): + text: str + + id: Optional[str] = None + + marks: Optional[List[Literal["bold", "italic", "underline", "strikethrough", "code", "math"]]] = None + + type: Optional[Literal["text"]] = None + + +class DocumentTaskCommentChildChunkChildToolCall(BaseModel): + """A tool/function call made by the assistant.""" + + tool_call_id: str + + tool_name: str + + id: Optional[str] = None + + args: Optional[Dict[str, object]] = None + + type: Optional[Literal["tool_call"]] = None + + +class DocumentTaskCommentChildChunkChildToolResult(BaseModel): + """The result of a tool call.""" + + output: Union[str, Dict[str, object], List[object]] + + tool_call_id: str + + tool_name: str + + id: Optional[str] = None + + is_error: Optional[bool] = None + + type: Optional[Literal["tool_result"]] = None + + +class DocumentTaskCommentChildChunkChildTraceMessage(BaseModel): + """A message in an agent trace (user message, assistant message, or thinking).""" + + text: str + + id: Optional[str] = None + + message_type: Optional[Literal["message", "thinking"]] = None + + role: Optional[Literal["user", "assistant"]] = None + + timestamp: Optional[datetime] = None + + type: Optional[Literal["trace_message"]] = None + + +DocumentTaskCommentChildChunkChild: TypeAlias = Union[ + DocumentTaskCommentChildChunkChildBlob, + DocumentTaskCommentChildChunkChildCode, + DocumentTaskCommentChildChunkChildComment, + DocumentTaskCommentChildChunkChildDivider, + DocumentTaskCommentChildChunkChildImage, + DocumentTaskCommentChildChunkChildLink, + DocumentTaskCommentChildChunkChildLineBreak, + DocumentTaskCommentChildChunkChildText, + DocumentTaskCommentChildChunkChildToolCall, + DocumentTaskCommentChildChunkChildToolResult, + DocumentTaskCommentChildChunkChildTraceMessage, + object, +] + + +class DocumentTaskCommentChildChunk(BaseModel): + id: Optional[str] = None + + children: Optional[List[DocumentTaskCommentChildChunkChild]] = None + + text: Optional[str] = None + + type: Optional[Literal["chunk"]] = None + + +class DocumentTaskCommentChildCode(BaseModel): + text: str + + id: Optional[str] = None + + language: Optional[str] = None + + type: Optional[Literal["code"]] = None + + +class DocumentTaskCommentChildComment(BaseModel): + text: str + + id: Optional[str] = None + + created_at: Optional[datetime] = None + + type: Optional[Literal["comment"]] = None + + +class DocumentTaskCommentChildDivider(BaseModel): + id: Optional[str] = None + + type: Optional[Literal["divider"]] = None + + +class DocumentTaskCommentChildEquationChildBlob(BaseModel): + """Represents embedded binary data using data URI scheme. + + Format: data:[][;base64], + Example: data:text/html;base64,PGh0bWw+... + """ + + data: str + + mimetype: str + + id: Optional[str] = None + + type: Optional[Literal["blob"]] = None + + +class DocumentTaskCommentChildEquationChildCode(BaseModel): + text: str + + id: Optional[str] = None + + language: Optional[str] = None + + type: Optional[Literal["code"]] = None + + +class DocumentTaskCommentChildEquationChildComment(BaseModel): + text: str + + id: Optional[str] = None + + created_at: Optional[datetime] = None + + type: Optional[Literal["comment"]] = None + + +class DocumentTaskCommentChildEquationChildDivider(BaseModel): + id: Optional[str] = None + + type: Optional[Literal["divider"]] = None + + +class DocumentTaskCommentChildEquationChildImage(BaseModel): + src: str + + text: str + + id: Optional[str] = None + + type: Optional[Literal["image"]] = None + + +class DocumentTaskCommentChildEquationChildLink(BaseModel): + text: str + + url: str + + id: Optional[str] = None + + type: Optional[Literal["link"]] = None + + +class DocumentTaskCommentChildEquationChildLineBreak(BaseModel): + id: Optional[str] = None + + type: Optional[Literal["line_break"]] = None + + +class DocumentTaskCommentChildEquationChildText(BaseModel): + text: str + + id: Optional[str] = None + + marks: Optional[List[Literal["bold", "italic", "underline", "strikethrough", "code", "math"]]] = None + + type: Optional[Literal["text"]] = None + + +class DocumentTaskCommentChildEquationChildToolCall(BaseModel): + """A tool/function call made by the assistant.""" + + tool_call_id: str + + tool_name: str + + id: Optional[str] = None + + args: Optional[Dict[str, object]] = None + + type: Optional[Literal["tool_call"]] = None + + +class DocumentTaskCommentChildEquationChildToolResult(BaseModel): + """The result of a tool call.""" + + output: Union[str, Dict[str, object], List[object]] + + tool_call_id: str + + tool_name: str + + id: Optional[str] = None + + is_error: Optional[bool] = None + + type: Optional[Literal["tool_result"]] = None + + +class DocumentTaskCommentChildEquationChildTraceMessage(BaseModel): + """A message in an agent trace (user message, assistant message, or thinking).""" + + text: str + + id: Optional[str] = None + + message_type: Optional[Literal["message", "thinking"]] = None + + role: Optional[Literal["user", "assistant"]] = None + + timestamp: Optional[datetime] = None + + type: Optional[Literal["trace_message"]] = None + + +DocumentTaskCommentChildEquationChild: TypeAlias = Union[ + DocumentTaskCommentChildEquationChildBlob, + DocumentTaskCommentChildEquationChildCode, + DocumentTaskCommentChildEquationChildComment, + DocumentTaskCommentChildEquationChildDivider, + DocumentTaskCommentChildEquationChildImage, + DocumentTaskCommentChildEquationChildLink, + DocumentTaskCommentChildEquationChildLineBreak, + DocumentTaskCommentChildEquationChildText, + DocumentTaskCommentChildEquationChildToolCall, + DocumentTaskCommentChildEquationChildToolResult, + DocumentTaskCommentChildEquationChildTraceMessage, + object, +] + + +class DocumentTaskCommentChildEquation(BaseModel): + id: Optional[str] = None + + children: Optional[List[DocumentTaskCommentChildEquationChild]] = None + + text: Optional[str] = None + + type: Optional[Literal["equation"]] = None + + +class DocumentTaskCommentChildFootnoteChildBlob(BaseModel): + """Represents embedded binary data using data URI scheme. + + Format: data:[][;base64], + Example: data:text/html;base64,PGh0bWw+... + """ + + data: str + + mimetype: str + + id: Optional[str] = None + + type: Optional[Literal["blob"]] = None + + +class DocumentTaskCommentChildFootnoteChildCode(BaseModel): + text: str + + id: Optional[str] = None + + language: Optional[str] = None + + type: Optional[Literal["code"]] = None + + +class DocumentTaskCommentChildFootnoteChildComment(BaseModel): + text: str + + id: Optional[str] = None + + created_at: Optional[datetime] = None + + type: Optional[Literal["comment"]] = None + + +class DocumentTaskCommentChildFootnoteChildDivider(BaseModel): + id: Optional[str] = None + + type: Optional[Literal["divider"]] = None + + +class DocumentTaskCommentChildFootnoteChildImage(BaseModel): + src: str + + text: str + + id: Optional[str] = None + + type: Optional[Literal["image"]] = None + + +class DocumentTaskCommentChildFootnoteChildLink(BaseModel): + text: str + + url: str + + id: Optional[str] = None + + type: Optional[Literal["link"]] = None + + +class DocumentTaskCommentChildFootnoteChildLineBreak(BaseModel): + id: Optional[str] = None + + type: Optional[Literal["line_break"]] = None + + +class DocumentTaskCommentChildFootnoteChildText(BaseModel): + text: str + + id: Optional[str] = None + + marks: Optional[List[Literal["bold", "italic", "underline", "strikethrough", "code", "math"]]] = None + + type: Optional[Literal["text"]] = None + + +class DocumentTaskCommentChildFootnoteChildToolCall(BaseModel): + """A tool/function call made by the assistant.""" + + tool_call_id: str + + tool_name: str + + id: Optional[str] = None + + args: Optional[Dict[str, object]] = None + + type: Optional[Literal["tool_call"]] = None + + +class DocumentTaskCommentChildFootnoteChildToolResult(BaseModel): + """The result of a tool call.""" + + output: Union[str, Dict[str, object], List[object]] + + tool_call_id: str + + tool_name: str + + id: Optional[str] = None + + is_error: Optional[bool] = None + + type: Optional[Literal["tool_result"]] = None + + +class DocumentTaskCommentChildFootnoteChildTraceMessage(BaseModel): + """A message in an agent trace (user message, assistant message, or thinking).""" + + text: str + + id: Optional[str] = None + + message_type: Optional[Literal["message", "thinking"]] = None + + role: Optional[Literal["user", "assistant"]] = None + + timestamp: Optional[datetime] = None + + type: Optional[Literal["trace_message"]] = None + + +DocumentTaskCommentChildFootnoteChild: TypeAlias = Union[ + DocumentTaskCommentChildFootnoteChildBlob, + DocumentTaskCommentChildFootnoteChildCode, + DocumentTaskCommentChildFootnoteChildComment, + DocumentTaskCommentChildFootnoteChildDivider, + DocumentTaskCommentChildFootnoteChildImage, + DocumentTaskCommentChildFootnoteChildLink, + DocumentTaskCommentChildFootnoteChildLineBreak, + DocumentTaskCommentChildFootnoteChildText, + DocumentTaskCommentChildFootnoteChildToolCall, + DocumentTaskCommentChildFootnoteChildToolResult, + DocumentTaskCommentChildFootnoteChildTraceMessage, + object, +] + + +class DocumentTaskCommentChildFootnote(BaseModel): + id: Optional[str] = None + + children: Optional[List[DocumentTaskCommentChildFootnoteChild]] = None + + text: Optional[str] = None + + type: Optional[Literal["footnote"]] = None + + +class DocumentTaskCommentChildHeadingChildBlob(BaseModel): + """Represents embedded binary data using data URI scheme. + + Format: data:[][;base64], + Example: data:text/html;base64,PGh0bWw+... + """ + + data: str + + mimetype: str + + id: Optional[str] = None + + type: Optional[Literal["blob"]] = None + + +class DocumentTaskCommentChildHeadingChildCode(BaseModel): + text: str + + id: Optional[str] = None + + language: Optional[str] = None + + type: Optional[Literal["code"]] = None + + +class DocumentTaskCommentChildHeadingChildComment(BaseModel): + text: str + + id: Optional[str] = None + + created_at: Optional[datetime] = None + + type: Optional[Literal["comment"]] = None + + +class DocumentTaskCommentChildHeadingChildDivider(BaseModel): + id: Optional[str] = None + + type: Optional[Literal["divider"]] = None + + +class DocumentTaskCommentChildHeadingChildImage(BaseModel): + src: str + + text: str + + id: Optional[str] = None + + type: Optional[Literal["image"]] = None + + +class DocumentTaskCommentChildHeadingChildLink(BaseModel): + text: str + + url: str + + id: Optional[str] = None + + type: Optional[Literal["link"]] = None + + +class DocumentTaskCommentChildHeadingChildLineBreak(BaseModel): + id: Optional[str] = None + + type: Optional[Literal["line_break"]] = None + + +class DocumentTaskCommentChildHeadingChildText(BaseModel): + text: str + + id: Optional[str] = None + + marks: Optional[List[Literal["bold", "italic", "underline", "strikethrough", "code", "math"]]] = None + + type: Optional[Literal["text"]] = None + + +class DocumentTaskCommentChildHeadingChildToolCall(BaseModel): + """A tool/function call made by the assistant.""" + + tool_call_id: str + + tool_name: str + + id: Optional[str] = None + + args: Optional[Dict[str, object]] = None + + type: Optional[Literal["tool_call"]] = None + + +class DocumentTaskCommentChildHeadingChildToolResult(BaseModel): + """The result of a tool call.""" + + output: Union[str, Dict[str, object], List[object]] + + tool_call_id: str + + tool_name: str + + id: Optional[str] = None + + is_error: Optional[bool] = None + + type: Optional[Literal["tool_result"]] = None + + +class DocumentTaskCommentChildHeadingChildTraceMessage(BaseModel): + """A message in an agent trace (user message, assistant message, or thinking).""" + + text: str + + id: Optional[str] = None + + message_type: Optional[Literal["message", "thinking"]] = None + + role: Optional[Literal["user", "assistant"]] = None + + timestamp: Optional[datetime] = None + + type: Optional[Literal["trace_message"]] = None + + +DocumentTaskCommentChildHeadingChild: TypeAlias = Union[ + DocumentTaskCommentChildHeadingChildBlob, + DocumentTaskCommentChildHeadingChildCode, + DocumentTaskCommentChildHeadingChildComment, + DocumentTaskCommentChildHeadingChildDivider, + DocumentTaskCommentChildHeadingChildImage, + DocumentTaskCommentChildHeadingChildLink, + DocumentTaskCommentChildHeadingChildLineBreak, + DocumentTaskCommentChildHeadingChildText, + DocumentTaskCommentChildHeadingChildToolCall, + DocumentTaskCommentChildHeadingChildToolResult, + DocumentTaskCommentChildHeadingChildTraceMessage, + object, +] + + +class DocumentTaskCommentChildHeading(BaseModel): + level: int + + id: Optional[str] = None + + children: Optional[List[DocumentTaskCommentChildHeadingChild]] = None + + text: Optional[str] = None + + type: Optional[Literal["heading"]] = None + + +class DocumentTaskCommentChildImage(BaseModel): + src: str + + text: str + + id: Optional[str] = None + + type: Optional[Literal["image"]] = None + + +class DocumentTaskCommentChildLink(BaseModel): + text: str + + url: str + + id: Optional[str] = None + + type: Optional[Literal["link"]] = None + + +class DocumentTaskCommentChildLineBreak(BaseModel): + id: Optional[str] = None + + type: Optional[Literal["line_break"]] = None + + +class DocumentTaskCommentChildList(BaseModel): + id: Optional[str] = None + + children: Optional[List[object]] = None + + ordered: Optional[bool] = None + + text: Optional[str] = None + + type: Optional[Literal["list"]] = None + + +class DocumentTaskCommentChildListItemChildBlob(BaseModel): + """Represents embedded binary data using data URI scheme. + + Format: data:[][;base64], + Example: data:text/html;base64,PGh0bWw+... + """ + + data: str + + mimetype: str + + id: Optional[str] = None + + type: Optional[Literal["blob"]] = None + + +class DocumentTaskCommentChildListItemChildCode(BaseModel): + text: str + + id: Optional[str] = None + + language: Optional[str] = None + + type: Optional[Literal["code"]] = None + + +class DocumentTaskCommentChildListItemChildComment(BaseModel): + text: str + + id: Optional[str] = None + + created_at: Optional[datetime] = None + + type: Optional[Literal["comment"]] = None + + +class DocumentTaskCommentChildListItemChildDivider(BaseModel): + id: Optional[str] = None + + type: Optional[Literal["divider"]] = None + + +class DocumentTaskCommentChildListItemChildImage(BaseModel): + src: str + + text: str + + id: Optional[str] = None + + type: Optional[Literal["image"]] = None + + +class DocumentTaskCommentChildListItemChildLink(BaseModel): + text: str + + url: str + + id: Optional[str] = None + + type: Optional[Literal["link"]] = None + + +class DocumentTaskCommentChildListItemChildLineBreak(BaseModel): + id: Optional[str] = None + + type: Optional[Literal["line_break"]] = None + + +class DocumentTaskCommentChildListItemChildText(BaseModel): + text: str + + id: Optional[str] = None + + marks: Optional[List[Literal["bold", "italic", "underline", "strikethrough", "code", "math"]]] = None + + type: Optional[Literal["text"]] = None + + +class DocumentTaskCommentChildListItemChildToolCall(BaseModel): + """A tool/function call made by the assistant.""" + + tool_call_id: str + + tool_name: str + + id: Optional[str] = None + + args: Optional[Dict[str, object]] = None + + type: Optional[Literal["tool_call"]] = None + + +class DocumentTaskCommentChildListItemChildToolResult(BaseModel): + """The result of a tool call.""" + + output: Union[str, Dict[str, object], List[object]] + + tool_call_id: str + + tool_name: str + + id: Optional[str] = None + + is_error: Optional[bool] = None + + type: Optional[Literal["tool_result"]] = None + + +class DocumentTaskCommentChildListItemChildTraceMessage(BaseModel): + """A message in an agent trace (user message, assistant message, or thinking).""" + + text: str + + id: Optional[str] = None + + message_type: Optional[Literal["message", "thinking"]] = None + + role: Optional[Literal["user", "assistant"]] = None + + timestamp: Optional[datetime] = None + + type: Optional[Literal["trace_message"]] = None + + +DocumentTaskCommentChildListItemChild: TypeAlias = Union[ + DocumentTaskCommentChildListItemChildBlob, + DocumentTaskCommentChildListItemChildCode, + DocumentTaskCommentChildListItemChildComment, + DocumentTaskCommentChildListItemChildDivider, + DocumentTaskCommentChildListItemChildImage, + DocumentTaskCommentChildListItemChildLink, + DocumentTaskCommentChildListItemChildLineBreak, + DocumentTaskCommentChildListItemChildText, + DocumentTaskCommentChildListItemChildToolCall, + DocumentTaskCommentChildListItemChildToolResult, + DocumentTaskCommentChildListItemChildTraceMessage, + object, +] + + +class DocumentTaskCommentChildListItem(BaseModel): + id: Optional[str] = None + + children: Optional[List[DocumentTaskCommentChildListItemChild]] = None + + text: Optional[str] = None + + type: Optional[Literal["list_item"]] = None + + +class DocumentTaskCommentChildParagraphChildBlob(BaseModel): + """Represents embedded binary data using data URI scheme. + + Format: data:[][;base64], + Example: data:text/html;base64,PGh0bWw+... + """ + + data: str + + mimetype: str + + id: Optional[str] = None + + type: Optional[Literal["blob"]] = None + + +class DocumentTaskCommentChildParagraphChildCode(BaseModel): + text: str + + id: Optional[str] = None + + language: Optional[str] = None + + type: Optional[Literal["code"]] = None + + +class DocumentTaskCommentChildParagraphChildComment(BaseModel): + text: str + + id: Optional[str] = None + + created_at: Optional[datetime] = None + + type: Optional[Literal["comment"]] = None + + +class DocumentTaskCommentChildParagraphChildDivider(BaseModel): + id: Optional[str] = None + + type: Optional[Literal["divider"]] = None + + +class DocumentTaskCommentChildParagraphChildImage(BaseModel): + src: str + + text: str + + id: Optional[str] = None + + type: Optional[Literal["image"]] = None + + +class DocumentTaskCommentChildParagraphChildLink(BaseModel): + text: str + + url: str + + id: Optional[str] = None + + type: Optional[Literal["link"]] = None + + +class DocumentTaskCommentChildParagraphChildLineBreak(BaseModel): + id: Optional[str] = None + + type: Optional[Literal["line_break"]] = None + + +class DocumentTaskCommentChildParagraphChildText(BaseModel): + text: str + + id: Optional[str] = None + + marks: Optional[List[Literal["bold", "italic", "underline", "strikethrough", "code", "math"]]] = None + + type: Optional[Literal["text"]] = None + + +class DocumentTaskCommentChildParagraphChildToolCall(BaseModel): + """A tool/function call made by the assistant.""" + + tool_call_id: str + + tool_name: str + + id: Optional[str] = None + + args: Optional[Dict[str, object]] = None + + type: Optional[Literal["tool_call"]] = None + + +class DocumentTaskCommentChildParagraphChildToolResult(BaseModel): + """The result of a tool call.""" + + output: Union[str, Dict[str, object], List[object]] + + tool_call_id: str + + tool_name: str + + id: Optional[str] = None + + is_error: Optional[bool] = None + + type: Optional[Literal["tool_result"]] = None + + +class DocumentTaskCommentChildParagraphChildTraceMessage(BaseModel): + """A message in an agent trace (user message, assistant message, or thinking).""" + + text: str + + id: Optional[str] = None + + message_type: Optional[Literal["message", "thinking"]] = None + + role: Optional[Literal["user", "assistant"]] = None + + timestamp: Optional[datetime] = None + + type: Optional[Literal["trace_message"]] = None + + +DocumentTaskCommentChildParagraphChild: TypeAlias = Union[ + DocumentTaskCommentChildParagraphChildBlob, + DocumentTaskCommentChildParagraphChildCode, + DocumentTaskCommentChildParagraphChildComment, + DocumentTaskCommentChildParagraphChildDivider, + DocumentTaskCommentChildParagraphChildImage, + DocumentTaskCommentChildParagraphChildLink, + DocumentTaskCommentChildParagraphChildLineBreak, + DocumentTaskCommentChildParagraphChildText, + DocumentTaskCommentChildParagraphChildToolCall, + DocumentTaskCommentChildParagraphChildToolResult, + DocumentTaskCommentChildParagraphChildTraceMessage, + object, +] + + +class DocumentTaskCommentChildParagraph(BaseModel): + id: Optional[str] = None + + children: Optional[List[DocumentTaskCommentChildParagraphChild]] = None + + text: Optional[str] = None + + type: Optional[Literal["paragraph"]] = None + + +class DocumentTaskCommentChildQuoteChildBlob(BaseModel): + """Represents embedded binary data using data URI scheme. + + Format: data:[][;base64], + Example: data:text/html;base64,PGh0bWw+... + """ + + data: str + + mimetype: str + + id: Optional[str] = None + + type: Optional[Literal["blob"]] = None + + +class DocumentTaskCommentChildQuoteChildCode(BaseModel): + text: str + + id: Optional[str] = None + + language: Optional[str] = None + + type: Optional[Literal["code"]] = None + + +class DocumentTaskCommentChildQuoteChildComment(BaseModel): + text: str + + id: Optional[str] = None + + created_at: Optional[datetime] = None + + type: Optional[Literal["comment"]] = None + + +class DocumentTaskCommentChildQuoteChildDivider(BaseModel): + id: Optional[str] = None + + type: Optional[Literal["divider"]] = None + + +class DocumentTaskCommentChildQuoteChildImage(BaseModel): + src: str + + text: str + + id: Optional[str] = None + + type: Optional[Literal["image"]] = None + + +class DocumentTaskCommentChildQuoteChildLink(BaseModel): + text: str + + url: str + + id: Optional[str] = None + + type: Optional[Literal["link"]] = None + + +class DocumentTaskCommentChildQuoteChildLineBreak(BaseModel): + id: Optional[str] = None + + type: Optional[Literal["line_break"]] = None + + +class DocumentTaskCommentChildQuoteChildText(BaseModel): + text: str + + id: Optional[str] = None + + marks: Optional[List[Literal["bold", "italic", "underline", "strikethrough", "code", "math"]]] = None + + type: Optional[Literal["text"]] = None + + +class DocumentTaskCommentChildQuoteChildToolCall(BaseModel): + """A tool/function call made by the assistant.""" + + tool_call_id: str + + tool_name: str + + id: Optional[str] = None + + args: Optional[Dict[str, object]] = None + + type: Optional[Literal["tool_call"]] = None + + +class DocumentTaskCommentChildQuoteChildToolResult(BaseModel): + """The result of a tool call.""" + + output: Union[str, Dict[str, object], List[object]] + + tool_call_id: str + + tool_name: str + + id: Optional[str] = None + + is_error: Optional[bool] = None + + type: Optional[Literal["tool_result"]] = None + + +class DocumentTaskCommentChildQuoteChildTraceMessage(BaseModel): + """A message in an agent trace (user message, assistant message, or thinking).""" + + text: str + + id: Optional[str] = None + + message_type: Optional[Literal["message", "thinking"]] = None + + role: Optional[Literal["user", "assistant"]] = None + + timestamp: Optional[datetime] = None + + type: Optional[Literal["trace_message"]] = None + + +DocumentTaskCommentChildQuoteChild: TypeAlias = Union[ + DocumentTaskCommentChildQuoteChildBlob, + DocumentTaskCommentChildQuoteChildCode, + DocumentTaskCommentChildQuoteChildComment, + DocumentTaskCommentChildQuoteChildDivider, + DocumentTaskCommentChildQuoteChildImage, + DocumentTaskCommentChildQuoteChildLink, + DocumentTaskCommentChildQuoteChildLineBreak, + DocumentTaskCommentChildQuoteChildText, + DocumentTaskCommentChildQuoteChildToolCall, + DocumentTaskCommentChildQuoteChildToolResult, + DocumentTaskCommentChildQuoteChildTraceMessage, + object, +] + + +class DocumentTaskCommentChildQuote(BaseModel): + id: Optional[str] = None + + children: Optional[List[DocumentTaskCommentChildQuoteChild]] = None + + text: Optional[str] = None + + type: Optional[Literal["quote"]] = None + + +class DocumentTaskCommentChildTable(BaseModel): + id: Optional[str] = None + + children: Optional[List[object]] = None + + has_header: Optional[bool] = None + """Whether the first row should be treated as a header""" + + text: Optional[str] = None + + type: Optional[Literal["table"]] = None + + +class DocumentTaskCommentChildTableCellChildBlob(BaseModel): + """Represents embedded binary data using data URI scheme. + + Format: data:[][;base64], + Example: data:text/html;base64,PGh0bWw+... + """ + + data: str + + mimetype: str + + id: Optional[str] = None + + type: Optional[Literal["blob"]] = None + + +class DocumentTaskCommentChildTableCellChildCode(BaseModel): + text: str + + id: Optional[str] = None + + language: Optional[str] = None + + type: Optional[Literal["code"]] = None + + +class DocumentTaskCommentChildTableCellChildComment(BaseModel): + text: str + + id: Optional[str] = None + + created_at: Optional[datetime] = None + + type: Optional[Literal["comment"]] = None + + +class DocumentTaskCommentChildTableCellChildDivider(BaseModel): + id: Optional[str] = None + + type: Optional[Literal["divider"]] = None + + +class DocumentTaskCommentChildTableCellChildImage(BaseModel): + src: str + + text: str + + id: Optional[str] = None + + type: Optional[Literal["image"]] = None + + +class DocumentTaskCommentChildTableCellChildLink(BaseModel): + text: str + + url: str + + id: Optional[str] = None + + type: Optional[Literal["link"]] = None + + +class DocumentTaskCommentChildTableCellChildLineBreak(BaseModel): + id: Optional[str] = None + + type: Optional[Literal["line_break"]] = None + + +class DocumentTaskCommentChildTableCellChildText(BaseModel): + text: str + + id: Optional[str] = None + + marks: Optional[List[Literal["bold", "italic", "underline", "strikethrough", "code", "math"]]] = None + + type: Optional[Literal["text"]] = None + + +class DocumentTaskCommentChildTableCellChildToolCall(BaseModel): + """A tool/function call made by the assistant.""" + + tool_call_id: str + + tool_name: str + + id: Optional[str] = None + + args: Optional[Dict[str, object]] = None + + type: Optional[Literal["tool_call"]] = None + + +class DocumentTaskCommentChildTableCellChildToolResult(BaseModel): + """The result of a tool call.""" + + output: Union[str, Dict[str, object], List[object]] + + tool_call_id: str + + tool_name: str + + id: Optional[str] = None + + is_error: Optional[bool] = None + + type: Optional[Literal["tool_result"]] = None + + +class DocumentTaskCommentChildTableCellChildTraceMessage(BaseModel): + """A message in an agent trace (user message, assistant message, or thinking).""" + + text: str + + id: Optional[str] = None + + message_type: Optional[Literal["message", "thinking"]] = None + + role: Optional[Literal["user", "assistant"]] = None + + timestamp: Optional[datetime] = None + + type: Optional[Literal["trace_message"]] = None + + +DocumentTaskCommentChildTableCellChild: TypeAlias = Union[ + DocumentTaskCommentChildTableCellChildBlob, + DocumentTaskCommentChildTableCellChildCode, + DocumentTaskCommentChildTableCellChildComment, + DocumentTaskCommentChildTableCellChildDivider, + DocumentTaskCommentChildTableCellChildImage, + DocumentTaskCommentChildTableCellChildLink, + DocumentTaskCommentChildTableCellChildLineBreak, + DocumentTaskCommentChildTableCellChildText, + DocumentTaskCommentChildTableCellChildToolCall, + DocumentTaskCommentChildTableCellChildToolResult, + DocumentTaskCommentChildTableCellChildTraceMessage, + object, +] + + +class DocumentTaskCommentChildTableCell(BaseModel): + id: Optional[str] = None + + align: Optional[Literal["left", "center", "right"]] = None + + children: Optional[List[DocumentTaskCommentChildTableCellChild]] = None + + text: Optional[str] = None + + type: Optional[Literal["table_cell"]] = None + + +class DocumentTaskCommentChildTableRow(BaseModel): + id: Optional[str] = None + + children: Optional[List[object]] = None + + text: Optional[str] = None + + type: Optional[Literal["table_row"]] = None + + +class DocumentTaskCommentChildText(BaseModel): + text: str + + id: Optional[str] = None + + marks: Optional[List[Literal["bold", "italic", "underline", "strikethrough", "code", "math"]]] = None + + type: Optional[Literal["text"]] = None + + +class DocumentTaskCommentChildToDoChildBlob(BaseModel): + """Represents embedded binary data using data URI scheme. + + Format: data:[][;base64], + Example: data:text/html;base64,PGh0bWw+... + """ + + data: str + + mimetype: str + + id: Optional[str] = None + + type: Optional[Literal["blob"]] = None + + +class DocumentTaskCommentChildToDoChildCode(BaseModel): + text: str + + id: Optional[str] = None + + language: Optional[str] = None + + type: Optional[Literal["code"]] = None + + +class DocumentTaskCommentChildToDoChildComment(BaseModel): + text: str + + id: Optional[str] = None + + created_at: Optional[datetime] = None + + type: Optional[Literal["comment"]] = None + + +class DocumentTaskCommentChildToDoChildDivider(BaseModel): + id: Optional[str] = None + + type: Optional[Literal["divider"]] = None + + +class DocumentTaskCommentChildToDoChildImage(BaseModel): + src: str + + text: str + + id: Optional[str] = None + + type: Optional[Literal["image"]] = None + + +class DocumentTaskCommentChildToDoChildLink(BaseModel): + text: str + + url: str + + id: Optional[str] = None + + type: Optional[Literal["link"]] = None + + +class DocumentTaskCommentChildToDoChildLineBreak(BaseModel): + id: Optional[str] = None + + type: Optional[Literal["line_break"]] = None + + +class DocumentTaskCommentChildToDoChildText(BaseModel): + text: str + + id: Optional[str] = None + + marks: Optional[List[Literal["bold", "italic", "underline", "strikethrough", "code", "math"]]] = None + + type: Optional[Literal["text"]] = None + + +class DocumentTaskCommentChildToDoChildToolCall(BaseModel): + """A tool/function call made by the assistant.""" + + tool_call_id: str + + tool_name: str + + id: Optional[str] = None + + args: Optional[Dict[str, object]] = None + + type: Optional[Literal["tool_call"]] = None + + +class DocumentTaskCommentChildToDoChildToolResult(BaseModel): + """The result of a tool call.""" + + output: Union[str, Dict[str, object], List[object]] + + tool_call_id: str + + tool_name: str + + id: Optional[str] = None + + is_error: Optional[bool] = None + + type: Optional[Literal["tool_result"]] = None + + +class DocumentTaskCommentChildToDoChildTraceMessage(BaseModel): + """A message in an agent trace (user message, assistant message, or thinking).""" + + text: str + + id: Optional[str] = None + + message_type: Optional[Literal["message", "thinking"]] = None + + role: Optional[Literal["user", "assistant"]] = None + + timestamp: Optional[datetime] = None + + type: Optional[Literal["trace_message"]] = None + + +DocumentTaskCommentChildToDoChild: TypeAlias = Union[ + DocumentTaskCommentChildToDoChildBlob, + DocumentTaskCommentChildToDoChildCode, + DocumentTaskCommentChildToDoChildComment, + DocumentTaskCommentChildToDoChildDivider, + DocumentTaskCommentChildToDoChildImage, + DocumentTaskCommentChildToDoChildLink, + DocumentTaskCommentChildToDoChildLineBreak, + DocumentTaskCommentChildToDoChildText, + DocumentTaskCommentChildToDoChildToolCall, + DocumentTaskCommentChildToDoChildToolResult, + DocumentTaskCommentChildToDoChildTraceMessage, + object, +] + + +class DocumentTaskCommentChildToDo(BaseModel): + id: Optional[str] = None + + checked: Optional[bool] = None + + children: Optional[List[DocumentTaskCommentChildToDoChild]] = None + + text: Optional[str] = None + + type: Optional[Literal["todo"]] = None + + +class DocumentTaskCommentChildToolCall(BaseModel): + """A tool/function call made by the assistant.""" + + tool_call_id: str + + tool_name: str + + id: Optional[str] = None + + args: Optional[Dict[str, object]] = None + + type: Optional[Literal["tool_call"]] = None + + +class DocumentTaskCommentChildToolResult(BaseModel): + """The result of a tool call.""" + + output: Union[str, Dict[str, object], List[object]] + + tool_call_id: str + + tool_name: str + + id: Optional[str] = None + + is_error: Optional[bool] = None + + type: Optional[Literal["tool_result"]] = None + + +class DocumentTaskCommentChildTraceMessage(BaseModel): + """A message in an agent trace (user message, assistant message, or thinking).""" + + text: str + + id: Optional[str] = None + + message_type: Optional[Literal["message", "thinking"]] = None + + role: Optional[Literal["user", "assistant"]] = None + + timestamp: Optional[datetime] = None + + type: Optional[Literal["trace_message"]] = None + + +class DocumentTaskCommentChildUtterance(BaseModel): + """A speaker-attributed segment of a transcript (ENG-2476/D10). + + "Utterance" is the standard name for this across transcription providers + (AssemblyAI, Deepgram, Rev). Timestamps are relative offsets in seconds — + provider-native; absolute times derive from `Transcript.started_at`. + """ + + text: str + + id: Optional[str] = None + + end: Optional[float] = None + + speaker: Optional[object] = None + + start: Optional[float] = None + + type: Optional[Literal["utterance"]] = None + + +DocumentTaskCommentChild: TypeAlias = Annotated[ + Union[ + DocumentTaskCommentChildBlob, + DocumentTaskCommentChildCallout, + DocumentTaskCommentChildChunk, + DocumentTaskCommentChildCode, + DocumentTaskCommentChildComment, + DocumentTaskCommentChildDivider, + DocumentTaskCommentChildEquation, + DocumentTaskCommentChildFootnote, + DocumentTaskCommentChildHeading, + DocumentTaskCommentChildImage, + DocumentTaskCommentChildLink, + DocumentTaskCommentChildLineBreak, + DocumentTaskCommentChildList, + DocumentTaskCommentChildListItem, + DocumentTaskCommentChildParagraph, + DocumentTaskCommentChildQuote, + DocumentTaskCommentChildTable, + DocumentTaskCommentChildTableCell, + DocumentTaskCommentChildTableRow, + DocumentTaskCommentChildText, + DocumentTaskCommentChildToDo, + DocumentTaskCommentChildToolCall, + DocumentTaskCommentChildToolResult, + DocumentTaskCommentChildTraceMessage, + DocumentTaskCommentChildUtterance, + ], + PropertyInfo(discriminator="type"), +] + + +class DocumentTaskCommentMentionedUserChildBlob(BaseModel): + """Represents embedded binary data using data URI scheme. + + Format: data:[][;base64], + Example: data:text/html;base64,PGh0bWw+... + """ + + data: str + + mimetype: str + + id: Optional[str] = None + + type: Optional[Literal["blob"]] = None + + +class DocumentTaskCommentMentionedUserChildCode(BaseModel): + text: str + + id: Optional[str] = None + + language: Optional[str] = None + + type: Optional[Literal["code"]] = None + + +class DocumentTaskCommentMentionedUserChildComment(BaseModel): + text: str + + id: Optional[str] = None + + created_at: Optional[datetime] = None + + type: Optional[Literal["comment"]] = None + + +class DocumentTaskCommentMentionedUserChildDivider(BaseModel): + id: Optional[str] = None + + type: Optional[Literal["divider"]] = None + + +class DocumentTaskCommentMentionedUserChildImage(BaseModel): + src: str + + text: str + + id: Optional[str] = None + + type: Optional[Literal["image"]] = None + + +class DocumentTaskCommentMentionedUserChildLink(BaseModel): + text: str + + url: str + + id: Optional[str] = None + + type: Optional[Literal["link"]] = None + + +class DocumentTaskCommentMentionedUserChildLineBreak(BaseModel): + id: Optional[str] = None + + type: Optional[Literal["line_break"]] = None + + +class DocumentTaskCommentMentionedUserChildText(BaseModel): + text: str + + id: Optional[str] = None + + marks: Optional[List[Literal["bold", "italic", "underline", "strikethrough", "code", "math"]]] = None + + type: Optional[Literal["text"]] = None + + +class DocumentTaskCommentMentionedUserChildToolCall(BaseModel): + """A tool/function call made by the assistant.""" + + tool_call_id: str + + tool_name: str + + id: Optional[str] = None + + args: Optional[Dict[str, object]] = None + + type: Optional[Literal["tool_call"]] = None + + +class DocumentTaskCommentMentionedUserChildToolResult(BaseModel): + """The result of a tool call.""" + + output: Union[str, Dict[str, object], List[object]] + + tool_call_id: str + + tool_name: str + + id: Optional[str] = None + + is_error: Optional[bool] = None + + type: Optional[Literal["tool_result"]] = None + + +class DocumentTaskCommentMentionedUserChildTraceMessage(BaseModel): + """A message in an agent trace (user message, assistant message, or thinking).""" + + text: str + + id: Optional[str] = None + + message_type: Optional[Literal["message", "thinking"]] = None + + role: Optional[Literal["user", "assistant"]] = None + + timestamp: Optional[datetime] = None + + type: Optional[Literal["trace_message"]] = None + + +DocumentTaskCommentMentionedUserChild: TypeAlias = Union[ + DocumentTaskCommentMentionedUserChildBlob, + DocumentTaskCommentMentionedUserChildCode, + DocumentTaskCommentMentionedUserChildComment, + DocumentTaskCommentMentionedUserChildDivider, + DocumentTaskCommentMentionedUserChildImage, + DocumentTaskCommentMentionedUserChildLink, + DocumentTaskCommentMentionedUserChildLineBreak, + DocumentTaskCommentMentionedUserChildText, + DocumentTaskCommentMentionedUserChildToolCall, + DocumentTaskCommentMentionedUserChildToolResult, + DocumentTaskCommentMentionedUserChildTraceMessage, + object, +] + + +class DocumentTaskCommentMentionedUser(BaseModel): + id: Optional[str] = None + + address: Optional[str] = None + + alt_names: Optional[List[str]] = None + + children: Optional[List[DocumentTaskCommentMentionedUserChild]] = None + + company: Optional[str] = None + + company_ids: Optional[List[str]] = None + + date_of_birth: Optional[date] = None + + deal_ids: Optional[List[str]] = None + + email: Optional[str] = None + + emails: Optional[List[str]] = None + """All known email addresses; `email` holds the primary one""" + + image_url: Optional[str] = None + + job_title: Optional[str] = None + + link_urls: Optional[List[str]] = None + + name: Optional[str] = None + + phone_numbers: Optional[List[str]] = None + + tags: Optional[List[str]] = None + + text: Optional[str] = None + + type: Optional[Literal["person"]] = None + + username: Optional[str] = None + + +class DocumentTaskComment(BaseModel): + date: datetime + + sender: DocumentTaskCommentSender + + id: Optional[str] = None + + channel: Optional[str] = None + """ + The channel or platform where the message was posted, if this Message is not + explicitly part of a conversation + """ + + children: Optional[List[DocumentTaskCommentChild]] = None + + external_id: Optional[str] = None + """Provider message id (e.g. Slack ts, Gmail message id) — merge-dedup key""" + + is_self: Optional[bool] = None + + mentioned_users: Optional[List[DocumentTaskCommentMentionedUser]] = None + + num_replies: Optional[int] = None + + replies: Optional[List[object]] = None + """The replies or comments to the message""" + + text: Optional[str] = None + + thread_id: Optional[str] = None + + title: Optional[str] = None + """The subject or title of the message""" + + type: Optional[Literal["message"]] = None + + updated_at: Optional[datetime] = None + + upvotes: Optional[int] = None + """The number of upvotes, likes, or reactions on the message""" + + +class DocumentTask(BaseModel): + id: Optional[str] = None + + children: Optional[List[DocumentTaskChild]] = None + + comments: Optional[List[DocumentTaskComment]] = None + + due_at: Optional[datetime] = None + + priority: Optional[Literal["urgent", "high", "medium", "low"]] = None + + status: Optional[Literal["completed", "not_started", "in_progress", "cancelled"]] = None + + text: Optional[str] = None + + type: Optional[Literal["task"]] = None + + +class DocumentPersonChildBlob(BaseModel): + """Represents embedded binary data using data URI scheme. + + Format: data:[][;base64], + Example: data:text/html;base64,PGh0bWw+... + """ + + data: str + + mimetype: str + + id: Optional[str] = None + + type: Optional[Literal["blob"]] = None + + +class DocumentPersonChildCode(BaseModel): + text: str + + id: Optional[str] = None + + language: Optional[str] = None + + type: Optional[Literal["code"]] = None + + +class DocumentPersonChildComment(BaseModel): + text: str + + id: Optional[str] = None + + created_at: Optional[datetime] = None + + type: Optional[Literal["comment"]] = None + + +class DocumentPersonChildDivider(BaseModel): + id: Optional[str] = None + + type: Optional[Literal["divider"]] = None + + +class DocumentPersonChildImage(BaseModel): + src: str + + text: str + + id: Optional[str] = None + + type: Optional[Literal["image"]] = None + + +class DocumentPersonChildLink(BaseModel): + text: str + + url: str + + id: Optional[str] = None + + type: Optional[Literal["link"]] = None + + +class DocumentPersonChildLineBreak(BaseModel): + id: Optional[str] = None + + type: Optional[Literal["line_break"]] = None + + +class DocumentPersonChildText(BaseModel): + text: str + + id: Optional[str] = None + + marks: Optional[List[Literal["bold", "italic", "underline", "strikethrough", "code", "math"]]] = None + + type: Optional[Literal["text"]] = None + + +class DocumentPersonChildToolCall(BaseModel): + """A tool/function call made by the assistant.""" + + tool_call_id: str + + tool_name: str + + id: Optional[str] = None + + args: Optional[Dict[str, object]] = None + + type: Optional[Literal["tool_call"]] = None + + +class DocumentPersonChildToolResult(BaseModel): + """The result of a tool call.""" + + output: Union[str, Dict[str, object], List[object]] + + tool_call_id: str + + tool_name: str + + id: Optional[str] = None + + is_error: Optional[bool] = None + + type: Optional[Literal["tool_result"]] = None + + +class DocumentPersonChildTraceMessage(BaseModel): + """A message in an agent trace (user message, assistant message, or thinking).""" + + text: str + + id: Optional[str] = None + + message_type: Optional[Literal["message", "thinking"]] = None + + role: Optional[Literal["user", "assistant"]] = None + + timestamp: Optional[datetime] = None + + type: Optional[Literal["trace_message"]] = None + + +DocumentPersonChild: TypeAlias = Union[ + DocumentPersonChildBlob, + DocumentPersonChildCode, + DocumentPersonChildComment, + DocumentPersonChildDivider, + DocumentPersonChildImage, + DocumentPersonChildLink, + DocumentPersonChildLineBreak, + DocumentPersonChildText, + DocumentPersonChildToolCall, + DocumentPersonChildToolResult, + DocumentPersonChildTraceMessage, + object, +] + + +class DocumentPerson(BaseModel): + id: Optional[str] = None + + address: Optional[str] = None + + alt_names: Optional[List[str]] = None + + children: Optional[List[DocumentPersonChild]] = None + + company: Optional[str] = None + + company_ids: Optional[List[str]] = None + + date_of_birth: Optional[date] = None + + deal_ids: Optional[List[str]] = None + + email: Optional[str] = None + + emails: Optional[List[str]] = None + """All known email addresses; `email` holds the primary one""" + + image_url: Optional[str] = None + + job_title: Optional[str] = None + + link_urls: Optional[List[str]] = None + + name: Optional[str] = None + + phone_numbers: Optional[List[str]] = None + + tags: Optional[List[str]] = None + + text: Optional[str] = None + + type: Optional[Literal["person"]] = None + + username: Optional[str] = None + + +class DocumentMessageSenderChildBlob(BaseModel): + """Represents embedded binary data using data URI scheme. + + Format: data:[][;base64], + Example: data:text/html;base64,PGh0bWw+... + """ + + data: str + + mimetype: str + + id: Optional[str] = None + + type: Optional[Literal["blob"]] = None + + +class DocumentMessageSenderChildCode(BaseModel): + text: str + + id: Optional[str] = None + + language: Optional[str] = None + + type: Optional[Literal["code"]] = None + + +class DocumentMessageSenderChildComment(BaseModel): + text: str + + id: Optional[str] = None + + created_at: Optional[datetime] = None + + type: Optional[Literal["comment"]] = None + + +class DocumentMessageSenderChildDivider(BaseModel): + id: Optional[str] = None + + type: Optional[Literal["divider"]] = None + + +class DocumentMessageSenderChildImage(BaseModel): + src: str + + text: str + + id: Optional[str] = None + + type: Optional[Literal["image"]] = None + + +class DocumentMessageSenderChildLink(BaseModel): + text: str + + url: str + + id: Optional[str] = None + + type: Optional[Literal["link"]] = None + + +class DocumentMessageSenderChildLineBreak(BaseModel): + id: Optional[str] = None + + type: Optional[Literal["line_break"]] = None + + +class DocumentMessageSenderChildText(BaseModel): + text: str + + id: Optional[str] = None + + marks: Optional[List[Literal["bold", "italic", "underline", "strikethrough", "code", "math"]]] = None + + type: Optional[Literal["text"]] = None + + +class DocumentMessageSenderChildToolCall(BaseModel): + """A tool/function call made by the assistant.""" + + tool_call_id: str + + tool_name: str + + id: Optional[str] = None + + args: Optional[Dict[str, object]] = None + + type: Optional[Literal["tool_call"]] = None + + +class DocumentMessageSenderChildToolResult(BaseModel): + """The result of a tool call.""" + + output: Union[str, Dict[str, object], List[object]] + + tool_call_id: str + + tool_name: str + + id: Optional[str] = None + + is_error: Optional[bool] = None + + type: Optional[Literal["tool_result"]] = None + + +class DocumentMessageSenderChildTraceMessage(BaseModel): + """A message in an agent trace (user message, assistant message, or thinking).""" + + text: str + + id: Optional[str] = None + + message_type: Optional[Literal["message", "thinking"]] = None + + role: Optional[Literal["user", "assistant"]] = None + + timestamp: Optional[datetime] = None + + type: Optional[Literal["trace_message"]] = None + + +DocumentMessageSenderChild: TypeAlias = Union[ + DocumentMessageSenderChildBlob, + DocumentMessageSenderChildCode, + DocumentMessageSenderChildComment, + DocumentMessageSenderChildDivider, + DocumentMessageSenderChildImage, + DocumentMessageSenderChildLink, + DocumentMessageSenderChildLineBreak, + DocumentMessageSenderChildText, + DocumentMessageSenderChildToolCall, + DocumentMessageSenderChildToolResult, + DocumentMessageSenderChildTraceMessage, + object, +] + + +class DocumentMessageSender(BaseModel): + id: Optional[str] = None + + address: Optional[str] = None + + alt_names: Optional[List[str]] = None + + children: Optional[List[DocumentMessageSenderChild]] = None + + company: Optional[str] = None + + company_ids: Optional[List[str]] = None + + date_of_birth: Optional[date] = None + + deal_ids: Optional[List[str]] = None + + email: Optional[str] = None + + emails: Optional[List[str]] = None + """All known email addresses; `email` holds the primary one""" + + image_url: Optional[str] = None + + job_title: Optional[str] = None + + link_urls: Optional[List[str]] = None + + name: Optional[str] = None + + phone_numbers: Optional[List[str]] = None + + tags: Optional[List[str]] = None + + text: Optional[str] = None + + type: Optional[Literal["person"]] = None + + username: Optional[str] = None + + +class DocumentMessageChildBlob(BaseModel): + """Represents embedded binary data using data URI scheme. + + Format: data:[][;base64], + Example: data:text/html;base64,PGh0bWw+... + """ + + data: str + + mimetype: str + + id: Optional[str] = None + + type: Optional[Literal["blob"]] = None + + +class DocumentMessageChildCalloutChildBlob(BaseModel): + """Represents embedded binary data using data URI scheme. + + Format: data:[][;base64], + Example: data:text/html;base64,PGh0bWw+... + """ + + data: str + + mimetype: str + + id: Optional[str] = None + + type: Optional[Literal["blob"]] = None + + +class DocumentMessageChildCalloutChildCode(BaseModel): + text: str + + id: Optional[str] = None + + language: Optional[str] = None + + type: Optional[Literal["code"]] = None + + +class DocumentMessageChildCalloutChildComment(BaseModel): + text: str + + id: Optional[str] = None + + created_at: Optional[datetime] = None + + type: Optional[Literal["comment"]] = None + + +class DocumentMessageChildCalloutChildDivider(BaseModel): + id: Optional[str] = None + + type: Optional[Literal["divider"]] = None + + +class DocumentMessageChildCalloutChildImage(BaseModel): + src: str + + text: str + + id: Optional[str] = None + + type: Optional[Literal["image"]] = None + + +class DocumentMessageChildCalloutChildLink(BaseModel): + text: str + + url: str + + id: Optional[str] = None + + type: Optional[Literal["link"]] = None + + +class DocumentMessageChildCalloutChildLineBreak(BaseModel): + id: Optional[str] = None + + type: Optional[Literal["line_break"]] = None + + +class DocumentMessageChildCalloutChildText(BaseModel): + text: str + + id: Optional[str] = None + + marks: Optional[List[Literal["bold", "italic", "underline", "strikethrough", "code", "math"]]] = None + + type: Optional[Literal["text"]] = None + + +class DocumentMessageChildCalloutChildToolCall(BaseModel): + """A tool/function call made by the assistant.""" + + tool_call_id: str + + tool_name: str + + id: Optional[str] = None + + args: Optional[Dict[str, object]] = None + + type: Optional[Literal["tool_call"]] = None + + +class DocumentMessageChildCalloutChildToolResult(BaseModel): + """The result of a tool call.""" + + output: Union[str, Dict[str, object], List[object]] + + tool_call_id: str + + tool_name: str + + id: Optional[str] = None + + is_error: Optional[bool] = None + + type: Optional[Literal["tool_result"]] = None + + +class DocumentMessageChildCalloutChildTraceMessage(BaseModel): + """A message in an agent trace (user message, assistant message, or thinking).""" + + text: str + + id: Optional[str] = None + + message_type: Optional[Literal["message", "thinking"]] = None + + role: Optional[Literal["user", "assistant"]] = None + + timestamp: Optional[datetime] = None + + type: Optional[Literal["trace_message"]] = None + + +DocumentMessageChildCalloutChild: TypeAlias = Union[ + DocumentMessageChildCalloutChildBlob, + DocumentMessageChildCalloutChildCode, + DocumentMessageChildCalloutChildComment, + DocumentMessageChildCalloutChildDivider, + DocumentMessageChildCalloutChildImage, + DocumentMessageChildCalloutChildLink, + DocumentMessageChildCalloutChildLineBreak, + DocumentMessageChildCalloutChildText, + DocumentMessageChildCalloutChildToolCall, + DocumentMessageChildCalloutChildToolResult, + DocumentMessageChildCalloutChildTraceMessage, + object, +] + + +class DocumentMessageChildCallout(BaseModel): + id: Optional[str] = None + + children: Optional[List[DocumentMessageChildCalloutChild]] = None + + text: Optional[str] = None + + title: Optional[str] = None + + type: Optional[Literal["callout"]] = None + + +class DocumentMessageChildChunkChildBlob(BaseModel): + """Represents embedded binary data using data URI scheme. + + Format: data:[][;base64], + Example: data:text/html;base64,PGh0bWw+... + """ + + data: str + + mimetype: str + + id: Optional[str] = None + + type: Optional[Literal["blob"]] = None + + +class DocumentMessageChildChunkChildCode(BaseModel): + text: str + + id: Optional[str] = None + + language: Optional[str] = None + + type: Optional[Literal["code"]] = None + + +class DocumentMessageChildChunkChildComment(BaseModel): + text: str + + id: Optional[str] = None + + created_at: Optional[datetime] = None + + type: Optional[Literal["comment"]] = None + + +class DocumentMessageChildChunkChildDivider(BaseModel): + id: Optional[str] = None + + type: Optional[Literal["divider"]] = None + + +class DocumentMessageChildChunkChildImage(BaseModel): + src: str + + text: str + + id: Optional[str] = None + + type: Optional[Literal["image"]] = None + + +class DocumentMessageChildChunkChildLink(BaseModel): + text: str + + url: str + + id: Optional[str] = None + + type: Optional[Literal["link"]] = None + + +class DocumentMessageChildChunkChildLineBreak(BaseModel): + id: Optional[str] = None + + type: Optional[Literal["line_break"]] = None + + +class DocumentMessageChildChunkChildText(BaseModel): + text: str + + id: Optional[str] = None + + marks: Optional[List[Literal["bold", "italic", "underline", "strikethrough", "code", "math"]]] = None + + type: Optional[Literal["text"]] = None + + +class DocumentMessageChildChunkChildToolCall(BaseModel): + """A tool/function call made by the assistant.""" + + tool_call_id: str + + tool_name: str + + id: Optional[str] = None + + args: Optional[Dict[str, object]] = None + + type: Optional[Literal["tool_call"]] = None + + +class DocumentMessageChildChunkChildToolResult(BaseModel): + """The result of a tool call.""" + + output: Union[str, Dict[str, object], List[object]] + + tool_call_id: str + + tool_name: str + + id: Optional[str] = None + + is_error: Optional[bool] = None + + type: Optional[Literal["tool_result"]] = None + + +class DocumentMessageChildChunkChildTraceMessage(BaseModel): + """A message in an agent trace (user message, assistant message, or thinking).""" + + text: str + + id: Optional[str] = None + + message_type: Optional[Literal["message", "thinking"]] = None + + role: Optional[Literal["user", "assistant"]] = None + + timestamp: Optional[datetime] = None + + type: Optional[Literal["trace_message"]] = None + + +DocumentMessageChildChunkChild: TypeAlias = Union[ + DocumentMessageChildChunkChildBlob, + DocumentMessageChildChunkChildCode, + DocumentMessageChildChunkChildComment, + DocumentMessageChildChunkChildDivider, + DocumentMessageChildChunkChildImage, + DocumentMessageChildChunkChildLink, + DocumentMessageChildChunkChildLineBreak, + DocumentMessageChildChunkChildText, + DocumentMessageChildChunkChildToolCall, + DocumentMessageChildChunkChildToolResult, + DocumentMessageChildChunkChildTraceMessage, + object, +] + + +class DocumentMessageChildChunk(BaseModel): + id: Optional[str] = None + + children: Optional[List[DocumentMessageChildChunkChild]] = None + + text: Optional[str] = None + + type: Optional[Literal["chunk"]] = None + + +class DocumentMessageChildCode(BaseModel): + text: str + + id: Optional[str] = None + + language: Optional[str] = None + + type: Optional[Literal["code"]] = None + + +class DocumentMessageChildComment(BaseModel): + text: str + + id: Optional[str] = None + + created_at: Optional[datetime] = None + + type: Optional[Literal["comment"]] = None + + +class DocumentMessageChildDivider(BaseModel): + id: Optional[str] = None + + type: Optional[Literal["divider"]] = None + + +class DocumentMessageChildEquationChildBlob(BaseModel): + """Represents embedded binary data using data URI scheme. + + Format: data:[][;base64], + Example: data:text/html;base64,PGh0bWw+... + """ + + data: str + + mimetype: str + + id: Optional[str] = None + + type: Optional[Literal["blob"]] = None + + +class DocumentMessageChildEquationChildCode(BaseModel): + text: str + + id: Optional[str] = None + + language: Optional[str] = None + + type: Optional[Literal["code"]] = None + + +class DocumentMessageChildEquationChildComment(BaseModel): + text: str + + id: Optional[str] = None + + created_at: Optional[datetime] = None + + type: Optional[Literal["comment"]] = None + + +class DocumentMessageChildEquationChildDivider(BaseModel): + id: Optional[str] = None + + type: Optional[Literal["divider"]] = None + + +class DocumentMessageChildEquationChildImage(BaseModel): + src: str + + text: str + + id: Optional[str] = None + + type: Optional[Literal["image"]] = None + + +class DocumentMessageChildEquationChildLink(BaseModel): + text: str + + url: str + + id: Optional[str] = None + + type: Optional[Literal["link"]] = None + + +class DocumentMessageChildEquationChildLineBreak(BaseModel): + id: Optional[str] = None + + type: Optional[Literal["line_break"]] = None + + +class DocumentMessageChildEquationChildText(BaseModel): + text: str + + id: Optional[str] = None + + marks: Optional[List[Literal["bold", "italic", "underline", "strikethrough", "code", "math"]]] = None + + type: Optional[Literal["text"]] = None + + +class DocumentMessageChildEquationChildToolCall(BaseModel): + """A tool/function call made by the assistant.""" + + tool_call_id: str + + tool_name: str + + id: Optional[str] = None + + args: Optional[Dict[str, object]] = None + + type: Optional[Literal["tool_call"]] = None + + +class DocumentMessageChildEquationChildToolResult(BaseModel): + """The result of a tool call.""" + + output: Union[str, Dict[str, object], List[object]] + + tool_call_id: str + + tool_name: str + + id: Optional[str] = None + + is_error: Optional[bool] = None + + type: Optional[Literal["tool_result"]] = None + + +class DocumentMessageChildEquationChildTraceMessage(BaseModel): + """A message in an agent trace (user message, assistant message, or thinking).""" + + text: str + + id: Optional[str] = None + + message_type: Optional[Literal["message", "thinking"]] = None + + role: Optional[Literal["user", "assistant"]] = None + + timestamp: Optional[datetime] = None + + type: Optional[Literal["trace_message"]] = None + + +DocumentMessageChildEquationChild: TypeAlias = Union[ + DocumentMessageChildEquationChildBlob, + DocumentMessageChildEquationChildCode, + DocumentMessageChildEquationChildComment, + DocumentMessageChildEquationChildDivider, + DocumentMessageChildEquationChildImage, + DocumentMessageChildEquationChildLink, + DocumentMessageChildEquationChildLineBreak, + DocumentMessageChildEquationChildText, + DocumentMessageChildEquationChildToolCall, + DocumentMessageChildEquationChildToolResult, + DocumentMessageChildEquationChildTraceMessage, + object, +] + + +class DocumentMessageChildEquation(BaseModel): + id: Optional[str] = None + + children: Optional[List[DocumentMessageChildEquationChild]] = None + + text: Optional[str] = None + + type: Optional[Literal["equation"]] = None + + +class DocumentMessageChildFootnoteChildBlob(BaseModel): + """Represents embedded binary data using data URI scheme. + + Format: data:[][;base64], + Example: data:text/html;base64,PGh0bWw+... + """ + + data: str + + mimetype: str + + id: Optional[str] = None + + type: Optional[Literal["blob"]] = None + + +class DocumentMessageChildFootnoteChildCode(BaseModel): + text: str + + id: Optional[str] = None + + language: Optional[str] = None + + type: Optional[Literal["code"]] = None + + +class DocumentMessageChildFootnoteChildComment(BaseModel): + text: str + + id: Optional[str] = None + + created_at: Optional[datetime] = None + + type: Optional[Literal["comment"]] = None + + +class DocumentMessageChildFootnoteChildDivider(BaseModel): + id: Optional[str] = None + + type: Optional[Literal["divider"]] = None + + +class DocumentMessageChildFootnoteChildImage(BaseModel): + src: str + + text: str + + id: Optional[str] = None + + type: Optional[Literal["image"]] = None + + +class DocumentMessageChildFootnoteChildLink(BaseModel): + text: str + + url: str + + id: Optional[str] = None + + type: Optional[Literal["link"]] = None + + +class DocumentMessageChildFootnoteChildLineBreak(BaseModel): + id: Optional[str] = None + + type: Optional[Literal["line_break"]] = None + + +class DocumentMessageChildFootnoteChildText(BaseModel): + text: str + + id: Optional[str] = None + + marks: Optional[List[Literal["bold", "italic", "underline", "strikethrough", "code", "math"]]] = None + + type: Optional[Literal["text"]] = None + + +class DocumentMessageChildFootnoteChildToolCall(BaseModel): + """A tool/function call made by the assistant.""" + + tool_call_id: str + + tool_name: str + + id: Optional[str] = None + + args: Optional[Dict[str, object]] = None + + type: Optional[Literal["tool_call"]] = None + + +class DocumentMessageChildFootnoteChildToolResult(BaseModel): + """The result of a tool call.""" + + output: Union[str, Dict[str, object], List[object]] + + tool_call_id: str + + tool_name: str + + id: Optional[str] = None + + is_error: Optional[bool] = None + + type: Optional[Literal["tool_result"]] = None + + +class DocumentMessageChildFootnoteChildTraceMessage(BaseModel): + """A message in an agent trace (user message, assistant message, or thinking).""" + + text: str + + id: Optional[str] = None + + message_type: Optional[Literal["message", "thinking"]] = None + + role: Optional[Literal["user", "assistant"]] = None + + timestamp: Optional[datetime] = None + + type: Optional[Literal["trace_message"]] = None + + +DocumentMessageChildFootnoteChild: TypeAlias = Union[ + DocumentMessageChildFootnoteChildBlob, + DocumentMessageChildFootnoteChildCode, + DocumentMessageChildFootnoteChildComment, + DocumentMessageChildFootnoteChildDivider, + DocumentMessageChildFootnoteChildImage, + DocumentMessageChildFootnoteChildLink, + DocumentMessageChildFootnoteChildLineBreak, + DocumentMessageChildFootnoteChildText, + DocumentMessageChildFootnoteChildToolCall, + DocumentMessageChildFootnoteChildToolResult, + DocumentMessageChildFootnoteChildTraceMessage, + object, +] + + +class DocumentMessageChildFootnote(BaseModel): + id: Optional[str] = None + + children: Optional[List[DocumentMessageChildFootnoteChild]] = None + + text: Optional[str] = None + + type: Optional[Literal["footnote"]] = None + + +class DocumentMessageChildHeadingChildBlob(BaseModel): + """Represents embedded binary data using data URI scheme. + + Format: data:[][;base64], + Example: data:text/html;base64,PGh0bWw+... + """ + + data: str + + mimetype: str + + id: Optional[str] = None + + type: Optional[Literal["blob"]] = None + + +class DocumentMessageChildHeadingChildCode(BaseModel): + text: str + + id: Optional[str] = None + + language: Optional[str] = None + + type: Optional[Literal["code"]] = None + + +class DocumentMessageChildHeadingChildComment(BaseModel): + text: str + + id: Optional[str] = None + + created_at: Optional[datetime] = None + + type: Optional[Literal["comment"]] = None + + +class DocumentMessageChildHeadingChildDivider(BaseModel): + id: Optional[str] = None + + type: Optional[Literal["divider"]] = None + + +class DocumentMessageChildHeadingChildImage(BaseModel): + src: str + + text: str + + id: Optional[str] = None + + type: Optional[Literal["image"]] = None + + +class DocumentMessageChildHeadingChildLink(BaseModel): + text: str + + url: str + + id: Optional[str] = None + + type: Optional[Literal["link"]] = None + + +class DocumentMessageChildHeadingChildLineBreak(BaseModel): + id: Optional[str] = None + + type: Optional[Literal["line_break"]] = None + + +class DocumentMessageChildHeadingChildText(BaseModel): + text: str + + id: Optional[str] = None + + marks: Optional[List[Literal["bold", "italic", "underline", "strikethrough", "code", "math"]]] = None + + type: Optional[Literal["text"]] = None + + +class DocumentMessageChildHeadingChildToolCall(BaseModel): + """A tool/function call made by the assistant.""" + + tool_call_id: str + + tool_name: str + + id: Optional[str] = None + + args: Optional[Dict[str, object]] = None + + type: Optional[Literal["tool_call"]] = None + + +class DocumentMessageChildHeadingChildToolResult(BaseModel): + """The result of a tool call.""" + + output: Union[str, Dict[str, object], List[object]] + + tool_call_id: str + + tool_name: str + + id: Optional[str] = None + + is_error: Optional[bool] = None + + type: Optional[Literal["tool_result"]] = None + + +class DocumentMessageChildHeadingChildTraceMessage(BaseModel): + """A message in an agent trace (user message, assistant message, or thinking).""" + + text: str + + id: Optional[str] = None + + message_type: Optional[Literal["message", "thinking"]] = None + + role: Optional[Literal["user", "assistant"]] = None + + timestamp: Optional[datetime] = None + + type: Optional[Literal["trace_message"]] = None + + +DocumentMessageChildHeadingChild: TypeAlias = Union[ + DocumentMessageChildHeadingChildBlob, + DocumentMessageChildHeadingChildCode, + DocumentMessageChildHeadingChildComment, + DocumentMessageChildHeadingChildDivider, + DocumentMessageChildHeadingChildImage, + DocumentMessageChildHeadingChildLink, + DocumentMessageChildHeadingChildLineBreak, + DocumentMessageChildHeadingChildText, + DocumentMessageChildHeadingChildToolCall, + DocumentMessageChildHeadingChildToolResult, + DocumentMessageChildHeadingChildTraceMessage, + object, +] + + +class DocumentMessageChildHeading(BaseModel): + level: int + + id: Optional[str] = None + + children: Optional[List[DocumentMessageChildHeadingChild]] = None + + text: Optional[str] = None + + type: Optional[Literal["heading"]] = None + + +class DocumentMessageChildImage(BaseModel): + src: str + + text: str + + id: Optional[str] = None + + type: Optional[Literal["image"]] = None + + +class DocumentMessageChildLink(BaseModel): + text: str + + url: str + + id: Optional[str] = None + + type: Optional[Literal["link"]] = None + + +class DocumentMessageChildLineBreak(BaseModel): + id: Optional[str] = None + + type: Optional[Literal["line_break"]] = None + + +class DocumentMessageChildList(BaseModel): + id: Optional[str] = None + + children: Optional[List[object]] = None + + ordered: Optional[bool] = None + + text: Optional[str] = None + + type: Optional[Literal["list"]] = None + + +class DocumentMessageChildListItemChildBlob(BaseModel): + """Represents embedded binary data using data URI scheme. + + Format: data:[][;base64], + Example: data:text/html;base64,PGh0bWw+... + """ + + data: str + + mimetype: str + + id: Optional[str] = None + + type: Optional[Literal["blob"]] = None + + +class DocumentMessageChildListItemChildCode(BaseModel): + text: str + + id: Optional[str] = None + + language: Optional[str] = None + + type: Optional[Literal["code"]] = None + + +class DocumentMessageChildListItemChildComment(BaseModel): + text: str + + id: Optional[str] = None + + created_at: Optional[datetime] = None + + type: Optional[Literal["comment"]] = None + + +class DocumentMessageChildListItemChildDivider(BaseModel): + id: Optional[str] = None + + type: Optional[Literal["divider"]] = None + + +class DocumentMessageChildListItemChildImage(BaseModel): + src: str + + text: str + + id: Optional[str] = None + + type: Optional[Literal["image"]] = None + + +class DocumentMessageChildListItemChildLink(BaseModel): + text: str + + url: str + + id: Optional[str] = None + + type: Optional[Literal["link"]] = None + + +class DocumentMessageChildListItemChildLineBreak(BaseModel): + id: Optional[str] = None + + type: Optional[Literal["line_break"]] = None + + +class DocumentMessageChildListItemChildText(BaseModel): + text: str + + id: Optional[str] = None + + marks: Optional[List[Literal["bold", "italic", "underline", "strikethrough", "code", "math"]]] = None + + type: Optional[Literal["text"]] = None + + +class DocumentMessageChildListItemChildToolCall(BaseModel): + """A tool/function call made by the assistant.""" + + tool_call_id: str + + tool_name: str + + id: Optional[str] = None + + args: Optional[Dict[str, object]] = None + + type: Optional[Literal["tool_call"]] = None + + +class DocumentMessageChildListItemChildToolResult(BaseModel): + """The result of a tool call.""" + + output: Union[str, Dict[str, object], List[object]] + + tool_call_id: str + + tool_name: str + + id: Optional[str] = None + + is_error: Optional[bool] = None + + type: Optional[Literal["tool_result"]] = None + + +class DocumentMessageChildListItemChildTraceMessage(BaseModel): + """A message in an agent trace (user message, assistant message, or thinking).""" + + text: str + + id: Optional[str] = None + + message_type: Optional[Literal["message", "thinking"]] = None + + role: Optional[Literal["user", "assistant"]] = None + + timestamp: Optional[datetime] = None + + type: Optional[Literal["trace_message"]] = None + + +DocumentMessageChildListItemChild: TypeAlias = Union[ + DocumentMessageChildListItemChildBlob, + DocumentMessageChildListItemChildCode, + DocumentMessageChildListItemChildComment, + DocumentMessageChildListItemChildDivider, + DocumentMessageChildListItemChildImage, + DocumentMessageChildListItemChildLink, + DocumentMessageChildListItemChildLineBreak, + DocumentMessageChildListItemChildText, + DocumentMessageChildListItemChildToolCall, + DocumentMessageChildListItemChildToolResult, + DocumentMessageChildListItemChildTraceMessage, + object, +] + + +class DocumentMessageChildListItem(BaseModel): + id: Optional[str] = None + + children: Optional[List[DocumentMessageChildListItemChild]] = None + + text: Optional[str] = None + + type: Optional[Literal["list_item"]] = None + + +class DocumentMessageChildParagraphChildBlob(BaseModel): + """Represents embedded binary data using data URI scheme. + + Format: data:[][;base64], + Example: data:text/html;base64,PGh0bWw+... + """ + + data: str + + mimetype: str + + id: Optional[str] = None + + type: Optional[Literal["blob"]] = None + + +class DocumentMessageChildParagraphChildCode(BaseModel): + text: str + + id: Optional[str] = None + + language: Optional[str] = None + + type: Optional[Literal["code"]] = None + + +class DocumentMessageChildParagraphChildComment(BaseModel): + text: str + + id: Optional[str] = None + + created_at: Optional[datetime] = None + + type: Optional[Literal["comment"]] = None + + +class DocumentMessageChildParagraphChildDivider(BaseModel): + id: Optional[str] = None + + type: Optional[Literal["divider"]] = None + + +class DocumentMessageChildParagraphChildImage(BaseModel): + src: str + + text: str + + id: Optional[str] = None + + type: Optional[Literal["image"]] = None + + +class DocumentMessageChildParagraphChildLink(BaseModel): + text: str + + url: str + + id: Optional[str] = None + + type: Optional[Literal["link"]] = None + + +class DocumentMessageChildParagraphChildLineBreak(BaseModel): + id: Optional[str] = None + + type: Optional[Literal["line_break"]] = None + + +class DocumentMessageChildParagraphChildText(BaseModel): + text: str + + id: Optional[str] = None + + marks: Optional[List[Literal["bold", "italic", "underline", "strikethrough", "code", "math"]]] = None + + type: Optional[Literal["text"]] = None + + +class DocumentMessageChildParagraphChildToolCall(BaseModel): + """A tool/function call made by the assistant.""" + + tool_call_id: str + + tool_name: str + + id: Optional[str] = None + + args: Optional[Dict[str, object]] = None + + type: Optional[Literal["tool_call"]] = None + + +class DocumentMessageChildParagraphChildToolResult(BaseModel): + """The result of a tool call.""" + + output: Union[str, Dict[str, object], List[object]] + + tool_call_id: str + + tool_name: str + + id: Optional[str] = None + + is_error: Optional[bool] = None + + type: Optional[Literal["tool_result"]] = None + + +class DocumentMessageChildParagraphChildTraceMessage(BaseModel): + """A message in an agent trace (user message, assistant message, or thinking).""" + + text: str + + id: Optional[str] = None + + message_type: Optional[Literal["message", "thinking"]] = None + + role: Optional[Literal["user", "assistant"]] = None + + timestamp: Optional[datetime] = None + + type: Optional[Literal["trace_message"]] = None + + +DocumentMessageChildParagraphChild: TypeAlias = Union[ + DocumentMessageChildParagraphChildBlob, + DocumentMessageChildParagraphChildCode, + DocumentMessageChildParagraphChildComment, + DocumentMessageChildParagraphChildDivider, + DocumentMessageChildParagraphChildImage, + DocumentMessageChildParagraphChildLink, + DocumentMessageChildParagraphChildLineBreak, + DocumentMessageChildParagraphChildText, + DocumentMessageChildParagraphChildToolCall, + DocumentMessageChildParagraphChildToolResult, + DocumentMessageChildParagraphChildTraceMessage, + object, +] + + +class DocumentMessageChildParagraph(BaseModel): + id: Optional[str] = None + + children: Optional[List[DocumentMessageChildParagraphChild]] = None + + text: Optional[str] = None + + type: Optional[Literal["paragraph"]] = None + + +class DocumentMessageChildQuoteChildBlob(BaseModel): + """Represents embedded binary data using data URI scheme. + + Format: data:[][;base64], + Example: data:text/html;base64,PGh0bWw+... + """ + + data: str + + mimetype: str + + id: Optional[str] = None + + type: Optional[Literal["blob"]] = None + + +class DocumentMessageChildQuoteChildCode(BaseModel): + text: str + + id: Optional[str] = None + + language: Optional[str] = None + + type: Optional[Literal["code"]] = None + + +class DocumentMessageChildQuoteChildComment(BaseModel): + text: str + + id: Optional[str] = None + + created_at: Optional[datetime] = None + + type: Optional[Literal["comment"]] = None + + +class DocumentMessageChildQuoteChildDivider(BaseModel): + id: Optional[str] = None + + type: Optional[Literal["divider"]] = None + + +class DocumentMessageChildQuoteChildImage(BaseModel): + src: str + + text: str + + id: Optional[str] = None + + type: Optional[Literal["image"]] = None + + +class DocumentMessageChildQuoteChildLink(BaseModel): + text: str + + url: str + + id: Optional[str] = None + + type: Optional[Literal["link"]] = None + + +class DocumentMessageChildQuoteChildLineBreak(BaseModel): + id: Optional[str] = None + + type: Optional[Literal["line_break"]] = None + + +class DocumentMessageChildQuoteChildText(BaseModel): + text: str + + id: Optional[str] = None + + marks: Optional[List[Literal["bold", "italic", "underline", "strikethrough", "code", "math"]]] = None + + type: Optional[Literal["text"]] = None + + +class DocumentMessageChildQuoteChildToolCall(BaseModel): + """A tool/function call made by the assistant.""" + + tool_call_id: str + + tool_name: str + + id: Optional[str] = None + + args: Optional[Dict[str, object]] = None + + type: Optional[Literal["tool_call"]] = None + + +class DocumentMessageChildQuoteChildToolResult(BaseModel): + """The result of a tool call.""" + + output: Union[str, Dict[str, object], List[object]] + + tool_call_id: str + + tool_name: str + + id: Optional[str] = None + + is_error: Optional[bool] = None + + type: Optional[Literal["tool_result"]] = None + + +class DocumentMessageChildQuoteChildTraceMessage(BaseModel): + """A message in an agent trace (user message, assistant message, or thinking).""" + + text: str + + id: Optional[str] = None + + message_type: Optional[Literal["message", "thinking"]] = None + + role: Optional[Literal["user", "assistant"]] = None + + timestamp: Optional[datetime] = None + + type: Optional[Literal["trace_message"]] = None + + +DocumentMessageChildQuoteChild: TypeAlias = Union[ + DocumentMessageChildQuoteChildBlob, + DocumentMessageChildQuoteChildCode, + DocumentMessageChildQuoteChildComment, + DocumentMessageChildQuoteChildDivider, + DocumentMessageChildQuoteChildImage, + DocumentMessageChildQuoteChildLink, + DocumentMessageChildQuoteChildLineBreak, + DocumentMessageChildQuoteChildText, + DocumentMessageChildQuoteChildToolCall, + DocumentMessageChildQuoteChildToolResult, + DocumentMessageChildQuoteChildTraceMessage, + object, +] + + +class DocumentMessageChildQuote(BaseModel): + id: Optional[str] = None + + children: Optional[List[DocumentMessageChildQuoteChild]] = None + + text: Optional[str] = None + + type: Optional[Literal["quote"]] = None + + +class DocumentMessageChildTable(BaseModel): + id: Optional[str] = None + + children: Optional[List[object]] = None + + has_header: Optional[bool] = None + """Whether the first row should be treated as a header""" + + text: Optional[str] = None + + type: Optional[Literal["table"]] = None + + +class DocumentMessageChildTableCellChildBlob(BaseModel): + """Represents embedded binary data using data URI scheme. + + Format: data:[][;base64], + Example: data:text/html;base64,PGh0bWw+... + """ + + data: str + + mimetype: str + + id: Optional[str] = None + + type: Optional[Literal["blob"]] = None + + +class DocumentMessageChildTableCellChildCode(BaseModel): + text: str + + id: Optional[str] = None + + language: Optional[str] = None + + type: Optional[Literal["code"]] = None + + +class DocumentMessageChildTableCellChildComment(BaseModel): + text: str + + id: Optional[str] = None + + created_at: Optional[datetime] = None + + type: Optional[Literal["comment"]] = None + + +class DocumentMessageChildTableCellChildDivider(BaseModel): + id: Optional[str] = None + + type: Optional[Literal["divider"]] = None + + +class DocumentMessageChildTableCellChildImage(BaseModel): + src: str + + text: str + + id: Optional[str] = None + + type: Optional[Literal["image"]] = None + + +class DocumentMessageChildTableCellChildLink(BaseModel): + text: str + + url: str + + id: Optional[str] = None + + type: Optional[Literal["link"]] = None + + +class DocumentMessageChildTableCellChildLineBreak(BaseModel): + id: Optional[str] = None + + type: Optional[Literal["line_break"]] = None + + +class DocumentMessageChildTableCellChildText(BaseModel): + text: str + + id: Optional[str] = None + + marks: Optional[List[Literal["bold", "italic", "underline", "strikethrough", "code", "math"]]] = None + + type: Optional[Literal["text"]] = None + + +class DocumentMessageChildTableCellChildToolCall(BaseModel): + """A tool/function call made by the assistant.""" + + tool_call_id: str + + tool_name: str + + id: Optional[str] = None + + args: Optional[Dict[str, object]] = None + + type: Optional[Literal["tool_call"]] = None + + +class DocumentMessageChildTableCellChildToolResult(BaseModel): + """The result of a tool call.""" + + output: Union[str, Dict[str, object], List[object]] + + tool_call_id: str + + tool_name: str + + id: Optional[str] = None + + is_error: Optional[bool] = None + + type: Optional[Literal["tool_result"]] = None + + +class DocumentMessageChildTableCellChildTraceMessage(BaseModel): + """A message in an agent trace (user message, assistant message, or thinking).""" + + text: str + + id: Optional[str] = None + + message_type: Optional[Literal["message", "thinking"]] = None + + role: Optional[Literal["user", "assistant"]] = None + + timestamp: Optional[datetime] = None + + type: Optional[Literal["trace_message"]] = None + + +DocumentMessageChildTableCellChild: TypeAlias = Union[ + DocumentMessageChildTableCellChildBlob, + DocumentMessageChildTableCellChildCode, + DocumentMessageChildTableCellChildComment, + DocumentMessageChildTableCellChildDivider, + DocumentMessageChildTableCellChildImage, + DocumentMessageChildTableCellChildLink, + DocumentMessageChildTableCellChildLineBreak, + DocumentMessageChildTableCellChildText, + DocumentMessageChildTableCellChildToolCall, + DocumentMessageChildTableCellChildToolResult, + DocumentMessageChildTableCellChildTraceMessage, + object, +] + + +class DocumentMessageChildTableCell(BaseModel): + id: Optional[str] = None + + align: Optional[Literal["left", "center", "right"]] = None + + children: Optional[List[DocumentMessageChildTableCellChild]] = None + + text: Optional[str] = None + + type: Optional[Literal["table_cell"]] = None + + +class DocumentMessageChildTableRow(BaseModel): + id: Optional[str] = None + + children: Optional[List[object]] = None + + text: Optional[str] = None + + type: Optional[Literal["table_row"]] = None + + +class DocumentMessageChildText(BaseModel): + text: str + + id: Optional[str] = None + + marks: Optional[List[Literal["bold", "italic", "underline", "strikethrough", "code", "math"]]] = None + + type: Optional[Literal["text"]] = None + + +class DocumentMessageChildToDoChildBlob(BaseModel): + """Represents embedded binary data using data URI scheme. + + Format: data:[][;base64], + Example: data:text/html;base64,PGh0bWw+... + """ + + data: str + + mimetype: str + + id: Optional[str] = None + + type: Optional[Literal["blob"]] = None + + +class DocumentMessageChildToDoChildCode(BaseModel): + text: str + + id: Optional[str] = None + + language: Optional[str] = None + + type: Optional[Literal["code"]] = None + + +class DocumentMessageChildToDoChildComment(BaseModel): + text: str + + id: Optional[str] = None + + created_at: Optional[datetime] = None + + type: Optional[Literal["comment"]] = None + + +class DocumentMessageChildToDoChildDivider(BaseModel): + id: Optional[str] = None + + type: Optional[Literal["divider"]] = None + + +class DocumentMessageChildToDoChildImage(BaseModel): + src: str + + text: str + + id: Optional[str] = None + + type: Optional[Literal["image"]] = None + + +class DocumentMessageChildToDoChildLink(BaseModel): + text: str + + url: str + + id: Optional[str] = None + + type: Optional[Literal["link"]] = None + + +class DocumentMessageChildToDoChildLineBreak(BaseModel): + id: Optional[str] = None + + type: Optional[Literal["line_break"]] = None + + +class DocumentMessageChildToDoChildText(BaseModel): + text: str + + id: Optional[str] = None + + marks: Optional[List[Literal["bold", "italic", "underline", "strikethrough", "code", "math"]]] = None + + type: Optional[Literal["text"]] = None + + +class DocumentMessageChildToDoChildToolCall(BaseModel): + """A tool/function call made by the assistant.""" + + tool_call_id: str + + tool_name: str + + id: Optional[str] = None + + args: Optional[Dict[str, object]] = None + + type: Optional[Literal["tool_call"]] = None + + +class DocumentMessageChildToDoChildToolResult(BaseModel): + """The result of a tool call.""" + + output: Union[str, Dict[str, object], List[object]] + + tool_call_id: str + + tool_name: str + + id: Optional[str] = None + + is_error: Optional[bool] = None + + type: Optional[Literal["tool_result"]] = None + + +class DocumentMessageChildToDoChildTraceMessage(BaseModel): + """A message in an agent trace (user message, assistant message, or thinking).""" + + text: str + + id: Optional[str] = None + + message_type: Optional[Literal["message", "thinking"]] = None + + role: Optional[Literal["user", "assistant"]] = None + + timestamp: Optional[datetime] = None + + type: Optional[Literal["trace_message"]] = None + + +DocumentMessageChildToDoChild: TypeAlias = Union[ + DocumentMessageChildToDoChildBlob, + DocumentMessageChildToDoChildCode, + DocumentMessageChildToDoChildComment, + DocumentMessageChildToDoChildDivider, + DocumentMessageChildToDoChildImage, + DocumentMessageChildToDoChildLink, + DocumentMessageChildToDoChildLineBreak, + DocumentMessageChildToDoChildText, + DocumentMessageChildToDoChildToolCall, + DocumentMessageChildToDoChildToolResult, + DocumentMessageChildToDoChildTraceMessage, + object, +] + + +class DocumentMessageChildToDo(BaseModel): + id: Optional[str] = None + + checked: Optional[bool] = None + + children: Optional[List[DocumentMessageChildToDoChild]] = None + + text: Optional[str] = None + + type: Optional[Literal["todo"]] = None + + +class DocumentMessageChildToolCall(BaseModel): + """A tool/function call made by the assistant.""" + + tool_call_id: str + + tool_name: str + + id: Optional[str] = None + + args: Optional[Dict[str, object]] = None + + type: Optional[Literal["tool_call"]] = None + + +class DocumentMessageChildToolResult(BaseModel): + """The result of a tool call.""" + + output: Union[str, Dict[str, object], List[object]] + + tool_call_id: str + + tool_name: str + + id: Optional[str] = None + + is_error: Optional[bool] = None + + type: Optional[Literal["tool_result"]] = None + + +class DocumentMessageChildTraceMessage(BaseModel): + """A message in an agent trace (user message, assistant message, or thinking).""" + + text: str + + id: Optional[str] = None + + message_type: Optional[Literal["message", "thinking"]] = None + + role: Optional[Literal["user", "assistant"]] = None + + timestamp: Optional[datetime] = None + + type: Optional[Literal["trace_message"]] = None + + +class DocumentMessageChildUtterance(BaseModel): + """A speaker-attributed segment of a transcript (ENG-2476/D10). + + "Utterance" is the standard name for this across transcription providers + (AssemblyAI, Deepgram, Rev). Timestamps are relative offsets in seconds — + provider-native; absolute times derive from `Transcript.started_at`. + """ + + text: str + + id: Optional[str] = None + + end: Optional[float] = None + + speaker: Optional[object] = None + + start: Optional[float] = None + + type: Optional[Literal["utterance"]] = None + + +DocumentMessageChild: TypeAlias = Annotated[ + Union[ + DocumentMessageChildBlob, + DocumentMessageChildCallout, + DocumentMessageChildChunk, + DocumentMessageChildCode, + DocumentMessageChildComment, + DocumentMessageChildDivider, + DocumentMessageChildEquation, + DocumentMessageChildFootnote, + DocumentMessageChildHeading, + DocumentMessageChildImage, + DocumentMessageChildLink, + DocumentMessageChildLineBreak, + DocumentMessageChildList, + DocumentMessageChildListItem, + DocumentMessageChildParagraph, + DocumentMessageChildQuote, + DocumentMessageChildTable, + DocumentMessageChildTableCell, + DocumentMessageChildTableRow, + DocumentMessageChildText, + DocumentMessageChildToDo, + DocumentMessageChildToolCall, + DocumentMessageChildToolResult, + DocumentMessageChildTraceMessage, + DocumentMessageChildUtterance, + ], + PropertyInfo(discriminator="type"), +] + + +class DocumentMessageMentionedUserChildBlob(BaseModel): + """Represents embedded binary data using data URI scheme. + + Format: data:[][;base64], + Example: data:text/html;base64,PGh0bWw+... + """ + + data: str + + mimetype: str + + id: Optional[str] = None + + type: Optional[Literal["blob"]] = None + + +class DocumentMessageMentionedUserChildCode(BaseModel): + text: str + + id: Optional[str] = None + + language: Optional[str] = None + + type: Optional[Literal["code"]] = None + + +class DocumentMessageMentionedUserChildComment(BaseModel): + text: str + + id: Optional[str] = None + + created_at: Optional[datetime] = None + + type: Optional[Literal["comment"]] = None + + +class DocumentMessageMentionedUserChildDivider(BaseModel): + id: Optional[str] = None + + type: Optional[Literal["divider"]] = None + + +class DocumentMessageMentionedUserChildImage(BaseModel): + src: str + + text: str + + id: Optional[str] = None + + type: Optional[Literal["image"]] = None + + +class DocumentMessageMentionedUserChildLink(BaseModel): + text: str + + url: str + + id: Optional[str] = None + + type: Optional[Literal["link"]] = None + + +class DocumentMessageMentionedUserChildLineBreak(BaseModel): + id: Optional[str] = None + + type: Optional[Literal["line_break"]] = None + + +class DocumentMessageMentionedUserChildText(BaseModel): + text: str + + id: Optional[str] = None + + marks: Optional[List[Literal["bold", "italic", "underline", "strikethrough", "code", "math"]]] = None + + type: Optional[Literal["text"]] = None + + +class DocumentMessageMentionedUserChildToolCall(BaseModel): + """A tool/function call made by the assistant.""" + + tool_call_id: str + + tool_name: str + + id: Optional[str] = None + + args: Optional[Dict[str, object]] = None + + type: Optional[Literal["tool_call"]] = None + + +class DocumentMessageMentionedUserChildToolResult(BaseModel): + """The result of a tool call.""" + + output: Union[str, Dict[str, object], List[object]] + + tool_call_id: str + + tool_name: str + + id: Optional[str] = None + + is_error: Optional[bool] = None + + type: Optional[Literal["tool_result"]] = None + + +class DocumentMessageMentionedUserChildTraceMessage(BaseModel): + """A message in an agent trace (user message, assistant message, or thinking).""" + + text: str + + id: Optional[str] = None + + message_type: Optional[Literal["message", "thinking"]] = None + + role: Optional[Literal["user", "assistant"]] = None + + timestamp: Optional[datetime] = None + + type: Optional[Literal["trace_message"]] = None + + +DocumentMessageMentionedUserChild: TypeAlias = Union[ + DocumentMessageMentionedUserChildBlob, + DocumentMessageMentionedUserChildCode, + DocumentMessageMentionedUserChildComment, + DocumentMessageMentionedUserChildDivider, + DocumentMessageMentionedUserChildImage, + DocumentMessageMentionedUserChildLink, + DocumentMessageMentionedUserChildLineBreak, + DocumentMessageMentionedUserChildText, + DocumentMessageMentionedUserChildToolCall, + DocumentMessageMentionedUserChildToolResult, + DocumentMessageMentionedUserChildTraceMessage, + object, +] + + +class DocumentMessageMentionedUser(BaseModel): + id: Optional[str] = None + + address: Optional[str] = None + + alt_names: Optional[List[str]] = None + + children: Optional[List[DocumentMessageMentionedUserChild]] = None + + company: Optional[str] = None + + company_ids: Optional[List[str]] = None + + date_of_birth: Optional[date] = None + + deal_ids: Optional[List[str]] = None + + email: Optional[str] = None + + emails: Optional[List[str]] = None + """All known email addresses; `email` holds the primary one""" + + image_url: Optional[str] = None + + job_title: Optional[str] = None + + link_urls: Optional[List[str]] = None + + name: Optional[str] = None + + phone_numbers: Optional[List[str]] = None + + tags: Optional[List[str]] = None + + text: Optional[str] = None + + type: Optional[Literal["person"]] = None + + username: Optional[str] = None + + +class DocumentMessage(BaseModel): + date: datetime + + sender: DocumentMessageSender + + id: Optional[str] = None + + channel: Optional[str] = None + """ + The channel or platform where the message was posted, if this Message is not + explicitly part of a conversation + """ + + children: Optional[List[DocumentMessageChild]] = None + + external_id: Optional[str] = None + """Provider message id (e.g. Slack ts, Gmail message id) — merge-dedup key""" + + is_self: Optional[bool] = None + + mentioned_users: Optional[List[DocumentMessageMentionedUser]] = None + + num_replies: Optional[int] = None + + replies: Optional[List[object]] = None + """The replies or comments to the message""" + + text: Optional[str] = None + + thread_id: Optional[str] = None + + title: Optional[str] = None + """The subject or title of the message""" + + type: Optional[Literal["message"]] = None + + updated_at: Optional[datetime] = None + + upvotes: Optional[int] = None + """The number of upvotes, likes, or reactions on the message""" + + +class DocumentEventAttendeeChildBlob(BaseModel): + """Represents embedded binary data using data URI scheme. + + Format: data:[][;base64], + Example: data:text/html;base64,PGh0bWw+... + """ + + data: str + + mimetype: str + + id: Optional[str] = None + + type: Optional[Literal["blob"]] = None + + +class DocumentEventAttendeeChildCode(BaseModel): + text: str + + id: Optional[str] = None + + language: Optional[str] = None + + type: Optional[Literal["code"]] = None + + +class DocumentEventAttendeeChildComment(BaseModel): + text: str + + id: Optional[str] = None + + created_at: Optional[datetime] = None + + type: Optional[Literal["comment"]] = None + + +class DocumentEventAttendeeChildDivider(BaseModel): + id: Optional[str] = None + + type: Optional[Literal["divider"]] = None + + +class DocumentEventAttendeeChildImage(BaseModel): + src: str + + text: str + + id: Optional[str] = None + + type: Optional[Literal["image"]] = None + + +class DocumentEventAttendeeChildLink(BaseModel): + text: str + + url: str + + id: Optional[str] = None + + type: Optional[Literal["link"]] = None + + +class DocumentEventAttendeeChildLineBreak(BaseModel): + id: Optional[str] = None + + type: Optional[Literal["line_break"]] = None + + +class DocumentEventAttendeeChildText(BaseModel): + text: str + + id: Optional[str] = None + + marks: Optional[List[Literal["bold", "italic", "underline", "strikethrough", "code", "math"]]] = None + + type: Optional[Literal["text"]] = None + + +class DocumentEventAttendeeChildToolCall(BaseModel): + """A tool/function call made by the assistant.""" + + tool_call_id: str + + tool_name: str + + id: Optional[str] = None + + args: Optional[Dict[str, object]] = None + + type: Optional[Literal["tool_call"]] = None + + +class DocumentEventAttendeeChildToolResult(BaseModel): + """The result of a tool call.""" + + output: Union[str, Dict[str, object], List[object]] + + tool_call_id: str + + tool_name: str + + id: Optional[str] = None + + is_error: Optional[bool] = None + + type: Optional[Literal["tool_result"]] = None + + +class DocumentEventAttendeeChildTraceMessage(BaseModel): + """A message in an agent trace (user message, assistant message, or thinking).""" + + text: str + + id: Optional[str] = None + + message_type: Optional[Literal["message", "thinking"]] = None + + role: Optional[Literal["user", "assistant"]] = None + + timestamp: Optional[datetime] = None + + type: Optional[Literal["trace_message"]] = None + + +DocumentEventAttendeeChild: TypeAlias = Union[ + DocumentEventAttendeeChildBlob, + DocumentEventAttendeeChildCode, + DocumentEventAttendeeChildComment, + DocumentEventAttendeeChildDivider, + DocumentEventAttendeeChildImage, + DocumentEventAttendeeChildLink, + DocumentEventAttendeeChildLineBreak, + DocumentEventAttendeeChildText, + DocumentEventAttendeeChildToolCall, + DocumentEventAttendeeChildToolResult, + DocumentEventAttendeeChildTraceMessage, + object, +] + + +class DocumentEventAttendee(BaseModel): + id: Optional[str] = None + + address: Optional[str] = None + + alt_names: Optional[List[str]] = None + + children: Optional[List[DocumentEventAttendeeChild]] = None + + company: Optional[str] = None + + company_ids: Optional[List[str]] = None + + date_of_birth: Optional[date] = None + + deal_ids: Optional[List[str]] = None + + email: Optional[str] = None + + emails: Optional[List[str]] = None + """All known email addresses; `email` holds the primary one""" + + image_url: Optional[str] = None + + job_title: Optional[str] = None + + link_urls: Optional[List[str]] = None + + name: Optional[str] = None + + phone_numbers: Optional[List[str]] = None + + tags: Optional[List[str]] = None + + text: Optional[str] = None + + type: Optional[Literal["person"]] = None + + username: Optional[str] = None + + +class DocumentEventChildBlob(BaseModel): + """Represents embedded binary data using data URI scheme. + + Format: data:[][;base64], + Example: data:text/html;base64,PGh0bWw+... + """ + + data: str + + mimetype: str + + id: Optional[str] = None + + type: Optional[Literal["blob"]] = None + + +class DocumentEventChildCalloutChildBlob(BaseModel): + """Represents embedded binary data using data URI scheme. + + Format: data:[][;base64], + Example: data:text/html;base64,PGh0bWw+... + """ + + data: str + + mimetype: str + + id: Optional[str] = None + + type: Optional[Literal["blob"]] = None + + +class DocumentEventChildCalloutChildCode(BaseModel): + text: str + + id: Optional[str] = None + + language: Optional[str] = None + + type: Optional[Literal["code"]] = None + + +class DocumentEventChildCalloutChildComment(BaseModel): + text: str + + id: Optional[str] = None + + created_at: Optional[datetime] = None + + type: Optional[Literal["comment"]] = None + + +class DocumentEventChildCalloutChildDivider(BaseModel): + id: Optional[str] = None + + type: Optional[Literal["divider"]] = None + + +class DocumentEventChildCalloutChildImage(BaseModel): + src: str + + text: str + + id: Optional[str] = None + + type: Optional[Literal["image"]] = None + + +class DocumentEventChildCalloutChildLink(BaseModel): + text: str + + url: str + + id: Optional[str] = None + + type: Optional[Literal["link"]] = None + + +class DocumentEventChildCalloutChildLineBreak(BaseModel): + id: Optional[str] = None + + type: Optional[Literal["line_break"]] = None + + +class DocumentEventChildCalloutChildText(BaseModel): + text: str + + id: Optional[str] = None + + marks: Optional[List[Literal["bold", "italic", "underline", "strikethrough", "code", "math"]]] = None + + type: Optional[Literal["text"]] = None + + +class DocumentEventChildCalloutChildToolCall(BaseModel): + """A tool/function call made by the assistant.""" + + tool_call_id: str + + tool_name: str + + id: Optional[str] = None + + args: Optional[Dict[str, object]] = None + + type: Optional[Literal["tool_call"]] = None + + +class DocumentEventChildCalloutChildToolResult(BaseModel): + """The result of a tool call.""" + + output: Union[str, Dict[str, object], List[object]] + + tool_call_id: str + + tool_name: str + + id: Optional[str] = None + + is_error: Optional[bool] = None + + type: Optional[Literal["tool_result"]] = None + + +class DocumentEventChildCalloutChildTraceMessage(BaseModel): + """A message in an agent trace (user message, assistant message, or thinking).""" + + text: str + + id: Optional[str] = None + + message_type: Optional[Literal["message", "thinking"]] = None + + role: Optional[Literal["user", "assistant"]] = None + + timestamp: Optional[datetime] = None + + type: Optional[Literal["trace_message"]] = None + + +DocumentEventChildCalloutChild: TypeAlias = Union[ + DocumentEventChildCalloutChildBlob, + DocumentEventChildCalloutChildCode, + DocumentEventChildCalloutChildComment, + DocumentEventChildCalloutChildDivider, + DocumentEventChildCalloutChildImage, + DocumentEventChildCalloutChildLink, + DocumentEventChildCalloutChildLineBreak, + DocumentEventChildCalloutChildText, + DocumentEventChildCalloutChildToolCall, + DocumentEventChildCalloutChildToolResult, + DocumentEventChildCalloutChildTraceMessage, + object, +] + + +class DocumentEventChildCallout(BaseModel): + id: Optional[str] = None + + children: Optional[List[DocumentEventChildCalloutChild]] = None + + text: Optional[str] = None + + title: Optional[str] = None + + type: Optional[Literal["callout"]] = None + + +class DocumentEventChildChunkChildBlob(BaseModel): + """Represents embedded binary data using data URI scheme. + + Format: data:[][;base64], + Example: data:text/html;base64,PGh0bWw+... + """ + + data: str + + mimetype: str + + id: Optional[str] = None + + type: Optional[Literal["blob"]] = None + + +class DocumentEventChildChunkChildCode(BaseModel): + text: str + + id: Optional[str] = None + + language: Optional[str] = None + + type: Optional[Literal["code"]] = None + + +class DocumentEventChildChunkChildComment(BaseModel): + text: str + + id: Optional[str] = None + + created_at: Optional[datetime] = None + + type: Optional[Literal["comment"]] = None + + +class DocumentEventChildChunkChildDivider(BaseModel): + id: Optional[str] = None + + type: Optional[Literal["divider"]] = None + + +class DocumentEventChildChunkChildImage(BaseModel): + src: str + + text: str + + id: Optional[str] = None + + type: Optional[Literal["image"]] = None + + +class DocumentEventChildChunkChildLink(BaseModel): + text: str + + url: str + + id: Optional[str] = None + + type: Optional[Literal["link"]] = None + + +class DocumentEventChildChunkChildLineBreak(BaseModel): + id: Optional[str] = None + + type: Optional[Literal["line_break"]] = None + + +class DocumentEventChildChunkChildText(BaseModel): + text: str + + id: Optional[str] = None + + marks: Optional[List[Literal["bold", "italic", "underline", "strikethrough", "code", "math"]]] = None + + type: Optional[Literal["text"]] = None + + +class DocumentEventChildChunkChildToolCall(BaseModel): + """A tool/function call made by the assistant.""" + + tool_call_id: str + + tool_name: str + + id: Optional[str] = None + + args: Optional[Dict[str, object]] = None + + type: Optional[Literal["tool_call"]] = None + + +class DocumentEventChildChunkChildToolResult(BaseModel): + """The result of a tool call.""" + + output: Union[str, Dict[str, object], List[object]] + + tool_call_id: str + + tool_name: str + + id: Optional[str] = None + + is_error: Optional[bool] = None + + type: Optional[Literal["tool_result"]] = None + + +class DocumentEventChildChunkChildTraceMessage(BaseModel): + """A message in an agent trace (user message, assistant message, or thinking).""" + + text: str + + id: Optional[str] = None + + message_type: Optional[Literal["message", "thinking"]] = None + + role: Optional[Literal["user", "assistant"]] = None + + timestamp: Optional[datetime] = None + + type: Optional[Literal["trace_message"]] = None + + +DocumentEventChildChunkChild: TypeAlias = Union[ + DocumentEventChildChunkChildBlob, + DocumentEventChildChunkChildCode, + DocumentEventChildChunkChildComment, + DocumentEventChildChunkChildDivider, + DocumentEventChildChunkChildImage, + DocumentEventChildChunkChildLink, + DocumentEventChildChunkChildLineBreak, + DocumentEventChildChunkChildText, + DocumentEventChildChunkChildToolCall, + DocumentEventChildChunkChildToolResult, + DocumentEventChildChunkChildTraceMessage, + object, +] + + +class DocumentEventChildChunk(BaseModel): + id: Optional[str] = None + + children: Optional[List[DocumentEventChildChunkChild]] = None + + text: Optional[str] = None + + type: Optional[Literal["chunk"]] = None + + +class DocumentEventChildCode(BaseModel): + text: str + + id: Optional[str] = None + + language: Optional[str] = None + + type: Optional[Literal["code"]] = None + + +class DocumentEventChildComment(BaseModel): + text: str + + id: Optional[str] = None + + created_at: Optional[datetime] = None + + type: Optional[Literal["comment"]] = None + + +class DocumentEventChildDivider(BaseModel): + id: Optional[str] = None + + type: Optional[Literal["divider"]] = None + + +class DocumentEventChildEquationChildBlob(BaseModel): + """Represents embedded binary data using data URI scheme. + + Format: data:[][;base64], + Example: data:text/html;base64,PGh0bWw+... + """ + + data: str + + mimetype: str + + id: Optional[str] = None + + type: Optional[Literal["blob"]] = None + + +class DocumentEventChildEquationChildCode(BaseModel): + text: str + + id: Optional[str] = None + + language: Optional[str] = None + + type: Optional[Literal["code"]] = None + + +class DocumentEventChildEquationChildComment(BaseModel): + text: str + + id: Optional[str] = None + + created_at: Optional[datetime] = None + + type: Optional[Literal["comment"]] = None + + +class DocumentEventChildEquationChildDivider(BaseModel): + id: Optional[str] = None + + type: Optional[Literal["divider"]] = None + + +class DocumentEventChildEquationChildImage(BaseModel): + src: str + + text: str + + id: Optional[str] = None + + type: Optional[Literal["image"]] = None + + +class DocumentEventChildEquationChildLink(BaseModel): + text: str + + url: str + + id: Optional[str] = None + + type: Optional[Literal["link"]] = None + + +class DocumentEventChildEquationChildLineBreak(BaseModel): + id: Optional[str] = None + + type: Optional[Literal["line_break"]] = None + + +class DocumentEventChildEquationChildText(BaseModel): + text: str + + id: Optional[str] = None + + marks: Optional[List[Literal["bold", "italic", "underline", "strikethrough", "code", "math"]]] = None + + type: Optional[Literal["text"]] = None + + +class DocumentEventChildEquationChildToolCall(BaseModel): + """A tool/function call made by the assistant.""" + + tool_call_id: str + + tool_name: str + + id: Optional[str] = None + + args: Optional[Dict[str, object]] = None + + type: Optional[Literal["tool_call"]] = None + + +class DocumentEventChildEquationChildToolResult(BaseModel): + """The result of a tool call.""" + + output: Union[str, Dict[str, object], List[object]] + + tool_call_id: str + + tool_name: str + + id: Optional[str] = None + + is_error: Optional[bool] = None + + type: Optional[Literal["tool_result"]] = None + + +class DocumentEventChildEquationChildTraceMessage(BaseModel): + """A message in an agent trace (user message, assistant message, or thinking).""" + + text: str + + id: Optional[str] = None + + message_type: Optional[Literal["message", "thinking"]] = None + + role: Optional[Literal["user", "assistant"]] = None + + timestamp: Optional[datetime] = None + + type: Optional[Literal["trace_message"]] = None + + +DocumentEventChildEquationChild: TypeAlias = Union[ + DocumentEventChildEquationChildBlob, + DocumentEventChildEquationChildCode, + DocumentEventChildEquationChildComment, + DocumentEventChildEquationChildDivider, + DocumentEventChildEquationChildImage, + DocumentEventChildEquationChildLink, + DocumentEventChildEquationChildLineBreak, + DocumentEventChildEquationChildText, + DocumentEventChildEquationChildToolCall, + DocumentEventChildEquationChildToolResult, + DocumentEventChildEquationChildTraceMessage, + object, +] + + +class DocumentEventChildEquation(BaseModel): + id: Optional[str] = None + + children: Optional[List[DocumentEventChildEquationChild]] = None + + text: Optional[str] = None + + type: Optional[Literal["equation"]] = None + + +class DocumentEventChildFootnoteChildBlob(BaseModel): + """Represents embedded binary data using data URI scheme. + + Format: data:[][;base64], + Example: data:text/html;base64,PGh0bWw+... + """ + + data: str + + mimetype: str + + id: Optional[str] = None + + type: Optional[Literal["blob"]] = None + + +class DocumentEventChildFootnoteChildCode(BaseModel): + text: str + + id: Optional[str] = None + + language: Optional[str] = None + + type: Optional[Literal["code"]] = None + + +class DocumentEventChildFootnoteChildComment(BaseModel): + text: str + + id: Optional[str] = None + + created_at: Optional[datetime] = None + + type: Optional[Literal["comment"]] = None + + +class DocumentEventChildFootnoteChildDivider(BaseModel): + id: Optional[str] = None + + type: Optional[Literal["divider"]] = None + + +class DocumentEventChildFootnoteChildImage(BaseModel): + src: str + + text: str + + id: Optional[str] = None + + type: Optional[Literal["image"]] = None + + +class DocumentEventChildFootnoteChildLink(BaseModel): + text: str + + url: str + + id: Optional[str] = None + + type: Optional[Literal["link"]] = None + + +class DocumentEventChildFootnoteChildLineBreak(BaseModel): + id: Optional[str] = None + + type: Optional[Literal["line_break"]] = None + + +class DocumentEventChildFootnoteChildText(BaseModel): + text: str + + id: Optional[str] = None + + marks: Optional[List[Literal["bold", "italic", "underline", "strikethrough", "code", "math"]]] = None + + type: Optional[Literal["text"]] = None + + +class DocumentEventChildFootnoteChildToolCall(BaseModel): + """A tool/function call made by the assistant.""" + + tool_call_id: str + + tool_name: str + + id: Optional[str] = None + + args: Optional[Dict[str, object]] = None + + type: Optional[Literal["tool_call"]] = None + + +class DocumentEventChildFootnoteChildToolResult(BaseModel): + """The result of a tool call.""" + + output: Union[str, Dict[str, object], List[object]] + + tool_call_id: str + + tool_name: str + + id: Optional[str] = None + + is_error: Optional[bool] = None + + type: Optional[Literal["tool_result"]] = None + + +class DocumentEventChildFootnoteChildTraceMessage(BaseModel): + """A message in an agent trace (user message, assistant message, or thinking).""" + + text: str + + id: Optional[str] = None + + message_type: Optional[Literal["message", "thinking"]] = None + + role: Optional[Literal["user", "assistant"]] = None + + timestamp: Optional[datetime] = None + + type: Optional[Literal["trace_message"]] = None + + +DocumentEventChildFootnoteChild: TypeAlias = Union[ + DocumentEventChildFootnoteChildBlob, + DocumentEventChildFootnoteChildCode, + DocumentEventChildFootnoteChildComment, + DocumentEventChildFootnoteChildDivider, + DocumentEventChildFootnoteChildImage, + DocumentEventChildFootnoteChildLink, + DocumentEventChildFootnoteChildLineBreak, + DocumentEventChildFootnoteChildText, + DocumentEventChildFootnoteChildToolCall, + DocumentEventChildFootnoteChildToolResult, + DocumentEventChildFootnoteChildTraceMessage, + object, +] + + +class DocumentEventChildFootnote(BaseModel): + id: Optional[str] = None + + children: Optional[List[DocumentEventChildFootnoteChild]] = None + + text: Optional[str] = None + + type: Optional[Literal["footnote"]] = None + + +class DocumentEventChildHeadingChildBlob(BaseModel): + """Represents embedded binary data using data URI scheme. + + Format: data:[][;base64], + Example: data:text/html;base64,PGh0bWw+... + """ + + data: str + + mimetype: str + + id: Optional[str] = None + + type: Optional[Literal["blob"]] = None + + +class DocumentEventChildHeadingChildCode(BaseModel): + text: str + + id: Optional[str] = None + + language: Optional[str] = None + + type: Optional[Literal["code"]] = None + + +class DocumentEventChildHeadingChildComment(BaseModel): + text: str + + id: Optional[str] = None + + created_at: Optional[datetime] = None + + type: Optional[Literal["comment"]] = None + + +class DocumentEventChildHeadingChildDivider(BaseModel): + id: Optional[str] = None + + type: Optional[Literal["divider"]] = None + + +class DocumentEventChildHeadingChildImage(BaseModel): + src: str + + text: str + + id: Optional[str] = None + + type: Optional[Literal["image"]] = None + + +class DocumentEventChildHeadingChildLink(BaseModel): + text: str + + url: str + + id: Optional[str] = None + + type: Optional[Literal["link"]] = None + + +class DocumentEventChildHeadingChildLineBreak(BaseModel): + id: Optional[str] = None + + type: Optional[Literal["line_break"]] = None + + +class DocumentEventChildHeadingChildText(BaseModel): + text: str + + id: Optional[str] = None + + marks: Optional[List[Literal["bold", "italic", "underline", "strikethrough", "code", "math"]]] = None + + type: Optional[Literal["text"]] = None + + +class DocumentEventChildHeadingChildToolCall(BaseModel): + """A tool/function call made by the assistant.""" + + tool_call_id: str + + tool_name: str + + id: Optional[str] = None + + args: Optional[Dict[str, object]] = None + + type: Optional[Literal["tool_call"]] = None + + +class DocumentEventChildHeadingChildToolResult(BaseModel): + """The result of a tool call.""" + + output: Union[str, Dict[str, object], List[object]] + + tool_call_id: str + + tool_name: str + + id: Optional[str] = None + + is_error: Optional[bool] = None + + type: Optional[Literal["tool_result"]] = None + + +class DocumentEventChildHeadingChildTraceMessage(BaseModel): + """A message in an agent trace (user message, assistant message, or thinking).""" + + text: str + + id: Optional[str] = None + + message_type: Optional[Literal["message", "thinking"]] = None + + role: Optional[Literal["user", "assistant"]] = None + + timestamp: Optional[datetime] = None + + type: Optional[Literal["trace_message"]] = None + + +DocumentEventChildHeadingChild: TypeAlias = Union[ + DocumentEventChildHeadingChildBlob, + DocumentEventChildHeadingChildCode, + DocumentEventChildHeadingChildComment, + DocumentEventChildHeadingChildDivider, + DocumentEventChildHeadingChildImage, + DocumentEventChildHeadingChildLink, + DocumentEventChildHeadingChildLineBreak, + DocumentEventChildHeadingChildText, + DocumentEventChildHeadingChildToolCall, + DocumentEventChildHeadingChildToolResult, + DocumentEventChildHeadingChildTraceMessage, + object, +] + + +class DocumentEventChildHeading(BaseModel): + level: int + + id: Optional[str] = None + + children: Optional[List[DocumentEventChildHeadingChild]] = None + + text: Optional[str] = None + + type: Optional[Literal["heading"]] = None + + +class DocumentEventChildImage(BaseModel): + src: str + + text: str + + id: Optional[str] = None + + type: Optional[Literal["image"]] = None + + +class DocumentEventChildLink(BaseModel): + text: str + + url: str + + id: Optional[str] = None + + type: Optional[Literal["link"]] = None + + +class DocumentEventChildLineBreak(BaseModel): + id: Optional[str] = None + + type: Optional[Literal["line_break"]] = None + + +class DocumentEventChildList(BaseModel): + id: Optional[str] = None + + children: Optional[List[object]] = None + + ordered: Optional[bool] = None + + text: Optional[str] = None + + type: Optional[Literal["list"]] = None + + +class DocumentEventChildListItemChildBlob(BaseModel): + """Represents embedded binary data using data URI scheme. + + Format: data:[][;base64], + Example: data:text/html;base64,PGh0bWw+... + """ + + data: str + + mimetype: str + + id: Optional[str] = None + + type: Optional[Literal["blob"]] = None + + +class DocumentEventChildListItemChildCode(BaseModel): + text: str + + id: Optional[str] = None + + language: Optional[str] = None + + type: Optional[Literal["code"]] = None + + +class DocumentEventChildListItemChildComment(BaseModel): + text: str + + id: Optional[str] = None + + created_at: Optional[datetime] = None + + type: Optional[Literal["comment"]] = None + + +class DocumentEventChildListItemChildDivider(BaseModel): + id: Optional[str] = None + + type: Optional[Literal["divider"]] = None + + +class DocumentEventChildListItemChildImage(BaseModel): + src: str + + text: str + + id: Optional[str] = None + + type: Optional[Literal["image"]] = None + + +class DocumentEventChildListItemChildLink(BaseModel): + text: str + + url: str + + id: Optional[str] = None + + type: Optional[Literal["link"]] = None + + +class DocumentEventChildListItemChildLineBreak(BaseModel): + id: Optional[str] = None + + type: Optional[Literal["line_break"]] = None + + +class DocumentEventChildListItemChildText(BaseModel): + text: str + + id: Optional[str] = None + + marks: Optional[List[Literal["bold", "italic", "underline", "strikethrough", "code", "math"]]] = None + + type: Optional[Literal["text"]] = None + + +class DocumentEventChildListItemChildToolCall(BaseModel): + """A tool/function call made by the assistant.""" + + tool_call_id: str + + tool_name: str + + id: Optional[str] = None + + args: Optional[Dict[str, object]] = None + + type: Optional[Literal["tool_call"]] = None + + +class DocumentEventChildListItemChildToolResult(BaseModel): + """The result of a tool call.""" + + output: Union[str, Dict[str, object], List[object]] + + tool_call_id: str + + tool_name: str + + id: Optional[str] = None + + is_error: Optional[bool] = None + + type: Optional[Literal["tool_result"]] = None + + +class DocumentEventChildListItemChildTraceMessage(BaseModel): + """A message in an agent trace (user message, assistant message, or thinking).""" + + text: str + + id: Optional[str] = None + + message_type: Optional[Literal["message", "thinking"]] = None + + role: Optional[Literal["user", "assistant"]] = None + + timestamp: Optional[datetime] = None + + type: Optional[Literal["trace_message"]] = None + + +DocumentEventChildListItemChild: TypeAlias = Union[ + DocumentEventChildListItemChildBlob, + DocumentEventChildListItemChildCode, + DocumentEventChildListItemChildComment, + DocumentEventChildListItemChildDivider, + DocumentEventChildListItemChildImage, + DocumentEventChildListItemChildLink, + DocumentEventChildListItemChildLineBreak, + DocumentEventChildListItemChildText, + DocumentEventChildListItemChildToolCall, + DocumentEventChildListItemChildToolResult, + DocumentEventChildListItemChildTraceMessage, + object, +] + + +class DocumentEventChildListItem(BaseModel): + id: Optional[str] = None + + children: Optional[List[DocumentEventChildListItemChild]] = None + + text: Optional[str] = None + + type: Optional[Literal["list_item"]] = None + + +class DocumentEventChildParagraphChildBlob(BaseModel): + """Represents embedded binary data using data URI scheme. + + Format: data:[][;base64], + Example: data:text/html;base64,PGh0bWw+... + """ + + data: str + + mimetype: str + + id: Optional[str] = None + + type: Optional[Literal["blob"]] = None + + +class DocumentEventChildParagraphChildCode(BaseModel): + text: str + + id: Optional[str] = None + + language: Optional[str] = None + + type: Optional[Literal["code"]] = None + + +class DocumentEventChildParagraphChildComment(BaseModel): + text: str + + id: Optional[str] = None + + created_at: Optional[datetime] = None + + type: Optional[Literal["comment"]] = None + + +class DocumentEventChildParagraphChildDivider(BaseModel): + id: Optional[str] = None + + type: Optional[Literal["divider"]] = None + + +class DocumentEventChildParagraphChildImage(BaseModel): + src: str + + text: str + + id: Optional[str] = None + + type: Optional[Literal["image"]] = None + + +class DocumentEventChildParagraphChildLink(BaseModel): + text: str + + url: str + + id: Optional[str] = None + + type: Optional[Literal["link"]] = None + + +class DocumentEventChildParagraphChildLineBreak(BaseModel): + id: Optional[str] = None + + type: Optional[Literal["line_break"]] = None + + +class DocumentEventChildParagraphChildText(BaseModel): + text: str + + id: Optional[str] = None + + marks: Optional[List[Literal["bold", "italic", "underline", "strikethrough", "code", "math"]]] = None + + type: Optional[Literal["text"]] = None + + +class DocumentEventChildParagraphChildToolCall(BaseModel): + """A tool/function call made by the assistant.""" + + tool_call_id: str + + tool_name: str + + id: Optional[str] = None + + args: Optional[Dict[str, object]] = None + + type: Optional[Literal["tool_call"]] = None + + +class DocumentEventChildParagraphChildToolResult(BaseModel): + """The result of a tool call.""" + + output: Union[str, Dict[str, object], List[object]] + + tool_call_id: str + + tool_name: str + + id: Optional[str] = None + + is_error: Optional[bool] = None + + type: Optional[Literal["tool_result"]] = None + + +class DocumentEventChildParagraphChildTraceMessage(BaseModel): + """A message in an agent trace (user message, assistant message, or thinking).""" + + text: str + + id: Optional[str] = None + + message_type: Optional[Literal["message", "thinking"]] = None + + role: Optional[Literal["user", "assistant"]] = None + + timestamp: Optional[datetime] = None + + type: Optional[Literal["trace_message"]] = None + + +DocumentEventChildParagraphChild: TypeAlias = Union[ + DocumentEventChildParagraphChildBlob, + DocumentEventChildParagraphChildCode, + DocumentEventChildParagraphChildComment, + DocumentEventChildParagraphChildDivider, + DocumentEventChildParagraphChildImage, + DocumentEventChildParagraphChildLink, + DocumentEventChildParagraphChildLineBreak, + DocumentEventChildParagraphChildText, + DocumentEventChildParagraphChildToolCall, + DocumentEventChildParagraphChildToolResult, + DocumentEventChildParagraphChildTraceMessage, + object, +] + + +class DocumentEventChildParagraph(BaseModel): + id: Optional[str] = None + + children: Optional[List[DocumentEventChildParagraphChild]] = None + + text: Optional[str] = None + + type: Optional[Literal["paragraph"]] = None + + +class DocumentEventChildQuoteChildBlob(BaseModel): + """Represents embedded binary data using data URI scheme. + + Format: data:[][;base64], + Example: data:text/html;base64,PGh0bWw+... + """ + + data: str + + mimetype: str + + id: Optional[str] = None + + type: Optional[Literal["blob"]] = None + + +class DocumentEventChildQuoteChildCode(BaseModel): + text: str + + id: Optional[str] = None + + language: Optional[str] = None + + type: Optional[Literal["code"]] = None + + +class DocumentEventChildQuoteChildComment(BaseModel): + text: str + + id: Optional[str] = None + + created_at: Optional[datetime] = None + + type: Optional[Literal["comment"]] = None + + +class DocumentEventChildQuoteChildDivider(BaseModel): + id: Optional[str] = None + + type: Optional[Literal["divider"]] = None + + +class DocumentEventChildQuoteChildImage(BaseModel): + src: str + + text: str + + id: Optional[str] = None + + type: Optional[Literal["image"]] = None + + +class DocumentEventChildQuoteChildLink(BaseModel): + text: str + + url: str + + id: Optional[str] = None + + type: Optional[Literal["link"]] = None + + +class DocumentEventChildQuoteChildLineBreak(BaseModel): + id: Optional[str] = None + + type: Optional[Literal["line_break"]] = None + + +class DocumentEventChildQuoteChildText(BaseModel): + text: str + + id: Optional[str] = None + + marks: Optional[List[Literal["bold", "italic", "underline", "strikethrough", "code", "math"]]] = None + + type: Optional[Literal["text"]] = None + + +class DocumentEventChildQuoteChildToolCall(BaseModel): + """A tool/function call made by the assistant.""" + + tool_call_id: str + + tool_name: str + + id: Optional[str] = None + + args: Optional[Dict[str, object]] = None + + type: Optional[Literal["tool_call"]] = None + + +class DocumentEventChildQuoteChildToolResult(BaseModel): + """The result of a tool call.""" + + output: Union[str, Dict[str, object], List[object]] + + tool_call_id: str + + tool_name: str + + id: Optional[str] = None + + is_error: Optional[bool] = None + + type: Optional[Literal["tool_result"]] = None + + +class DocumentEventChildQuoteChildTraceMessage(BaseModel): + """A message in an agent trace (user message, assistant message, or thinking).""" + + text: str + + id: Optional[str] = None + + message_type: Optional[Literal["message", "thinking"]] = None + + role: Optional[Literal["user", "assistant"]] = None + + timestamp: Optional[datetime] = None + + type: Optional[Literal["trace_message"]] = None + + +DocumentEventChildQuoteChild: TypeAlias = Union[ + DocumentEventChildQuoteChildBlob, + DocumentEventChildQuoteChildCode, + DocumentEventChildQuoteChildComment, + DocumentEventChildQuoteChildDivider, + DocumentEventChildQuoteChildImage, + DocumentEventChildQuoteChildLink, + DocumentEventChildQuoteChildLineBreak, + DocumentEventChildQuoteChildText, + DocumentEventChildQuoteChildToolCall, + DocumentEventChildQuoteChildToolResult, + DocumentEventChildQuoteChildTraceMessage, + object, +] + + +class DocumentEventChildQuote(BaseModel): + id: Optional[str] = None + + children: Optional[List[DocumentEventChildQuoteChild]] = None + + text: Optional[str] = None + + type: Optional[Literal["quote"]] = None + + +class DocumentEventChildTable(BaseModel): + id: Optional[str] = None + + children: Optional[List[object]] = None + + has_header: Optional[bool] = None + """Whether the first row should be treated as a header""" + + text: Optional[str] = None + + type: Optional[Literal["table"]] = None + + +class DocumentEventChildTableCellChildBlob(BaseModel): + """Represents embedded binary data using data URI scheme. + + Format: data:[][;base64], + Example: data:text/html;base64,PGh0bWw+... + """ + + data: str + + mimetype: str + + id: Optional[str] = None + + type: Optional[Literal["blob"]] = None + + +class DocumentEventChildTableCellChildCode(BaseModel): + text: str + + id: Optional[str] = None + + language: Optional[str] = None + + type: Optional[Literal["code"]] = None + + +class DocumentEventChildTableCellChildComment(BaseModel): + text: str + + id: Optional[str] = None + + created_at: Optional[datetime] = None + + type: Optional[Literal["comment"]] = None + + +class DocumentEventChildTableCellChildDivider(BaseModel): + id: Optional[str] = None + + type: Optional[Literal["divider"]] = None + + +class DocumentEventChildTableCellChildImage(BaseModel): + src: str + + text: str + + id: Optional[str] = None + + type: Optional[Literal["image"]] = None + + +class DocumentEventChildTableCellChildLink(BaseModel): + text: str + + url: str + + id: Optional[str] = None + + type: Optional[Literal["link"]] = None + + +class DocumentEventChildTableCellChildLineBreak(BaseModel): + id: Optional[str] = None + + type: Optional[Literal["line_break"]] = None + + +class DocumentEventChildTableCellChildText(BaseModel): + text: str + + id: Optional[str] = None + + marks: Optional[List[Literal["bold", "italic", "underline", "strikethrough", "code", "math"]]] = None + + type: Optional[Literal["text"]] = None + + +class DocumentEventChildTableCellChildToolCall(BaseModel): + """A tool/function call made by the assistant.""" + + tool_call_id: str + + tool_name: str + + id: Optional[str] = None + + args: Optional[Dict[str, object]] = None + + type: Optional[Literal["tool_call"]] = None + + +class DocumentEventChildTableCellChildToolResult(BaseModel): + """The result of a tool call.""" + + output: Union[str, Dict[str, object], List[object]] + + tool_call_id: str + + tool_name: str + + id: Optional[str] = None + + is_error: Optional[bool] = None + + type: Optional[Literal["tool_result"]] = None + + +class DocumentEventChildTableCellChildTraceMessage(BaseModel): + """A message in an agent trace (user message, assistant message, or thinking).""" + + text: str + + id: Optional[str] = None + + message_type: Optional[Literal["message", "thinking"]] = None + + role: Optional[Literal["user", "assistant"]] = None + + timestamp: Optional[datetime] = None + + type: Optional[Literal["trace_message"]] = None + + +DocumentEventChildTableCellChild: TypeAlias = Union[ + DocumentEventChildTableCellChildBlob, + DocumentEventChildTableCellChildCode, + DocumentEventChildTableCellChildComment, + DocumentEventChildTableCellChildDivider, + DocumentEventChildTableCellChildImage, + DocumentEventChildTableCellChildLink, + DocumentEventChildTableCellChildLineBreak, + DocumentEventChildTableCellChildText, + DocumentEventChildTableCellChildToolCall, + DocumentEventChildTableCellChildToolResult, + DocumentEventChildTableCellChildTraceMessage, + object, +] + + +class DocumentEventChildTableCell(BaseModel): + id: Optional[str] = None + + align: Optional[Literal["left", "center", "right"]] = None + + children: Optional[List[DocumentEventChildTableCellChild]] = None + + text: Optional[str] = None + + type: Optional[Literal["table_cell"]] = None + + +class DocumentEventChildTableRow(BaseModel): + id: Optional[str] = None + + children: Optional[List[object]] = None + + text: Optional[str] = None + + type: Optional[Literal["table_row"]] = None + + +class DocumentEventChildText(BaseModel): + text: str + + id: Optional[str] = None + + marks: Optional[List[Literal["bold", "italic", "underline", "strikethrough", "code", "math"]]] = None + + type: Optional[Literal["text"]] = None + + +class DocumentEventChildToDoChildBlob(BaseModel): + """Represents embedded binary data using data URI scheme. + + Format: data:[][;base64], + Example: data:text/html;base64,PGh0bWw+... + """ + + data: str + + mimetype: str + + id: Optional[str] = None + + type: Optional[Literal["blob"]] = None + + +class DocumentEventChildToDoChildCode(BaseModel): + text: str + + id: Optional[str] = None + + language: Optional[str] = None + + type: Optional[Literal["code"]] = None + + +class DocumentEventChildToDoChildComment(BaseModel): + text: str + + id: Optional[str] = None + + created_at: Optional[datetime] = None + + type: Optional[Literal["comment"]] = None + + +class DocumentEventChildToDoChildDivider(BaseModel): + id: Optional[str] = None + + type: Optional[Literal["divider"]] = None + + +class DocumentEventChildToDoChildImage(BaseModel): + src: str + + text: str + + id: Optional[str] = None + + type: Optional[Literal["image"]] = None + + +class DocumentEventChildToDoChildLink(BaseModel): + text: str + + url: str + + id: Optional[str] = None + + type: Optional[Literal["link"]] = None + + +class DocumentEventChildToDoChildLineBreak(BaseModel): + id: Optional[str] = None + + type: Optional[Literal["line_break"]] = None + + +class DocumentEventChildToDoChildText(BaseModel): + text: str + + id: Optional[str] = None + + marks: Optional[List[Literal["bold", "italic", "underline", "strikethrough", "code", "math"]]] = None + + type: Optional[Literal["text"]] = None + + +class DocumentEventChildToDoChildToolCall(BaseModel): + """A tool/function call made by the assistant.""" + + tool_call_id: str + + tool_name: str + + id: Optional[str] = None + + args: Optional[Dict[str, object]] = None + + type: Optional[Literal["tool_call"]] = None + + +class DocumentEventChildToDoChildToolResult(BaseModel): + """The result of a tool call.""" + + output: Union[str, Dict[str, object], List[object]] + + tool_call_id: str + + tool_name: str + + id: Optional[str] = None + + is_error: Optional[bool] = None + + type: Optional[Literal["tool_result"]] = None + + +class DocumentEventChildToDoChildTraceMessage(BaseModel): + """A message in an agent trace (user message, assistant message, or thinking).""" + + text: str + + id: Optional[str] = None + + message_type: Optional[Literal["message", "thinking"]] = None + + role: Optional[Literal["user", "assistant"]] = None + + timestamp: Optional[datetime] = None + + type: Optional[Literal["trace_message"]] = None + + +DocumentEventChildToDoChild: TypeAlias = Union[ + DocumentEventChildToDoChildBlob, + DocumentEventChildToDoChildCode, + DocumentEventChildToDoChildComment, + DocumentEventChildToDoChildDivider, + DocumentEventChildToDoChildImage, + DocumentEventChildToDoChildLink, + DocumentEventChildToDoChildLineBreak, + DocumentEventChildToDoChildText, + DocumentEventChildToDoChildToolCall, + DocumentEventChildToDoChildToolResult, + DocumentEventChildToDoChildTraceMessage, + object, +] + + +class DocumentEventChildToDo(BaseModel): + id: Optional[str] = None + + checked: Optional[bool] = None + + children: Optional[List[DocumentEventChildToDoChild]] = None + + text: Optional[str] = None + + type: Optional[Literal["todo"]] = None + + +class DocumentEventChildToolCall(BaseModel): + """A tool/function call made by the assistant.""" + + tool_call_id: str + + tool_name: str + + id: Optional[str] = None + + args: Optional[Dict[str, object]] = None + + type: Optional[Literal["tool_call"]] = None + + +class DocumentEventChildToolResult(BaseModel): + """The result of a tool call.""" + + output: Union[str, Dict[str, object], List[object]] + + tool_call_id: str + + tool_name: str + + id: Optional[str] = None + + is_error: Optional[bool] = None + + type: Optional[Literal["tool_result"]] = None + + +class DocumentEventChildTraceMessage(BaseModel): + """A message in an agent trace (user message, assistant message, or thinking).""" + + text: str + + id: Optional[str] = None + + message_type: Optional[Literal["message", "thinking"]] = None + + role: Optional[Literal["user", "assistant"]] = None + + timestamp: Optional[datetime] = None + + type: Optional[Literal["trace_message"]] = None + + +class DocumentEventChildUtterance(BaseModel): + """A speaker-attributed segment of a transcript (ENG-2476/D10). + + "Utterance" is the standard name for this across transcription providers + (AssemblyAI, Deepgram, Rev). Timestamps are relative offsets in seconds — + provider-native; absolute times derive from `Transcript.started_at`. + """ + + text: str + + id: Optional[str] = None + + end: Optional[float] = None + + speaker: Optional[object] = None + + start: Optional[float] = None + + type: Optional[Literal["utterance"]] = None + + +DocumentEventChild: TypeAlias = Annotated[ + Union[ + DocumentEventChildBlob, + DocumentEventChildCallout, + DocumentEventChildChunk, + DocumentEventChildCode, + DocumentEventChildComment, + DocumentEventChildDivider, + DocumentEventChildEquation, + DocumentEventChildFootnote, + DocumentEventChildHeading, + DocumentEventChildImage, + DocumentEventChildLink, + DocumentEventChildLineBreak, + DocumentEventChildList, + DocumentEventChildListItem, + DocumentEventChildParagraph, + DocumentEventChildQuote, + DocumentEventChildTable, + DocumentEventChildTableCell, + DocumentEventChildTableRow, + DocumentEventChildText, + DocumentEventChildToDo, + DocumentEventChildToolCall, + DocumentEventChildToolResult, + DocumentEventChildTraceMessage, + DocumentEventChildUtterance, + ], + PropertyInfo(discriminator="type"), +] + + +class DocumentEvent(BaseModel): + id: Optional[str] = None + + attendees: Optional[List[DocumentEventAttendee]] = None + + children: Optional[List[DocumentEventChild]] = None + + end_at: Optional[datetime] = None + + location: Optional[str] = None + + meeting_url: Optional[str] = None + + start_at: Optional[datetime] = None + + text: Optional[str] = None + + title: Optional[str] = None + + type: Optional[Literal["event"]] = None + + +class DocumentFileChildBlob(BaseModel): + """Represents embedded binary data using data URI scheme. + + Format: data:[][;base64], + Example: data:text/html;base64,PGh0bWw+... + """ + + data: str + + mimetype: str + + id: Optional[str] = None + + type: Optional[Literal["blob"]] = None + + +class DocumentFileChildCalloutChildBlob(BaseModel): + """Represents embedded binary data using data URI scheme. + + Format: data:[][;base64], + Example: data:text/html;base64,PGh0bWw+... + """ + + data: str + + mimetype: str + + id: Optional[str] = None + + type: Optional[Literal["blob"]] = None + + +class DocumentFileChildCalloutChildCode(BaseModel): + text: str + + id: Optional[str] = None + + language: Optional[str] = None + + type: Optional[Literal["code"]] = None + + +class DocumentFileChildCalloutChildComment(BaseModel): + text: str + + id: Optional[str] = None + + created_at: Optional[datetime] = None + + type: Optional[Literal["comment"]] = None + + +class DocumentFileChildCalloutChildDivider(BaseModel): + id: Optional[str] = None + + type: Optional[Literal["divider"]] = None + + +class DocumentFileChildCalloutChildImage(BaseModel): + src: str + + text: str + + id: Optional[str] = None + + type: Optional[Literal["image"]] = None + + +class DocumentFileChildCalloutChildLink(BaseModel): + text: str + + url: str + + id: Optional[str] = None + + type: Optional[Literal["link"]] = None + + +class DocumentFileChildCalloutChildLineBreak(BaseModel): + id: Optional[str] = None + + type: Optional[Literal["line_break"]] = None + + +class DocumentFileChildCalloutChildText(BaseModel): + text: str + + id: Optional[str] = None + + marks: Optional[List[Literal["bold", "italic", "underline", "strikethrough", "code", "math"]]] = None + + type: Optional[Literal["text"]] = None + + +class DocumentFileChildCalloutChildToolCall(BaseModel): + """A tool/function call made by the assistant.""" + + tool_call_id: str + + tool_name: str + + id: Optional[str] = None + + args: Optional[Dict[str, object]] = None + + type: Optional[Literal["tool_call"]] = None + + +class DocumentFileChildCalloutChildToolResult(BaseModel): + """The result of a tool call.""" + + output: Union[str, Dict[str, object], List[object]] + + tool_call_id: str + + tool_name: str + + id: Optional[str] = None + + is_error: Optional[bool] = None + + type: Optional[Literal["tool_result"]] = None + + +class DocumentFileChildCalloutChildTraceMessage(BaseModel): + """A message in an agent trace (user message, assistant message, or thinking).""" + + text: str + + id: Optional[str] = None + + message_type: Optional[Literal["message", "thinking"]] = None + + role: Optional[Literal["user", "assistant"]] = None + + timestamp: Optional[datetime] = None + + type: Optional[Literal["trace_message"]] = None + + +DocumentFileChildCalloutChild: TypeAlias = Union[ + DocumentFileChildCalloutChildBlob, + DocumentFileChildCalloutChildCode, + DocumentFileChildCalloutChildComment, + DocumentFileChildCalloutChildDivider, + DocumentFileChildCalloutChildImage, + DocumentFileChildCalloutChildLink, + DocumentFileChildCalloutChildLineBreak, + DocumentFileChildCalloutChildText, + DocumentFileChildCalloutChildToolCall, + DocumentFileChildCalloutChildToolResult, + DocumentFileChildCalloutChildTraceMessage, + object, +] + + +class DocumentFileChildCallout(BaseModel): + id: Optional[str] = None + + children: Optional[List[DocumentFileChildCalloutChild]] = None + + text: Optional[str] = None + + title: Optional[str] = None + + type: Optional[Literal["callout"]] = None + + +class DocumentFileChildChunkChildBlob(BaseModel): + """Represents embedded binary data using data URI scheme. + + Format: data:[][;base64], + Example: data:text/html;base64,PGh0bWw+... + """ + + data: str + + mimetype: str + + id: Optional[str] = None + + type: Optional[Literal["blob"]] = None + + +class DocumentFileChildChunkChildCode(BaseModel): + text: str + + id: Optional[str] = None + + language: Optional[str] = None + + type: Optional[Literal["code"]] = None + + +class DocumentFileChildChunkChildComment(BaseModel): + text: str + + id: Optional[str] = None + + created_at: Optional[datetime] = None + + type: Optional[Literal["comment"]] = None + + +class DocumentFileChildChunkChildDivider(BaseModel): + id: Optional[str] = None + + type: Optional[Literal["divider"]] = None + + +class DocumentFileChildChunkChildImage(BaseModel): + src: str + + text: str + + id: Optional[str] = None + + type: Optional[Literal["image"]] = None + + +class DocumentFileChildChunkChildLink(BaseModel): + text: str + + url: str + + id: Optional[str] = None + + type: Optional[Literal["link"]] = None + + +class DocumentFileChildChunkChildLineBreak(BaseModel): + id: Optional[str] = None + + type: Optional[Literal["line_break"]] = None + + +class DocumentFileChildChunkChildText(BaseModel): + text: str + + id: Optional[str] = None + + marks: Optional[List[Literal["bold", "italic", "underline", "strikethrough", "code", "math"]]] = None + + type: Optional[Literal["text"]] = None + + +class DocumentFileChildChunkChildToolCall(BaseModel): + """A tool/function call made by the assistant.""" + + tool_call_id: str + + tool_name: str + + id: Optional[str] = None + + args: Optional[Dict[str, object]] = None + + type: Optional[Literal["tool_call"]] = None + + +class DocumentFileChildChunkChildToolResult(BaseModel): + """The result of a tool call.""" + + output: Union[str, Dict[str, object], List[object]] + + tool_call_id: str + + tool_name: str + + id: Optional[str] = None + + is_error: Optional[bool] = None + + type: Optional[Literal["tool_result"]] = None + + +class DocumentFileChildChunkChildTraceMessage(BaseModel): + """A message in an agent trace (user message, assistant message, or thinking).""" + + text: str + + id: Optional[str] = None + + message_type: Optional[Literal["message", "thinking"]] = None + + role: Optional[Literal["user", "assistant"]] = None + + timestamp: Optional[datetime] = None + + type: Optional[Literal["trace_message"]] = None + + +DocumentFileChildChunkChild: TypeAlias = Union[ + DocumentFileChildChunkChildBlob, + DocumentFileChildChunkChildCode, + DocumentFileChildChunkChildComment, + DocumentFileChildChunkChildDivider, + DocumentFileChildChunkChildImage, + DocumentFileChildChunkChildLink, + DocumentFileChildChunkChildLineBreak, + DocumentFileChildChunkChildText, + DocumentFileChildChunkChildToolCall, + DocumentFileChildChunkChildToolResult, + DocumentFileChildChunkChildTraceMessage, + object, +] + + +class DocumentFileChildChunk(BaseModel): + id: Optional[str] = None + + children: Optional[List[DocumentFileChildChunkChild]] = None + + text: Optional[str] = None + + type: Optional[Literal["chunk"]] = None + + +class DocumentFileChildCode(BaseModel): + text: str + + id: Optional[str] = None + + language: Optional[str] = None + + type: Optional[Literal["code"]] = None + + +class DocumentFileChildComment(BaseModel): + text: str + + id: Optional[str] = None + + created_at: Optional[datetime] = None + + type: Optional[Literal["comment"]] = None + + +class DocumentFileChildDivider(BaseModel): + id: Optional[str] = None + + type: Optional[Literal["divider"]] = None + + +class DocumentFileChildEquationChildBlob(BaseModel): + """Represents embedded binary data using data URI scheme. + + Format: data:[][;base64], + Example: data:text/html;base64,PGh0bWw+... + """ + + data: str + + mimetype: str + + id: Optional[str] = None + + type: Optional[Literal["blob"]] = None + + +class DocumentFileChildEquationChildCode(BaseModel): + text: str + + id: Optional[str] = None + + language: Optional[str] = None + + type: Optional[Literal["code"]] = None + + +class DocumentFileChildEquationChildComment(BaseModel): + text: str + + id: Optional[str] = None + + created_at: Optional[datetime] = None + + type: Optional[Literal["comment"]] = None + + +class DocumentFileChildEquationChildDivider(BaseModel): + id: Optional[str] = None + + type: Optional[Literal["divider"]] = None + + +class DocumentFileChildEquationChildImage(BaseModel): + src: str + + text: str + + id: Optional[str] = None + + type: Optional[Literal["image"]] = None + + +class DocumentFileChildEquationChildLink(BaseModel): + text: str + + url: str + + id: Optional[str] = None + + type: Optional[Literal["link"]] = None + + +class DocumentFileChildEquationChildLineBreak(BaseModel): + id: Optional[str] = None + + type: Optional[Literal["line_break"]] = None + + +class DocumentFileChildEquationChildText(BaseModel): + text: str + + id: Optional[str] = None + + marks: Optional[List[Literal["bold", "italic", "underline", "strikethrough", "code", "math"]]] = None + + type: Optional[Literal["text"]] = None + + +class DocumentFileChildEquationChildToolCall(BaseModel): + """A tool/function call made by the assistant.""" + + tool_call_id: str + + tool_name: str + + id: Optional[str] = None + + args: Optional[Dict[str, object]] = None + + type: Optional[Literal["tool_call"]] = None + + +class DocumentFileChildEquationChildToolResult(BaseModel): + """The result of a tool call.""" + + output: Union[str, Dict[str, object], List[object]] + + tool_call_id: str + + tool_name: str + + id: Optional[str] = None + + is_error: Optional[bool] = None + + type: Optional[Literal["tool_result"]] = None + + +class DocumentFileChildEquationChildTraceMessage(BaseModel): + """A message in an agent trace (user message, assistant message, or thinking).""" + + text: str + + id: Optional[str] = None + + message_type: Optional[Literal["message", "thinking"]] = None + + role: Optional[Literal["user", "assistant"]] = None + + timestamp: Optional[datetime] = None + + type: Optional[Literal["trace_message"]] = None + + +DocumentFileChildEquationChild: TypeAlias = Union[ + DocumentFileChildEquationChildBlob, + DocumentFileChildEquationChildCode, + DocumentFileChildEquationChildComment, + DocumentFileChildEquationChildDivider, + DocumentFileChildEquationChildImage, + DocumentFileChildEquationChildLink, + DocumentFileChildEquationChildLineBreak, + DocumentFileChildEquationChildText, + DocumentFileChildEquationChildToolCall, + DocumentFileChildEquationChildToolResult, + DocumentFileChildEquationChildTraceMessage, + object, +] + + +class DocumentFileChildEquation(BaseModel): + id: Optional[str] = None + + children: Optional[List[DocumentFileChildEquationChild]] = None + + text: Optional[str] = None + + type: Optional[Literal["equation"]] = None + + +class DocumentFileChildFootnoteChildBlob(BaseModel): + """Represents embedded binary data using data URI scheme. + + Format: data:[][;base64], + Example: data:text/html;base64,PGh0bWw+... + """ + + data: str + + mimetype: str + + id: Optional[str] = None + + type: Optional[Literal["blob"]] = None + + +class DocumentFileChildFootnoteChildCode(BaseModel): + text: str + + id: Optional[str] = None + + language: Optional[str] = None + + type: Optional[Literal["code"]] = None + + +class DocumentFileChildFootnoteChildComment(BaseModel): + text: str + + id: Optional[str] = None + + created_at: Optional[datetime] = None + + type: Optional[Literal["comment"]] = None + + +class DocumentFileChildFootnoteChildDivider(BaseModel): + id: Optional[str] = None + + type: Optional[Literal["divider"]] = None + + +class DocumentFileChildFootnoteChildImage(BaseModel): + src: str + + text: str + + id: Optional[str] = None + + type: Optional[Literal["image"]] = None + + +class DocumentFileChildFootnoteChildLink(BaseModel): + text: str + + url: str + + id: Optional[str] = None + + type: Optional[Literal["link"]] = None + + +class DocumentFileChildFootnoteChildLineBreak(BaseModel): + id: Optional[str] = None + + type: Optional[Literal["line_break"]] = None + + +class DocumentFileChildFootnoteChildText(BaseModel): + text: str + + id: Optional[str] = None + + marks: Optional[List[Literal["bold", "italic", "underline", "strikethrough", "code", "math"]]] = None + + type: Optional[Literal["text"]] = None + + +class DocumentFileChildFootnoteChildToolCall(BaseModel): + """A tool/function call made by the assistant.""" + + tool_call_id: str + + tool_name: str + + id: Optional[str] = None + + args: Optional[Dict[str, object]] = None + + type: Optional[Literal["tool_call"]] = None + + +class DocumentFileChildFootnoteChildToolResult(BaseModel): + """The result of a tool call.""" + + output: Union[str, Dict[str, object], List[object]] + + tool_call_id: str + + tool_name: str + + id: Optional[str] = None + + is_error: Optional[bool] = None + + type: Optional[Literal["tool_result"]] = None + + +class DocumentFileChildFootnoteChildTraceMessage(BaseModel): + """A message in an agent trace (user message, assistant message, or thinking).""" + + text: str + + id: Optional[str] = None + + message_type: Optional[Literal["message", "thinking"]] = None + + role: Optional[Literal["user", "assistant"]] = None + + timestamp: Optional[datetime] = None + + type: Optional[Literal["trace_message"]] = None + + +DocumentFileChildFootnoteChild: TypeAlias = Union[ + DocumentFileChildFootnoteChildBlob, + DocumentFileChildFootnoteChildCode, + DocumentFileChildFootnoteChildComment, + DocumentFileChildFootnoteChildDivider, + DocumentFileChildFootnoteChildImage, + DocumentFileChildFootnoteChildLink, + DocumentFileChildFootnoteChildLineBreak, + DocumentFileChildFootnoteChildText, + DocumentFileChildFootnoteChildToolCall, + DocumentFileChildFootnoteChildToolResult, + DocumentFileChildFootnoteChildTraceMessage, + object, +] + + +class DocumentFileChildFootnote(BaseModel): + id: Optional[str] = None + + children: Optional[List[DocumentFileChildFootnoteChild]] = None + + text: Optional[str] = None + + type: Optional[Literal["footnote"]] = None + + +class DocumentFileChildHeadingChildBlob(BaseModel): + """Represents embedded binary data using data URI scheme. + + Format: data:[][;base64], + Example: data:text/html;base64,PGh0bWw+... + """ + + data: str + + mimetype: str + + id: Optional[str] = None + + type: Optional[Literal["blob"]] = None + + +class DocumentFileChildHeadingChildCode(BaseModel): + text: str + + id: Optional[str] = None + + language: Optional[str] = None + + type: Optional[Literal["code"]] = None + + +class DocumentFileChildHeadingChildComment(BaseModel): + text: str + + id: Optional[str] = None + + created_at: Optional[datetime] = None + + type: Optional[Literal["comment"]] = None + + +class DocumentFileChildHeadingChildDivider(BaseModel): + id: Optional[str] = None + + type: Optional[Literal["divider"]] = None + + +class DocumentFileChildHeadingChildImage(BaseModel): + src: str + + text: str + + id: Optional[str] = None + + type: Optional[Literal["image"]] = None + + +class DocumentFileChildHeadingChildLink(BaseModel): + text: str + + url: str + + id: Optional[str] = None + + type: Optional[Literal["link"]] = None + + +class DocumentFileChildHeadingChildLineBreak(BaseModel): + id: Optional[str] = None + + type: Optional[Literal["line_break"]] = None + + +class DocumentFileChildHeadingChildText(BaseModel): + text: str + + id: Optional[str] = None + + marks: Optional[List[Literal["bold", "italic", "underline", "strikethrough", "code", "math"]]] = None + + type: Optional[Literal["text"]] = None + + +class DocumentFileChildHeadingChildToolCall(BaseModel): + """A tool/function call made by the assistant.""" + + tool_call_id: str + + tool_name: str + + id: Optional[str] = None + + args: Optional[Dict[str, object]] = None + + type: Optional[Literal["tool_call"]] = None + + +class DocumentFileChildHeadingChildToolResult(BaseModel): + """The result of a tool call.""" + + output: Union[str, Dict[str, object], List[object]] + + tool_call_id: str + + tool_name: str + + id: Optional[str] = None + + is_error: Optional[bool] = None + + type: Optional[Literal["tool_result"]] = None + + +class DocumentFileChildHeadingChildTraceMessage(BaseModel): + """A message in an agent trace (user message, assistant message, or thinking).""" + + text: str + + id: Optional[str] = None + + message_type: Optional[Literal["message", "thinking"]] = None + + role: Optional[Literal["user", "assistant"]] = None + + timestamp: Optional[datetime] = None + + type: Optional[Literal["trace_message"]] = None + + +DocumentFileChildHeadingChild: TypeAlias = Union[ + DocumentFileChildHeadingChildBlob, + DocumentFileChildHeadingChildCode, + DocumentFileChildHeadingChildComment, + DocumentFileChildHeadingChildDivider, + DocumentFileChildHeadingChildImage, + DocumentFileChildHeadingChildLink, + DocumentFileChildHeadingChildLineBreak, + DocumentFileChildHeadingChildText, + DocumentFileChildHeadingChildToolCall, + DocumentFileChildHeadingChildToolResult, + DocumentFileChildHeadingChildTraceMessage, + object, +] + + +class DocumentFileChildHeading(BaseModel): + level: int + + id: Optional[str] = None + + children: Optional[List[DocumentFileChildHeadingChild]] = None + + text: Optional[str] = None + + type: Optional[Literal["heading"]] = None + + +class DocumentFileChildImage(BaseModel): + src: str + + text: str + + id: Optional[str] = None + + type: Optional[Literal["image"]] = None + + +class DocumentFileChildLink(BaseModel): + text: str + + url: str + + id: Optional[str] = None + + type: Optional[Literal["link"]] = None + + +class DocumentFileChildLineBreak(BaseModel): + id: Optional[str] = None + + type: Optional[Literal["line_break"]] = None + + +class DocumentFileChildList(BaseModel): + id: Optional[str] = None + + children: Optional[List[object]] = None + + ordered: Optional[bool] = None + + text: Optional[str] = None + + type: Optional[Literal["list"]] = None + + +class DocumentFileChildListItemChildBlob(BaseModel): + """Represents embedded binary data using data URI scheme. + + Format: data:[][;base64], + Example: data:text/html;base64,PGh0bWw+... + """ + + data: str + + mimetype: str + + id: Optional[str] = None + + type: Optional[Literal["blob"]] = None + + +class DocumentFileChildListItemChildCode(BaseModel): + text: str + + id: Optional[str] = None + + language: Optional[str] = None + + type: Optional[Literal["code"]] = None + + +class DocumentFileChildListItemChildComment(BaseModel): + text: str + + id: Optional[str] = None + + created_at: Optional[datetime] = None + + type: Optional[Literal["comment"]] = None + + +class DocumentFileChildListItemChildDivider(BaseModel): + id: Optional[str] = None + + type: Optional[Literal["divider"]] = None + + +class DocumentFileChildListItemChildImage(BaseModel): + src: str + + text: str + + id: Optional[str] = None + + type: Optional[Literal["image"]] = None + + +class DocumentFileChildListItemChildLink(BaseModel): + text: str + + url: str + + id: Optional[str] = None + + type: Optional[Literal["link"]] = None + + +class DocumentFileChildListItemChildLineBreak(BaseModel): + id: Optional[str] = None + + type: Optional[Literal["line_break"]] = None + + +class DocumentFileChildListItemChildText(BaseModel): + text: str + + id: Optional[str] = None + + marks: Optional[List[Literal["bold", "italic", "underline", "strikethrough", "code", "math"]]] = None + + type: Optional[Literal["text"]] = None + + +class DocumentFileChildListItemChildToolCall(BaseModel): + """A tool/function call made by the assistant.""" + + tool_call_id: str + + tool_name: str + + id: Optional[str] = None + + args: Optional[Dict[str, object]] = None + + type: Optional[Literal["tool_call"]] = None + + +class DocumentFileChildListItemChildToolResult(BaseModel): + """The result of a tool call.""" + + output: Union[str, Dict[str, object], List[object]] + + tool_call_id: str + + tool_name: str + + id: Optional[str] = None + + is_error: Optional[bool] = None + + type: Optional[Literal["tool_result"]] = None + + +class DocumentFileChildListItemChildTraceMessage(BaseModel): + """A message in an agent trace (user message, assistant message, or thinking).""" + + text: str + + id: Optional[str] = None + + message_type: Optional[Literal["message", "thinking"]] = None + + role: Optional[Literal["user", "assistant"]] = None + + timestamp: Optional[datetime] = None + + type: Optional[Literal["trace_message"]] = None + + +DocumentFileChildListItemChild: TypeAlias = Union[ + DocumentFileChildListItemChildBlob, + DocumentFileChildListItemChildCode, + DocumentFileChildListItemChildComment, + DocumentFileChildListItemChildDivider, + DocumentFileChildListItemChildImage, + DocumentFileChildListItemChildLink, + DocumentFileChildListItemChildLineBreak, + DocumentFileChildListItemChildText, + DocumentFileChildListItemChildToolCall, + DocumentFileChildListItemChildToolResult, + DocumentFileChildListItemChildTraceMessage, + object, +] + + +class DocumentFileChildListItem(BaseModel): + id: Optional[str] = None + + children: Optional[List[DocumentFileChildListItemChild]] = None + + text: Optional[str] = None + + type: Optional[Literal["list_item"]] = None + + +class DocumentFileChildParagraphChildBlob(BaseModel): + """Represents embedded binary data using data URI scheme. + + Format: data:[][;base64], + Example: data:text/html;base64,PGh0bWw+... + """ + + data: str + + mimetype: str + + id: Optional[str] = None + + type: Optional[Literal["blob"]] = None + + +class DocumentFileChildParagraphChildCode(BaseModel): + text: str + + id: Optional[str] = None + + language: Optional[str] = None + + type: Optional[Literal["code"]] = None + + +class DocumentFileChildParagraphChildComment(BaseModel): + text: str + + id: Optional[str] = None + + created_at: Optional[datetime] = None + + type: Optional[Literal["comment"]] = None + + +class DocumentFileChildParagraphChildDivider(BaseModel): + id: Optional[str] = None + + type: Optional[Literal["divider"]] = None + + +class DocumentFileChildParagraphChildImage(BaseModel): + src: str + + text: str + + id: Optional[str] = None + + type: Optional[Literal["image"]] = None + + +class DocumentFileChildParagraphChildLink(BaseModel): + text: str + + url: str + + id: Optional[str] = None + + type: Optional[Literal["link"]] = None + + +class DocumentFileChildParagraphChildLineBreak(BaseModel): + id: Optional[str] = None + + type: Optional[Literal["line_break"]] = None + + +class DocumentFileChildParagraphChildText(BaseModel): + text: str + + id: Optional[str] = None + + marks: Optional[List[Literal["bold", "italic", "underline", "strikethrough", "code", "math"]]] = None + + type: Optional[Literal["text"]] = None + + +class DocumentFileChildParagraphChildToolCall(BaseModel): + """A tool/function call made by the assistant.""" + + tool_call_id: str + + tool_name: str + + id: Optional[str] = None + + args: Optional[Dict[str, object]] = None + + type: Optional[Literal["tool_call"]] = None + + +class DocumentFileChildParagraphChildToolResult(BaseModel): + """The result of a tool call.""" + + output: Union[str, Dict[str, object], List[object]] + + tool_call_id: str + + tool_name: str + + id: Optional[str] = None + + is_error: Optional[bool] = None + + type: Optional[Literal["tool_result"]] = None + + +class DocumentFileChildParagraphChildTraceMessage(BaseModel): + """A message in an agent trace (user message, assistant message, or thinking).""" + + text: str + + id: Optional[str] = None + + message_type: Optional[Literal["message", "thinking"]] = None + + role: Optional[Literal["user", "assistant"]] = None + + timestamp: Optional[datetime] = None + + type: Optional[Literal["trace_message"]] = None + + +DocumentFileChildParagraphChild: TypeAlias = Union[ + DocumentFileChildParagraphChildBlob, + DocumentFileChildParagraphChildCode, + DocumentFileChildParagraphChildComment, + DocumentFileChildParagraphChildDivider, + DocumentFileChildParagraphChildImage, + DocumentFileChildParagraphChildLink, + DocumentFileChildParagraphChildLineBreak, + DocumentFileChildParagraphChildText, + DocumentFileChildParagraphChildToolCall, + DocumentFileChildParagraphChildToolResult, + DocumentFileChildParagraphChildTraceMessage, + object, +] + + +class DocumentFileChildParagraph(BaseModel): + id: Optional[str] = None + + children: Optional[List[DocumentFileChildParagraphChild]] = None + + text: Optional[str] = None + + type: Optional[Literal["paragraph"]] = None + + +class DocumentFileChildQuoteChildBlob(BaseModel): + """Represents embedded binary data using data URI scheme. + + Format: data:[][;base64], + Example: data:text/html;base64,PGh0bWw+... + """ + + data: str + + mimetype: str + + id: Optional[str] = None + + type: Optional[Literal["blob"]] = None + + +class DocumentFileChildQuoteChildCode(BaseModel): + text: str + + id: Optional[str] = None + + language: Optional[str] = None + + type: Optional[Literal["code"]] = None + + +class DocumentFileChildQuoteChildComment(BaseModel): + text: str + + id: Optional[str] = None + + created_at: Optional[datetime] = None + + type: Optional[Literal["comment"]] = None + + +class DocumentFileChildQuoteChildDivider(BaseModel): + id: Optional[str] = None + + type: Optional[Literal["divider"]] = None + + +class DocumentFileChildQuoteChildImage(BaseModel): + src: str + + text: str + + id: Optional[str] = None + + type: Optional[Literal["image"]] = None + + +class DocumentFileChildQuoteChildLink(BaseModel): + text: str + + url: str + + id: Optional[str] = None + + type: Optional[Literal["link"]] = None + + +class DocumentFileChildQuoteChildLineBreak(BaseModel): + id: Optional[str] = None + + type: Optional[Literal["line_break"]] = None + + +class DocumentFileChildQuoteChildText(BaseModel): + text: str + + id: Optional[str] = None + + marks: Optional[List[Literal["bold", "italic", "underline", "strikethrough", "code", "math"]]] = None + + type: Optional[Literal["text"]] = None + + +class DocumentFileChildQuoteChildToolCall(BaseModel): + """A tool/function call made by the assistant.""" + + tool_call_id: str + + tool_name: str + + id: Optional[str] = None + + args: Optional[Dict[str, object]] = None + + type: Optional[Literal["tool_call"]] = None + + +class DocumentFileChildQuoteChildToolResult(BaseModel): + """The result of a tool call.""" + + output: Union[str, Dict[str, object], List[object]] + + tool_call_id: str + + tool_name: str + + id: Optional[str] = None + + is_error: Optional[bool] = None + + type: Optional[Literal["tool_result"]] = None + + +class DocumentFileChildQuoteChildTraceMessage(BaseModel): + """A message in an agent trace (user message, assistant message, or thinking).""" + + text: str + + id: Optional[str] = None + + message_type: Optional[Literal["message", "thinking"]] = None + + role: Optional[Literal["user", "assistant"]] = None + + timestamp: Optional[datetime] = None + + type: Optional[Literal["trace_message"]] = None + + +DocumentFileChildQuoteChild: TypeAlias = Union[ + DocumentFileChildQuoteChildBlob, + DocumentFileChildQuoteChildCode, + DocumentFileChildQuoteChildComment, + DocumentFileChildQuoteChildDivider, + DocumentFileChildQuoteChildImage, + DocumentFileChildQuoteChildLink, + DocumentFileChildQuoteChildLineBreak, + DocumentFileChildQuoteChildText, + DocumentFileChildQuoteChildToolCall, + DocumentFileChildQuoteChildToolResult, + DocumentFileChildQuoteChildTraceMessage, + object, +] + + +class DocumentFileChildQuote(BaseModel): + id: Optional[str] = None + + children: Optional[List[DocumentFileChildQuoteChild]] = None + + text: Optional[str] = None + + type: Optional[Literal["quote"]] = None + + +class DocumentFileChildTable(BaseModel): + id: Optional[str] = None + + children: Optional[List[object]] = None + + has_header: Optional[bool] = None + """Whether the first row should be treated as a header""" + + text: Optional[str] = None + + type: Optional[Literal["table"]] = None + + +class DocumentFileChildTableCellChildBlob(BaseModel): + """Represents embedded binary data using data URI scheme. + + Format: data:[][;base64], + Example: data:text/html;base64,PGh0bWw+... + """ + + data: str + + mimetype: str + + id: Optional[str] = None + + type: Optional[Literal["blob"]] = None + + +class DocumentFileChildTableCellChildCode(BaseModel): + text: str + + id: Optional[str] = None + + language: Optional[str] = None + + type: Optional[Literal["code"]] = None + + +class DocumentFileChildTableCellChildComment(BaseModel): + text: str + + id: Optional[str] = None + + created_at: Optional[datetime] = None + + type: Optional[Literal["comment"]] = None + + +class DocumentFileChildTableCellChildDivider(BaseModel): + id: Optional[str] = None + + type: Optional[Literal["divider"]] = None + + +class DocumentFileChildTableCellChildImage(BaseModel): + src: str + + text: str + + id: Optional[str] = None + + type: Optional[Literal["image"]] = None + + +class DocumentFileChildTableCellChildLink(BaseModel): + text: str + + url: str + + id: Optional[str] = None + + type: Optional[Literal["link"]] = None + + +class DocumentFileChildTableCellChildLineBreak(BaseModel): + id: Optional[str] = None + + type: Optional[Literal["line_break"]] = None + + +class DocumentFileChildTableCellChildText(BaseModel): + text: str + + id: Optional[str] = None + + marks: Optional[List[Literal["bold", "italic", "underline", "strikethrough", "code", "math"]]] = None + + type: Optional[Literal["text"]] = None + + +class DocumentFileChildTableCellChildToolCall(BaseModel): + """A tool/function call made by the assistant.""" + + tool_call_id: str + + tool_name: str + + id: Optional[str] = None + + args: Optional[Dict[str, object]] = None + + type: Optional[Literal["tool_call"]] = None + + +class DocumentFileChildTableCellChildToolResult(BaseModel): + """The result of a tool call.""" + + output: Union[str, Dict[str, object], List[object]] + + tool_call_id: str + + tool_name: str + + id: Optional[str] = None + + is_error: Optional[bool] = None + + type: Optional[Literal["tool_result"]] = None + + +class DocumentFileChildTableCellChildTraceMessage(BaseModel): + """A message in an agent trace (user message, assistant message, or thinking).""" + + text: str + + id: Optional[str] = None + + message_type: Optional[Literal["message", "thinking"]] = None + + role: Optional[Literal["user", "assistant"]] = None + + timestamp: Optional[datetime] = None + + type: Optional[Literal["trace_message"]] = None + + +DocumentFileChildTableCellChild: TypeAlias = Union[ + DocumentFileChildTableCellChildBlob, + DocumentFileChildTableCellChildCode, + DocumentFileChildTableCellChildComment, + DocumentFileChildTableCellChildDivider, + DocumentFileChildTableCellChildImage, + DocumentFileChildTableCellChildLink, + DocumentFileChildTableCellChildLineBreak, + DocumentFileChildTableCellChildText, + DocumentFileChildTableCellChildToolCall, + DocumentFileChildTableCellChildToolResult, + DocumentFileChildTableCellChildTraceMessage, + object, +] + + +class DocumentFileChildTableCell(BaseModel): + id: Optional[str] = None + + align: Optional[Literal["left", "center", "right"]] = None + + children: Optional[List[DocumentFileChildTableCellChild]] = None + + text: Optional[str] = None + + type: Optional[Literal["table_cell"]] = None + + +class DocumentFileChildTableRow(BaseModel): + id: Optional[str] = None + + children: Optional[List[object]] = None + + text: Optional[str] = None + + type: Optional[Literal["table_row"]] = None + + +class DocumentFileChildText(BaseModel): + text: str + + id: Optional[str] = None + + marks: Optional[List[Literal["bold", "italic", "underline", "strikethrough", "code", "math"]]] = None + + type: Optional[Literal["text"]] = None + + +class DocumentFileChildToDoChildBlob(BaseModel): + """Represents embedded binary data using data URI scheme. + + Format: data:[][;base64], + Example: data:text/html;base64,PGh0bWw+... + """ + + data: str + + mimetype: str + + id: Optional[str] = None + + type: Optional[Literal["blob"]] = None + + +class DocumentFileChildToDoChildCode(BaseModel): + text: str + + id: Optional[str] = None + + language: Optional[str] = None + + type: Optional[Literal["code"]] = None + + +class DocumentFileChildToDoChildComment(BaseModel): + text: str + + id: Optional[str] = None + + created_at: Optional[datetime] = None + + type: Optional[Literal["comment"]] = None + + +class DocumentFileChildToDoChildDivider(BaseModel): + id: Optional[str] = None + + type: Optional[Literal["divider"]] = None + + +class DocumentFileChildToDoChildImage(BaseModel): + src: str + + text: str + + id: Optional[str] = None + + type: Optional[Literal["image"]] = None + + +class DocumentFileChildToDoChildLink(BaseModel): + text: str + + url: str + + id: Optional[str] = None + + type: Optional[Literal["link"]] = None + + +class DocumentFileChildToDoChildLineBreak(BaseModel): + id: Optional[str] = None + + type: Optional[Literal["line_break"]] = None + + +class DocumentFileChildToDoChildText(BaseModel): + text: str + + id: Optional[str] = None + + marks: Optional[List[Literal["bold", "italic", "underline", "strikethrough", "code", "math"]]] = None + + type: Optional[Literal["text"]] = None + + +class DocumentFileChildToDoChildToolCall(BaseModel): + """A tool/function call made by the assistant.""" + + tool_call_id: str + + tool_name: str + + id: Optional[str] = None + + args: Optional[Dict[str, object]] = None + + type: Optional[Literal["tool_call"]] = None + + +class DocumentFileChildToDoChildToolResult(BaseModel): + """The result of a tool call.""" + + output: Union[str, Dict[str, object], List[object]] + + tool_call_id: str + + tool_name: str + + id: Optional[str] = None + + is_error: Optional[bool] = None + + type: Optional[Literal["tool_result"]] = None + + +class DocumentFileChildToDoChildTraceMessage(BaseModel): + """A message in an agent trace (user message, assistant message, or thinking).""" + + text: str + + id: Optional[str] = None + + message_type: Optional[Literal["message", "thinking"]] = None + + role: Optional[Literal["user", "assistant"]] = None + + timestamp: Optional[datetime] = None + + type: Optional[Literal["trace_message"]] = None + + +DocumentFileChildToDoChild: TypeAlias = Union[ + DocumentFileChildToDoChildBlob, + DocumentFileChildToDoChildCode, + DocumentFileChildToDoChildComment, + DocumentFileChildToDoChildDivider, + DocumentFileChildToDoChildImage, + DocumentFileChildToDoChildLink, + DocumentFileChildToDoChildLineBreak, + DocumentFileChildToDoChildText, + DocumentFileChildToDoChildToolCall, + DocumentFileChildToDoChildToolResult, + DocumentFileChildToDoChildTraceMessage, + object, +] + + +class DocumentFileChildToDo(BaseModel): + id: Optional[str] = None + + checked: Optional[bool] = None + + children: Optional[List[DocumentFileChildToDoChild]] = None + + text: Optional[str] = None + + type: Optional[Literal["todo"]] = None + + +class DocumentFileChildToolCall(BaseModel): + """A tool/function call made by the assistant.""" + + tool_call_id: str + + tool_name: str + + id: Optional[str] = None + + args: Optional[Dict[str, object]] = None + + type: Optional[Literal["tool_call"]] = None + + +class DocumentFileChildToolResult(BaseModel): + """The result of a tool call.""" + + output: Union[str, Dict[str, object], List[object]] + + tool_call_id: str + + tool_name: str + + id: Optional[str] = None + + is_error: Optional[bool] = None + + type: Optional[Literal["tool_result"]] = None + + +class DocumentFileChildTraceMessage(BaseModel): + """A message in an agent trace (user message, assistant message, or thinking).""" + + text: str + + id: Optional[str] = None + + message_type: Optional[Literal["message", "thinking"]] = None + + role: Optional[Literal["user", "assistant"]] = None + + timestamp: Optional[datetime] = None + + type: Optional[Literal["trace_message"]] = None + + +class DocumentFileChildUtterance(BaseModel): + """A speaker-attributed segment of a transcript (ENG-2476/D10). + + "Utterance" is the standard name for this across transcription providers + (AssemblyAI, Deepgram, Rev). Timestamps are relative offsets in seconds — + provider-native; absolute times derive from `Transcript.started_at`. + """ + + text: str + + id: Optional[str] = None + + end: Optional[float] = None + + speaker: Optional[object] = None + + start: Optional[float] = None + + type: Optional[Literal["utterance"]] = None + + +DocumentFileChild: TypeAlias = Annotated[ + Union[ + DocumentFileChildBlob, + DocumentFileChildCallout, + DocumentFileChildChunk, + DocumentFileChildCode, + DocumentFileChildComment, + DocumentFileChildDivider, + DocumentFileChildEquation, + DocumentFileChildFootnote, + DocumentFileChildHeading, + DocumentFileChildImage, + DocumentFileChildLink, + DocumentFileChildLineBreak, + DocumentFileChildList, + DocumentFileChildListItem, + DocumentFileChildParagraph, + DocumentFileChildQuote, + DocumentFileChildTable, + DocumentFileChildTableCell, + DocumentFileChildTableRow, + DocumentFileChildText, + DocumentFileChildToDo, + DocumentFileChildToolCall, + DocumentFileChildToolResult, + DocumentFileChildTraceMessage, + DocumentFileChildUtterance, + ], + PropertyInfo(discriminator="type"), +] + + +class DocumentFile(BaseModel): + content_type: str + + filename: str + + id: Optional[str] = None + + children: Optional[List[DocumentFileChild]] = None + + path: Optional[List[str]] = None + + text: Optional[str] = None + + title: Optional[str] = None + + type: Optional[Literal["file"]] = None + + +class DocumentConversationChildSenderChildBlob(BaseModel): + """Represents embedded binary data using data URI scheme. + + Format: data:[][;base64], + Example: data:text/html;base64,PGh0bWw+... + """ + + data: str + + mimetype: str + + id: Optional[str] = None + + type: Optional[Literal["blob"]] = None + + +class DocumentConversationChildSenderChildCode(BaseModel): + text: str + + id: Optional[str] = None + + language: Optional[str] = None + + type: Optional[Literal["code"]] = None + + +class DocumentConversationChildSenderChildComment(BaseModel): + text: str + + id: Optional[str] = None + + created_at: Optional[datetime] = None + + type: Optional[Literal["comment"]] = None + + +class DocumentConversationChildSenderChildDivider(BaseModel): + id: Optional[str] = None + + type: Optional[Literal["divider"]] = None + + +class DocumentConversationChildSenderChildImage(BaseModel): + src: str + + text: str + + id: Optional[str] = None + + type: Optional[Literal["image"]] = None + + +class DocumentConversationChildSenderChildLink(BaseModel): + text: str + + url: str + + id: Optional[str] = None + + type: Optional[Literal["link"]] = None + + +class DocumentConversationChildSenderChildLineBreak(BaseModel): + id: Optional[str] = None + + type: Optional[Literal["line_break"]] = None + + +class DocumentConversationChildSenderChildText(BaseModel): + text: str + + id: Optional[str] = None + + marks: Optional[List[Literal["bold", "italic", "underline", "strikethrough", "code", "math"]]] = None + + type: Optional[Literal["text"]] = None + + +class DocumentConversationChildSenderChildToolCall(BaseModel): + """A tool/function call made by the assistant.""" + + tool_call_id: str + + tool_name: str + + id: Optional[str] = None + + args: Optional[Dict[str, object]] = None + + type: Optional[Literal["tool_call"]] = None + + +class DocumentConversationChildSenderChildToolResult(BaseModel): + """The result of a tool call.""" + + output: Union[str, Dict[str, object], List[object]] + + tool_call_id: str + + tool_name: str + + id: Optional[str] = None + + is_error: Optional[bool] = None + + type: Optional[Literal["tool_result"]] = None + + +class DocumentConversationChildSenderChildTraceMessage(BaseModel): + """A message in an agent trace (user message, assistant message, or thinking).""" + + text: str + + id: Optional[str] = None + + message_type: Optional[Literal["message", "thinking"]] = None + + role: Optional[Literal["user", "assistant"]] = None + + timestamp: Optional[datetime] = None + + type: Optional[Literal["trace_message"]] = None + + +DocumentConversationChildSenderChild: TypeAlias = Union[ + DocumentConversationChildSenderChildBlob, + DocumentConversationChildSenderChildCode, + DocumentConversationChildSenderChildComment, + DocumentConversationChildSenderChildDivider, + DocumentConversationChildSenderChildImage, + DocumentConversationChildSenderChildLink, + DocumentConversationChildSenderChildLineBreak, + DocumentConversationChildSenderChildText, + DocumentConversationChildSenderChildToolCall, + DocumentConversationChildSenderChildToolResult, + DocumentConversationChildSenderChildTraceMessage, + object, +] + + +class DocumentConversationChildSender(BaseModel): + id: Optional[str] = None + + address: Optional[str] = None + + alt_names: Optional[List[str]] = None + + children: Optional[List[DocumentConversationChildSenderChild]] = None + + company: Optional[str] = None + + company_ids: Optional[List[str]] = None + + date_of_birth: Optional[date] = None + + deal_ids: Optional[List[str]] = None + + email: Optional[str] = None + + emails: Optional[List[str]] = None + """All known email addresses; `email` holds the primary one""" + + image_url: Optional[str] = None + + job_title: Optional[str] = None + + link_urls: Optional[List[str]] = None + + name: Optional[str] = None + + phone_numbers: Optional[List[str]] = None + + tags: Optional[List[str]] = None + + text: Optional[str] = None + + type: Optional[Literal["person"]] = None + + username: Optional[str] = None + + +class DocumentConversationChildChildBlob(BaseModel): + """Represents embedded binary data using data URI scheme. + + Format: data:[][;base64], + Example: data:text/html;base64,PGh0bWw+... + """ + + data: str + + mimetype: str + + id: Optional[str] = None + + type: Optional[Literal["blob"]] = None + + +class DocumentConversationChildChildCalloutChildBlob(BaseModel): + """Represents embedded binary data using data URI scheme. + + Format: data:[][;base64], + Example: data:text/html;base64,PGh0bWw+... + """ + + data: str + + mimetype: str + + id: Optional[str] = None + + type: Optional[Literal["blob"]] = None + + +class DocumentConversationChildChildCalloutChildCode(BaseModel): + text: str + + id: Optional[str] = None + + language: Optional[str] = None + + type: Optional[Literal["code"]] = None + + +class DocumentConversationChildChildCalloutChildComment(BaseModel): + text: str + + id: Optional[str] = None + + created_at: Optional[datetime] = None + + type: Optional[Literal["comment"]] = None + + +class DocumentConversationChildChildCalloutChildDivider(BaseModel): + id: Optional[str] = None + + type: Optional[Literal["divider"]] = None + + +class DocumentConversationChildChildCalloutChildImage(BaseModel): + src: str + + text: str + + id: Optional[str] = None + + type: Optional[Literal["image"]] = None + + +class DocumentConversationChildChildCalloutChildLink(BaseModel): + text: str + + url: str + + id: Optional[str] = None + + type: Optional[Literal["link"]] = None + + +class DocumentConversationChildChildCalloutChildLineBreak(BaseModel): + id: Optional[str] = None + + type: Optional[Literal["line_break"]] = None + + +class DocumentConversationChildChildCalloutChildText(BaseModel): + text: str + + id: Optional[str] = None + + marks: Optional[List[Literal["bold", "italic", "underline", "strikethrough", "code", "math"]]] = None + + type: Optional[Literal["text"]] = None + + +class DocumentConversationChildChildCalloutChildToolCall(BaseModel): + """A tool/function call made by the assistant.""" + + tool_call_id: str + + tool_name: str + + id: Optional[str] = None + + args: Optional[Dict[str, object]] = None + + type: Optional[Literal["tool_call"]] = None + + +class DocumentConversationChildChildCalloutChildToolResult(BaseModel): + """The result of a tool call.""" + + output: Union[str, Dict[str, object], List[object]] + + tool_call_id: str + + tool_name: str + + id: Optional[str] = None + + is_error: Optional[bool] = None + + type: Optional[Literal["tool_result"]] = None + + +class DocumentConversationChildChildCalloutChildTraceMessage(BaseModel): + """A message in an agent trace (user message, assistant message, or thinking).""" + + text: str + + id: Optional[str] = None + + message_type: Optional[Literal["message", "thinking"]] = None + + role: Optional[Literal["user", "assistant"]] = None + + timestamp: Optional[datetime] = None + + type: Optional[Literal["trace_message"]] = None + + +DocumentConversationChildChildCalloutChild: TypeAlias = Union[ + DocumentConversationChildChildCalloutChildBlob, + DocumentConversationChildChildCalloutChildCode, + DocumentConversationChildChildCalloutChildComment, + DocumentConversationChildChildCalloutChildDivider, + DocumentConversationChildChildCalloutChildImage, + DocumentConversationChildChildCalloutChildLink, + DocumentConversationChildChildCalloutChildLineBreak, + DocumentConversationChildChildCalloutChildText, + DocumentConversationChildChildCalloutChildToolCall, + DocumentConversationChildChildCalloutChildToolResult, + DocumentConversationChildChildCalloutChildTraceMessage, + object, +] + + +class DocumentConversationChildChildCallout(BaseModel): + id: Optional[str] = None + + children: Optional[List[DocumentConversationChildChildCalloutChild]] = None + + text: Optional[str] = None + + title: Optional[str] = None + + type: Optional[Literal["callout"]] = None + + +class DocumentConversationChildChildChunkChildBlob(BaseModel): + """Represents embedded binary data using data URI scheme. + + Format: data:[][;base64], + Example: data:text/html;base64,PGh0bWw+... + """ + + data: str + + mimetype: str + + id: Optional[str] = None + + type: Optional[Literal["blob"]] = None + + +class DocumentConversationChildChildChunkChildCode(BaseModel): + text: str + + id: Optional[str] = None + + language: Optional[str] = None + + type: Optional[Literal["code"]] = None + + +class DocumentConversationChildChildChunkChildComment(BaseModel): + text: str + + id: Optional[str] = None + + created_at: Optional[datetime] = None + + type: Optional[Literal["comment"]] = None + + +class DocumentConversationChildChildChunkChildDivider(BaseModel): + id: Optional[str] = None + + type: Optional[Literal["divider"]] = None + + +class DocumentConversationChildChildChunkChildImage(BaseModel): + src: str + + text: str + + id: Optional[str] = None + + type: Optional[Literal["image"]] = None + + +class DocumentConversationChildChildChunkChildLink(BaseModel): + text: str + + url: str + + id: Optional[str] = None + + type: Optional[Literal["link"]] = None + + +class DocumentConversationChildChildChunkChildLineBreak(BaseModel): + id: Optional[str] = None + + type: Optional[Literal["line_break"]] = None + + +class DocumentConversationChildChildChunkChildText(BaseModel): + text: str + + id: Optional[str] = None + + marks: Optional[List[Literal["bold", "italic", "underline", "strikethrough", "code", "math"]]] = None + + type: Optional[Literal["text"]] = None + + +class DocumentConversationChildChildChunkChildToolCall(BaseModel): + """A tool/function call made by the assistant.""" + + tool_call_id: str + + tool_name: str + + id: Optional[str] = None + + args: Optional[Dict[str, object]] = None + + type: Optional[Literal["tool_call"]] = None + + +class DocumentConversationChildChildChunkChildToolResult(BaseModel): + """The result of a tool call.""" + + output: Union[str, Dict[str, object], List[object]] + + tool_call_id: str + + tool_name: str + + id: Optional[str] = None + + is_error: Optional[bool] = None + + type: Optional[Literal["tool_result"]] = None + + +class DocumentConversationChildChildChunkChildTraceMessage(BaseModel): + """A message in an agent trace (user message, assistant message, or thinking).""" + + text: str + + id: Optional[str] = None + + message_type: Optional[Literal["message", "thinking"]] = None + + role: Optional[Literal["user", "assistant"]] = None + + timestamp: Optional[datetime] = None + + type: Optional[Literal["trace_message"]] = None + + +DocumentConversationChildChildChunkChild: TypeAlias = Union[ + DocumentConversationChildChildChunkChildBlob, + DocumentConversationChildChildChunkChildCode, + DocumentConversationChildChildChunkChildComment, + DocumentConversationChildChildChunkChildDivider, + DocumentConversationChildChildChunkChildImage, + DocumentConversationChildChildChunkChildLink, + DocumentConversationChildChildChunkChildLineBreak, + DocumentConversationChildChildChunkChildText, + DocumentConversationChildChildChunkChildToolCall, + DocumentConversationChildChildChunkChildToolResult, + DocumentConversationChildChildChunkChildTraceMessage, + object, +] + + +class DocumentConversationChildChildChunk(BaseModel): + id: Optional[str] = None + + children: Optional[List[DocumentConversationChildChildChunkChild]] = None + + text: Optional[str] = None + + type: Optional[Literal["chunk"]] = None + + +class DocumentConversationChildChildCode(BaseModel): + text: str + + id: Optional[str] = None + + language: Optional[str] = None + + type: Optional[Literal["code"]] = None + + +class DocumentConversationChildChildComment(BaseModel): + text: str + + id: Optional[str] = None + + created_at: Optional[datetime] = None + + type: Optional[Literal["comment"]] = None + + +class DocumentConversationChildChildDivider(BaseModel): + id: Optional[str] = None + + type: Optional[Literal["divider"]] = None + + +class DocumentConversationChildChildEquationChildBlob(BaseModel): + """Represents embedded binary data using data URI scheme. + + Format: data:[][;base64], + Example: data:text/html;base64,PGh0bWw+... + """ + + data: str + + mimetype: str + + id: Optional[str] = None + + type: Optional[Literal["blob"]] = None + + +class DocumentConversationChildChildEquationChildCode(BaseModel): + text: str + + id: Optional[str] = None + + language: Optional[str] = None + + type: Optional[Literal["code"]] = None + + +class DocumentConversationChildChildEquationChildComment(BaseModel): + text: str + + id: Optional[str] = None + + created_at: Optional[datetime] = None + + type: Optional[Literal["comment"]] = None + + +class DocumentConversationChildChildEquationChildDivider(BaseModel): + id: Optional[str] = None + + type: Optional[Literal["divider"]] = None + + +class DocumentConversationChildChildEquationChildImage(BaseModel): + src: str + + text: str + + id: Optional[str] = None + + type: Optional[Literal["image"]] = None + + +class DocumentConversationChildChildEquationChildLink(BaseModel): + text: str + + url: str + + id: Optional[str] = None + + type: Optional[Literal["link"]] = None + + +class DocumentConversationChildChildEquationChildLineBreak(BaseModel): + id: Optional[str] = None + + type: Optional[Literal["line_break"]] = None + + +class DocumentConversationChildChildEquationChildText(BaseModel): + text: str + + id: Optional[str] = None + + marks: Optional[List[Literal["bold", "italic", "underline", "strikethrough", "code", "math"]]] = None + + type: Optional[Literal["text"]] = None + + +class DocumentConversationChildChildEquationChildToolCall(BaseModel): + """A tool/function call made by the assistant.""" + + tool_call_id: str + + tool_name: str + + id: Optional[str] = None + + args: Optional[Dict[str, object]] = None + + type: Optional[Literal["tool_call"]] = None + + +class DocumentConversationChildChildEquationChildToolResult(BaseModel): + """The result of a tool call.""" + + output: Union[str, Dict[str, object], List[object]] + + tool_call_id: str + + tool_name: str + + id: Optional[str] = None + + is_error: Optional[bool] = None + + type: Optional[Literal["tool_result"]] = None + + +class DocumentConversationChildChildEquationChildTraceMessage(BaseModel): + """A message in an agent trace (user message, assistant message, or thinking).""" + + text: str + + id: Optional[str] = None + + message_type: Optional[Literal["message", "thinking"]] = None + + role: Optional[Literal["user", "assistant"]] = None + + timestamp: Optional[datetime] = None + + type: Optional[Literal["trace_message"]] = None + + +DocumentConversationChildChildEquationChild: TypeAlias = Union[ + DocumentConversationChildChildEquationChildBlob, + DocumentConversationChildChildEquationChildCode, + DocumentConversationChildChildEquationChildComment, + DocumentConversationChildChildEquationChildDivider, + DocumentConversationChildChildEquationChildImage, + DocumentConversationChildChildEquationChildLink, + DocumentConversationChildChildEquationChildLineBreak, + DocumentConversationChildChildEquationChildText, + DocumentConversationChildChildEquationChildToolCall, + DocumentConversationChildChildEquationChildToolResult, + DocumentConversationChildChildEquationChildTraceMessage, + object, +] + + +class DocumentConversationChildChildEquation(BaseModel): + id: Optional[str] = None + + children: Optional[List[DocumentConversationChildChildEquationChild]] = None + + text: Optional[str] = None + + type: Optional[Literal["equation"]] = None + + +class DocumentConversationChildChildFootnoteChildBlob(BaseModel): + """Represents embedded binary data using data URI scheme. + + Format: data:[][;base64], + Example: data:text/html;base64,PGh0bWw+... + """ + + data: str + + mimetype: str + + id: Optional[str] = None + + type: Optional[Literal["blob"]] = None + + +class DocumentConversationChildChildFootnoteChildCode(BaseModel): + text: str + + id: Optional[str] = None + + language: Optional[str] = None + + type: Optional[Literal["code"]] = None + + +class DocumentConversationChildChildFootnoteChildComment(BaseModel): + text: str + + id: Optional[str] = None + + created_at: Optional[datetime] = None + + type: Optional[Literal["comment"]] = None + + +class DocumentConversationChildChildFootnoteChildDivider(BaseModel): + id: Optional[str] = None + + type: Optional[Literal["divider"]] = None + + +class DocumentConversationChildChildFootnoteChildImage(BaseModel): + src: str + + text: str + + id: Optional[str] = None + + type: Optional[Literal["image"]] = None + + +class DocumentConversationChildChildFootnoteChildLink(BaseModel): + text: str + + url: str + + id: Optional[str] = None + + type: Optional[Literal["link"]] = None + + +class DocumentConversationChildChildFootnoteChildLineBreak(BaseModel): + id: Optional[str] = None + + type: Optional[Literal["line_break"]] = None + + +class DocumentConversationChildChildFootnoteChildText(BaseModel): + text: str + + id: Optional[str] = None + + marks: Optional[List[Literal["bold", "italic", "underline", "strikethrough", "code", "math"]]] = None + + type: Optional[Literal["text"]] = None + + +class DocumentConversationChildChildFootnoteChildToolCall(BaseModel): + """A tool/function call made by the assistant.""" + + tool_call_id: str + + tool_name: str + + id: Optional[str] = None + + args: Optional[Dict[str, object]] = None + + type: Optional[Literal["tool_call"]] = None + + +class DocumentConversationChildChildFootnoteChildToolResult(BaseModel): + """The result of a tool call.""" + + output: Union[str, Dict[str, object], List[object]] + + tool_call_id: str + + tool_name: str + + id: Optional[str] = None + + is_error: Optional[bool] = None + + type: Optional[Literal["tool_result"]] = None + + +class DocumentConversationChildChildFootnoteChildTraceMessage(BaseModel): + """A message in an agent trace (user message, assistant message, or thinking).""" + + text: str + + id: Optional[str] = None + + message_type: Optional[Literal["message", "thinking"]] = None + + role: Optional[Literal["user", "assistant"]] = None + + timestamp: Optional[datetime] = None + + type: Optional[Literal["trace_message"]] = None + + +DocumentConversationChildChildFootnoteChild: TypeAlias = Union[ + DocumentConversationChildChildFootnoteChildBlob, + DocumentConversationChildChildFootnoteChildCode, + DocumentConversationChildChildFootnoteChildComment, + DocumentConversationChildChildFootnoteChildDivider, + DocumentConversationChildChildFootnoteChildImage, + DocumentConversationChildChildFootnoteChildLink, + DocumentConversationChildChildFootnoteChildLineBreak, + DocumentConversationChildChildFootnoteChildText, + DocumentConversationChildChildFootnoteChildToolCall, + DocumentConversationChildChildFootnoteChildToolResult, + DocumentConversationChildChildFootnoteChildTraceMessage, + object, +] + + +class DocumentConversationChildChildFootnote(BaseModel): + id: Optional[str] = None + + children: Optional[List[DocumentConversationChildChildFootnoteChild]] = None + + text: Optional[str] = None + + type: Optional[Literal["footnote"]] = None + + +class DocumentConversationChildChildHeadingChildBlob(BaseModel): + """Represents embedded binary data using data URI scheme. + + Format: data:[][;base64], + Example: data:text/html;base64,PGh0bWw+... + """ + + data: str + + mimetype: str + + id: Optional[str] = None + + type: Optional[Literal["blob"]] = None + + +class DocumentConversationChildChildHeadingChildCode(BaseModel): + text: str + + id: Optional[str] = None + + language: Optional[str] = None + + type: Optional[Literal["code"]] = None + + +class DocumentConversationChildChildHeadingChildComment(BaseModel): + text: str + + id: Optional[str] = None + + created_at: Optional[datetime] = None + + type: Optional[Literal["comment"]] = None + + +class DocumentConversationChildChildHeadingChildDivider(BaseModel): + id: Optional[str] = None + + type: Optional[Literal["divider"]] = None + + +class DocumentConversationChildChildHeadingChildImage(BaseModel): + src: str + + text: str + + id: Optional[str] = None + + type: Optional[Literal["image"]] = None + + +class DocumentConversationChildChildHeadingChildLink(BaseModel): + text: str + + url: str + + id: Optional[str] = None + + type: Optional[Literal["link"]] = None + + +class DocumentConversationChildChildHeadingChildLineBreak(BaseModel): + id: Optional[str] = None + + type: Optional[Literal["line_break"]] = None + + +class DocumentConversationChildChildHeadingChildText(BaseModel): + text: str + + id: Optional[str] = None + + marks: Optional[List[Literal["bold", "italic", "underline", "strikethrough", "code", "math"]]] = None + + type: Optional[Literal["text"]] = None + + +class DocumentConversationChildChildHeadingChildToolCall(BaseModel): + """A tool/function call made by the assistant.""" + + tool_call_id: str + + tool_name: str + + id: Optional[str] = None + + args: Optional[Dict[str, object]] = None + + type: Optional[Literal["tool_call"]] = None + + +class DocumentConversationChildChildHeadingChildToolResult(BaseModel): + """The result of a tool call.""" + + output: Union[str, Dict[str, object], List[object]] + + tool_call_id: str + + tool_name: str + + id: Optional[str] = None + + is_error: Optional[bool] = None + + type: Optional[Literal["tool_result"]] = None + + +class DocumentConversationChildChildHeadingChildTraceMessage(BaseModel): + """A message in an agent trace (user message, assistant message, or thinking).""" + + text: str + + id: Optional[str] = None + + message_type: Optional[Literal["message", "thinking"]] = None + + role: Optional[Literal["user", "assistant"]] = None + + timestamp: Optional[datetime] = None + + type: Optional[Literal["trace_message"]] = None + + +DocumentConversationChildChildHeadingChild: TypeAlias = Union[ + DocumentConversationChildChildHeadingChildBlob, + DocumentConversationChildChildHeadingChildCode, + DocumentConversationChildChildHeadingChildComment, + DocumentConversationChildChildHeadingChildDivider, + DocumentConversationChildChildHeadingChildImage, + DocumentConversationChildChildHeadingChildLink, + DocumentConversationChildChildHeadingChildLineBreak, + DocumentConversationChildChildHeadingChildText, + DocumentConversationChildChildHeadingChildToolCall, + DocumentConversationChildChildHeadingChildToolResult, + DocumentConversationChildChildHeadingChildTraceMessage, + object, +] + + +class DocumentConversationChildChildHeading(BaseModel): + level: int + + id: Optional[str] = None + + children: Optional[List[DocumentConversationChildChildHeadingChild]] = None + + text: Optional[str] = None + + type: Optional[Literal["heading"]] = None + + +class DocumentConversationChildChildImage(BaseModel): + src: str + + text: str + + id: Optional[str] = None + + type: Optional[Literal["image"]] = None + + +class DocumentConversationChildChildLink(BaseModel): + text: str + + url: str + + id: Optional[str] = None + + type: Optional[Literal["link"]] = None + + +class DocumentConversationChildChildLineBreak(BaseModel): + id: Optional[str] = None + + type: Optional[Literal["line_break"]] = None + + +class DocumentConversationChildChildList(BaseModel): + id: Optional[str] = None + + children: Optional[List[object]] = None + + ordered: Optional[bool] = None + + text: Optional[str] = None + + type: Optional[Literal["list"]] = None + + +class DocumentConversationChildChildListItemChildBlob(BaseModel): + """Represents embedded binary data using data URI scheme. + + Format: data:[][;base64], + Example: data:text/html;base64,PGh0bWw+... + """ + + data: str + + mimetype: str + + id: Optional[str] = None + + type: Optional[Literal["blob"]] = None + + +class DocumentConversationChildChildListItemChildCode(BaseModel): + text: str + + id: Optional[str] = None + + language: Optional[str] = None + + type: Optional[Literal["code"]] = None + + +class DocumentConversationChildChildListItemChildComment(BaseModel): + text: str + + id: Optional[str] = None + + created_at: Optional[datetime] = None + + type: Optional[Literal["comment"]] = None + + +class DocumentConversationChildChildListItemChildDivider(BaseModel): + id: Optional[str] = None + + type: Optional[Literal["divider"]] = None + + +class DocumentConversationChildChildListItemChildImage(BaseModel): + src: str + + text: str + + id: Optional[str] = None + + type: Optional[Literal["image"]] = None + + +class DocumentConversationChildChildListItemChildLink(BaseModel): + text: str + + url: str + + id: Optional[str] = None + + type: Optional[Literal["link"]] = None + + +class DocumentConversationChildChildListItemChildLineBreak(BaseModel): + id: Optional[str] = None + + type: Optional[Literal["line_break"]] = None + + +class DocumentConversationChildChildListItemChildText(BaseModel): + text: str + + id: Optional[str] = None + + marks: Optional[List[Literal["bold", "italic", "underline", "strikethrough", "code", "math"]]] = None + + type: Optional[Literal["text"]] = None + + +class DocumentConversationChildChildListItemChildToolCall(BaseModel): + """A tool/function call made by the assistant.""" + + tool_call_id: str + + tool_name: str + + id: Optional[str] = None + + args: Optional[Dict[str, object]] = None + + type: Optional[Literal["tool_call"]] = None + + +class DocumentConversationChildChildListItemChildToolResult(BaseModel): + """The result of a tool call.""" + + output: Union[str, Dict[str, object], List[object]] + + tool_call_id: str + + tool_name: str + + id: Optional[str] = None + + is_error: Optional[bool] = None + + type: Optional[Literal["tool_result"]] = None + + +class DocumentConversationChildChildListItemChildTraceMessage(BaseModel): + """A message in an agent trace (user message, assistant message, or thinking).""" + + text: str + + id: Optional[str] = None + + message_type: Optional[Literal["message", "thinking"]] = None + + role: Optional[Literal["user", "assistant"]] = None + + timestamp: Optional[datetime] = None + + type: Optional[Literal["trace_message"]] = None + + +DocumentConversationChildChildListItemChild: TypeAlias = Union[ + DocumentConversationChildChildListItemChildBlob, + DocumentConversationChildChildListItemChildCode, + DocumentConversationChildChildListItemChildComment, + DocumentConversationChildChildListItemChildDivider, + DocumentConversationChildChildListItemChildImage, + DocumentConversationChildChildListItemChildLink, + DocumentConversationChildChildListItemChildLineBreak, + DocumentConversationChildChildListItemChildText, + DocumentConversationChildChildListItemChildToolCall, + DocumentConversationChildChildListItemChildToolResult, + DocumentConversationChildChildListItemChildTraceMessage, + object, +] + + +class DocumentConversationChildChildListItem(BaseModel): + id: Optional[str] = None + + children: Optional[List[DocumentConversationChildChildListItemChild]] = None + + text: Optional[str] = None + + type: Optional[Literal["list_item"]] = None + + +class DocumentConversationChildChildParagraphChildBlob(BaseModel): + """Represents embedded binary data using data URI scheme. + + Format: data:[][;base64], + Example: data:text/html;base64,PGh0bWw+... + """ + + data: str + + mimetype: str + + id: Optional[str] = None + + type: Optional[Literal["blob"]] = None + + +class DocumentConversationChildChildParagraphChildCode(BaseModel): + text: str + + id: Optional[str] = None + + language: Optional[str] = None + + type: Optional[Literal["code"]] = None + + +class DocumentConversationChildChildParagraphChildComment(BaseModel): + text: str + + id: Optional[str] = None + + created_at: Optional[datetime] = None + + type: Optional[Literal["comment"]] = None + + +class DocumentConversationChildChildParagraphChildDivider(BaseModel): + id: Optional[str] = None + + type: Optional[Literal["divider"]] = None + + +class DocumentConversationChildChildParagraphChildImage(BaseModel): + src: str + + text: str + + id: Optional[str] = None + + type: Optional[Literal["image"]] = None + + +class DocumentConversationChildChildParagraphChildLink(BaseModel): + text: str + + url: str + + id: Optional[str] = None + + type: Optional[Literal["link"]] = None + + +class DocumentConversationChildChildParagraphChildLineBreak(BaseModel): + id: Optional[str] = None + + type: Optional[Literal["line_break"]] = None + + +class DocumentConversationChildChildParagraphChildText(BaseModel): + text: str + + id: Optional[str] = None + + marks: Optional[List[Literal["bold", "italic", "underline", "strikethrough", "code", "math"]]] = None + + type: Optional[Literal["text"]] = None + + +class DocumentConversationChildChildParagraphChildToolCall(BaseModel): + """A tool/function call made by the assistant.""" + + tool_call_id: str + + tool_name: str + + id: Optional[str] = None + + args: Optional[Dict[str, object]] = None + + type: Optional[Literal["tool_call"]] = None + + +class DocumentConversationChildChildParagraphChildToolResult(BaseModel): + """The result of a tool call.""" + + output: Union[str, Dict[str, object], List[object]] + + tool_call_id: str + + tool_name: str + + id: Optional[str] = None + + is_error: Optional[bool] = None + + type: Optional[Literal["tool_result"]] = None + + +class DocumentConversationChildChildParagraphChildTraceMessage(BaseModel): + """A message in an agent trace (user message, assistant message, or thinking).""" + + text: str + + id: Optional[str] = None + + message_type: Optional[Literal["message", "thinking"]] = None + + role: Optional[Literal["user", "assistant"]] = None + + timestamp: Optional[datetime] = None + + type: Optional[Literal["trace_message"]] = None + + +DocumentConversationChildChildParagraphChild: TypeAlias = Union[ + DocumentConversationChildChildParagraphChildBlob, + DocumentConversationChildChildParagraphChildCode, + DocumentConversationChildChildParagraphChildComment, + DocumentConversationChildChildParagraphChildDivider, + DocumentConversationChildChildParagraphChildImage, + DocumentConversationChildChildParagraphChildLink, + DocumentConversationChildChildParagraphChildLineBreak, + DocumentConversationChildChildParagraphChildText, + DocumentConversationChildChildParagraphChildToolCall, + DocumentConversationChildChildParagraphChildToolResult, + DocumentConversationChildChildParagraphChildTraceMessage, + object, +] + + +class DocumentConversationChildChildParagraph(BaseModel): + id: Optional[str] = None + + children: Optional[List[DocumentConversationChildChildParagraphChild]] = None + + text: Optional[str] = None + + type: Optional[Literal["paragraph"]] = None + + +class DocumentConversationChildChildQuoteChildBlob(BaseModel): + """Represents embedded binary data using data URI scheme. + + Format: data:[][;base64], + Example: data:text/html;base64,PGh0bWw+... + """ + + data: str + + mimetype: str + + id: Optional[str] = None + + type: Optional[Literal["blob"]] = None + + +class DocumentConversationChildChildQuoteChildCode(BaseModel): + text: str + + id: Optional[str] = None + + language: Optional[str] = None + + type: Optional[Literal["code"]] = None + + +class DocumentConversationChildChildQuoteChildComment(BaseModel): + text: str + + id: Optional[str] = None + + created_at: Optional[datetime] = None + + type: Optional[Literal["comment"]] = None + + +class DocumentConversationChildChildQuoteChildDivider(BaseModel): + id: Optional[str] = None + + type: Optional[Literal["divider"]] = None + + +class DocumentConversationChildChildQuoteChildImage(BaseModel): + src: str + + text: str + + id: Optional[str] = None + + type: Optional[Literal["image"]] = None + + +class DocumentConversationChildChildQuoteChildLink(BaseModel): + text: str + + url: str + + id: Optional[str] = None + + type: Optional[Literal["link"]] = None + + +class DocumentConversationChildChildQuoteChildLineBreak(BaseModel): + id: Optional[str] = None + + type: Optional[Literal["line_break"]] = None + + +class DocumentConversationChildChildQuoteChildText(BaseModel): + text: str + + id: Optional[str] = None + + marks: Optional[List[Literal["bold", "italic", "underline", "strikethrough", "code", "math"]]] = None + + type: Optional[Literal["text"]] = None + + +class DocumentConversationChildChildQuoteChildToolCall(BaseModel): + """A tool/function call made by the assistant.""" + + tool_call_id: str + + tool_name: str + + id: Optional[str] = None + + args: Optional[Dict[str, object]] = None + + type: Optional[Literal["tool_call"]] = None + + +class DocumentConversationChildChildQuoteChildToolResult(BaseModel): + """The result of a tool call.""" + + output: Union[str, Dict[str, object], List[object]] + + tool_call_id: str + + tool_name: str + + id: Optional[str] = None + + is_error: Optional[bool] = None + + type: Optional[Literal["tool_result"]] = None + + +class DocumentConversationChildChildQuoteChildTraceMessage(BaseModel): + """A message in an agent trace (user message, assistant message, or thinking).""" + + text: str + + id: Optional[str] = None + + message_type: Optional[Literal["message", "thinking"]] = None + + role: Optional[Literal["user", "assistant"]] = None + + timestamp: Optional[datetime] = None + + type: Optional[Literal["trace_message"]] = None + + +DocumentConversationChildChildQuoteChild: TypeAlias = Union[ + DocumentConversationChildChildQuoteChildBlob, + DocumentConversationChildChildQuoteChildCode, + DocumentConversationChildChildQuoteChildComment, + DocumentConversationChildChildQuoteChildDivider, + DocumentConversationChildChildQuoteChildImage, + DocumentConversationChildChildQuoteChildLink, + DocumentConversationChildChildQuoteChildLineBreak, + DocumentConversationChildChildQuoteChildText, + DocumentConversationChildChildQuoteChildToolCall, + DocumentConversationChildChildQuoteChildToolResult, + DocumentConversationChildChildQuoteChildTraceMessage, + object, +] + + +class DocumentConversationChildChildQuote(BaseModel): + id: Optional[str] = None + + children: Optional[List[DocumentConversationChildChildQuoteChild]] = None + + text: Optional[str] = None + + type: Optional[Literal["quote"]] = None + + +class DocumentConversationChildChildTable(BaseModel): + id: Optional[str] = None + + children: Optional[List[object]] = None + + has_header: Optional[bool] = None + """Whether the first row should be treated as a header""" + + text: Optional[str] = None + + type: Optional[Literal["table"]] = None + + +class DocumentConversationChildChildTableCellChildBlob(BaseModel): + """Represents embedded binary data using data URI scheme. + + Format: data:[][;base64], + Example: data:text/html;base64,PGh0bWw+... + """ + + data: str + + mimetype: str + + id: Optional[str] = None + + type: Optional[Literal["blob"]] = None + + +class DocumentConversationChildChildTableCellChildCode(BaseModel): + text: str + + id: Optional[str] = None + + language: Optional[str] = None + + type: Optional[Literal["code"]] = None + + +class DocumentConversationChildChildTableCellChildComment(BaseModel): + text: str + + id: Optional[str] = None + + created_at: Optional[datetime] = None + + type: Optional[Literal["comment"]] = None + + +class DocumentConversationChildChildTableCellChildDivider(BaseModel): + id: Optional[str] = None + + type: Optional[Literal["divider"]] = None + + +class DocumentConversationChildChildTableCellChildImage(BaseModel): + src: str + + text: str + + id: Optional[str] = None + + type: Optional[Literal["image"]] = None + + +class DocumentConversationChildChildTableCellChildLink(BaseModel): + text: str + + url: str + + id: Optional[str] = None + + type: Optional[Literal["link"]] = None + + +class DocumentConversationChildChildTableCellChildLineBreak(BaseModel): + id: Optional[str] = None + + type: Optional[Literal["line_break"]] = None + + +class DocumentConversationChildChildTableCellChildText(BaseModel): + text: str + + id: Optional[str] = None + + marks: Optional[List[Literal["bold", "italic", "underline", "strikethrough", "code", "math"]]] = None + + type: Optional[Literal["text"]] = None + + +class DocumentConversationChildChildTableCellChildToolCall(BaseModel): + """A tool/function call made by the assistant.""" + + tool_call_id: str + + tool_name: str + + id: Optional[str] = None + + args: Optional[Dict[str, object]] = None + + type: Optional[Literal["tool_call"]] = None + + +class DocumentConversationChildChildTableCellChildToolResult(BaseModel): + """The result of a tool call.""" + + output: Union[str, Dict[str, object], List[object]] + + tool_call_id: str + + tool_name: str + + id: Optional[str] = None + + is_error: Optional[bool] = None + + type: Optional[Literal["tool_result"]] = None + + +class DocumentConversationChildChildTableCellChildTraceMessage(BaseModel): + """A message in an agent trace (user message, assistant message, or thinking).""" + + text: str + + id: Optional[str] = None + + message_type: Optional[Literal["message", "thinking"]] = None + + role: Optional[Literal["user", "assistant"]] = None + + timestamp: Optional[datetime] = None + + type: Optional[Literal["trace_message"]] = None + + +DocumentConversationChildChildTableCellChild: TypeAlias = Union[ + DocumentConversationChildChildTableCellChildBlob, + DocumentConversationChildChildTableCellChildCode, + DocumentConversationChildChildTableCellChildComment, + DocumentConversationChildChildTableCellChildDivider, + DocumentConversationChildChildTableCellChildImage, + DocumentConversationChildChildTableCellChildLink, + DocumentConversationChildChildTableCellChildLineBreak, + DocumentConversationChildChildTableCellChildText, + DocumentConversationChildChildTableCellChildToolCall, + DocumentConversationChildChildTableCellChildToolResult, + DocumentConversationChildChildTableCellChildTraceMessage, + object, +] + + +class DocumentConversationChildChildTableCell(BaseModel): + id: Optional[str] = None + + align: Optional[Literal["left", "center", "right"]] = None + + children: Optional[List[DocumentConversationChildChildTableCellChild]] = None + + text: Optional[str] = None + + type: Optional[Literal["table_cell"]] = None + + +class DocumentConversationChildChildTableRow(BaseModel): + id: Optional[str] = None + + children: Optional[List[object]] = None + + text: Optional[str] = None + + type: Optional[Literal["table_row"]] = None + + +class DocumentConversationChildChildText(BaseModel): + text: str + + id: Optional[str] = None + + marks: Optional[List[Literal["bold", "italic", "underline", "strikethrough", "code", "math"]]] = None + + type: Optional[Literal["text"]] = None + + +class DocumentConversationChildChildToDoChildBlob(BaseModel): + """Represents embedded binary data using data URI scheme. + + Format: data:[][;base64], + Example: data:text/html;base64,PGh0bWw+... + """ + + data: str + + mimetype: str + + id: Optional[str] = None + + type: Optional[Literal["blob"]] = None + + +class DocumentConversationChildChildToDoChildCode(BaseModel): + text: str + + id: Optional[str] = None + + language: Optional[str] = None + + type: Optional[Literal["code"]] = None + + +class DocumentConversationChildChildToDoChildComment(BaseModel): + text: str + + id: Optional[str] = None + + created_at: Optional[datetime] = None + + type: Optional[Literal["comment"]] = None + + +class DocumentConversationChildChildToDoChildDivider(BaseModel): + id: Optional[str] = None + + type: Optional[Literal["divider"]] = None + + +class DocumentConversationChildChildToDoChildImage(BaseModel): + src: str + + text: str + + id: Optional[str] = None + + type: Optional[Literal["image"]] = None + + +class DocumentConversationChildChildToDoChildLink(BaseModel): + text: str + + url: str + + id: Optional[str] = None + + type: Optional[Literal["link"]] = None + + +class DocumentConversationChildChildToDoChildLineBreak(BaseModel): + id: Optional[str] = None + + type: Optional[Literal["line_break"]] = None + + +class DocumentConversationChildChildToDoChildText(BaseModel): + text: str + + id: Optional[str] = None + + marks: Optional[List[Literal["bold", "italic", "underline", "strikethrough", "code", "math"]]] = None + + type: Optional[Literal["text"]] = None + + +class DocumentConversationChildChildToDoChildToolCall(BaseModel): + """A tool/function call made by the assistant.""" + + tool_call_id: str + + tool_name: str + + id: Optional[str] = None + + args: Optional[Dict[str, object]] = None + + type: Optional[Literal["tool_call"]] = None + + +class DocumentConversationChildChildToDoChildToolResult(BaseModel): + """The result of a tool call.""" + + output: Union[str, Dict[str, object], List[object]] + + tool_call_id: str + + tool_name: str + + id: Optional[str] = None + + is_error: Optional[bool] = None + + type: Optional[Literal["tool_result"]] = None + + +class DocumentConversationChildChildToDoChildTraceMessage(BaseModel): + """A message in an agent trace (user message, assistant message, or thinking).""" + + text: str + + id: Optional[str] = None + + message_type: Optional[Literal["message", "thinking"]] = None + + role: Optional[Literal["user", "assistant"]] = None + + timestamp: Optional[datetime] = None + + type: Optional[Literal["trace_message"]] = None + + +DocumentConversationChildChildToDoChild: TypeAlias = Union[ + DocumentConversationChildChildToDoChildBlob, + DocumentConversationChildChildToDoChildCode, + DocumentConversationChildChildToDoChildComment, + DocumentConversationChildChildToDoChildDivider, + DocumentConversationChildChildToDoChildImage, + DocumentConversationChildChildToDoChildLink, + DocumentConversationChildChildToDoChildLineBreak, + DocumentConversationChildChildToDoChildText, + DocumentConversationChildChildToDoChildToolCall, + DocumentConversationChildChildToDoChildToolResult, + DocumentConversationChildChildToDoChildTraceMessage, + object, +] + + +class DocumentConversationChildChildToDo(BaseModel): + id: Optional[str] = None + + checked: Optional[bool] = None + + children: Optional[List[DocumentConversationChildChildToDoChild]] = None + + text: Optional[str] = None + + type: Optional[Literal["todo"]] = None + + +class DocumentConversationChildChildToolCall(BaseModel): + """A tool/function call made by the assistant.""" + + tool_call_id: str + + tool_name: str + + id: Optional[str] = None + + args: Optional[Dict[str, object]] = None + + type: Optional[Literal["tool_call"]] = None + + +class DocumentConversationChildChildToolResult(BaseModel): + """The result of a tool call.""" + + output: Union[str, Dict[str, object], List[object]] + + tool_call_id: str + + tool_name: str + + id: Optional[str] = None + + is_error: Optional[bool] = None + + type: Optional[Literal["tool_result"]] = None + + +class DocumentConversationChildChildTraceMessage(BaseModel): + """A message in an agent trace (user message, assistant message, or thinking).""" + + text: str + + id: Optional[str] = None + + message_type: Optional[Literal["message", "thinking"]] = None + + role: Optional[Literal["user", "assistant"]] = None + + timestamp: Optional[datetime] = None + + type: Optional[Literal["trace_message"]] = None + + +class DocumentConversationChildChildUtterance(BaseModel): + """A speaker-attributed segment of a transcript (ENG-2476/D10). + + "Utterance" is the standard name for this across transcription providers + (AssemblyAI, Deepgram, Rev). Timestamps are relative offsets in seconds — + provider-native; absolute times derive from `Transcript.started_at`. + """ + + text: str + + id: Optional[str] = None + + end: Optional[float] = None + + speaker: Optional[object] = None + + start: Optional[float] = None + + type: Optional[Literal["utterance"]] = None + + +DocumentConversationChildChild: TypeAlias = Annotated[ + Union[ + DocumentConversationChildChildBlob, + DocumentConversationChildChildCallout, + DocumentConversationChildChildChunk, + DocumentConversationChildChildCode, + DocumentConversationChildChildComment, + DocumentConversationChildChildDivider, + DocumentConversationChildChildEquation, + DocumentConversationChildChildFootnote, + DocumentConversationChildChildHeading, + DocumentConversationChildChildImage, + DocumentConversationChildChildLink, + DocumentConversationChildChildLineBreak, + DocumentConversationChildChildList, + DocumentConversationChildChildListItem, + DocumentConversationChildChildParagraph, + DocumentConversationChildChildQuote, + DocumentConversationChildChildTable, + DocumentConversationChildChildTableCell, + DocumentConversationChildChildTableRow, + DocumentConversationChildChildText, + DocumentConversationChildChildToDo, + DocumentConversationChildChildToolCall, + DocumentConversationChildChildToolResult, + DocumentConversationChildChildTraceMessage, + DocumentConversationChildChildUtterance, + ], + PropertyInfo(discriminator="type"), +] + + +class DocumentConversationChildMentionedUserChildBlob(BaseModel): + """Represents embedded binary data using data URI scheme. + + Format: data:[][;base64], + Example: data:text/html;base64,PGh0bWw+... + """ + + data: str + + mimetype: str + + id: Optional[str] = None + + type: Optional[Literal["blob"]] = None + + +class DocumentConversationChildMentionedUserChildCode(BaseModel): + text: str + + id: Optional[str] = None + + language: Optional[str] = None + + type: Optional[Literal["code"]] = None + + +class DocumentConversationChildMentionedUserChildComment(BaseModel): + text: str + + id: Optional[str] = None + + created_at: Optional[datetime] = None + + type: Optional[Literal["comment"]] = None + + +class DocumentConversationChildMentionedUserChildDivider(BaseModel): + id: Optional[str] = None + + type: Optional[Literal["divider"]] = None + + +class DocumentConversationChildMentionedUserChildImage(BaseModel): + src: str + + text: str + + id: Optional[str] = None + + type: Optional[Literal["image"]] = None + + +class DocumentConversationChildMentionedUserChildLink(BaseModel): + text: str + + url: str + + id: Optional[str] = None + + type: Optional[Literal["link"]] = None + + +class DocumentConversationChildMentionedUserChildLineBreak(BaseModel): + id: Optional[str] = None + + type: Optional[Literal["line_break"]] = None + + +class DocumentConversationChildMentionedUserChildText(BaseModel): + text: str + + id: Optional[str] = None + + marks: Optional[List[Literal["bold", "italic", "underline", "strikethrough", "code", "math"]]] = None + + type: Optional[Literal["text"]] = None + + +class DocumentConversationChildMentionedUserChildToolCall(BaseModel): + """A tool/function call made by the assistant.""" + + tool_call_id: str + + tool_name: str + + id: Optional[str] = None + + args: Optional[Dict[str, object]] = None + + type: Optional[Literal["tool_call"]] = None + + +class DocumentConversationChildMentionedUserChildToolResult(BaseModel): + """The result of a tool call.""" + + output: Union[str, Dict[str, object], List[object]] + + tool_call_id: str + + tool_name: str + + id: Optional[str] = None + + is_error: Optional[bool] = None + + type: Optional[Literal["tool_result"]] = None + + +class DocumentConversationChildMentionedUserChildTraceMessage(BaseModel): + """A message in an agent trace (user message, assistant message, or thinking).""" + + text: str + + id: Optional[str] = None + + message_type: Optional[Literal["message", "thinking"]] = None + + role: Optional[Literal["user", "assistant"]] = None + + timestamp: Optional[datetime] = None + + type: Optional[Literal["trace_message"]] = None + + +DocumentConversationChildMentionedUserChild: TypeAlias = Union[ + DocumentConversationChildMentionedUserChildBlob, + DocumentConversationChildMentionedUserChildCode, + DocumentConversationChildMentionedUserChildComment, + DocumentConversationChildMentionedUserChildDivider, + DocumentConversationChildMentionedUserChildImage, + DocumentConversationChildMentionedUserChildLink, + DocumentConversationChildMentionedUserChildLineBreak, + DocumentConversationChildMentionedUserChildText, + DocumentConversationChildMentionedUserChildToolCall, + DocumentConversationChildMentionedUserChildToolResult, + DocumentConversationChildMentionedUserChildTraceMessage, + object, +] + + +class DocumentConversationChildMentionedUser(BaseModel): + id: Optional[str] = None + + address: Optional[str] = None + + alt_names: Optional[List[str]] = None + + children: Optional[List[DocumentConversationChildMentionedUserChild]] = None + + company: Optional[str] = None + + company_ids: Optional[List[str]] = None + + date_of_birth: Optional[date] = None + + deal_ids: Optional[List[str]] = None + + email: Optional[str] = None + + emails: Optional[List[str]] = None + """All known email addresses; `email` holds the primary one""" + + image_url: Optional[str] = None + + job_title: Optional[str] = None + + link_urls: Optional[List[str]] = None + + name: Optional[str] = None + + phone_numbers: Optional[List[str]] = None + + tags: Optional[List[str]] = None + + text: Optional[str] = None + + type: Optional[Literal["person"]] = None + + username: Optional[str] = None + + +class DocumentConversationChild(BaseModel): + date: datetime + + sender: DocumentConversationChildSender + + id: Optional[str] = None + + channel: Optional[str] = None + """ + The channel or platform where the message was posted, if this Message is not + explicitly part of a conversation + """ + + children: Optional[List[DocumentConversationChildChild]] = None + + external_id: Optional[str] = None + """Provider message id (e.g. Slack ts, Gmail message id) — merge-dedup key""" + + is_self: Optional[bool] = None + + mentioned_users: Optional[List[DocumentConversationChildMentionedUser]] = None + + num_replies: Optional[int] = None + + replies: Optional[List[object]] = None + """The replies or comments to the message""" + + text: Optional[str] = None + + thread_id: Optional[str] = None + + title: Optional[str] = None + """The subject or title of the message""" + + type: Optional[Literal["message"]] = None + + updated_at: Optional[datetime] = None + + upvotes: Optional[int] = None + """The number of upvotes, likes, or reactions on the message""" + + +class DocumentConversation(BaseModel): + id: Optional[str] = None + + channel: Optional[str] = None + + children: Optional[List[DocumentConversationChild]] = None + + text: Optional[str] = None + + type: Optional[Literal["conversation"]] = None + + +class DocumentTraceChildTraceMessage(BaseModel): + """A message in an agent trace (user message, assistant message, or thinking).""" + + text: str + + id: Optional[str] = None + + message_type: Optional[Literal["message", "thinking"]] = None + + role: Optional[Literal["user", "assistant"]] = None + + timestamp: Optional[datetime] = None + + type: Optional[Literal["trace_message"]] = None + + +class DocumentTraceChildToolCall(BaseModel): + """A tool/function call made by the assistant.""" + + tool_call_id: str + + tool_name: str + + id: Optional[str] = None + + args: Optional[Dict[str, object]] = None + + type: Optional[Literal["tool_call"]] = None + + +class DocumentTraceChildToolResult(BaseModel): + """The result of a tool call.""" + + output: Union[str, Dict[str, object], List[object]] + + tool_call_id: str + + tool_name: str + + id: Optional[str] = None + + is_error: Optional[bool] = None + + type: Optional[Literal["tool_result"]] = None + + +DocumentTraceChild: TypeAlias = Annotated[ + Union[DocumentTraceChildTraceMessage, DocumentTraceChildToolCall, DocumentTraceChildToolResult], + PropertyInfo(discriminator="type"), +] + + +class DocumentTrace(BaseModel): + """An agent trace/transcript containing a sequence of steps. + + Steps can be TraceMessage (user/assistant messages or thinking), + ToolCall (function calls), or ToolResult (tool responses). + """ + + id: Optional[str] = None + + children: Optional[List[DocumentTraceChild]] = None + + text: Optional[str] = None + + title: Optional[str] = None + + type: Optional[Literal["trace"]] = None + + +class DocumentTranscriptChild(BaseModel): + """A speaker-attributed segment of a transcript (ENG-2476/D10). + + "Utterance" is the standard name for this across transcription providers + (AssemblyAI, Deepgram, Rev). Timestamps are relative offsets in seconds — + provider-native; absolute times derive from `Transcript.started_at`. + """ + + text: str + + id: Optional[str] = None + + end: Optional[float] = None + + speaker: Optional[object] = None + + start: Optional[float] = None + + type: Optional[Literal["utterance"]] = None + + +class DocumentTranscriptParticipantChildBlob(BaseModel): + """Represents embedded binary data using data URI scheme. + + Format: data:[][;base64], + Example: data:text/html;base64,PGh0bWw+... + """ + + data: str + + mimetype: str + + id: Optional[str] = None + + type: Optional[Literal["blob"]] = None + + +class DocumentTranscriptParticipantChildCode(BaseModel): + text: str + + id: Optional[str] = None + + language: Optional[str] = None + + type: Optional[Literal["code"]] = None + + +class DocumentTranscriptParticipantChildComment(BaseModel): + text: str + + id: Optional[str] = None + + created_at: Optional[datetime] = None + + type: Optional[Literal["comment"]] = None + + +class DocumentTranscriptParticipantChildDivider(BaseModel): + id: Optional[str] = None + + type: Optional[Literal["divider"]] = None + + +class DocumentTranscriptParticipantChildImage(BaseModel): + src: str + + text: str + + id: Optional[str] = None + + type: Optional[Literal["image"]] = None + + +class DocumentTranscriptParticipantChildLink(BaseModel): + text: str + + url: str + + id: Optional[str] = None + + type: Optional[Literal["link"]] = None + + +class DocumentTranscriptParticipantChildLineBreak(BaseModel): + id: Optional[str] = None + + type: Optional[Literal["line_break"]] = None + + +class DocumentTranscriptParticipantChildText(BaseModel): + text: str + + id: Optional[str] = None + + marks: Optional[List[Literal["bold", "italic", "underline", "strikethrough", "code", "math"]]] = None + + type: Optional[Literal["text"]] = None + + +class DocumentTranscriptParticipantChildToolCall(BaseModel): + """A tool/function call made by the assistant.""" + + tool_call_id: str + + tool_name: str + + id: Optional[str] = None + + args: Optional[Dict[str, object]] = None + + type: Optional[Literal["tool_call"]] = None + + +class DocumentTranscriptParticipantChildToolResult(BaseModel): + """The result of a tool call.""" + + output: Union[str, Dict[str, object], List[object]] + + tool_call_id: str + + tool_name: str + + id: Optional[str] = None + + is_error: Optional[bool] = None + + type: Optional[Literal["tool_result"]] = None + + +class DocumentTranscriptParticipantChildTraceMessage(BaseModel): + """A message in an agent trace (user message, assistant message, or thinking).""" + + text: str + + id: Optional[str] = None + + message_type: Optional[Literal["message", "thinking"]] = None + + role: Optional[Literal["user", "assistant"]] = None + + timestamp: Optional[datetime] = None + + type: Optional[Literal["trace_message"]] = None + + +DocumentTranscriptParticipantChild: TypeAlias = Union[ + DocumentTranscriptParticipantChildBlob, + DocumentTranscriptParticipantChildCode, + DocumentTranscriptParticipantChildComment, + DocumentTranscriptParticipantChildDivider, + DocumentTranscriptParticipantChildImage, + DocumentTranscriptParticipantChildLink, + DocumentTranscriptParticipantChildLineBreak, + DocumentTranscriptParticipantChildText, + DocumentTranscriptParticipantChildToolCall, + DocumentTranscriptParticipantChildToolResult, + DocumentTranscriptParticipantChildTraceMessage, + object, +] + + +class DocumentTranscriptParticipant(BaseModel): + id: Optional[str] = None + + address: Optional[str] = None + + alt_names: Optional[List[str]] = None + + children: Optional[List[DocumentTranscriptParticipantChild]] = None + + company: Optional[str] = None + + company_ids: Optional[List[str]] = None + + date_of_birth: Optional[date] = None + + deal_ids: Optional[List[str]] = None + + email: Optional[str] = None + + emails: Optional[List[str]] = None + """All known email addresses; `email` holds the primary one""" + + image_url: Optional[str] = None + + job_title: Optional[str] = None + + link_urls: Optional[List[str]] = None + + name: Optional[str] = None + + phone_numbers: Optional[List[str]] = None + + tags: Optional[List[str]] = None + + text: Optional[str] = None + + type: Optional[Literal["person"]] = None + + username: Optional[str] = None + + +class DocumentTranscript(BaseModel): + """ + A time-anchored, speaker-attributed transcript — meetings, calls + (ENG-2476/D10; mirrors the Trace+TraceStep precedent). + + Utterance timestamps are relative offsets from `started_at`, which is the + absolute wall-clock anchor. + """ + + id: Optional[str] = None + + children: Optional[List[DocumentTranscriptChild]] = None + + ended_at: Optional[datetime] = None + + participants: Optional[List[DocumentTranscriptParticipant]] = None + + started_at: Optional[datetime] = None + + text: Optional[str] = None + + title: Optional[str] = None + + type: Optional[Literal["transcript"]] = None + + +class DocumentCompanyChildBlob(BaseModel): + """Represents embedded binary data using data URI scheme. + + Format: data:[][;base64], + Example: data:text/html;base64,PGh0bWw+... + """ + + data: str + + mimetype: str + + id: Optional[str] = None + + type: Optional[Literal["blob"]] = None + + +class DocumentCompanyChildCalloutChildBlob(BaseModel): + """Represents embedded binary data using data URI scheme. + + Format: data:[][;base64], + Example: data:text/html;base64,PGh0bWw+... + """ + + data: str + + mimetype: str + + id: Optional[str] = None + + type: Optional[Literal["blob"]] = None + + +class DocumentCompanyChildCalloutChildCode(BaseModel): + text: str + + id: Optional[str] = None + + language: Optional[str] = None + + type: Optional[Literal["code"]] = None + + +class DocumentCompanyChildCalloutChildComment(BaseModel): + text: str + + id: Optional[str] = None + + created_at: Optional[datetime] = None + + type: Optional[Literal["comment"]] = None + + +class DocumentCompanyChildCalloutChildDivider(BaseModel): + id: Optional[str] = None + + type: Optional[Literal["divider"]] = None + + +class DocumentCompanyChildCalloutChildImage(BaseModel): + src: str + + text: str + + id: Optional[str] = None + + type: Optional[Literal["image"]] = None + + +class DocumentCompanyChildCalloutChildLink(BaseModel): + text: str + + url: str + + id: Optional[str] = None + + type: Optional[Literal["link"]] = None + + +class DocumentCompanyChildCalloutChildLineBreak(BaseModel): + id: Optional[str] = None + + type: Optional[Literal["line_break"]] = None + + +class DocumentCompanyChildCalloutChildText(BaseModel): + text: str + + id: Optional[str] = None + + marks: Optional[List[Literal["bold", "italic", "underline", "strikethrough", "code", "math"]]] = None + + type: Optional[Literal["text"]] = None + + +class DocumentCompanyChildCalloutChildToolCall(BaseModel): + """A tool/function call made by the assistant.""" + + tool_call_id: str + + tool_name: str + + id: Optional[str] = None + + args: Optional[Dict[str, object]] = None + + type: Optional[Literal["tool_call"]] = None + + +class DocumentCompanyChildCalloutChildToolResult(BaseModel): + """The result of a tool call.""" + + output: Union[str, Dict[str, object], List[object]] + + tool_call_id: str + + tool_name: str + + id: Optional[str] = None + + is_error: Optional[bool] = None + + type: Optional[Literal["tool_result"]] = None + + +class DocumentCompanyChildCalloutChildTraceMessage(BaseModel): + """A message in an agent trace (user message, assistant message, or thinking).""" + + text: str + + id: Optional[str] = None + + message_type: Optional[Literal["message", "thinking"]] = None + + role: Optional[Literal["user", "assistant"]] = None + + timestamp: Optional[datetime] = None + + type: Optional[Literal["trace_message"]] = None + + +DocumentCompanyChildCalloutChild: TypeAlias = Union[ + DocumentCompanyChildCalloutChildBlob, + DocumentCompanyChildCalloutChildCode, + DocumentCompanyChildCalloutChildComment, + DocumentCompanyChildCalloutChildDivider, + DocumentCompanyChildCalloutChildImage, + DocumentCompanyChildCalloutChildLink, + DocumentCompanyChildCalloutChildLineBreak, + DocumentCompanyChildCalloutChildText, + DocumentCompanyChildCalloutChildToolCall, + DocumentCompanyChildCalloutChildToolResult, + DocumentCompanyChildCalloutChildTraceMessage, + object, +] + + +class DocumentCompanyChildCallout(BaseModel): + id: Optional[str] = None + + children: Optional[List[DocumentCompanyChildCalloutChild]] = None + + text: Optional[str] = None + + title: Optional[str] = None + + type: Optional[Literal["callout"]] = None + + +class DocumentCompanyChildChunkChildBlob(BaseModel): + """Represents embedded binary data using data URI scheme. + + Format: data:[][;base64], + Example: data:text/html;base64,PGh0bWw+... + """ + + data: str + + mimetype: str + + id: Optional[str] = None + + type: Optional[Literal["blob"]] = None + + +class DocumentCompanyChildChunkChildCode(BaseModel): + text: str + + id: Optional[str] = None + + language: Optional[str] = None + + type: Optional[Literal["code"]] = None + + +class DocumentCompanyChildChunkChildComment(BaseModel): + text: str + + id: Optional[str] = None + + created_at: Optional[datetime] = None + + type: Optional[Literal["comment"]] = None + + +class DocumentCompanyChildChunkChildDivider(BaseModel): + id: Optional[str] = None + + type: Optional[Literal["divider"]] = None + + +class DocumentCompanyChildChunkChildImage(BaseModel): + src: str + + text: str + + id: Optional[str] = None + + type: Optional[Literal["image"]] = None + + +class DocumentCompanyChildChunkChildLink(BaseModel): + text: str + + url: str + + id: Optional[str] = None + + type: Optional[Literal["link"]] = None + + +class DocumentCompanyChildChunkChildLineBreak(BaseModel): + id: Optional[str] = None + + type: Optional[Literal["line_break"]] = None + + +class DocumentCompanyChildChunkChildText(BaseModel): + text: str + + id: Optional[str] = None + + marks: Optional[List[Literal["bold", "italic", "underline", "strikethrough", "code", "math"]]] = None + + type: Optional[Literal["text"]] = None + + +class DocumentCompanyChildChunkChildToolCall(BaseModel): + """A tool/function call made by the assistant.""" + + tool_call_id: str + + tool_name: str + + id: Optional[str] = None + + args: Optional[Dict[str, object]] = None + + type: Optional[Literal["tool_call"]] = None + + +class DocumentCompanyChildChunkChildToolResult(BaseModel): + """The result of a tool call.""" + + output: Union[str, Dict[str, object], List[object]] + + tool_call_id: str + + tool_name: str + + id: Optional[str] = None + + is_error: Optional[bool] = None + + type: Optional[Literal["tool_result"]] = None + + +class DocumentCompanyChildChunkChildTraceMessage(BaseModel): + """A message in an agent trace (user message, assistant message, or thinking).""" + + text: str + + id: Optional[str] = None + + message_type: Optional[Literal["message", "thinking"]] = None + + role: Optional[Literal["user", "assistant"]] = None + + timestamp: Optional[datetime] = None + + type: Optional[Literal["trace_message"]] = None + + +DocumentCompanyChildChunkChild: TypeAlias = Union[ + DocumentCompanyChildChunkChildBlob, + DocumentCompanyChildChunkChildCode, + DocumentCompanyChildChunkChildComment, + DocumentCompanyChildChunkChildDivider, + DocumentCompanyChildChunkChildImage, + DocumentCompanyChildChunkChildLink, + DocumentCompanyChildChunkChildLineBreak, + DocumentCompanyChildChunkChildText, + DocumentCompanyChildChunkChildToolCall, + DocumentCompanyChildChunkChildToolResult, + DocumentCompanyChildChunkChildTraceMessage, + object, +] + + +class DocumentCompanyChildChunk(BaseModel): + id: Optional[str] = None + + children: Optional[List[DocumentCompanyChildChunkChild]] = None + + text: Optional[str] = None + + type: Optional[Literal["chunk"]] = None + + +class DocumentCompanyChildCode(BaseModel): + text: str + + id: Optional[str] = None + + language: Optional[str] = None + + type: Optional[Literal["code"]] = None + + +class DocumentCompanyChildComment(BaseModel): + text: str + + id: Optional[str] = None + + created_at: Optional[datetime] = None + + type: Optional[Literal["comment"]] = None + + +class DocumentCompanyChildDivider(BaseModel): + id: Optional[str] = None + + type: Optional[Literal["divider"]] = None + + +class DocumentCompanyChildEquationChildBlob(BaseModel): + """Represents embedded binary data using data URI scheme. + + Format: data:[][;base64], + Example: data:text/html;base64,PGh0bWw+... + """ + + data: str + + mimetype: str + + id: Optional[str] = None + + type: Optional[Literal["blob"]] = None + + +class DocumentCompanyChildEquationChildCode(BaseModel): + text: str + + id: Optional[str] = None + + language: Optional[str] = None + + type: Optional[Literal["code"]] = None + + +class DocumentCompanyChildEquationChildComment(BaseModel): + text: str + + id: Optional[str] = None + + created_at: Optional[datetime] = None + + type: Optional[Literal["comment"]] = None + + +class DocumentCompanyChildEquationChildDivider(BaseModel): + id: Optional[str] = None + + type: Optional[Literal["divider"]] = None + + +class DocumentCompanyChildEquationChildImage(BaseModel): + src: str + + text: str + + id: Optional[str] = None + + type: Optional[Literal["image"]] = None + + +class DocumentCompanyChildEquationChildLink(BaseModel): + text: str + + url: str + + id: Optional[str] = None + + type: Optional[Literal["link"]] = None + + +class DocumentCompanyChildEquationChildLineBreak(BaseModel): + id: Optional[str] = None + + type: Optional[Literal["line_break"]] = None + + +class DocumentCompanyChildEquationChildText(BaseModel): + text: str + + id: Optional[str] = None + + marks: Optional[List[Literal["bold", "italic", "underline", "strikethrough", "code", "math"]]] = None + + type: Optional[Literal["text"]] = None + + +class DocumentCompanyChildEquationChildToolCall(BaseModel): + """A tool/function call made by the assistant.""" + + tool_call_id: str + + tool_name: str + + id: Optional[str] = None + + args: Optional[Dict[str, object]] = None + + type: Optional[Literal["tool_call"]] = None + + +class DocumentCompanyChildEquationChildToolResult(BaseModel): + """The result of a tool call.""" + + output: Union[str, Dict[str, object], List[object]] + + tool_call_id: str + + tool_name: str + + id: Optional[str] = None + + is_error: Optional[bool] = None + + type: Optional[Literal["tool_result"]] = None + + +class DocumentCompanyChildEquationChildTraceMessage(BaseModel): + """A message in an agent trace (user message, assistant message, or thinking).""" + + text: str + + id: Optional[str] = None + + message_type: Optional[Literal["message", "thinking"]] = None + + role: Optional[Literal["user", "assistant"]] = None + + timestamp: Optional[datetime] = None + + type: Optional[Literal["trace_message"]] = None + + +DocumentCompanyChildEquationChild: TypeAlias = Union[ + DocumentCompanyChildEquationChildBlob, + DocumentCompanyChildEquationChildCode, + DocumentCompanyChildEquationChildComment, + DocumentCompanyChildEquationChildDivider, + DocumentCompanyChildEquationChildImage, + DocumentCompanyChildEquationChildLink, + DocumentCompanyChildEquationChildLineBreak, + DocumentCompanyChildEquationChildText, + DocumentCompanyChildEquationChildToolCall, + DocumentCompanyChildEquationChildToolResult, + DocumentCompanyChildEquationChildTraceMessage, + object, +] + + +class DocumentCompanyChildEquation(BaseModel): + id: Optional[str] = None + + children: Optional[List[DocumentCompanyChildEquationChild]] = None + + text: Optional[str] = None + + type: Optional[Literal["equation"]] = None + + +class DocumentCompanyChildFootnoteChildBlob(BaseModel): + """Represents embedded binary data using data URI scheme. + + Format: data:[][;base64], + Example: data:text/html;base64,PGh0bWw+... + """ + + data: str + + mimetype: str + + id: Optional[str] = None + + type: Optional[Literal["blob"]] = None + + +class DocumentCompanyChildFootnoteChildCode(BaseModel): + text: str + + id: Optional[str] = None + + language: Optional[str] = None + + type: Optional[Literal["code"]] = None + + +class DocumentCompanyChildFootnoteChildComment(BaseModel): + text: str + + id: Optional[str] = None + + created_at: Optional[datetime] = None + + type: Optional[Literal["comment"]] = None + + +class DocumentCompanyChildFootnoteChildDivider(BaseModel): + id: Optional[str] = None + + type: Optional[Literal["divider"]] = None + + +class DocumentCompanyChildFootnoteChildImage(BaseModel): + src: str + + text: str + + id: Optional[str] = None + + type: Optional[Literal["image"]] = None + + +class DocumentCompanyChildFootnoteChildLink(BaseModel): + text: str + + url: str + + id: Optional[str] = None + + type: Optional[Literal["link"]] = None + + +class DocumentCompanyChildFootnoteChildLineBreak(BaseModel): + id: Optional[str] = None + + type: Optional[Literal["line_break"]] = None + + +class DocumentCompanyChildFootnoteChildText(BaseModel): + text: str + + id: Optional[str] = None + + marks: Optional[List[Literal["bold", "italic", "underline", "strikethrough", "code", "math"]]] = None + + type: Optional[Literal["text"]] = None + + +class DocumentCompanyChildFootnoteChildToolCall(BaseModel): + """A tool/function call made by the assistant.""" + + tool_call_id: str + + tool_name: str + + id: Optional[str] = None + + args: Optional[Dict[str, object]] = None + + type: Optional[Literal["tool_call"]] = None + + +class DocumentCompanyChildFootnoteChildToolResult(BaseModel): + """The result of a tool call.""" + + output: Union[str, Dict[str, object], List[object]] + + tool_call_id: str + + tool_name: str + + id: Optional[str] = None + + is_error: Optional[bool] = None + + type: Optional[Literal["tool_result"]] = None + + +class DocumentCompanyChildFootnoteChildTraceMessage(BaseModel): + """A message in an agent trace (user message, assistant message, or thinking).""" + + text: str + + id: Optional[str] = None + + message_type: Optional[Literal["message", "thinking"]] = None + + role: Optional[Literal["user", "assistant"]] = None + + timestamp: Optional[datetime] = None + + type: Optional[Literal["trace_message"]] = None + + +DocumentCompanyChildFootnoteChild: TypeAlias = Union[ + DocumentCompanyChildFootnoteChildBlob, + DocumentCompanyChildFootnoteChildCode, + DocumentCompanyChildFootnoteChildComment, + DocumentCompanyChildFootnoteChildDivider, + DocumentCompanyChildFootnoteChildImage, + DocumentCompanyChildFootnoteChildLink, + DocumentCompanyChildFootnoteChildLineBreak, + DocumentCompanyChildFootnoteChildText, + DocumentCompanyChildFootnoteChildToolCall, + DocumentCompanyChildFootnoteChildToolResult, + DocumentCompanyChildFootnoteChildTraceMessage, + object, +] + + +class DocumentCompanyChildFootnote(BaseModel): + id: Optional[str] = None + + children: Optional[List[DocumentCompanyChildFootnoteChild]] = None + + text: Optional[str] = None + + type: Optional[Literal["footnote"]] = None + + +class DocumentCompanyChildHeadingChildBlob(BaseModel): + """Represents embedded binary data using data URI scheme. + + Format: data:[][;base64], + Example: data:text/html;base64,PGh0bWw+... + """ + + data: str + + mimetype: str + + id: Optional[str] = None + + type: Optional[Literal["blob"]] = None + + +class DocumentCompanyChildHeadingChildCode(BaseModel): + text: str + + id: Optional[str] = None + + language: Optional[str] = None + + type: Optional[Literal["code"]] = None + + +class DocumentCompanyChildHeadingChildComment(BaseModel): + text: str + + id: Optional[str] = None + + created_at: Optional[datetime] = None + + type: Optional[Literal["comment"]] = None + + +class DocumentCompanyChildHeadingChildDivider(BaseModel): + id: Optional[str] = None + + type: Optional[Literal["divider"]] = None + + +class DocumentCompanyChildHeadingChildImage(BaseModel): + src: str + + text: str + + id: Optional[str] = None + + type: Optional[Literal["image"]] = None + + +class DocumentCompanyChildHeadingChildLink(BaseModel): + text: str + + url: str + + id: Optional[str] = None + + type: Optional[Literal["link"]] = None + + +class DocumentCompanyChildHeadingChildLineBreak(BaseModel): + id: Optional[str] = None + + type: Optional[Literal["line_break"]] = None + + +class DocumentCompanyChildHeadingChildText(BaseModel): + text: str + + id: Optional[str] = None + + marks: Optional[List[Literal["bold", "italic", "underline", "strikethrough", "code", "math"]]] = None + + type: Optional[Literal["text"]] = None + + +class DocumentCompanyChildHeadingChildToolCall(BaseModel): + """A tool/function call made by the assistant.""" + + tool_call_id: str + + tool_name: str + + id: Optional[str] = None + + args: Optional[Dict[str, object]] = None + + type: Optional[Literal["tool_call"]] = None + + +class DocumentCompanyChildHeadingChildToolResult(BaseModel): + """The result of a tool call.""" + + output: Union[str, Dict[str, object], List[object]] + + tool_call_id: str + + tool_name: str + + id: Optional[str] = None + + is_error: Optional[bool] = None + + type: Optional[Literal["tool_result"]] = None + + +class DocumentCompanyChildHeadingChildTraceMessage(BaseModel): + """A message in an agent trace (user message, assistant message, or thinking).""" + + text: str + + id: Optional[str] = None + + message_type: Optional[Literal["message", "thinking"]] = None + + role: Optional[Literal["user", "assistant"]] = None + + timestamp: Optional[datetime] = None + + type: Optional[Literal["trace_message"]] = None + + +DocumentCompanyChildHeadingChild: TypeAlias = Union[ + DocumentCompanyChildHeadingChildBlob, + DocumentCompanyChildHeadingChildCode, + DocumentCompanyChildHeadingChildComment, + DocumentCompanyChildHeadingChildDivider, + DocumentCompanyChildHeadingChildImage, + DocumentCompanyChildHeadingChildLink, + DocumentCompanyChildHeadingChildLineBreak, + DocumentCompanyChildHeadingChildText, + DocumentCompanyChildHeadingChildToolCall, + DocumentCompanyChildHeadingChildToolResult, + DocumentCompanyChildHeadingChildTraceMessage, + object, +] + + +class DocumentCompanyChildHeading(BaseModel): + level: int + + id: Optional[str] = None + + children: Optional[List[DocumentCompanyChildHeadingChild]] = None + + text: Optional[str] = None + + type: Optional[Literal["heading"]] = None + + +class DocumentCompanyChildImage(BaseModel): + src: str + + text: str + + id: Optional[str] = None + + type: Optional[Literal["image"]] = None + + +class DocumentCompanyChildLink(BaseModel): + text: str + + url: str + + id: Optional[str] = None + + type: Optional[Literal["link"]] = None + + +class DocumentCompanyChildLineBreak(BaseModel): + id: Optional[str] = None + + type: Optional[Literal["line_break"]] = None + + +class DocumentCompanyChildList(BaseModel): + id: Optional[str] = None + + children: Optional[List[object]] = None + + ordered: Optional[bool] = None + + text: Optional[str] = None + + type: Optional[Literal["list"]] = None + + +class DocumentCompanyChildListItemChildBlob(BaseModel): + """Represents embedded binary data using data URI scheme. + + Format: data:[][;base64], + Example: data:text/html;base64,PGh0bWw+... + """ + + data: str + + mimetype: str + + id: Optional[str] = None + + type: Optional[Literal["blob"]] = None + + +class DocumentCompanyChildListItemChildCode(BaseModel): + text: str + + id: Optional[str] = None + + language: Optional[str] = None + + type: Optional[Literal["code"]] = None + + +class DocumentCompanyChildListItemChildComment(BaseModel): + text: str + + id: Optional[str] = None + + created_at: Optional[datetime] = None + + type: Optional[Literal["comment"]] = None + + +class DocumentCompanyChildListItemChildDivider(BaseModel): + id: Optional[str] = None + + type: Optional[Literal["divider"]] = None + + +class DocumentCompanyChildListItemChildImage(BaseModel): + src: str + + text: str + + id: Optional[str] = None + + type: Optional[Literal["image"]] = None + + +class DocumentCompanyChildListItemChildLink(BaseModel): + text: str + + url: str + + id: Optional[str] = None + + type: Optional[Literal["link"]] = None + + +class DocumentCompanyChildListItemChildLineBreak(BaseModel): + id: Optional[str] = None + + type: Optional[Literal["line_break"]] = None + + +class DocumentCompanyChildListItemChildText(BaseModel): + text: str + + id: Optional[str] = None + + marks: Optional[List[Literal["bold", "italic", "underline", "strikethrough", "code", "math"]]] = None + + type: Optional[Literal["text"]] = None + + +class DocumentCompanyChildListItemChildToolCall(BaseModel): + """A tool/function call made by the assistant.""" + + tool_call_id: str + + tool_name: str + + id: Optional[str] = None + + args: Optional[Dict[str, object]] = None + + type: Optional[Literal["tool_call"]] = None + + +class DocumentCompanyChildListItemChildToolResult(BaseModel): + """The result of a tool call.""" + + output: Union[str, Dict[str, object], List[object]] + + tool_call_id: str + + tool_name: str + + id: Optional[str] = None + + is_error: Optional[bool] = None + + type: Optional[Literal["tool_result"]] = None + + +class DocumentCompanyChildListItemChildTraceMessage(BaseModel): + """A message in an agent trace (user message, assistant message, or thinking).""" + + text: str + + id: Optional[str] = None + + message_type: Optional[Literal["message", "thinking"]] = None + + role: Optional[Literal["user", "assistant"]] = None + + timestamp: Optional[datetime] = None + + type: Optional[Literal["trace_message"]] = None + + +DocumentCompanyChildListItemChild: TypeAlias = Union[ + DocumentCompanyChildListItemChildBlob, + DocumentCompanyChildListItemChildCode, + DocumentCompanyChildListItemChildComment, + DocumentCompanyChildListItemChildDivider, + DocumentCompanyChildListItemChildImage, + DocumentCompanyChildListItemChildLink, + DocumentCompanyChildListItemChildLineBreak, + DocumentCompanyChildListItemChildText, + DocumentCompanyChildListItemChildToolCall, + DocumentCompanyChildListItemChildToolResult, + DocumentCompanyChildListItemChildTraceMessage, + object, +] + + +class DocumentCompanyChildListItem(BaseModel): + id: Optional[str] = None + + children: Optional[List[DocumentCompanyChildListItemChild]] = None + + text: Optional[str] = None + + type: Optional[Literal["list_item"]] = None + + +class DocumentCompanyChildParagraphChildBlob(BaseModel): + """Represents embedded binary data using data URI scheme. + + Format: data:[][;base64], + Example: data:text/html;base64,PGh0bWw+... + """ + + data: str + + mimetype: str + + id: Optional[str] = None + + type: Optional[Literal["blob"]] = None + + +class DocumentCompanyChildParagraphChildCode(BaseModel): + text: str + + id: Optional[str] = None + + language: Optional[str] = None + + type: Optional[Literal["code"]] = None + + +class DocumentCompanyChildParagraphChildComment(BaseModel): + text: str + + id: Optional[str] = None + + created_at: Optional[datetime] = None + + type: Optional[Literal["comment"]] = None + + +class DocumentCompanyChildParagraphChildDivider(BaseModel): + id: Optional[str] = None + + type: Optional[Literal["divider"]] = None + + +class DocumentCompanyChildParagraphChildImage(BaseModel): + src: str + + text: str + + id: Optional[str] = None + + type: Optional[Literal["image"]] = None + + +class DocumentCompanyChildParagraphChildLink(BaseModel): + text: str + + url: str + + id: Optional[str] = None + + type: Optional[Literal["link"]] = None + + +class DocumentCompanyChildParagraphChildLineBreak(BaseModel): + id: Optional[str] = None + + type: Optional[Literal["line_break"]] = None + + +class DocumentCompanyChildParagraphChildText(BaseModel): + text: str + + id: Optional[str] = None + + marks: Optional[List[Literal["bold", "italic", "underline", "strikethrough", "code", "math"]]] = None + + type: Optional[Literal["text"]] = None + + +class DocumentCompanyChildParagraphChildToolCall(BaseModel): + """A tool/function call made by the assistant.""" + + tool_call_id: str + + tool_name: str + + id: Optional[str] = None + + args: Optional[Dict[str, object]] = None + + type: Optional[Literal["tool_call"]] = None + + +class DocumentCompanyChildParagraphChildToolResult(BaseModel): + """The result of a tool call.""" + + output: Union[str, Dict[str, object], List[object]] + + tool_call_id: str + + tool_name: str + + id: Optional[str] = None + + is_error: Optional[bool] = None + + type: Optional[Literal["tool_result"]] = None + + +class DocumentCompanyChildParagraphChildTraceMessage(BaseModel): + """A message in an agent trace (user message, assistant message, or thinking).""" + + text: str + + id: Optional[str] = None + + message_type: Optional[Literal["message", "thinking"]] = None + + role: Optional[Literal["user", "assistant"]] = None + + timestamp: Optional[datetime] = None + + type: Optional[Literal["trace_message"]] = None + + +DocumentCompanyChildParagraphChild: TypeAlias = Union[ + DocumentCompanyChildParagraphChildBlob, + DocumentCompanyChildParagraphChildCode, + DocumentCompanyChildParagraphChildComment, + DocumentCompanyChildParagraphChildDivider, + DocumentCompanyChildParagraphChildImage, + DocumentCompanyChildParagraphChildLink, + DocumentCompanyChildParagraphChildLineBreak, + DocumentCompanyChildParagraphChildText, + DocumentCompanyChildParagraphChildToolCall, + DocumentCompanyChildParagraphChildToolResult, + DocumentCompanyChildParagraphChildTraceMessage, + object, +] + + +class DocumentCompanyChildParagraph(BaseModel): + id: Optional[str] = None + + children: Optional[List[DocumentCompanyChildParagraphChild]] = None + + text: Optional[str] = None + + type: Optional[Literal["paragraph"]] = None + + +class DocumentCompanyChildQuoteChildBlob(BaseModel): + """Represents embedded binary data using data URI scheme. + + Format: data:[][;base64], + Example: data:text/html;base64,PGh0bWw+... + """ + + data: str + + mimetype: str + + id: Optional[str] = None + + type: Optional[Literal["blob"]] = None + + +class DocumentCompanyChildQuoteChildCode(BaseModel): + text: str + + id: Optional[str] = None + + language: Optional[str] = None + + type: Optional[Literal["code"]] = None + + +class DocumentCompanyChildQuoteChildComment(BaseModel): + text: str + + id: Optional[str] = None + + created_at: Optional[datetime] = None + + type: Optional[Literal["comment"]] = None + + +class DocumentCompanyChildQuoteChildDivider(BaseModel): + id: Optional[str] = None + + type: Optional[Literal["divider"]] = None + + +class DocumentCompanyChildQuoteChildImage(BaseModel): + src: str + + text: str + + id: Optional[str] = None + + type: Optional[Literal["image"]] = None + + +class DocumentCompanyChildQuoteChildLink(BaseModel): + text: str + + url: str + + id: Optional[str] = None + + type: Optional[Literal["link"]] = None + + +class DocumentCompanyChildQuoteChildLineBreak(BaseModel): + id: Optional[str] = None + + type: Optional[Literal["line_break"]] = None + + +class DocumentCompanyChildQuoteChildText(BaseModel): + text: str + + id: Optional[str] = None + + marks: Optional[List[Literal["bold", "italic", "underline", "strikethrough", "code", "math"]]] = None + + type: Optional[Literal["text"]] = None + + +class DocumentCompanyChildQuoteChildToolCall(BaseModel): + """A tool/function call made by the assistant.""" + + tool_call_id: str + + tool_name: str + + id: Optional[str] = None + + args: Optional[Dict[str, object]] = None + + type: Optional[Literal["tool_call"]] = None + + +class DocumentCompanyChildQuoteChildToolResult(BaseModel): + """The result of a tool call.""" + + output: Union[str, Dict[str, object], List[object]] + + tool_call_id: str + + tool_name: str + + id: Optional[str] = None + + is_error: Optional[bool] = None + + type: Optional[Literal["tool_result"]] = None + + +class DocumentCompanyChildQuoteChildTraceMessage(BaseModel): + """A message in an agent trace (user message, assistant message, or thinking).""" + + text: str + + id: Optional[str] = None + + message_type: Optional[Literal["message", "thinking"]] = None + + role: Optional[Literal["user", "assistant"]] = None + + timestamp: Optional[datetime] = None + + type: Optional[Literal["trace_message"]] = None + + +DocumentCompanyChildQuoteChild: TypeAlias = Union[ + DocumentCompanyChildQuoteChildBlob, + DocumentCompanyChildQuoteChildCode, + DocumentCompanyChildQuoteChildComment, + DocumentCompanyChildQuoteChildDivider, + DocumentCompanyChildQuoteChildImage, + DocumentCompanyChildQuoteChildLink, + DocumentCompanyChildQuoteChildLineBreak, + DocumentCompanyChildQuoteChildText, + DocumentCompanyChildQuoteChildToolCall, + DocumentCompanyChildQuoteChildToolResult, + DocumentCompanyChildQuoteChildTraceMessage, + object, +] + + +class DocumentCompanyChildQuote(BaseModel): + id: Optional[str] = None + + children: Optional[List[DocumentCompanyChildQuoteChild]] = None + + text: Optional[str] = None + + type: Optional[Literal["quote"]] = None + + +class DocumentCompanyChildTable(BaseModel): + id: Optional[str] = None + + children: Optional[List[object]] = None + + has_header: Optional[bool] = None + """Whether the first row should be treated as a header""" + + text: Optional[str] = None + + type: Optional[Literal["table"]] = None + + +class DocumentCompanyChildTableCellChildBlob(BaseModel): + """Represents embedded binary data using data URI scheme. + + Format: data:[][;base64], + Example: data:text/html;base64,PGh0bWw+... + """ + + data: str + + mimetype: str + + id: Optional[str] = None + + type: Optional[Literal["blob"]] = None + + +class DocumentCompanyChildTableCellChildCode(BaseModel): + text: str + + id: Optional[str] = None + + language: Optional[str] = None + + type: Optional[Literal["code"]] = None + + +class DocumentCompanyChildTableCellChildComment(BaseModel): + text: str + + id: Optional[str] = None + + created_at: Optional[datetime] = None + + type: Optional[Literal["comment"]] = None + + +class DocumentCompanyChildTableCellChildDivider(BaseModel): + id: Optional[str] = None + + type: Optional[Literal["divider"]] = None + + +class DocumentCompanyChildTableCellChildImage(BaseModel): + src: str + + text: str + + id: Optional[str] = None + + type: Optional[Literal["image"]] = None + + +class DocumentCompanyChildTableCellChildLink(BaseModel): + text: str + + url: str + + id: Optional[str] = None + + type: Optional[Literal["link"]] = None + + +class DocumentCompanyChildTableCellChildLineBreak(BaseModel): + id: Optional[str] = None + + type: Optional[Literal["line_break"]] = None + + +class DocumentCompanyChildTableCellChildText(BaseModel): + text: str + + id: Optional[str] = None + + marks: Optional[List[Literal["bold", "italic", "underline", "strikethrough", "code", "math"]]] = None + + type: Optional[Literal["text"]] = None + + +class DocumentCompanyChildTableCellChildToolCall(BaseModel): + """A tool/function call made by the assistant.""" + + tool_call_id: str + + tool_name: str + + id: Optional[str] = None + + args: Optional[Dict[str, object]] = None + + type: Optional[Literal["tool_call"]] = None + + +class DocumentCompanyChildTableCellChildToolResult(BaseModel): + """The result of a tool call.""" + + output: Union[str, Dict[str, object], List[object]] + + tool_call_id: str + + tool_name: str + + id: Optional[str] = None + + is_error: Optional[bool] = None + + type: Optional[Literal["tool_result"]] = None + + +class DocumentCompanyChildTableCellChildTraceMessage(BaseModel): + """A message in an agent trace (user message, assistant message, or thinking).""" + + text: str + + id: Optional[str] = None + + message_type: Optional[Literal["message", "thinking"]] = None + + role: Optional[Literal["user", "assistant"]] = None + + timestamp: Optional[datetime] = None + + type: Optional[Literal["trace_message"]] = None + + +DocumentCompanyChildTableCellChild: TypeAlias = Union[ + DocumentCompanyChildTableCellChildBlob, + DocumentCompanyChildTableCellChildCode, + DocumentCompanyChildTableCellChildComment, + DocumentCompanyChildTableCellChildDivider, + DocumentCompanyChildTableCellChildImage, + DocumentCompanyChildTableCellChildLink, + DocumentCompanyChildTableCellChildLineBreak, + DocumentCompanyChildTableCellChildText, + DocumentCompanyChildTableCellChildToolCall, + DocumentCompanyChildTableCellChildToolResult, + DocumentCompanyChildTableCellChildTraceMessage, + object, +] + + +class DocumentCompanyChildTableCell(BaseModel): + id: Optional[str] = None + + align: Optional[Literal["left", "center", "right"]] = None + + children: Optional[List[DocumentCompanyChildTableCellChild]] = None + + text: Optional[str] = None + + type: Optional[Literal["table_cell"]] = None + + +class DocumentCompanyChildTableRow(BaseModel): + id: Optional[str] = None + + children: Optional[List[object]] = None + + text: Optional[str] = None + + type: Optional[Literal["table_row"]] = None + + +class DocumentCompanyChildText(BaseModel): + text: str + + id: Optional[str] = None + + marks: Optional[List[Literal["bold", "italic", "underline", "strikethrough", "code", "math"]]] = None + + type: Optional[Literal["text"]] = None + + +class DocumentCompanyChildToDoChildBlob(BaseModel): + """Represents embedded binary data using data URI scheme. + + Format: data:[][;base64], + Example: data:text/html;base64,PGh0bWw+... + """ + + data: str + + mimetype: str + + id: Optional[str] = None + + type: Optional[Literal["blob"]] = None + + +class DocumentCompanyChildToDoChildCode(BaseModel): + text: str + + id: Optional[str] = None + + language: Optional[str] = None + + type: Optional[Literal["code"]] = None + + +class DocumentCompanyChildToDoChildComment(BaseModel): + text: str + + id: Optional[str] = None + + created_at: Optional[datetime] = None + + type: Optional[Literal["comment"]] = None + + +class DocumentCompanyChildToDoChildDivider(BaseModel): + id: Optional[str] = None + + type: Optional[Literal["divider"]] = None + + +class DocumentCompanyChildToDoChildImage(BaseModel): + src: str + + text: str + + id: Optional[str] = None + + type: Optional[Literal["image"]] = None + + +class DocumentCompanyChildToDoChildLink(BaseModel): + text: str + + url: str + + id: Optional[str] = None + + type: Optional[Literal["link"]] = None + + +class DocumentCompanyChildToDoChildLineBreak(BaseModel): + id: Optional[str] = None + + type: Optional[Literal["line_break"]] = None + + +class DocumentCompanyChildToDoChildText(BaseModel): + text: str + + id: Optional[str] = None + + marks: Optional[List[Literal["bold", "italic", "underline", "strikethrough", "code", "math"]]] = None + + type: Optional[Literal["text"]] = None + + +class DocumentCompanyChildToDoChildToolCall(BaseModel): + """A tool/function call made by the assistant.""" + + tool_call_id: str + + tool_name: str + + id: Optional[str] = None + + args: Optional[Dict[str, object]] = None + + type: Optional[Literal["tool_call"]] = None + + +class DocumentCompanyChildToDoChildToolResult(BaseModel): + """The result of a tool call.""" + + output: Union[str, Dict[str, object], List[object]] + + tool_call_id: str + + tool_name: str + + id: Optional[str] = None + + is_error: Optional[bool] = None + + type: Optional[Literal["tool_result"]] = None + + +class DocumentCompanyChildToDoChildTraceMessage(BaseModel): + """A message in an agent trace (user message, assistant message, or thinking).""" + + text: str + + id: Optional[str] = None + + message_type: Optional[Literal["message", "thinking"]] = None + + role: Optional[Literal["user", "assistant"]] = None + + timestamp: Optional[datetime] = None + + type: Optional[Literal["trace_message"]] = None + + +DocumentCompanyChildToDoChild: TypeAlias = Union[ + DocumentCompanyChildToDoChildBlob, + DocumentCompanyChildToDoChildCode, + DocumentCompanyChildToDoChildComment, + DocumentCompanyChildToDoChildDivider, + DocumentCompanyChildToDoChildImage, + DocumentCompanyChildToDoChildLink, + DocumentCompanyChildToDoChildLineBreak, + DocumentCompanyChildToDoChildText, + DocumentCompanyChildToDoChildToolCall, + DocumentCompanyChildToDoChildToolResult, + DocumentCompanyChildToDoChildTraceMessage, + object, +] + + +class DocumentCompanyChildToDo(BaseModel): + id: Optional[str] = None + + checked: Optional[bool] = None + + children: Optional[List[DocumentCompanyChildToDoChild]] = None + + text: Optional[str] = None + + type: Optional[Literal["todo"]] = None + + +class DocumentCompanyChildToolCall(BaseModel): + """A tool/function call made by the assistant.""" + + tool_call_id: str + + tool_name: str + + id: Optional[str] = None + + args: Optional[Dict[str, object]] = None + + type: Optional[Literal["tool_call"]] = None + + +class DocumentCompanyChildToolResult(BaseModel): + """The result of a tool call.""" + + output: Union[str, Dict[str, object], List[object]] + + tool_call_id: str + + tool_name: str + + id: Optional[str] = None + + is_error: Optional[bool] = None + + type: Optional[Literal["tool_result"]] = None + + +class DocumentCompanyChildTraceMessage(BaseModel): + """A message in an agent trace (user message, assistant message, or thinking).""" + + text: str + + id: Optional[str] = None + + message_type: Optional[Literal["message", "thinking"]] = None + + role: Optional[Literal["user", "assistant"]] = None + + timestamp: Optional[datetime] = None + + type: Optional[Literal["trace_message"]] = None + + +class DocumentCompanyChildUtterance(BaseModel): + """A speaker-attributed segment of a transcript (ENG-2476/D10). + + "Utterance" is the standard name for this across transcription providers + (AssemblyAI, Deepgram, Rev). Timestamps are relative offsets in seconds — + provider-native; absolute times derive from `Transcript.started_at`. + """ + + text: str + + id: Optional[str] = None + + end: Optional[float] = None + + speaker: Optional[object] = None + + start: Optional[float] = None + + type: Optional[Literal["utterance"]] = None + + +DocumentCompanyChild: TypeAlias = Annotated[ + Union[ + DocumentCompanyChildBlob, + DocumentCompanyChildCallout, + DocumentCompanyChildChunk, + DocumentCompanyChildCode, + DocumentCompanyChildComment, + DocumentCompanyChildDivider, + DocumentCompanyChildEquation, + DocumentCompanyChildFootnote, + DocumentCompanyChildHeading, + DocumentCompanyChildImage, + DocumentCompanyChildLink, + DocumentCompanyChildLineBreak, + DocumentCompanyChildList, + DocumentCompanyChildListItem, + DocumentCompanyChildParagraph, + DocumentCompanyChildQuote, + DocumentCompanyChildTable, + DocumentCompanyChildTableCell, + DocumentCompanyChildTableRow, + DocumentCompanyChildText, + DocumentCompanyChildToDo, + DocumentCompanyChildToolCall, + DocumentCompanyChildToolResult, + DocumentCompanyChildTraceMessage, + DocumentCompanyChildUtterance, + ], + PropertyInfo(discriminator="type"), +] + + +class DocumentCompany(BaseModel): + """A CRM company/account record (ENG-2476/D10).""" + + id: Optional[str] = None + + address: Optional[str] = None + + children: Optional[List[DocumentCompanyChild]] = None + + contact_ids: Optional[List[str]] = None + + deal_ids: Optional[List[str]] = None + + description: Optional[str] = None + + emails: Optional[List[str]] = None + + employees: Optional[int] = None + + image_url: Optional[str] = None + + industry: Optional[str] = None + + is_active: Optional[bool] = None + + name: Optional[str] = None + + phone_numbers: Optional[List[str]] = None + + tags: Optional[List[str]] = None + + text: Optional[str] = None + + timezone: Optional[str] = None + + type: Optional[Literal["company"]] = None + + websites: Optional[List[str]] = None + + +class DocumentDealChildBlob(BaseModel): + """Represents embedded binary data using data URI scheme. + + Format: data:[][;base64], + Example: data:text/html;base64,PGh0bWw+... + """ + + data: str + + mimetype: str + + id: Optional[str] = None + + type: Optional[Literal["blob"]] = None + + +class DocumentDealChildCalloutChildBlob(BaseModel): + """Represents embedded binary data using data URI scheme. + + Format: data:[][;base64], + Example: data:text/html;base64,PGh0bWw+... + """ + + data: str + + mimetype: str + + id: Optional[str] = None + + type: Optional[Literal["blob"]] = None + + +class DocumentDealChildCalloutChildCode(BaseModel): + text: str + + id: Optional[str] = None + + language: Optional[str] = None + + type: Optional[Literal["code"]] = None + + +class DocumentDealChildCalloutChildComment(BaseModel): + text: str + + id: Optional[str] = None + + created_at: Optional[datetime] = None + + type: Optional[Literal["comment"]] = None + + +class DocumentDealChildCalloutChildDivider(BaseModel): + id: Optional[str] = None + + type: Optional[Literal["divider"]] = None + + +class DocumentDealChildCalloutChildImage(BaseModel): + src: str + + text: str + + id: Optional[str] = None + + type: Optional[Literal["image"]] = None + + +class DocumentDealChildCalloutChildLink(BaseModel): + text: str + + url: str + + id: Optional[str] = None + + type: Optional[Literal["link"]] = None + + +class DocumentDealChildCalloutChildLineBreak(BaseModel): + id: Optional[str] = None + + type: Optional[Literal["line_break"]] = None + + +class DocumentDealChildCalloutChildText(BaseModel): + text: str + + id: Optional[str] = None + + marks: Optional[List[Literal["bold", "italic", "underline", "strikethrough", "code", "math"]]] = None + + type: Optional[Literal["text"]] = None + + +class DocumentDealChildCalloutChildToolCall(BaseModel): + """A tool/function call made by the assistant.""" + + tool_call_id: str + + tool_name: str + + id: Optional[str] = None + + args: Optional[Dict[str, object]] = None + + type: Optional[Literal["tool_call"]] = None + + +class DocumentDealChildCalloutChildToolResult(BaseModel): + """The result of a tool call.""" + + output: Union[str, Dict[str, object], List[object]] + + tool_call_id: str + + tool_name: str + + id: Optional[str] = None + + is_error: Optional[bool] = None + + type: Optional[Literal["tool_result"]] = None + + +class DocumentDealChildCalloutChildTraceMessage(BaseModel): + """A message in an agent trace (user message, assistant message, or thinking).""" + + text: str + + id: Optional[str] = None + + message_type: Optional[Literal["message", "thinking"]] = None + + role: Optional[Literal["user", "assistant"]] = None + + timestamp: Optional[datetime] = None + + type: Optional[Literal["trace_message"]] = None + + +DocumentDealChildCalloutChild: TypeAlias = Union[ + DocumentDealChildCalloutChildBlob, + DocumentDealChildCalloutChildCode, + DocumentDealChildCalloutChildComment, + DocumentDealChildCalloutChildDivider, + DocumentDealChildCalloutChildImage, + DocumentDealChildCalloutChildLink, + DocumentDealChildCalloutChildLineBreak, + DocumentDealChildCalloutChildText, + DocumentDealChildCalloutChildToolCall, + DocumentDealChildCalloutChildToolResult, + DocumentDealChildCalloutChildTraceMessage, + object, +] + + +class DocumentDealChildCallout(BaseModel): + id: Optional[str] = None + + children: Optional[List[DocumentDealChildCalloutChild]] = None + + text: Optional[str] = None + + title: Optional[str] = None + + type: Optional[Literal["callout"]] = None + + +class DocumentDealChildChunkChildBlob(BaseModel): + """Represents embedded binary data using data URI scheme. + + Format: data:[][;base64], + Example: data:text/html;base64,PGh0bWw+... + """ + + data: str + + mimetype: str + + id: Optional[str] = None + + type: Optional[Literal["blob"]] = None + + +class DocumentDealChildChunkChildCode(BaseModel): + text: str + + id: Optional[str] = None + + language: Optional[str] = None + + type: Optional[Literal["code"]] = None + + +class DocumentDealChildChunkChildComment(BaseModel): + text: str + + id: Optional[str] = None + + created_at: Optional[datetime] = None + + type: Optional[Literal["comment"]] = None + + +class DocumentDealChildChunkChildDivider(BaseModel): + id: Optional[str] = None + + type: Optional[Literal["divider"]] = None + + +class DocumentDealChildChunkChildImage(BaseModel): + src: str + + text: str + + id: Optional[str] = None + + type: Optional[Literal["image"]] = None + + +class DocumentDealChildChunkChildLink(BaseModel): + text: str + + url: str + + id: Optional[str] = None + + type: Optional[Literal["link"]] = None + + +class DocumentDealChildChunkChildLineBreak(BaseModel): + id: Optional[str] = None + + type: Optional[Literal["line_break"]] = None + + +class DocumentDealChildChunkChildText(BaseModel): + text: str + + id: Optional[str] = None + + marks: Optional[List[Literal["bold", "italic", "underline", "strikethrough", "code", "math"]]] = None + + type: Optional[Literal["text"]] = None + + +class DocumentDealChildChunkChildToolCall(BaseModel): + """A tool/function call made by the assistant.""" + + tool_call_id: str + + tool_name: str + + id: Optional[str] = None + + args: Optional[Dict[str, object]] = None + + type: Optional[Literal["tool_call"]] = None + + +class DocumentDealChildChunkChildToolResult(BaseModel): + """The result of a tool call.""" + + output: Union[str, Dict[str, object], List[object]] + + tool_call_id: str + + tool_name: str + + id: Optional[str] = None + + is_error: Optional[bool] = None + + type: Optional[Literal["tool_result"]] = None + + +class DocumentDealChildChunkChildTraceMessage(BaseModel): + """A message in an agent trace (user message, assistant message, or thinking).""" + + text: str + + id: Optional[str] = None + + message_type: Optional[Literal["message", "thinking"]] = None + + role: Optional[Literal["user", "assistant"]] = None + + timestamp: Optional[datetime] = None + + type: Optional[Literal["trace_message"]] = None + + +DocumentDealChildChunkChild: TypeAlias = Union[ + DocumentDealChildChunkChildBlob, + DocumentDealChildChunkChildCode, + DocumentDealChildChunkChildComment, + DocumentDealChildChunkChildDivider, + DocumentDealChildChunkChildImage, + DocumentDealChildChunkChildLink, + DocumentDealChildChunkChildLineBreak, + DocumentDealChildChunkChildText, + DocumentDealChildChunkChildToolCall, + DocumentDealChildChunkChildToolResult, + DocumentDealChildChunkChildTraceMessage, + object, +] + + +class DocumentDealChildChunk(BaseModel): + id: Optional[str] = None + + children: Optional[List[DocumentDealChildChunkChild]] = None + + text: Optional[str] = None + + type: Optional[Literal["chunk"]] = None + + +class DocumentDealChildCode(BaseModel): + text: str + + id: Optional[str] = None + + language: Optional[str] = None + + type: Optional[Literal["code"]] = None + + +class DocumentDealChildComment(BaseModel): + text: str + + id: Optional[str] = None + + created_at: Optional[datetime] = None + + type: Optional[Literal["comment"]] = None + + +class DocumentDealChildDivider(BaseModel): + id: Optional[str] = None + + type: Optional[Literal["divider"]] = None + + +class DocumentDealChildEquationChildBlob(BaseModel): + """Represents embedded binary data using data URI scheme. + + Format: data:[][;base64], + Example: data:text/html;base64,PGh0bWw+... + """ + + data: str + + mimetype: str + + id: Optional[str] = None + + type: Optional[Literal["blob"]] = None + + +class DocumentDealChildEquationChildCode(BaseModel): + text: str + + id: Optional[str] = None + + language: Optional[str] = None + + type: Optional[Literal["code"]] = None + + +class DocumentDealChildEquationChildComment(BaseModel): + text: str + + id: Optional[str] = None + + created_at: Optional[datetime] = None + + type: Optional[Literal["comment"]] = None + + +class DocumentDealChildEquationChildDivider(BaseModel): + id: Optional[str] = None + + type: Optional[Literal["divider"]] = None + + +class DocumentDealChildEquationChildImage(BaseModel): + src: str + + text: str + + id: Optional[str] = None + + type: Optional[Literal["image"]] = None + + +class DocumentDealChildEquationChildLink(BaseModel): + text: str + + url: str + + id: Optional[str] = None + + type: Optional[Literal["link"]] = None + + +class DocumentDealChildEquationChildLineBreak(BaseModel): + id: Optional[str] = None + + type: Optional[Literal["line_break"]] = None + + +class DocumentDealChildEquationChildText(BaseModel): + text: str + + id: Optional[str] = None + + marks: Optional[List[Literal["bold", "italic", "underline", "strikethrough", "code", "math"]]] = None + + type: Optional[Literal["text"]] = None + + +class DocumentDealChildEquationChildToolCall(BaseModel): + """A tool/function call made by the assistant.""" + + tool_call_id: str + + tool_name: str + + id: Optional[str] = None + + args: Optional[Dict[str, object]] = None + + type: Optional[Literal["tool_call"]] = None + + +class DocumentDealChildEquationChildToolResult(BaseModel): + """The result of a tool call.""" + + output: Union[str, Dict[str, object], List[object]] + + tool_call_id: str + + tool_name: str + + id: Optional[str] = None + + is_error: Optional[bool] = None + + type: Optional[Literal["tool_result"]] = None + + +class DocumentDealChildEquationChildTraceMessage(BaseModel): + """A message in an agent trace (user message, assistant message, or thinking).""" + + text: str + + id: Optional[str] = None + + message_type: Optional[Literal["message", "thinking"]] = None + + role: Optional[Literal["user", "assistant"]] = None + + timestamp: Optional[datetime] = None + + type: Optional[Literal["trace_message"]] = None + + +DocumentDealChildEquationChild: TypeAlias = Union[ + DocumentDealChildEquationChildBlob, + DocumentDealChildEquationChildCode, + DocumentDealChildEquationChildComment, + DocumentDealChildEquationChildDivider, + DocumentDealChildEquationChildImage, + DocumentDealChildEquationChildLink, + DocumentDealChildEquationChildLineBreak, + DocumentDealChildEquationChildText, + DocumentDealChildEquationChildToolCall, + DocumentDealChildEquationChildToolResult, + DocumentDealChildEquationChildTraceMessage, + object, +] + + +class DocumentDealChildEquation(BaseModel): + id: Optional[str] = None + + children: Optional[List[DocumentDealChildEquationChild]] = None + + text: Optional[str] = None + + type: Optional[Literal["equation"]] = None + + +class DocumentDealChildFootnoteChildBlob(BaseModel): + """Represents embedded binary data using data URI scheme. + + Format: data:[][;base64], + Example: data:text/html;base64,PGh0bWw+... + """ + + data: str + + mimetype: str + + id: Optional[str] = None + + type: Optional[Literal["blob"]] = None + + +class DocumentDealChildFootnoteChildCode(BaseModel): + text: str + + id: Optional[str] = None + + language: Optional[str] = None + + type: Optional[Literal["code"]] = None + + +class DocumentDealChildFootnoteChildComment(BaseModel): + text: str + + id: Optional[str] = None + + created_at: Optional[datetime] = None + + type: Optional[Literal["comment"]] = None + + +class DocumentDealChildFootnoteChildDivider(BaseModel): + id: Optional[str] = None + + type: Optional[Literal["divider"]] = None + + +class DocumentDealChildFootnoteChildImage(BaseModel): + src: str + + text: str + + id: Optional[str] = None + + type: Optional[Literal["image"]] = None + + +class DocumentDealChildFootnoteChildLink(BaseModel): + text: str + + url: str + + id: Optional[str] = None + + type: Optional[Literal["link"]] = None + + +class DocumentDealChildFootnoteChildLineBreak(BaseModel): + id: Optional[str] = None + + type: Optional[Literal["line_break"]] = None + + +class DocumentDealChildFootnoteChildText(BaseModel): + text: str + + id: Optional[str] = None + + marks: Optional[List[Literal["bold", "italic", "underline", "strikethrough", "code", "math"]]] = None + + type: Optional[Literal["text"]] = None + + +class DocumentDealChildFootnoteChildToolCall(BaseModel): + """A tool/function call made by the assistant.""" + + tool_call_id: str + + tool_name: str + + id: Optional[str] = None + + args: Optional[Dict[str, object]] = None + + type: Optional[Literal["tool_call"]] = None + + +class DocumentDealChildFootnoteChildToolResult(BaseModel): + """The result of a tool call.""" + + output: Union[str, Dict[str, object], List[object]] + + tool_call_id: str + + tool_name: str + + id: Optional[str] = None + + is_error: Optional[bool] = None + + type: Optional[Literal["tool_result"]] = None + + +class DocumentDealChildFootnoteChildTraceMessage(BaseModel): + """A message in an agent trace (user message, assistant message, or thinking).""" + + text: str + + id: Optional[str] = None + + message_type: Optional[Literal["message", "thinking"]] = None + + role: Optional[Literal["user", "assistant"]] = None + + timestamp: Optional[datetime] = None + + type: Optional[Literal["trace_message"]] = None + + +DocumentDealChildFootnoteChild: TypeAlias = Union[ + DocumentDealChildFootnoteChildBlob, + DocumentDealChildFootnoteChildCode, + DocumentDealChildFootnoteChildComment, + DocumentDealChildFootnoteChildDivider, + DocumentDealChildFootnoteChildImage, + DocumentDealChildFootnoteChildLink, + DocumentDealChildFootnoteChildLineBreak, + DocumentDealChildFootnoteChildText, + DocumentDealChildFootnoteChildToolCall, + DocumentDealChildFootnoteChildToolResult, + DocumentDealChildFootnoteChildTraceMessage, + object, +] + + +class DocumentDealChildFootnote(BaseModel): + id: Optional[str] = None + + children: Optional[List[DocumentDealChildFootnoteChild]] = None + + text: Optional[str] = None + + type: Optional[Literal["footnote"]] = None + + +class DocumentDealChildHeadingChildBlob(BaseModel): + """Represents embedded binary data using data URI scheme. + + Format: data:[][;base64], + Example: data:text/html;base64,PGh0bWw+... + """ + + data: str + + mimetype: str + + id: Optional[str] = None + + type: Optional[Literal["blob"]] = None + + +class DocumentDealChildHeadingChildCode(BaseModel): + text: str + + id: Optional[str] = None + + language: Optional[str] = None + + type: Optional[Literal["code"]] = None + + +class DocumentDealChildHeadingChildComment(BaseModel): + text: str + + id: Optional[str] = None + + created_at: Optional[datetime] = None + + type: Optional[Literal["comment"]] = None + + +class DocumentDealChildHeadingChildDivider(BaseModel): + id: Optional[str] = None + + type: Optional[Literal["divider"]] = None + + +class DocumentDealChildHeadingChildImage(BaseModel): + src: str + + text: str + + id: Optional[str] = None + + type: Optional[Literal["image"]] = None + + +class DocumentDealChildHeadingChildLink(BaseModel): + text: str + + url: str + + id: Optional[str] = None + + type: Optional[Literal["link"]] = None + + +class DocumentDealChildHeadingChildLineBreak(BaseModel): + id: Optional[str] = None + + type: Optional[Literal["line_break"]] = None + + +class DocumentDealChildHeadingChildText(BaseModel): + text: str + + id: Optional[str] = None + + marks: Optional[List[Literal["bold", "italic", "underline", "strikethrough", "code", "math"]]] = None + + type: Optional[Literal["text"]] = None + + +class DocumentDealChildHeadingChildToolCall(BaseModel): + """A tool/function call made by the assistant.""" + + tool_call_id: str + + tool_name: str + + id: Optional[str] = None + + args: Optional[Dict[str, object]] = None + + type: Optional[Literal["tool_call"]] = None + + +class DocumentDealChildHeadingChildToolResult(BaseModel): + """The result of a tool call.""" + + output: Union[str, Dict[str, object], List[object]] + + tool_call_id: str + + tool_name: str + + id: Optional[str] = None + + is_error: Optional[bool] = None + + type: Optional[Literal["tool_result"]] = None + + +class DocumentDealChildHeadingChildTraceMessage(BaseModel): + """A message in an agent trace (user message, assistant message, or thinking).""" + + text: str + + id: Optional[str] = None + + message_type: Optional[Literal["message", "thinking"]] = None + + role: Optional[Literal["user", "assistant"]] = None + + timestamp: Optional[datetime] = None + + type: Optional[Literal["trace_message"]] = None + + +DocumentDealChildHeadingChild: TypeAlias = Union[ + DocumentDealChildHeadingChildBlob, + DocumentDealChildHeadingChildCode, + DocumentDealChildHeadingChildComment, + DocumentDealChildHeadingChildDivider, + DocumentDealChildHeadingChildImage, + DocumentDealChildHeadingChildLink, + DocumentDealChildHeadingChildLineBreak, + DocumentDealChildHeadingChildText, + DocumentDealChildHeadingChildToolCall, + DocumentDealChildHeadingChildToolResult, + DocumentDealChildHeadingChildTraceMessage, + object, +] + + +class DocumentDealChildHeading(BaseModel): + level: int + + id: Optional[str] = None + + children: Optional[List[DocumentDealChildHeadingChild]] = None + + text: Optional[str] = None + + type: Optional[Literal["heading"]] = None + + +class DocumentDealChildImage(BaseModel): + src: str + + text: str + + id: Optional[str] = None + + type: Optional[Literal["image"]] = None + + +class DocumentDealChildLink(BaseModel): + text: str + + url: str + + id: Optional[str] = None + + type: Optional[Literal["link"]] = None + + +class DocumentDealChildLineBreak(BaseModel): + id: Optional[str] = None + + type: Optional[Literal["line_break"]] = None + + +class DocumentDealChildList(BaseModel): + id: Optional[str] = None + + children: Optional[List[object]] = None + + ordered: Optional[bool] = None + + text: Optional[str] = None + + type: Optional[Literal["list"]] = None + + +class DocumentDealChildListItemChildBlob(BaseModel): + """Represents embedded binary data using data URI scheme. + + Format: data:[][;base64], + Example: data:text/html;base64,PGh0bWw+... + """ + + data: str + + mimetype: str + + id: Optional[str] = None + + type: Optional[Literal["blob"]] = None + + +class DocumentDealChildListItemChildCode(BaseModel): + text: str + + id: Optional[str] = None + + language: Optional[str] = None + + type: Optional[Literal["code"]] = None + + +class DocumentDealChildListItemChildComment(BaseModel): + text: str + + id: Optional[str] = None + + created_at: Optional[datetime] = None + + type: Optional[Literal["comment"]] = None + + +class DocumentDealChildListItemChildDivider(BaseModel): + id: Optional[str] = None + + type: Optional[Literal["divider"]] = None + + +class DocumentDealChildListItemChildImage(BaseModel): + src: str + + text: str + + id: Optional[str] = None + + type: Optional[Literal["image"]] = None + + +class DocumentDealChildListItemChildLink(BaseModel): + text: str + + url: str + + id: Optional[str] = None + + type: Optional[Literal["link"]] = None + + +class DocumentDealChildListItemChildLineBreak(BaseModel): + id: Optional[str] = None + + type: Optional[Literal["line_break"]] = None + + +class DocumentDealChildListItemChildText(BaseModel): + text: str + + id: Optional[str] = None + + marks: Optional[List[Literal["bold", "italic", "underline", "strikethrough", "code", "math"]]] = None + + type: Optional[Literal["text"]] = None + + +class DocumentDealChildListItemChildToolCall(BaseModel): + """A tool/function call made by the assistant.""" + + tool_call_id: str + + tool_name: str + + id: Optional[str] = None + + args: Optional[Dict[str, object]] = None + + type: Optional[Literal["tool_call"]] = None + + +class DocumentDealChildListItemChildToolResult(BaseModel): + """The result of a tool call.""" + + output: Union[str, Dict[str, object], List[object]] + + tool_call_id: str + + tool_name: str + + id: Optional[str] = None + + is_error: Optional[bool] = None + + type: Optional[Literal["tool_result"]] = None + + +class DocumentDealChildListItemChildTraceMessage(BaseModel): + """A message in an agent trace (user message, assistant message, or thinking).""" + + text: str + + id: Optional[str] = None + + message_type: Optional[Literal["message", "thinking"]] = None + + role: Optional[Literal["user", "assistant"]] = None + + timestamp: Optional[datetime] = None + + type: Optional[Literal["trace_message"]] = None + + +DocumentDealChildListItemChild: TypeAlias = Union[ + DocumentDealChildListItemChildBlob, + DocumentDealChildListItemChildCode, + DocumentDealChildListItemChildComment, + DocumentDealChildListItemChildDivider, + DocumentDealChildListItemChildImage, + DocumentDealChildListItemChildLink, + DocumentDealChildListItemChildLineBreak, + DocumentDealChildListItemChildText, + DocumentDealChildListItemChildToolCall, + DocumentDealChildListItemChildToolResult, + DocumentDealChildListItemChildTraceMessage, + object, +] + + +class DocumentDealChildListItem(BaseModel): + id: Optional[str] = None + + children: Optional[List[DocumentDealChildListItemChild]] = None + + text: Optional[str] = None + + type: Optional[Literal["list_item"]] = None + + +class DocumentDealChildParagraphChildBlob(BaseModel): + """Represents embedded binary data using data URI scheme. + + Format: data:[][;base64], + Example: data:text/html;base64,PGh0bWw+... + """ + + data: str + + mimetype: str + + id: Optional[str] = None + + type: Optional[Literal["blob"]] = None + + +class DocumentDealChildParagraphChildCode(BaseModel): + text: str + + id: Optional[str] = None + + language: Optional[str] = None + + type: Optional[Literal["code"]] = None + + +class DocumentDealChildParagraphChildComment(BaseModel): + text: str + + id: Optional[str] = None + + created_at: Optional[datetime] = None + + type: Optional[Literal["comment"]] = None + + +class DocumentDealChildParagraphChildDivider(BaseModel): + id: Optional[str] = None + + type: Optional[Literal["divider"]] = None + + +class DocumentDealChildParagraphChildImage(BaseModel): + src: str + + text: str + + id: Optional[str] = None + + type: Optional[Literal["image"]] = None + + +class DocumentDealChildParagraphChildLink(BaseModel): + text: str + + url: str + + id: Optional[str] = None + + type: Optional[Literal["link"]] = None + + +class DocumentDealChildParagraphChildLineBreak(BaseModel): + id: Optional[str] = None + + type: Optional[Literal["line_break"]] = None + + +class DocumentDealChildParagraphChildText(BaseModel): + text: str + + id: Optional[str] = None + + marks: Optional[List[Literal["bold", "italic", "underline", "strikethrough", "code", "math"]]] = None + + type: Optional[Literal["text"]] = None + + +class DocumentDealChildParagraphChildToolCall(BaseModel): + """A tool/function call made by the assistant.""" + + tool_call_id: str + + tool_name: str + + id: Optional[str] = None + + args: Optional[Dict[str, object]] = None + + type: Optional[Literal["tool_call"]] = None + + +class DocumentDealChildParagraphChildToolResult(BaseModel): + """The result of a tool call.""" + + output: Union[str, Dict[str, object], List[object]] + + tool_call_id: str + + tool_name: str + + id: Optional[str] = None + + is_error: Optional[bool] = None + + type: Optional[Literal["tool_result"]] = None + + +class DocumentDealChildParagraphChildTraceMessage(BaseModel): + """A message in an agent trace (user message, assistant message, or thinking).""" + + text: str + + id: Optional[str] = None + + message_type: Optional[Literal["message", "thinking"]] = None + + role: Optional[Literal["user", "assistant"]] = None + + timestamp: Optional[datetime] = None + + type: Optional[Literal["trace_message"]] = None + + +DocumentDealChildParagraphChild: TypeAlias = Union[ + DocumentDealChildParagraphChildBlob, + DocumentDealChildParagraphChildCode, + DocumentDealChildParagraphChildComment, + DocumentDealChildParagraphChildDivider, + DocumentDealChildParagraphChildImage, + DocumentDealChildParagraphChildLink, + DocumentDealChildParagraphChildLineBreak, + DocumentDealChildParagraphChildText, + DocumentDealChildParagraphChildToolCall, + DocumentDealChildParagraphChildToolResult, + DocumentDealChildParagraphChildTraceMessage, + object, +] + + +class DocumentDealChildParagraph(BaseModel): + id: Optional[str] = None + + children: Optional[List[DocumentDealChildParagraphChild]] = None + + text: Optional[str] = None + + type: Optional[Literal["paragraph"]] = None + + +class DocumentDealChildQuoteChildBlob(BaseModel): + """Represents embedded binary data using data URI scheme. + + Format: data:[][;base64], + Example: data:text/html;base64,PGh0bWw+... + """ + + data: str + + mimetype: str + + id: Optional[str] = None + + type: Optional[Literal["blob"]] = None + + +class DocumentDealChildQuoteChildCode(BaseModel): + text: str + + id: Optional[str] = None + + language: Optional[str] = None + + type: Optional[Literal["code"]] = None + + +class DocumentDealChildQuoteChildComment(BaseModel): + text: str + + id: Optional[str] = None + + created_at: Optional[datetime] = None + + type: Optional[Literal["comment"]] = None + + +class DocumentDealChildQuoteChildDivider(BaseModel): + id: Optional[str] = None + + type: Optional[Literal["divider"]] = None + + +class DocumentDealChildQuoteChildImage(BaseModel): + src: str + + text: str + + id: Optional[str] = None + + type: Optional[Literal["image"]] = None + + +class DocumentDealChildQuoteChildLink(BaseModel): + text: str + + url: str + + id: Optional[str] = None + + type: Optional[Literal["link"]] = None + + +class DocumentDealChildQuoteChildLineBreak(BaseModel): + id: Optional[str] = None + + type: Optional[Literal["line_break"]] = None + + +class DocumentDealChildQuoteChildText(BaseModel): + text: str + + id: Optional[str] = None + + marks: Optional[List[Literal["bold", "italic", "underline", "strikethrough", "code", "math"]]] = None + + type: Optional[Literal["text"]] = None + + +class DocumentDealChildQuoteChildToolCall(BaseModel): + """A tool/function call made by the assistant.""" + + tool_call_id: str + + tool_name: str + + id: Optional[str] = None + + args: Optional[Dict[str, object]] = None + + type: Optional[Literal["tool_call"]] = None + + +class DocumentDealChildQuoteChildToolResult(BaseModel): + """The result of a tool call.""" + + output: Union[str, Dict[str, object], List[object]] + + tool_call_id: str + + tool_name: str + + id: Optional[str] = None + + is_error: Optional[bool] = None + + type: Optional[Literal["tool_result"]] = None + + +class DocumentDealChildQuoteChildTraceMessage(BaseModel): + """A message in an agent trace (user message, assistant message, or thinking).""" + + text: str + + id: Optional[str] = None + + message_type: Optional[Literal["message", "thinking"]] = None + + role: Optional[Literal["user", "assistant"]] = None + + timestamp: Optional[datetime] = None + + type: Optional[Literal["trace_message"]] = None + + +DocumentDealChildQuoteChild: TypeAlias = Union[ + DocumentDealChildQuoteChildBlob, + DocumentDealChildQuoteChildCode, + DocumentDealChildQuoteChildComment, + DocumentDealChildQuoteChildDivider, + DocumentDealChildQuoteChildImage, + DocumentDealChildQuoteChildLink, + DocumentDealChildQuoteChildLineBreak, + DocumentDealChildQuoteChildText, + DocumentDealChildQuoteChildToolCall, + DocumentDealChildQuoteChildToolResult, + DocumentDealChildQuoteChildTraceMessage, + object, +] + + +class DocumentDealChildQuote(BaseModel): + id: Optional[str] = None + + children: Optional[List[DocumentDealChildQuoteChild]] = None + + text: Optional[str] = None + + type: Optional[Literal["quote"]] = None + + +class DocumentDealChildTable(BaseModel): + id: Optional[str] = None + + children: Optional[List[object]] = None + + has_header: Optional[bool] = None + """Whether the first row should be treated as a header""" + + text: Optional[str] = None + + type: Optional[Literal["table"]] = None + + +class DocumentDealChildTableCellChildBlob(BaseModel): + """Represents embedded binary data using data URI scheme. + + Format: data:[][;base64], + Example: data:text/html;base64,PGh0bWw+... + """ + + data: str + + mimetype: str + + id: Optional[str] = None + + type: Optional[Literal["blob"]] = None + + +class DocumentDealChildTableCellChildCode(BaseModel): + text: str + + id: Optional[str] = None + + language: Optional[str] = None + + type: Optional[Literal["code"]] = None + + +class DocumentDealChildTableCellChildComment(BaseModel): + text: str + + id: Optional[str] = None + + created_at: Optional[datetime] = None + + type: Optional[Literal["comment"]] = None + + +class DocumentDealChildTableCellChildDivider(BaseModel): + id: Optional[str] = None + + type: Optional[Literal["divider"]] = None + + +class DocumentDealChildTableCellChildImage(BaseModel): + src: str + + text: str + + id: Optional[str] = None + + type: Optional[Literal["image"]] = None + + +class DocumentDealChildTableCellChildLink(BaseModel): + text: str + + url: str + + id: Optional[str] = None + + type: Optional[Literal["link"]] = None + + +class DocumentDealChildTableCellChildLineBreak(BaseModel): + id: Optional[str] = None + + type: Optional[Literal["line_break"]] = None + + +class DocumentDealChildTableCellChildText(BaseModel): + text: str + + id: Optional[str] = None + + marks: Optional[List[Literal["bold", "italic", "underline", "strikethrough", "code", "math"]]] = None + + type: Optional[Literal["text"]] = None + + +class DocumentDealChildTableCellChildToolCall(BaseModel): + """A tool/function call made by the assistant.""" + + tool_call_id: str + + tool_name: str + + id: Optional[str] = None + + args: Optional[Dict[str, object]] = None + + type: Optional[Literal["tool_call"]] = None + + +class DocumentDealChildTableCellChildToolResult(BaseModel): + """The result of a tool call.""" + + output: Union[str, Dict[str, object], List[object]] + + tool_call_id: str + + tool_name: str + + id: Optional[str] = None + + is_error: Optional[bool] = None + + type: Optional[Literal["tool_result"]] = None + + +class DocumentDealChildTableCellChildTraceMessage(BaseModel): + """A message in an agent trace (user message, assistant message, or thinking).""" + + text: str + + id: Optional[str] = None + + message_type: Optional[Literal["message", "thinking"]] = None + + role: Optional[Literal["user", "assistant"]] = None + + timestamp: Optional[datetime] = None + + type: Optional[Literal["trace_message"]] = None + + +DocumentDealChildTableCellChild: TypeAlias = Union[ + DocumentDealChildTableCellChildBlob, + DocumentDealChildTableCellChildCode, + DocumentDealChildTableCellChildComment, + DocumentDealChildTableCellChildDivider, + DocumentDealChildTableCellChildImage, + DocumentDealChildTableCellChildLink, + DocumentDealChildTableCellChildLineBreak, + DocumentDealChildTableCellChildText, + DocumentDealChildTableCellChildToolCall, + DocumentDealChildTableCellChildToolResult, + DocumentDealChildTableCellChildTraceMessage, + object, +] + + +class DocumentDealChildTableCell(BaseModel): + id: Optional[str] = None + + align: Optional[Literal["left", "center", "right"]] = None + + children: Optional[List[DocumentDealChildTableCellChild]] = None + + text: Optional[str] = None + + type: Optional[Literal["table_cell"]] = None + + +class DocumentDealChildTableRow(BaseModel): + id: Optional[str] = None + + children: Optional[List[object]] = None + + text: Optional[str] = None + + type: Optional[Literal["table_row"]] = None + + +class DocumentDealChildText(BaseModel): + text: str + + id: Optional[str] = None + + marks: Optional[List[Literal["bold", "italic", "underline", "strikethrough", "code", "math"]]] = None + + type: Optional[Literal["text"]] = None + + +class DocumentDealChildToDoChildBlob(BaseModel): + """Represents embedded binary data using data URI scheme. + + Format: data:[][;base64], + Example: data:text/html;base64,PGh0bWw+... + """ + + data: str + + mimetype: str + + id: Optional[str] = None + + type: Optional[Literal["blob"]] = None + + +class DocumentDealChildToDoChildCode(BaseModel): + text: str + + id: Optional[str] = None + + language: Optional[str] = None + + type: Optional[Literal["code"]] = None + + +class DocumentDealChildToDoChildComment(BaseModel): + text: str + + id: Optional[str] = None + + created_at: Optional[datetime] = None + + type: Optional[Literal["comment"]] = None + + +class DocumentDealChildToDoChildDivider(BaseModel): + id: Optional[str] = None + + type: Optional[Literal["divider"]] = None + + +class DocumentDealChildToDoChildImage(BaseModel): + src: str + + text: str + + id: Optional[str] = None + + type: Optional[Literal["image"]] = None + + +class DocumentDealChildToDoChildLink(BaseModel): + text: str + + url: str + + id: Optional[str] = None + + type: Optional[Literal["link"]] = None + + +class DocumentDealChildToDoChildLineBreak(BaseModel): + id: Optional[str] = None + + type: Optional[Literal["line_break"]] = None + + +class DocumentDealChildToDoChildText(BaseModel): + text: str + + id: Optional[str] = None + + marks: Optional[List[Literal["bold", "italic", "underline", "strikethrough", "code", "math"]]] = None + + type: Optional[Literal["text"]] = None + + +class DocumentDealChildToDoChildToolCall(BaseModel): + """A tool/function call made by the assistant.""" + + tool_call_id: str + + tool_name: str + + id: Optional[str] = None + + args: Optional[Dict[str, object]] = None + + type: Optional[Literal["tool_call"]] = None + + +class DocumentDealChildToDoChildToolResult(BaseModel): + """The result of a tool call.""" + + output: Union[str, Dict[str, object], List[object]] + + tool_call_id: str + + tool_name: str + + id: Optional[str] = None + + is_error: Optional[bool] = None + + type: Optional[Literal["tool_result"]] = None + + +class DocumentDealChildToDoChildTraceMessage(BaseModel): + """A message in an agent trace (user message, assistant message, or thinking).""" + + text: str + + id: Optional[str] = None + + message_type: Optional[Literal["message", "thinking"]] = None + + role: Optional[Literal["user", "assistant"]] = None + + timestamp: Optional[datetime] = None + + type: Optional[Literal["trace_message"]] = None + + +DocumentDealChildToDoChild: TypeAlias = Union[ + DocumentDealChildToDoChildBlob, + DocumentDealChildToDoChildCode, + DocumentDealChildToDoChildComment, + DocumentDealChildToDoChildDivider, + DocumentDealChildToDoChildImage, + DocumentDealChildToDoChildLink, + DocumentDealChildToDoChildLineBreak, + DocumentDealChildToDoChildText, + DocumentDealChildToDoChildToolCall, + DocumentDealChildToDoChildToolResult, + DocumentDealChildToDoChildTraceMessage, + object, +] + + +class DocumentDealChildToDo(BaseModel): + id: Optional[str] = None + + checked: Optional[bool] = None + + children: Optional[List[DocumentDealChildToDoChild]] = None + + text: Optional[str] = None + + type: Optional[Literal["todo"]] = None + + +class DocumentDealChildToolCall(BaseModel): + """A tool/function call made by the assistant.""" + + tool_call_id: str + + tool_name: str + + id: Optional[str] = None + + args: Optional[Dict[str, object]] = None + + type: Optional[Literal["tool_call"]] = None + + +class DocumentDealChildToolResult(BaseModel): + """The result of a tool call.""" + + output: Union[str, Dict[str, object], List[object]] + + tool_call_id: str + + tool_name: str + + id: Optional[str] = None + + is_error: Optional[bool] = None + + type: Optional[Literal["tool_result"]] = None + + +class DocumentDealChildTraceMessage(BaseModel): + """A message in an agent trace (user message, assistant message, or thinking).""" + + text: str + + id: Optional[str] = None + + message_type: Optional[Literal["message", "thinking"]] = None + + role: Optional[Literal["user", "assistant"]] = None + + timestamp: Optional[datetime] = None + + type: Optional[Literal["trace_message"]] = None + + +class DocumentDealChildUtterance(BaseModel): + """A speaker-attributed segment of a transcript (ENG-2476/D10). + + "Utterance" is the standard name for this across transcription providers + (AssemblyAI, Deepgram, Rev). Timestamps are relative offsets in seconds — + provider-native; absolute times derive from `Transcript.started_at`. + """ + + text: str + + id: Optional[str] = None + + end: Optional[float] = None + + speaker: Optional[object] = None + + start: Optional[float] = None + + type: Optional[Literal["utterance"]] = None + + +DocumentDealChild: TypeAlias = Annotated[ + Union[ + DocumentDealChildBlob, + DocumentDealChildCallout, + DocumentDealChildChunk, + DocumentDealChildCode, + DocumentDealChildComment, + DocumentDealChildDivider, + DocumentDealChildEquation, + DocumentDealChildFootnote, + DocumentDealChildHeading, + DocumentDealChildImage, + DocumentDealChildLink, + DocumentDealChildLineBreak, + DocumentDealChildList, + DocumentDealChildListItem, + DocumentDealChildParagraph, + DocumentDealChildQuote, + DocumentDealChildTable, + DocumentDealChildTableCell, + DocumentDealChildTableRow, + DocumentDealChildText, + DocumentDealChildToDo, + DocumentDealChildToolCall, + DocumentDealChildToolResult, + DocumentDealChildTraceMessage, + DocumentDealChildUtterance, + ], + PropertyInfo(discriminator="type"), +] + + +class DocumentDeal(BaseModel): + """A CRM deal/opportunity record (ENG-2476/D10).""" + + id: Optional[str] = None + + amount: Optional[float] = None + + children: Optional[List[DocumentDealChild]] = None + + closed_at: Optional[datetime] = None + + company_ids: Optional[List[str]] = None + + contact_ids: Optional[List[str]] = None + + currency: Optional[str] = None + + deal_source: Optional[str] = None + + lost_reason: Optional[str] = None + + name: Optional[str] = None + + pipeline: Optional[str] = None + + probability: Optional[float] = None + + stage: Optional[str] = None + + tags: Optional[List[str]] = None + + text: Optional[str] = None + + type: Optional[Literal["deal"]] = None + + won_reason: Optional[str] = None + + +Document: TypeAlias = Annotated[ + Union[ + DocumentDocument, + DocumentWebsite, + DocumentTask, + DocumentPerson, + DocumentMessage, + DocumentEvent, + DocumentFile, + DocumentConversation, + DocumentTrace, + DocumentTranscript, + DocumentCompany, + DocumentDeal, + ], + PropertyInfo(discriminator="type"), +] + + +class MemoryGetResponse(BaseModel): + """A document-shaped API response carrying the hyperdoc tree (ENG-2479/D12).""" + + document: Document + """The full hyperdoc tree. + + Switch on `type` for the document frame and recurse `children` for the body — + see the `` renderer. + """ + + resource_id: str + + source: Literal[ + "reddit", + "notion", + "slack", + "google_calendar", + "google_mail", + "box", + "dropbox", + "github", + "google_drive", + "vault", + "web_crawler", + "trace", + "microsoft_teams", + "gmail_actions", + "granola", + "fathom", + "fireflies", + "linear", + "hubspot", + "salesforce", + "coda", + "lightfield", + ] + + type: str + """Hyperdoc document type discriminator (document, message, file, event, ...).""" + + collection: Optional[str] = None + """The document's collection, if any.""" + + document_date: Optional[datetime] = None + """The document's own date (e.g. email sent date, event date).""" + + ingested_at: Optional[datetime] = None + """When Hyperspell first indexed the document.""" + + last_modified_at: Optional[datetime] = None + """When the source document was last modified.""" + + metadata: Optional[Dict[str, object]] = None + """Filterable custom metadata attached to the document.""" + + status: Optional[Literal["pending", "processing", "completed", "failed", "pending_review", "skipped"]] = None + """Indexing status of the document.""" + + title: Optional[str] = None + """Human-readable document title.""" diff --git a/src/hyperspell/types/memory_list_response.py b/src/hyperspell/types/memory_list_response.py new file mode 100644 index 00000000..ca998425 --- /dev/null +++ b/src/hyperspell/types/memory_list_response.py @@ -0,0 +1,20943 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +from typing import Dict, List, Union, Optional +from datetime import date, datetime +from typing_extensions import Literal, Annotated, TypeAlias + +from .._utils import PropertyInfo +from .._models import BaseModel + +__all__ = [ + "MemoryListResponse", + "Document", + "DocumentDocument", + "DocumentDocumentChild", + "DocumentDocumentChildBlob", + "DocumentDocumentChildCallout", + "DocumentDocumentChildCalloutChild", + "DocumentDocumentChildCalloutChildBlob", + "DocumentDocumentChildCalloutChildCode", + "DocumentDocumentChildCalloutChildComment", + "DocumentDocumentChildCalloutChildDivider", + "DocumentDocumentChildCalloutChildImage", + "DocumentDocumentChildCalloutChildLink", + "DocumentDocumentChildCalloutChildLineBreak", + "DocumentDocumentChildCalloutChildText", + "DocumentDocumentChildCalloutChildToolCall", + "DocumentDocumentChildCalloutChildToolResult", + "DocumentDocumentChildCalloutChildTraceMessage", + "DocumentDocumentChildChunk", + "DocumentDocumentChildChunkChild", + "DocumentDocumentChildChunkChildBlob", + "DocumentDocumentChildChunkChildCode", + "DocumentDocumentChildChunkChildComment", + "DocumentDocumentChildChunkChildDivider", + "DocumentDocumentChildChunkChildImage", + "DocumentDocumentChildChunkChildLink", + "DocumentDocumentChildChunkChildLineBreak", + "DocumentDocumentChildChunkChildText", + "DocumentDocumentChildChunkChildToolCall", + "DocumentDocumentChildChunkChildToolResult", + "DocumentDocumentChildChunkChildTraceMessage", + "DocumentDocumentChildCode", + "DocumentDocumentChildComment", + "DocumentDocumentChildDivider", + "DocumentDocumentChildEquation", + "DocumentDocumentChildEquationChild", + "DocumentDocumentChildEquationChildBlob", + "DocumentDocumentChildEquationChildCode", + "DocumentDocumentChildEquationChildComment", + "DocumentDocumentChildEquationChildDivider", + "DocumentDocumentChildEquationChildImage", + "DocumentDocumentChildEquationChildLink", + "DocumentDocumentChildEquationChildLineBreak", + "DocumentDocumentChildEquationChildText", + "DocumentDocumentChildEquationChildToolCall", + "DocumentDocumentChildEquationChildToolResult", + "DocumentDocumentChildEquationChildTraceMessage", + "DocumentDocumentChildFootnote", + "DocumentDocumentChildFootnoteChild", + "DocumentDocumentChildFootnoteChildBlob", + "DocumentDocumentChildFootnoteChildCode", + "DocumentDocumentChildFootnoteChildComment", + "DocumentDocumentChildFootnoteChildDivider", + "DocumentDocumentChildFootnoteChildImage", + "DocumentDocumentChildFootnoteChildLink", + "DocumentDocumentChildFootnoteChildLineBreak", + "DocumentDocumentChildFootnoteChildText", + "DocumentDocumentChildFootnoteChildToolCall", + "DocumentDocumentChildFootnoteChildToolResult", + "DocumentDocumentChildFootnoteChildTraceMessage", + "DocumentDocumentChildHeading", + "DocumentDocumentChildHeadingChild", + "DocumentDocumentChildHeadingChildBlob", + "DocumentDocumentChildHeadingChildCode", + "DocumentDocumentChildHeadingChildComment", + "DocumentDocumentChildHeadingChildDivider", + "DocumentDocumentChildHeadingChildImage", + "DocumentDocumentChildHeadingChildLink", + "DocumentDocumentChildHeadingChildLineBreak", + "DocumentDocumentChildHeadingChildText", + "DocumentDocumentChildHeadingChildToolCall", + "DocumentDocumentChildHeadingChildToolResult", + "DocumentDocumentChildHeadingChildTraceMessage", + "DocumentDocumentChildImage", + "DocumentDocumentChildLink", + "DocumentDocumentChildLineBreak", + "DocumentDocumentChildList", + "DocumentDocumentChildListItem", + "DocumentDocumentChildListItemChild", + "DocumentDocumentChildListItemChildBlob", + "DocumentDocumentChildListItemChildCode", + "DocumentDocumentChildListItemChildComment", + "DocumentDocumentChildListItemChildDivider", + "DocumentDocumentChildListItemChildImage", + "DocumentDocumentChildListItemChildLink", + "DocumentDocumentChildListItemChildLineBreak", + "DocumentDocumentChildListItemChildText", + "DocumentDocumentChildListItemChildToolCall", + "DocumentDocumentChildListItemChildToolResult", + "DocumentDocumentChildListItemChildTraceMessage", + "DocumentDocumentChildParagraph", + "DocumentDocumentChildParagraphChild", + "DocumentDocumentChildParagraphChildBlob", + "DocumentDocumentChildParagraphChildCode", + "DocumentDocumentChildParagraphChildComment", + "DocumentDocumentChildParagraphChildDivider", + "DocumentDocumentChildParagraphChildImage", + "DocumentDocumentChildParagraphChildLink", + "DocumentDocumentChildParagraphChildLineBreak", + "DocumentDocumentChildParagraphChildText", + "DocumentDocumentChildParagraphChildToolCall", + "DocumentDocumentChildParagraphChildToolResult", + "DocumentDocumentChildParagraphChildTraceMessage", + "DocumentDocumentChildQuote", + "DocumentDocumentChildQuoteChild", + "DocumentDocumentChildQuoteChildBlob", + "DocumentDocumentChildQuoteChildCode", + "DocumentDocumentChildQuoteChildComment", + "DocumentDocumentChildQuoteChildDivider", + "DocumentDocumentChildQuoteChildImage", + "DocumentDocumentChildQuoteChildLink", + "DocumentDocumentChildQuoteChildLineBreak", + "DocumentDocumentChildQuoteChildText", + "DocumentDocumentChildQuoteChildToolCall", + "DocumentDocumentChildQuoteChildToolResult", + "DocumentDocumentChildQuoteChildTraceMessage", + "DocumentDocumentChildTable", + "DocumentDocumentChildTableCell", + "DocumentDocumentChildTableCellChild", + "DocumentDocumentChildTableCellChildBlob", + "DocumentDocumentChildTableCellChildCode", + "DocumentDocumentChildTableCellChildComment", + "DocumentDocumentChildTableCellChildDivider", + "DocumentDocumentChildTableCellChildImage", + "DocumentDocumentChildTableCellChildLink", + "DocumentDocumentChildTableCellChildLineBreak", + "DocumentDocumentChildTableCellChildText", + "DocumentDocumentChildTableCellChildToolCall", + "DocumentDocumentChildTableCellChildToolResult", + "DocumentDocumentChildTableCellChildTraceMessage", + "DocumentDocumentChildTableRow", + "DocumentDocumentChildText", + "DocumentDocumentChildToDo", + "DocumentDocumentChildToDoChild", + "DocumentDocumentChildToDoChildBlob", + "DocumentDocumentChildToDoChildCode", + "DocumentDocumentChildToDoChildComment", + "DocumentDocumentChildToDoChildDivider", + "DocumentDocumentChildToDoChildImage", + "DocumentDocumentChildToDoChildLink", + "DocumentDocumentChildToDoChildLineBreak", + "DocumentDocumentChildToDoChildText", + "DocumentDocumentChildToDoChildToolCall", + "DocumentDocumentChildToDoChildToolResult", + "DocumentDocumentChildToDoChildTraceMessage", + "DocumentDocumentChildToolCall", + "DocumentDocumentChildToolResult", + "DocumentDocumentChildTraceMessage", + "DocumentDocumentChildUtterance", + "DocumentWebsite", + "DocumentWebsiteChild", + "DocumentWebsiteChildBlob", + "DocumentWebsiteChildCallout", + "DocumentWebsiteChildCalloutChild", + "DocumentWebsiteChildCalloutChildBlob", + "DocumentWebsiteChildCalloutChildCode", + "DocumentWebsiteChildCalloutChildComment", + "DocumentWebsiteChildCalloutChildDivider", + "DocumentWebsiteChildCalloutChildImage", + "DocumentWebsiteChildCalloutChildLink", + "DocumentWebsiteChildCalloutChildLineBreak", + "DocumentWebsiteChildCalloutChildText", + "DocumentWebsiteChildCalloutChildToolCall", + "DocumentWebsiteChildCalloutChildToolResult", + "DocumentWebsiteChildCalloutChildTraceMessage", + "DocumentWebsiteChildChunk", + "DocumentWebsiteChildChunkChild", + "DocumentWebsiteChildChunkChildBlob", + "DocumentWebsiteChildChunkChildCode", + "DocumentWebsiteChildChunkChildComment", + "DocumentWebsiteChildChunkChildDivider", + "DocumentWebsiteChildChunkChildImage", + "DocumentWebsiteChildChunkChildLink", + "DocumentWebsiteChildChunkChildLineBreak", + "DocumentWebsiteChildChunkChildText", + "DocumentWebsiteChildChunkChildToolCall", + "DocumentWebsiteChildChunkChildToolResult", + "DocumentWebsiteChildChunkChildTraceMessage", + "DocumentWebsiteChildCode", + "DocumentWebsiteChildComment", + "DocumentWebsiteChildDivider", + "DocumentWebsiteChildEquation", + "DocumentWebsiteChildEquationChild", + "DocumentWebsiteChildEquationChildBlob", + "DocumentWebsiteChildEquationChildCode", + "DocumentWebsiteChildEquationChildComment", + "DocumentWebsiteChildEquationChildDivider", + "DocumentWebsiteChildEquationChildImage", + "DocumentWebsiteChildEquationChildLink", + "DocumentWebsiteChildEquationChildLineBreak", + "DocumentWebsiteChildEquationChildText", + "DocumentWebsiteChildEquationChildToolCall", + "DocumentWebsiteChildEquationChildToolResult", + "DocumentWebsiteChildEquationChildTraceMessage", + "DocumentWebsiteChildFootnote", + "DocumentWebsiteChildFootnoteChild", + "DocumentWebsiteChildFootnoteChildBlob", + "DocumentWebsiteChildFootnoteChildCode", + "DocumentWebsiteChildFootnoteChildComment", + "DocumentWebsiteChildFootnoteChildDivider", + "DocumentWebsiteChildFootnoteChildImage", + "DocumentWebsiteChildFootnoteChildLink", + "DocumentWebsiteChildFootnoteChildLineBreak", + "DocumentWebsiteChildFootnoteChildText", + "DocumentWebsiteChildFootnoteChildToolCall", + "DocumentWebsiteChildFootnoteChildToolResult", + "DocumentWebsiteChildFootnoteChildTraceMessage", + "DocumentWebsiteChildHeading", + "DocumentWebsiteChildHeadingChild", + "DocumentWebsiteChildHeadingChildBlob", + "DocumentWebsiteChildHeadingChildCode", + "DocumentWebsiteChildHeadingChildComment", + "DocumentWebsiteChildHeadingChildDivider", + "DocumentWebsiteChildHeadingChildImage", + "DocumentWebsiteChildHeadingChildLink", + "DocumentWebsiteChildHeadingChildLineBreak", + "DocumentWebsiteChildHeadingChildText", + "DocumentWebsiteChildHeadingChildToolCall", + "DocumentWebsiteChildHeadingChildToolResult", + "DocumentWebsiteChildHeadingChildTraceMessage", + "DocumentWebsiteChildImage", + "DocumentWebsiteChildLink", + "DocumentWebsiteChildLineBreak", + "DocumentWebsiteChildList", + "DocumentWebsiteChildListItem", + "DocumentWebsiteChildListItemChild", + "DocumentWebsiteChildListItemChildBlob", + "DocumentWebsiteChildListItemChildCode", + "DocumentWebsiteChildListItemChildComment", + "DocumentWebsiteChildListItemChildDivider", + "DocumentWebsiteChildListItemChildImage", + "DocumentWebsiteChildListItemChildLink", + "DocumentWebsiteChildListItemChildLineBreak", + "DocumentWebsiteChildListItemChildText", + "DocumentWebsiteChildListItemChildToolCall", + "DocumentWebsiteChildListItemChildToolResult", + "DocumentWebsiteChildListItemChildTraceMessage", + "DocumentWebsiteChildParagraph", + "DocumentWebsiteChildParagraphChild", + "DocumentWebsiteChildParagraphChildBlob", + "DocumentWebsiteChildParagraphChildCode", + "DocumentWebsiteChildParagraphChildComment", + "DocumentWebsiteChildParagraphChildDivider", + "DocumentWebsiteChildParagraphChildImage", + "DocumentWebsiteChildParagraphChildLink", + "DocumentWebsiteChildParagraphChildLineBreak", + "DocumentWebsiteChildParagraphChildText", + "DocumentWebsiteChildParagraphChildToolCall", + "DocumentWebsiteChildParagraphChildToolResult", + "DocumentWebsiteChildParagraphChildTraceMessage", + "DocumentWebsiteChildQuote", + "DocumentWebsiteChildQuoteChild", + "DocumentWebsiteChildQuoteChildBlob", + "DocumentWebsiteChildQuoteChildCode", + "DocumentWebsiteChildQuoteChildComment", + "DocumentWebsiteChildQuoteChildDivider", + "DocumentWebsiteChildQuoteChildImage", + "DocumentWebsiteChildQuoteChildLink", + "DocumentWebsiteChildQuoteChildLineBreak", + "DocumentWebsiteChildQuoteChildText", + "DocumentWebsiteChildQuoteChildToolCall", + "DocumentWebsiteChildQuoteChildToolResult", + "DocumentWebsiteChildQuoteChildTraceMessage", + "DocumentWebsiteChildTable", + "DocumentWebsiteChildTableCell", + "DocumentWebsiteChildTableCellChild", + "DocumentWebsiteChildTableCellChildBlob", + "DocumentWebsiteChildTableCellChildCode", + "DocumentWebsiteChildTableCellChildComment", + "DocumentWebsiteChildTableCellChildDivider", + "DocumentWebsiteChildTableCellChildImage", + "DocumentWebsiteChildTableCellChildLink", + "DocumentWebsiteChildTableCellChildLineBreak", + "DocumentWebsiteChildTableCellChildText", + "DocumentWebsiteChildTableCellChildToolCall", + "DocumentWebsiteChildTableCellChildToolResult", + "DocumentWebsiteChildTableCellChildTraceMessage", + "DocumentWebsiteChildTableRow", + "DocumentWebsiteChildText", + "DocumentWebsiteChildToDo", + "DocumentWebsiteChildToDoChild", + "DocumentWebsiteChildToDoChildBlob", + "DocumentWebsiteChildToDoChildCode", + "DocumentWebsiteChildToDoChildComment", + "DocumentWebsiteChildToDoChildDivider", + "DocumentWebsiteChildToDoChildImage", + "DocumentWebsiteChildToDoChildLink", + "DocumentWebsiteChildToDoChildLineBreak", + "DocumentWebsiteChildToDoChildText", + "DocumentWebsiteChildToDoChildToolCall", + "DocumentWebsiteChildToDoChildToolResult", + "DocumentWebsiteChildToDoChildTraceMessage", + "DocumentWebsiteChildToolCall", + "DocumentWebsiteChildToolResult", + "DocumentWebsiteChildTraceMessage", + "DocumentWebsiteChildUtterance", + "DocumentTask", + "DocumentTaskChild", + "DocumentTaskChildBlob", + "DocumentTaskChildCallout", + "DocumentTaskChildCalloutChild", + "DocumentTaskChildCalloutChildBlob", + "DocumentTaskChildCalloutChildCode", + "DocumentTaskChildCalloutChildComment", + "DocumentTaskChildCalloutChildDivider", + "DocumentTaskChildCalloutChildImage", + "DocumentTaskChildCalloutChildLink", + "DocumentTaskChildCalloutChildLineBreak", + "DocumentTaskChildCalloutChildText", + "DocumentTaskChildCalloutChildToolCall", + "DocumentTaskChildCalloutChildToolResult", + "DocumentTaskChildCalloutChildTraceMessage", + "DocumentTaskChildChunk", + "DocumentTaskChildChunkChild", + "DocumentTaskChildChunkChildBlob", + "DocumentTaskChildChunkChildCode", + "DocumentTaskChildChunkChildComment", + "DocumentTaskChildChunkChildDivider", + "DocumentTaskChildChunkChildImage", + "DocumentTaskChildChunkChildLink", + "DocumentTaskChildChunkChildLineBreak", + "DocumentTaskChildChunkChildText", + "DocumentTaskChildChunkChildToolCall", + "DocumentTaskChildChunkChildToolResult", + "DocumentTaskChildChunkChildTraceMessage", + "DocumentTaskChildCode", + "DocumentTaskChildComment", + "DocumentTaskChildDivider", + "DocumentTaskChildEquation", + "DocumentTaskChildEquationChild", + "DocumentTaskChildEquationChildBlob", + "DocumentTaskChildEquationChildCode", + "DocumentTaskChildEquationChildComment", + "DocumentTaskChildEquationChildDivider", + "DocumentTaskChildEquationChildImage", + "DocumentTaskChildEquationChildLink", + "DocumentTaskChildEquationChildLineBreak", + "DocumentTaskChildEquationChildText", + "DocumentTaskChildEquationChildToolCall", + "DocumentTaskChildEquationChildToolResult", + "DocumentTaskChildEquationChildTraceMessage", + "DocumentTaskChildFootnote", + "DocumentTaskChildFootnoteChild", + "DocumentTaskChildFootnoteChildBlob", + "DocumentTaskChildFootnoteChildCode", + "DocumentTaskChildFootnoteChildComment", + "DocumentTaskChildFootnoteChildDivider", + "DocumentTaskChildFootnoteChildImage", + "DocumentTaskChildFootnoteChildLink", + "DocumentTaskChildFootnoteChildLineBreak", + "DocumentTaskChildFootnoteChildText", + "DocumentTaskChildFootnoteChildToolCall", + "DocumentTaskChildFootnoteChildToolResult", + "DocumentTaskChildFootnoteChildTraceMessage", + "DocumentTaskChildHeading", + "DocumentTaskChildHeadingChild", + "DocumentTaskChildHeadingChildBlob", + "DocumentTaskChildHeadingChildCode", + "DocumentTaskChildHeadingChildComment", + "DocumentTaskChildHeadingChildDivider", + "DocumentTaskChildHeadingChildImage", + "DocumentTaskChildHeadingChildLink", + "DocumentTaskChildHeadingChildLineBreak", + "DocumentTaskChildHeadingChildText", + "DocumentTaskChildHeadingChildToolCall", + "DocumentTaskChildHeadingChildToolResult", + "DocumentTaskChildHeadingChildTraceMessage", + "DocumentTaskChildImage", + "DocumentTaskChildLink", + "DocumentTaskChildLineBreak", + "DocumentTaskChildList", + "DocumentTaskChildListItem", + "DocumentTaskChildListItemChild", + "DocumentTaskChildListItemChildBlob", + "DocumentTaskChildListItemChildCode", + "DocumentTaskChildListItemChildComment", + "DocumentTaskChildListItemChildDivider", + "DocumentTaskChildListItemChildImage", + "DocumentTaskChildListItemChildLink", + "DocumentTaskChildListItemChildLineBreak", + "DocumentTaskChildListItemChildText", + "DocumentTaskChildListItemChildToolCall", + "DocumentTaskChildListItemChildToolResult", + "DocumentTaskChildListItemChildTraceMessage", + "DocumentTaskChildParagraph", + "DocumentTaskChildParagraphChild", + "DocumentTaskChildParagraphChildBlob", + "DocumentTaskChildParagraphChildCode", + "DocumentTaskChildParagraphChildComment", + "DocumentTaskChildParagraphChildDivider", + "DocumentTaskChildParagraphChildImage", + "DocumentTaskChildParagraphChildLink", + "DocumentTaskChildParagraphChildLineBreak", + "DocumentTaskChildParagraphChildText", + "DocumentTaskChildParagraphChildToolCall", + "DocumentTaskChildParagraphChildToolResult", + "DocumentTaskChildParagraphChildTraceMessage", + "DocumentTaskChildQuote", + "DocumentTaskChildQuoteChild", + "DocumentTaskChildQuoteChildBlob", + "DocumentTaskChildQuoteChildCode", + "DocumentTaskChildQuoteChildComment", + "DocumentTaskChildQuoteChildDivider", + "DocumentTaskChildQuoteChildImage", + "DocumentTaskChildQuoteChildLink", + "DocumentTaskChildQuoteChildLineBreak", + "DocumentTaskChildQuoteChildText", + "DocumentTaskChildQuoteChildToolCall", + "DocumentTaskChildQuoteChildToolResult", + "DocumentTaskChildQuoteChildTraceMessage", + "DocumentTaskChildTable", + "DocumentTaskChildTableCell", + "DocumentTaskChildTableCellChild", + "DocumentTaskChildTableCellChildBlob", + "DocumentTaskChildTableCellChildCode", + "DocumentTaskChildTableCellChildComment", + "DocumentTaskChildTableCellChildDivider", + "DocumentTaskChildTableCellChildImage", + "DocumentTaskChildTableCellChildLink", + "DocumentTaskChildTableCellChildLineBreak", + "DocumentTaskChildTableCellChildText", + "DocumentTaskChildTableCellChildToolCall", + "DocumentTaskChildTableCellChildToolResult", + "DocumentTaskChildTableCellChildTraceMessage", + "DocumentTaskChildTableRow", + "DocumentTaskChildText", + "DocumentTaskChildToDo", + "DocumentTaskChildToDoChild", + "DocumentTaskChildToDoChildBlob", + "DocumentTaskChildToDoChildCode", + "DocumentTaskChildToDoChildComment", + "DocumentTaskChildToDoChildDivider", + "DocumentTaskChildToDoChildImage", + "DocumentTaskChildToDoChildLink", + "DocumentTaskChildToDoChildLineBreak", + "DocumentTaskChildToDoChildText", + "DocumentTaskChildToDoChildToolCall", + "DocumentTaskChildToDoChildToolResult", + "DocumentTaskChildToDoChildTraceMessage", + "DocumentTaskChildToolCall", + "DocumentTaskChildToolResult", + "DocumentTaskChildTraceMessage", + "DocumentTaskChildUtterance", + "DocumentTaskComment", + "DocumentTaskCommentSender", + "DocumentTaskCommentSenderChild", + "DocumentTaskCommentSenderChildBlob", + "DocumentTaskCommentSenderChildCode", + "DocumentTaskCommentSenderChildComment", + "DocumentTaskCommentSenderChildDivider", + "DocumentTaskCommentSenderChildImage", + "DocumentTaskCommentSenderChildLink", + "DocumentTaskCommentSenderChildLineBreak", + "DocumentTaskCommentSenderChildText", + "DocumentTaskCommentSenderChildToolCall", + "DocumentTaskCommentSenderChildToolResult", + "DocumentTaskCommentSenderChildTraceMessage", + "DocumentTaskCommentChild", + "DocumentTaskCommentChildBlob", + "DocumentTaskCommentChildCallout", + "DocumentTaskCommentChildCalloutChild", + "DocumentTaskCommentChildCalloutChildBlob", + "DocumentTaskCommentChildCalloutChildCode", + "DocumentTaskCommentChildCalloutChildComment", + "DocumentTaskCommentChildCalloutChildDivider", + "DocumentTaskCommentChildCalloutChildImage", + "DocumentTaskCommentChildCalloutChildLink", + "DocumentTaskCommentChildCalloutChildLineBreak", + "DocumentTaskCommentChildCalloutChildText", + "DocumentTaskCommentChildCalloutChildToolCall", + "DocumentTaskCommentChildCalloutChildToolResult", + "DocumentTaskCommentChildCalloutChildTraceMessage", + "DocumentTaskCommentChildChunk", + "DocumentTaskCommentChildChunkChild", + "DocumentTaskCommentChildChunkChildBlob", + "DocumentTaskCommentChildChunkChildCode", + "DocumentTaskCommentChildChunkChildComment", + "DocumentTaskCommentChildChunkChildDivider", + "DocumentTaskCommentChildChunkChildImage", + "DocumentTaskCommentChildChunkChildLink", + "DocumentTaskCommentChildChunkChildLineBreak", + "DocumentTaskCommentChildChunkChildText", + "DocumentTaskCommentChildChunkChildToolCall", + "DocumentTaskCommentChildChunkChildToolResult", + "DocumentTaskCommentChildChunkChildTraceMessage", + "DocumentTaskCommentChildCode", + "DocumentTaskCommentChildComment", + "DocumentTaskCommentChildDivider", + "DocumentTaskCommentChildEquation", + "DocumentTaskCommentChildEquationChild", + "DocumentTaskCommentChildEquationChildBlob", + "DocumentTaskCommentChildEquationChildCode", + "DocumentTaskCommentChildEquationChildComment", + "DocumentTaskCommentChildEquationChildDivider", + "DocumentTaskCommentChildEquationChildImage", + "DocumentTaskCommentChildEquationChildLink", + "DocumentTaskCommentChildEquationChildLineBreak", + "DocumentTaskCommentChildEquationChildText", + "DocumentTaskCommentChildEquationChildToolCall", + "DocumentTaskCommentChildEquationChildToolResult", + "DocumentTaskCommentChildEquationChildTraceMessage", + "DocumentTaskCommentChildFootnote", + "DocumentTaskCommentChildFootnoteChild", + "DocumentTaskCommentChildFootnoteChildBlob", + "DocumentTaskCommentChildFootnoteChildCode", + "DocumentTaskCommentChildFootnoteChildComment", + "DocumentTaskCommentChildFootnoteChildDivider", + "DocumentTaskCommentChildFootnoteChildImage", + "DocumentTaskCommentChildFootnoteChildLink", + "DocumentTaskCommentChildFootnoteChildLineBreak", + "DocumentTaskCommentChildFootnoteChildText", + "DocumentTaskCommentChildFootnoteChildToolCall", + "DocumentTaskCommentChildFootnoteChildToolResult", + "DocumentTaskCommentChildFootnoteChildTraceMessage", + "DocumentTaskCommentChildHeading", + "DocumentTaskCommentChildHeadingChild", + "DocumentTaskCommentChildHeadingChildBlob", + "DocumentTaskCommentChildHeadingChildCode", + "DocumentTaskCommentChildHeadingChildComment", + "DocumentTaskCommentChildHeadingChildDivider", + "DocumentTaskCommentChildHeadingChildImage", + "DocumentTaskCommentChildHeadingChildLink", + "DocumentTaskCommentChildHeadingChildLineBreak", + "DocumentTaskCommentChildHeadingChildText", + "DocumentTaskCommentChildHeadingChildToolCall", + "DocumentTaskCommentChildHeadingChildToolResult", + "DocumentTaskCommentChildHeadingChildTraceMessage", + "DocumentTaskCommentChildImage", + "DocumentTaskCommentChildLink", + "DocumentTaskCommentChildLineBreak", + "DocumentTaskCommentChildList", + "DocumentTaskCommentChildListItem", + "DocumentTaskCommentChildListItemChild", + "DocumentTaskCommentChildListItemChildBlob", + "DocumentTaskCommentChildListItemChildCode", + "DocumentTaskCommentChildListItemChildComment", + "DocumentTaskCommentChildListItemChildDivider", + "DocumentTaskCommentChildListItemChildImage", + "DocumentTaskCommentChildListItemChildLink", + "DocumentTaskCommentChildListItemChildLineBreak", + "DocumentTaskCommentChildListItemChildText", + "DocumentTaskCommentChildListItemChildToolCall", + "DocumentTaskCommentChildListItemChildToolResult", + "DocumentTaskCommentChildListItemChildTraceMessage", + "DocumentTaskCommentChildParagraph", + "DocumentTaskCommentChildParagraphChild", + "DocumentTaskCommentChildParagraphChildBlob", + "DocumentTaskCommentChildParagraphChildCode", + "DocumentTaskCommentChildParagraphChildComment", + "DocumentTaskCommentChildParagraphChildDivider", + "DocumentTaskCommentChildParagraphChildImage", + "DocumentTaskCommentChildParagraphChildLink", + "DocumentTaskCommentChildParagraphChildLineBreak", + "DocumentTaskCommentChildParagraphChildText", + "DocumentTaskCommentChildParagraphChildToolCall", + "DocumentTaskCommentChildParagraphChildToolResult", + "DocumentTaskCommentChildParagraphChildTraceMessage", + "DocumentTaskCommentChildQuote", + "DocumentTaskCommentChildQuoteChild", + "DocumentTaskCommentChildQuoteChildBlob", + "DocumentTaskCommentChildQuoteChildCode", + "DocumentTaskCommentChildQuoteChildComment", + "DocumentTaskCommentChildQuoteChildDivider", + "DocumentTaskCommentChildQuoteChildImage", + "DocumentTaskCommentChildQuoteChildLink", + "DocumentTaskCommentChildQuoteChildLineBreak", + "DocumentTaskCommentChildQuoteChildText", + "DocumentTaskCommentChildQuoteChildToolCall", + "DocumentTaskCommentChildQuoteChildToolResult", + "DocumentTaskCommentChildQuoteChildTraceMessage", + "DocumentTaskCommentChildTable", + "DocumentTaskCommentChildTableCell", + "DocumentTaskCommentChildTableCellChild", + "DocumentTaskCommentChildTableCellChildBlob", + "DocumentTaskCommentChildTableCellChildCode", + "DocumentTaskCommentChildTableCellChildComment", + "DocumentTaskCommentChildTableCellChildDivider", + "DocumentTaskCommentChildTableCellChildImage", + "DocumentTaskCommentChildTableCellChildLink", + "DocumentTaskCommentChildTableCellChildLineBreak", + "DocumentTaskCommentChildTableCellChildText", + "DocumentTaskCommentChildTableCellChildToolCall", + "DocumentTaskCommentChildTableCellChildToolResult", + "DocumentTaskCommentChildTableCellChildTraceMessage", + "DocumentTaskCommentChildTableRow", + "DocumentTaskCommentChildText", + "DocumentTaskCommentChildToDo", + "DocumentTaskCommentChildToDoChild", + "DocumentTaskCommentChildToDoChildBlob", + "DocumentTaskCommentChildToDoChildCode", + "DocumentTaskCommentChildToDoChildComment", + "DocumentTaskCommentChildToDoChildDivider", + "DocumentTaskCommentChildToDoChildImage", + "DocumentTaskCommentChildToDoChildLink", + "DocumentTaskCommentChildToDoChildLineBreak", + "DocumentTaskCommentChildToDoChildText", + "DocumentTaskCommentChildToDoChildToolCall", + "DocumentTaskCommentChildToDoChildToolResult", + "DocumentTaskCommentChildToDoChildTraceMessage", + "DocumentTaskCommentChildToolCall", + "DocumentTaskCommentChildToolResult", + "DocumentTaskCommentChildTraceMessage", + "DocumentTaskCommentChildUtterance", + "DocumentTaskCommentMentionedUser", + "DocumentTaskCommentMentionedUserChild", + "DocumentTaskCommentMentionedUserChildBlob", + "DocumentTaskCommentMentionedUserChildCode", + "DocumentTaskCommentMentionedUserChildComment", + "DocumentTaskCommentMentionedUserChildDivider", + "DocumentTaskCommentMentionedUserChildImage", + "DocumentTaskCommentMentionedUserChildLink", + "DocumentTaskCommentMentionedUserChildLineBreak", + "DocumentTaskCommentMentionedUserChildText", + "DocumentTaskCommentMentionedUserChildToolCall", + "DocumentTaskCommentMentionedUserChildToolResult", + "DocumentTaskCommentMentionedUserChildTraceMessage", + "DocumentPerson", + "DocumentPersonChild", + "DocumentPersonChildBlob", + "DocumentPersonChildCode", + "DocumentPersonChildComment", + "DocumentPersonChildDivider", + "DocumentPersonChildImage", + "DocumentPersonChildLink", + "DocumentPersonChildLineBreak", + "DocumentPersonChildText", + "DocumentPersonChildToolCall", + "DocumentPersonChildToolResult", + "DocumentPersonChildTraceMessage", + "DocumentMessage", + "DocumentMessageSender", + "DocumentMessageSenderChild", + "DocumentMessageSenderChildBlob", + "DocumentMessageSenderChildCode", + "DocumentMessageSenderChildComment", + "DocumentMessageSenderChildDivider", + "DocumentMessageSenderChildImage", + "DocumentMessageSenderChildLink", + "DocumentMessageSenderChildLineBreak", + "DocumentMessageSenderChildText", + "DocumentMessageSenderChildToolCall", + "DocumentMessageSenderChildToolResult", + "DocumentMessageSenderChildTraceMessage", + "DocumentMessageChild", + "DocumentMessageChildBlob", + "DocumentMessageChildCallout", + "DocumentMessageChildCalloutChild", + "DocumentMessageChildCalloutChildBlob", + "DocumentMessageChildCalloutChildCode", + "DocumentMessageChildCalloutChildComment", + "DocumentMessageChildCalloutChildDivider", + "DocumentMessageChildCalloutChildImage", + "DocumentMessageChildCalloutChildLink", + "DocumentMessageChildCalloutChildLineBreak", + "DocumentMessageChildCalloutChildText", + "DocumentMessageChildCalloutChildToolCall", + "DocumentMessageChildCalloutChildToolResult", + "DocumentMessageChildCalloutChildTraceMessage", + "DocumentMessageChildChunk", + "DocumentMessageChildChunkChild", + "DocumentMessageChildChunkChildBlob", + "DocumentMessageChildChunkChildCode", + "DocumentMessageChildChunkChildComment", + "DocumentMessageChildChunkChildDivider", + "DocumentMessageChildChunkChildImage", + "DocumentMessageChildChunkChildLink", + "DocumentMessageChildChunkChildLineBreak", + "DocumentMessageChildChunkChildText", + "DocumentMessageChildChunkChildToolCall", + "DocumentMessageChildChunkChildToolResult", + "DocumentMessageChildChunkChildTraceMessage", + "DocumentMessageChildCode", + "DocumentMessageChildComment", + "DocumentMessageChildDivider", + "DocumentMessageChildEquation", + "DocumentMessageChildEquationChild", + "DocumentMessageChildEquationChildBlob", + "DocumentMessageChildEquationChildCode", + "DocumentMessageChildEquationChildComment", + "DocumentMessageChildEquationChildDivider", + "DocumentMessageChildEquationChildImage", + "DocumentMessageChildEquationChildLink", + "DocumentMessageChildEquationChildLineBreak", + "DocumentMessageChildEquationChildText", + "DocumentMessageChildEquationChildToolCall", + "DocumentMessageChildEquationChildToolResult", + "DocumentMessageChildEquationChildTraceMessage", + "DocumentMessageChildFootnote", + "DocumentMessageChildFootnoteChild", + "DocumentMessageChildFootnoteChildBlob", + "DocumentMessageChildFootnoteChildCode", + "DocumentMessageChildFootnoteChildComment", + "DocumentMessageChildFootnoteChildDivider", + "DocumentMessageChildFootnoteChildImage", + "DocumentMessageChildFootnoteChildLink", + "DocumentMessageChildFootnoteChildLineBreak", + "DocumentMessageChildFootnoteChildText", + "DocumentMessageChildFootnoteChildToolCall", + "DocumentMessageChildFootnoteChildToolResult", + "DocumentMessageChildFootnoteChildTraceMessage", + "DocumentMessageChildHeading", + "DocumentMessageChildHeadingChild", + "DocumentMessageChildHeadingChildBlob", + "DocumentMessageChildHeadingChildCode", + "DocumentMessageChildHeadingChildComment", + "DocumentMessageChildHeadingChildDivider", + "DocumentMessageChildHeadingChildImage", + "DocumentMessageChildHeadingChildLink", + "DocumentMessageChildHeadingChildLineBreak", + "DocumentMessageChildHeadingChildText", + "DocumentMessageChildHeadingChildToolCall", + "DocumentMessageChildHeadingChildToolResult", + "DocumentMessageChildHeadingChildTraceMessage", + "DocumentMessageChildImage", + "DocumentMessageChildLink", + "DocumentMessageChildLineBreak", + "DocumentMessageChildList", + "DocumentMessageChildListItem", + "DocumentMessageChildListItemChild", + "DocumentMessageChildListItemChildBlob", + "DocumentMessageChildListItemChildCode", + "DocumentMessageChildListItemChildComment", + "DocumentMessageChildListItemChildDivider", + "DocumentMessageChildListItemChildImage", + "DocumentMessageChildListItemChildLink", + "DocumentMessageChildListItemChildLineBreak", + "DocumentMessageChildListItemChildText", + "DocumentMessageChildListItemChildToolCall", + "DocumentMessageChildListItemChildToolResult", + "DocumentMessageChildListItemChildTraceMessage", + "DocumentMessageChildParagraph", + "DocumentMessageChildParagraphChild", + "DocumentMessageChildParagraphChildBlob", + "DocumentMessageChildParagraphChildCode", + "DocumentMessageChildParagraphChildComment", + "DocumentMessageChildParagraphChildDivider", + "DocumentMessageChildParagraphChildImage", + "DocumentMessageChildParagraphChildLink", + "DocumentMessageChildParagraphChildLineBreak", + "DocumentMessageChildParagraphChildText", + "DocumentMessageChildParagraphChildToolCall", + "DocumentMessageChildParagraphChildToolResult", + "DocumentMessageChildParagraphChildTraceMessage", + "DocumentMessageChildQuote", + "DocumentMessageChildQuoteChild", + "DocumentMessageChildQuoteChildBlob", + "DocumentMessageChildQuoteChildCode", + "DocumentMessageChildQuoteChildComment", + "DocumentMessageChildQuoteChildDivider", + "DocumentMessageChildQuoteChildImage", + "DocumentMessageChildQuoteChildLink", + "DocumentMessageChildQuoteChildLineBreak", + "DocumentMessageChildQuoteChildText", + "DocumentMessageChildQuoteChildToolCall", + "DocumentMessageChildQuoteChildToolResult", + "DocumentMessageChildQuoteChildTraceMessage", + "DocumentMessageChildTable", + "DocumentMessageChildTableCell", + "DocumentMessageChildTableCellChild", + "DocumentMessageChildTableCellChildBlob", + "DocumentMessageChildTableCellChildCode", + "DocumentMessageChildTableCellChildComment", + "DocumentMessageChildTableCellChildDivider", + "DocumentMessageChildTableCellChildImage", + "DocumentMessageChildTableCellChildLink", + "DocumentMessageChildTableCellChildLineBreak", + "DocumentMessageChildTableCellChildText", + "DocumentMessageChildTableCellChildToolCall", + "DocumentMessageChildTableCellChildToolResult", + "DocumentMessageChildTableCellChildTraceMessage", + "DocumentMessageChildTableRow", + "DocumentMessageChildText", + "DocumentMessageChildToDo", + "DocumentMessageChildToDoChild", + "DocumentMessageChildToDoChildBlob", + "DocumentMessageChildToDoChildCode", + "DocumentMessageChildToDoChildComment", + "DocumentMessageChildToDoChildDivider", + "DocumentMessageChildToDoChildImage", + "DocumentMessageChildToDoChildLink", + "DocumentMessageChildToDoChildLineBreak", + "DocumentMessageChildToDoChildText", + "DocumentMessageChildToDoChildToolCall", + "DocumentMessageChildToDoChildToolResult", + "DocumentMessageChildToDoChildTraceMessage", + "DocumentMessageChildToolCall", + "DocumentMessageChildToolResult", + "DocumentMessageChildTraceMessage", + "DocumentMessageChildUtterance", + "DocumentMessageMentionedUser", + "DocumentMessageMentionedUserChild", + "DocumentMessageMentionedUserChildBlob", + "DocumentMessageMentionedUserChildCode", + "DocumentMessageMentionedUserChildComment", + "DocumentMessageMentionedUserChildDivider", + "DocumentMessageMentionedUserChildImage", + "DocumentMessageMentionedUserChildLink", + "DocumentMessageMentionedUserChildLineBreak", + "DocumentMessageMentionedUserChildText", + "DocumentMessageMentionedUserChildToolCall", + "DocumentMessageMentionedUserChildToolResult", + "DocumentMessageMentionedUserChildTraceMessage", + "DocumentEvent", + "DocumentEventAttendee", + "DocumentEventAttendeeChild", + "DocumentEventAttendeeChildBlob", + "DocumentEventAttendeeChildCode", + "DocumentEventAttendeeChildComment", + "DocumentEventAttendeeChildDivider", + "DocumentEventAttendeeChildImage", + "DocumentEventAttendeeChildLink", + "DocumentEventAttendeeChildLineBreak", + "DocumentEventAttendeeChildText", + "DocumentEventAttendeeChildToolCall", + "DocumentEventAttendeeChildToolResult", + "DocumentEventAttendeeChildTraceMessage", + "DocumentEventChild", + "DocumentEventChildBlob", + "DocumentEventChildCallout", + "DocumentEventChildCalloutChild", + "DocumentEventChildCalloutChildBlob", + "DocumentEventChildCalloutChildCode", + "DocumentEventChildCalloutChildComment", + "DocumentEventChildCalloutChildDivider", + "DocumentEventChildCalloutChildImage", + "DocumentEventChildCalloutChildLink", + "DocumentEventChildCalloutChildLineBreak", + "DocumentEventChildCalloutChildText", + "DocumentEventChildCalloutChildToolCall", + "DocumentEventChildCalloutChildToolResult", + "DocumentEventChildCalloutChildTraceMessage", + "DocumentEventChildChunk", + "DocumentEventChildChunkChild", + "DocumentEventChildChunkChildBlob", + "DocumentEventChildChunkChildCode", + "DocumentEventChildChunkChildComment", + "DocumentEventChildChunkChildDivider", + "DocumentEventChildChunkChildImage", + "DocumentEventChildChunkChildLink", + "DocumentEventChildChunkChildLineBreak", + "DocumentEventChildChunkChildText", + "DocumentEventChildChunkChildToolCall", + "DocumentEventChildChunkChildToolResult", + "DocumentEventChildChunkChildTraceMessage", + "DocumentEventChildCode", + "DocumentEventChildComment", + "DocumentEventChildDivider", + "DocumentEventChildEquation", + "DocumentEventChildEquationChild", + "DocumentEventChildEquationChildBlob", + "DocumentEventChildEquationChildCode", + "DocumentEventChildEquationChildComment", + "DocumentEventChildEquationChildDivider", + "DocumentEventChildEquationChildImage", + "DocumentEventChildEquationChildLink", + "DocumentEventChildEquationChildLineBreak", + "DocumentEventChildEquationChildText", + "DocumentEventChildEquationChildToolCall", + "DocumentEventChildEquationChildToolResult", + "DocumentEventChildEquationChildTraceMessage", + "DocumentEventChildFootnote", + "DocumentEventChildFootnoteChild", + "DocumentEventChildFootnoteChildBlob", + "DocumentEventChildFootnoteChildCode", + "DocumentEventChildFootnoteChildComment", + "DocumentEventChildFootnoteChildDivider", + "DocumentEventChildFootnoteChildImage", + "DocumentEventChildFootnoteChildLink", + "DocumentEventChildFootnoteChildLineBreak", + "DocumentEventChildFootnoteChildText", + "DocumentEventChildFootnoteChildToolCall", + "DocumentEventChildFootnoteChildToolResult", + "DocumentEventChildFootnoteChildTraceMessage", + "DocumentEventChildHeading", + "DocumentEventChildHeadingChild", + "DocumentEventChildHeadingChildBlob", + "DocumentEventChildHeadingChildCode", + "DocumentEventChildHeadingChildComment", + "DocumentEventChildHeadingChildDivider", + "DocumentEventChildHeadingChildImage", + "DocumentEventChildHeadingChildLink", + "DocumentEventChildHeadingChildLineBreak", + "DocumentEventChildHeadingChildText", + "DocumentEventChildHeadingChildToolCall", + "DocumentEventChildHeadingChildToolResult", + "DocumentEventChildHeadingChildTraceMessage", + "DocumentEventChildImage", + "DocumentEventChildLink", + "DocumentEventChildLineBreak", + "DocumentEventChildList", + "DocumentEventChildListItem", + "DocumentEventChildListItemChild", + "DocumentEventChildListItemChildBlob", + "DocumentEventChildListItemChildCode", + "DocumentEventChildListItemChildComment", + "DocumentEventChildListItemChildDivider", + "DocumentEventChildListItemChildImage", + "DocumentEventChildListItemChildLink", + "DocumentEventChildListItemChildLineBreak", + "DocumentEventChildListItemChildText", + "DocumentEventChildListItemChildToolCall", + "DocumentEventChildListItemChildToolResult", + "DocumentEventChildListItemChildTraceMessage", + "DocumentEventChildParagraph", + "DocumentEventChildParagraphChild", + "DocumentEventChildParagraphChildBlob", + "DocumentEventChildParagraphChildCode", + "DocumentEventChildParagraphChildComment", + "DocumentEventChildParagraphChildDivider", + "DocumentEventChildParagraphChildImage", + "DocumentEventChildParagraphChildLink", + "DocumentEventChildParagraphChildLineBreak", + "DocumentEventChildParagraphChildText", + "DocumentEventChildParagraphChildToolCall", + "DocumentEventChildParagraphChildToolResult", + "DocumentEventChildParagraphChildTraceMessage", + "DocumentEventChildQuote", + "DocumentEventChildQuoteChild", + "DocumentEventChildQuoteChildBlob", + "DocumentEventChildQuoteChildCode", + "DocumentEventChildQuoteChildComment", + "DocumentEventChildQuoteChildDivider", + "DocumentEventChildQuoteChildImage", + "DocumentEventChildQuoteChildLink", + "DocumentEventChildQuoteChildLineBreak", + "DocumentEventChildQuoteChildText", + "DocumentEventChildQuoteChildToolCall", + "DocumentEventChildQuoteChildToolResult", + "DocumentEventChildQuoteChildTraceMessage", + "DocumentEventChildTable", + "DocumentEventChildTableCell", + "DocumentEventChildTableCellChild", + "DocumentEventChildTableCellChildBlob", + "DocumentEventChildTableCellChildCode", + "DocumentEventChildTableCellChildComment", + "DocumentEventChildTableCellChildDivider", + "DocumentEventChildTableCellChildImage", + "DocumentEventChildTableCellChildLink", + "DocumentEventChildTableCellChildLineBreak", + "DocumentEventChildTableCellChildText", + "DocumentEventChildTableCellChildToolCall", + "DocumentEventChildTableCellChildToolResult", + "DocumentEventChildTableCellChildTraceMessage", + "DocumentEventChildTableRow", + "DocumentEventChildText", + "DocumentEventChildToDo", + "DocumentEventChildToDoChild", + "DocumentEventChildToDoChildBlob", + "DocumentEventChildToDoChildCode", + "DocumentEventChildToDoChildComment", + "DocumentEventChildToDoChildDivider", + "DocumentEventChildToDoChildImage", + "DocumentEventChildToDoChildLink", + "DocumentEventChildToDoChildLineBreak", + "DocumentEventChildToDoChildText", + "DocumentEventChildToDoChildToolCall", + "DocumentEventChildToDoChildToolResult", + "DocumentEventChildToDoChildTraceMessage", + "DocumentEventChildToolCall", + "DocumentEventChildToolResult", + "DocumentEventChildTraceMessage", + "DocumentEventChildUtterance", + "DocumentFile", + "DocumentFileChild", + "DocumentFileChildBlob", + "DocumentFileChildCallout", + "DocumentFileChildCalloutChild", + "DocumentFileChildCalloutChildBlob", + "DocumentFileChildCalloutChildCode", + "DocumentFileChildCalloutChildComment", + "DocumentFileChildCalloutChildDivider", + "DocumentFileChildCalloutChildImage", + "DocumentFileChildCalloutChildLink", + "DocumentFileChildCalloutChildLineBreak", + "DocumentFileChildCalloutChildText", + "DocumentFileChildCalloutChildToolCall", + "DocumentFileChildCalloutChildToolResult", + "DocumentFileChildCalloutChildTraceMessage", + "DocumentFileChildChunk", + "DocumentFileChildChunkChild", + "DocumentFileChildChunkChildBlob", + "DocumentFileChildChunkChildCode", + "DocumentFileChildChunkChildComment", + "DocumentFileChildChunkChildDivider", + "DocumentFileChildChunkChildImage", + "DocumentFileChildChunkChildLink", + "DocumentFileChildChunkChildLineBreak", + "DocumentFileChildChunkChildText", + "DocumentFileChildChunkChildToolCall", + "DocumentFileChildChunkChildToolResult", + "DocumentFileChildChunkChildTraceMessage", + "DocumentFileChildCode", + "DocumentFileChildComment", + "DocumentFileChildDivider", + "DocumentFileChildEquation", + "DocumentFileChildEquationChild", + "DocumentFileChildEquationChildBlob", + "DocumentFileChildEquationChildCode", + "DocumentFileChildEquationChildComment", + "DocumentFileChildEquationChildDivider", + "DocumentFileChildEquationChildImage", + "DocumentFileChildEquationChildLink", + "DocumentFileChildEquationChildLineBreak", + "DocumentFileChildEquationChildText", + "DocumentFileChildEquationChildToolCall", + "DocumentFileChildEquationChildToolResult", + "DocumentFileChildEquationChildTraceMessage", + "DocumentFileChildFootnote", + "DocumentFileChildFootnoteChild", + "DocumentFileChildFootnoteChildBlob", + "DocumentFileChildFootnoteChildCode", + "DocumentFileChildFootnoteChildComment", + "DocumentFileChildFootnoteChildDivider", + "DocumentFileChildFootnoteChildImage", + "DocumentFileChildFootnoteChildLink", + "DocumentFileChildFootnoteChildLineBreak", + "DocumentFileChildFootnoteChildText", + "DocumentFileChildFootnoteChildToolCall", + "DocumentFileChildFootnoteChildToolResult", + "DocumentFileChildFootnoteChildTraceMessage", + "DocumentFileChildHeading", + "DocumentFileChildHeadingChild", + "DocumentFileChildHeadingChildBlob", + "DocumentFileChildHeadingChildCode", + "DocumentFileChildHeadingChildComment", + "DocumentFileChildHeadingChildDivider", + "DocumentFileChildHeadingChildImage", + "DocumentFileChildHeadingChildLink", + "DocumentFileChildHeadingChildLineBreak", + "DocumentFileChildHeadingChildText", + "DocumentFileChildHeadingChildToolCall", + "DocumentFileChildHeadingChildToolResult", + "DocumentFileChildHeadingChildTraceMessage", + "DocumentFileChildImage", + "DocumentFileChildLink", + "DocumentFileChildLineBreak", + "DocumentFileChildList", + "DocumentFileChildListItem", + "DocumentFileChildListItemChild", + "DocumentFileChildListItemChildBlob", + "DocumentFileChildListItemChildCode", + "DocumentFileChildListItemChildComment", + "DocumentFileChildListItemChildDivider", + "DocumentFileChildListItemChildImage", + "DocumentFileChildListItemChildLink", + "DocumentFileChildListItemChildLineBreak", + "DocumentFileChildListItemChildText", + "DocumentFileChildListItemChildToolCall", + "DocumentFileChildListItemChildToolResult", + "DocumentFileChildListItemChildTraceMessage", + "DocumentFileChildParagraph", + "DocumentFileChildParagraphChild", + "DocumentFileChildParagraphChildBlob", + "DocumentFileChildParagraphChildCode", + "DocumentFileChildParagraphChildComment", + "DocumentFileChildParagraphChildDivider", + "DocumentFileChildParagraphChildImage", + "DocumentFileChildParagraphChildLink", + "DocumentFileChildParagraphChildLineBreak", + "DocumentFileChildParagraphChildText", + "DocumentFileChildParagraphChildToolCall", + "DocumentFileChildParagraphChildToolResult", + "DocumentFileChildParagraphChildTraceMessage", + "DocumentFileChildQuote", + "DocumentFileChildQuoteChild", + "DocumentFileChildQuoteChildBlob", + "DocumentFileChildQuoteChildCode", + "DocumentFileChildQuoteChildComment", + "DocumentFileChildQuoteChildDivider", + "DocumentFileChildQuoteChildImage", + "DocumentFileChildQuoteChildLink", + "DocumentFileChildQuoteChildLineBreak", + "DocumentFileChildQuoteChildText", + "DocumentFileChildQuoteChildToolCall", + "DocumentFileChildQuoteChildToolResult", + "DocumentFileChildQuoteChildTraceMessage", + "DocumentFileChildTable", + "DocumentFileChildTableCell", + "DocumentFileChildTableCellChild", + "DocumentFileChildTableCellChildBlob", + "DocumentFileChildTableCellChildCode", + "DocumentFileChildTableCellChildComment", + "DocumentFileChildTableCellChildDivider", + "DocumentFileChildTableCellChildImage", + "DocumentFileChildTableCellChildLink", + "DocumentFileChildTableCellChildLineBreak", + "DocumentFileChildTableCellChildText", + "DocumentFileChildTableCellChildToolCall", + "DocumentFileChildTableCellChildToolResult", + "DocumentFileChildTableCellChildTraceMessage", + "DocumentFileChildTableRow", + "DocumentFileChildText", + "DocumentFileChildToDo", + "DocumentFileChildToDoChild", + "DocumentFileChildToDoChildBlob", + "DocumentFileChildToDoChildCode", + "DocumentFileChildToDoChildComment", + "DocumentFileChildToDoChildDivider", + "DocumentFileChildToDoChildImage", + "DocumentFileChildToDoChildLink", + "DocumentFileChildToDoChildLineBreak", + "DocumentFileChildToDoChildText", + "DocumentFileChildToDoChildToolCall", + "DocumentFileChildToDoChildToolResult", + "DocumentFileChildToDoChildTraceMessage", + "DocumentFileChildToolCall", + "DocumentFileChildToolResult", + "DocumentFileChildTraceMessage", + "DocumentFileChildUtterance", + "DocumentConversation", + "DocumentConversationChild", + "DocumentConversationChildSender", + "DocumentConversationChildSenderChild", + "DocumentConversationChildSenderChildBlob", + "DocumentConversationChildSenderChildCode", + "DocumentConversationChildSenderChildComment", + "DocumentConversationChildSenderChildDivider", + "DocumentConversationChildSenderChildImage", + "DocumentConversationChildSenderChildLink", + "DocumentConversationChildSenderChildLineBreak", + "DocumentConversationChildSenderChildText", + "DocumentConversationChildSenderChildToolCall", + "DocumentConversationChildSenderChildToolResult", + "DocumentConversationChildSenderChildTraceMessage", + "DocumentConversationChildChild", + "DocumentConversationChildChildBlob", + "DocumentConversationChildChildCallout", + "DocumentConversationChildChildCalloutChild", + "DocumentConversationChildChildCalloutChildBlob", + "DocumentConversationChildChildCalloutChildCode", + "DocumentConversationChildChildCalloutChildComment", + "DocumentConversationChildChildCalloutChildDivider", + "DocumentConversationChildChildCalloutChildImage", + "DocumentConversationChildChildCalloutChildLink", + "DocumentConversationChildChildCalloutChildLineBreak", + "DocumentConversationChildChildCalloutChildText", + "DocumentConversationChildChildCalloutChildToolCall", + "DocumentConversationChildChildCalloutChildToolResult", + "DocumentConversationChildChildCalloutChildTraceMessage", + "DocumentConversationChildChildChunk", + "DocumentConversationChildChildChunkChild", + "DocumentConversationChildChildChunkChildBlob", + "DocumentConversationChildChildChunkChildCode", + "DocumentConversationChildChildChunkChildComment", + "DocumentConversationChildChildChunkChildDivider", + "DocumentConversationChildChildChunkChildImage", + "DocumentConversationChildChildChunkChildLink", + "DocumentConversationChildChildChunkChildLineBreak", + "DocumentConversationChildChildChunkChildText", + "DocumentConversationChildChildChunkChildToolCall", + "DocumentConversationChildChildChunkChildToolResult", + "DocumentConversationChildChildChunkChildTraceMessage", + "DocumentConversationChildChildCode", + "DocumentConversationChildChildComment", + "DocumentConversationChildChildDivider", + "DocumentConversationChildChildEquation", + "DocumentConversationChildChildEquationChild", + "DocumentConversationChildChildEquationChildBlob", + "DocumentConversationChildChildEquationChildCode", + "DocumentConversationChildChildEquationChildComment", + "DocumentConversationChildChildEquationChildDivider", + "DocumentConversationChildChildEquationChildImage", + "DocumentConversationChildChildEquationChildLink", + "DocumentConversationChildChildEquationChildLineBreak", + "DocumentConversationChildChildEquationChildText", + "DocumentConversationChildChildEquationChildToolCall", + "DocumentConversationChildChildEquationChildToolResult", + "DocumentConversationChildChildEquationChildTraceMessage", + "DocumentConversationChildChildFootnote", + "DocumentConversationChildChildFootnoteChild", + "DocumentConversationChildChildFootnoteChildBlob", + "DocumentConversationChildChildFootnoteChildCode", + "DocumentConversationChildChildFootnoteChildComment", + "DocumentConversationChildChildFootnoteChildDivider", + "DocumentConversationChildChildFootnoteChildImage", + "DocumentConversationChildChildFootnoteChildLink", + "DocumentConversationChildChildFootnoteChildLineBreak", + "DocumentConversationChildChildFootnoteChildText", + "DocumentConversationChildChildFootnoteChildToolCall", + "DocumentConversationChildChildFootnoteChildToolResult", + "DocumentConversationChildChildFootnoteChildTraceMessage", + "DocumentConversationChildChildHeading", + "DocumentConversationChildChildHeadingChild", + "DocumentConversationChildChildHeadingChildBlob", + "DocumentConversationChildChildHeadingChildCode", + "DocumentConversationChildChildHeadingChildComment", + "DocumentConversationChildChildHeadingChildDivider", + "DocumentConversationChildChildHeadingChildImage", + "DocumentConversationChildChildHeadingChildLink", + "DocumentConversationChildChildHeadingChildLineBreak", + "DocumentConversationChildChildHeadingChildText", + "DocumentConversationChildChildHeadingChildToolCall", + "DocumentConversationChildChildHeadingChildToolResult", + "DocumentConversationChildChildHeadingChildTraceMessage", + "DocumentConversationChildChildImage", + "DocumentConversationChildChildLink", + "DocumentConversationChildChildLineBreak", + "DocumentConversationChildChildList", + "DocumentConversationChildChildListItem", + "DocumentConversationChildChildListItemChild", + "DocumentConversationChildChildListItemChildBlob", + "DocumentConversationChildChildListItemChildCode", + "DocumentConversationChildChildListItemChildComment", + "DocumentConversationChildChildListItemChildDivider", + "DocumentConversationChildChildListItemChildImage", + "DocumentConversationChildChildListItemChildLink", + "DocumentConversationChildChildListItemChildLineBreak", + "DocumentConversationChildChildListItemChildText", + "DocumentConversationChildChildListItemChildToolCall", + "DocumentConversationChildChildListItemChildToolResult", + "DocumentConversationChildChildListItemChildTraceMessage", + "DocumentConversationChildChildParagraph", + "DocumentConversationChildChildParagraphChild", + "DocumentConversationChildChildParagraphChildBlob", + "DocumentConversationChildChildParagraphChildCode", + "DocumentConversationChildChildParagraphChildComment", + "DocumentConversationChildChildParagraphChildDivider", + "DocumentConversationChildChildParagraphChildImage", + "DocumentConversationChildChildParagraphChildLink", + "DocumentConversationChildChildParagraphChildLineBreak", + "DocumentConversationChildChildParagraphChildText", + "DocumentConversationChildChildParagraphChildToolCall", + "DocumentConversationChildChildParagraphChildToolResult", + "DocumentConversationChildChildParagraphChildTraceMessage", + "DocumentConversationChildChildQuote", + "DocumentConversationChildChildQuoteChild", + "DocumentConversationChildChildQuoteChildBlob", + "DocumentConversationChildChildQuoteChildCode", + "DocumentConversationChildChildQuoteChildComment", + "DocumentConversationChildChildQuoteChildDivider", + "DocumentConversationChildChildQuoteChildImage", + "DocumentConversationChildChildQuoteChildLink", + "DocumentConversationChildChildQuoteChildLineBreak", + "DocumentConversationChildChildQuoteChildText", + "DocumentConversationChildChildQuoteChildToolCall", + "DocumentConversationChildChildQuoteChildToolResult", + "DocumentConversationChildChildQuoteChildTraceMessage", + "DocumentConversationChildChildTable", + "DocumentConversationChildChildTableCell", + "DocumentConversationChildChildTableCellChild", + "DocumentConversationChildChildTableCellChildBlob", + "DocumentConversationChildChildTableCellChildCode", + "DocumentConversationChildChildTableCellChildComment", + "DocumentConversationChildChildTableCellChildDivider", + "DocumentConversationChildChildTableCellChildImage", + "DocumentConversationChildChildTableCellChildLink", + "DocumentConversationChildChildTableCellChildLineBreak", + "DocumentConversationChildChildTableCellChildText", + "DocumentConversationChildChildTableCellChildToolCall", + "DocumentConversationChildChildTableCellChildToolResult", + "DocumentConversationChildChildTableCellChildTraceMessage", + "DocumentConversationChildChildTableRow", + "DocumentConversationChildChildText", + "DocumentConversationChildChildToDo", + "DocumentConversationChildChildToDoChild", + "DocumentConversationChildChildToDoChildBlob", + "DocumentConversationChildChildToDoChildCode", + "DocumentConversationChildChildToDoChildComment", + "DocumentConversationChildChildToDoChildDivider", + "DocumentConversationChildChildToDoChildImage", + "DocumentConversationChildChildToDoChildLink", + "DocumentConversationChildChildToDoChildLineBreak", + "DocumentConversationChildChildToDoChildText", + "DocumentConversationChildChildToDoChildToolCall", + "DocumentConversationChildChildToDoChildToolResult", + "DocumentConversationChildChildToDoChildTraceMessage", + "DocumentConversationChildChildToolCall", + "DocumentConversationChildChildToolResult", + "DocumentConversationChildChildTraceMessage", + "DocumentConversationChildChildUtterance", + "DocumentConversationChildMentionedUser", + "DocumentConversationChildMentionedUserChild", + "DocumentConversationChildMentionedUserChildBlob", + "DocumentConversationChildMentionedUserChildCode", + "DocumentConversationChildMentionedUserChildComment", + "DocumentConversationChildMentionedUserChildDivider", + "DocumentConversationChildMentionedUserChildImage", + "DocumentConversationChildMentionedUserChildLink", + "DocumentConversationChildMentionedUserChildLineBreak", + "DocumentConversationChildMentionedUserChildText", + "DocumentConversationChildMentionedUserChildToolCall", + "DocumentConversationChildMentionedUserChildToolResult", + "DocumentConversationChildMentionedUserChildTraceMessage", + "DocumentTrace", + "DocumentTraceChild", + "DocumentTraceChildTraceMessage", + "DocumentTraceChildToolCall", + "DocumentTraceChildToolResult", + "DocumentTranscript", + "DocumentTranscriptChild", + "DocumentTranscriptParticipant", + "DocumentTranscriptParticipantChild", + "DocumentTranscriptParticipantChildBlob", + "DocumentTranscriptParticipantChildCode", + "DocumentTranscriptParticipantChildComment", + "DocumentTranscriptParticipantChildDivider", + "DocumentTranscriptParticipantChildImage", + "DocumentTranscriptParticipantChildLink", + "DocumentTranscriptParticipantChildLineBreak", + "DocumentTranscriptParticipantChildText", + "DocumentTranscriptParticipantChildToolCall", + "DocumentTranscriptParticipantChildToolResult", + "DocumentTranscriptParticipantChildTraceMessage", + "DocumentCompany", + "DocumentCompanyChild", + "DocumentCompanyChildBlob", + "DocumentCompanyChildCallout", + "DocumentCompanyChildCalloutChild", + "DocumentCompanyChildCalloutChildBlob", + "DocumentCompanyChildCalloutChildCode", + "DocumentCompanyChildCalloutChildComment", + "DocumentCompanyChildCalloutChildDivider", + "DocumentCompanyChildCalloutChildImage", + "DocumentCompanyChildCalloutChildLink", + "DocumentCompanyChildCalloutChildLineBreak", + "DocumentCompanyChildCalloutChildText", + "DocumentCompanyChildCalloutChildToolCall", + "DocumentCompanyChildCalloutChildToolResult", + "DocumentCompanyChildCalloutChildTraceMessage", + "DocumentCompanyChildChunk", + "DocumentCompanyChildChunkChild", + "DocumentCompanyChildChunkChildBlob", + "DocumentCompanyChildChunkChildCode", + "DocumentCompanyChildChunkChildComment", + "DocumentCompanyChildChunkChildDivider", + "DocumentCompanyChildChunkChildImage", + "DocumentCompanyChildChunkChildLink", + "DocumentCompanyChildChunkChildLineBreak", + "DocumentCompanyChildChunkChildText", + "DocumentCompanyChildChunkChildToolCall", + "DocumentCompanyChildChunkChildToolResult", + "DocumentCompanyChildChunkChildTraceMessage", + "DocumentCompanyChildCode", + "DocumentCompanyChildComment", + "DocumentCompanyChildDivider", + "DocumentCompanyChildEquation", + "DocumentCompanyChildEquationChild", + "DocumentCompanyChildEquationChildBlob", + "DocumentCompanyChildEquationChildCode", + "DocumentCompanyChildEquationChildComment", + "DocumentCompanyChildEquationChildDivider", + "DocumentCompanyChildEquationChildImage", + "DocumentCompanyChildEquationChildLink", + "DocumentCompanyChildEquationChildLineBreak", + "DocumentCompanyChildEquationChildText", + "DocumentCompanyChildEquationChildToolCall", + "DocumentCompanyChildEquationChildToolResult", + "DocumentCompanyChildEquationChildTraceMessage", + "DocumentCompanyChildFootnote", + "DocumentCompanyChildFootnoteChild", + "DocumentCompanyChildFootnoteChildBlob", + "DocumentCompanyChildFootnoteChildCode", + "DocumentCompanyChildFootnoteChildComment", + "DocumentCompanyChildFootnoteChildDivider", + "DocumentCompanyChildFootnoteChildImage", + "DocumentCompanyChildFootnoteChildLink", + "DocumentCompanyChildFootnoteChildLineBreak", + "DocumentCompanyChildFootnoteChildText", + "DocumentCompanyChildFootnoteChildToolCall", + "DocumentCompanyChildFootnoteChildToolResult", + "DocumentCompanyChildFootnoteChildTraceMessage", + "DocumentCompanyChildHeading", + "DocumentCompanyChildHeadingChild", + "DocumentCompanyChildHeadingChildBlob", + "DocumentCompanyChildHeadingChildCode", + "DocumentCompanyChildHeadingChildComment", + "DocumentCompanyChildHeadingChildDivider", + "DocumentCompanyChildHeadingChildImage", + "DocumentCompanyChildHeadingChildLink", + "DocumentCompanyChildHeadingChildLineBreak", + "DocumentCompanyChildHeadingChildText", + "DocumentCompanyChildHeadingChildToolCall", + "DocumentCompanyChildHeadingChildToolResult", + "DocumentCompanyChildHeadingChildTraceMessage", + "DocumentCompanyChildImage", + "DocumentCompanyChildLink", + "DocumentCompanyChildLineBreak", + "DocumentCompanyChildList", + "DocumentCompanyChildListItem", + "DocumentCompanyChildListItemChild", + "DocumentCompanyChildListItemChildBlob", + "DocumentCompanyChildListItemChildCode", + "DocumentCompanyChildListItemChildComment", + "DocumentCompanyChildListItemChildDivider", + "DocumentCompanyChildListItemChildImage", + "DocumentCompanyChildListItemChildLink", + "DocumentCompanyChildListItemChildLineBreak", + "DocumentCompanyChildListItemChildText", + "DocumentCompanyChildListItemChildToolCall", + "DocumentCompanyChildListItemChildToolResult", + "DocumentCompanyChildListItemChildTraceMessage", + "DocumentCompanyChildParagraph", + "DocumentCompanyChildParagraphChild", + "DocumentCompanyChildParagraphChildBlob", + "DocumentCompanyChildParagraphChildCode", + "DocumentCompanyChildParagraphChildComment", + "DocumentCompanyChildParagraphChildDivider", + "DocumentCompanyChildParagraphChildImage", + "DocumentCompanyChildParagraphChildLink", + "DocumentCompanyChildParagraphChildLineBreak", + "DocumentCompanyChildParagraphChildText", + "DocumentCompanyChildParagraphChildToolCall", + "DocumentCompanyChildParagraphChildToolResult", + "DocumentCompanyChildParagraphChildTraceMessage", + "DocumentCompanyChildQuote", + "DocumentCompanyChildQuoteChild", + "DocumentCompanyChildQuoteChildBlob", + "DocumentCompanyChildQuoteChildCode", + "DocumentCompanyChildQuoteChildComment", + "DocumentCompanyChildQuoteChildDivider", + "DocumentCompanyChildQuoteChildImage", + "DocumentCompanyChildQuoteChildLink", + "DocumentCompanyChildQuoteChildLineBreak", + "DocumentCompanyChildQuoteChildText", + "DocumentCompanyChildQuoteChildToolCall", + "DocumentCompanyChildQuoteChildToolResult", + "DocumentCompanyChildQuoteChildTraceMessage", + "DocumentCompanyChildTable", + "DocumentCompanyChildTableCell", + "DocumentCompanyChildTableCellChild", + "DocumentCompanyChildTableCellChildBlob", + "DocumentCompanyChildTableCellChildCode", + "DocumentCompanyChildTableCellChildComment", + "DocumentCompanyChildTableCellChildDivider", + "DocumentCompanyChildTableCellChildImage", + "DocumentCompanyChildTableCellChildLink", + "DocumentCompanyChildTableCellChildLineBreak", + "DocumentCompanyChildTableCellChildText", + "DocumentCompanyChildTableCellChildToolCall", + "DocumentCompanyChildTableCellChildToolResult", + "DocumentCompanyChildTableCellChildTraceMessage", + "DocumentCompanyChildTableRow", + "DocumentCompanyChildText", + "DocumentCompanyChildToDo", + "DocumentCompanyChildToDoChild", + "DocumentCompanyChildToDoChildBlob", + "DocumentCompanyChildToDoChildCode", + "DocumentCompanyChildToDoChildComment", + "DocumentCompanyChildToDoChildDivider", + "DocumentCompanyChildToDoChildImage", + "DocumentCompanyChildToDoChildLink", + "DocumentCompanyChildToDoChildLineBreak", + "DocumentCompanyChildToDoChildText", + "DocumentCompanyChildToDoChildToolCall", + "DocumentCompanyChildToDoChildToolResult", + "DocumentCompanyChildToDoChildTraceMessage", + "DocumentCompanyChildToolCall", + "DocumentCompanyChildToolResult", + "DocumentCompanyChildTraceMessage", + "DocumentCompanyChildUtterance", + "DocumentDeal", + "DocumentDealChild", + "DocumentDealChildBlob", + "DocumentDealChildCallout", + "DocumentDealChildCalloutChild", + "DocumentDealChildCalloutChildBlob", + "DocumentDealChildCalloutChildCode", + "DocumentDealChildCalloutChildComment", + "DocumentDealChildCalloutChildDivider", + "DocumentDealChildCalloutChildImage", + "DocumentDealChildCalloutChildLink", + "DocumentDealChildCalloutChildLineBreak", + "DocumentDealChildCalloutChildText", + "DocumentDealChildCalloutChildToolCall", + "DocumentDealChildCalloutChildToolResult", + "DocumentDealChildCalloutChildTraceMessage", + "DocumentDealChildChunk", + "DocumentDealChildChunkChild", + "DocumentDealChildChunkChildBlob", + "DocumentDealChildChunkChildCode", + "DocumentDealChildChunkChildComment", + "DocumentDealChildChunkChildDivider", + "DocumentDealChildChunkChildImage", + "DocumentDealChildChunkChildLink", + "DocumentDealChildChunkChildLineBreak", + "DocumentDealChildChunkChildText", + "DocumentDealChildChunkChildToolCall", + "DocumentDealChildChunkChildToolResult", + "DocumentDealChildChunkChildTraceMessage", + "DocumentDealChildCode", + "DocumentDealChildComment", + "DocumentDealChildDivider", + "DocumentDealChildEquation", + "DocumentDealChildEquationChild", + "DocumentDealChildEquationChildBlob", + "DocumentDealChildEquationChildCode", + "DocumentDealChildEquationChildComment", + "DocumentDealChildEquationChildDivider", + "DocumentDealChildEquationChildImage", + "DocumentDealChildEquationChildLink", + "DocumentDealChildEquationChildLineBreak", + "DocumentDealChildEquationChildText", + "DocumentDealChildEquationChildToolCall", + "DocumentDealChildEquationChildToolResult", + "DocumentDealChildEquationChildTraceMessage", + "DocumentDealChildFootnote", + "DocumentDealChildFootnoteChild", + "DocumentDealChildFootnoteChildBlob", + "DocumentDealChildFootnoteChildCode", + "DocumentDealChildFootnoteChildComment", + "DocumentDealChildFootnoteChildDivider", + "DocumentDealChildFootnoteChildImage", + "DocumentDealChildFootnoteChildLink", + "DocumentDealChildFootnoteChildLineBreak", + "DocumentDealChildFootnoteChildText", + "DocumentDealChildFootnoteChildToolCall", + "DocumentDealChildFootnoteChildToolResult", + "DocumentDealChildFootnoteChildTraceMessage", + "DocumentDealChildHeading", + "DocumentDealChildHeadingChild", + "DocumentDealChildHeadingChildBlob", + "DocumentDealChildHeadingChildCode", + "DocumentDealChildHeadingChildComment", + "DocumentDealChildHeadingChildDivider", + "DocumentDealChildHeadingChildImage", + "DocumentDealChildHeadingChildLink", + "DocumentDealChildHeadingChildLineBreak", + "DocumentDealChildHeadingChildText", + "DocumentDealChildHeadingChildToolCall", + "DocumentDealChildHeadingChildToolResult", + "DocumentDealChildHeadingChildTraceMessage", + "DocumentDealChildImage", + "DocumentDealChildLink", + "DocumentDealChildLineBreak", + "DocumentDealChildList", + "DocumentDealChildListItem", + "DocumentDealChildListItemChild", + "DocumentDealChildListItemChildBlob", + "DocumentDealChildListItemChildCode", + "DocumentDealChildListItemChildComment", + "DocumentDealChildListItemChildDivider", + "DocumentDealChildListItemChildImage", + "DocumentDealChildListItemChildLink", + "DocumentDealChildListItemChildLineBreak", + "DocumentDealChildListItemChildText", + "DocumentDealChildListItemChildToolCall", + "DocumentDealChildListItemChildToolResult", + "DocumentDealChildListItemChildTraceMessage", + "DocumentDealChildParagraph", + "DocumentDealChildParagraphChild", + "DocumentDealChildParagraphChildBlob", + "DocumentDealChildParagraphChildCode", + "DocumentDealChildParagraphChildComment", + "DocumentDealChildParagraphChildDivider", + "DocumentDealChildParagraphChildImage", + "DocumentDealChildParagraphChildLink", + "DocumentDealChildParagraphChildLineBreak", + "DocumentDealChildParagraphChildText", + "DocumentDealChildParagraphChildToolCall", + "DocumentDealChildParagraphChildToolResult", + "DocumentDealChildParagraphChildTraceMessage", + "DocumentDealChildQuote", + "DocumentDealChildQuoteChild", + "DocumentDealChildQuoteChildBlob", + "DocumentDealChildQuoteChildCode", + "DocumentDealChildQuoteChildComment", + "DocumentDealChildQuoteChildDivider", + "DocumentDealChildQuoteChildImage", + "DocumentDealChildQuoteChildLink", + "DocumentDealChildQuoteChildLineBreak", + "DocumentDealChildQuoteChildText", + "DocumentDealChildQuoteChildToolCall", + "DocumentDealChildQuoteChildToolResult", + "DocumentDealChildQuoteChildTraceMessage", + "DocumentDealChildTable", + "DocumentDealChildTableCell", + "DocumentDealChildTableCellChild", + "DocumentDealChildTableCellChildBlob", + "DocumentDealChildTableCellChildCode", + "DocumentDealChildTableCellChildComment", + "DocumentDealChildTableCellChildDivider", + "DocumentDealChildTableCellChildImage", + "DocumentDealChildTableCellChildLink", + "DocumentDealChildTableCellChildLineBreak", + "DocumentDealChildTableCellChildText", + "DocumentDealChildTableCellChildToolCall", + "DocumentDealChildTableCellChildToolResult", + "DocumentDealChildTableCellChildTraceMessage", + "DocumentDealChildTableRow", + "DocumentDealChildText", + "DocumentDealChildToDo", + "DocumentDealChildToDoChild", + "DocumentDealChildToDoChildBlob", + "DocumentDealChildToDoChildCode", + "DocumentDealChildToDoChildComment", + "DocumentDealChildToDoChildDivider", + "DocumentDealChildToDoChildImage", + "DocumentDealChildToDoChildLink", + "DocumentDealChildToDoChildLineBreak", + "DocumentDealChildToDoChildText", + "DocumentDealChildToDoChildToolCall", + "DocumentDealChildToDoChildToolResult", + "DocumentDealChildToDoChildTraceMessage", + "DocumentDealChildToolCall", + "DocumentDealChildToolResult", + "DocumentDealChildTraceMessage", + "DocumentDealChildUtterance", +] + + +class DocumentDocumentChildBlob(BaseModel): + """Represents embedded binary data using data URI scheme. + + Format: data:[][;base64], + Example: data:text/html;base64,PGh0bWw+... + """ + + data: str + + mimetype: str + + id: Optional[str] = None + + type: Optional[Literal["blob"]] = None + + +class DocumentDocumentChildCalloutChildBlob(BaseModel): + """Represents embedded binary data using data URI scheme. + + Format: data:[][;base64], + Example: data:text/html;base64,PGh0bWw+... + """ + + data: str + + mimetype: str + + id: Optional[str] = None + + type: Optional[Literal["blob"]] = None + + +class DocumentDocumentChildCalloutChildCode(BaseModel): + text: str + + id: Optional[str] = None + + language: Optional[str] = None + + type: Optional[Literal["code"]] = None + + +class DocumentDocumentChildCalloutChildComment(BaseModel): + text: str + + id: Optional[str] = None + + created_at: Optional[datetime] = None + + type: Optional[Literal["comment"]] = None + + +class DocumentDocumentChildCalloutChildDivider(BaseModel): + id: Optional[str] = None + + type: Optional[Literal["divider"]] = None + + +class DocumentDocumentChildCalloutChildImage(BaseModel): + src: str + + text: str + + id: Optional[str] = None + + type: Optional[Literal["image"]] = None + + +class DocumentDocumentChildCalloutChildLink(BaseModel): + text: str + + url: str + + id: Optional[str] = None + + type: Optional[Literal["link"]] = None + + +class DocumentDocumentChildCalloutChildLineBreak(BaseModel): + id: Optional[str] = None + + type: Optional[Literal["line_break"]] = None + + +class DocumentDocumentChildCalloutChildText(BaseModel): + text: str + + id: Optional[str] = None + + marks: Optional[List[Literal["bold", "italic", "underline", "strikethrough", "code", "math"]]] = None + + type: Optional[Literal["text"]] = None + + +class DocumentDocumentChildCalloutChildToolCall(BaseModel): + """A tool/function call made by the assistant.""" + + tool_call_id: str + + tool_name: str + + id: Optional[str] = None + + args: Optional[Dict[str, object]] = None + + type: Optional[Literal["tool_call"]] = None + + +class DocumentDocumentChildCalloutChildToolResult(BaseModel): + """The result of a tool call.""" + + output: Union[str, Dict[str, object], List[object]] + + tool_call_id: str + + tool_name: str + + id: Optional[str] = None + + is_error: Optional[bool] = None + + type: Optional[Literal["tool_result"]] = None + + +class DocumentDocumentChildCalloutChildTraceMessage(BaseModel): + """A message in an agent trace (user message, assistant message, or thinking).""" + + text: str + + id: Optional[str] = None + + message_type: Optional[Literal["message", "thinking"]] = None + + role: Optional[Literal["user", "assistant"]] = None + + timestamp: Optional[datetime] = None + + type: Optional[Literal["trace_message"]] = None + + +DocumentDocumentChildCalloutChild: TypeAlias = Union[ + DocumentDocumentChildCalloutChildBlob, + DocumentDocumentChildCalloutChildCode, + DocumentDocumentChildCalloutChildComment, + DocumentDocumentChildCalloutChildDivider, + DocumentDocumentChildCalloutChildImage, + DocumentDocumentChildCalloutChildLink, + DocumentDocumentChildCalloutChildLineBreak, + DocumentDocumentChildCalloutChildText, + DocumentDocumentChildCalloutChildToolCall, + DocumentDocumentChildCalloutChildToolResult, + DocumentDocumentChildCalloutChildTraceMessage, + object, +] + + +class DocumentDocumentChildCallout(BaseModel): + id: Optional[str] = None + + children: Optional[List[DocumentDocumentChildCalloutChild]] = None + + text: Optional[str] = None + + title: Optional[str] = None + + type: Optional[Literal["callout"]] = None + + +class DocumentDocumentChildChunkChildBlob(BaseModel): + """Represents embedded binary data using data URI scheme. + + Format: data:[][;base64], + Example: data:text/html;base64,PGh0bWw+... + """ + + data: str + + mimetype: str + + id: Optional[str] = None + + type: Optional[Literal["blob"]] = None + + +class DocumentDocumentChildChunkChildCode(BaseModel): + text: str + + id: Optional[str] = None + + language: Optional[str] = None + + type: Optional[Literal["code"]] = None + + +class DocumentDocumentChildChunkChildComment(BaseModel): + text: str + + id: Optional[str] = None + + created_at: Optional[datetime] = None + + type: Optional[Literal["comment"]] = None + + +class DocumentDocumentChildChunkChildDivider(BaseModel): + id: Optional[str] = None + + type: Optional[Literal["divider"]] = None + + +class DocumentDocumentChildChunkChildImage(BaseModel): + src: str + + text: str + + id: Optional[str] = None + + type: Optional[Literal["image"]] = None + + +class DocumentDocumentChildChunkChildLink(BaseModel): + text: str + + url: str + + id: Optional[str] = None + + type: Optional[Literal["link"]] = None + + +class DocumentDocumentChildChunkChildLineBreak(BaseModel): + id: Optional[str] = None + + type: Optional[Literal["line_break"]] = None + + +class DocumentDocumentChildChunkChildText(BaseModel): + text: str + + id: Optional[str] = None + + marks: Optional[List[Literal["bold", "italic", "underline", "strikethrough", "code", "math"]]] = None + + type: Optional[Literal["text"]] = None + + +class DocumentDocumentChildChunkChildToolCall(BaseModel): + """A tool/function call made by the assistant.""" + + tool_call_id: str + + tool_name: str + + id: Optional[str] = None + + args: Optional[Dict[str, object]] = None + + type: Optional[Literal["tool_call"]] = None + + +class DocumentDocumentChildChunkChildToolResult(BaseModel): + """The result of a tool call.""" + + output: Union[str, Dict[str, object], List[object]] + + tool_call_id: str + + tool_name: str + + id: Optional[str] = None + + is_error: Optional[bool] = None + + type: Optional[Literal["tool_result"]] = None + + +class DocumentDocumentChildChunkChildTraceMessage(BaseModel): + """A message in an agent trace (user message, assistant message, or thinking).""" + + text: str + + id: Optional[str] = None + + message_type: Optional[Literal["message", "thinking"]] = None + + role: Optional[Literal["user", "assistant"]] = None + + timestamp: Optional[datetime] = None + + type: Optional[Literal["trace_message"]] = None + + +DocumentDocumentChildChunkChild: TypeAlias = Union[ + DocumentDocumentChildChunkChildBlob, + DocumentDocumentChildChunkChildCode, + DocumentDocumentChildChunkChildComment, + DocumentDocumentChildChunkChildDivider, + DocumentDocumentChildChunkChildImage, + DocumentDocumentChildChunkChildLink, + DocumentDocumentChildChunkChildLineBreak, + DocumentDocumentChildChunkChildText, + DocumentDocumentChildChunkChildToolCall, + DocumentDocumentChildChunkChildToolResult, + DocumentDocumentChildChunkChildTraceMessage, + object, +] + + +class DocumentDocumentChildChunk(BaseModel): + id: Optional[str] = None + + children: Optional[List[DocumentDocumentChildChunkChild]] = None + + text: Optional[str] = None + + type: Optional[Literal["chunk"]] = None + + +class DocumentDocumentChildCode(BaseModel): + text: str + + id: Optional[str] = None + + language: Optional[str] = None + + type: Optional[Literal["code"]] = None + + +class DocumentDocumentChildComment(BaseModel): + text: str + + id: Optional[str] = None + + created_at: Optional[datetime] = None + + type: Optional[Literal["comment"]] = None + + +class DocumentDocumentChildDivider(BaseModel): + id: Optional[str] = None + + type: Optional[Literal["divider"]] = None + + +class DocumentDocumentChildEquationChildBlob(BaseModel): + """Represents embedded binary data using data URI scheme. + + Format: data:[][;base64], + Example: data:text/html;base64,PGh0bWw+... + """ + + data: str + + mimetype: str + + id: Optional[str] = None + + type: Optional[Literal["blob"]] = None + + +class DocumentDocumentChildEquationChildCode(BaseModel): + text: str + + id: Optional[str] = None + + language: Optional[str] = None + + type: Optional[Literal["code"]] = None + + +class DocumentDocumentChildEquationChildComment(BaseModel): + text: str + + id: Optional[str] = None + + created_at: Optional[datetime] = None + + type: Optional[Literal["comment"]] = None + + +class DocumentDocumentChildEquationChildDivider(BaseModel): + id: Optional[str] = None + + type: Optional[Literal["divider"]] = None + + +class DocumentDocumentChildEquationChildImage(BaseModel): + src: str + + text: str + + id: Optional[str] = None + + type: Optional[Literal["image"]] = None + + +class DocumentDocumentChildEquationChildLink(BaseModel): + text: str + + url: str + + id: Optional[str] = None + + type: Optional[Literal["link"]] = None + + +class DocumentDocumentChildEquationChildLineBreak(BaseModel): + id: Optional[str] = None + + type: Optional[Literal["line_break"]] = None + + +class DocumentDocumentChildEquationChildText(BaseModel): + text: str + + id: Optional[str] = None + + marks: Optional[List[Literal["bold", "italic", "underline", "strikethrough", "code", "math"]]] = None + + type: Optional[Literal["text"]] = None + + +class DocumentDocumentChildEquationChildToolCall(BaseModel): + """A tool/function call made by the assistant.""" + + tool_call_id: str + + tool_name: str + + id: Optional[str] = None + + args: Optional[Dict[str, object]] = None + + type: Optional[Literal["tool_call"]] = None + + +class DocumentDocumentChildEquationChildToolResult(BaseModel): + """The result of a tool call.""" + + output: Union[str, Dict[str, object], List[object]] + + tool_call_id: str + + tool_name: str + + id: Optional[str] = None + + is_error: Optional[bool] = None + + type: Optional[Literal["tool_result"]] = None + + +class DocumentDocumentChildEquationChildTraceMessage(BaseModel): + """A message in an agent trace (user message, assistant message, or thinking).""" + + text: str + + id: Optional[str] = None + + message_type: Optional[Literal["message", "thinking"]] = None + + role: Optional[Literal["user", "assistant"]] = None + + timestamp: Optional[datetime] = None + + type: Optional[Literal["trace_message"]] = None + + +DocumentDocumentChildEquationChild: TypeAlias = Union[ + DocumentDocumentChildEquationChildBlob, + DocumentDocumentChildEquationChildCode, + DocumentDocumentChildEquationChildComment, + DocumentDocumentChildEquationChildDivider, + DocumentDocumentChildEquationChildImage, + DocumentDocumentChildEquationChildLink, + DocumentDocumentChildEquationChildLineBreak, + DocumentDocumentChildEquationChildText, + DocumentDocumentChildEquationChildToolCall, + DocumentDocumentChildEquationChildToolResult, + DocumentDocumentChildEquationChildTraceMessage, + object, +] + + +class DocumentDocumentChildEquation(BaseModel): + id: Optional[str] = None + + children: Optional[List[DocumentDocumentChildEquationChild]] = None + + text: Optional[str] = None + + type: Optional[Literal["equation"]] = None + + +class DocumentDocumentChildFootnoteChildBlob(BaseModel): + """Represents embedded binary data using data URI scheme. + + Format: data:[][;base64], + Example: data:text/html;base64,PGh0bWw+... + """ + + data: str + + mimetype: str + + id: Optional[str] = None + + type: Optional[Literal["blob"]] = None + + +class DocumentDocumentChildFootnoteChildCode(BaseModel): + text: str + + id: Optional[str] = None + + language: Optional[str] = None + + type: Optional[Literal["code"]] = None + + +class DocumentDocumentChildFootnoteChildComment(BaseModel): + text: str + + id: Optional[str] = None + + created_at: Optional[datetime] = None + + type: Optional[Literal["comment"]] = None + + +class DocumentDocumentChildFootnoteChildDivider(BaseModel): + id: Optional[str] = None + + type: Optional[Literal["divider"]] = None + + +class DocumentDocumentChildFootnoteChildImage(BaseModel): + src: str + + text: str + + id: Optional[str] = None + + type: Optional[Literal["image"]] = None + + +class DocumentDocumentChildFootnoteChildLink(BaseModel): + text: str + + url: str + + id: Optional[str] = None + + type: Optional[Literal["link"]] = None + + +class DocumentDocumentChildFootnoteChildLineBreak(BaseModel): + id: Optional[str] = None + + type: Optional[Literal["line_break"]] = None + + +class DocumentDocumentChildFootnoteChildText(BaseModel): + text: str + + id: Optional[str] = None + + marks: Optional[List[Literal["bold", "italic", "underline", "strikethrough", "code", "math"]]] = None + + type: Optional[Literal["text"]] = None + + +class DocumentDocumentChildFootnoteChildToolCall(BaseModel): + """A tool/function call made by the assistant.""" + + tool_call_id: str + + tool_name: str + + id: Optional[str] = None + + args: Optional[Dict[str, object]] = None + + type: Optional[Literal["tool_call"]] = None + + +class DocumentDocumentChildFootnoteChildToolResult(BaseModel): + """The result of a tool call.""" + + output: Union[str, Dict[str, object], List[object]] + + tool_call_id: str + + tool_name: str + + id: Optional[str] = None + + is_error: Optional[bool] = None + + type: Optional[Literal["tool_result"]] = None + + +class DocumentDocumentChildFootnoteChildTraceMessage(BaseModel): + """A message in an agent trace (user message, assistant message, or thinking).""" + + text: str + + id: Optional[str] = None + + message_type: Optional[Literal["message", "thinking"]] = None + + role: Optional[Literal["user", "assistant"]] = None + + timestamp: Optional[datetime] = None + + type: Optional[Literal["trace_message"]] = None + + +DocumentDocumentChildFootnoteChild: TypeAlias = Union[ + DocumentDocumentChildFootnoteChildBlob, + DocumentDocumentChildFootnoteChildCode, + DocumentDocumentChildFootnoteChildComment, + DocumentDocumentChildFootnoteChildDivider, + DocumentDocumentChildFootnoteChildImage, + DocumentDocumentChildFootnoteChildLink, + DocumentDocumentChildFootnoteChildLineBreak, + DocumentDocumentChildFootnoteChildText, + DocumentDocumentChildFootnoteChildToolCall, + DocumentDocumentChildFootnoteChildToolResult, + DocumentDocumentChildFootnoteChildTraceMessage, + object, +] + + +class DocumentDocumentChildFootnote(BaseModel): + id: Optional[str] = None + + children: Optional[List[DocumentDocumentChildFootnoteChild]] = None + + text: Optional[str] = None + + type: Optional[Literal["footnote"]] = None + + +class DocumentDocumentChildHeadingChildBlob(BaseModel): + """Represents embedded binary data using data URI scheme. + + Format: data:[][;base64], + Example: data:text/html;base64,PGh0bWw+... + """ + + data: str + + mimetype: str + + id: Optional[str] = None + + type: Optional[Literal["blob"]] = None + + +class DocumentDocumentChildHeadingChildCode(BaseModel): + text: str + + id: Optional[str] = None + + language: Optional[str] = None + + type: Optional[Literal["code"]] = None + + +class DocumentDocumentChildHeadingChildComment(BaseModel): + text: str + + id: Optional[str] = None + + created_at: Optional[datetime] = None + + type: Optional[Literal["comment"]] = None + + +class DocumentDocumentChildHeadingChildDivider(BaseModel): + id: Optional[str] = None + + type: Optional[Literal["divider"]] = None + + +class DocumentDocumentChildHeadingChildImage(BaseModel): + src: str + + text: str + + id: Optional[str] = None + + type: Optional[Literal["image"]] = None + + +class DocumentDocumentChildHeadingChildLink(BaseModel): + text: str + + url: str + + id: Optional[str] = None + + type: Optional[Literal["link"]] = None + + +class DocumentDocumentChildHeadingChildLineBreak(BaseModel): + id: Optional[str] = None + + type: Optional[Literal["line_break"]] = None + + +class DocumentDocumentChildHeadingChildText(BaseModel): + text: str + + id: Optional[str] = None + + marks: Optional[List[Literal["bold", "italic", "underline", "strikethrough", "code", "math"]]] = None + + type: Optional[Literal["text"]] = None + + +class DocumentDocumentChildHeadingChildToolCall(BaseModel): + """A tool/function call made by the assistant.""" + + tool_call_id: str + + tool_name: str + + id: Optional[str] = None + + args: Optional[Dict[str, object]] = None + + type: Optional[Literal["tool_call"]] = None + + +class DocumentDocumentChildHeadingChildToolResult(BaseModel): + """The result of a tool call.""" + + output: Union[str, Dict[str, object], List[object]] + + tool_call_id: str + + tool_name: str + + id: Optional[str] = None + + is_error: Optional[bool] = None + + type: Optional[Literal["tool_result"]] = None + + +class DocumentDocumentChildHeadingChildTraceMessage(BaseModel): + """A message in an agent trace (user message, assistant message, or thinking).""" + + text: str + + id: Optional[str] = None + + message_type: Optional[Literal["message", "thinking"]] = None + + role: Optional[Literal["user", "assistant"]] = None + + timestamp: Optional[datetime] = None + + type: Optional[Literal["trace_message"]] = None + + +DocumentDocumentChildHeadingChild: TypeAlias = Union[ + DocumentDocumentChildHeadingChildBlob, + DocumentDocumentChildHeadingChildCode, + DocumentDocumentChildHeadingChildComment, + DocumentDocumentChildHeadingChildDivider, + DocumentDocumentChildHeadingChildImage, + DocumentDocumentChildHeadingChildLink, + DocumentDocumentChildHeadingChildLineBreak, + DocumentDocumentChildHeadingChildText, + DocumentDocumentChildHeadingChildToolCall, + DocumentDocumentChildHeadingChildToolResult, + DocumentDocumentChildHeadingChildTraceMessage, + object, +] + + +class DocumentDocumentChildHeading(BaseModel): + level: int + + id: Optional[str] = None + + children: Optional[List[DocumentDocumentChildHeadingChild]] = None + + text: Optional[str] = None + + type: Optional[Literal["heading"]] = None + + +class DocumentDocumentChildImage(BaseModel): + src: str + + text: str + + id: Optional[str] = None + + type: Optional[Literal["image"]] = None + + +class DocumentDocumentChildLink(BaseModel): + text: str + + url: str + + id: Optional[str] = None + + type: Optional[Literal["link"]] = None + + +class DocumentDocumentChildLineBreak(BaseModel): + id: Optional[str] = None + + type: Optional[Literal["line_break"]] = None + + +class DocumentDocumentChildList(BaseModel): + id: Optional[str] = None + + children: Optional[List[object]] = None + + ordered: Optional[bool] = None + + text: Optional[str] = None + + type: Optional[Literal["list"]] = None + + +class DocumentDocumentChildListItemChildBlob(BaseModel): + """Represents embedded binary data using data URI scheme. + + Format: data:[][;base64], + Example: data:text/html;base64,PGh0bWw+... + """ + + data: str + + mimetype: str + + id: Optional[str] = None + + type: Optional[Literal["blob"]] = None + + +class DocumentDocumentChildListItemChildCode(BaseModel): + text: str + + id: Optional[str] = None + + language: Optional[str] = None + + type: Optional[Literal["code"]] = None + + +class DocumentDocumentChildListItemChildComment(BaseModel): + text: str + + id: Optional[str] = None + + created_at: Optional[datetime] = None + + type: Optional[Literal["comment"]] = None + + +class DocumentDocumentChildListItemChildDivider(BaseModel): + id: Optional[str] = None + + type: Optional[Literal["divider"]] = None + + +class DocumentDocumentChildListItemChildImage(BaseModel): + src: str + + text: str + + id: Optional[str] = None + + type: Optional[Literal["image"]] = None + + +class DocumentDocumentChildListItemChildLink(BaseModel): + text: str + + url: str + + id: Optional[str] = None + + type: Optional[Literal["link"]] = None + + +class DocumentDocumentChildListItemChildLineBreak(BaseModel): + id: Optional[str] = None + + type: Optional[Literal["line_break"]] = None + + +class DocumentDocumentChildListItemChildText(BaseModel): + text: str + + id: Optional[str] = None + + marks: Optional[List[Literal["bold", "italic", "underline", "strikethrough", "code", "math"]]] = None + + type: Optional[Literal["text"]] = None + + +class DocumentDocumentChildListItemChildToolCall(BaseModel): + """A tool/function call made by the assistant.""" + + tool_call_id: str + + tool_name: str + + id: Optional[str] = None + + args: Optional[Dict[str, object]] = None + + type: Optional[Literal["tool_call"]] = None + + +class DocumentDocumentChildListItemChildToolResult(BaseModel): + """The result of a tool call.""" + + output: Union[str, Dict[str, object], List[object]] + + tool_call_id: str + + tool_name: str + + id: Optional[str] = None + + is_error: Optional[bool] = None + + type: Optional[Literal["tool_result"]] = None + + +class DocumentDocumentChildListItemChildTraceMessage(BaseModel): + """A message in an agent trace (user message, assistant message, or thinking).""" + + text: str + + id: Optional[str] = None + + message_type: Optional[Literal["message", "thinking"]] = None + + role: Optional[Literal["user", "assistant"]] = None + + timestamp: Optional[datetime] = None + + type: Optional[Literal["trace_message"]] = None + + +DocumentDocumentChildListItemChild: TypeAlias = Union[ + DocumentDocumentChildListItemChildBlob, + DocumentDocumentChildListItemChildCode, + DocumentDocumentChildListItemChildComment, + DocumentDocumentChildListItemChildDivider, + DocumentDocumentChildListItemChildImage, + DocumentDocumentChildListItemChildLink, + DocumentDocumentChildListItemChildLineBreak, + DocumentDocumentChildListItemChildText, + DocumentDocumentChildListItemChildToolCall, + DocumentDocumentChildListItemChildToolResult, + DocumentDocumentChildListItemChildTraceMessage, + object, +] + + +class DocumentDocumentChildListItem(BaseModel): + id: Optional[str] = None + + children: Optional[List[DocumentDocumentChildListItemChild]] = None + + text: Optional[str] = None + + type: Optional[Literal["list_item"]] = None + + +class DocumentDocumentChildParagraphChildBlob(BaseModel): + """Represents embedded binary data using data URI scheme. + + Format: data:[][;base64], + Example: data:text/html;base64,PGh0bWw+... + """ + + data: str + + mimetype: str + + id: Optional[str] = None + + type: Optional[Literal["blob"]] = None + + +class DocumentDocumentChildParagraphChildCode(BaseModel): + text: str + + id: Optional[str] = None + + language: Optional[str] = None + + type: Optional[Literal["code"]] = None + + +class DocumentDocumentChildParagraphChildComment(BaseModel): + text: str + + id: Optional[str] = None + + created_at: Optional[datetime] = None + + type: Optional[Literal["comment"]] = None + + +class DocumentDocumentChildParagraphChildDivider(BaseModel): + id: Optional[str] = None + + type: Optional[Literal["divider"]] = None + + +class DocumentDocumentChildParagraphChildImage(BaseModel): + src: str + + text: str + + id: Optional[str] = None + + type: Optional[Literal["image"]] = None + + +class DocumentDocumentChildParagraphChildLink(BaseModel): + text: str + + url: str + + id: Optional[str] = None + + type: Optional[Literal["link"]] = None + + +class DocumentDocumentChildParagraphChildLineBreak(BaseModel): + id: Optional[str] = None + + type: Optional[Literal["line_break"]] = None + + +class DocumentDocumentChildParagraphChildText(BaseModel): + text: str + + id: Optional[str] = None + + marks: Optional[List[Literal["bold", "italic", "underline", "strikethrough", "code", "math"]]] = None + + type: Optional[Literal["text"]] = None + + +class DocumentDocumentChildParagraphChildToolCall(BaseModel): + """A tool/function call made by the assistant.""" + + tool_call_id: str + + tool_name: str + + id: Optional[str] = None + + args: Optional[Dict[str, object]] = None + + type: Optional[Literal["tool_call"]] = None + + +class DocumentDocumentChildParagraphChildToolResult(BaseModel): + """The result of a tool call.""" + + output: Union[str, Dict[str, object], List[object]] + + tool_call_id: str + + tool_name: str + + id: Optional[str] = None + + is_error: Optional[bool] = None + + type: Optional[Literal["tool_result"]] = None + + +class DocumentDocumentChildParagraphChildTraceMessage(BaseModel): + """A message in an agent trace (user message, assistant message, or thinking).""" + + text: str + + id: Optional[str] = None + + message_type: Optional[Literal["message", "thinking"]] = None + + role: Optional[Literal["user", "assistant"]] = None + + timestamp: Optional[datetime] = None + + type: Optional[Literal["trace_message"]] = None + + +DocumentDocumentChildParagraphChild: TypeAlias = Union[ + DocumentDocumentChildParagraphChildBlob, + DocumentDocumentChildParagraphChildCode, + DocumentDocumentChildParagraphChildComment, + DocumentDocumentChildParagraphChildDivider, + DocumentDocumentChildParagraphChildImage, + DocumentDocumentChildParagraphChildLink, + DocumentDocumentChildParagraphChildLineBreak, + DocumentDocumentChildParagraphChildText, + DocumentDocumentChildParagraphChildToolCall, + DocumentDocumentChildParagraphChildToolResult, + DocumentDocumentChildParagraphChildTraceMessage, + object, +] + + +class DocumentDocumentChildParagraph(BaseModel): + id: Optional[str] = None + + children: Optional[List[DocumentDocumentChildParagraphChild]] = None + + text: Optional[str] = None + + type: Optional[Literal["paragraph"]] = None + + +class DocumentDocumentChildQuoteChildBlob(BaseModel): + """Represents embedded binary data using data URI scheme. + + Format: data:[][;base64], + Example: data:text/html;base64,PGh0bWw+... + """ + + data: str + + mimetype: str + + id: Optional[str] = None + + type: Optional[Literal["blob"]] = None + + +class DocumentDocumentChildQuoteChildCode(BaseModel): + text: str + + id: Optional[str] = None + + language: Optional[str] = None + + type: Optional[Literal["code"]] = None + + +class DocumentDocumentChildQuoteChildComment(BaseModel): + text: str + + id: Optional[str] = None + + created_at: Optional[datetime] = None + + type: Optional[Literal["comment"]] = None + + +class DocumentDocumentChildQuoteChildDivider(BaseModel): + id: Optional[str] = None + + type: Optional[Literal["divider"]] = None + + +class DocumentDocumentChildQuoteChildImage(BaseModel): + src: str + + text: str + + id: Optional[str] = None + + type: Optional[Literal["image"]] = None + + +class DocumentDocumentChildQuoteChildLink(BaseModel): + text: str + + url: str + + id: Optional[str] = None + + type: Optional[Literal["link"]] = None + + +class DocumentDocumentChildQuoteChildLineBreak(BaseModel): + id: Optional[str] = None + + type: Optional[Literal["line_break"]] = None + + +class DocumentDocumentChildQuoteChildText(BaseModel): + text: str + + id: Optional[str] = None + + marks: Optional[List[Literal["bold", "italic", "underline", "strikethrough", "code", "math"]]] = None + + type: Optional[Literal["text"]] = None + + +class DocumentDocumentChildQuoteChildToolCall(BaseModel): + """A tool/function call made by the assistant.""" + + tool_call_id: str + + tool_name: str + + id: Optional[str] = None + + args: Optional[Dict[str, object]] = None + + type: Optional[Literal["tool_call"]] = None + + +class DocumentDocumentChildQuoteChildToolResult(BaseModel): + """The result of a tool call.""" + + output: Union[str, Dict[str, object], List[object]] + + tool_call_id: str + + tool_name: str + + id: Optional[str] = None + + is_error: Optional[bool] = None + + type: Optional[Literal["tool_result"]] = None + + +class DocumentDocumentChildQuoteChildTraceMessage(BaseModel): + """A message in an agent trace (user message, assistant message, or thinking).""" + + text: str + + id: Optional[str] = None + + message_type: Optional[Literal["message", "thinking"]] = None + + role: Optional[Literal["user", "assistant"]] = None + + timestamp: Optional[datetime] = None + + type: Optional[Literal["trace_message"]] = None + + +DocumentDocumentChildQuoteChild: TypeAlias = Union[ + DocumentDocumentChildQuoteChildBlob, + DocumentDocumentChildQuoteChildCode, + DocumentDocumentChildQuoteChildComment, + DocumentDocumentChildQuoteChildDivider, + DocumentDocumentChildQuoteChildImage, + DocumentDocumentChildQuoteChildLink, + DocumentDocumentChildQuoteChildLineBreak, + DocumentDocumentChildQuoteChildText, + DocumentDocumentChildQuoteChildToolCall, + DocumentDocumentChildQuoteChildToolResult, + DocumentDocumentChildQuoteChildTraceMessage, + object, +] + + +class DocumentDocumentChildQuote(BaseModel): + id: Optional[str] = None + + children: Optional[List[DocumentDocumentChildQuoteChild]] = None + + text: Optional[str] = None + + type: Optional[Literal["quote"]] = None + + +class DocumentDocumentChildTable(BaseModel): + id: Optional[str] = None + + children: Optional[List[object]] = None + + has_header: Optional[bool] = None + """Whether the first row should be treated as a header""" + + text: Optional[str] = None + + type: Optional[Literal["table"]] = None + + +class DocumentDocumentChildTableCellChildBlob(BaseModel): + """Represents embedded binary data using data URI scheme. + + Format: data:[][;base64], + Example: data:text/html;base64,PGh0bWw+... + """ + + data: str + + mimetype: str + + id: Optional[str] = None + + type: Optional[Literal["blob"]] = None + + +class DocumentDocumentChildTableCellChildCode(BaseModel): + text: str + + id: Optional[str] = None + + language: Optional[str] = None + + type: Optional[Literal["code"]] = None + + +class DocumentDocumentChildTableCellChildComment(BaseModel): + text: str + + id: Optional[str] = None + + created_at: Optional[datetime] = None + + type: Optional[Literal["comment"]] = None + + +class DocumentDocumentChildTableCellChildDivider(BaseModel): + id: Optional[str] = None + + type: Optional[Literal["divider"]] = None + + +class DocumentDocumentChildTableCellChildImage(BaseModel): + src: str + + text: str + + id: Optional[str] = None + + type: Optional[Literal["image"]] = None + + +class DocumentDocumentChildTableCellChildLink(BaseModel): + text: str + + url: str + + id: Optional[str] = None + + type: Optional[Literal["link"]] = None + + +class DocumentDocumentChildTableCellChildLineBreak(BaseModel): + id: Optional[str] = None + + type: Optional[Literal["line_break"]] = None + + +class DocumentDocumentChildTableCellChildText(BaseModel): + text: str + + id: Optional[str] = None + + marks: Optional[List[Literal["bold", "italic", "underline", "strikethrough", "code", "math"]]] = None + + type: Optional[Literal["text"]] = None + + +class DocumentDocumentChildTableCellChildToolCall(BaseModel): + """A tool/function call made by the assistant.""" + + tool_call_id: str + + tool_name: str + + id: Optional[str] = None + + args: Optional[Dict[str, object]] = None + + type: Optional[Literal["tool_call"]] = None + + +class DocumentDocumentChildTableCellChildToolResult(BaseModel): + """The result of a tool call.""" + + output: Union[str, Dict[str, object], List[object]] + + tool_call_id: str + + tool_name: str + + id: Optional[str] = None + + is_error: Optional[bool] = None + + type: Optional[Literal["tool_result"]] = None + + +class DocumentDocumentChildTableCellChildTraceMessage(BaseModel): + """A message in an agent trace (user message, assistant message, or thinking).""" + + text: str + + id: Optional[str] = None + + message_type: Optional[Literal["message", "thinking"]] = None + + role: Optional[Literal["user", "assistant"]] = None + + timestamp: Optional[datetime] = None + + type: Optional[Literal["trace_message"]] = None + + +DocumentDocumentChildTableCellChild: TypeAlias = Union[ + DocumentDocumentChildTableCellChildBlob, + DocumentDocumentChildTableCellChildCode, + DocumentDocumentChildTableCellChildComment, + DocumentDocumentChildTableCellChildDivider, + DocumentDocumentChildTableCellChildImage, + DocumentDocumentChildTableCellChildLink, + DocumentDocumentChildTableCellChildLineBreak, + DocumentDocumentChildTableCellChildText, + DocumentDocumentChildTableCellChildToolCall, + DocumentDocumentChildTableCellChildToolResult, + DocumentDocumentChildTableCellChildTraceMessage, + object, +] + + +class DocumentDocumentChildTableCell(BaseModel): + id: Optional[str] = None + + align: Optional[Literal["left", "center", "right"]] = None + + children: Optional[List[DocumentDocumentChildTableCellChild]] = None + + text: Optional[str] = None + + type: Optional[Literal["table_cell"]] = None + + +class DocumentDocumentChildTableRow(BaseModel): + id: Optional[str] = None + + children: Optional[List[object]] = None + + text: Optional[str] = None + + type: Optional[Literal["table_row"]] = None + + +class DocumentDocumentChildText(BaseModel): + text: str + + id: Optional[str] = None + + marks: Optional[List[Literal["bold", "italic", "underline", "strikethrough", "code", "math"]]] = None + + type: Optional[Literal["text"]] = None + + +class DocumentDocumentChildToDoChildBlob(BaseModel): + """Represents embedded binary data using data URI scheme. + + Format: data:[][;base64], + Example: data:text/html;base64,PGh0bWw+... + """ + + data: str + + mimetype: str + + id: Optional[str] = None + + type: Optional[Literal["blob"]] = None + + +class DocumentDocumentChildToDoChildCode(BaseModel): + text: str + + id: Optional[str] = None + + language: Optional[str] = None + + type: Optional[Literal["code"]] = None + + +class DocumentDocumentChildToDoChildComment(BaseModel): + text: str + + id: Optional[str] = None + + created_at: Optional[datetime] = None + + type: Optional[Literal["comment"]] = None + + +class DocumentDocumentChildToDoChildDivider(BaseModel): + id: Optional[str] = None + + type: Optional[Literal["divider"]] = None + + +class DocumentDocumentChildToDoChildImage(BaseModel): + src: str + + text: str + + id: Optional[str] = None + + type: Optional[Literal["image"]] = None + + +class DocumentDocumentChildToDoChildLink(BaseModel): + text: str + + url: str + + id: Optional[str] = None + + type: Optional[Literal["link"]] = None + + +class DocumentDocumentChildToDoChildLineBreak(BaseModel): + id: Optional[str] = None + + type: Optional[Literal["line_break"]] = None + + +class DocumentDocumentChildToDoChildText(BaseModel): + text: str + + id: Optional[str] = None + + marks: Optional[List[Literal["bold", "italic", "underline", "strikethrough", "code", "math"]]] = None + + type: Optional[Literal["text"]] = None + + +class DocumentDocumentChildToDoChildToolCall(BaseModel): + """A tool/function call made by the assistant.""" + + tool_call_id: str + + tool_name: str + + id: Optional[str] = None + + args: Optional[Dict[str, object]] = None + + type: Optional[Literal["tool_call"]] = None + + +class DocumentDocumentChildToDoChildToolResult(BaseModel): + """The result of a tool call.""" + + output: Union[str, Dict[str, object], List[object]] + + tool_call_id: str + + tool_name: str + + id: Optional[str] = None + + is_error: Optional[bool] = None + + type: Optional[Literal["tool_result"]] = None + + +class DocumentDocumentChildToDoChildTraceMessage(BaseModel): + """A message in an agent trace (user message, assistant message, or thinking).""" + + text: str + + id: Optional[str] = None + + message_type: Optional[Literal["message", "thinking"]] = None + + role: Optional[Literal["user", "assistant"]] = None + + timestamp: Optional[datetime] = None + + type: Optional[Literal["trace_message"]] = None + + +DocumentDocumentChildToDoChild: TypeAlias = Union[ + DocumentDocumentChildToDoChildBlob, + DocumentDocumentChildToDoChildCode, + DocumentDocumentChildToDoChildComment, + DocumentDocumentChildToDoChildDivider, + DocumentDocumentChildToDoChildImage, + DocumentDocumentChildToDoChildLink, + DocumentDocumentChildToDoChildLineBreak, + DocumentDocumentChildToDoChildText, + DocumentDocumentChildToDoChildToolCall, + DocumentDocumentChildToDoChildToolResult, + DocumentDocumentChildToDoChildTraceMessage, + object, +] + + +class DocumentDocumentChildToDo(BaseModel): + id: Optional[str] = None + + checked: Optional[bool] = None + + children: Optional[List[DocumentDocumentChildToDoChild]] = None + + text: Optional[str] = None + + type: Optional[Literal["todo"]] = None + + +class DocumentDocumentChildToolCall(BaseModel): + """A tool/function call made by the assistant.""" + + tool_call_id: str + + tool_name: str + + id: Optional[str] = None + + args: Optional[Dict[str, object]] = None + + type: Optional[Literal["tool_call"]] = None + + +class DocumentDocumentChildToolResult(BaseModel): + """The result of a tool call.""" + + output: Union[str, Dict[str, object], List[object]] + + tool_call_id: str + + tool_name: str + + id: Optional[str] = None + + is_error: Optional[bool] = None + + type: Optional[Literal["tool_result"]] = None + + +class DocumentDocumentChildTraceMessage(BaseModel): + """A message in an agent trace (user message, assistant message, or thinking).""" + + text: str + + id: Optional[str] = None + + message_type: Optional[Literal["message", "thinking"]] = None + + role: Optional[Literal["user", "assistant"]] = None + + timestamp: Optional[datetime] = None + + type: Optional[Literal["trace_message"]] = None + + +class DocumentDocumentChildUtterance(BaseModel): + """A speaker-attributed segment of a transcript (ENG-2476/D10). + + "Utterance" is the standard name for this across transcription providers + (AssemblyAI, Deepgram, Rev). Timestamps are relative offsets in seconds — + provider-native; absolute times derive from `Transcript.started_at`. + """ + + text: str + + id: Optional[str] = None + + end: Optional[float] = None + + speaker: Optional[object] = None + + start: Optional[float] = None + + type: Optional[Literal["utterance"]] = None + + +DocumentDocumentChild: TypeAlias = Annotated[ + Union[ + DocumentDocumentChildBlob, + DocumentDocumentChildCallout, + DocumentDocumentChildChunk, + DocumentDocumentChildCode, + DocumentDocumentChildComment, + DocumentDocumentChildDivider, + DocumentDocumentChildEquation, + DocumentDocumentChildFootnote, + DocumentDocumentChildHeading, + DocumentDocumentChildImage, + DocumentDocumentChildLink, + DocumentDocumentChildLineBreak, + DocumentDocumentChildList, + DocumentDocumentChildListItem, + DocumentDocumentChildParagraph, + DocumentDocumentChildQuote, + DocumentDocumentChildTable, + DocumentDocumentChildTableCell, + DocumentDocumentChildTableRow, + DocumentDocumentChildText, + DocumentDocumentChildToDo, + DocumentDocumentChildToolCall, + DocumentDocumentChildToolResult, + DocumentDocumentChildTraceMessage, + DocumentDocumentChildUtterance, + ], + PropertyInfo(discriminator="type"), +] + + +class DocumentDocument(BaseModel): + id: Optional[str] = None + + children: Optional[List[DocumentDocumentChild]] = None + + text: Optional[str] = None + + title: Optional[str] = None + + type: Optional[Literal["document"]] = None + + +class DocumentWebsiteChildBlob(BaseModel): + """Represents embedded binary data using data URI scheme. + + Format: data:[][;base64], + Example: data:text/html;base64,PGh0bWw+... + """ + + data: str + + mimetype: str + + id: Optional[str] = None + + type: Optional[Literal["blob"]] = None + + +class DocumentWebsiteChildCalloutChildBlob(BaseModel): + """Represents embedded binary data using data URI scheme. + + Format: data:[][;base64], + Example: data:text/html;base64,PGh0bWw+... + """ + + data: str + + mimetype: str + + id: Optional[str] = None + + type: Optional[Literal["blob"]] = None + + +class DocumentWebsiteChildCalloutChildCode(BaseModel): + text: str + + id: Optional[str] = None + + language: Optional[str] = None + + type: Optional[Literal["code"]] = None + + +class DocumentWebsiteChildCalloutChildComment(BaseModel): + text: str + + id: Optional[str] = None + + created_at: Optional[datetime] = None + + type: Optional[Literal["comment"]] = None + + +class DocumentWebsiteChildCalloutChildDivider(BaseModel): + id: Optional[str] = None + + type: Optional[Literal["divider"]] = None + + +class DocumentWebsiteChildCalloutChildImage(BaseModel): + src: str + + text: str + + id: Optional[str] = None + + type: Optional[Literal["image"]] = None + + +class DocumentWebsiteChildCalloutChildLink(BaseModel): + text: str + + url: str + + id: Optional[str] = None + + type: Optional[Literal["link"]] = None + + +class DocumentWebsiteChildCalloutChildLineBreak(BaseModel): + id: Optional[str] = None + + type: Optional[Literal["line_break"]] = None + + +class DocumentWebsiteChildCalloutChildText(BaseModel): + text: str + + id: Optional[str] = None + + marks: Optional[List[Literal["bold", "italic", "underline", "strikethrough", "code", "math"]]] = None + + type: Optional[Literal["text"]] = None + + +class DocumentWebsiteChildCalloutChildToolCall(BaseModel): + """A tool/function call made by the assistant.""" + + tool_call_id: str + + tool_name: str + + id: Optional[str] = None + + args: Optional[Dict[str, object]] = None + + type: Optional[Literal["tool_call"]] = None + + +class DocumentWebsiteChildCalloutChildToolResult(BaseModel): + """The result of a tool call.""" + + output: Union[str, Dict[str, object], List[object]] + + tool_call_id: str + + tool_name: str + + id: Optional[str] = None + + is_error: Optional[bool] = None + + type: Optional[Literal["tool_result"]] = None + + +class DocumentWebsiteChildCalloutChildTraceMessage(BaseModel): + """A message in an agent trace (user message, assistant message, or thinking).""" + + text: str + + id: Optional[str] = None + + message_type: Optional[Literal["message", "thinking"]] = None + + role: Optional[Literal["user", "assistant"]] = None + + timestamp: Optional[datetime] = None + + type: Optional[Literal["trace_message"]] = None + + +DocumentWebsiteChildCalloutChild: TypeAlias = Union[ + DocumentWebsiteChildCalloutChildBlob, + DocumentWebsiteChildCalloutChildCode, + DocumentWebsiteChildCalloutChildComment, + DocumentWebsiteChildCalloutChildDivider, + DocumentWebsiteChildCalloutChildImage, + DocumentWebsiteChildCalloutChildLink, + DocumentWebsiteChildCalloutChildLineBreak, + DocumentWebsiteChildCalloutChildText, + DocumentWebsiteChildCalloutChildToolCall, + DocumentWebsiteChildCalloutChildToolResult, + DocumentWebsiteChildCalloutChildTraceMessage, + object, +] + + +class DocumentWebsiteChildCallout(BaseModel): + id: Optional[str] = None + + children: Optional[List[DocumentWebsiteChildCalloutChild]] = None + + text: Optional[str] = None + + title: Optional[str] = None + + type: Optional[Literal["callout"]] = None + + +class DocumentWebsiteChildChunkChildBlob(BaseModel): + """Represents embedded binary data using data URI scheme. + + Format: data:[][;base64], + Example: data:text/html;base64,PGh0bWw+... + """ + + data: str + + mimetype: str + + id: Optional[str] = None + + type: Optional[Literal["blob"]] = None + + +class DocumentWebsiteChildChunkChildCode(BaseModel): + text: str + + id: Optional[str] = None + + language: Optional[str] = None + + type: Optional[Literal["code"]] = None + + +class DocumentWebsiteChildChunkChildComment(BaseModel): + text: str + + id: Optional[str] = None + + created_at: Optional[datetime] = None + + type: Optional[Literal["comment"]] = None + + +class DocumentWebsiteChildChunkChildDivider(BaseModel): + id: Optional[str] = None + + type: Optional[Literal["divider"]] = None + + +class DocumentWebsiteChildChunkChildImage(BaseModel): + src: str + + text: str + + id: Optional[str] = None + + type: Optional[Literal["image"]] = None + + +class DocumentWebsiteChildChunkChildLink(BaseModel): + text: str + + url: str + + id: Optional[str] = None + + type: Optional[Literal["link"]] = None + + +class DocumentWebsiteChildChunkChildLineBreak(BaseModel): + id: Optional[str] = None + + type: Optional[Literal["line_break"]] = None + + +class DocumentWebsiteChildChunkChildText(BaseModel): + text: str + + id: Optional[str] = None + + marks: Optional[List[Literal["bold", "italic", "underline", "strikethrough", "code", "math"]]] = None + + type: Optional[Literal["text"]] = None + + +class DocumentWebsiteChildChunkChildToolCall(BaseModel): + """A tool/function call made by the assistant.""" + + tool_call_id: str + + tool_name: str + + id: Optional[str] = None + + args: Optional[Dict[str, object]] = None + + type: Optional[Literal["tool_call"]] = None + + +class DocumentWebsiteChildChunkChildToolResult(BaseModel): + """The result of a tool call.""" + + output: Union[str, Dict[str, object], List[object]] + + tool_call_id: str + + tool_name: str + + id: Optional[str] = None + + is_error: Optional[bool] = None + + type: Optional[Literal["tool_result"]] = None + + +class DocumentWebsiteChildChunkChildTraceMessage(BaseModel): + """A message in an agent trace (user message, assistant message, or thinking).""" + + text: str + + id: Optional[str] = None + + message_type: Optional[Literal["message", "thinking"]] = None + + role: Optional[Literal["user", "assistant"]] = None + + timestamp: Optional[datetime] = None + + type: Optional[Literal["trace_message"]] = None + + +DocumentWebsiteChildChunkChild: TypeAlias = Union[ + DocumentWebsiteChildChunkChildBlob, + DocumentWebsiteChildChunkChildCode, + DocumentWebsiteChildChunkChildComment, + DocumentWebsiteChildChunkChildDivider, + DocumentWebsiteChildChunkChildImage, + DocumentWebsiteChildChunkChildLink, + DocumentWebsiteChildChunkChildLineBreak, + DocumentWebsiteChildChunkChildText, + DocumentWebsiteChildChunkChildToolCall, + DocumentWebsiteChildChunkChildToolResult, + DocumentWebsiteChildChunkChildTraceMessage, + object, +] + + +class DocumentWebsiteChildChunk(BaseModel): + id: Optional[str] = None + + children: Optional[List[DocumentWebsiteChildChunkChild]] = None + + text: Optional[str] = None + + type: Optional[Literal["chunk"]] = None + + +class DocumentWebsiteChildCode(BaseModel): + text: str + + id: Optional[str] = None + + language: Optional[str] = None + + type: Optional[Literal["code"]] = None + + +class DocumentWebsiteChildComment(BaseModel): + text: str + + id: Optional[str] = None + + created_at: Optional[datetime] = None + + type: Optional[Literal["comment"]] = None + + +class DocumentWebsiteChildDivider(BaseModel): + id: Optional[str] = None + + type: Optional[Literal["divider"]] = None + + +class DocumentWebsiteChildEquationChildBlob(BaseModel): + """Represents embedded binary data using data URI scheme. + + Format: data:[][;base64], + Example: data:text/html;base64,PGh0bWw+... + """ + + data: str + + mimetype: str + + id: Optional[str] = None + + type: Optional[Literal["blob"]] = None + + +class DocumentWebsiteChildEquationChildCode(BaseModel): + text: str + + id: Optional[str] = None + + language: Optional[str] = None + + type: Optional[Literal["code"]] = None + + +class DocumentWebsiteChildEquationChildComment(BaseModel): + text: str + + id: Optional[str] = None + + created_at: Optional[datetime] = None + + type: Optional[Literal["comment"]] = None + + +class DocumentWebsiteChildEquationChildDivider(BaseModel): + id: Optional[str] = None + + type: Optional[Literal["divider"]] = None + + +class DocumentWebsiteChildEquationChildImage(BaseModel): + src: str + + text: str + + id: Optional[str] = None + + type: Optional[Literal["image"]] = None + + +class DocumentWebsiteChildEquationChildLink(BaseModel): + text: str + + url: str + + id: Optional[str] = None + + type: Optional[Literal["link"]] = None + + +class DocumentWebsiteChildEquationChildLineBreak(BaseModel): + id: Optional[str] = None + + type: Optional[Literal["line_break"]] = None + + +class DocumentWebsiteChildEquationChildText(BaseModel): + text: str + + id: Optional[str] = None + + marks: Optional[List[Literal["bold", "italic", "underline", "strikethrough", "code", "math"]]] = None + + type: Optional[Literal["text"]] = None + + +class DocumentWebsiteChildEquationChildToolCall(BaseModel): + """A tool/function call made by the assistant.""" + + tool_call_id: str + + tool_name: str + + id: Optional[str] = None + + args: Optional[Dict[str, object]] = None + + type: Optional[Literal["tool_call"]] = None + + +class DocumentWebsiteChildEquationChildToolResult(BaseModel): + """The result of a tool call.""" + + output: Union[str, Dict[str, object], List[object]] + + tool_call_id: str + + tool_name: str + + id: Optional[str] = None + + is_error: Optional[bool] = None + + type: Optional[Literal["tool_result"]] = None + + +class DocumentWebsiteChildEquationChildTraceMessage(BaseModel): + """A message in an agent trace (user message, assistant message, or thinking).""" + + text: str + + id: Optional[str] = None + + message_type: Optional[Literal["message", "thinking"]] = None + + role: Optional[Literal["user", "assistant"]] = None + + timestamp: Optional[datetime] = None + + type: Optional[Literal["trace_message"]] = None + + +DocumentWebsiteChildEquationChild: TypeAlias = Union[ + DocumentWebsiteChildEquationChildBlob, + DocumentWebsiteChildEquationChildCode, + DocumentWebsiteChildEquationChildComment, + DocumentWebsiteChildEquationChildDivider, + DocumentWebsiteChildEquationChildImage, + DocumentWebsiteChildEquationChildLink, + DocumentWebsiteChildEquationChildLineBreak, + DocumentWebsiteChildEquationChildText, + DocumentWebsiteChildEquationChildToolCall, + DocumentWebsiteChildEquationChildToolResult, + DocumentWebsiteChildEquationChildTraceMessage, + object, +] + + +class DocumentWebsiteChildEquation(BaseModel): + id: Optional[str] = None + + children: Optional[List[DocumentWebsiteChildEquationChild]] = None + + text: Optional[str] = None + + type: Optional[Literal["equation"]] = None + + +class DocumentWebsiteChildFootnoteChildBlob(BaseModel): + """Represents embedded binary data using data URI scheme. + + Format: data:[][;base64], + Example: data:text/html;base64,PGh0bWw+... + """ + + data: str + + mimetype: str + + id: Optional[str] = None + + type: Optional[Literal["blob"]] = None + + +class DocumentWebsiteChildFootnoteChildCode(BaseModel): + text: str + + id: Optional[str] = None + + language: Optional[str] = None + + type: Optional[Literal["code"]] = None + + +class DocumentWebsiteChildFootnoteChildComment(BaseModel): + text: str + + id: Optional[str] = None + + created_at: Optional[datetime] = None + + type: Optional[Literal["comment"]] = None + + +class DocumentWebsiteChildFootnoteChildDivider(BaseModel): + id: Optional[str] = None + + type: Optional[Literal["divider"]] = None + + +class DocumentWebsiteChildFootnoteChildImage(BaseModel): + src: str + + text: str + + id: Optional[str] = None + + type: Optional[Literal["image"]] = None + + +class DocumentWebsiteChildFootnoteChildLink(BaseModel): + text: str + + url: str + + id: Optional[str] = None + + type: Optional[Literal["link"]] = None + + +class DocumentWebsiteChildFootnoteChildLineBreak(BaseModel): + id: Optional[str] = None + + type: Optional[Literal["line_break"]] = None + + +class DocumentWebsiteChildFootnoteChildText(BaseModel): + text: str + + id: Optional[str] = None + + marks: Optional[List[Literal["bold", "italic", "underline", "strikethrough", "code", "math"]]] = None + + type: Optional[Literal["text"]] = None + + +class DocumentWebsiteChildFootnoteChildToolCall(BaseModel): + """A tool/function call made by the assistant.""" + + tool_call_id: str + + tool_name: str + + id: Optional[str] = None + + args: Optional[Dict[str, object]] = None + + type: Optional[Literal["tool_call"]] = None + + +class DocumentWebsiteChildFootnoteChildToolResult(BaseModel): + """The result of a tool call.""" + + output: Union[str, Dict[str, object], List[object]] + + tool_call_id: str + + tool_name: str + + id: Optional[str] = None + + is_error: Optional[bool] = None + + type: Optional[Literal["tool_result"]] = None + + +class DocumentWebsiteChildFootnoteChildTraceMessage(BaseModel): + """A message in an agent trace (user message, assistant message, or thinking).""" + + text: str + + id: Optional[str] = None + + message_type: Optional[Literal["message", "thinking"]] = None + + role: Optional[Literal["user", "assistant"]] = None + + timestamp: Optional[datetime] = None + + type: Optional[Literal["trace_message"]] = None + + +DocumentWebsiteChildFootnoteChild: TypeAlias = Union[ + DocumentWebsiteChildFootnoteChildBlob, + DocumentWebsiteChildFootnoteChildCode, + DocumentWebsiteChildFootnoteChildComment, + DocumentWebsiteChildFootnoteChildDivider, + DocumentWebsiteChildFootnoteChildImage, + DocumentWebsiteChildFootnoteChildLink, + DocumentWebsiteChildFootnoteChildLineBreak, + DocumentWebsiteChildFootnoteChildText, + DocumentWebsiteChildFootnoteChildToolCall, + DocumentWebsiteChildFootnoteChildToolResult, + DocumentWebsiteChildFootnoteChildTraceMessage, + object, +] + + +class DocumentWebsiteChildFootnote(BaseModel): + id: Optional[str] = None + + children: Optional[List[DocumentWebsiteChildFootnoteChild]] = None + + text: Optional[str] = None + + type: Optional[Literal["footnote"]] = None + + +class DocumentWebsiteChildHeadingChildBlob(BaseModel): + """Represents embedded binary data using data URI scheme. + + Format: data:[][;base64], + Example: data:text/html;base64,PGh0bWw+... + """ + + data: str + + mimetype: str + + id: Optional[str] = None + + type: Optional[Literal["blob"]] = None + + +class DocumentWebsiteChildHeadingChildCode(BaseModel): + text: str + + id: Optional[str] = None + + language: Optional[str] = None + + type: Optional[Literal["code"]] = None + + +class DocumentWebsiteChildHeadingChildComment(BaseModel): + text: str + + id: Optional[str] = None + + created_at: Optional[datetime] = None + + type: Optional[Literal["comment"]] = None + + +class DocumentWebsiteChildHeadingChildDivider(BaseModel): + id: Optional[str] = None + + type: Optional[Literal["divider"]] = None + + +class DocumentWebsiteChildHeadingChildImage(BaseModel): + src: str + + text: str + + id: Optional[str] = None + + type: Optional[Literal["image"]] = None + + +class DocumentWebsiteChildHeadingChildLink(BaseModel): + text: str + + url: str + + id: Optional[str] = None + + type: Optional[Literal["link"]] = None + + +class DocumentWebsiteChildHeadingChildLineBreak(BaseModel): + id: Optional[str] = None + + type: Optional[Literal["line_break"]] = None + + +class DocumentWebsiteChildHeadingChildText(BaseModel): + text: str + + id: Optional[str] = None + + marks: Optional[List[Literal["bold", "italic", "underline", "strikethrough", "code", "math"]]] = None + + type: Optional[Literal["text"]] = None + + +class DocumentWebsiteChildHeadingChildToolCall(BaseModel): + """A tool/function call made by the assistant.""" + + tool_call_id: str + + tool_name: str + + id: Optional[str] = None + + args: Optional[Dict[str, object]] = None + + type: Optional[Literal["tool_call"]] = None + + +class DocumentWebsiteChildHeadingChildToolResult(BaseModel): + """The result of a tool call.""" + + output: Union[str, Dict[str, object], List[object]] + + tool_call_id: str + + tool_name: str + + id: Optional[str] = None + + is_error: Optional[bool] = None + + type: Optional[Literal["tool_result"]] = None + + +class DocumentWebsiteChildHeadingChildTraceMessage(BaseModel): + """A message in an agent trace (user message, assistant message, or thinking).""" + + text: str + + id: Optional[str] = None + + message_type: Optional[Literal["message", "thinking"]] = None + + role: Optional[Literal["user", "assistant"]] = None + + timestamp: Optional[datetime] = None + + type: Optional[Literal["trace_message"]] = None + + +DocumentWebsiteChildHeadingChild: TypeAlias = Union[ + DocumentWebsiteChildHeadingChildBlob, + DocumentWebsiteChildHeadingChildCode, + DocumentWebsiteChildHeadingChildComment, + DocumentWebsiteChildHeadingChildDivider, + DocumentWebsiteChildHeadingChildImage, + DocumentWebsiteChildHeadingChildLink, + DocumentWebsiteChildHeadingChildLineBreak, + DocumentWebsiteChildHeadingChildText, + DocumentWebsiteChildHeadingChildToolCall, + DocumentWebsiteChildHeadingChildToolResult, + DocumentWebsiteChildHeadingChildTraceMessage, + object, +] + + +class DocumentWebsiteChildHeading(BaseModel): + level: int + + id: Optional[str] = None + + children: Optional[List[DocumentWebsiteChildHeadingChild]] = None + + text: Optional[str] = None + + type: Optional[Literal["heading"]] = None + + +class DocumentWebsiteChildImage(BaseModel): + src: str + + text: str + + id: Optional[str] = None + + type: Optional[Literal["image"]] = None + + +class DocumentWebsiteChildLink(BaseModel): + text: str + + url: str + + id: Optional[str] = None + + type: Optional[Literal["link"]] = None + + +class DocumentWebsiteChildLineBreak(BaseModel): + id: Optional[str] = None + + type: Optional[Literal["line_break"]] = None + + +class DocumentWebsiteChildList(BaseModel): + id: Optional[str] = None + + children: Optional[List[object]] = None + + ordered: Optional[bool] = None + + text: Optional[str] = None + + type: Optional[Literal["list"]] = None + + +class DocumentWebsiteChildListItemChildBlob(BaseModel): + """Represents embedded binary data using data URI scheme. + + Format: data:[][;base64], + Example: data:text/html;base64,PGh0bWw+... + """ + + data: str + + mimetype: str + + id: Optional[str] = None + + type: Optional[Literal["blob"]] = None + + +class DocumentWebsiteChildListItemChildCode(BaseModel): + text: str + + id: Optional[str] = None + + language: Optional[str] = None + + type: Optional[Literal["code"]] = None + + +class DocumentWebsiteChildListItemChildComment(BaseModel): + text: str + + id: Optional[str] = None + + created_at: Optional[datetime] = None + + type: Optional[Literal["comment"]] = None + + +class DocumentWebsiteChildListItemChildDivider(BaseModel): + id: Optional[str] = None + + type: Optional[Literal["divider"]] = None + + +class DocumentWebsiteChildListItemChildImage(BaseModel): + src: str + + text: str + + id: Optional[str] = None + + type: Optional[Literal["image"]] = None + + +class DocumentWebsiteChildListItemChildLink(BaseModel): + text: str + + url: str + + id: Optional[str] = None + + type: Optional[Literal["link"]] = None + + +class DocumentWebsiteChildListItemChildLineBreak(BaseModel): + id: Optional[str] = None + + type: Optional[Literal["line_break"]] = None + + +class DocumentWebsiteChildListItemChildText(BaseModel): + text: str + + id: Optional[str] = None + + marks: Optional[List[Literal["bold", "italic", "underline", "strikethrough", "code", "math"]]] = None + + type: Optional[Literal["text"]] = None + + +class DocumentWebsiteChildListItemChildToolCall(BaseModel): + """A tool/function call made by the assistant.""" + + tool_call_id: str + + tool_name: str + + id: Optional[str] = None + + args: Optional[Dict[str, object]] = None + + type: Optional[Literal["tool_call"]] = None + + +class DocumentWebsiteChildListItemChildToolResult(BaseModel): + """The result of a tool call.""" + + output: Union[str, Dict[str, object], List[object]] + + tool_call_id: str + + tool_name: str + + id: Optional[str] = None + + is_error: Optional[bool] = None + + type: Optional[Literal["tool_result"]] = None + + +class DocumentWebsiteChildListItemChildTraceMessage(BaseModel): + """A message in an agent trace (user message, assistant message, or thinking).""" + + text: str + + id: Optional[str] = None + + message_type: Optional[Literal["message", "thinking"]] = None + + role: Optional[Literal["user", "assistant"]] = None + + timestamp: Optional[datetime] = None + + type: Optional[Literal["trace_message"]] = None + + +DocumentWebsiteChildListItemChild: TypeAlias = Union[ + DocumentWebsiteChildListItemChildBlob, + DocumentWebsiteChildListItemChildCode, + DocumentWebsiteChildListItemChildComment, + DocumentWebsiteChildListItemChildDivider, + DocumentWebsiteChildListItemChildImage, + DocumentWebsiteChildListItemChildLink, + DocumentWebsiteChildListItemChildLineBreak, + DocumentWebsiteChildListItemChildText, + DocumentWebsiteChildListItemChildToolCall, + DocumentWebsiteChildListItemChildToolResult, + DocumentWebsiteChildListItemChildTraceMessage, + object, +] + + +class DocumentWebsiteChildListItem(BaseModel): + id: Optional[str] = None + + children: Optional[List[DocumentWebsiteChildListItemChild]] = None + + text: Optional[str] = None + + type: Optional[Literal["list_item"]] = None + + +class DocumentWebsiteChildParagraphChildBlob(BaseModel): + """Represents embedded binary data using data URI scheme. + + Format: data:[][;base64], + Example: data:text/html;base64,PGh0bWw+... + """ + + data: str + + mimetype: str + + id: Optional[str] = None + + type: Optional[Literal["blob"]] = None + + +class DocumentWebsiteChildParagraphChildCode(BaseModel): + text: str + + id: Optional[str] = None + + language: Optional[str] = None + + type: Optional[Literal["code"]] = None + + +class DocumentWebsiteChildParagraphChildComment(BaseModel): + text: str + + id: Optional[str] = None + + created_at: Optional[datetime] = None + + type: Optional[Literal["comment"]] = None + + +class DocumentWebsiteChildParagraphChildDivider(BaseModel): + id: Optional[str] = None + + type: Optional[Literal["divider"]] = None + + +class DocumentWebsiteChildParagraphChildImage(BaseModel): + src: str + + text: str + + id: Optional[str] = None + + type: Optional[Literal["image"]] = None + + +class DocumentWebsiteChildParagraphChildLink(BaseModel): + text: str + + url: str + + id: Optional[str] = None + + type: Optional[Literal["link"]] = None + + +class DocumentWebsiteChildParagraphChildLineBreak(BaseModel): + id: Optional[str] = None + + type: Optional[Literal["line_break"]] = None + + +class DocumentWebsiteChildParagraphChildText(BaseModel): + text: str + + id: Optional[str] = None + + marks: Optional[List[Literal["bold", "italic", "underline", "strikethrough", "code", "math"]]] = None + + type: Optional[Literal["text"]] = None + + +class DocumentWebsiteChildParagraphChildToolCall(BaseModel): + """A tool/function call made by the assistant.""" + + tool_call_id: str + + tool_name: str + + id: Optional[str] = None + + args: Optional[Dict[str, object]] = None + + type: Optional[Literal["tool_call"]] = None + + +class DocumentWebsiteChildParagraphChildToolResult(BaseModel): + """The result of a tool call.""" + + output: Union[str, Dict[str, object], List[object]] + + tool_call_id: str + + tool_name: str + + id: Optional[str] = None + + is_error: Optional[bool] = None + + type: Optional[Literal["tool_result"]] = None + + +class DocumentWebsiteChildParagraphChildTraceMessage(BaseModel): + """A message in an agent trace (user message, assistant message, or thinking).""" + + text: str + + id: Optional[str] = None + + message_type: Optional[Literal["message", "thinking"]] = None + + role: Optional[Literal["user", "assistant"]] = None + + timestamp: Optional[datetime] = None + + type: Optional[Literal["trace_message"]] = None + + +DocumentWebsiteChildParagraphChild: TypeAlias = Union[ + DocumentWebsiteChildParagraphChildBlob, + DocumentWebsiteChildParagraphChildCode, + DocumentWebsiteChildParagraphChildComment, + DocumentWebsiteChildParagraphChildDivider, + DocumentWebsiteChildParagraphChildImage, + DocumentWebsiteChildParagraphChildLink, + DocumentWebsiteChildParagraphChildLineBreak, + DocumentWebsiteChildParagraphChildText, + DocumentWebsiteChildParagraphChildToolCall, + DocumentWebsiteChildParagraphChildToolResult, + DocumentWebsiteChildParagraphChildTraceMessage, + object, +] + + +class DocumentWebsiteChildParagraph(BaseModel): + id: Optional[str] = None + + children: Optional[List[DocumentWebsiteChildParagraphChild]] = None + + text: Optional[str] = None + + type: Optional[Literal["paragraph"]] = None + + +class DocumentWebsiteChildQuoteChildBlob(BaseModel): + """Represents embedded binary data using data URI scheme. + + Format: data:[][;base64], + Example: data:text/html;base64,PGh0bWw+... + """ + + data: str + + mimetype: str + + id: Optional[str] = None + + type: Optional[Literal["blob"]] = None + + +class DocumentWebsiteChildQuoteChildCode(BaseModel): + text: str + + id: Optional[str] = None + + language: Optional[str] = None + + type: Optional[Literal["code"]] = None + + +class DocumentWebsiteChildQuoteChildComment(BaseModel): + text: str + + id: Optional[str] = None + + created_at: Optional[datetime] = None + + type: Optional[Literal["comment"]] = None + + +class DocumentWebsiteChildQuoteChildDivider(BaseModel): + id: Optional[str] = None + + type: Optional[Literal["divider"]] = None + + +class DocumentWebsiteChildQuoteChildImage(BaseModel): + src: str + + text: str + + id: Optional[str] = None + + type: Optional[Literal["image"]] = None + + +class DocumentWebsiteChildQuoteChildLink(BaseModel): + text: str + + url: str + + id: Optional[str] = None + + type: Optional[Literal["link"]] = None + + +class DocumentWebsiteChildQuoteChildLineBreak(BaseModel): + id: Optional[str] = None + + type: Optional[Literal["line_break"]] = None + + +class DocumentWebsiteChildQuoteChildText(BaseModel): + text: str + + id: Optional[str] = None + + marks: Optional[List[Literal["bold", "italic", "underline", "strikethrough", "code", "math"]]] = None + + type: Optional[Literal["text"]] = None + + +class DocumentWebsiteChildQuoteChildToolCall(BaseModel): + """A tool/function call made by the assistant.""" + + tool_call_id: str + + tool_name: str + + id: Optional[str] = None + + args: Optional[Dict[str, object]] = None + + type: Optional[Literal["tool_call"]] = None + + +class DocumentWebsiteChildQuoteChildToolResult(BaseModel): + """The result of a tool call.""" + + output: Union[str, Dict[str, object], List[object]] + + tool_call_id: str + + tool_name: str + + id: Optional[str] = None + + is_error: Optional[bool] = None + + type: Optional[Literal["tool_result"]] = None + + +class DocumentWebsiteChildQuoteChildTraceMessage(BaseModel): + """A message in an agent trace (user message, assistant message, or thinking).""" + + text: str + + id: Optional[str] = None + + message_type: Optional[Literal["message", "thinking"]] = None + + role: Optional[Literal["user", "assistant"]] = None + + timestamp: Optional[datetime] = None + + type: Optional[Literal["trace_message"]] = None + + +DocumentWebsiteChildQuoteChild: TypeAlias = Union[ + DocumentWebsiteChildQuoteChildBlob, + DocumentWebsiteChildQuoteChildCode, + DocumentWebsiteChildQuoteChildComment, + DocumentWebsiteChildQuoteChildDivider, + DocumentWebsiteChildQuoteChildImage, + DocumentWebsiteChildQuoteChildLink, + DocumentWebsiteChildQuoteChildLineBreak, + DocumentWebsiteChildQuoteChildText, + DocumentWebsiteChildQuoteChildToolCall, + DocumentWebsiteChildQuoteChildToolResult, + DocumentWebsiteChildQuoteChildTraceMessage, + object, +] + + +class DocumentWebsiteChildQuote(BaseModel): + id: Optional[str] = None + + children: Optional[List[DocumentWebsiteChildQuoteChild]] = None + + text: Optional[str] = None + + type: Optional[Literal["quote"]] = None + + +class DocumentWebsiteChildTable(BaseModel): + id: Optional[str] = None + + children: Optional[List[object]] = None + + has_header: Optional[bool] = None + """Whether the first row should be treated as a header""" + + text: Optional[str] = None + + type: Optional[Literal["table"]] = None + + +class DocumentWebsiteChildTableCellChildBlob(BaseModel): + """Represents embedded binary data using data URI scheme. + + Format: data:[][;base64], + Example: data:text/html;base64,PGh0bWw+... + """ + + data: str + + mimetype: str + + id: Optional[str] = None + + type: Optional[Literal["blob"]] = None + + +class DocumentWebsiteChildTableCellChildCode(BaseModel): + text: str + + id: Optional[str] = None + + language: Optional[str] = None + + type: Optional[Literal["code"]] = None + + +class DocumentWebsiteChildTableCellChildComment(BaseModel): + text: str + + id: Optional[str] = None + + created_at: Optional[datetime] = None + + type: Optional[Literal["comment"]] = None + + +class DocumentWebsiteChildTableCellChildDivider(BaseModel): + id: Optional[str] = None + + type: Optional[Literal["divider"]] = None + + +class DocumentWebsiteChildTableCellChildImage(BaseModel): + src: str + + text: str + + id: Optional[str] = None + + type: Optional[Literal["image"]] = None + + +class DocumentWebsiteChildTableCellChildLink(BaseModel): + text: str + + url: str + + id: Optional[str] = None + + type: Optional[Literal["link"]] = None + + +class DocumentWebsiteChildTableCellChildLineBreak(BaseModel): + id: Optional[str] = None + + type: Optional[Literal["line_break"]] = None + + +class DocumentWebsiteChildTableCellChildText(BaseModel): + text: str + + id: Optional[str] = None + + marks: Optional[List[Literal["bold", "italic", "underline", "strikethrough", "code", "math"]]] = None + + type: Optional[Literal["text"]] = None + + +class DocumentWebsiteChildTableCellChildToolCall(BaseModel): + """A tool/function call made by the assistant.""" + + tool_call_id: str + + tool_name: str + + id: Optional[str] = None + + args: Optional[Dict[str, object]] = None + + type: Optional[Literal["tool_call"]] = None + + +class DocumentWebsiteChildTableCellChildToolResult(BaseModel): + """The result of a tool call.""" + + output: Union[str, Dict[str, object], List[object]] + + tool_call_id: str + + tool_name: str + + id: Optional[str] = None + + is_error: Optional[bool] = None + + type: Optional[Literal["tool_result"]] = None + + +class DocumentWebsiteChildTableCellChildTraceMessage(BaseModel): + """A message in an agent trace (user message, assistant message, or thinking).""" + + text: str + + id: Optional[str] = None + + message_type: Optional[Literal["message", "thinking"]] = None + + role: Optional[Literal["user", "assistant"]] = None + + timestamp: Optional[datetime] = None + + type: Optional[Literal["trace_message"]] = None + + +DocumentWebsiteChildTableCellChild: TypeAlias = Union[ + DocumentWebsiteChildTableCellChildBlob, + DocumentWebsiteChildTableCellChildCode, + DocumentWebsiteChildTableCellChildComment, + DocumentWebsiteChildTableCellChildDivider, + DocumentWebsiteChildTableCellChildImage, + DocumentWebsiteChildTableCellChildLink, + DocumentWebsiteChildTableCellChildLineBreak, + DocumentWebsiteChildTableCellChildText, + DocumentWebsiteChildTableCellChildToolCall, + DocumentWebsiteChildTableCellChildToolResult, + DocumentWebsiteChildTableCellChildTraceMessage, + object, +] + + +class DocumentWebsiteChildTableCell(BaseModel): + id: Optional[str] = None + + align: Optional[Literal["left", "center", "right"]] = None + + children: Optional[List[DocumentWebsiteChildTableCellChild]] = None + + text: Optional[str] = None + + type: Optional[Literal["table_cell"]] = None + + +class DocumentWebsiteChildTableRow(BaseModel): + id: Optional[str] = None + + children: Optional[List[object]] = None + + text: Optional[str] = None + + type: Optional[Literal["table_row"]] = None + + +class DocumentWebsiteChildText(BaseModel): + text: str + + id: Optional[str] = None + + marks: Optional[List[Literal["bold", "italic", "underline", "strikethrough", "code", "math"]]] = None + + type: Optional[Literal["text"]] = None + + +class DocumentWebsiteChildToDoChildBlob(BaseModel): + """Represents embedded binary data using data URI scheme. + + Format: data:[][;base64], + Example: data:text/html;base64,PGh0bWw+... + """ + + data: str + + mimetype: str + + id: Optional[str] = None + + type: Optional[Literal["blob"]] = None + + +class DocumentWebsiteChildToDoChildCode(BaseModel): + text: str + + id: Optional[str] = None + + language: Optional[str] = None + + type: Optional[Literal["code"]] = None + + +class DocumentWebsiteChildToDoChildComment(BaseModel): + text: str + + id: Optional[str] = None + + created_at: Optional[datetime] = None + + type: Optional[Literal["comment"]] = None + + +class DocumentWebsiteChildToDoChildDivider(BaseModel): + id: Optional[str] = None + + type: Optional[Literal["divider"]] = None + + +class DocumentWebsiteChildToDoChildImage(BaseModel): + src: str + + text: str + + id: Optional[str] = None + + type: Optional[Literal["image"]] = None + + +class DocumentWebsiteChildToDoChildLink(BaseModel): + text: str + + url: str + + id: Optional[str] = None + + type: Optional[Literal["link"]] = None + + +class DocumentWebsiteChildToDoChildLineBreak(BaseModel): + id: Optional[str] = None + + type: Optional[Literal["line_break"]] = None + + +class DocumentWebsiteChildToDoChildText(BaseModel): + text: str + + id: Optional[str] = None + + marks: Optional[List[Literal["bold", "italic", "underline", "strikethrough", "code", "math"]]] = None + + type: Optional[Literal["text"]] = None + + +class DocumentWebsiteChildToDoChildToolCall(BaseModel): + """A tool/function call made by the assistant.""" + + tool_call_id: str + + tool_name: str + + id: Optional[str] = None + + args: Optional[Dict[str, object]] = None + + type: Optional[Literal["tool_call"]] = None + + +class DocumentWebsiteChildToDoChildToolResult(BaseModel): + """The result of a tool call.""" + + output: Union[str, Dict[str, object], List[object]] + + tool_call_id: str + + tool_name: str + + id: Optional[str] = None + + is_error: Optional[bool] = None + + type: Optional[Literal["tool_result"]] = None + + +class DocumentWebsiteChildToDoChildTraceMessage(BaseModel): + """A message in an agent trace (user message, assistant message, or thinking).""" + + text: str + + id: Optional[str] = None + + message_type: Optional[Literal["message", "thinking"]] = None + + role: Optional[Literal["user", "assistant"]] = None + + timestamp: Optional[datetime] = None + + type: Optional[Literal["trace_message"]] = None + + +DocumentWebsiteChildToDoChild: TypeAlias = Union[ + DocumentWebsiteChildToDoChildBlob, + DocumentWebsiteChildToDoChildCode, + DocumentWebsiteChildToDoChildComment, + DocumentWebsiteChildToDoChildDivider, + DocumentWebsiteChildToDoChildImage, + DocumentWebsiteChildToDoChildLink, + DocumentWebsiteChildToDoChildLineBreak, + DocumentWebsiteChildToDoChildText, + DocumentWebsiteChildToDoChildToolCall, + DocumentWebsiteChildToDoChildToolResult, + DocumentWebsiteChildToDoChildTraceMessage, + object, +] + + +class DocumentWebsiteChildToDo(BaseModel): + id: Optional[str] = None + + checked: Optional[bool] = None + + children: Optional[List[DocumentWebsiteChildToDoChild]] = None + + text: Optional[str] = None + + type: Optional[Literal["todo"]] = None + + +class DocumentWebsiteChildToolCall(BaseModel): + """A tool/function call made by the assistant.""" + + tool_call_id: str + + tool_name: str + + id: Optional[str] = None + + args: Optional[Dict[str, object]] = None + + type: Optional[Literal["tool_call"]] = None + + +class DocumentWebsiteChildToolResult(BaseModel): + """The result of a tool call.""" + + output: Union[str, Dict[str, object], List[object]] + + tool_call_id: str + + tool_name: str + + id: Optional[str] = None + + is_error: Optional[bool] = None + + type: Optional[Literal["tool_result"]] = None + + +class DocumentWebsiteChildTraceMessage(BaseModel): + """A message in an agent trace (user message, assistant message, or thinking).""" + + text: str + + id: Optional[str] = None + + message_type: Optional[Literal["message", "thinking"]] = None + + role: Optional[Literal["user", "assistant"]] = None + + timestamp: Optional[datetime] = None + + type: Optional[Literal["trace_message"]] = None + + +class DocumentWebsiteChildUtterance(BaseModel): + """A speaker-attributed segment of a transcript (ENG-2476/D10). + + "Utterance" is the standard name for this across transcription providers + (AssemblyAI, Deepgram, Rev). Timestamps are relative offsets in seconds — + provider-native; absolute times derive from `Transcript.started_at`. + """ + + text: str + + id: Optional[str] = None + + end: Optional[float] = None + + speaker: Optional[object] = None + + start: Optional[float] = None + + type: Optional[Literal["utterance"]] = None + + +DocumentWebsiteChild: TypeAlias = Annotated[ + Union[ + DocumentWebsiteChildBlob, + DocumentWebsiteChildCallout, + DocumentWebsiteChildChunk, + DocumentWebsiteChildCode, + DocumentWebsiteChildComment, + DocumentWebsiteChildDivider, + DocumentWebsiteChildEquation, + DocumentWebsiteChildFootnote, + DocumentWebsiteChildHeading, + DocumentWebsiteChildImage, + DocumentWebsiteChildLink, + DocumentWebsiteChildLineBreak, + DocumentWebsiteChildList, + DocumentWebsiteChildListItem, + DocumentWebsiteChildParagraph, + DocumentWebsiteChildQuote, + DocumentWebsiteChildTable, + DocumentWebsiteChildTableCell, + DocumentWebsiteChildTableRow, + DocumentWebsiteChildText, + DocumentWebsiteChildToDo, + DocumentWebsiteChildToolCall, + DocumentWebsiteChildToolResult, + DocumentWebsiteChildTraceMessage, + DocumentWebsiteChildUtterance, + ], + PropertyInfo(discriminator="type"), +] + + +class DocumentWebsite(BaseModel): + url: str + + id: Optional[str] = None + + children: Optional[List[DocumentWebsiteChild]] = None + + description: Optional[str] = None + + favicon: Optional[str] = None + + image_url: Optional[str] = None + + language: Optional[str] = None + + text: Optional[str] = None + + title: Optional[str] = None + + type: Optional[Literal["website"]] = None + + +class DocumentTaskChildBlob(BaseModel): + """Represents embedded binary data using data URI scheme. + + Format: data:[][;base64], + Example: data:text/html;base64,PGh0bWw+... + """ + + data: str + + mimetype: str + + id: Optional[str] = None + + type: Optional[Literal["blob"]] = None + + +class DocumentTaskChildCalloutChildBlob(BaseModel): + """Represents embedded binary data using data URI scheme. + + Format: data:[][;base64], + Example: data:text/html;base64,PGh0bWw+... + """ + + data: str + + mimetype: str + + id: Optional[str] = None + + type: Optional[Literal["blob"]] = None + + +class DocumentTaskChildCalloutChildCode(BaseModel): + text: str + + id: Optional[str] = None + + language: Optional[str] = None + + type: Optional[Literal["code"]] = None + + +class DocumentTaskChildCalloutChildComment(BaseModel): + text: str + + id: Optional[str] = None + + created_at: Optional[datetime] = None + + type: Optional[Literal["comment"]] = None + + +class DocumentTaskChildCalloutChildDivider(BaseModel): + id: Optional[str] = None + + type: Optional[Literal["divider"]] = None + + +class DocumentTaskChildCalloutChildImage(BaseModel): + src: str + + text: str + + id: Optional[str] = None + + type: Optional[Literal["image"]] = None + + +class DocumentTaskChildCalloutChildLink(BaseModel): + text: str + + url: str + + id: Optional[str] = None + + type: Optional[Literal["link"]] = None + + +class DocumentTaskChildCalloutChildLineBreak(BaseModel): + id: Optional[str] = None + + type: Optional[Literal["line_break"]] = None + + +class DocumentTaskChildCalloutChildText(BaseModel): + text: str + + id: Optional[str] = None + + marks: Optional[List[Literal["bold", "italic", "underline", "strikethrough", "code", "math"]]] = None + + type: Optional[Literal["text"]] = None + + +class DocumentTaskChildCalloutChildToolCall(BaseModel): + """A tool/function call made by the assistant.""" + + tool_call_id: str + + tool_name: str + + id: Optional[str] = None + + args: Optional[Dict[str, object]] = None + + type: Optional[Literal["tool_call"]] = None + + +class DocumentTaskChildCalloutChildToolResult(BaseModel): + """The result of a tool call.""" + + output: Union[str, Dict[str, object], List[object]] + + tool_call_id: str + + tool_name: str + + id: Optional[str] = None + + is_error: Optional[bool] = None + + type: Optional[Literal["tool_result"]] = None + + +class DocumentTaskChildCalloutChildTraceMessage(BaseModel): + """A message in an agent trace (user message, assistant message, or thinking).""" + + text: str + + id: Optional[str] = None + + message_type: Optional[Literal["message", "thinking"]] = None + + role: Optional[Literal["user", "assistant"]] = None + + timestamp: Optional[datetime] = None + + type: Optional[Literal["trace_message"]] = None + + +DocumentTaskChildCalloutChild: TypeAlias = Union[ + DocumentTaskChildCalloutChildBlob, + DocumentTaskChildCalloutChildCode, + DocumentTaskChildCalloutChildComment, + DocumentTaskChildCalloutChildDivider, + DocumentTaskChildCalloutChildImage, + DocumentTaskChildCalloutChildLink, + DocumentTaskChildCalloutChildLineBreak, + DocumentTaskChildCalloutChildText, + DocumentTaskChildCalloutChildToolCall, + DocumentTaskChildCalloutChildToolResult, + DocumentTaskChildCalloutChildTraceMessage, + object, +] + + +class DocumentTaskChildCallout(BaseModel): + id: Optional[str] = None + + children: Optional[List[DocumentTaskChildCalloutChild]] = None + + text: Optional[str] = None + + title: Optional[str] = None + + type: Optional[Literal["callout"]] = None + + +class DocumentTaskChildChunkChildBlob(BaseModel): + """Represents embedded binary data using data URI scheme. + + Format: data:[][;base64], + Example: data:text/html;base64,PGh0bWw+... + """ + + data: str + + mimetype: str + + id: Optional[str] = None + + type: Optional[Literal["blob"]] = None + + +class DocumentTaskChildChunkChildCode(BaseModel): + text: str + + id: Optional[str] = None + + language: Optional[str] = None + + type: Optional[Literal["code"]] = None + + +class DocumentTaskChildChunkChildComment(BaseModel): + text: str + + id: Optional[str] = None + + created_at: Optional[datetime] = None + + type: Optional[Literal["comment"]] = None + + +class DocumentTaskChildChunkChildDivider(BaseModel): + id: Optional[str] = None + + type: Optional[Literal["divider"]] = None + + +class DocumentTaskChildChunkChildImage(BaseModel): + src: str + + text: str + + id: Optional[str] = None + + type: Optional[Literal["image"]] = None + + +class DocumentTaskChildChunkChildLink(BaseModel): + text: str + + url: str + + id: Optional[str] = None + + type: Optional[Literal["link"]] = None + + +class DocumentTaskChildChunkChildLineBreak(BaseModel): + id: Optional[str] = None + + type: Optional[Literal["line_break"]] = None + + +class DocumentTaskChildChunkChildText(BaseModel): + text: str + + id: Optional[str] = None + + marks: Optional[List[Literal["bold", "italic", "underline", "strikethrough", "code", "math"]]] = None + + type: Optional[Literal["text"]] = None + + +class DocumentTaskChildChunkChildToolCall(BaseModel): + """A tool/function call made by the assistant.""" + + tool_call_id: str + + tool_name: str + + id: Optional[str] = None + + args: Optional[Dict[str, object]] = None + + type: Optional[Literal["tool_call"]] = None + + +class DocumentTaskChildChunkChildToolResult(BaseModel): + """The result of a tool call.""" + + output: Union[str, Dict[str, object], List[object]] + + tool_call_id: str + + tool_name: str + + id: Optional[str] = None + + is_error: Optional[bool] = None + + type: Optional[Literal["tool_result"]] = None + + +class DocumentTaskChildChunkChildTraceMessage(BaseModel): + """A message in an agent trace (user message, assistant message, or thinking).""" + + text: str + + id: Optional[str] = None + + message_type: Optional[Literal["message", "thinking"]] = None + + role: Optional[Literal["user", "assistant"]] = None + + timestamp: Optional[datetime] = None + + type: Optional[Literal["trace_message"]] = None + + +DocumentTaskChildChunkChild: TypeAlias = Union[ + DocumentTaskChildChunkChildBlob, + DocumentTaskChildChunkChildCode, + DocumentTaskChildChunkChildComment, + DocumentTaskChildChunkChildDivider, + DocumentTaskChildChunkChildImage, + DocumentTaskChildChunkChildLink, + DocumentTaskChildChunkChildLineBreak, + DocumentTaskChildChunkChildText, + DocumentTaskChildChunkChildToolCall, + DocumentTaskChildChunkChildToolResult, + DocumentTaskChildChunkChildTraceMessage, + object, +] + + +class DocumentTaskChildChunk(BaseModel): + id: Optional[str] = None + + children: Optional[List[DocumentTaskChildChunkChild]] = None + + text: Optional[str] = None + + type: Optional[Literal["chunk"]] = None + + +class DocumentTaskChildCode(BaseModel): + text: str + + id: Optional[str] = None + + language: Optional[str] = None + + type: Optional[Literal["code"]] = None + + +class DocumentTaskChildComment(BaseModel): + text: str + + id: Optional[str] = None + + created_at: Optional[datetime] = None + + type: Optional[Literal["comment"]] = None + + +class DocumentTaskChildDivider(BaseModel): + id: Optional[str] = None + + type: Optional[Literal["divider"]] = None + + +class DocumentTaskChildEquationChildBlob(BaseModel): + """Represents embedded binary data using data URI scheme. + + Format: data:[][;base64], + Example: data:text/html;base64,PGh0bWw+... + """ + + data: str + + mimetype: str + + id: Optional[str] = None + + type: Optional[Literal["blob"]] = None + + +class DocumentTaskChildEquationChildCode(BaseModel): + text: str + + id: Optional[str] = None + + language: Optional[str] = None + + type: Optional[Literal["code"]] = None + + +class DocumentTaskChildEquationChildComment(BaseModel): + text: str + + id: Optional[str] = None + + created_at: Optional[datetime] = None + + type: Optional[Literal["comment"]] = None + + +class DocumentTaskChildEquationChildDivider(BaseModel): + id: Optional[str] = None + + type: Optional[Literal["divider"]] = None + + +class DocumentTaskChildEquationChildImage(BaseModel): + src: str + + text: str + + id: Optional[str] = None + + type: Optional[Literal["image"]] = None + + +class DocumentTaskChildEquationChildLink(BaseModel): + text: str + + url: str + + id: Optional[str] = None + + type: Optional[Literal["link"]] = None + + +class DocumentTaskChildEquationChildLineBreak(BaseModel): + id: Optional[str] = None + + type: Optional[Literal["line_break"]] = None + + +class DocumentTaskChildEquationChildText(BaseModel): + text: str + + id: Optional[str] = None + + marks: Optional[List[Literal["bold", "italic", "underline", "strikethrough", "code", "math"]]] = None + + type: Optional[Literal["text"]] = None + + +class DocumentTaskChildEquationChildToolCall(BaseModel): + """A tool/function call made by the assistant.""" + + tool_call_id: str + + tool_name: str + + id: Optional[str] = None + + args: Optional[Dict[str, object]] = None + + type: Optional[Literal["tool_call"]] = None + + +class DocumentTaskChildEquationChildToolResult(BaseModel): + """The result of a tool call.""" + + output: Union[str, Dict[str, object], List[object]] + + tool_call_id: str + + tool_name: str + + id: Optional[str] = None + + is_error: Optional[bool] = None + + type: Optional[Literal["tool_result"]] = None + + +class DocumentTaskChildEquationChildTraceMessage(BaseModel): + """A message in an agent trace (user message, assistant message, or thinking).""" + + text: str + + id: Optional[str] = None + + message_type: Optional[Literal["message", "thinking"]] = None + + role: Optional[Literal["user", "assistant"]] = None + + timestamp: Optional[datetime] = None + + type: Optional[Literal["trace_message"]] = None + + +DocumentTaskChildEquationChild: TypeAlias = Union[ + DocumentTaskChildEquationChildBlob, + DocumentTaskChildEquationChildCode, + DocumentTaskChildEquationChildComment, + DocumentTaskChildEquationChildDivider, + DocumentTaskChildEquationChildImage, + DocumentTaskChildEquationChildLink, + DocumentTaskChildEquationChildLineBreak, + DocumentTaskChildEquationChildText, + DocumentTaskChildEquationChildToolCall, + DocumentTaskChildEquationChildToolResult, + DocumentTaskChildEquationChildTraceMessage, + object, +] + + +class DocumentTaskChildEquation(BaseModel): + id: Optional[str] = None + + children: Optional[List[DocumentTaskChildEquationChild]] = None + + text: Optional[str] = None + + type: Optional[Literal["equation"]] = None + + +class DocumentTaskChildFootnoteChildBlob(BaseModel): + """Represents embedded binary data using data URI scheme. + + Format: data:[][;base64], + Example: data:text/html;base64,PGh0bWw+... + """ + + data: str + + mimetype: str + + id: Optional[str] = None + + type: Optional[Literal["blob"]] = None + + +class DocumentTaskChildFootnoteChildCode(BaseModel): + text: str + + id: Optional[str] = None + + language: Optional[str] = None + + type: Optional[Literal["code"]] = None + + +class DocumentTaskChildFootnoteChildComment(BaseModel): + text: str + + id: Optional[str] = None + + created_at: Optional[datetime] = None + + type: Optional[Literal["comment"]] = None + + +class DocumentTaskChildFootnoteChildDivider(BaseModel): + id: Optional[str] = None + + type: Optional[Literal["divider"]] = None + + +class DocumentTaskChildFootnoteChildImage(BaseModel): + src: str + + text: str + + id: Optional[str] = None + + type: Optional[Literal["image"]] = None + + +class DocumentTaskChildFootnoteChildLink(BaseModel): + text: str + + url: str + + id: Optional[str] = None + + type: Optional[Literal["link"]] = None + + +class DocumentTaskChildFootnoteChildLineBreak(BaseModel): + id: Optional[str] = None + + type: Optional[Literal["line_break"]] = None + + +class DocumentTaskChildFootnoteChildText(BaseModel): + text: str + + id: Optional[str] = None + + marks: Optional[List[Literal["bold", "italic", "underline", "strikethrough", "code", "math"]]] = None + + type: Optional[Literal["text"]] = None + + +class DocumentTaskChildFootnoteChildToolCall(BaseModel): + """A tool/function call made by the assistant.""" + + tool_call_id: str + + tool_name: str + + id: Optional[str] = None + + args: Optional[Dict[str, object]] = None + + type: Optional[Literal["tool_call"]] = None + + +class DocumentTaskChildFootnoteChildToolResult(BaseModel): + """The result of a tool call.""" + + output: Union[str, Dict[str, object], List[object]] + + tool_call_id: str + + tool_name: str + + id: Optional[str] = None + + is_error: Optional[bool] = None + + type: Optional[Literal["tool_result"]] = None + + +class DocumentTaskChildFootnoteChildTraceMessage(BaseModel): + """A message in an agent trace (user message, assistant message, or thinking).""" + + text: str + + id: Optional[str] = None + + message_type: Optional[Literal["message", "thinking"]] = None + + role: Optional[Literal["user", "assistant"]] = None + + timestamp: Optional[datetime] = None + + type: Optional[Literal["trace_message"]] = None + + +DocumentTaskChildFootnoteChild: TypeAlias = Union[ + DocumentTaskChildFootnoteChildBlob, + DocumentTaskChildFootnoteChildCode, + DocumentTaskChildFootnoteChildComment, + DocumentTaskChildFootnoteChildDivider, + DocumentTaskChildFootnoteChildImage, + DocumentTaskChildFootnoteChildLink, + DocumentTaskChildFootnoteChildLineBreak, + DocumentTaskChildFootnoteChildText, + DocumentTaskChildFootnoteChildToolCall, + DocumentTaskChildFootnoteChildToolResult, + DocumentTaskChildFootnoteChildTraceMessage, + object, +] + + +class DocumentTaskChildFootnote(BaseModel): + id: Optional[str] = None + + children: Optional[List[DocumentTaskChildFootnoteChild]] = None + + text: Optional[str] = None + + type: Optional[Literal["footnote"]] = None + + +class DocumentTaskChildHeadingChildBlob(BaseModel): + """Represents embedded binary data using data URI scheme. + + Format: data:[][;base64], + Example: data:text/html;base64,PGh0bWw+... + """ + + data: str + + mimetype: str + + id: Optional[str] = None + + type: Optional[Literal["blob"]] = None + + +class DocumentTaskChildHeadingChildCode(BaseModel): + text: str + + id: Optional[str] = None + + language: Optional[str] = None + + type: Optional[Literal["code"]] = None + + +class DocumentTaskChildHeadingChildComment(BaseModel): + text: str + + id: Optional[str] = None + + created_at: Optional[datetime] = None + + type: Optional[Literal["comment"]] = None + + +class DocumentTaskChildHeadingChildDivider(BaseModel): + id: Optional[str] = None + + type: Optional[Literal["divider"]] = None + + +class DocumentTaskChildHeadingChildImage(BaseModel): + src: str + + text: str + + id: Optional[str] = None + + type: Optional[Literal["image"]] = None + + +class DocumentTaskChildHeadingChildLink(BaseModel): + text: str + + url: str + + id: Optional[str] = None + + type: Optional[Literal["link"]] = None + + +class DocumentTaskChildHeadingChildLineBreak(BaseModel): + id: Optional[str] = None + + type: Optional[Literal["line_break"]] = None + + +class DocumentTaskChildHeadingChildText(BaseModel): + text: str + + id: Optional[str] = None + + marks: Optional[List[Literal["bold", "italic", "underline", "strikethrough", "code", "math"]]] = None + + type: Optional[Literal["text"]] = None + + +class DocumentTaskChildHeadingChildToolCall(BaseModel): + """A tool/function call made by the assistant.""" + + tool_call_id: str + + tool_name: str + + id: Optional[str] = None + + args: Optional[Dict[str, object]] = None + + type: Optional[Literal["tool_call"]] = None + + +class DocumentTaskChildHeadingChildToolResult(BaseModel): + """The result of a tool call.""" + + output: Union[str, Dict[str, object], List[object]] + + tool_call_id: str + + tool_name: str + + id: Optional[str] = None + + is_error: Optional[bool] = None + + type: Optional[Literal["tool_result"]] = None + + +class DocumentTaskChildHeadingChildTraceMessage(BaseModel): + """A message in an agent trace (user message, assistant message, or thinking).""" + + text: str + + id: Optional[str] = None + + message_type: Optional[Literal["message", "thinking"]] = None + + role: Optional[Literal["user", "assistant"]] = None + + timestamp: Optional[datetime] = None + + type: Optional[Literal["trace_message"]] = None + + +DocumentTaskChildHeadingChild: TypeAlias = Union[ + DocumentTaskChildHeadingChildBlob, + DocumentTaskChildHeadingChildCode, + DocumentTaskChildHeadingChildComment, + DocumentTaskChildHeadingChildDivider, + DocumentTaskChildHeadingChildImage, + DocumentTaskChildHeadingChildLink, + DocumentTaskChildHeadingChildLineBreak, + DocumentTaskChildHeadingChildText, + DocumentTaskChildHeadingChildToolCall, + DocumentTaskChildHeadingChildToolResult, + DocumentTaskChildHeadingChildTraceMessage, + object, +] + + +class DocumentTaskChildHeading(BaseModel): + level: int + + id: Optional[str] = None + + children: Optional[List[DocumentTaskChildHeadingChild]] = None + + text: Optional[str] = None + + type: Optional[Literal["heading"]] = None + + +class DocumentTaskChildImage(BaseModel): + src: str + + text: str + + id: Optional[str] = None + + type: Optional[Literal["image"]] = None + + +class DocumentTaskChildLink(BaseModel): + text: str + + url: str + + id: Optional[str] = None + + type: Optional[Literal["link"]] = None + + +class DocumentTaskChildLineBreak(BaseModel): + id: Optional[str] = None + + type: Optional[Literal["line_break"]] = None + + +class DocumentTaskChildList(BaseModel): + id: Optional[str] = None + + children: Optional[List[object]] = None + + ordered: Optional[bool] = None + + text: Optional[str] = None + + type: Optional[Literal["list"]] = None + + +class DocumentTaskChildListItemChildBlob(BaseModel): + """Represents embedded binary data using data URI scheme. + + Format: data:[][;base64], + Example: data:text/html;base64,PGh0bWw+... + """ + + data: str + + mimetype: str + + id: Optional[str] = None + + type: Optional[Literal["blob"]] = None + + +class DocumentTaskChildListItemChildCode(BaseModel): + text: str + + id: Optional[str] = None + + language: Optional[str] = None + + type: Optional[Literal["code"]] = None + + +class DocumentTaskChildListItemChildComment(BaseModel): + text: str + + id: Optional[str] = None + + created_at: Optional[datetime] = None + + type: Optional[Literal["comment"]] = None + + +class DocumentTaskChildListItemChildDivider(BaseModel): + id: Optional[str] = None + + type: Optional[Literal["divider"]] = None + + +class DocumentTaskChildListItemChildImage(BaseModel): + src: str + + text: str + + id: Optional[str] = None + + type: Optional[Literal["image"]] = None + + +class DocumentTaskChildListItemChildLink(BaseModel): + text: str + + url: str + + id: Optional[str] = None + + type: Optional[Literal["link"]] = None + + +class DocumentTaskChildListItemChildLineBreak(BaseModel): + id: Optional[str] = None + + type: Optional[Literal["line_break"]] = None + + +class DocumentTaskChildListItemChildText(BaseModel): + text: str + + id: Optional[str] = None + + marks: Optional[List[Literal["bold", "italic", "underline", "strikethrough", "code", "math"]]] = None + + type: Optional[Literal["text"]] = None + + +class DocumentTaskChildListItemChildToolCall(BaseModel): + """A tool/function call made by the assistant.""" + + tool_call_id: str + + tool_name: str + + id: Optional[str] = None + + args: Optional[Dict[str, object]] = None + + type: Optional[Literal["tool_call"]] = None + + +class DocumentTaskChildListItemChildToolResult(BaseModel): + """The result of a tool call.""" + + output: Union[str, Dict[str, object], List[object]] + + tool_call_id: str + + tool_name: str + + id: Optional[str] = None + + is_error: Optional[bool] = None + + type: Optional[Literal["tool_result"]] = None + + +class DocumentTaskChildListItemChildTraceMessage(BaseModel): + """A message in an agent trace (user message, assistant message, or thinking).""" + + text: str + + id: Optional[str] = None + + message_type: Optional[Literal["message", "thinking"]] = None + + role: Optional[Literal["user", "assistant"]] = None + + timestamp: Optional[datetime] = None + + type: Optional[Literal["trace_message"]] = None + + +DocumentTaskChildListItemChild: TypeAlias = Union[ + DocumentTaskChildListItemChildBlob, + DocumentTaskChildListItemChildCode, + DocumentTaskChildListItemChildComment, + DocumentTaskChildListItemChildDivider, + DocumentTaskChildListItemChildImage, + DocumentTaskChildListItemChildLink, + DocumentTaskChildListItemChildLineBreak, + DocumentTaskChildListItemChildText, + DocumentTaskChildListItemChildToolCall, + DocumentTaskChildListItemChildToolResult, + DocumentTaskChildListItemChildTraceMessage, + object, +] + + +class DocumentTaskChildListItem(BaseModel): + id: Optional[str] = None + + children: Optional[List[DocumentTaskChildListItemChild]] = None + + text: Optional[str] = None + + type: Optional[Literal["list_item"]] = None + + +class DocumentTaskChildParagraphChildBlob(BaseModel): + """Represents embedded binary data using data URI scheme. + + Format: data:[][;base64], + Example: data:text/html;base64,PGh0bWw+... + """ + + data: str + + mimetype: str + + id: Optional[str] = None + + type: Optional[Literal["blob"]] = None + + +class DocumentTaskChildParagraphChildCode(BaseModel): + text: str + + id: Optional[str] = None + + language: Optional[str] = None + + type: Optional[Literal["code"]] = None + + +class DocumentTaskChildParagraphChildComment(BaseModel): + text: str + + id: Optional[str] = None + + created_at: Optional[datetime] = None + + type: Optional[Literal["comment"]] = None + + +class DocumentTaskChildParagraphChildDivider(BaseModel): + id: Optional[str] = None + + type: Optional[Literal["divider"]] = None + + +class DocumentTaskChildParagraphChildImage(BaseModel): + src: str + + text: str + + id: Optional[str] = None + + type: Optional[Literal["image"]] = None + + +class DocumentTaskChildParagraphChildLink(BaseModel): + text: str + + url: str + + id: Optional[str] = None + + type: Optional[Literal["link"]] = None + + +class DocumentTaskChildParagraphChildLineBreak(BaseModel): + id: Optional[str] = None + + type: Optional[Literal["line_break"]] = None + + +class DocumentTaskChildParagraphChildText(BaseModel): + text: str + + id: Optional[str] = None + + marks: Optional[List[Literal["bold", "italic", "underline", "strikethrough", "code", "math"]]] = None + + type: Optional[Literal["text"]] = None + + +class DocumentTaskChildParagraphChildToolCall(BaseModel): + """A tool/function call made by the assistant.""" + + tool_call_id: str + + tool_name: str + + id: Optional[str] = None + + args: Optional[Dict[str, object]] = None + + type: Optional[Literal["tool_call"]] = None + + +class DocumentTaskChildParagraphChildToolResult(BaseModel): + """The result of a tool call.""" + + output: Union[str, Dict[str, object], List[object]] + + tool_call_id: str + + tool_name: str + + id: Optional[str] = None + + is_error: Optional[bool] = None + + type: Optional[Literal["tool_result"]] = None + + +class DocumentTaskChildParagraphChildTraceMessage(BaseModel): + """A message in an agent trace (user message, assistant message, or thinking).""" + + text: str + + id: Optional[str] = None + + message_type: Optional[Literal["message", "thinking"]] = None + + role: Optional[Literal["user", "assistant"]] = None + + timestamp: Optional[datetime] = None + + type: Optional[Literal["trace_message"]] = None + + +DocumentTaskChildParagraphChild: TypeAlias = Union[ + DocumentTaskChildParagraphChildBlob, + DocumentTaskChildParagraphChildCode, + DocumentTaskChildParagraphChildComment, + DocumentTaskChildParagraphChildDivider, + DocumentTaskChildParagraphChildImage, + DocumentTaskChildParagraphChildLink, + DocumentTaskChildParagraphChildLineBreak, + DocumentTaskChildParagraphChildText, + DocumentTaskChildParagraphChildToolCall, + DocumentTaskChildParagraphChildToolResult, + DocumentTaskChildParagraphChildTraceMessage, + object, +] + + +class DocumentTaskChildParagraph(BaseModel): + id: Optional[str] = None + + children: Optional[List[DocumentTaskChildParagraphChild]] = None + + text: Optional[str] = None + + type: Optional[Literal["paragraph"]] = None + + +class DocumentTaskChildQuoteChildBlob(BaseModel): + """Represents embedded binary data using data URI scheme. + + Format: data:[][;base64], + Example: data:text/html;base64,PGh0bWw+... + """ + + data: str + + mimetype: str + + id: Optional[str] = None + + type: Optional[Literal["blob"]] = None + + +class DocumentTaskChildQuoteChildCode(BaseModel): + text: str + + id: Optional[str] = None + + language: Optional[str] = None + + type: Optional[Literal["code"]] = None + + +class DocumentTaskChildQuoteChildComment(BaseModel): + text: str + + id: Optional[str] = None + + created_at: Optional[datetime] = None + + type: Optional[Literal["comment"]] = None + + +class DocumentTaskChildQuoteChildDivider(BaseModel): + id: Optional[str] = None + + type: Optional[Literal["divider"]] = None + + +class DocumentTaskChildQuoteChildImage(BaseModel): + src: str + + text: str + + id: Optional[str] = None + + type: Optional[Literal["image"]] = None + + +class DocumentTaskChildQuoteChildLink(BaseModel): + text: str + + url: str + + id: Optional[str] = None + + type: Optional[Literal["link"]] = None + + +class DocumentTaskChildQuoteChildLineBreak(BaseModel): + id: Optional[str] = None + + type: Optional[Literal["line_break"]] = None + + +class DocumentTaskChildQuoteChildText(BaseModel): + text: str + + id: Optional[str] = None + + marks: Optional[List[Literal["bold", "italic", "underline", "strikethrough", "code", "math"]]] = None + + type: Optional[Literal["text"]] = None + + +class DocumentTaskChildQuoteChildToolCall(BaseModel): + """A tool/function call made by the assistant.""" + + tool_call_id: str + + tool_name: str + + id: Optional[str] = None + + args: Optional[Dict[str, object]] = None + + type: Optional[Literal["tool_call"]] = None + + +class DocumentTaskChildQuoteChildToolResult(BaseModel): + """The result of a tool call.""" + + output: Union[str, Dict[str, object], List[object]] + + tool_call_id: str + + tool_name: str + + id: Optional[str] = None + + is_error: Optional[bool] = None + + type: Optional[Literal["tool_result"]] = None + + +class DocumentTaskChildQuoteChildTraceMessage(BaseModel): + """A message in an agent trace (user message, assistant message, or thinking).""" + + text: str + + id: Optional[str] = None + + message_type: Optional[Literal["message", "thinking"]] = None + + role: Optional[Literal["user", "assistant"]] = None + + timestamp: Optional[datetime] = None + + type: Optional[Literal["trace_message"]] = None + + +DocumentTaskChildQuoteChild: TypeAlias = Union[ + DocumentTaskChildQuoteChildBlob, + DocumentTaskChildQuoteChildCode, + DocumentTaskChildQuoteChildComment, + DocumentTaskChildQuoteChildDivider, + DocumentTaskChildQuoteChildImage, + DocumentTaskChildQuoteChildLink, + DocumentTaskChildQuoteChildLineBreak, + DocumentTaskChildQuoteChildText, + DocumentTaskChildQuoteChildToolCall, + DocumentTaskChildQuoteChildToolResult, + DocumentTaskChildQuoteChildTraceMessage, + object, +] + + +class DocumentTaskChildQuote(BaseModel): + id: Optional[str] = None + + children: Optional[List[DocumentTaskChildQuoteChild]] = None + + text: Optional[str] = None + + type: Optional[Literal["quote"]] = None + + +class DocumentTaskChildTable(BaseModel): + id: Optional[str] = None + + children: Optional[List[object]] = None + + has_header: Optional[bool] = None + """Whether the first row should be treated as a header""" + + text: Optional[str] = None + + type: Optional[Literal["table"]] = None + + +class DocumentTaskChildTableCellChildBlob(BaseModel): + """Represents embedded binary data using data URI scheme. + + Format: data:[][;base64], + Example: data:text/html;base64,PGh0bWw+... + """ + + data: str + + mimetype: str + + id: Optional[str] = None + + type: Optional[Literal["blob"]] = None + + +class DocumentTaskChildTableCellChildCode(BaseModel): + text: str + + id: Optional[str] = None + + language: Optional[str] = None + + type: Optional[Literal["code"]] = None + + +class DocumentTaskChildTableCellChildComment(BaseModel): + text: str + + id: Optional[str] = None + + created_at: Optional[datetime] = None + + type: Optional[Literal["comment"]] = None + + +class DocumentTaskChildTableCellChildDivider(BaseModel): + id: Optional[str] = None + + type: Optional[Literal["divider"]] = None + + +class DocumentTaskChildTableCellChildImage(BaseModel): + src: str + + text: str + + id: Optional[str] = None + + type: Optional[Literal["image"]] = None + + +class DocumentTaskChildTableCellChildLink(BaseModel): + text: str + + url: str + + id: Optional[str] = None + + type: Optional[Literal["link"]] = None + + +class DocumentTaskChildTableCellChildLineBreak(BaseModel): + id: Optional[str] = None + + type: Optional[Literal["line_break"]] = None + + +class DocumentTaskChildTableCellChildText(BaseModel): + text: str + + id: Optional[str] = None + + marks: Optional[List[Literal["bold", "italic", "underline", "strikethrough", "code", "math"]]] = None + + type: Optional[Literal["text"]] = None + + +class DocumentTaskChildTableCellChildToolCall(BaseModel): + """A tool/function call made by the assistant.""" + + tool_call_id: str + + tool_name: str + + id: Optional[str] = None + + args: Optional[Dict[str, object]] = None + + type: Optional[Literal["tool_call"]] = None + + +class DocumentTaskChildTableCellChildToolResult(BaseModel): + """The result of a tool call.""" + + output: Union[str, Dict[str, object], List[object]] + + tool_call_id: str + + tool_name: str + + id: Optional[str] = None + + is_error: Optional[bool] = None + + type: Optional[Literal["tool_result"]] = None + + +class DocumentTaskChildTableCellChildTraceMessage(BaseModel): + """A message in an agent trace (user message, assistant message, or thinking).""" + + text: str + + id: Optional[str] = None + + message_type: Optional[Literal["message", "thinking"]] = None + + role: Optional[Literal["user", "assistant"]] = None + + timestamp: Optional[datetime] = None + + type: Optional[Literal["trace_message"]] = None + + +DocumentTaskChildTableCellChild: TypeAlias = Union[ + DocumentTaskChildTableCellChildBlob, + DocumentTaskChildTableCellChildCode, + DocumentTaskChildTableCellChildComment, + DocumentTaskChildTableCellChildDivider, + DocumentTaskChildTableCellChildImage, + DocumentTaskChildTableCellChildLink, + DocumentTaskChildTableCellChildLineBreak, + DocumentTaskChildTableCellChildText, + DocumentTaskChildTableCellChildToolCall, + DocumentTaskChildTableCellChildToolResult, + DocumentTaskChildTableCellChildTraceMessage, + object, +] + + +class DocumentTaskChildTableCell(BaseModel): + id: Optional[str] = None + + align: Optional[Literal["left", "center", "right"]] = None + + children: Optional[List[DocumentTaskChildTableCellChild]] = None + + text: Optional[str] = None + + type: Optional[Literal["table_cell"]] = None + + +class DocumentTaskChildTableRow(BaseModel): + id: Optional[str] = None + + children: Optional[List[object]] = None + + text: Optional[str] = None + + type: Optional[Literal["table_row"]] = None + + +class DocumentTaskChildText(BaseModel): + text: str + + id: Optional[str] = None + + marks: Optional[List[Literal["bold", "italic", "underline", "strikethrough", "code", "math"]]] = None + + type: Optional[Literal["text"]] = None + + +class DocumentTaskChildToDoChildBlob(BaseModel): + """Represents embedded binary data using data URI scheme. + + Format: data:[][;base64], + Example: data:text/html;base64,PGh0bWw+... + """ + + data: str + + mimetype: str + + id: Optional[str] = None + + type: Optional[Literal["blob"]] = None + + +class DocumentTaskChildToDoChildCode(BaseModel): + text: str + + id: Optional[str] = None + + language: Optional[str] = None + + type: Optional[Literal["code"]] = None + + +class DocumentTaskChildToDoChildComment(BaseModel): + text: str + + id: Optional[str] = None + + created_at: Optional[datetime] = None + + type: Optional[Literal["comment"]] = None + + +class DocumentTaskChildToDoChildDivider(BaseModel): + id: Optional[str] = None + + type: Optional[Literal["divider"]] = None + + +class DocumentTaskChildToDoChildImage(BaseModel): + src: str + + text: str + + id: Optional[str] = None + + type: Optional[Literal["image"]] = None + + +class DocumentTaskChildToDoChildLink(BaseModel): + text: str + + url: str + + id: Optional[str] = None + + type: Optional[Literal["link"]] = None + + +class DocumentTaskChildToDoChildLineBreak(BaseModel): + id: Optional[str] = None + + type: Optional[Literal["line_break"]] = None + + +class DocumentTaskChildToDoChildText(BaseModel): + text: str + + id: Optional[str] = None + + marks: Optional[List[Literal["bold", "italic", "underline", "strikethrough", "code", "math"]]] = None + + type: Optional[Literal["text"]] = None + + +class DocumentTaskChildToDoChildToolCall(BaseModel): + """A tool/function call made by the assistant.""" + + tool_call_id: str + + tool_name: str + + id: Optional[str] = None + + args: Optional[Dict[str, object]] = None + + type: Optional[Literal["tool_call"]] = None + + +class DocumentTaskChildToDoChildToolResult(BaseModel): + """The result of a tool call.""" + + output: Union[str, Dict[str, object], List[object]] + + tool_call_id: str + + tool_name: str + + id: Optional[str] = None + + is_error: Optional[bool] = None + + type: Optional[Literal["tool_result"]] = None + + +class DocumentTaskChildToDoChildTraceMessage(BaseModel): + """A message in an agent trace (user message, assistant message, or thinking).""" + + text: str + + id: Optional[str] = None + + message_type: Optional[Literal["message", "thinking"]] = None + + role: Optional[Literal["user", "assistant"]] = None + + timestamp: Optional[datetime] = None + + type: Optional[Literal["trace_message"]] = None + + +DocumentTaskChildToDoChild: TypeAlias = Union[ + DocumentTaskChildToDoChildBlob, + DocumentTaskChildToDoChildCode, + DocumentTaskChildToDoChildComment, + DocumentTaskChildToDoChildDivider, + DocumentTaskChildToDoChildImage, + DocumentTaskChildToDoChildLink, + DocumentTaskChildToDoChildLineBreak, + DocumentTaskChildToDoChildText, + DocumentTaskChildToDoChildToolCall, + DocumentTaskChildToDoChildToolResult, + DocumentTaskChildToDoChildTraceMessage, + object, +] + + +class DocumentTaskChildToDo(BaseModel): + id: Optional[str] = None + + checked: Optional[bool] = None + + children: Optional[List[DocumentTaskChildToDoChild]] = None + + text: Optional[str] = None + + type: Optional[Literal["todo"]] = None + + +class DocumentTaskChildToolCall(BaseModel): + """A tool/function call made by the assistant.""" + + tool_call_id: str + + tool_name: str + + id: Optional[str] = None + + args: Optional[Dict[str, object]] = None + + type: Optional[Literal["tool_call"]] = None + + +class DocumentTaskChildToolResult(BaseModel): + """The result of a tool call.""" + + output: Union[str, Dict[str, object], List[object]] + + tool_call_id: str + + tool_name: str + + id: Optional[str] = None + + is_error: Optional[bool] = None + + type: Optional[Literal["tool_result"]] = None + + +class DocumentTaskChildTraceMessage(BaseModel): + """A message in an agent trace (user message, assistant message, or thinking).""" + + text: str + + id: Optional[str] = None + + message_type: Optional[Literal["message", "thinking"]] = None + + role: Optional[Literal["user", "assistant"]] = None + + timestamp: Optional[datetime] = None + + type: Optional[Literal["trace_message"]] = None + + +class DocumentTaskChildUtterance(BaseModel): + """A speaker-attributed segment of a transcript (ENG-2476/D10). + + "Utterance" is the standard name for this across transcription providers + (AssemblyAI, Deepgram, Rev). Timestamps are relative offsets in seconds — + provider-native; absolute times derive from `Transcript.started_at`. + """ + + text: str + + id: Optional[str] = None + + end: Optional[float] = None + + speaker: Optional[object] = None + + start: Optional[float] = None + + type: Optional[Literal["utterance"]] = None + + +DocumentTaskChild: TypeAlias = Annotated[ + Union[ + DocumentTaskChildBlob, + DocumentTaskChildCallout, + DocumentTaskChildChunk, + DocumentTaskChildCode, + DocumentTaskChildComment, + DocumentTaskChildDivider, + DocumentTaskChildEquation, + DocumentTaskChildFootnote, + DocumentTaskChildHeading, + DocumentTaskChildImage, + DocumentTaskChildLink, + DocumentTaskChildLineBreak, + DocumentTaskChildList, + DocumentTaskChildListItem, + DocumentTaskChildParagraph, + DocumentTaskChildQuote, + DocumentTaskChildTable, + DocumentTaskChildTableCell, + DocumentTaskChildTableRow, + DocumentTaskChildText, + DocumentTaskChildToDo, + DocumentTaskChildToolCall, + DocumentTaskChildToolResult, + DocumentTaskChildTraceMessage, + DocumentTaskChildUtterance, + ], + PropertyInfo(discriminator="type"), +] + + +class DocumentTaskCommentSenderChildBlob(BaseModel): + """Represents embedded binary data using data URI scheme. + + Format: data:[][;base64], + Example: data:text/html;base64,PGh0bWw+... + """ + + data: str + + mimetype: str + + id: Optional[str] = None + + type: Optional[Literal["blob"]] = None + + +class DocumentTaskCommentSenderChildCode(BaseModel): + text: str + + id: Optional[str] = None + + language: Optional[str] = None + + type: Optional[Literal["code"]] = None + + +class DocumentTaskCommentSenderChildComment(BaseModel): + text: str + + id: Optional[str] = None + + created_at: Optional[datetime] = None + + type: Optional[Literal["comment"]] = None + + +class DocumentTaskCommentSenderChildDivider(BaseModel): + id: Optional[str] = None + + type: Optional[Literal["divider"]] = None + + +class DocumentTaskCommentSenderChildImage(BaseModel): + src: str + + text: str + + id: Optional[str] = None + + type: Optional[Literal["image"]] = None + + +class DocumentTaskCommentSenderChildLink(BaseModel): + text: str + + url: str + + id: Optional[str] = None + + type: Optional[Literal["link"]] = None + + +class DocumentTaskCommentSenderChildLineBreak(BaseModel): + id: Optional[str] = None + + type: Optional[Literal["line_break"]] = None + + +class DocumentTaskCommentSenderChildText(BaseModel): + text: str + + id: Optional[str] = None + + marks: Optional[List[Literal["bold", "italic", "underline", "strikethrough", "code", "math"]]] = None + + type: Optional[Literal["text"]] = None + + +class DocumentTaskCommentSenderChildToolCall(BaseModel): + """A tool/function call made by the assistant.""" + + tool_call_id: str + + tool_name: str + + id: Optional[str] = None + + args: Optional[Dict[str, object]] = None + + type: Optional[Literal["tool_call"]] = None + + +class DocumentTaskCommentSenderChildToolResult(BaseModel): + """The result of a tool call.""" + + output: Union[str, Dict[str, object], List[object]] + + tool_call_id: str + + tool_name: str + + id: Optional[str] = None + + is_error: Optional[bool] = None + + type: Optional[Literal["tool_result"]] = None + + +class DocumentTaskCommentSenderChildTraceMessage(BaseModel): + """A message in an agent trace (user message, assistant message, or thinking).""" + + text: str + + id: Optional[str] = None + + message_type: Optional[Literal["message", "thinking"]] = None + + role: Optional[Literal["user", "assistant"]] = None + + timestamp: Optional[datetime] = None + + type: Optional[Literal["trace_message"]] = None + + +DocumentTaskCommentSenderChild: TypeAlias = Union[ + DocumentTaskCommentSenderChildBlob, + DocumentTaskCommentSenderChildCode, + DocumentTaskCommentSenderChildComment, + DocumentTaskCommentSenderChildDivider, + DocumentTaskCommentSenderChildImage, + DocumentTaskCommentSenderChildLink, + DocumentTaskCommentSenderChildLineBreak, + DocumentTaskCommentSenderChildText, + DocumentTaskCommentSenderChildToolCall, + DocumentTaskCommentSenderChildToolResult, + DocumentTaskCommentSenderChildTraceMessage, + object, +] + + +class DocumentTaskCommentSender(BaseModel): + id: Optional[str] = None + + address: Optional[str] = None + + alt_names: Optional[List[str]] = None + + children: Optional[List[DocumentTaskCommentSenderChild]] = None + + company: Optional[str] = None + + company_ids: Optional[List[str]] = None + + date_of_birth: Optional[date] = None + + deal_ids: Optional[List[str]] = None + + email: Optional[str] = None + + emails: Optional[List[str]] = None + """All known email addresses; `email` holds the primary one""" + + image_url: Optional[str] = None + + job_title: Optional[str] = None + + link_urls: Optional[List[str]] = None + + name: Optional[str] = None + + phone_numbers: Optional[List[str]] = None + + tags: Optional[List[str]] = None + + text: Optional[str] = None + + type: Optional[Literal["person"]] = None + + username: Optional[str] = None + + +class DocumentTaskCommentChildBlob(BaseModel): + """Represents embedded binary data using data URI scheme. + + Format: data:[][;base64], + Example: data:text/html;base64,PGh0bWw+... + """ + + data: str + + mimetype: str + + id: Optional[str] = None + + type: Optional[Literal["blob"]] = None + + +class DocumentTaskCommentChildCalloutChildBlob(BaseModel): + """Represents embedded binary data using data URI scheme. + + Format: data:[][;base64], + Example: data:text/html;base64,PGh0bWw+... + """ + + data: str + + mimetype: str + + id: Optional[str] = None + + type: Optional[Literal["blob"]] = None + + +class DocumentTaskCommentChildCalloutChildCode(BaseModel): + text: str + + id: Optional[str] = None + + language: Optional[str] = None + + type: Optional[Literal["code"]] = None + + +class DocumentTaskCommentChildCalloutChildComment(BaseModel): + text: str + + id: Optional[str] = None + + created_at: Optional[datetime] = None + + type: Optional[Literal["comment"]] = None + + +class DocumentTaskCommentChildCalloutChildDivider(BaseModel): + id: Optional[str] = None + + type: Optional[Literal["divider"]] = None + + +class DocumentTaskCommentChildCalloutChildImage(BaseModel): + src: str + + text: str + + id: Optional[str] = None + + type: Optional[Literal["image"]] = None + + +class DocumentTaskCommentChildCalloutChildLink(BaseModel): + text: str + + url: str + + id: Optional[str] = None + + type: Optional[Literal["link"]] = None + + +class DocumentTaskCommentChildCalloutChildLineBreak(BaseModel): + id: Optional[str] = None + + type: Optional[Literal["line_break"]] = None + + +class DocumentTaskCommentChildCalloutChildText(BaseModel): + text: str + + id: Optional[str] = None + + marks: Optional[List[Literal["bold", "italic", "underline", "strikethrough", "code", "math"]]] = None + + type: Optional[Literal["text"]] = None + + +class DocumentTaskCommentChildCalloutChildToolCall(BaseModel): + """A tool/function call made by the assistant.""" + + tool_call_id: str + + tool_name: str + + id: Optional[str] = None + + args: Optional[Dict[str, object]] = None + + type: Optional[Literal["tool_call"]] = None + + +class DocumentTaskCommentChildCalloutChildToolResult(BaseModel): + """The result of a tool call.""" + + output: Union[str, Dict[str, object], List[object]] + + tool_call_id: str + + tool_name: str + + id: Optional[str] = None + + is_error: Optional[bool] = None + + type: Optional[Literal["tool_result"]] = None + + +class DocumentTaskCommentChildCalloutChildTraceMessage(BaseModel): + """A message in an agent trace (user message, assistant message, or thinking).""" + + text: str + + id: Optional[str] = None + + message_type: Optional[Literal["message", "thinking"]] = None + + role: Optional[Literal["user", "assistant"]] = None + + timestamp: Optional[datetime] = None + + type: Optional[Literal["trace_message"]] = None + + +DocumentTaskCommentChildCalloutChild: TypeAlias = Union[ + DocumentTaskCommentChildCalloutChildBlob, + DocumentTaskCommentChildCalloutChildCode, + DocumentTaskCommentChildCalloutChildComment, + DocumentTaskCommentChildCalloutChildDivider, + DocumentTaskCommentChildCalloutChildImage, + DocumentTaskCommentChildCalloutChildLink, + DocumentTaskCommentChildCalloutChildLineBreak, + DocumentTaskCommentChildCalloutChildText, + DocumentTaskCommentChildCalloutChildToolCall, + DocumentTaskCommentChildCalloutChildToolResult, + DocumentTaskCommentChildCalloutChildTraceMessage, + object, +] + + +class DocumentTaskCommentChildCallout(BaseModel): + id: Optional[str] = None + + children: Optional[List[DocumentTaskCommentChildCalloutChild]] = None + + text: Optional[str] = None + + title: Optional[str] = None + + type: Optional[Literal["callout"]] = None + + +class DocumentTaskCommentChildChunkChildBlob(BaseModel): + """Represents embedded binary data using data URI scheme. + + Format: data:[][;base64], + Example: data:text/html;base64,PGh0bWw+... + """ + + data: str + + mimetype: str + + id: Optional[str] = None + + type: Optional[Literal["blob"]] = None + + +class DocumentTaskCommentChildChunkChildCode(BaseModel): + text: str + + id: Optional[str] = None + + language: Optional[str] = None + + type: Optional[Literal["code"]] = None + + +class DocumentTaskCommentChildChunkChildComment(BaseModel): + text: str + + id: Optional[str] = None + + created_at: Optional[datetime] = None + + type: Optional[Literal["comment"]] = None + + +class DocumentTaskCommentChildChunkChildDivider(BaseModel): + id: Optional[str] = None + + type: Optional[Literal["divider"]] = None + + +class DocumentTaskCommentChildChunkChildImage(BaseModel): + src: str + + text: str + + id: Optional[str] = None + + type: Optional[Literal["image"]] = None + + +class DocumentTaskCommentChildChunkChildLink(BaseModel): + text: str + + url: str + + id: Optional[str] = None + + type: Optional[Literal["link"]] = None + + +class DocumentTaskCommentChildChunkChildLineBreak(BaseModel): + id: Optional[str] = None + + type: Optional[Literal["line_break"]] = None + + +class DocumentTaskCommentChildChunkChildText(BaseModel): + text: str + + id: Optional[str] = None + + marks: Optional[List[Literal["bold", "italic", "underline", "strikethrough", "code", "math"]]] = None + + type: Optional[Literal["text"]] = None + + +class DocumentTaskCommentChildChunkChildToolCall(BaseModel): + """A tool/function call made by the assistant.""" + + tool_call_id: str + + tool_name: str + + id: Optional[str] = None + + args: Optional[Dict[str, object]] = None + + type: Optional[Literal["tool_call"]] = None + + +class DocumentTaskCommentChildChunkChildToolResult(BaseModel): + """The result of a tool call.""" + + output: Union[str, Dict[str, object], List[object]] + + tool_call_id: str + + tool_name: str + + id: Optional[str] = None + + is_error: Optional[bool] = None + + type: Optional[Literal["tool_result"]] = None + + +class DocumentTaskCommentChildChunkChildTraceMessage(BaseModel): + """A message in an agent trace (user message, assistant message, or thinking).""" + + text: str + + id: Optional[str] = None + + message_type: Optional[Literal["message", "thinking"]] = None + + role: Optional[Literal["user", "assistant"]] = None + + timestamp: Optional[datetime] = None + + type: Optional[Literal["trace_message"]] = None + + +DocumentTaskCommentChildChunkChild: TypeAlias = Union[ + DocumentTaskCommentChildChunkChildBlob, + DocumentTaskCommentChildChunkChildCode, + DocumentTaskCommentChildChunkChildComment, + DocumentTaskCommentChildChunkChildDivider, + DocumentTaskCommentChildChunkChildImage, + DocumentTaskCommentChildChunkChildLink, + DocumentTaskCommentChildChunkChildLineBreak, + DocumentTaskCommentChildChunkChildText, + DocumentTaskCommentChildChunkChildToolCall, + DocumentTaskCommentChildChunkChildToolResult, + DocumentTaskCommentChildChunkChildTraceMessage, + object, +] + + +class DocumentTaskCommentChildChunk(BaseModel): + id: Optional[str] = None + + children: Optional[List[DocumentTaskCommentChildChunkChild]] = None + + text: Optional[str] = None + + type: Optional[Literal["chunk"]] = None + + +class DocumentTaskCommentChildCode(BaseModel): + text: str + + id: Optional[str] = None + + language: Optional[str] = None + + type: Optional[Literal["code"]] = None + + +class DocumentTaskCommentChildComment(BaseModel): + text: str + + id: Optional[str] = None + + created_at: Optional[datetime] = None + + type: Optional[Literal["comment"]] = None + + +class DocumentTaskCommentChildDivider(BaseModel): + id: Optional[str] = None + + type: Optional[Literal["divider"]] = None + + +class DocumentTaskCommentChildEquationChildBlob(BaseModel): + """Represents embedded binary data using data URI scheme. + + Format: data:[][;base64], + Example: data:text/html;base64,PGh0bWw+... + """ + + data: str + + mimetype: str + + id: Optional[str] = None + + type: Optional[Literal["blob"]] = None + + +class DocumentTaskCommentChildEquationChildCode(BaseModel): + text: str + + id: Optional[str] = None + + language: Optional[str] = None + + type: Optional[Literal["code"]] = None + + +class DocumentTaskCommentChildEquationChildComment(BaseModel): + text: str + + id: Optional[str] = None + + created_at: Optional[datetime] = None + + type: Optional[Literal["comment"]] = None + + +class DocumentTaskCommentChildEquationChildDivider(BaseModel): + id: Optional[str] = None + + type: Optional[Literal["divider"]] = None + + +class DocumentTaskCommentChildEquationChildImage(BaseModel): + src: str + + text: str + + id: Optional[str] = None + + type: Optional[Literal["image"]] = None + + +class DocumentTaskCommentChildEquationChildLink(BaseModel): + text: str + + url: str + + id: Optional[str] = None + + type: Optional[Literal["link"]] = None + + +class DocumentTaskCommentChildEquationChildLineBreak(BaseModel): + id: Optional[str] = None + + type: Optional[Literal["line_break"]] = None + + +class DocumentTaskCommentChildEquationChildText(BaseModel): + text: str + + id: Optional[str] = None + + marks: Optional[List[Literal["bold", "italic", "underline", "strikethrough", "code", "math"]]] = None + + type: Optional[Literal["text"]] = None + + +class DocumentTaskCommentChildEquationChildToolCall(BaseModel): + """A tool/function call made by the assistant.""" + + tool_call_id: str + + tool_name: str + + id: Optional[str] = None + + args: Optional[Dict[str, object]] = None + + type: Optional[Literal["tool_call"]] = None + + +class DocumentTaskCommentChildEquationChildToolResult(BaseModel): + """The result of a tool call.""" + + output: Union[str, Dict[str, object], List[object]] + + tool_call_id: str + + tool_name: str + + id: Optional[str] = None + + is_error: Optional[bool] = None + + type: Optional[Literal["tool_result"]] = None + + +class DocumentTaskCommentChildEquationChildTraceMessage(BaseModel): + """A message in an agent trace (user message, assistant message, or thinking).""" + + text: str + + id: Optional[str] = None + + message_type: Optional[Literal["message", "thinking"]] = None + + role: Optional[Literal["user", "assistant"]] = None + + timestamp: Optional[datetime] = None + + type: Optional[Literal["trace_message"]] = None + + +DocumentTaskCommentChildEquationChild: TypeAlias = Union[ + DocumentTaskCommentChildEquationChildBlob, + DocumentTaskCommentChildEquationChildCode, + DocumentTaskCommentChildEquationChildComment, + DocumentTaskCommentChildEquationChildDivider, + DocumentTaskCommentChildEquationChildImage, + DocumentTaskCommentChildEquationChildLink, + DocumentTaskCommentChildEquationChildLineBreak, + DocumentTaskCommentChildEquationChildText, + DocumentTaskCommentChildEquationChildToolCall, + DocumentTaskCommentChildEquationChildToolResult, + DocumentTaskCommentChildEquationChildTraceMessage, + object, +] + + +class DocumentTaskCommentChildEquation(BaseModel): + id: Optional[str] = None + + children: Optional[List[DocumentTaskCommentChildEquationChild]] = None + + text: Optional[str] = None + + type: Optional[Literal["equation"]] = None + + +class DocumentTaskCommentChildFootnoteChildBlob(BaseModel): + """Represents embedded binary data using data URI scheme. + + Format: data:[][;base64], + Example: data:text/html;base64,PGh0bWw+... + """ + + data: str + + mimetype: str + + id: Optional[str] = None + + type: Optional[Literal["blob"]] = None + + +class DocumentTaskCommentChildFootnoteChildCode(BaseModel): + text: str + + id: Optional[str] = None + + language: Optional[str] = None + + type: Optional[Literal["code"]] = None + + +class DocumentTaskCommentChildFootnoteChildComment(BaseModel): + text: str + + id: Optional[str] = None + + created_at: Optional[datetime] = None + + type: Optional[Literal["comment"]] = None + + +class DocumentTaskCommentChildFootnoteChildDivider(BaseModel): + id: Optional[str] = None + + type: Optional[Literal["divider"]] = None + + +class DocumentTaskCommentChildFootnoteChildImage(BaseModel): + src: str + + text: str + + id: Optional[str] = None + + type: Optional[Literal["image"]] = None + + +class DocumentTaskCommentChildFootnoteChildLink(BaseModel): + text: str + + url: str + + id: Optional[str] = None + + type: Optional[Literal["link"]] = None + + +class DocumentTaskCommentChildFootnoteChildLineBreak(BaseModel): + id: Optional[str] = None + + type: Optional[Literal["line_break"]] = None + + +class DocumentTaskCommentChildFootnoteChildText(BaseModel): + text: str + + id: Optional[str] = None + + marks: Optional[List[Literal["bold", "italic", "underline", "strikethrough", "code", "math"]]] = None + + type: Optional[Literal["text"]] = None + + +class DocumentTaskCommentChildFootnoteChildToolCall(BaseModel): + """A tool/function call made by the assistant.""" + + tool_call_id: str + + tool_name: str + + id: Optional[str] = None + + args: Optional[Dict[str, object]] = None + + type: Optional[Literal["tool_call"]] = None + + +class DocumentTaskCommentChildFootnoteChildToolResult(BaseModel): + """The result of a tool call.""" + + output: Union[str, Dict[str, object], List[object]] + + tool_call_id: str + + tool_name: str + + id: Optional[str] = None + + is_error: Optional[bool] = None + + type: Optional[Literal["tool_result"]] = None + + +class DocumentTaskCommentChildFootnoteChildTraceMessage(BaseModel): + """A message in an agent trace (user message, assistant message, or thinking).""" + + text: str + + id: Optional[str] = None + + message_type: Optional[Literal["message", "thinking"]] = None + + role: Optional[Literal["user", "assistant"]] = None + + timestamp: Optional[datetime] = None + + type: Optional[Literal["trace_message"]] = None + + +DocumentTaskCommentChildFootnoteChild: TypeAlias = Union[ + DocumentTaskCommentChildFootnoteChildBlob, + DocumentTaskCommentChildFootnoteChildCode, + DocumentTaskCommentChildFootnoteChildComment, + DocumentTaskCommentChildFootnoteChildDivider, + DocumentTaskCommentChildFootnoteChildImage, + DocumentTaskCommentChildFootnoteChildLink, + DocumentTaskCommentChildFootnoteChildLineBreak, + DocumentTaskCommentChildFootnoteChildText, + DocumentTaskCommentChildFootnoteChildToolCall, + DocumentTaskCommentChildFootnoteChildToolResult, + DocumentTaskCommentChildFootnoteChildTraceMessage, + object, +] + + +class DocumentTaskCommentChildFootnote(BaseModel): + id: Optional[str] = None + + children: Optional[List[DocumentTaskCommentChildFootnoteChild]] = None + + text: Optional[str] = None + + type: Optional[Literal["footnote"]] = None + + +class DocumentTaskCommentChildHeadingChildBlob(BaseModel): + """Represents embedded binary data using data URI scheme. + + Format: data:[][;base64], + Example: data:text/html;base64,PGh0bWw+... + """ + + data: str + + mimetype: str + + id: Optional[str] = None + + type: Optional[Literal["blob"]] = None + + +class DocumentTaskCommentChildHeadingChildCode(BaseModel): + text: str + + id: Optional[str] = None + + language: Optional[str] = None + + type: Optional[Literal["code"]] = None + + +class DocumentTaskCommentChildHeadingChildComment(BaseModel): + text: str + + id: Optional[str] = None + + created_at: Optional[datetime] = None + + type: Optional[Literal["comment"]] = None + + +class DocumentTaskCommentChildHeadingChildDivider(BaseModel): + id: Optional[str] = None + + type: Optional[Literal["divider"]] = None + + +class DocumentTaskCommentChildHeadingChildImage(BaseModel): + src: str + + text: str + + id: Optional[str] = None + + type: Optional[Literal["image"]] = None + + +class DocumentTaskCommentChildHeadingChildLink(BaseModel): + text: str + + url: str + + id: Optional[str] = None + + type: Optional[Literal["link"]] = None + + +class DocumentTaskCommentChildHeadingChildLineBreak(BaseModel): + id: Optional[str] = None + + type: Optional[Literal["line_break"]] = None + + +class DocumentTaskCommentChildHeadingChildText(BaseModel): + text: str + + id: Optional[str] = None + + marks: Optional[List[Literal["bold", "italic", "underline", "strikethrough", "code", "math"]]] = None + + type: Optional[Literal["text"]] = None + + +class DocumentTaskCommentChildHeadingChildToolCall(BaseModel): + """A tool/function call made by the assistant.""" + + tool_call_id: str + + tool_name: str + + id: Optional[str] = None + + args: Optional[Dict[str, object]] = None + + type: Optional[Literal["tool_call"]] = None + + +class DocumentTaskCommentChildHeadingChildToolResult(BaseModel): + """The result of a tool call.""" + + output: Union[str, Dict[str, object], List[object]] + + tool_call_id: str + + tool_name: str + + id: Optional[str] = None + + is_error: Optional[bool] = None + + type: Optional[Literal["tool_result"]] = None + + +class DocumentTaskCommentChildHeadingChildTraceMessage(BaseModel): + """A message in an agent trace (user message, assistant message, or thinking).""" + + text: str + + id: Optional[str] = None + + message_type: Optional[Literal["message", "thinking"]] = None + + role: Optional[Literal["user", "assistant"]] = None + + timestamp: Optional[datetime] = None + + type: Optional[Literal["trace_message"]] = None + + +DocumentTaskCommentChildHeadingChild: TypeAlias = Union[ + DocumentTaskCommentChildHeadingChildBlob, + DocumentTaskCommentChildHeadingChildCode, + DocumentTaskCommentChildHeadingChildComment, + DocumentTaskCommentChildHeadingChildDivider, + DocumentTaskCommentChildHeadingChildImage, + DocumentTaskCommentChildHeadingChildLink, + DocumentTaskCommentChildHeadingChildLineBreak, + DocumentTaskCommentChildHeadingChildText, + DocumentTaskCommentChildHeadingChildToolCall, + DocumentTaskCommentChildHeadingChildToolResult, + DocumentTaskCommentChildHeadingChildTraceMessage, + object, +] + + +class DocumentTaskCommentChildHeading(BaseModel): + level: int + + id: Optional[str] = None + + children: Optional[List[DocumentTaskCommentChildHeadingChild]] = None + + text: Optional[str] = None + + type: Optional[Literal["heading"]] = None + + +class DocumentTaskCommentChildImage(BaseModel): + src: str + + text: str + + id: Optional[str] = None + + type: Optional[Literal["image"]] = None + + +class DocumentTaskCommentChildLink(BaseModel): + text: str + + url: str + + id: Optional[str] = None + + type: Optional[Literal["link"]] = None + + +class DocumentTaskCommentChildLineBreak(BaseModel): + id: Optional[str] = None + + type: Optional[Literal["line_break"]] = None + + +class DocumentTaskCommentChildList(BaseModel): + id: Optional[str] = None + + children: Optional[List[object]] = None + + ordered: Optional[bool] = None + + text: Optional[str] = None + + type: Optional[Literal["list"]] = None + + +class DocumentTaskCommentChildListItemChildBlob(BaseModel): + """Represents embedded binary data using data URI scheme. + + Format: data:[][;base64], + Example: data:text/html;base64,PGh0bWw+... + """ + + data: str + + mimetype: str + + id: Optional[str] = None + + type: Optional[Literal["blob"]] = None + + +class DocumentTaskCommentChildListItemChildCode(BaseModel): + text: str + + id: Optional[str] = None + + language: Optional[str] = None + + type: Optional[Literal["code"]] = None + + +class DocumentTaskCommentChildListItemChildComment(BaseModel): + text: str + + id: Optional[str] = None + + created_at: Optional[datetime] = None + + type: Optional[Literal["comment"]] = None + + +class DocumentTaskCommentChildListItemChildDivider(BaseModel): + id: Optional[str] = None + + type: Optional[Literal["divider"]] = None + + +class DocumentTaskCommentChildListItemChildImage(BaseModel): + src: str + + text: str + + id: Optional[str] = None + + type: Optional[Literal["image"]] = None + + +class DocumentTaskCommentChildListItemChildLink(BaseModel): + text: str + + url: str + + id: Optional[str] = None + + type: Optional[Literal["link"]] = None + + +class DocumentTaskCommentChildListItemChildLineBreak(BaseModel): + id: Optional[str] = None + + type: Optional[Literal["line_break"]] = None + + +class DocumentTaskCommentChildListItemChildText(BaseModel): + text: str + + id: Optional[str] = None + + marks: Optional[List[Literal["bold", "italic", "underline", "strikethrough", "code", "math"]]] = None + + type: Optional[Literal["text"]] = None + + +class DocumentTaskCommentChildListItemChildToolCall(BaseModel): + """A tool/function call made by the assistant.""" + + tool_call_id: str + + tool_name: str + + id: Optional[str] = None + + args: Optional[Dict[str, object]] = None + + type: Optional[Literal["tool_call"]] = None + + +class DocumentTaskCommentChildListItemChildToolResult(BaseModel): + """The result of a tool call.""" + + output: Union[str, Dict[str, object], List[object]] + + tool_call_id: str + + tool_name: str + + id: Optional[str] = None + + is_error: Optional[bool] = None + + type: Optional[Literal["tool_result"]] = None + + +class DocumentTaskCommentChildListItemChildTraceMessage(BaseModel): + """A message in an agent trace (user message, assistant message, or thinking).""" + + text: str + + id: Optional[str] = None + + message_type: Optional[Literal["message", "thinking"]] = None + + role: Optional[Literal["user", "assistant"]] = None + + timestamp: Optional[datetime] = None + + type: Optional[Literal["trace_message"]] = None + + +DocumentTaskCommentChildListItemChild: TypeAlias = Union[ + DocumentTaskCommentChildListItemChildBlob, + DocumentTaskCommentChildListItemChildCode, + DocumentTaskCommentChildListItemChildComment, + DocumentTaskCommentChildListItemChildDivider, + DocumentTaskCommentChildListItemChildImage, + DocumentTaskCommentChildListItemChildLink, + DocumentTaskCommentChildListItemChildLineBreak, + DocumentTaskCommentChildListItemChildText, + DocumentTaskCommentChildListItemChildToolCall, + DocumentTaskCommentChildListItemChildToolResult, + DocumentTaskCommentChildListItemChildTraceMessage, + object, +] + + +class DocumentTaskCommentChildListItem(BaseModel): + id: Optional[str] = None + + children: Optional[List[DocumentTaskCommentChildListItemChild]] = None + + text: Optional[str] = None + + type: Optional[Literal["list_item"]] = None + + +class DocumentTaskCommentChildParagraphChildBlob(BaseModel): + """Represents embedded binary data using data URI scheme. + + Format: data:[][;base64], + Example: data:text/html;base64,PGh0bWw+... + """ + + data: str + + mimetype: str + + id: Optional[str] = None + + type: Optional[Literal["blob"]] = None + + +class DocumentTaskCommentChildParagraphChildCode(BaseModel): + text: str + + id: Optional[str] = None + + language: Optional[str] = None + + type: Optional[Literal["code"]] = None + + +class DocumentTaskCommentChildParagraphChildComment(BaseModel): + text: str + + id: Optional[str] = None + + created_at: Optional[datetime] = None + + type: Optional[Literal["comment"]] = None + + +class DocumentTaskCommentChildParagraphChildDivider(BaseModel): + id: Optional[str] = None + + type: Optional[Literal["divider"]] = None + + +class DocumentTaskCommentChildParagraphChildImage(BaseModel): + src: str + + text: str + + id: Optional[str] = None + + type: Optional[Literal["image"]] = None + + +class DocumentTaskCommentChildParagraphChildLink(BaseModel): + text: str + + url: str + + id: Optional[str] = None + + type: Optional[Literal["link"]] = None + + +class DocumentTaskCommentChildParagraphChildLineBreak(BaseModel): + id: Optional[str] = None + + type: Optional[Literal["line_break"]] = None + + +class DocumentTaskCommentChildParagraphChildText(BaseModel): + text: str + + id: Optional[str] = None + + marks: Optional[List[Literal["bold", "italic", "underline", "strikethrough", "code", "math"]]] = None + + type: Optional[Literal["text"]] = None + + +class DocumentTaskCommentChildParagraphChildToolCall(BaseModel): + """A tool/function call made by the assistant.""" + + tool_call_id: str + + tool_name: str + + id: Optional[str] = None + + args: Optional[Dict[str, object]] = None + + type: Optional[Literal["tool_call"]] = None + + +class DocumentTaskCommentChildParagraphChildToolResult(BaseModel): + """The result of a tool call.""" + + output: Union[str, Dict[str, object], List[object]] + + tool_call_id: str + + tool_name: str + + id: Optional[str] = None + + is_error: Optional[bool] = None + + type: Optional[Literal["tool_result"]] = None + + +class DocumentTaskCommentChildParagraphChildTraceMessage(BaseModel): + """A message in an agent trace (user message, assistant message, or thinking).""" + + text: str + + id: Optional[str] = None + + message_type: Optional[Literal["message", "thinking"]] = None + + role: Optional[Literal["user", "assistant"]] = None + + timestamp: Optional[datetime] = None + + type: Optional[Literal["trace_message"]] = None + + +DocumentTaskCommentChildParagraphChild: TypeAlias = Union[ + DocumentTaskCommentChildParagraphChildBlob, + DocumentTaskCommentChildParagraphChildCode, + DocumentTaskCommentChildParagraphChildComment, + DocumentTaskCommentChildParagraphChildDivider, + DocumentTaskCommentChildParagraphChildImage, + DocumentTaskCommentChildParagraphChildLink, + DocumentTaskCommentChildParagraphChildLineBreak, + DocumentTaskCommentChildParagraphChildText, + DocumentTaskCommentChildParagraphChildToolCall, + DocumentTaskCommentChildParagraphChildToolResult, + DocumentTaskCommentChildParagraphChildTraceMessage, + object, +] + + +class DocumentTaskCommentChildParagraph(BaseModel): + id: Optional[str] = None + + children: Optional[List[DocumentTaskCommentChildParagraphChild]] = None + + text: Optional[str] = None + + type: Optional[Literal["paragraph"]] = None + + +class DocumentTaskCommentChildQuoteChildBlob(BaseModel): + """Represents embedded binary data using data URI scheme. + + Format: data:[][;base64], + Example: data:text/html;base64,PGh0bWw+... + """ + + data: str + + mimetype: str + + id: Optional[str] = None + + type: Optional[Literal["blob"]] = None + + +class DocumentTaskCommentChildQuoteChildCode(BaseModel): + text: str + + id: Optional[str] = None + + language: Optional[str] = None + + type: Optional[Literal["code"]] = None + + +class DocumentTaskCommentChildQuoteChildComment(BaseModel): + text: str + + id: Optional[str] = None + + created_at: Optional[datetime] = None + + type: Optional[Literal["comment"]] = None + + +class DocumentTaskCommentChildQuoteChildDivider(BaseModel): + id: Optional[str] = None + + type: Optional[Literal["divider"]] = None + + +class DocumentTaskCommentChildQuoteChildImage(BaseModel): + src: str + + text: str + + id: Optional[str] = None + + type: Optional[Literal["image"]] = None + + +class DocumentTaskCommentChildQuoteChildLink(BaseModel): + text: str + + url: str + + id: Optional[str] = None + + type: Optional[Literal["link"]] = None + + +class DocumentTaskCommentChildQuoteChildLineBreak(BaseModel): + id: Optional[str] = None + + type: Optional[Literal["line_break"]] = None + + +class DocumentTaskCommentChildQuoteChildText(BaseModel): + text: str + + id: Optional[str] = None + + marks: Optional[List[Literal["bold", "italic", "underline", "strikethrough", "code", "math"]]] = None + + type: Optional[Literal["text"]] = None + + +class DocumentTaskCommentChildQuoteChildToolCall(BaseModel): + """A tool/function call made by the assistant.""" + + tool_call_id: str + + tool_name: str + + id: Optional[str] = None + + args: Optional[Dict[str, object]] = None + + type: Optional[Literal["tool_call"]] = None + + +class DocumentTaskCommentChildQuoteChildToolResult(BaseModel): + """The result of a tool call.""" + + output: Union[str, Dict[str, object], List[object]] + + tool_call_id: str + + tool_name: str + + id: Optional[str] = None + + is_error: Optional[bool] = None + + type: Optional[Literal["tool_result"]] = None + + +class DocumentTaskCommentChildQuoteChildTraceMessage(BaseModel): + """A message in an agent trace (user message, assistant message, or thinking).""" + + text: str + + id: Optional[str] = None + + message_type: Optional[Literal["message", "thinking"]] = None + + role: Optional[Literal["user", "assistant"]] = None + + timestamp: Optional[datetime] = None + + type: Optional[Literal["trace_message"]] = None + + +DocumentTaskCommentChildQuoteChild: TypeAlias = Union[ + DocumentTaskCommentChildQuoteChildBlob, + DocumentTaskCommentChildQuoteChildCode, + DocumentTaskCommentChildQuoteChildComment, + DocumentTaskCommentChildQuoteChildDivider, + DocumentTaskCommentChildQuoteChildImage, + DocumentTaskCommentChildQuoteChildLink, + DocumentTaskCommentChildQuoteChildLineBreak, + DocumentTaskCommentChildQuoteChildText, + DocumentTaskCommentChildQuoteChildToolCall, + DocumentTaskCommentChildQuoteChildToolResult, + DocumentTaskCommentChildQuoteChildTraceMessage, + object, +] + + +class DocumentTaskCommentChildQuote(BaseModel): + id: Optional[str] = None + + children: Optional[List[DocumentTaskCommentChildQuoteChild]] = None + + text: Optional[str] = None + + type: Optional[Literal["quote"]] = None + + +class DocumentTaskCommentChildTable(BaseModel): + id: Optional[str] = None + + children: Optional[List[object]] = None + + has_header: Optional[bool] = None + """Whether the first row should be treated as a header""" + + text: Optional[str] = None + + type: Optional[Literal["table"]] = None + + +class DocumentTaskCommentChildTableCellChildBlob(BaseModel): + """Represents embedded binary data using data URI scheme. + + Format: data:[][;base64], + Example: data:text/html;base64,PGh0bWw+... + """ + + data: str + + mimetype: str + + id: Optional[str] = None + + type: Optional[Literal["blob"]] = None + + +class DocumentTaskCommentChildTableCellChildCode(BaseModel): + text: str + + id: Optional[str] = None + + language: Optional[str] = None + + type: Optional[Literal["code"]] = None + + +class DocumentTaskCommentChildTableCellChildComment(BaseModel): + text: str + + id: Optional[str] = None + + created_at: Optional[datetime] = None + + type: Optional[Literal["comment"]] = None + + +class DocumentTaskCommentChildTableCellChildDivider(BaseModel): + id: Optional[str] = None + + type: Optional[Literal["divider"]] = None + + +class DocumentTaskCommentChildTableCellChildImage(BaseModel): + src: str + + text: str + + id: Optional[str] = None + + type: Optional[Literal["image"]] = None + + +class DocumentTaskCommentChildTableCellChildLink(BaseModel): + text: str + + url: str + + id: Optional[str] = None + + type: Optional[Literal["link"]] = None + + +class DocumentTaskCommentChildTableCellChildLineBreak(BaseModel): + id: Optional[str] = None + + type: Optional[Literal["line_break"]] = None + + +class DocumentTaskCommentChildTableCellChildText(BaseModel): + text: str + + id: Optional[str] = None + + marks: Optional[List[Literal["bold", "italic", "underline", "strikethrough", "code", "math"]]] = None + + type: Optional[Literal["text"]] = None + + +class DocumentTaskCommentChildTableCellChildToolCall(BaseModel): + """A tool/function call made by the assistant.""" + + tool_call_id: str + + tool_name: str + + id: Optional[str] = None + + args: Optional[Dict[str, object]] = None + + type: Optional[Literal["tool_call"]] = None + + +class DocumentTaskCommentChildTableCellChildToolResult(BaseModel): + """The result of a tool call.""" + + output: Union[str, Dict[str, object], List[object]] + + tool_call_id: str + + tool_name: str + + id: Optional[str] = None + + is_error: Optional[bool] = None + + type: Optional[Literal["tool_result"]] = None + + +class DocumentTaskCommentChildTableCellChildTraceMessage(BaseModel): + """A message in an agent trace (user message, assistant message, or thinking).""" + + text: str + + id: Optional[str] = None + + message_type: Optional[Literal["message", "thinking"]] = None + + role: Optional[Literal["user", "assistant"]] = None + + timestamp: Optional[datetime] = None + + type: Optional[Literal["trace_message"]] = None + + +DocumentTaskCommentChildTableCellChild: TypeAlias = Union[ + DocumentTaskCommentChildTableCellChildBlob, + DocumentTaskCommentChildTableCellChildCode, + DocumentTaskCommentChildTableCellChildComment, + DocumentTaskCommentChildTableCellChildDivider, + DocumentTaskCommentChildTableCellChildImage, + DocumentTaskCommentChildTableCellChildLink, + DocumentTaskCommentChildTableCellChildLineBreak, + DocumentTaskCommentChildTableCellChildText, + DocumentTaskCommentChildTableCellChildToolCall, + DocumentTaskCommentChildTableCellChildToolResult, + DocumentTaskCommentChildTableCellChildTraceMessage, + object, +] + + +class DocumentTaskCommentChildTableCell(BaseModel): + id: Optional[str] = None + + align: Optional[Literal["left", "center", "right"]] = None + + children: Optional[List[DocumentTaskCommentChildTableCellChild]] = None + + text: Optional[str] = None + + type: Optional[Literal["table_cell"]] = None + + +class DocumentTaskCommentChildTableRow(BaseModel): + id: Optional[str] = None + + children: Optional[List[object]] = None + + text: Optional[str] = None + + type: Optional[Literal["table_row"]] = None + + +class DocumentTaskCommentChildText(BaseModel): + text: str + + id: Optional[str] = None + + marks: Optional[List[Literal["bold", "italic", "underline", "strikethrough", "code", "math"]]] = None + + type: Optional[Literal["text"]] = None + + +class DocumentTaskCommentChildToDoChildBlob(BaseModel): + """Represents embedded binary data using data URI scheme. + + Format: data:[][;base64], + Example: data:text/html;base64,PGh0bWw+... + """ + + data: str + + mimetype: str + + id: Optional[str] = None + + type: Optional[Literal["blob"]] = None + + +class DocumentTaskCommentChildToDoChildCode(BaseModel): + text: str + + id: Optional[str] = None + + language: Optional[str] = None + + type: Optional[Literal["code"]] = None + + +class DocumentTaskCommentChildToDoChildComment(BaseModel): + text: str + + id: Optional[str] = None + + created_at: Optional[datetime] = None + + type: Optional[Literal["comment"]] = None + + +class DocumentTaskCommentChildToDoChildDivider(BaseModel): + id: Optional[str] = None + + type: Optional[Literal["divider"]] = None + + +class DocumentTaskCommentChildToDoChildImage(BaseModel): + src: str + + text: str + + id: Optional[str] = None + + type: Optional[Literal["image"]] = None + + +class DocumentTaskCommentChildToDoChildLink(BaseModel): + text: str + + url: str + + id: Optional[str] = None + + type: Optional[Literal["link"]] = None + + +class DocumentTaskCommentChildToDoChildLineBreak(BaseModel): + id: Optional[str] = None + + type: Optional[Literal["line_break"]] = None + + +class DocumentTaskCommentChildToDoChildText(BaseModel): + text: str + + id: Optional[str] = None + + marks: Optional[List[Literal["bold", "italic", "underline", "strikethrough", "code", "math"]]] = None + + type: Optional[Literal["text"]] = None + + +class DocumentTaskCommentChildToDoChildToolCall(BaseModel): + """A tool/function call made by the assistant.""" + + tool_call_id: str + + tool_name: str + + id: Optional[str] = None + + args: Optional[Dict[str, object]] = None + + type: Optional[Literal["tool_call"]] = None + + +class DocumentTaskCommentChildToDoChildToolResult(BaseModel): + """The result of a tool call.""" + + output: Union[str, Dict[str, object], List[object]] + + tool_call_id: str + + tool_name: str + + id: Optional[str] = None + + is_error: Optional[bool] = None + + type: Optional[Literal["tool_result"]] = None + + +class DocumentTaskCommentChildToDoChildTraceMessage(BaseModel): + """A message in an agent trace (user message, assistant message, or thinking).""" + + text: str + + id: Optional[str] = None + + message_type: Optional[Literal["message", "thinking"]] = None + + role: Optional[Literal["user", "assistant"]] = None + + timestamp: Optional[datetime] = None + + type: Optional[Literal["trace_message"]] = None + + +DocumentTaskCommentChildToDoChild: TypeAlias = Union[ + DocumentTaskCommentChildToDoChildBlob, + DocumentTaskCommentChildToDoChildCode, + DocumentTaskCommentChildToDoChildComment, + DocumentTaskCommentChildToDoChildDivider, + DocumentTaskCommentChildToDoChildImage, + DocumentTaskCommentChildToDoChildLink, + DocumentTaskCommentChildToDoChildLineBreak, + DocumentTaskCommentChildToDoChildText, + DocumentTaskCommentChildToDoChildToolCall, + DocumentTaskCommentChildToDoChildToolResult, + DocumentTaskCommentChildToDoChildTraceMessage, + object, +] + + +class DocumentTaskCommentChildToDo(BaseModel): + id: Optional[str] = None + + checked: Optional[bool] = None + + children: Optional[List[DocumentTaskCommentChildToDoChild]] = None + + text: Optional[str] = None + + type: Optional[Literal["todo"]] = None + + +class DocumentTaskCommentChildToolCall(BaseModel): + """A tool/function call made by the assistant.""" + + tool_call_id: str + + tool_name: str + + id: Optional[str] = None + + args: Optional[Dict[str, object]] = None + + type: Optional[Literal["tool_call"]] = None + + +class DocumentTaskCommentChildToolResult(BaseModel): + """The result of a tool call.""" + + output: Union[str, Dict[str, object], List[object]] + + tool_call_id: str + + tool_name: str + + id: Optional[str] = None + + is_error: Optional[bool] = None + + type: Optional[Literal["tool_result"]] = None + + +class DocumentTaskCommentChildTraceMessage(BaseModel): + """A message in an agent trace (user message, assistant message, or thinking).""" + + text: str + + id: Optional[str] = None + + message_type: Optional[Literal["message", "thinking"]] = None + + role: Optional[Literal["user", "assistant"]] = None + + timestamp: Optional[datetime] = None + + type: Optional[Literal["trace_message"]] = None + + +class DocumentTaskCommentChildUtterance(BaseModel): + """A speaker-attributed segment of a transcript (ENG-2476/D10). + + "Utterance" is the standard name for this across transcription providers + (AssemblyAI, Deepgram, Rev). Timestamps are relative offsets in seconds — + provider-native; absolute times derive from `Transcript.started_at`. + """ + + text: str + + id: Optional[str] = None + + end: Optional[float] = None + + speaker: Optional[object] = None + + start: Optional[float] = None + + type: Optional[Literal["utterance"]] = None + + +DocumentTaskCommentChild: TypeAlias = Annotated[ + Union[ + DocumentTaskCommentChildBlob, + DocumentTaskCommentChildCallout, + DocumentTaskCommentChildChunk, + DocumentTaskCommentChildCode, + DocumentTaskCommentChildComment, + DocumentTaskCommentChildDivider, + DocumentTaskCommentChildEquation, + DocumentTaskCommentChildFootnote, + DocumentTaskCommentChildHeading, + DocumentTaskCommentChildImage, + DocumentTaskCommentChildLink, + DocumentTaskCommentChildLineBreak, + DocumentTaskCommentChildList, + DocumentTaskCommentChildListItem, + DocumentTaskCommentChildParagraph, + DocumentTaskCommentChildQuote, + DocumentTaskCommentChildTable, + DocumentTaskCommentChildTableCell, + DocumentTaskCommentChildTableRow, + DocumentTaskCommentChildText, + DocumentTaskCommentChildToDo, + DocumentTaskCommentChildToolCall, + DocumentTaskCommentChildToolResult, + DocumentTaskCommentChildTraceMessage, + DocumentTaskCommentChildUtterance, + ], + PropertyInfo(discriminator="type"), +] + + +class DocumentTaskCommentMentionedUserChildBlob(BaseModel): + """Represents embedded binary data using data URI scheme. + + Format: data:[][;base64], + Example: data:text/html;base64,PGh0bWw+... + """ + + data: str + + mimetype: str + + id: Optional[str] = None + + type: Optional[Literal["blob"]] = None + + +class DocumentTaskCommentMentionedUserChildCode(BaseModel): + text: str + + id: Optional[str] = None + + language: Optional[str] = None + + type: Optional[Literal["code"]] = None + + +class DocumentTaskCommentMentionedUserChildComment(BaseModel): + text: str + + id: Optional[str] = None + + created_at: Optional[datetime] = None + + type: Optional[Literal["comment"]] = None + + +class DocumentTaskCommentMentionedUserChildDivider(BaseModel): + id: Optional[str] = None + + type: Optional[Literal["divider"]] = None + + +class DocumentTaskCommentMentionedUserChildImage(BaseModel): + src: str + + text: str + + id: Optional[str] = None + + type: Optional[Literal["image"]] = None + + +class DocumentTaskCommentMentionedUserChildLink(BaseModel): + text: str + + url: str + + id: Optional[str] = None + + type: Optional[Literal["link"]] = None + + +class DocumentTaskCommentMentionedUserChildLineBreak(BaseModel): + id: Optional[str] = None + + type: Optional[Literal["line_break"]] = None + + +class DocumentTaskCommentMentionedUserChildText(BaseModel): + text: str + + id: Optional[str] = None + + marks: Optional[List[Literal["bold", "italic", "underline", "strikethrough", "code", "math"]]] = None + + type: Optional[Literal["text"]] = None + + +class DocumentTaskCommentMentionedUserChildToolCall(BaseModel): + """A tool/function call made by the assistant.""" + + tool_call_id: str + + tool_name: str + + id: Optional[str] = None + + args: Optional[Dict[str, object]] = None + + type: Optional[Literal["tool_call"]] = None + + +class DocumentTaskCommentMentionedUserChildToolResult(BaseModel): + """The result of a tool call.""" + + output: Union[str, Dict[str, object], List[object]] + + tool_call_id: str + + tool_name: str + + id: Optional[str] = None + + is_error: Optional[bool] = None + + type: Optional[Literal["tool_result"]] = None + + +class DocumentTaskCommentMentionedUserChildTraceMessage(BaseModel): + """A message in an agent trace (user message, assistant message, or thinking).""" + + text: str + + id: Optional[str] = None + + message_type: Optional[Literal["message", "thinking"]] = None + + role: Optional[Literal["user", "assistant"]] = None + + timestamp: Optional[datetime] = None + + type: Optional[Literal["trace_message"]] = None + + +DocumentTaskCommentMentionedUserChild: TypeAlias = Union[ + DocumentTaskCommentMentionedUserChildBlob, + DocumentTaskCommentMentionedUserChildCode, + DocumentTaskCommentMentionedUserChildComment, + DocumentTaskCommentMentionedUserChildDivider, + DocumentTaskCommentMentionedUserChildImage, + DocumentTaskCommentMentionedUserChildLink, + DocumentTaskCommentMentionedUserChildLineBreak, + DocumentTaskCommentMentionedUserChildText, + DocumentTaskCommentMentionedUserChildToolCall, + DocumentTaskCommentMentionedUserChildToolResult, + DocumentTaskCommentMentionedUserChildTraceMessage, + object, +] + + +class DocumentTaskCommentMentionedUser(BaseModel): + id: Optional[str] = None + + address: Optional[str] = None + + alt_names: Optional[List[str]] = None + + children: Optional[List[DocumentTaskCommentMentionedUserChild]] = None + + company: Optional[str] = None + + company_ids: Optional[List[str]] = None + + date_of_birth: Optional[date] = None + + deal_ids: Optional[List[str]] = None + + email: Optional[str] = None + + emails: Optional[List[str]] = None + """All known email addresses; `email` holds the primary one""" + + image_url: Optional[str] = None + + job_title: Optional[str] = None + + link_urls: Optional[List[str]] = None + + name: Optional[str] = None + + phone_numbers: Optional[List[str]] = None + + tags: Optional[List[str]] = None + + text: Optional[str] = None + + type: Optional[Literal["person"]] = None + + username: Optional[str] = None + + +class DocumentTaskComment(BaseModel): + date: datetime + + sender: DocumentTaskCommentSender + + id: Optional[str] = None + + channel: Optional[str] = None + """ + The channel or platform where the message was posted, if this Message is not + explicitly part of a conversation + """ + + children: Optional[List[DocumentTaskCommentChild]] = None + + external_id: Optional[str] = None + """Provider message id (e.g. Slack ts, Gmail message id) — merge-dedup key""" + + is_self: Optional[bool] = None + + mentioned_users: Optional[List[DocumentTaskCommentMentionedUser]] = None + + num_replies: Optional[int] = None + + replies: Optional[List[object]] = None + """The replies or comments to the message""" + + text: Optional[str] = None + + thread_id: Optional[str] = None + + title: Optional[str] = None + """The subject or title of the message""" + + type: Optional[Literal["message"]] = None + + updated_at: Optional[datetime] = None + + upvotes: Optional[int] = None + """The number of upvotes, likes, or reactions on the message""" + + +class DocumentTask(BaseModel): + id: Optional[str] = None + + children: Optional[List[DocumentTaskChild]] = None + + comments: Optional[List[DocumentTaskComment]] = None + + due_at: Optional[datetime] = None + + priority: Optional[Literal["urgent", "high", "medium", "low"]] = None + + status: Optional[Literal["completed", "not_started", "in_progress", "cancelled"]] = None + + text: Optional[str] = None + + type: Optional[Literal["task"]] = None + + +class DocumentPersonChildBlob(BaseModel): + """Represents embedded binary data using data URI scheme. + + Format: data:[][;base64], + Example: data:text/html;base64,PGh0bWw+... + """ + + data: str + + mimetype: str + + id: Optional[str] = None + + type: Optional[Literal["blob"]] = None + + +class DocumentPersonChildCode(BaseModel): + text: str + + id: Optional[str] = None + + language: Optional[str] = None + + type: Optional[Literal["code"]] = None + + +class DocumentPersonChildComment(BaseModel): + text: str + + id: Optional[str] = None + + created_at: Optional[datetime] = None + + type: Optional[Literal["comment"]] = None + + +class DocumentPersonChildDivider(BaseModel): + id: Optional[str] = None + + type: Optional[Literal["divider"]] = None + + +class DocumentPersonChildImage(BaseModel): + src: str + + text: str + + id: Optional[str] = None + + type: Optional[Literal["image"]] = None + + +class DocumentPersonChildLink(BaseModel): + text: str + + url: str + + id: Optional[str] = None + + type: Optional[Literal["link"]] = None + + +class DocumentPersonChildLineBreak(BaseModel): + id: Optional[str] = None + + type: Optional[Literal["line_break"]] = None + + +class DocumentPersonChildText(BaseModel): + text: str + + id: Optional[str] = None + + marks: Optional[List[Literal["bold", "italic", "underline", "strikethrough", "code", "math"]]] = None + + type: Optional[Literal["text"]] = None + + +class DocumentPersonChildToolCall(BaseModel): + """A tool/function call made by the assistant.""" + + tool_call_id: str + + tool_name: str + + id: Optional[str] = None + + args: Optional[Dict[str, object]] = None + + type: Optional[Literal["tool_call"]] = None + + +class DocumentPersonChildToolResult(BaseModel): + """The result of a tool call.""" + + output: Union[str, Dict[str, object], List[object]] + + tool_call_id: str + + tool_name: str + + id: Optional[str] = None + + is_error: Optional[bool] = None + + type: Optional[Literal["tool_result"]] = None + + +class DocumentPersonChildTraceMessage(BaseModel): + """A message in an agent trace (user message, assistant message, or thinking).""" + + text: str + + id: Optional[str] = None + + message_type: Optional[Literal["message", "thinking"]] = None + + role: Optional[Literal["user", "assistant"]] = None + + timestamp: Optional[datetime] = None + + type: Optional[Literal["trace_message"]] = None + + +DocumentPersonChild: TypeAlias = Union[ + DocumentPersonChildBlob, + DocumentPersonChildCode, + DocumentPersonChildComment, + DocumentPersonChildDivider, + DocumentPersonChildImage, + DocumentPersonChildLink, + DocumentPersonChildLineBreak, + DocumentPersonChildText, + DocumentPersonChildToolCall, + DocumentPersonChildToolResult, + DocumentPersonChildTraceMessage, + object, +] + + +class DocumentPerson(BaseModel): + id: Optional[str] = None + + address: Optional[str] = None + + alt_names: Optional[List[str]] = None + + children: Optional[List[DocumentPersonChild]] = None + + company: Optional[str] = None + + company_ids: Optional[List[str]] = None + + date_of_birth: Optional[date] = None + + deal_ids: Optional[List[str]] = None + + email: Optional[str] = None + + emails: Optional[List[str]] = None + """All known email addresses; `email` holds the primary one""" + + image_url: Optional[str] = None + + job_title: Optional[str] = None + + link_urls: Optional[List[str]] = None + + name: Optional[str] = None + + phone_numbers: Optional[List[str]] = None + + tags: Optional[List[str]] = None + + text: Optional[str] = None + + type: Optional[Literal["person"]] = None + + username: Optional[str] = None + + +class DocumentMessageSenderChildBlob(BaseModel): + """Represents embedded binary data using data URI scheme. + + Format: data:[][;base64], + Example: data:text/html;base64,PGh0bWw+... + """ + + data: str + + mimetype: str + + id: Optional[str] = None + + type: Optional[Literal["blob"]] = None + + +class DocumentMessageSenderChildCode(BaseModel): + text: str + + id: Optional[str] = None + + language: Optional[str] = None + + type: Optional[Literal["code"]] = None + + +class DocumentMessageSenderChildComment(BaseModel): + text: str + + id: Optional[str] = None + + created_at: Optional[datetime] = None + + type: Optional[Literal["comment"]] = None + + +class DocumentMessageSenderChildDivider(BaseModel): + id: Optional[str] = None + + type: Optional[Literal["divider"]] = None + + +class DocumentMessageSenderChildImage(BaseModel): + src: str + + text: str + + id: Optional[str] = None + + type: Optional[Literal["image"]] = None + + +class DocumentMessageSenderChildLink(BaseModel): + text: str + + url: str + + id: Optional[str] = None + + type: Optional[Literal["link"]] = None + + +class DocumentMessageSenderChildLineBreak(BaseModel): + id: Optional[str] = None + + type: Optional[Literal["line_break"]] = None + + +class DocumentMessageSenderChildText(BaseModel): + text: str + + id: Optional[str] = None + + marks: Optional[List[Literal["bold", "italic", "underline", "strikethrough", "code", "math"]]] = None + + type: Optional[Literal["text"]] = None + + +class DocumentMessageSenderChildToolCall(BaseModel): + """A tool/function call made by the assistant.""" + + tool_call_id: str + + tool_name: str + + id: Optional[str] = None + + args: Optional[Dict[str, object]] = None + + type: Optional[Literal["tool_call"]] = None + + +class DocumentMessageSenderChildToolResult(BaseModel): + """The result of a tool call.""" + + output: Union[str, Dict[str, object], List[object]] + + tool_call_id: str + + tool_name: str + + id: Optional[str] = None + + is_error: Optional[bool] = None + + type: Optional[Literal["tool_result"]] = None + + +class DocumentMessageSenderChildTraceMessage(BaseModel): + """A message in an agent trace (user message, assistant message, or thinking).""" + + text: str + + id: Optional[str] = None + + message_type: Optional[Literal["message", "thinking"]] = None + + role: Optional[Literal["user", "assistant"]] = None + + timestamp: Optional[datetime] = None + + type: Optional[Literal["trace_message"]] = None + + +DocumentMessageSenderChild: TypeAlias = Union[ + DocumentMessageSenderChildBlob, + DocumentMessageSenderChildCode, + DocumentMessageSenderChildComment, + DocumentMessageSenderChildDivider, + DocumentMessageSenderChildImage, + DocumentMessageSenderChildLink, + DocumentMessageSenderChildLineBreak, + DocumentMessageSenderChildText, + DocumentMessageSenderChildToolCall, + DocumentMessageSenderChildToolResult, + DocumentMessageSenderChildTraceMessage, + object, +] + + +class DocumentMessageSender(BaseModel): + id: Optional[str] = None + + address: Optional[str] = None + + alt_names: Optional[List[str]] = None + + children: Optional[List[DocumentMessageSenderChild]] = None + + company: Optional[str] = None + + company_ids: Optional[List[str]] = None + + date_of_birth: Optional[date] = None + + deal_ids: Optional[List[str]] = None + + email: Optional[str] = None + + emails: Optional[List[str]] = None + """All known email addresses; `email` holds the primary one""" + + image_url: Optional[str] = None + + job_title: Optional[str] = None + + link_urls: Optional[List[str]] = None + + name: Optional[str] = None + + phone_numbers: Optional[List[str]] = None + + tags: Optional[List[str]] = None + + text: Optional[str] = None + + type: Optional[Literal["person"]] = None + + username: Optional[str] = None + + +class DocumentMessageChildBlob(BaseModel): + """Represents embedded binary data using data URI scheme. + + Format: data:[][;base64], + Example: data:text/html;base64,PGh0bWw+... + """ + + data: str + + mimetype: str + + id: Optional[str] = None + + type: Optional[Literal["blob"]] = None + + +class DocumentMessageChildCalloutChildBlob(BaseModel): + """Represents embedded binary data using data URI scheme. + + Format: data:[][;base64], + Example: data:text/html;base64,PGh0bWw+... + """ + + data: str + + mimetype: str + + id: Optional[str] = None + + type: Optional[Literal["blob"]] = None + + +class DocumentMessageChildCalloutChildCode(BaseModel): + text: str + + id: Optional[str] = None + + language: Optional[str] = None + + type: Optional[Literal["code"]] = None + + +class DocumentMessageChildCalloutChildComment(BaseModel): + text: str + + id: Optional[str] = None + + created_at: Optional[datetime] = None + + type: Optional[Literal["comment"]] = None + + +class DocumentMessageChildCalloutChildDivider(BaseModel): + id: Optional[str] = None + + type: Optional[Literal["divider"]] = None + + +class DocumentMessageChildCalloutChildImage(BaseModel): + src: str + + text: str + + id: Optional[str] = None + + type: Optional[Literal["image"]] = None + + +class DocumentMessageChildCalloutChildLink(BaseModel): + text: str + + url: str + + id: Optional[str] = None + + type: Optional[Literal["link"]] = None + + +class DocumentMessageChildCalloutChildLineBreak(BaseModel): + id: Optional[str] = None + + type: Optional[Literal["line_break"]] = None + + +class DocumentMessageChildCalloutChildText(BaseModel): + text: str + + id: Optional[str] = None + + marks: Optional[List[Literal["bold", "italic", "underline", "strikethrough", "code", "math"]]] = None + + type: Optional[Literal["text"]] = None + + +class DocumentMessageChildCalloutChildToolCall(BaseModel): + """A tool/function call made by the assistant.""" + + tool_call_id: str + + tool_name: str + + id: Optional[str] = None + + args: Optional[Dict[str, object]] = None + + type: Optional[Literal["tool_call"]] = None + + +class DocumentMessageChildCalloutChildToolResult(BaseModel): + """The result of a tool call.""" + + output: Union[str, Dict[str, object], List[object]] + + tool_call_id: str + + tool_name: str + + id: Optional[str] = None + + is_error: Optional[bool] = None + + type: Optional[Literal["tool_result"]] = None + + +class DocumentMessageChildCalloutChildTraceMessage(BaseModel): + """A message in an agent trace (user message, assistant message, or thinking).""" + + text: str + + id: Optional[str] = None + + message_type: Optional[Literal["message", "thinking"]] = None + + role: Optional[Literal["user", "assistant"]] = None + + timestamp: Optional[datetime] = None + + type: Optional[Literal["trace_message"]] = None + + +DocumentMessageChildCalloutChild: TypeAlias = Union[ + DocumentMessageChildCalloutChildBlob, + DocumentMessageChildCalloutChildCode, + DocumentMessageChildCalloutChildComment, + DocumentMessageChildCalloutChildDivider, + DocumentMessageChildCalloutChildImage, + DocumentMessageChildCalloutChildLink, + DocumentMessageChildCalloutChildLineBreak, + DocumentMessageChildCalloutChildText, + DocumentMessageChildCalloutChildToolCall, + DocumentMessageChildCalloutChildToolResult, + DocumentMessageChildCalloutChildTraceMessage, + object, +] + + +class DocumentMessageChildCallout(BaseModel): + id: Optional[str] = None + + children: Optional[List[DocumentMessageChildCalloutChild]] = None + + text: Optional[str] = None + + title: Optional[str] = None + + type: Optional[Literal["callout"]] = None + + +class DocumentMessageChildChunkChildBlob(BaseModel): + """Represents embedded binary data using data URI scheme. + + Format: data:[][;base64], + Example: data:text/html;base64,PGh0bWw+... + """ + + data: str + + mimetype: str + + id: Optional[str] = None + + type: Optional[Literal["blob"]] = None + + +class DocumentMessageChildChunkChildCode(BaseModel): + text: str + + id: Optional[str] = None + + language: Optional[str] = None + + type: Optional[Literal["code"]] = None + + +class DocumentMessageChildChunkChildComment(BaseModel): + text: str + + id: Optional[str] = None + + created_at: Optional[datetime] = None + + type: Optional[Literal["comment"]] = None + + +class DocumentMessageChildChunkChildDivider(BaseModel): + id: Optional[str] = None + + type: Optional[Literal["divider"]] = None + + +class DocumentMessageChildChunkChildImage(BaseModel): + src: str + + text: str + + id: Optional[str] = None + + type: Optional[Literal["image"]] = None + + +class DocumentMessageChildChunkChildLink(BaseModel): + text: str + + url: str + + id: Optional[str] = None + + type: Optional[Literal["link"]] = None + + +class DocumentMessageChildChunkChildLineBreak(BaseModel): + id: Optional[str] = None + + type: Optional[Literal["line_break"]] = None + + +class DocumentMessageChildChunkChildText(BaseModel): + text: str + + id: Optional[str] = None + + marks: Optional[List[Literal["bold", "italic", "underline", "strikethrough", "code", "math"]]] = None + + type: Optional[Literal["text"]] = None + + +class DocumentMessageChildChunkChildToolCall(BaseModel): + """A tool/function call made by the assistant.""" + + tool_call_id: str + + tool_name: str + + id: Optional[str] = None + + args: Optional[Dict[str, object]] = None + + type: Optional[Literal["tool_call"]] = None + + +class DocumentMessageChildChunkChildToolResult(BaseModel): + """The result of a tool call.""" + + output: Union[str, Dict[str, object], List[object]] + + tool_call_id: str + + tool_name: str + + id: Optional[str] = None + + is_error: Optional[bool] = None + + type: Optional[Literal["tool_result"]] = None + + +class DocumentMessageChildChunkChildTraceMessage(BaseModel): + """A message in an agent trace (user message, assistant message, or thinking).""" + + text: str + + id: Optional[str] = None + + message_type: Optional[Literal["message", "thinking"]] = None + + role: Optional[Literal["user", "assistant"]] = None + + timestamp: Optional[datetime] = None + + type: Optional[Literal["trace_message"]] = None + + +DocumentMessageChildChunkChild: TypeAlias = Union[ + DocumentMessageChildChunkChildBlob, + DocumentMessageChildChunkChildCode, + DocumentMessageChildChunkChildComment, + DocumentMessageChildChunkChildDivider, + DocumentMessageChildChunkChildImage, + DocumentMessageChildChunkChildLink, + DocumentMessageChildChunkChildLineBreak, + DocumentMessageChildChunkChildText, + DocumentMessageChildChunkChildToolCall, + DocumentMessageChildChunkChildToolResult, + DocumentMessageChildChunkChildTraceMessage, + object, +] + + +class DocumentMessageChildChunk(BaseModel): + id: Optional[str] = None + + children: Optional[List[DocumentMessageChildChunkChild]] = None + + text: Optional[str] = None + + type: Optional[Literal["chunk"]] = None + + +class DocumentMessageChildCode(BaseModel): + text: str + + id: Optional[str] = None + + language: Optional[str] = None + + type: Optional[Literal["code"]] = None + + +class DocumentMessageChildComment(BaseModel): + text: str + + id: Optional[str] = None + + created_at: Optional[datetime] = None + + type: Optional[Literal["comment"]] = None + + +class DocumentMessageChildDivider(BaseModel): + id: Optional[str] = None + + type: Optional[Literal["divider"]] = None + + +class DocumentMessageChildEquationChildBlob(BaseModel): + """Represents embedded binary data using data URI scheme. + + Format: data:[][;base64], + Example: data:text/html;base64,PGh0bWw+... + """ + + data: str + + mimetype: str + + id: Optional[str] = None + + type: Optional[Literal["blob"]] = None + + +class DocumentMessageChildEquationChildCode(BaseModel): + text: str + + id: Optional[str] = None + + language: Optional[str] = None + + type: Optional[Literal["code"]] = None + + +class DocumentMessageChildEquationChildComment(BaseModel): + text: str + + id: Optional[str] = None + + created_at: Optional[datetime] = None + + type: Optional[Literal["comment"]] = None + + +class DocumentMessageChildEquationChildDivider(BaseModel): + id: Optional[str] = None + + type: Optional[Literal["divider"]] = None + + +class DocumentMessageChildEquationChildImage(BaseModel): + src: str + + text: str + + id: Optional[str] = None + + type: Optional[Literal["image"]] = None + + +class DocumentMessageChildEquationChildLink(BaseModel): + text: str + + url: str + + id: Optional[str] = None + + type: Optional[Literal["link"]] = None + + +class DocumentMessageChildEquationChildLineBreak(BaseModel): + id: Optional[str] = None + + type: Optional[Literal["line_break"]] = None + + +class DocumentMessageChildEquationChildText(BaseModel): + text: str + + id: Optional[str] = None + + marks: Optional[List[Literal["bold", "italic", "underline", "strikethrough", "code", "math"]]] = None + + type: Optional[Literal["text"]] = None + + +class DocumentMessageChildEquationChildToolCall(BaseModel): + """A tool/function call made by the assistant.""" + + tool_call_id: str + + tool_name: str + + id: Optional[str] = None + + args: Optional[Dict[str, object]] = None + + type: Optional[Literal["tool_call"]] = None + + +class DocumentMessageChildEquationChildToolResult(BaseModel): + """The result of a tool call.""" + + output: Union[str, Dict[str, object], List[object]] + + tool_call_id: str + + tool_name: str + + id: Optional[str] = None + + is_error: Optional[bool] = None + + type: Optional[Literal["tool_result"]] = None + + +class DocumentMessageChildEquationChildTraceMessage(BaseModel): + """A message in an agent trace (user message, assistant message, or thinking).""" + + text: str + + id: Optional[str] = None + + message_type: Optional[Literal["message", "thinking"]] = None + + role: Optional[Literal["user", "assistant"]] = None + + timestamp: Optional[datetime] = None + + type: Optional[Literal["trace_message"]] = None + + +DocumentMessageChildEquationChild: TypeAlias = Union[ + DocumentMessageChildEquationChildBlob, + DocumentMessageChildEquationChildCode, + DocumentMessageChildEquationChildComment, + DocumentMessageChildEquationChildDivider, + DocumentMessageChildEquationChildImage, + DocumentMessageChildEquationChildLink, + DocumentMessageChildEquationChildLineBreak, + DocumentMessageChildEquationChildText, + DocumentMessageChildEquationChildToolCall, + DocumentMessageChildEquationChildToolResult, + DocumentMessageChildEquationChildTraceMessage, + object, +] + + +class DocumentMessageChildEquation(BaseModel): + id: Optional[str] = None + + children: Optional[List[DocumentMessageChildEquationChild]] = None + + text: Optional[str] = None + + type: Optional[Literal["equation"]] = None + + +class DocumentMessageChildFootnoteChildBlob(BaseModel): + """Represents embedded binary data using data URI scheme. + + Format: data:[][;base64], + Example: data:text/html;base64,PGh0bWw+... + """ + + data: str + + mimetype: str + + id: Optional[str] = None + + type: Optional[Literal["blob"]] = None + + +class DocumentMessageChildFootnoteChildCode(BaseModel): + text: str + + id: Optional[str] = None + + language: Optional[str] = None + + type: Optional[Literal["code"]] = None + + +class DocumentMessageChildFootnoteChildComment(BaseModel): + text: str + + id: Optional[str] = None + + created_at: Optional[datetime] = None + + type: Optional[Literal["comment"]] = None + + +class DocumentMessageChildFootnoteChildDivider(BaseModel): + id: Optional[str] = None + + type: Optional[Literal["divider"]] = None + + +class DocumentMessageChildFootnoteChildImage(BaseModel): + src: str + + text: str + + id: Optional[str] = None + + type: Optional[Literal["image"]] = None + + +class DocumentMessageChildFootnoteChildLink(BaseModel): + text: str + + url: str + + id: Optional[str] = None + + type: Optional[Literal["link"]] = None + + +class DocumentMessageChildFootnoteChildLineBreak(BaseModel): + id: Optional[str] = None + + type: Optional[Literal["line_break"]] = None + + +class DocumentMessageChildFootnoteChildText(BaseModel): + text: str + + id: Optional[str] = None + + marks: Optional[List[Literal["bold", "italic", "underline", "strikethrough", "code", "math"]]] = None + + type: Optional[Literal["text"]] = None + + +class DocumentMessageChildFootnoteChildToolCall(BaseModel): + """A tool/function call made by the assistant.""" + + tool_call_id: str + + tool_name: str + + id: Optional[str] = None + + args: Optional[Dict[str, object]] = None + + type: Optional[Literal["tool_call"]] = None + + +class DocumentMessageChildFootnoteChildToolResult(BaseModel): + """The result of a tool call.""" + + output: Union[str, Dict[str, object], List[object]] + + tool_call_id: str + + tool_name: str + + id: Optional[str] = None + + is_error: Optional[bool] = None + + type: Optional[Literal["tool_result"]] = None + + +class DocumentMessageChildFootnoteChildTraceMessage(BaseModel): + """A message in an agent trace (user message, assistant message, or thinking).""" + + text: str + + id: Optional[str] = None + + message_type: Optional[Literal["message", "thinking"]] = None + + role: Optional[Literal["user", "assistant"]] = None + + timestamp: Optional[datetime] = None + + type: Optional[Literal["trace_message"]] = None + + +DocumentMessageChildFootnoteChild: TypeAlias = Union[ + DocumentMessageChildFootnoteChildBlob, + DocumentMessageChildFootnoteChildCode, + DocumentMessageChildFootnoteChildComment, + DocumentMessageChildFootnoteChildDivider, + DocumentMessageChildFootnoteChildImage, + DocumentMessageChildFootnoteChildLink, + DocumentMessageChildFootnoteChildLineBreak, + DocumentMessageChildFootnoteChildText, + DocumentMessageChildFootnoteChildToolCall, + DocumentMessageChildFootnoteChildToolResult, + DocumentMessageChildFootnoteChildTraceMessage, + object, +] + + +class DocumentMessageChildFootnote(BaseModel): + id: Optional[str] = None + + children: Optional[List[DocumentMessageChildFootnoteChild]] = None + + text: Optional[str] = None + + type: Optional[Literal["footnote"]] = None + + +class DocumentMessageChildHeadingChildBlob(BaseModel): + """Represents embedded binary data using data URI scheme. + + Format: data:[][;base64], + Example: data:text/html;base64,PGh0bWw+... + """ + + data: str + + mimetype: str + + id: Optional[str] = None + + type: Optional[Literal["blob"]] = None + + +class DocumentMessageChildHeadingChildCode(BaseModel): + text: str + + id: Optional[str] = None + + language: Optional[str] = None + + type: Optional[Literal["code"]] = None + + +class DocumentMessageChildHeadingChildComment(BaseModel): + text: str + + id: Optional[str] = None + + created_at: Optional[datetime] = None + + type: Optional[Literal["comment"]] = None + + +class DocumentMessageChildHeadingChildDivider(BaseModel): + id: Optional[str] = None + + type: Optional[Literal["divider"]] = None + + +class DocumentMessageChildHeadingChildImage(BaseModel): + src: str + + text: str + + id: Optional[str] = None + + type: Optional[Literal["image"]] = None + + +class DocumentMessageChildHeadingChildLink(BaseModel): + text: str + + url: str + + id: Optional[str] = None + + type: Optional[Literal["link"]] = None + + +class DocumentMessageChildHeadingChildLineBreak(BaseModel): + id: Optional[str] = None + + type: Optional[Literal["line_break"]] = None + + +class DocumentMessageChildHeadingChildText(BaseModel): + text: str + + id: Optional[str] = None + + marks: Optional[List[Literal["bold", "italic", "underline", "strikethrough", "code", "math"]]] = None + + type: Optional[Literal["text"]] = None + + +class DocumentMessageChildHeadingChildToolCall(BaseModel): + """A tool/function call made by the assistant.""" + + tool_call_id: str + + tool_name: str + + id: Optional[str] = None + + args: Optional[Dict[str, object]] = None + + type: Optional[Literal["tool_call"]] = None + + +class DocumentMessageChildHeadingChildToolResult(BaseModel): + """The result of a tool call.""" + + output: Union[str, Dict[str, object], List[object]] + + tool_call_id: str + + tool_name: str + + id: Optional[str] = None + + is_error: Optional[bool] = None + + type: Optional[Literal["tool_result"]] = None + + +class DocumentMessageChildHeadingChildTraceMessage(BaseModel): + """A message in an agent trace (user message, assistant message, or thinking).""" + + text: str + + id: Optional[str] = None + + message_type: Optional[Literal["message", "thinking"]] = None + + role: Optional[Literal["user", "assistant"]] = None + + timestamp: Optional[datetime] = None + + type: Optional[Literal["trace_message"]] = None + + +DocumentMessageChildHeadingChild: TypeAlias = Union[ + DocumentMessageChildHeadingChildBlob, + DocumentMessageChildHeadingChildCode, + DocumentMessageChildHeadingChildComment, + DocumentMessageChildHeadingChildDivider, + DocumentMessageChildHeadingChildImage, + DocumentMessageChildHeadingChildLink, + DocumentMessageChildHeadingChildLineBreak, + DocumentMessageChildHeadingChildText, + DocumentMessageChildHeadingChildToolCall, + DocumentMessageChildHeadingChildToolResult, + DocumentMessageChildHeadingChildTraceMessage, + object, +] + + +class DocumentMessageChildHeading(BaseModel): + level: int + + id: Optional[str] = None + + children: Optional[List[DocumentMessageChildHeadingChild]] = None + + text: Optional[str] = None + + type: Optional[Literal["heading"]] = None + + +class DocumentMessageChildImage(BaseModel): + src: str + + text: str + + id: Optional[str] = None + + type: Optional[Literal["image"]] = None + + +class DocumentMessageChildLink(BaseModel): + text: str + + url: str + + id: Optional[str] = None + + type: Optional[Literal["link"]] = None + + +class DocumentMessageChildLineBreak(BaseModel): + id: Optional[str] = None + + type: Optional[Literal["line_break"]] = None + + +class DocumentMessageChildList(BaseModel): + id: Optional[str] = None + + children: Optional[List[object]] = None + + ordered: Optional[bool] = None + + text: Optional[str] = None + + type: Optional[Literal["list"]] = None + + +class DocumentMessageChildListItemChildBlob(BaseModel): + """Represents embedded binary data using data URI scheme. + + Format: data:[][;base64], + Example: data:text/html;base64,PGh0bWw+... + """ + + data: str + + mimetype: str + + id: Optional[str] = None + + type: Optional[Literal["blob"]] = None + + +class DocumentMessageChildListItemChildCode(BaseModel): + text: str + + id: Optional[str] = None + + language: Optional[str] = None + + type: Optional[Literal["code"]] = None + + +class DocumentMessageChildListItemChildComment(BaseModel): + text: str + + id: Optional[str] = None + + created_at: Optional[datetime] = None + + type: Optional[Literal["comment"]] = None + + +class DocumentMessageChildListItemChildDivider(BaseModel): + id: Optional[str] = None + + type: Optional[Literal["divider"]] = None + + +class DocumentMessageChildListItemChildImage(BaseModel): + src: str + + text: str + + id: Optional[str] = None + + type: Optional[Literal["image"]] = None + + +class DocumentMessageChildListItemChildLink(BaseModel): + text: str + + url: str + + id: Optional[str] = None + + type: Optional[Literal["link"]] = None + + +class DocumentMessageChildListItemChildLineBreak(BaseModel): + id: Optional[str] = None + + type: Optional[Literal["line_break"]] = None + + +class DocumentMessageChildListItemChildText(BaseModel): + text: str + + id: Optional[str] = None + + marks: Optional[List[Literal["bold", "italic", "underline", "strikethrough", "code", "math"]]] = None + + type: Optional[Literal["text"]] = None + + +class DocumentMessageChildListItemChildToolCall(BaseModel): + """A tool/function call made by the assistant.""" + + tool_call_id: str + + tool_name: str + + id: Optional[str] = None + + args: Optional[Dict[str, object]] = None + + type: Optional[Literal["tool_call"]] = None + + +class DocumentMessageChildListItemChildToolResult(BaseModel): + """The result of a tool call.""" + + output: Union[str, Dict[str, object], List[object]] + + tool_call_id: str + + tool_name: str + + id: Optional[str] = None + + is_error: Optional[bool] = None + + type: Optional[Literal["tool_result"]] = None + + +class DocumentMessageChildListItemChildTraceMessage(BaseModel): + """A message in an agent trace (user message, assistant message, or thinking).""" + + text: str + + id: Optional[str] = None + + message_type: Optional[Literal["message", "thinking"]] = None + + role: Optional[Literal["user", "assistant"]] = None + + timestamp: Optional[datetime] = None + + type: Optional[Literal["trace_message"]] = None + + +DocumentMessageChildListItemChild: TypeAlias = Union[ + DocumentMessageChildListItemChildBlob, + DocumentMessageChildListItemChildCode, + DocumentMessageChildListItemChildComment, + DocumentMessageChildListItemChildDivider, + DocumentMessageChildListItemChildImage, + DocumentMessageChildListItemChildLink, + DocumentMessageChildListItemChildLineBreak, + DocumentMessageChildListItemChildText, + DocumentMessageChildListItemChildToolCall, + DocumentMessageChildListItemChildToolResult, + DocumentMessageChildListItemChildTraceMessage, + object, +] + + +class DocumentMessageChildListItem(BaseModel): + id: Optional[str] = None + + children: Optional[List[DocumentMessageChildListItemChild]] = None + + text: Optional[str] = None + + type: Optional[Literal["list_item"]] = None + + +class DocumentMessageChildParagraphChildBlob(BaseModel): + """Represents embedded binary data using data URI scheme. + + Format: data:[][;base64], + Example: data:text/html;base64,PGh0bWw+... + """ + + data: str + + mimetype: str + + id: Optional[str] = None + + type: Optional[Literal["blob"]] = None + + +class DocumentMessageChildParagraphChildCode(BaseModel): + text: str + + id: Optional[str] = None + + language: Optional[str] = None + + type: Optional[Literal["code"]] = None + + +class DocumentMessageChildParagraphChildComment(BaseModel): + text: str + + id: Optional[str] = None + + created_at: Optional[datetime] = None + + type: Optional[Literal["comment"]] = None + + +class DocumentMessageChildParagraphChildDivider(BaseModel): + id: Optional[str] = None + + type: Optional[Literal["divider"]] = None + + +class DocumentMessageChildParagraphChildImage(BaseModel): + src: str + + text: str + + id: Optional[str] = None + + type: Optional[Literal["image"]] = None + + +class DocumentMessageChildParagraphChildLink(BaseModel): + text: str + + url: str + + id: Optional[str] = None + + type: Optional[Literal["link"]] = None + + +class DocumentMessageChildParagraphChildLineBreak(BaseModel): + id: Optional[str] = None + + type: Optional[Literal["line_break"]] = None + + +class DocumentMessageChildParagraphChildText(BaseModel): + text: str + + id: Optional[str] = None + + marks: Optional[List[Literal["bold", "italic", "underline", "strikethrough", "code", "math"]]] = None + + type: Optional[Literal["text"]] = None + + +class DocumentMessageChildParagraphChildToolCall(BaseModel): + """A tool/function call made by the assistant.""" + + tool_call_id: str + + tool_name: str + + id: Optional[str] = None + + args: Optional[Dict[str, object]] = None + + type: Optional[Literal["tool_call"]] = None + + +class DocumentMessageChildParagraphChildToolResult(BaseModel): + """The result of a tool call.""" + + output: Union[str, Dict[str, object], List[object]] + + tool_call_id: str + + tool_name: str + + id: Optional[str] = None + + is_error: Optional[bool] = None + + type: Optional[Literal["tool_result"]] = None + + +class DocumentMessageChildParagraphChildTraceMessage(BaseModel): + """A message in an agent trace (user message, assistant message, or thinking).""" + + text: str + + id: Optional[str] = None + + message_type: Optional[Literal["message", "thinking"]] = None + + role: Optional[Literal["user", "assistant"]] = None + + timestamp: Optional[datetime] = None + + type: Optional[Literal["trace_message"]] = None + + +DocumentMessageChildParagraphChild: TypeAlias = Union[ + DocumentMessageChildParagraphChildBlob, + DocumentMessageChildParagraphChildCode, + DocumentMessageChildParagraphChildComment, + DocumentMessageChildParagraphChildDivider, + DocumentMessageChildParagraphChildImage, + DocumentMessageChildParagraphChildLink, + DocumentMessageChildParagraphChildLineBreak, + DocumentMessageChildParagraphChildText, + DocumentMessageChildParagraphChildToolCall, + DocumentMessageChildParagraphChildToolResult, + DocumentMessageChildParagraphChildTraceMessage, + object, +] + + +class DocumentMessageChildParagraph(BaseModel): + id: Optional[str] = None + + children: Optional[List[DocumentMessageChildParagraphChild]] = None + + text: Optional[str] = None + + type: Optional[Literal["paragraph"]] = None + + +class DocumentMessageChildQuoteChildBlob(BaseModel): + """Represents embedded binary data using data URI scheme. + + Format: data:[][;base64], + Example: data:text/html;base64,PGh0bWw+... + """ + + data: str + + mimetype: str + + id: Optional[str] = None + + type: Optional[Literal["blob"]] = None + + +class DocumentMessageChildQuoteChildCode(BaseModel): + text: str + + id: Optional[str] = None + + language: Optional[str] = None + + type: Optional[Literal["code"]] = None + + +class DocumentMessageChildQuoteChildComment(BaseModel): + text: str + + id: Optional[str] = None + + created_at: Optional[datetime] = None + + type: Optional[Literal["comment"]] = None + + +class DocumentMessageChildQuoteChildDivider(BaseModel): + id: Optional[str] = None + + type: Optional[Literal["divider"]] = None + + +class DocumentMessageChildQuoteChildImage(BaseModel): + src: str + + text: str + + id: Optional[str] = None + + type: Optional[Literal["image"]] = None + + +class DocumentMessageChildQuoteChildLink(BaseModel): + text: str + + url: str + + id: Optional[str] = None + + type: Optional[Literal["link"]] = None + + +class DocumentMessageChildQuoteChildLineBreak(BaseModel): + id: Optional[str] = None + + type: Optional[Literal["line_break"]] = None + + +class DocumentMessageChildQuoteChildText(BaseModel): + text: str + + id: Optional[str] = None + + marks: Optional[List[Literal["bold", "italic", "underline", "strikethrough", "code", "math"]]] = None + + type: Optional[Literal["text"]] = None + + +class DocumentMessageChildQuoteChildToolCall(BaseModel): + """A tool/function call made by the assistant.""" + + tool_call_id: str + + tool_name: str + + id: Optional[str] = None + + args: Optional[Dict[str, object]] = None + + type: Optional[Literal["tool_call"]] = None + + +class DocumentMessageChildQuoteChildToolResult(BaseModel): + """The result of a tool call.""" + + output: Union[str, Dict[str, object], List[object]] + + tool_call_id: str + + tool_name: str + + id: Optional[str] = None + + is_error: Optional[bool] = None + + type: Optional[Literal["tool_result"]] = None + + +class DocumentMessageChildQuoteChildTraceMessage(BaseModel): + """A message in an agent trace (user message, assistant message, or thinking).""" + + text: str + + id: Optional[str] = None + + message_type: Optional[Literal["message", "thinking"]] = None + + role: Optional[Literal["user", "assistant"]] = None + + timestamp: Optional[datetime] = None + + type: Optional[Literal["trace_message"]] = None + + +DocumentMessageChildQuoteChild: TypeAlias = Union[ + DocumentMessageChildQuoteChildBlob, + DocumentMessageChildQuoteChildCode, + DocumentMessageChildQuoteChildComment, + DocumentMessageChildQuoteChildDivider, + DocumentMessageChildQuoteChildImage, + DocumentMessageChildQuoteChildLink, + DocumentMessageChildQuoteChildLineBreak, + DocumentMessageChildQuoteChildText, + DocumentMessageChildQuoteChildToolCall, + DocumentMessageChildQuoteChildToolResult, + DocumentMessageChildQuoteChildTraceMessage, + object, +] + + +class DocumentMessageChildQuote(BaseModel): + id: Optional[str] = None + + children: Optional[List[DocumentMessageChildQuoteChild]] = None + + text: Optional[str] = None + + type: Optional[Literal["quote"]] = None + + +class DocumentMessageChildTable(BaseModel): + id: Optional[str] = None + + children: Optional[List[object]] = None + + has_header: Optional[bool] = None + """Whether the first row should be treated as a header""" + + text: Optional[str] = None + + type: Optional[Literal["table"]] = None + + +class DocumentMessageChildTableCellChildBlob(BaseModel): + """Represents embedded binary data using data URI scheme. + + Format: data:[][;base64], + Example: data:text/html;base64,PGh0bWw+... + """ + + data: str + + mimetype: str + + id: Optional[str] = None + + type: Optional[Literal["blob"]] = None + + +class DocumentMessageChildTableCellChildCode(BaseModel): + text: str + + id: Optional[str] = None + + language: Optional[str] = None + + type: Optional[Literal["code"]] = None + + +class DocumentMessageChildTableCellChildComment(BaseModel): + text: str + + id: Optional[str] = None + + created_at: Optional[datetime] = None + + type: Optional[Literal["comment"]] = None + + +class DocumentMessageChildTableCellChildDivider(BaseModel): + id: Optional[str] = None + + type: Optional[Literal["divider"]] = None + + +class DocumentMessageChildTableCellChildImage(BaseModel): + src: str + + text: str + + id: Optional[str] = None + + type: Optional[Literal["image"]] = None + + +class DocumentMessageChildTableCellChildLink(BaseModel): + text: str + + url: str + + id: Optional[str] = None + + type: Optional[Literal["link"]] = None + + +class DocumentMessageChildTableCellChildLineBreak(BaseModel): + id: Optional[str] = None + + type: Optional[Literal["line_break"]] = None + + +class DocumentMessageChildTableCellChildText(BaseModel): + text: str + + id: Optional[str] = None + + marks: Optional[List[Literal["bold", "italic", "underline", "strikethrough", "code", "math"]]] = None + + type: Optional[Literal["text"]] = None + + +class DocumentMessageChildTableCellChildToolCall(BaseModel): + """A tool/function call made by the assistant.""" + + tool_call_id: str + + tool_name: str + + id: Optional[str] = None + + args: Optional[Dict[str, object]] = None + + type: Optional[Literal["tool_call"]] = None + + +class DocumentMessageChildTableCellChildToolResult(BaseModel): + """The result of a tool call.""" + + output: Union[str, Dict[str, object], List[object]] + + tool_call_id: str + + tool_name: str + + id: Optional[str] = None + + is_error: Optional[bool] = None + + type: Optional[Literal["tool_result"]] = None + + +class DocumentMessageChildTableCellChildTraceMessage(BaseModel): + """A message in an agent trace (user message, assistant message, or thinking).""" + + text: str + + id: Optional[str] = None + + message_type: Optional[Literal["message", "thinking"]] = None + + role: Optional[Literal["user", "assistant"]] = None + + timestamp: Optional[datetime] = None + + type: Optional[Literal["trace_message"]] = None + + +DocumentMessageChildTableCellChild: TypeAlias = Union[ + DocumentMessageChildTableCellChildBlob, + DocumentMessageChildTableCellChildCode, + DocumentMessageChildTableCellChildComment, + DocumentMessageChildTableCellChildDivider, + DocumentMessageChildTableCellChildImage, + DocumentMessageChildTableCellChildLink, + DocumentMessageChildTableCellChildLineBreak, + DocumentMessageChildTableCellChildText, + DocumentMessageChildTableCellChildToolCall, + DocumentMessageChildTableCellChildToolResult, + DocumentMessageChildTableCellChildTraceMessage, + object, +] + + +class DocumentMessageChildTableCell(BaseModel): + id: Optional[str] = None + + align: Optional[Literal["left", "center", "right"]] = None + + children: Optional[List[DocumentMessageChildTableCellChild]] = None + + text: Optional[str] = None + + type: Optional[Literal["table_cell"]] = None + + +class DocumentMessageChildTableRow(BaseModel): + id: Optional[str] = None + + children: Optional[List[object]] = None + + text: Optional[str] = None + + type: Optional[Literal["table_row"]] = None + + +class DocumentMessageChildText(BaseModel): + text: str + + id: Optional[str] = None + + marks: Optional[List[Literal["bold", "italic", "underline", "strikethrough", "code", "math"]]] = None + + type: Optional[Literal["text"]] = None + + +class DocumentMessageChildToDoChildBlob(BaseModel): + """Represents embedded binary data using data URI scheme. + + Format: data:[][;base64], + Example: data:text/html;base64,PGh0bWw+... + """ + + data: str + + mimetype: str + + id: Optional[str] = None + + type: Optional[Literal["blob"]] = None + + +class DocumentMessageChildToDoChildCode(BaseModel): + text: str + + id: Optional[str] = None + + language: Optional[str] = None + + type: Optional[Literal["code"]] = None + + +class DocumentMessageChildToDoChildComment(BaseModel): + text: str + + id: Optional[str] = None + + created_at: Optional[datetime] = None + + type: Optional[Literal["comment"]] = None + + +class DocumentMessageChildToDoChildDivider(BaseModel): + id: Optional[str] = None + + type: Optional[Literal["divider"]] = None + + +class DocumentMessageChildToDoChildImage(BaseModel): + src: str + + text: str + + id: Optional[str] = None + + type: Optional[Literal["image"]] = None + + +class DocumentMessageChildToDoChildLink(BaseModel): + text: str + + url: str + + id: Optional[str] = None + + type: Optional[Literal["link"]] = None + + +class DocumentMessageChildToDoChildLineBreak(BaseModel): + id: Optional[str] = None + + type: Optional[Literal["line_break"]] = None + + +class DocumentMessageChildToDoChildText(BaseModel): + text: str + + id: Optional[str] = None + + marks: Optional[List[Literal["bold", "italic", "underline", "strikethrough", "code", "math"]]] = None + + type: Optional[Literal["text"]] = None + + +class DocumentMessageChildToDoChildToolCall(BaseModel): + """A tool/function call made by the assistant.""" + + tool_call_id: str + + tool_name: str + + id: Optional[str] = None + + args: Optional[Dict[str, object]] = None + + type: Optional[Literal["tool_call"]] = None + + +class DocumentMessageChildToDoChildToolResult(BaseModel): + """The result of a tool call.""" + + output: Union[str, Dict[str, object], List[object]] + + tool_call_id: str + + tool_name: str + + id: Optional[str] = None + + is_error: Optional[bool] = None + + type: Optional[Literal["tool_result"]] = None + + +class DocumentMessageChildToDoChildTraceMessage(BaseModel): + """A message in an agent trace (user message, assistant message, or thinking).""" + + text: str + + id: Optional[str] = None + + message_type: Optional[Literal["message", "thinking"]] = None + + role: Optional[Literal["user", "assistant"]] = None + + timestamp: Optional[datetime] = None + + type: Optional[Literal["trace_message"]] = None + + +DocumentMessageChildToDoChild: TypeAlias = Union[ + DocumentMessageChildToDoChildBlob, + DocumentMessageChildToDoChildCode, + DocumentMessageChildToDoChildComment, + DocumentMessageChildToDoChildDivider, + DocumentMessageChildToDoChildImage, + DocumentMessageChildToDoChildLink, + DocumentMessageChildToDoChildLineBreak, + DocumentMessageChildToDoChildText, + DocumentMessageChildToDoChildToolCall, + DocumentMessageChildToDoChildToolResult, + DocumentMessageChildToDoChildTraceMessage, + object, +] + + +class DocumentMessageChildToDo(BaseModel): + id: Optional[str] = None + + checked: Optional[bool] = None + + children: Optional[List[DocumentMessageChildToDoChild]] = None + + text: Optional[str] = None + + type: Optional[Literal["todo"]] = None + + +class DocumentMessageChildToolCall(BaseModel): + """A tool/function call made by the assistant.""" + + tool_call_id: str + + tool_name: str + + id: Optional[str] = None + + args: Optional[Dict[str, object]] = None + + type: Optional[Literal["tool_call"]] = None + + +class DocumentMessageChildToolResult(BaseModel): + """The result of a tool call.""" + + output: Union[str, Dict[str, object], List[object]] + + tool_call_id: str + + tool_name: str + + id: Optional[str] = None + + is_error: Optional[bool] = None + + type: Optional[Literal["tool_result"]] = None + + +class DocumentMessageChildTraceMessage(BaseModel): + """A message in an agent trace (user message, assistant message, or thinking).""" + + text: str + + id: Optional[str] = None + + message_type: Optional[Literal["message", "thinking"]] = None + + role: Optional[Literal["user", "assistant"]] = None + + timestamp: Optional[datetime] = None + + type: Optional[Literal["trace_message"]] = None + + +class DocumentMessageChildUtterance(BaseModel): + """A speaker-attributed segment of a transcript (ENG-2476/D10). + + "Utterance" is the standard name for this across transcription providers + (AssemblyAI, Deepgram, Rev). Timestamps are relative offsets in seconds — + provider-native; absolute times derive from `Transcript.started_at`. + """ + + text: str + + id: Optional[str] = None + + end: Optional[float] = None + + speaker: Optional[object] = None + + start: Optional[float] = None + + type: Optional[Literal["utterance"]] = None + + +DocumentMessageChild: TypeAlias = Annotated[ + Union[ + DocumentMessageChildBlob, + DocumentMessageChildCallout, + DocumentMessageChildChunk, + DocumentMessageChildCode, + DocumentMessageChildComment, + DocumentMessageChildDivider, + DocumentMessageChildEquation, + DocumentMessageChildFootnote, + DocumentMessageChildHeading, + DocumentMessageChildImage, + DocumentMessageChildLink, + DocumentMessageChildLineBreak, + DocumentMessageChildList, + DocumentMessageChildListItem, + DocumentMessageChildParagraph, + DocumentMessageChildQuote, + DocumentMessageChildTable, + DocumentMessageChildTableCell, + DocumentMessageChildTableRow, + DocumentMessageChildText, + DocumentMessageChildToDo, + DocumentMessageChildToolCall, + DocumentMessageChildToolResult, + DocumentMessageChildTraceMessage, + DocumentMessageChildUtterance, + ], + PropertyInfo(discriminator="type"), +] + + +class DocumentMessageMentionedUserChildBlob(BaseModel): + """Represents embedded binary data using data URI scheme. + + Format: data:[][;base64], + Example: data:text/html;base64,PGh0bWw+... + """ + + data: str + + mimetype: str + + id: Optional[str] = None + + type: Optional[Literal["blob"]] = None + + +class DocumentMessageMentionedUserChildCode(BaseModel): + text: str + + id: Optional[str] = None + + language: Optional[str] = None + + type: Optional[Literal["code"]] = None + + +class DocumentMessageMentionedUserChildComment(BaseModel): + text: str + + id: Optional[str] = None + + created_at: Optional[datetime] = None + + type: Optional[Literal["comment"]] = None + + +class DocumentMessageMentionedUserChildDivider(BaseModel): + id: Optional[str] = None + + type: Optional[Literal["divider"]] = None + + +class DocumentMessageMentionedUserChildImage(BaseModel): + src: str + + text: str + + id: Optional[str] = None + + type: Optional[Literal["image"]] = None + + +class DocumentMessageMentionedUserChildLink(BaseModel): + text: str + + url: str + + id: Optional[str] = None + + type: Optional[Literal["link"]] = None + + +class DocumentMessageMentionedUserChildLineBreak(BaseModel): + id: Optional[str] = None + + type: Optional[Literal["line_break"]] = None + + +class DocumentMessageMentionedUserChildText(BaseModel): + text: str + + id: Optional[str] = None + + marks: Optional[List[Literal["bold", "italic", "underline", "strikethrough", "code", "math"]]] = None + + type: Optional[Literal["text"]] = None + + +class DocumentMessageMentionedUserChildToolCall(BaseModel): + """A tool/function call made by the assistant.""" + + tool_call_id: str + + tool_name: str + + id: Optional[str] = None + + args: Optional[Dict[str, object]] = None + + type: Optional[Literal["tool_call"]] = None + + +class DocumentMessageMentionedUserChildToolResult(BaseModel): + """The result of a tool call.""" + + output: Union[str, Dict[str, object], List[object]] + + tool_call_id: str + + tool_name: str + + id: Optional[str] = None + + is_error: Optional[bool] = None + + type: Optional[Literal["tool_result"]] = None + + +class DocumentMessageMentionedUserChildTraceMessage(BaseModel): + """A message in an agent trace (user message, assistant message, or thinking).""" + + text: str + + id: Optional[str] = None + + message_type: Optional[Literal["message", "thinking"]] = None + + role: Optional[Literal["user", "assistant"]] = None + + timestamp: Optional[datetime] = None + + type: Optional[Literal["trace_message"]] = None + + +DocumentMessageMentionedUserChild: TypeAlias = Union[ + DocumentMessageMentionedUserChildBlob, + DocumentMessageMentionedUserChildCode, + DocumentMessageMentionedUserChildComment, + DocumentMessageMentionedUserChildDivider, + DocumentMessageMentionedUserChildImage, + DocumentMessageMentionedUserChildLink, + DocumentMessageMentionedUserChildLineBreak, + DocumentMessageMentionedUserChildText, + DocumentMessageMentionedUserChildToolCall, + DocumentMessageMentionedUserChildToolResult, + DocumentMessageMentionedUserChildTraceMessage, + object, +] + + +class DocumentMessageMentionedUser(BaseModel): + id: Optional[str] = None + + address: Optional[str] = None + + alt_names: Optional[List[str]] = None + + children: Optional[List[DocumentMessageMentionedUserChild]] = None + + company: Optional[str] = None + + company_ids: Optional[List[str]] = None + + date_of_birth: Optional[date] = None + + deal_ids: Optional[List[str]] = None + + email: Optional[str] = None + + emails: Optional[List[str]] = None + """All known email addresses; `email` holds the primary one""" + + image_url: Optional[str] = None + + job_title: Optional[str] = None + + link_urls: Optional[List[str]] = None + + name: Optional[str] = None + + phone_numbers: Optional[List[str]] = None + + tags: Optional[List[str]] = None + + text: Optional[str] = None + + type: Optional[Literal["person"]] = None + + username: Optional[str] = None + + +class DocumentMessage(BaseModel): + date: datetime + + sender: DocumentMessageSender + + id: Optional[str] = None + + channel: Optional[str] = None + """ + The channel or platform where the message was posted, if this Message is not + explicitly part of a conversation + """ + + children: Optional[List[DocumentMessageChild]] = None + + external_id: Optional[str] = None + """Provider message id (e.g. Slack ts, Gmail message id) — merge-dedup key""" + + is_self: Optional[bool] = None + + mentioned_users: Optional[List[DocumentMessageMentionedUser]] = None + + num_replies: Optional[int] = None + + replies: Optional[List[object]] = None + """The replies or comments to the message""" + + text: Optional[str] = None + + thread_id: Optional[str] = None + + title: Optional[str] = None + """The subject or title of the message""" + + type: Optional[Literal["message"]] = None + + updated_at: Optional[datetime] = None + + upvotes: Optional[int] = None + """The number of upvotes, likes, or reactions on the message""" + + +class DocumentEventAttendeeChildBlob(BaseModel): + """Represents embedded binary data using data URI scheme. + + Format: data:[][;base64], + Example: data:text/html;base64,PGh0bWw+... + """ + + data: str + + mimetype: str + + id: Optional[str] = None + + type: Optional[Literal["blob"]] = None + + +class DocumentEventAttendeeChildCode(BaseModel): + text: str + + id: Optional[str] = None + + language: Optional[str] = None + + type: Optional[Literal["code"]] = None + + +class DocumentEventAttendeeChildComment(BaseModel): + text: str + + id: Optional[str] = None + + created_at: Optional[datetime] = None + + type: Optional[Literal["comment"]] = None + + +class DocumentEventAttendeeChildDivider(BaseModel): + id: Optional[str] = None + + type: Optional[Literal["divider"]] = None + + +class DocumentEventAttendeeChildImage(BaseModel): + src: str + + text: str + + id: Optional[str] = None + + type: Optional[Literal["image"]] = None + + +class DocumentEventAttendeeChildLink(BaseModel): + text: str + + url: str + + id: Optional[str] = None + + type: Optional[Literal["link"]] = None + + +class DocumentEventAttendeeChildLineBreak(BaseModel): + id: Optional[str] = None + + type: Optional[Literal["line_break"]] = None + + +class DocumentEventAttendeeChildText(BaseModel): + text: str + + id: Optional[str] = None + + marks: Optional[List[Literal["bold", "italic", "underline", "strikethrough", "code", "math"]]] = None + + type: Optional[Literal["text"]] = None + + +class DocumentEventAttendeeChildToolCall(BaseModel): + """A tool/function call made by the assistant.""" + + tool_call_id: str + + tool_name: str + + id: Optional[str] = None + + args: Optional[Dict[str, object]] = None + + type: Optional[Literal["tool_call"]] = None + + +class DocumentEventAttendeeChildToolResult(BaseModel): + """The result of a tool call.""" + + output: Union[str, Dict[str, object], List[object]] + + tool_call_id: str + + tool_name: str + + id: Optional[str] = None + + is_error: Optional[bool] = None + + type: Optional[Literal["tool_result"]] = None + + +class DocumentEventAttendeeChildTraceMessage(BaseModel): + """A message in an agent trace (user message, assistant message, or thinking).""" + + text: str + + id: Optional[str] = None + + message_type: Optional[Literal["message", "thinking"]] = None + + role: Optional[Literal["user", "assistant"]] = None + + timestamp: Optional[datetime] = None + + type: Optional[Literal["trace_message"]] = None + + +DocumentEventAttendeeChild: TypeAlias = Union[ + DocumentEventAttendeeChildBlob, + DocumentEventAttendeeChildCode, + DocumentEventAttendeeChildComment, + DocumentEventAttendeeChildDivider, + DocumentEventAttendeeChildImage, + DocumentEventAttendeeChildLink, + DocumentEventAttendeeChildLineBreak, + DocumentEventAttendeeChildText, + DocumentEventAttendeeChildToolCall, + DocumentEventAttendeeChildToolResult, + DocumentEventAttendeeChildTraceMessage, + object, +] + + +class DocumentEventAttendee(BaseModel): + id: Optional[str] = None + + address: Optional[str] = None + + alt_names: Optional[List[str]] = None + + children: Optional[List[DocumentEventAttendeeChild]] = None + + company: Optional[str] = None + + company_ids: Optional[List[str]] = None + + date_of_birth: Optional[date] = None + + deal_ids: Optional[List[str]] = None + + email: Optional[str] = None + + emails: Optional[List[str]] = None + """All known email addresses; `email` holds the primary one""" + + image_url: Optional[str] = None + + job_title: Optional[str] = None + + link_urls: Optional[List[str]] = None + + name: Optional[str] = None + + phone_numbers: Optional[List[str]] = None + + tags: Optional[List[str]] = None + + text: Optional[str] = None + + type: Optional[Literal["person"]] = None + + username: Optional[str] = None + + +class DocumentEventChildBlob(BaseModel): + """Represents embedded binary data using data URI scheme. + + Format: data:[][;base64], + Example: data:text/html;base64,PGh0bWw+... + """ + + data: str + + mimetype: str + + id: Optional[str] = None + + type: Optional[Literal["blob"]] = None + + +class DocumentEventChildCalloutChildBlob(BaseModel): + """Represents embedded binary data using data URI scheme. + + Format: data:[][;base64], + Example: data:text/html;base64,PGh0bWw+... + """ + + data: str + + mimetype: str + + id: Optional[str] = None + + type: Optional[Literal["blob"]] = None + + +class DocumentEventChildCalloutChildCode(BaseModel): + text: str + + id: Optional[str] = None + + language: Optional[str] = None + + type: Optional[Literal["code"]] = None + + +class DocumentEventChildCalloutChildComment(BaseModel): + text: str + + id: Optional[str] = None + + created_at: Optional[datetime] = None + + type: Optional[Literal["comment"]] = None + + +class DocumentEventChildCalloutChildDivider(BaseModel): + id: Optional[str] = None + + type: Optional[Literal["divider"]] = None + + +class DocumentEventChildCalloutChildImage(BaseModel): + src: str + + text: str + + id: Optional[str] = None + + type: Optional[Literal["image"]] = None + + +class DocumentEventChildCalloutChildLink(BaseModel): + text: str + + url: str + + id: Optional[str] = None + + type: Optional[Literal["link"]] = None + + +class DocumentEventChildCalloutChildLineBreak(BaseModel): + id: Optional[str] = None + + type: Optional[Literal["line_break"]] = None + + +class DocumentEventChildCalloutChildText(BaseModel): + text: str + + id: Optional[str] = None + + marks: Optional[List[Literal["bold", "italic", "underline", "strikethrough", "code", "math"]]] = None + + type: Optional[Literal["text"]] = None + + +class DocumentEventChildCalloutChildToolCall(BaseModel): + """A tool/function call made by the assistant.""" + + tool_call_id: str + + tool_name: str + + id: Optional[str] = None + + args: Optional[Dict[str, object]] = None + + type: Optional[Literal["tool_call"]] = None + + +class DocumentEventChildCalloutChildToolResult(BaseModel): + """The result of a tool call.""" + + output: Union[str, Dict[str, object], List[object]] + + tool_call_id: str + + tool_name: str + + id: Optional[str] = None + + is_error: Optional[bool] = None + + type: Optional[Literal["tool_result"]] = None + + +class DocumentEventChildCalloutChildTraceMessage(BaseModel): + """A message in an agent trace (user message, assistant message, or thinking).""" + + text: str + + id: Optional[str] = None + + message_type: Optional[Literal["message", "thinking"]] = None + + role: Optional[Literal["user", "assistant"]] = None + + timestamp: Optional[datetime] = None + + type: Optional[Literal["trace_message"]] = None + + +DocumentEventChildCalloutChild: TypeAlias = Union[ + DocumentEventChildCalloutChildBlob, + DocumentEventChildCalloutChildCode, + DocumentEventChildCalloutChildComment, + DocumentEventChildCalloutChildDivider, + DocumentEventChildCalloutChildImage, + DocumentEventChildCalloutChildLink, + DocumentEventChildCalloutChildLineBreak, + DocumentEventChildCalloutChildText, + DocumentEventChildCalloutChildToolCall, + DocumentEventChildCalloutChildToolResult, + DocumentEventChildCalloutChildTraceMessage, + object, +] + + +class DocumentEventChildCallout(BaseModel): + id: Optional[str] = None + + children: Optional[List[DocumentEventChildCalloutChild]] = None + + text: Optional[str] = None + + title: Optional[str] = None + + type: Optional[Literal["callout"]] = None + + +class DocumentEventChildChunkChildBlob(BaseModel): + """Represents embedded binary data using data URI scheme. + + Format: data:[][;base64], + Example: data:text/html;base64,PGh0bWw+... + """ + + data: str + + mimetype: str + + id: Optional[str] = None + + type: Optional[Literal["blob"]] = None + + +class DocumentEventChildChunkChildCode(BaseModel): + text: str + + id: Optional[str] = None + + language: Optional[str] = None + + type: Optional[Literal["code"]] = None + + +class DocumentEventChildChunkChildComment(BaseModel): + text: str + + id: Optional[str] = None + + created_at: Optional[datetime] = None + + type: Optional[Literal["comment"]] = None + + +class DocumentEventChildChunkChildDivider(BaseModel): + id: Optional[str] = None + + type: Optional[Literal["divider"]] = None + + +class DocumentEventChildChunkChildImage(BaseModel): + src: str + + text: str + + id: Optional[str] = None + + type: Optional[Literal["image"]] = None + + +class DocumentEventChildChunkChildLink(BaseModel): + text: str + + url: str + + id: Optional[str] = None + + type: Optional[Literal["link"]] = None + + +class DocumentEventChildChunkChildLineBreak(BaseModel): + id: Optional[str] = None + + type: Optional[Literal["line_break"]] = None + + +class DocumentEventChildChunkChildText(BaseModel): + text: str + + id: Optional[str] = None + + marks: Optional[List[Literal["bold", "italic", "underline", "strikethrough", "code", "math"]]] = None + + type: Optional[Literal["text"]] = None + + +class DocumentEventChildChunkChildToolCall(BaseModel): + """A tool/function call made by the assistant.""" + + tool_call_id: str + + tool_name: str + + id: Optional[str] = None + + args: Optional[Dict[str, object]] = None + + type: Optional[Literal["tool_call"]] = None + + +class DocumentEventChildChunkChildToolResult(BaseModel): + """The result of a tool call.""" + + output: Union[str, Dict[str, object], List[object]] + + tool_call_id: str + + tool_name: str + + id: Optional[str] = None + + is_error: Optional[bool] = None + + type: Optional[Literal["tool_result"]] = None + + +class DocumentEventChildChunkChildTraceMessage(BaseModel): + """A message in an agent trace (user message, assistant message, or thinking).""" + + text: str + + id: Optional[str] = None + + message_type: Optional[Literal["message", "thinking"]] = None + + role: Optional[Literal["user", "assistant"]] = None + + timestamp: Optional[datetime] = None + + type: Optional[Literal["trace_message"]] = None + + +DocumentEventChildChunkChild: TypeAlias = Union[ + DocumentEventChildChunkChildBlob, + DocumentEventChildChunkChildCode, + DocumentEventChildChunkChildComment, + DocumentEventChildChunkChildDivider, + DocumentEventChildChunkChildImage, + DocumentEventChildChunkChildLink, + DocumentEventChildChunkChildLineBreak, + DocumentEventChildChunkChildText, + DocumentEventChildChunkChildToolCall, + DocumentEventChildChunkChildToolResult, + DocumentEventChildChunkChildTraceMessage, + object, +] + + +class DocumentEventChildChunk(BaseModel): + id: Optional[str] = None + + children: Optional[List[DocumentEventChildChunkChild]] = None + + text: Optional[str] = None + + type: Optional[Literal["chunk"]] = None + + +class DocumentEventChildCode(BaseModel): + text: str + + id: Optional[str] = None + + language: Optional[str] = None + + type: Optional[Literal["code"]] = None + + +class DocumentEventChildComment(BaseModel): + text: str + + id: Optional[str] = None + + created_at: Optional[datetime] = None + + type: Optional[Literal["comment"]] = None + + +class DocumentEventChildDivider(BaseModel): + id: Optional[str] = None + + type: Optional[Literal["divider"]] = None + + +class DocumentEventChildEquationChildBlob(BaseModel): + """Represents embedded binary data using data URI scheme. + + Format: data:[][;base64], + Example: data:text/html;base64,PGh0bWw+... + """ + + data: str + + mimetype: str + + id: Optional[str] = None + + type: Optional[Literal["blob"]] = None + + +class DocumentEventChildEquationChildCode(BaseModel): + text: str + + id: Optional[str] = None + + language: Optional[str] = None + + type: Optional[Literal["code"]] = None + + +class DocumentEventChildEquationChildComment(BaseModel): + text: str + + id: Optional[str] = None + + created_at: Optional[datetime] = None + + type: Optional[Literal["comment"]] = None + + +class DocumentEventChildEquationChildDivider(BaseModel): + id: Optional[str] = None + + type: Optional[Literal["divider"]] = None + + +class DocumentEventChildEquationChildImage(BaseModel): + src: str + + text: str + + id: Optional[str] = None + + type: Optional[Literal["image"]] = None + + +class DocumentEventChildEquationChildLink(BaseModel): + text: str + + url: str + + id: Optional[str] = None + + type: Optional[Literal["link"]] = None + + +class DocumentEventChildEquationChildLineBreak(BaseModel): + id: Optional[str] = None + + type: Optional[Literal["line_break"]] = None + + +class DocumentEventChildEquationChildText(BaseModel): + text: str + + id: Optional[str] = None + + marks: Optional[List[Literal["bold", "italic", "underline", "strikethrough", "code", "math"]]] = None + + type: Optional[Literal["text"]] = None + + +class DocumentEventChildEquationChildToolCall(BaseModel): + """A tool/function call made by the assistant.""" + + tool_call_id: str + + tool_name: str + + id: Optional[str] = None + + args: Optional[Dict[str, object]] = None + + type: Optional[Literal["tool_call"]] = None + + +class DocumentEventChildEquationChildToolResult(BaseModel): + """The result of a tool call.""" + + output: Union[str, Dict[str, object], List[object]] + + tool_call_id: str + + tool_name: str + + id: Optional[str] = None + + is_error: Optional[bool] = None + + type: Optional[Literal["tool_result"]] = None + + +class DocumentEventChildEquationChildTraceMessage(BaseModel): + """A message in an agent trace (user message, assistant message, or thinking).""" + + text: str + + id: Optional[str] = None + + message_type: Optional[Literal["message", "thinking"]] = None + + role: Optional[Literal["user", "assistant"]] = None + + timestamp: Optional[datetime] = None + + type: Optional[Literal["trace_message"]] = None + + +DocumentEventChildEquationChild: TypeAlias = Union[ + DocumentEventChildEquationChildBlob, + DocumentEventChildEquationChildCode, + DocumentEventChildEquationChildComment, + DocumentEventChildEquationChildDivider, + DocumentEventChildEquationChildImage, + DocumentEventChildEquationChildLink, + DocumentEventChildEquationChildLineBreak, + DocumentEventChildEquationChildText, + DocumentEventChildEquationChildToolCall, + DocumentEventChildEquationChildToolResult, + DocumentEventChildEquationChildTraceMessage, + object, +] + + +class DocumentEventChildEquation(BaseModel): + id: Optional[str] = None + + children: Optional[List[DocumentEventChildEquationChild]] = None + + text: Optional[str] = None + + type: Optional[Literal["equation"]] = None + + +class DocumentEventChildFootnoteChildBlob(BaseModel): + """Represents embedded binary data using data URI scheme. + + Format: data:[][;base64], + Example: data:text/html;base64,PGh0bWw+... + """ + + data: str + + mimetype: str + + id: Optional[str] = None + + type: Optional[Literal["blob"]] = None + + +class DocumentEventChildFootnoteChildCode(BaseModel): + text: str + + id: Optional[str] = None + + language: Optional[str] = None + + type: Optional[Literal["code"]] = None + + +class DocumentEventChildFootnoteChildComment(BaseModel): + text: str + + id: Optional[str] = None + + created_at: Optional[datetime] = None + + type: Optional[Literal["comment"]] = None + + +class DocumentEventChildFootnoteChildDivider(BaseModel): + id: Optional[str] = None + + type: Optional[Literal["divider"]] = None + + +class DocumentEventChildFootnoteChildImage(BaseModel): + src: str + + text: str + + id: Optional[str] = None + + type: Optional[Literal["image"]] = None + + +class DocumentEventChildFootnoteChildLink(BaseModel): + text: str + + url: str + + id: Optional[str] = None + + type: Optional[Literal["link"]] = None + + +class DocumentEventChildFootnoteChildLineBreak(BaseModel): + id: Optional[str] = None + + type: Optional[Literal["line_break"]] = None + + +class DocumentEventChildFootnoteChildText(BaseModel): + text: str + + id: Optional[str] = None + + marks: Optional[List[Literal["bold", "italic", "underline", "strikethrough", "code", "math"]]] = None + + type: Optional[Literal["text"]] = None + + +class DocumentEventChildFootnoteChildToolCall(BaseModel): + """A tool/function call made by the assistant.""" + + tool_call_id: str + + tool_name: str + + id: Optional[str] = None + + args: Optional[Dict[str, object]] = None + + type: Optional[Literal["tool_call"]] = None + + +class DocumentEventChildFootnoteChildToolResult(BaseModel): + """The result of a tool call.""" + + output: Union[str, Dict[str, object], List[object]] + + tool_call_id: str + + tool_name: str + + id: Optional[str] = None + + is_error: Optional[bool] = None + + type: Optional[Literal["tool_result"]] = None + + +class DocumentEventChildFootnoteChildTraceMessage(BaseModel): + """A message in an agent trace (user message, assistant message, or thinking).""" + + text: str + + id: Optional[str] = None + + message_type: Optional[Literal["message", "thinking"]] = None + + role: Optional[Literal["user", "assistant"]] = None + + timestamp: Optional[datetime] = None + + type: Optional[Literal["trace_message"]] = None + + +DocumentEventChildFootnoteChild: TypeAlias = Union[ + DocumentEventChildFootnoteChildBlob, + DocumentEventChildFootnoteChildCode, + DocumentEventChildFootnoteChildComment, + DocumentEventChildFootnoteChildDivider, + DocumentEventChildFootnoteChildImage, + DocumentEventChildFootnoteChildLink, + DocumentEventChildFootnoteChildLineBreak, + DocumentEventChildFootnoteChildText, + DocumentEventChildFootnoteChildToolCall, + DocumentEventChildFootnoteChildToolResult, + DocumentEventChildFootnoteChildTraceMessage, + object, +] + + +class DocumentEventChildFootnote(BaseModel): + id: Optional[str] = None + + children: Optional[List[DocumentEventChildFootnoteChild]] = None + + text: Optional[str] = None + + type: Optional[Literal["footnote"]] = None + + +class DocumentEventChildHeadingChildBlob(BaseModel): + """Represents embedded binary data using data URI scheme. + + Format: data:[][;base64], + Example: data:text/html;base64,PGh0bWw+... + """ + + data: str + + mimetype: str + + id: Optional[str] = None + + type: Optional[Literal["blob"]] = None + + +class DocumentEventChildHeadingChildCode(BaseModel): + text: str + + id: Optional[str] = None + + language: Optional[str] = None + + type: Optional[Literal["code"]] = None + + +class DocumentEventChildHeadingChildComment(BaseModel): + text: str + + id: Optional[str] = None + + created_at: Optional[datetime] = None + + type: Optional[Literal["comment"]] = None + + +class DocumentEventChildHeadingChildDivider(BaseModel): + id: Optional[str] = None + + type: Optional[Literal["divider"]] = None + + +class DocumentEventChildHeadingChildImage(BaseModel): + src: str + + text: str + + id: Optional[str] = None + + type: Optional[Literal["image"]] = None + + +class DocumentEventChildHeadingChildLink(BaseModel): + text: str + + url: str + + id: Optional[str] = None + + type: Optional[Literal["link"]] = None + + +class DocumentEventChildHeadingChildLineBreak(BaseModel): + id: Optional[str] = None + + type: Optional[Literal["line_break"]] = None + + +class DocumentEventChildHeadingChildText(BaseModel): + text: str + + id: Optional[str] = None + + marks: Optional[List[Literal["bold", "italic", "underline", "strikethrough", "code", "math"]]] = None + + type: Optional[Literal["text"]] = None + + +class DocumentEventChildHeadingChildToolCall(BaseModel): + """A tool/function call made by the assistant.""" + + tool_call_id: str + + tool_name: str + + id: Optional[str] = None + + args: Optional[Dict[str, object]] = None + + type: Optional[Literal["tool_call"]] = None + + +class DocumentEventChildHeadingChildToolResult(BaseModel): + """The result of a tool call.""" + + output: Union[str, Dict[str, object], List[object]] + + tool_call_id: str + + tool_name: str + + id: Optional[str] = None + + is_error: Optional[bool] = None + + type: Optional[Literal["tool_result"]] = None + + +class DocumentEventChildHeadingChildTraceMessage(BaseModel): + """A message in an agent trace (user message, assistant message, or thinking).""" + + text: str + + id: Optional[str] = None + + message_type: Optional[Literal["message", "thinking"]] = None + + role: Optional[Literal["user", "assistant"]] = None + + timestamp: Optional[datetime] = None + + type: Optional[Literal["trace_message"]] = None + + +DocumentEventChildHeadingChild: TypeAlias = Union[ + DocumentEventChildHeadingChildBlob, + DocumentEventChildHeadingChildCode, + DocumentEventChildHeadingChildComment, + DocumentEventChildHeadingChildDivider, + DocumentEventChildHeadingChildImage, + DocumentEventChildHeadingChildLink, + DocumentEventChildHeadingChildLineBreak, + DocumentEventChildHeadingChildText, + DocumentEventChildHeadingChildToolCall, + DocumentEventChildHeadingChildToolResult, + DocumentEventChildHeadingChildTraceMessage, + object, +] + + +class DocumentEventChildHeading(BaseModel): + level: int + + id: Optional[str] = None + + children: Optional[List[DocumentEventChildHeadingChild]] = None + + text: Optional[str] = None + + type: Optional[Literal["heading"]] = None + + +class DocumentEventChildImage(BaseModel): + src: str + + text: str + + id: Optional[str] = None + + type: Optional[Literal["image"]] = None + + +class DocumentEventChildLink(BaseModel): + text: str + + url: str + + id: Optional[str] = None + + type: Optional[Literal["link"]] = None + + +class DocumentEventChildLineBreak(BaseModel): + id: Optional[str] = None + + type: Optional[Literal["line_break"]] = None + + +class DocumentEventChildList(BaseModel): + id: Optional[str] = None + + children: Optional[List[object]] = None + + ordered: Optional[bool] = None + + text: Optional[str] = None + + type: Optional[Literal["list"]] = None + + +class DocumentEventChildListItemChildBlob(BaseModel): + """Represents embedded binary data using data URI scheme. + + Format: data:[][;base64], + Example: data:text/html;base64,PGh0bWw+... + """ + + data: str + + mimetype: str + + id: Optional[str] = None + + type: Optional[Literal["blob"]] = None + + +class DocumentEventChildListItemChildCode(BaseModel): + text: str + + id: Optional[str] = None + + language: Optional[str] = None + + type: Optional[Literal["code"]] = None + + +class DocumentEventChildListItemChildComment(BaseModel): + text: str + + id: Optional[str] = None + + created_at: Optional[datetime] = None + + type: Optional[Literal["comment"]] = None + + +class DocumentEventChildListItemChildDivider(BaseModel): + id: Optional[str] = None + + type: Optional[Literal["divider"]] = None + + +class DocumentEventChildListItemChildImage(BaseModel): + src: str + + text: str + + id: Optional[str] = None + + type: Optional[Literal["image"]] = None + + +class DocumentEventChildListItemChildLink(BaseModel): + text: str + + url: str + + id: Optional[str] = None + + type: Optional[Literal["link"]] = None + + +class DocumentEventChildListItemChildLineBreak(BaseModel): + id: Optional[str] = None + + type: Optional[Literal["line_break"]] = None + + +class DocumentEventChildListItemChildText(BaseModel): + text: str + + id: Optional[str] = None + + marks: Optional[List[Literal["bold", "italic", "underline", "strikethrough", "code", "math"]]] = None + + type: Optional[Literal["text"]] = None + + +class DocumentEventChildListItemChildToolCall(BaseModel): + """A tool/function call made by the assistant.""" + + tool_call_id: str + + tool_name: str + + id: Optional[str] = None + + args: Optional[Dict[str, object]] = None + + type: Optional[Literal["tool_call"]] = None + + +class DocumentEventChildListItemChildToolResult(BaseModel): + """The result of a tool call.""" + + output: Union[str, Dict[str, object], List[object]] + + tool_call_id: str + + tool_name: str + + id: Optional[str] = None + + is_error: Optional[bool] = None + + type: Optional[Literal["tool_result"]] = None + + +class DocumentEventChildListItemChildTraceMessage(BaseModel): + """A message in an agent trace (user message, assistant message, or thinking).""" + + text: str + + id: Optional[str] = None + + message_type: Optional[Literal["message", "thinking"]] = None + + role: Optional[Literal["user", "assistant"]] = None + + timestamp: Optional[datetime] = None + + type: Optional[Literal["trace_message"]] = None + + +DocumentEventChildListItemChild: TypeAlias = Union[ + DocumentEventChildListItemChildBlob, + DocumentEventChildListItemChildCode, + DocumentEventChildListItemChildComment, + DocumentEventChildListItemChildDivider, + DocumentEventChildListItemChildImage, + DocumentEventChildListItemChildLink, + DocumentEventChildListItemChildLineBreak, + DocumentEventChildListItemChildText, + DocumentEventChildListItemChildToolCall, + DocumentEventChildListItemChildToolResult, + DocumentEventChildListItemChildTraceMessage, + object, +] + + +class DocumentEventChildListItem(BaseModel): + id: Optional[str] = None + + children: Optional[List[DocumentEventChildListItemChild]] = None + + text: Optional[str] = None + + type: Optional[Literal["list_item"]] = None + + +class DocumentEventChildParagraphChildBlob(BaseModel): + """Represents embedded binary data using data URI scheme. + + Format: data:[][;base64], + Example: data:text/html;base64,PGh0bWw+... + """ + + data: str + + mimetype: str + + id: Optional[str] = None + + type: Optional[Literal["blob"]] = None + + +class DocumentEventChildParagraphChildCode(BaseModel): + text: str + + id: Optional[str] = None + + language: Optional[str] = None + + type: Optional[Literal["code"]] = None + + +class DocumentEventChildParagraphChildComment(BaseModel): + text: str + + id: Optional[str] = None + + created_at: Optional[datetime] = None + + type: Optional[Literal["comment"]] = None + + +class DocumentEventChildParagraphChildDivider(BaseModel): + id: Optional[str] = None + + type: Optional[Literal["divider"]] = None + + +class DocumentEventChildParagraphChildImage(BaseModel): + src: str + + text: str + + id: Optional[str] = None + + type: Optional[Literal["image"]] = None + + +class DocumentEventChildParagraphChildLink(BaseModel): + text: str + + url: str + + id: Optional[str] = None + + type: Optional[Literal["link"]] = None + + +class DocumentEventChildParagraphChildLineBreak(BaseModel): + id: Optional[str] = None + + type: Optional[Literal["line_break"]] = None + + +class DocumentEventChildParagraphChildText(BaseModel): + text: str + + id: Optional[str] = None + + marks: Optional[List[Literal["bold", "italic", "underline", "strikethrough", "code", "math"]]] = None + + type: Optional[Literal["text"]] = None + + +class DocumentEventChildParagraphChildToolCall(BaseModel): + """A tool/function call made by the assistant.""" + + tool_call_id: str + + tool_name: str + + id: Optional[str] = None + + args: Optional[Dict[str, object]] = None + + type: Optional[Literal["tool_call"]] = None + + +class DocumentEventChildParagraphChildToolResult(BaseModel): + """The result of a tool call.""" + + output: Union[str, Dict[str, object], List[object]] + + tool_call_id: str + + tool_name: str + + id: Optional[str] = None + + is_error: Optional[bool] = None + + type: Optional[Literal["tool_result"]] = None + + +class DocumentEventChildParagraphChildTraceMessage(BaseModel): + """A message in an agent trace (user message, assistant message, or thinking).""" + + text: str + + id: Optional[str] = None + + message_type: Optional[Literal["message", "thinking"]] = None + + role: Optional[Literal["user", "assistant"]] = None + + timestamp: Optional[datetime] = None + + type: Optional[Literal["trace_message"]] = None + + +DocumentEventChildParagraphChild: TypeAlias = Union[ + DocumentEventChildParagraphChildBlob, + DocumentEventChildParagraphChildCode, + DocumentEventChildParagraphChildComment, + DocumentEventChildParagraphChildDivider, + DocumentEventChildParagraphChildImage, + DocumentEventChildParagraphChildLink, + DocumentEventChildParagraphChildLineBreak, + DocumentEventChildParagraphChildText, + DocumentEventChildParagraphChildToolCall, + DocumentEventChildParagraphChildToolResult, + DocumentEventChildParagraphChildTraceMessage, + object, +] + + +class DocumentEventChildParagraph(BaseModel): + id: Optional[str] = None + + children: Optional[List[DocumentEventChildParagraphChild]] = None + + text: Optional[str] = None + + type: Optional[Literal["paragraph"]] = None + + +class DocumentEventChildQuoteChildBlob(BaseModel): + """Represents embedded binary data using data URI scheme. + + Format: data:[][;base64], + Example: data:text/html;base64,PGh0bWw+... + """ + + data: str + + mimetype: str + + id: Optional[str] = None + + type: Optional[Literal["blob"]] = None + + +class DocumentEventChildQuoteChildCode(BaseModel): + text: str + + id: Optional[str] = None + + language: Optional[str] = None + + type: Optional[Literal["code"]] = None + + +class DocumentEventChildQuoteChildComment(BaseModel): + text: str + + id: Optional[str] = None + + created_at: Optional[datetime] = None + + type: Optional[Literal["comment"]] = None + + +class DocumentEventChildQuoteChildDivider(BaseModel): + id: Optional[str] = None + + type: Optional[Literal["divider"]] = None + + +class DocumentEventChildQuoteChildImage(BaseModel): + src: str + + text: str + + id: Optional[str] = None + + type: Optional[Literal["image"]] = None + + +class DocumentEventChildQuoteChildLink(BaseModel): + text: str + + url: str + + id: Optional[str] = None + + type: Optional[Literal["link"]] = None + + +class DocumentEventChildQuoteChildLineBreak(BaseModel): + id: Optional[str] = None + + type: Optional[Literal["line_break"]] = None + + +class DocumentEventChildQuoteChildText(BaseModel): + text: str + + id: Optional[str] = None + + marks: Optional[List[Literal["bold", "italic", "underline", "strikethrough", "code", "math"]]] = None + + type: Optional[Literal["text"]] = None + + +class DocumentEventChildQuoteChildToolCall(BaseModel): + """A tool/function call made by the assistant.""" + + tool_call_id: str + + tool_name: str + + id: Optional[str] = None + + args: Optional[Dict[str, object]] = None + + type: Optional[Literal["tool_call"]] = None + + +class DocumentEventChildQuoteChildToolResult(BaseModel): + """The result of a tool call.""" + + output: Union[str, Dict[str, object], List[object]] + + tool_call_id: str + + tool_name: str + + id: Optional[str] = None + + is_error: Optional[bool] = None + + type: Optional[Literal["tool_result"]] = None + + +class DocumentEventChildQuoteChildTraceMessage(BaseModel): + """A message in an agent trace (user message, assistant message, or thinking).""" + + text: str + + id: Optional[str] = None + + message_type: Optional[Literal["message", "thinking"]] = None + + role: Optional[Literal["user", "assistant"]] = None + + timestamp: Optional[datetime] = None + + type: Optional[Literal["trace_message"]] = None + + +DocumentEventChildQuoteChild: TypeAlias = Union[ + DocumentEventChildQuoteChildBlob, + DocumentEventChildQuoteChildCode, + DocumentEventChildQuoteChildComment, + DocumentEventChildQuoteChildDivider, + DocumentEventChildQuoteChildImage, + DocumentEventChildQuoteChildLink, + DocumentEventChildQuoteChildLineBreak, + DocumentEventChildQuoteChildText, + DocumentEventChildQuoteChildToolCall, + DocumentEventChildQuoteChildToolResult, + DocumentEventChildQuoteChildTraceMessage, + object, +] + + +class DocumentEventChildQuote(BaseModel): + id: Optional[str] = None + + children: Optional[List[DocumentEventChildQuoteChild]] = None + + text: Optional[str] = None + + type: Optional[Literal["quote"]] = None + + +class DocumentEventChildTable(BaseModel): + id: Optional[str] = None + + children: Optional[List[object]] = None + + has_header: Optional[bool] = None + """Whether the first row should be treated as a header""" + + text: Optional[str] = None + + type: Optional[Literal["table"]] = None + + +class DocumentEventChildTableCellChildBlob(BaseModel): + """Represents embedded binary data using data URI scheme. + + Format: data:[][;base64], + Example: data:text/html;base64,PGh0bWw+... + """ + + data: str + + mimetype: str + + id: Optional[str] = None + + type: Optional[Literal["blob"]] = None + + +class DocumentEventChildTableCellChildCode(BaseModel): + text: str + + id: Optional[str] = None + + language: Optional[str] = None + + type: Optional[Literal["code"]] = None + + +class DocumentEventChildTableCellChildComment(BaseModel): + text: str + + id: Optional[str] = None + + created_at: Optional[datetime] = None + + type: Optional[Literal["comment"]] = None + + +class DocumentEventChildTableCellChildDivider(BaseModel): + id: Optional[str] = None + + type: Optional[Literal["divider"]] = None + + +class DocumentEventChildTableCellChildImage(BaseModel): + src: str + + text: str + + id: Optional[str] = None + + type: Optional[Literal["image"]] = None + + +class DocumentEventChildTableCellChildLink(BaseModel): + text: str + + url: str + + id: Optional[str] = None + + type: Optional[Literal["link"]] = None + + +class DocumentEventChildTableCellChildLineBreak(BaseModel): + id: Optional[str] = None + + type: Optional[Literal["line_break"]] = None + + +class DocumentEventChildTableCellChildText(BaseModel): + text: str + + id: Optional[str] = None + + marks: Optional[List[Literal["bold", "italic", "underline", "strikethrough", "code", "math"]]] = None + + type: Optional[Literal["text"]] = None + + +class DocumentEventChildTableCellChildToolCall(BaseModel): + """A tool/function call made by the assistant.""" + + tool_call_id: str + + tool_name: str + + id: Optional[str] = None + + args: Optional[Dict[str, object]] = None + + type: Optional[Literal["tool_call"]] = None + + +class DocumentEventChildTableCellChildToolResult(BaseModel): + """The result of a tool call.""" + + output: Union[str, Dict[str, object], List[object]] + + tool_call_id: str + + tool_name: str + + id: Optional[str] = None + + is_error: Optional[bool] = None + + type: Optional[Literal["tool_result"]] = None + + +class DocumentEventChildTableCellChildTraceMessage(BaseModel): + """A message in an agent trace (user message, assistant message, or thinking).""" + + text: str + + id: Optional[str] = None + + message_type: Optional[Literal["message", "thinking"]] = None + + role: Optional[Literal["user", "assistant"]] = None + + timestamp: Optional[datetime] = None + + type: Optional[Literal["trace_message"]] = None + + +DocumentEventChildTableCellChild: TypeAlias = Union[ + DocumentEventChildTableCellChildBlob, + DocumentEventChildTableCellChildCode, + DocumentEventChildTableCellChildComment, + DocumentEventChildTableCellChildDivider, + DocumentEventChildTableCellChildImage, + DocumentEventChildTableCellChildLink, + DocumentEventChildTableCellChildLineBreak, + DocumentEventChildTableCellChildText, + DocumentEventChildTableCellChildToolCall, + DocumentEventChildTableCellChildToolResult, + DocumentEventChildTableCellChildTraceMessage, + object, +] + + +class DocumentEventChildTableCell(BaseModel): + id: Optional[str] = None + + align: Optional[Literal["left", "center", "right"]] = None + + children: Optional[List[DocumentEventChildTableCellChild]] = None + + text: Optional[str] = None + + type: Optional[Literal["table_cell"]] = None + + +class DocumentEventChildTableRow(BaseModel): + id: Optional[str] = None + + children: Optional[List[object]] = None + + text: Optional[str] = None + + type: Optional[Literal["table_row"]] = None + + +class DocumentEventChildText(BaseModel): + text: str + + id: Optional[str] = None + + marks: Optional[List[Literal["bold", "italic", "underline", "strikethrough", "code", "math"]]] = None + + type: Optional[Literal["text"]] = None + + +class DocumentEventChildToDoChildBlob(BaseModel): + """Represents embedded binary data using data URI scheme. + + Format: data:[][;base64], + Example: data:text/html;base64,PGh0bWw+... + """ + + data: str + + mimetype: str + + id: Optional[str] = None + + type: Optional[Literal["blob"]] = None + + +class DocumentEventChildToDoChildCode(BaseModel): + text: str + + id: Optional[str] = None + + language: Optional[str] = None + + type: Optional[Literal["code"]] = None + + +class DocumentEventChildToDoChildComment(BaseModel): + text: str + + id: Optional[str] = None + + created_at: Optional[datetime] = None + + type: Optional[Literal["comment"]] = None + + +class DocumentEventChildToDoChildDivider(BaseModel): + id: Optional[str] = None + + type: Optional[Literal["divider"]] = None + + +class DocumentEventChildToDoChildImage(BaseModel): + src: str + + text: str + + id: Optional[str] = None + + type: Optional[Literal["image"]] = None + + +class DocumentEventChildToDoChildLink(BaseModel): + text: str + + url: str + + id: Optional[str] = None + + type: Optional[Literal["link"]] = None + + +class DocumentEventChildToDoChildLineBreak(BaseModel): + id: Optional[str] = None + + type: Optional[Literal["line_break"]] = None + + +class DocumentEventChildToDoChildText(BaseModel): + text: str + + id: Optional[str] = None + + marks: Optional[List[Literal["bold", "italic", "underline", "strikethrough", "code", "math"]]] = None + + type: Optional[Literal["text"]] = None + + +class DocumentEventChildToDoChildToolCall(BaseModel): + """A tool/function call made by the assistant.""" + + tool_call_id: str + + tool_name: str + + id: Optional[str] = None + + args: Optional[Dict[str, object]] = None + + type: Optional[Literal["tool_call"]] = None + + +class DocumentEventChildToDoChildToolResult(BaseModel): + """The result of a tool call.""" + + output: Union[str, Dict[str, object], List[object]] + + tool_call_id: str + + tool_name: str + + id: Optional[str] = None + + is_error: Optional[bool] = None + + type: Optional[Literal["tool_result"]] = None + + +class DocumentEventChildToDoChildTraceMessage(BaseModel): + """A message in an agent trace (user message, assistant message, or thinking).""" + + text: str + + id: Optional[str] = None + + message_type: Optional[Literal["message", "thinking"]] = None + + role: Optional[Literal["user", "assistant"]] = None + + timestamp: Optional[datetime] = None + + type: Optional[Literal["trace_message"]] = None + + +DocumentEventChildToDoChild: TypeAlias = Union[ + DocumentEventChildToDoChildBlob, + DocumentEventChildToDoChildCode, + DocumentEventChildToDoChildComment, + DocumentEventChildToDoChildDivider, + DocumentEventChildToDoChildImage, + DocumentEventChildToDoChildLink, + DocumentEventChildToDoChildLineBreak, + DocumentEventChildToDoChildText, + DocumentEventChildToDoChildToolCall, + DocumentEventChildToDoChildToolResult, + DocumentEventChildToDoChildTraceMessage, + object, +] + + +class DocumentEventChildToDo(BaseModel): + id: Optional[str] = None + + checked: Optional[bool] = None + + children: Optional[List[DocumentEventChildToDoChild]] = None + + text: Optional[str] = None + + type: Optional[Literal["todo"]] = None + + +class DocumentEventChildToolCall(BaseModel): + """A tool/function call made by the assistant.""" + + tool_call_id: str + + tool_name: str + + id: Optional[str] = None + + args: Optional[Dict[str, object]] = None + + type: Optional[Literal["tool_call"]] = None + + +class DocumentEventChildToolResult(BaseModel): + """The result of a tool call.""" + + output: Union[str, Dict[str, object], List[object]] + + tool_call_id: str + + tool_name: str + + id: Optional[str] = None + + is_error: Optional[bool] = None + + type: Optional[Literal["tool_result"]] = None + + +class DocumentEventChildTraceMessage(BaseModel): + """A message in an agent trace (user message, assistant message, or thinking).""" + + text: str + + id: Optional[str] = None + + message_type: Optional[Literal["message", "thinking"]] = None + + role: Optional[Literal["user", "assistant"]] = None + + timestamp: Optional[datetime] = None + + type: Optional[Literal["trace_message"]] = None + + +class DocumentEventChildUtterance(BaseModel): + """A speaker-attributed segment of a transcript (ENG-2476/D10). + + "Utterance" is the standard name for this across transcription providers + (AssemblyAI, Deepgram, Rev). Timestamps are relative offsets in seconds — + provider-native; absolute times derive from `Transcript.started_at`. + """ + + text: str + + id: Optional[str] = None + + end: Optional[float] = None + + speaker: Optional[object] = None + + start: Optional[float] = None + + type: Optional[Literal["utterance"]] = None + + +DocumentEventChild: TypeAlias = Annotated[ + Union[ + DocumentEventChildBlob, + DocumentEventChildCallout, + DocumentEventChildChunk, + DocumentEventChildCode, + DocumentEventChildComment, + DocumentEventChildDivider, + DocumentEventChildEquation, + DocumentEventChildFootnote, + DocumentEventChildHeading, + DocumentEventChildImage, + DocumentEventChildLink, + DocumentEventChildLineBreak, + DocumentEventChildList, + DocumentEventChildListItem, + DocumentEventChildParagraph, + DocumentEventChildQuote, + DocumentEventChildTable, + DocumentEventChildTableCell, + DocumentEventChildTableRow, + DocumentEventChildText, + DocumentEventChildToDo, + DocumentEventChildToolCall, + DocumentEventChildToolResult, + DocumentEventChildTraceMessage, + DocumentEventChildUtterance, + ], + PropertyInfo(discriminator="type"), +] + + +class DocumentEvent(BaseModel): + id: Optional[str] = None + + attendees: Optional[List[DocumentEventAttendee]] = None + + children: Optional[List[DocumentEventChild]] = None + + end_at: Optional[datetime] = None + + location: Optional[str] = None + + meeting_url: Optional[str] = None + + start_at: Optional[datetime] = None + + text: Optional[str] = None + + title: Optional[str] = None + + type: Optional[Literal["event"]] = None + + +class DocumentFileChildBlob(BaseModel): + """Represents embedded binary data using data URI scheme. + + Format: data:[][;base64], + Example: data:text/html;base64,PGh0bWw+... + """ + + data: str + + mimetype: str + + id: Optional[str] = None + + type: Optional[Literal["blob"]] = None + + +class DocumentFileChildCalloutChildBlob(BaseModel): + """Represents embedded binary data using data URI scheme. + + Format: data:[][;base64], + Example: data:text/html;base64,PGh0bWw+... + """ + + data: str + + mimetype: str + + id: Optional[str] = None + + type: Optional[Literal["blob"]] = None + + +class DocumentFileChildCalloutChildCode(BaseModel): + text: str + + id: Optional[str] = None + + language: Optional[str] = None + + type: Optional[Literal["code"]] = None + + +class DocumentFileChildCalloutChildComment(BaseModel): + text: str + + id: Optional[str] = None + + created_at: Optional[datetime] = None + + type: Optional[Literal["comment"]] = None + + +class DocumentFileChildCalloutChildDivider(BaseModel): + id: Optional[str] = None + + type: Optional[Literal["divider"]] = None + + +class DocumentFileChildCalloutChildImage(BaseModel): + src: str + + text: str + + id: Optional[str] = None + + type: Optional[Literal["image"]] = None + + +class DocumentFileChildCalloutChildLink(BaseModel): + text: str + + url: str + + id: Optional[str] = None + + type: Optional[Literal["link"]] = None + + +class DocumentFileChildCalloutChildLineBreak(BaseModel): + id: Optional[str] = None + + type: Optional[Literal["line_break"]] = None + + +class DocumentFileChildCalloutChildText(BaseModel): + text: str + + id: Optional[str] = None + + marks: Optional[List[Literal["bold", "italic", "underline", "strikethrough", "code", "math"]]] = None + + type: Optional[Literal["text"]] = None + + +class DocumentFileChildCalloutChildToolCall(BaseModel): + """A tool/function call made by the assistant.""" + + tool_call_id: str + + tool_name: str + + id: Optional[str] = None + + args: Optional[Dict[str, object]] = None + + type: Optional[Literal["tool_call"]] = None + + +class DocumentFileChildCalloutChildToolResult(BaseModel): + """The result of a tool call.""" + + output: Union[str, Dict[str, object], List[object]] + + tool_call_id: str + + tool_name: str + + id: Optional[str] = None + + is_error: Optional[bool] = None + + type: Optional[Literal["tool_result"]] = None + + +class DocumentFileChildCalloutChildTraceMessage(BaseModel): + """A message in an agent trace (user message, assistant message, or thinking).""" + + text: str + + id: Optional[str] = None + + message_type: Optional[Literal["message", "thinking"]] = None + + role: Optional[Literal["user", "assistant"]] = None + + timestamp: Optional[datetime] = None + + type: Optional[Literal["trace_message"]] = None + + +DocumentFileChildCalloutChild: TypeAlias = Union[ + DocumentFileChildCalloutChildBlob, + DocumentFileChildCalloutChildCode, + DocumentFileChildCalloutChildComment, + DocumentFileChildCalloutChildDivider, + DocumentFileChildCalloutChildImage, + DocumentFileChildCalloutChildLink, + DocumentFileChildCalloutChildLineBreak, + DocumentFileChildCalloutChildText, + DocumentFileChildCalloutChildToolCall, + DocumentFileChildCalloutChildToolResult, + DocumentFileChildCalloutChildTraceMessage, + object, +] + + +class DocumentFileChildCallout(BaseModel): + id: Optional[str] = None + + children: Optional[List[DocumentFileChildCalloutChild]] = None + + text: Optional[str] = None + + title: Optional[str] = None + + type: Optional[Literal["callout"]] = None + + +class DocumentFileChildChunkChildBlob(BaseModel): + """Represents embedded binary data using data URI scheme. + + Format: data:[][;base64], + Example: data:text/html;base64,PGh0bWw+... + """ + + data: str + + mimetype: str + + id: Optional[str] = None + + type: Optional[Literal["blob"]] = None + + +class DocumentFileChildChunkChildCode(BaseModel): + text: str + + id: Optional[str] = None + + language: Optional[str] = None + + type: Optional[Literal["code"]] = None + + +class DocumentFileChildChunkChildComment(BaseModel): + text: str + + id: Optional[str] = None + + created_at: Optional[datetime] = None + + type: Optional[Literal["comment"]] = None + + +class DocumentFileChildChunkChildDivider(BaseModel): + id: Optional[str] = None + + type: Optional[Literal["divider"]] = None + + +class DocumentFileChildChunkChildImage(BaseModel): + src: str + + text: str + + id: Optional[str] = None + + type: Optional[Literal["image"]] = None + + +class DocumentFileChildChunkChildLink(BaseModel): + text: str + + url: str + + id: Optional[str] = None + + type: Optional[Literal["link"]] = None + + +class DocumentFileChildChunkChildLineBreak(BaseModel): + id: Optional[str] = None + + type: Optional[Literal["line_break"]] = None + + +class DocumentFileChildChunkChildText(BaseModel): + text: str + + id: Optional[str] = None + + marks: Optional[List[Literal["bold", "italic", "underline", "strikethrough", "code", "math"]]] = None + + type: Optional[Literal["text"]] = None + + +class DocumentFileChildChunkChildToolCall(BaseModel): + """A tool/function call made by the assistant.""" + + tool_call_id: str + + tool_name: str + + id: Optional[str] = None + + args: Optional[Dict[str, object]] = None + + type: Optional[Literal["tool_call"]] = None + + +class DocumentFileChildChunkChildToolResult(BaseModel): + """The result of a tool call.""" + + output: Union[str, Dict[str, object], List[object]] + + tool_call_id: str + + tool_name: str + + id: Optional[str] = None + + is_error: Optional[bool] = None + + type: Optional[Literal["tool_result"]] = None + + +class DocumentFileChildChunkChildTraceMessage(BaseModel): + """A message in an agent trace (user message, assistant message, or thinking).""" + + text: str + + id: Optional[str] = None + + message_type: Optional[Literal["message", "thinking"]] = None + + role: Optional[Literal["user", "assistant"]] = None + + timestamp: Optional[datetime] = None + + type: Optional[Literal["trace_message"]] = None + + +DocumentFileChildChunkChild: TypeAlias = Union[ + DocumentFileChildChunkChildBlob, + DocumentFileChildChunkChildCode, + DocumentFileChildChunkChildComment, + DocumentFileChildChunkChildDivider, + DocumentFileChildChunkChildImage, + DocumentFileChildChunkChildLink, + DocumentFileChildChunkChildLineBreak, + DocumentFileChildChunkChildText, + DocumentFileChildChunkChildToolCall, + DocumentFileChildChunkChildToolResult, + DocumentFileChildChunkChildTraceMessage, + object, +] + + +class DocumentFileChildChunk(BaseModel): + id: Optional[str] = None + + children: Optional[List[DocumentFileChildChunkChild]] = None + + text: Optional[str] = None + + type: Optional[Literal["chunk"]] = None + + +class DocumentFileChildCode(BaseModel): + text: str + + id: Optional[str] = None + + language: Optional[str] = None + + type: Optional[Literal["code"]] = None + + +class DocumentFileChildComment(BaseModel): + text: str + + id: Optional[str] = None + + created_at: Optional[datetime] = None + + type: Optional[Literal["comment"]] = None + + +class DocumentFileChildDivider(BaseModel): + id: Optional[str] = None + + type: Optional[Literal["divider"]] = None + + +class DocumentFileChildEquationChildBlob(BaseModel): + """Represents embedded binary data using data URI scheme. + + Format: data:[][;base64], + Example: data:text/html;base64,PGh0bWw+... + """ + + data: str + + mimetype: str + + id: Optional[str] = None + + type: Optional[Literal["blob"]] = None + + +class DocumentFileChildEquationChildCode(BaseModel): + text: str + + id: Optional[str] = None + + language: Optional[str] = None + + type: Optional[Literal["code"]] = None + + +class DocumentFileChildEquationChildComment(BaseModel): + text: str + + id: Optional[str] = None + + created_at: Optional[datetime] = None + + type: Optional[Literal["comment"]] = None + + +class DocumentFileChildEquationChildDivider(BaseModel): + id: Optional[str] = None + + type: Optional[Literal["divider"]] = None + + +class DocumentFileChildEquationChildImage(BaseModel): + src: str + + text: str + + id: Optional[str] = None + + type: Optional[Literal["image"]] = None + + +class DocumentFileChildEquationChildLink(BaseModel): + text: str + + url: str + + id: Optional[str] = None + + type: Optional[Literal["link"]] = None + + +class DocumentFileChildEquationChildLineBreak(BaseModel): + id: Optional[str] = None + + type: Optional[Literal["line_break"]] = None + + +class DocumentFileChildEquationChildText(BaseModel): + text: str + + id: Optional[str] = None + + marks: Optional[List[Literal["bold", "italic", "underline", "strikethrough", "code", "math"]]] = None + + type: Optional[Literal["text"]] = None + + +class DocumentFileChildEquationChildToolCall(BaseModel): + """A tool/function call made by the assistant.""" + + tool_call_id: str + + tool_name: str + + id: Optional[str] = None + + args: Optional[Dict[str, object]] = None + + type: Optional[Literal["tool_call"]] = None + + +class DocumentFileChildEquationChildToolResult(BaseModel): + """The result of a tool call.""" + + output: Union[str, Dict[str, object], List[object]] + + tool_call_id: str + + tool_name: str + + id: Optional[str] = None + + is_error: Optional[bool] = None + + type: Optional[Literal["tool_result"]] = None + + +class DocumentFileChildEquationChildTraceMessage(BaseModel): + """A message in an agent trace (user message, assistant message, or thinking).""" + + text: str + + id: Optional[str] = None + + message_type: Optional[Literal["message", "thinking"]] = None + + role: Optional[Literal["user", "assistant"]] = None + + timestamp: Optional[datetime] = None + + type: Optional[Literal["trace_message"]] = None + + +DocumentFileChildEquationChild: TypeAlias = Union[ + DocumentFileChildEquationChildBlob, + DocumentFileChildEquationChildCode, + DocumentFileChildEquationChildComment, + DocumentFileChildEquationChildDivider, + DocumentFileChildEquationChildImage, + DocumentFileChildEquationChildLink, + DocumentFileChildEquationChildLineBreak, + DocumentFileChildEquationChildText, + DocumentFileChildEquationChildToolCall, + DocumentFileChildEquationChildToolResult, + DocumentFileChildEquationChildTraceMessage, + object, +] + + +class DocumentFileChildEquation(BaseModel): + id: Optional[str] = None + + children: Optional[List[DocumentFileChildEquationChild]] = None + + text: Optional[str] = None + + type: Optional[Literal["equation"]] = None + + +class DocumentFileChildFootnoteChildBlob(BaseModel): + """Represents embedded binary data using data URI scheme. + + Format: data:[][;base64], + Example: data:text/html;base64,PGh0bWw+... + """ + + data: str + + mimetype: str + + id: Optional[str] = None + + type: Optional[Literal["blob"]] = None + + +class DocumentFileChildFootnoteChildCode(BaseModel): + text: str + + id: Optional[str] = None + + language: Optional[str] = None + + type: Optional[Literal["code"]] = None + + +class DocumentFileChildFootnoteChildComment(BaseModel): + text: str + + id: Optional[str] = None + + created_at: Optional[datetime] = None + + type: Optional[Literal["comment"]] = None + + +class DocumentFileChildFootnoteChildDivider(BaseModel): + id: Optional[str] = None + + type: Optional[Literal["divider"]] = None + + +class DocumentFileChildFootnoteChildImage(BaseModel): + src: str + + text: str + + id: Optional[str] = None + + type: Optional[Literal["image"]] = None + + +class DocumentFileChildFootnoteChildLink(BaseModel): + text: str + + url: str + + id: Optional[str] = None + + type: Optional[Literal["link"]] = None + + +class DocumentFileChildFootnoteChildLineBreak(BaseModel): + id: Optional[str] = None + + type: Optional[Literal["line_break"]] = None + + +class DocumentFileChildFootnoteChildText(BaseModel): + text: str + + id: Optional[str] = None + + marks: Optional[List[Literal["bold", "italic", "underline", "strikethrough", "code", "math"]]] = None + + type: Optional[Literal["text"]] = None + + +class DocumentFileChildFootnoteChildToolCall(BaseModel): + """A tool/function call made by the assistant.""" + + tool_call_id: str + + tool_name: str + + id: Optional[str] = None + + args: Optional[Dict[str, object]] = None + + type: Optional[Literal["tool_call"]] = None + + +class DocumentFileChildFootnoteChildToolResult(BaseModel): + """The result of a tool call.""" + + output: Union[str, Dict[str, object], List[object]] + + tool_call_id: str + + tool_name: str + + id: Optional[str] = None + + is_error: Optional[bool] = None + + type: Optional[Literal["tool_result"]] = None + + +class DocumentFileChildFootnoteChildTraceMessage(BaseModel): + """A message in an agent trace (user message, assistant message, or thinking).""" + + text: str + + id: Optional[str] = None + + message_type: Optional[Literal["message", "thinking"]] = None + + role: Optional[Literal["user", "assistant"]] = None + + timestamp: Optional[datetime] = None + + type: Optional[Literal["trace_message"]] = None + + +DocumentFileChildFootnoteChild: TypeAlias = Union[ + DocumentFileChildFootnoteChildBlob, + DocumentFileChildFootnoteChildCode, + DocumentFileChildFootnoteChildComment, + DocumentFileChildFootnoteChildDivider, + DocumentFileChildFootnoteChildImage, + DocumentFileChildFootnoteChildLink, + DocumentFileChildFootnoteChildLineBreak, + DocumentFileChildFootnoteChildText, + DocumentFileChildFootnoteChildToolCall, + DocumentFileChildFootnoteChildToolResult, + DocumentFileChildFootnoteChildTraceMessage, + object, +] + + +class DocumentFileChildFootnote(BaseModel): + id: Optional[str] = None + + children: Optional[List[DocumentFileChildFootnoteChild]] = None + + text: Optional[str] = None + + type: Optional[Literal["footnote"]] = None + + +class DocumentFileChildHeadingChildBlob(BaseModel): + """Represents embedded binary data using data URI scheme. + + Format: data:[][;base64], + Example: data:text/html;base64,PGh0bWw+... + """ + + data: str + + mimetype: str + + id: Optional[str] = None + + type: Optional[Literal["blob"]] = None + + +class DocumentFileChildHeadingChildCode(BaseModel): + text: str + + id: Optional[str] = None + + language: Optional[str] = None + + type: Optional[Literal["code"]] = None + + +class DocumentFileChildHeadingChildComment(BaseModel): + text: str + + id: Optional[str] = None + + created_at: Optional[datetime] = None + + type: Optional[Literal["comment"]] = None + + +class DocumentFileChildHeadingChildDivider(BaseModel): + id: Optional[str] = None + + type: Optional[Literal["divider"]] = None + + +class DocumentFileChildHeadingChildImage(BaseModel): + src: str + + text: str + + id: Optional[str] = None + + type: Optional[Literal["image"]] = None + + +class DocumentFileChildHeadingChildLink(BaseModel): + text: str + + url: str + + id: Optional[str] = None + + type: Optional[Literal["link"]] = None + + +class DocumentFileChildHeadingChildLineBreak(BaseModel): + id: Optional[str] = None + + type: Optional[Literal["line_break"]] = None + + +class DocumentFileChildHeadingChildText(BaseModel): + text: str + + id: Optional[str] = None + + marks: Optional[List[Literal["bold", "italic", "underline", "strikethrough", "code", "math"]]] = None + + type: Optional[Literal["text"]] = None + + +class DocumentFileChildHeadingChildToolCall(BaseModel): + """A tool/function call made by the assistant.""" + + tool_call_id: str + + tool_name: str + + id: Optional[str] = None + + args: Optional[Dict[str, object]] = None + + type: Optional[Literal["tool_call"]] = None + + +class DocumentFileChildHeadingChildToolResult(BaseModel): + """The result of a tool call.""" + + output: Union[str, Dict[str, object], List[object]] + + tool_call_id: str + + tool_name: str + + id: Optional[str] = None + + is_error: Optional[bool] = None + + type: Optional[Literal["tool_result"]] = None + + +class DocumentFileChildHeadingChildTraceMessage(BaseModel): + """A message in an agent trace (user message, assistant message, or thinking).""" + + text: str + + id: Optional[str] = None + + message_type: Optional[Literal["message", "thinking"]] = None + + role: Optional[Literal["user", "assistant"]] = None + + timestamp: Optional[datetime] = None + + type: Optional[Literal["trace_message"]] = None + + +DocumentFileChildHeadingChild: TypeAlias = Union[ + DocumentFileChildHeadingChildBlob, + DocumentFileChildHeadingChildCode, + DocumentFileChildHeadingChildComment, + DocumentFileChildHeadingChildDivider, + DocumentFileChildHeadingChildImage, + DocumentFileChildHeadingChildLink, + DocumentFileChildHeadingChildLineBreak, + DocumentFileChildHeadingChildText, + DocumentFileChildHeadingChildToolCall, + DocumentFileChildHeadingChildToolResult, + DocumentFileChildHeadingChildTraceMessage, + object, +] + + +class DocumentFileChildHeading(BaseModel): + level: int + + id: Optional[str] = None + + children: Optional[List[DocumentFileChildHeadingChild]] = None + + text: Optional[str] = None + + type: Optional[Literal["heading"]] = None + + +class DocumentFileChildImage(BaseModel): + src: str + + text: str + + id: Optional[str] = None + + type: Optional[Literal["image"]] = None + + +class DocumentFileChildLink(BaseModel): + text: str + + url: str + + id: Optional[str] = None + + type: Optional[Literal["link"]] = None + + +class DocumentFileChildLineBreak(BaseModel): + id: Optional[str] = None + + type: Optional[Literal["line_break"]] = None + + +class DocumentFileChildList(BaseModel): + id: Optional[str] = None + + children: Optional[List[object]] = None + + ordered: Optional[bool] = None + + text: Optional[str] = None + + type: Optional[Literal["list"]] = None + + +class DocumentFileChildListItemChildBlob(BaseModel): + """Represents embedded binary data using data URI scheme. + + Format: data:[][;base64], + Example: data:text/html;base64,PGh0bWw+... + """ + + data: str + + mimetype: str + + id: Optional[str] = None + + type: Optional[Literal["blob"]] = None + + +class DocumentFileChildListItemChildCode(BaseModel): + text: str + + id: Optional[str] = None + + language: Optional[str] = None + + type: Optional[Literal["code"]] = None + + +class DocumentFileChildListItemChildComment(BaseModel): + text: str + + id: Optional[str] = None + + created_at: Optional[datetime] = None + + type: Optional[Literal["comment"]] = None + + +class DocumentFileChildListItemChildDivider(BaseModel): + id: Optional[str] = None + + type: Optional[Literal["divider"]] = None + + +class DocumentFileChildListItemChildImage(BaseModel): + src: str + + text: str + + id: Optional[str] = None + + type: Optional[Literal["image"]] = None + + +class DocumentFileChildListItemChildLink(BaseModel): + text: str + + url: str + + id: Optional[str] = None + + type: Optional[Literal["link"]] = None + + +class DocumentFileChildListItemChildLineBreak(BaseModel): + id: Optional[str] = None + + type: Optional[Literal["line_break"]] = None + + +class DocumentFileChildListItemChildText(BaseModel): + text: str + + id: Optional[str] = None + + marks: Optional[List[Literal["bold", "italic", "underline", "strikethrough", "code", "math"]]] = None + + type: Optional[Literal["text"]] = None + + +class DocumentFileChildListItemChildToolCall(BaseModel): + """A tool/function call made by the assistant.""" + + tool_call_id: str + + tool_name: str + + id: Optional[str] = None + + args: Optional[Dict[str, object]] = None + + type: Optional[Literal["tool_call"]] = None + + +class DocumentFileChildListItemChildToolResult(BaseModel): + """The result of a tool call.""" + + output: Union[str, Dict[str, object], List[object]] + + tool_call_id: str + + tool_name: str + + id: Optional[str] = None + + is_error: Optional[bool] = None + + type: Optional[Literal["tool_result"]] = None + + +class DocumentFileChildListItemChildTraceMessage(BaseModel): + """A message in an agent trace (user message, assistant message, or thinking).""" + + text: str + + id: Optional[str] = None + + message_type: Optional[Literal["message", "thinking"]] = None + + role: Optional[Literal["user", "assistant"]] = None + + timestamp: Optional[datetime] = None + + type: Optional[Literal["trace_message"]] = None + + +DocumentFileChildListItemChild: TypeAlias = Union[ + DocumentFileChildListItemChildBlob, + DocumentFileChildListItemChildCode, + DocumentFileChildListItemChildComment, + DocumentFileChildListItemChildDivider, + DocumentFileChildListItemChildImage, + DocumentFileChildListItemChildLink, + DocumentFileChildListItemChildLineBreak, + DocumentFileChildListItemChildText, + DocumentFileChildListItemChildToolCall, + DocumentFileChildListItemChildToolResult, + DocumentFileChildListItemChildTraceMessage, + object, +] + + +class DocumentFileChildListItem(BaseModel): + id: Optional[str] = None + + children: Optional[List[DocumentFileChildListItemChild]] = None + + text: Optional[str] = None + + type: Optional[Literal["list_item"]] = None + + +class DocumentFileChildParagraphChildBlob(BaseModel): + """Represents embedded binary data using data URI scheme. + + Format: data:[][;base64], + Example: data:text/html;base64,PGh0bWw+... + """ + + data: str + + mimetype: str + + id: Optional[str] = None + + type: Optional[Literal["blob"]] = None + + +class DocumentFileChildParagraphChildCode(BaseModel): + text: str + + id: Optional[str] = None + + language: Optional[str] = None + + type: Optional[Literal["code"]] = None + + +class DocumentFileChildParagraphChildComment(BaseModel): + text: str + + id: Optional[str] = None + + created_at: Optional[datetime] = None + + type: Optional[Literal["comment"]] = None + + +class DocumentFileChildParagraphChildDivider(BaseModel): + id: Optional[str] = None + + type: Optional[Literal["divider"]] = None + + +class DocumentFileChildParagraphChildImage(BaseModel): + src: str + + text: str + + id: Optional[str] = None + + type: Optional[Literal["image"]] = None + + +class DocumentFileChildParagraphChildLink(BaseModel): + text: str + + url: str + + id: Optional[str] = None + + type: Optional[Literal["link"]] = None + + +class DocumentFileChildParagraphChildLineBreak(BaseModel): + id: Optional[str] = None + + type: Optional[Literal["line_break"]] = None + + +class DocumentFileChildParagraphChildText(BaseModel): + text: str + + id: Optional[str] = None + + marks: Optional[List[Literal["bold", "italic", "underline", "strikethrough", "code", "math"]]] = None + + type: Optional[Literal["text"]] = None + + +class DocumentFileChildParagraphChildToolCall(BaseModel): + """A tool/function call made by the assistant.""" + + tool_call_id: str + + tool_name: str + + id: Optional[str] = None + + args: Optional[Dict[str, object]] = None + + type: Optional[Literal["tool_call"]] = None + + +class DocumentFileChildParagraphChildToolResult(BaseModel): + """The result of a tool call.""" + + output: Union[str, Dict[str, object], List[object]] + + tool_call_id: str + + tool_name: str + + id: Optional[str] = None + + is_error: Optional[bool] = None + + type: Optional[Literal["tool_result"]] = None + + +class DocumentFileChildParagraphChildTraceMessage(BaseModel): + """A message in an agent trace (user message, assistant message, or thinking).""" + + text: str + + id: Optional[str] = None + + message_type: Optional[Literal["message", "thinking"]] = None + + role: Optional[Literal["user", "assistant"]] = None + + timestamp: Optional[datetime] = None + + type: Optional[Literal["trace_message"]] = None + + +DocumentFileChildParagraphChild: TypeAlias = Union[ + DocumentFileChildParagraphChildBlob, + DocumentFileChildParagraphChildCode, + DocumentFileChildParagraphChildComment, + DocumentFileChildParagraphChildDivider, + DocumentFileChildParagraphChildImage, + DocumentFileChildParagraphChildLink, + DocumentFileChildParagraphChildLineBreak, + DocumentFileChildParagraphChildText, + DocumentFileChildParagraphChildToolCall, + DocumentFileChildParagraphChildToolResult, + DocumentFileChildParagraphChildTraceMessage, + object, +] + + +class DocumentFileChildParagraph(BaseModel): + id: Optional[str] = None + + children: Optional[List[DocumentFileChildParagraphChild]] = None + + text: Optional[str] = None + + type: Optional[Literal["paragraph"]] = None + + +class DocumentFileChildQuoteChildBlob(BaseModel): + """Represents embedded binary data using data URI scheme. + + Format: data:[][;base64], + Example: data:text/html;base64,PGh0bWw+... + """ + + data: str + + mimetype: str + + id: Optional[str] = None + + type: Optional[Literal["blob"]] = None + + +class DocumentFileChildQuoteChildCode(BaseModel): + text: str + + id: Optional[str] = None + + language: Optional[str] = None + + type: Optional[Literal["code"]] = None + + +class DocumentFileChildQuoteChildComment(BaseModel): + text: str + + id: Optional[str] = None + + created_at: Optional[datetime] = None + + type: Optional[Literal["comment"]] = None + + +class DocumentFileChildQuoteChildDivider(BaseModel): + id: Optional[str] = None + + type: Optional[Literal["divider"]] = None + + +class DocumentFileChildQuoteChildImage(BaseModel): + src: str + + text: str + + id: Optional[str] = None + + type: Optional[Literal["image"]] = None + + +class DocumentFileChildQuoteChildLink(BaseModel): + text: str + + url: str + + id: Optional[str] = None + + type: Optional[Literal["link"]] = None + + +class DocumentFileChildQuoteChildLineBreak(BaseModel): + id: Optional[str] = None + + type: Optional[Literal["line_break"]] = None + + +class DocumentFileChildQuoteChildText(BaseModel): + text: str + + id: Optional[str] = None + + marks: Optional[List[Literal["bold", "italic", "underline", "strikethrough", "code", "math"]]] = None + + type: Optional[Literal["text"]] = None + + +class DocumentFileChildQuoteChildToolCall(BaseModel): + """A tool/function call made by the assistant.""" + + tool_call_id: str + + tool_name: str + + id: Optional[str] = None + + args: Optional[Dict[str, object]] = None + + type: Optional[Literal["tool_call"]] = None + + +class DocumentFileChildQuoteChildToolResult(BaseModel): + """The result of a tool call.""" + + output: Union[str, Dict[str, object], List[object]] + + tool_call_id: str + + tool_name: str + + id: Optional[str] = None + + is_error: Optional[bool] = None + + type: Optional[Literal["tool_result"]] = None + + +class DocumentFileChildQuoteChildTraceMessage(BaseModel): + """A message in an agent trace (user message, assistant message, or thinking).""" + + text: str + + id: Optional[str] = None + + message_type: Optional[Literal["message", "thinking"]] = None + + role: Optional[Literal["user", "assistant"]] = None + + timestamp: Optional[datetime] = None + + type: Optional[Literal["trace_message"]] = None + + +DocumentFileChildQuoteChild: TypeAlias = Union[ + DocumentFileChildQuoteChildBlob, + DocumentFileChildQuoteChildCode, + DocumentFileChildQuoteChildComment, + DocumentFileChildQuoteChildDivider, + DocumentFileChildQuoteChildImage, + DocumentFileChildQuoteChildLink, + DocumentFileChildQuoteChildLineBreak, + DocumentFileChildQuoteChildText, + DocumentFileChildQuoteChildToolCall, + DocumentFileChildQuoteChildToolResult, + DocumentFileChildQuoteChildTraceMessage, + object, +] + + +class DocumentFileChildQuote(BaseModel): + id: Optional[str] = None + + children: Optional[List[DocumentFileChildQuoteChild]] = None + + text: Optional[str] = None + + type: Optional[Literal["quote"]] = None + + +class DocumentFileChildTable(BaseModel): + id: Optional[str] = None + + children: Optional[List[object]] = None + + has_header: Optional[bool] = None + """Whether the first row should be treated as a header""" + + text: Optional[str] = None + + type: Optional[Literal["table"]] = None + + +class DocumentFileChildTableCellChildBlob(BaseModel): + """Represents embedded binary data using data URI scheme. + + Format: data:[][;base64], + Example: data:text/html;base64,PGh0bWw+... + """ + + data: str + + mimetype: str + + id: Optional[str] = None + + type: Optional[Literal["blob"]] = None + + +class DocumentFileChildTableCellChildCode(BaseModel): + text: str + + id: Optional[str] = None + + language: Optional[str] = None + + type: Optional[Literal["code"]] = None + + +class DocumentFileChildTableCellChildComment(BaseModel): + text: str + + id: Optional[str] = None + + created_at: Optional[datetime] = None + + type: Optional[Literal["comment"]] = None + + +class DocumentFileChildTableCellChildDivider(BaseModel): + id: Optional[str] = None + + type: Optional[Literal["divider"]] = None + + +class DocumentFileChildTableCellChildImage(BaseModel): + src: str + + text: str + + id: Optional[str] = None + + type: Optional[Literal["image"]] = None + + +class DocumentFileChildTableCellChildLink(BaseModel): + text: str + + url: str + + id: Optional[str] = None + + type: Optional[Literal["link"]] = None + + +class DocumentFileChildTableCellChildLineBreak(BaseModel): + id: Optional[str] = None + + type: Optional[Literal["line_break"]] = None + + +class DocumentFileChildTableCellChildText(BaseModel): + text: str + + id: Optional[str] = None + + marks: Optional[List[Literal["bold", "italic", "underline", "strikethrough", "code", "math"]]] = None + + type: Optional[Literal["text"]] = None + + +class DocumentFileChildTableCellChildToolCall(BaseModel): + """A tool/function call made by the assistant.""" + + tool_call_id: str + + tool_name: str + + id: Optional[str] = None + + args: Optional[Dict[str, object]] = None + + type: Optional[Literal["tool_call"]] = None + + +class DocumentFileChildTableCellChildToolResult(BaseModel): + """The result of a tool call.""" + + output: Union[str, Dict[str, object], List[object]] + + tool_call_id: str + + tool_name: str + + id: Optional[str] = None + + is_error: Optional[bool] = None + + type: Optional[Literal["tool_result"]] = None + + +class DocumentFileChildTableCellChildTraceMessage(BaseModel): + """A message in an agent trace (user message, assistant message, or thinking).""" + + text: str + + id: Optional[str] = None + + message_type: Optional[Literal["message", "thinking"]] = None + + role: Optional[Literal["user", "assistant"]] = None + + timestamp: Optional[datetime] = None + + type: Optional[Literal["trace_message"]] = None + + +DocumentFileChildTableCellChild: TypeAlias = Union[ + DocumentFileChildTableCellChildBlob, + DocumentFileChildTableCellChildCode, + DocumentFileChildTableCellChildComment, + DocumentFileChildTableCellChildDivider, + DocumentFileChildTableCellChildImage, + DocumentFileChildTableCellChildLink, + DocumentFileChildTableCellChildLineBreak, + DocumentFileChildTableCellChildText, + DocumentFileChildTableCellChildToolCall, + DocumentFileChildTableCellChildToolResult, + DocumentFileChildTableCellChildTraceMessage, + object, +] + + +class DocumentFileChildTableCell(BaseModel): + id: Optional[str] = None + + align: Optional[Literal["left", "center", "right"]] = None + + children: Optional[List[DocumentFileChildTableCellChild]] = None + + text: Optional[str] = None + + type: Optional[Literal["table_cell"]] = None + + +class DocumentFileChildTableRow(BaseModel): + id: Optional[str] = None + + children: Optional[List[object]] = None + + text: Optional[str] = None + + type: Optional[Literal["table_row"]] = None + + +class DocumentFileChildText(BaseModel): + text: str + + id: Optional[str] = None + + marks: Optional[List[Literal["bold", "italic", "underline", "strikethrough", "code", "math"]]] = None + + type: Optional[Literal["text"]] = None + + +class DocumentFileChildToDoChildBlob(BaseModel): + """Represents embedded binary data using data URI scheme. + + Format: data:[][;base64], + Example: data:text/html;base64,PGh0bWw+... + """ + + data: str + + mimetype: str + + id: Optional[str] = None + + type: Optional[Literal["blob"]] = None + + +class DocumentFileChildToDoChildCode(BaseModel): + text: str + + id: Optional[str] = None + + language: Optional[str] = None + + type: Optional[Literal["code"]] = None + + +class DocumentFileChildToDoChildComment(BaseModel): + text: str + + id: Optional[str] = None + + created_at: Optional[datetime] = None + + type: Optional[Literal["comment"]] = None + + +class DocumentFileChildToDoChildDivider(BaseModel): + id: Optional[str] = None + + type: Optional[Literal["divider"]] = None + + +class DocumentFileChildToDoChildImage(BaseModel): + src: str + + text: str + + id: Optional[str] = None + + type: Optional[Literal["image"]] = None + + +class DocumentFileChildToDoChildLink(BaseModel): + text: str + + url: str + + id: Optional[str] = None + + type: Optional[Literal["link"]] = None + + +class DocumentFileChildToDoChildLineBreak(BaseModel): + id: Optional[str] = None + + type: Optional[Literal["line_break"]] = None + + +class DocumentFileChildToDoChildText(BaseModel): + text: str + + id: Optional[str] = None + + marks: Optional[List[Literal["bold", "italic", "underline", "strikethrough", "code", "math"]]] = None + + type: Optional[Literal["text"]] = None + + +class DocumentFileChildToDoChildToolCall(BaseModel): + """A tool/function call made by the assistant.""" + + tool_call_id: str + + tool_name: str + + id: Optional[str] = None + + args: Optional[Dict[str, object]] = None + + type: Optional[Literal["tool_call"]] = None + + +class DocumentFileChildToDoChildToolResult(BaseModel): + """The result of a tool call.""" + + output: Union[str, Dict[str, object], List[object]] + + tool_call_id: str + + tool_name: str + + id: Optional[str] = None + + is_error: Optional[bool] = None + + type: Optional[Literal["tool_result"]] = None + + +class DocumentFileChildToDoChildTraceMessage(BaseModel): + """A message in an agent trace (user message, assistant message, or thinking).""" + + text: str + + id: Optional[str] = None + + message_type: Optional[Literal["message", "thinking"]] = None + + role: Optional[Literal["user", "assistant"]] = None + + timestamp: Optional[datetime] = None + + type: Optional[Literal["trace_message"]] = None + + +DocumentFileChildToDoChild: TypeAlias = Union[ + DocumentFileChildToDoChildBlob, + DocumentFileChildToDoChildCode, + DocumentFileChildToDoChildComment, + DocumentFileChildToDoChildDivider, + DocumentFileChildToDoChildImage, + DocumentFileChildToDoChildLink, + DocumentFileChildToDoChildLineBreak, + DocumentFileChildToDoChildText, + DocumentFileChildToDoChildToolCall, + DocumentFileChildToDoChildToolResult, + DocumentFileChildToDoChildTraceMessage, + object, +] + + +class DocumentFileChildToDo(BaseModel): + id: Optional[str] = None + + checked: Optional[bool] = None + + children: Optional[List[DocumentFileChildToDoChild]] = None + + text: Optional[str] = None + + type: Optional[Literal["todo"]] = None + + +class DocumentFileChildToolCall(BaseModel): + """A tool/function call made by the assistant.""" + + tool_call_id: str + + tool_name: str + + id: Optional[str] = None + + args: Optional[Dict[str, object]] = None + + type: Optional[Literal["tool_call"]] = None + + +class DocumentFileChildToolResult(BaseModel): + """The result of a tool call.""" + + output: Union[str, Dict[str, object], List[object]] + + tool_call_id: str + + tool_name: str + + id: Optional[str] = None + + is_error: Optional[bool] = None + + type: Optional[Literal["tool_result"]] = None + + +class DocumentFileChildTraceMessage(BaseModel): + """A message in an agent trace (user message, assistant message, or thinking).""" + + text: str + + id: Optional[str] = None + + message_type: Optional[Literal["message", "thinking"]] = None + + role: Optional[Literal["user", "assistant"]] = None + + timestamp: Optional[datetime] = None + + type: Optional[Literal["trace_message"]] = None + + +class DocumentFileChildUtterance(BaseModel): + """A speaker-attributed segment of a transcript (ENG-2476/D10). + + "Utterance" is the standard name for this across transcription providers + (AssemblyAI, Deepgram, Rev). Timestamps are relative offsets in seconds — + provider-native; absolute times derive from `Transcript.started_at`. + """ + + text: str + + id: Optional[str] = None + + end: Optional[float] = None + + speaker: Optional[object] = None + + start: Optional[float] = None + + type: Optional[Literal["utterance"]] = None + + +DocumentFileChild: TypeAlias = Annotated[ + Union[ + DocumentFileChildBlob, + DocumentFileChildCallout, + DocumentFileChildChunk, + DocumentFileChildCode, + DocumentFileChildComment, + DocumentFileChildDivider, + DocumentFileChildEquation, + DocumentFileChildFootnote, + DocumentFileChildHeading, + DocumentFileChildImage, + DocumentFileChildLink, + DocumentFileChildLineBreak, + DocumentFileChildList, + DocumentFileChildListItem, + DocumentFileChildParagraph, + DocumentFileChildQuote, + DocumentFileChildTable, + DocumentFileChildTableCell, + DocumentFileChildTableRow, + DocumentFileChildText, + DocumentFileChildToDo, + DocumentFileChildToolCall, + DocumentFileChildToolResult, + DocumentFileChildTraceMessage, + DocumentFileChildUtterance, + ], + PropertyInfo(discriminator="type"), +] + + +class DocumentFile(BaseModel): + content_type: str + + filename: str + + id: Optional[str] = None + + children: Optional[List[DocumentFileChild]] = None + + path: Optional[List[str]] = None + + text: Optional[str] = None + + title: Optional[str] = None + + type: Optional[Literal["file"]] = None + + +class DocumentConversationChildSenderChildBlob(BaseModel): + """Represents embedded binary data using data URI scheme. + + Format: data:[][;base64], + Example: data:text/html;base64,PGh0bWw+... + """ + + data: str + + mimetype: str + + id: Optional[str] = None + + type: Optional[Literal["blob"]] = None + + +class DocumentConversationChildSenderChildCode(BaseModel): + text: str + + id: Optional[str] = None + + language: Optional[str] = None + + type: Optional[Literal["code"]] = None + + +class DocumentConversationChildSenderChildComment(BaseModel): + text: str + + id: Optional[str] = None + + created_at: Optional[datetime] = None + + type: Optional[Literal["comment"]] = None + + +class DocumentConversationChildSenderChildDivider(BaseModel): + id: Optional[str] = None + + type: Optional[Literal["divider"]] = None + + +class DocumentConversationChildSenderChildImage(BaseModel): + src: str + + text: str + + id: Optional[str] = None + + type: Optional[Literal["image"]] = None + + +class DocumentConversationChildSenderChildLink(BaseModel): + text: str + + url: str + + id: Optional[str] = None + + type: Optional[Literal["link"]] = None + + +class DocumentConversationChildSenderChildLineBreak(BaseModel): + id: Optional[str] = None + + type: Optional[Literal["line_break"]] = None + + +class DocumentConversationChildSenderChildText(BaseModel): + text: str + + id: Optional[str] = None + + marks: Optional[List[Literal["bold", "italic", "underline", "strikethrough", "code", "math"]]] = None + + type: Optional[Literal["text"]] = None + + +class DocumentConversationChildSenderChildToolCall(BaseModel): + """A tool/function call made by the assistant.""" + + tool_call_id: str + + tool_name: str + + id: Optional[str] = None + + args: Optional[Dict[str, object]] = None + + type: Optional[Literal["tool_call"]] = None + + +class DocumentConversationChildSenderChildToolResult(BaseModel): + """The result of a tool call.""" + + output: Union[str, Dict[str, object], List[object]] + + tool_call_id: str + + tool_name: str + + id: Optional[str] = None + + is_error: Optional[bool] = None + + type: Optional[Literal["tool_result"]] = None + + +class DocumentConversationChildSenderChildTraceMessage(BaseModel): + """A message in an agent trace (user message, assistant message, or thinking).""" + + text: str + + id: Optional[str] = None + + message_type: Optional[Literal["message", "thinking"]] = None + + role: Optional[Literal["user", "assistant"]] = None + + timestamp: Optional[datetime] = None + + type: Optional[Literal["trace_message"]] = None + + +DocumentConversationChildSenderChild: TypeAlias = Union[ + DocumentConversationChildSenderChildBlob, + DocumentConversationChildSenderChildCode, + DocumentConversationChildSenderChildComment, + DocumentConversationChildSenderChildDivider, + DocumentConversationChildSenderChildImage, + DocumentConversationChildSenderChildLink, + DocumentConversationChildSenderChildLineBreak, + DocumentConversationChildSenderChildText, + DocumentConversationChildSenderChildToolCall, + DocumentConversationChildSenderChildToolResult, + DocumentConversationChildSenderChildTraceMessage, + object, +] + + +class DocumentConversationChildSender(BaseModel): + id: Optional[str] = None + + address: Optional[str] = None + + alt_names: Optional[List[str]] = None + + children: Optional[List[DocumentConversationChildSenderChild]] = None + + company: Optional[str] = None + + company_ids: Optional[List[str]] = None + + date_of_birth: Optional[date] = None + + deal_ids: Optional[List[str]] = None + + email: Optional[str] = None + + emails: Optional[List[str]] = None + """All known email addresses; `email` holds the primary one""" + + image_url: Optional[str] = None + + job_title: Optional[str] = None + + link_urls: Optional[List[str]] = None + + name: Optional[str] = None + + phone_numbers: Optional[List[str]] = None + + tags: Optional[List[str]] = None + + text: Optional[str] = None + + type: Optional[Literal["person"]] = None + + username: Optional[str] = None + + +class DocumentConversationChildChildBlob(BaseModel): + """Represents embedded binary data using data URI scheme. + + Format: data:[][;base64], + Example: data:text/html;base64,PGh0bWw+... + """ + + data: str + + mimetype: str + + id: Optional[str] = None + + type: Optional[Literal["blob"]] = None + + +class DocumentConversationChildChildCalloutChildBlob(BaseModel): + """Represents embedded binary data using data URI scheme. + + Format: data:[][;base64], + Example: data:text/html;base64,PGh0bWw+... + """ + + data: str + + mimetype: str + + id: Optional[str] = None + + type: Optional[Literal["blob"]] = None + + +class DocumentConversationChildChildCalloutChildCode(BaseModel): + text: str + + id: Optional[str] = None + + language: Optional[str] = None + + type: Optional[Literal["code"]] = None + + +class DocumentConversationChildChildCalloutChildComment(BaseModel): + text: str + + id: Optional[str] = None + + created_at: Optional[datetime] = None + + type: Optional[Literal["comment"]] = None + + +class DocumentConversationChildChildCalloutChildDivider(BaseModel): + id: Optional[str] = None + + type: Optional[Literal["divider"]] = None + + +class DocumentConversationChildChildCalloutChildImage(BaseModel): + src: str + + text: str + + id: Optional[str] = None + + type: Optional[Literal["image"]] = None + + +class DocumentConversationChildChildCalloutChildLink(BaseModel): + text: str + + url: str + + id: Optional[str] = None + + type: Optional[Literal["link"]] = None + + +class DocumentConversationChildChildCalloutChildLineBreak(BaseModel): + id: Optional[str] = None + + type: Optional[Literal["line_break"]] = None + + +class DocumentConversationChildChildCalloutChildText(BaseModel): + text: str + + id: Optional[str] = None + + marks: Optional[List[Literal["bold", "italic", "underline", "strikethrough", "code", "math"]]] = None + + type: Optional[Literal["text"]] = None + + +class DocumentConversationChildChildCalloutChildToolCall(BaseModel): + """A tool/function call made by the assistant.""" + + tool_call_id: str + + tool_name: str + + id: Optional[str] = None + + args: Optional[Dict[str, object]] = None + + type: Optional[Literal["tool_call"]] = None + + +class DocumentConversationChildChildCalloutChildToolResult(BaseModel): + """The result of a tool call.""" + + output: Union[str, Dict[str, object], List[object]] + + tool_call_id: str + + tool_name: str + + id: Optional[str] = None + + is_error: Optional[bool] = None + + type: Optional[Literal["tool_result"]] = None + + +class DocumentConversationChildChildCalloutChildTraceMessage(BaseModel): + """A message in an agent trace (user message, assistant message, or thinking).""" + + text: str + + id: Optional[str] = None + + message_type: Optional[Literal["message", "thinking"]] = None + + role: Optional[Literal["user", "assistant"]] = None + + timestamp: Optional[datetime] = None + + type: Optional[Literal["trace_message"]] = None + + +DocumentConversationChildChildCalloutChild: TypeAlias = Union[ + DocumentConversationChildChildCalloutChildBlob, + DocumentConversationChildChildCalloutChildCode, + DocumentConversationChildChildCalloutChildComment, + DocumentConversationChildChildCalloutChildDivider, + DocumentConversationChildChildCalloutChildImage, + DocumentConversationChildChildCalloutChildLink, + DocumentConversationChildChildCalloutChildLineBreak, + DocumentConversationChildChildCalloutChildText, + DocumentConversationChildChildCalloutChildToolCall, + DocumentConversationChildChildCalloutChildToolResult, + DocumentConversationChildChildCalloutChildTraceMessage, + object, +] + + +class DocumentConversationChildChildCallout(BaseModel): + id: Optional[str] = None + + children: Optional[List[DocumentConversationChildChildCalloutChild]] = None + + text: Optional[str] = None + + title: Optional[str] = None + + type: Optional[Literal["callout"]] = None + + +class DocumentConversationChildChildChunkChildBlob(BaseModel): + """Represents embedded binary data using data URI scheme. + + Format: data:[][;base64], + Example: data:text/html;base64,PGh0bWw+... + """ + + data: str + + mimetype: str + + id: Optional[str] = None + + type: Optional[Literal["blob"]] = None + + +class DocumentConversationChildChildChunkChildCode(BaseModel): + text: str + + id: Optional[str] = None + + language: Optional[str] = None + + type: Optional[Literal["code"]] = None + + +class DocumentConversationChildChildChunkChildComment(BaseModel): + text: str + + id: Optional[str] = None + + created_at: Optional[datetime] = None + + type: Optional[Literal["comment"]] = None + + +class DocumentConversationChildChildChunkChildDivider(BaseModel): + id: Optional[str] = None + + type: Optional[Literal["divider"]] = None + + +class DocumentConversationChildChildChunkChildImage(BaseModel): + src: str + + text: str + + id: Optional[str] = None + + type: Optional[Literal["image"]] = None + + +class DocumentConversationChildChildChunkChildLink(BaseModel): + text: str + + url: str + + id: Optional[str] = None + + type: Optional[Literal["link"]] = None + + +class DocumentConversationChildChildChunkChildLineBreak(BaseModel): + id: Optional[str] = None + + type: Optional[Literal["line_break"]] = None + + +class DocumentConversationChildChildChunkChildText(BaseModel): + text: str + + id: Optional[str] = None + + marks: Optional[List[Literal["bold", "italic", "underline", "strikethrough", "code", "math"]]] = None + + type: Optional[Literal["text"]] = None + + +class DocumentConversationChildChildChunkChildToolCall(BaseModel): + """A tool/function call made by the assistant.""" + + tool_call_id: str + + tool_name: str + + id: Optional[str] = None + + args: Optional[Dict[str, object]] = None + + type: Optional[Literal["tool_call"]] = None + + +class DocumentConversationChildChildChunkChildToolResult(BaseModel): + """The result of a tool call.""" + + output: Union[str, Dict[str, object], List[object]] + + tool_call_id: str + + tool_name: str + + id: Optional[str] = None + + is_error: Optional[bool] = None + + type: Optional[Literal["tool_result"]] = None + + +class DocumentConversationChildChildChunkChildTraceMessage(BaseModel): + """A message in an agent trace (user message, assistant message, or thinking).""" + + text: str + + id: Optional[str] = None + + message_type: Optional[Literal["message", "thinking"]] = None + + role: Optional[Literal["user", "assistant"]] = None + + timestamp: Optional[datetime] = None + + type: Optional[Literal["trace_message"]] = None + + +DocumentConversationChildChildChunkChild: TypeAlias = Union[ + DocumentConversationChildChildChunkChildBlob, + DocumentConversationChildChildChunkChildCode, + DocumentConversationChildChildChunkChildComment, + DocumentConversationChildChildChunkChildDivider, + DocumentConversationChildChildChunkChildImage, + DocumentConversationChildChildChunkChildLink, + DocumentConversationChildChildChunkChildLineBreak, + DocumentConversationChildChildChunkChildText, + DocumentConversationChildChildChunkChildToolCall, + DocumentConversationChildChildChunkChildToolResult, + DocumentConversationChildChildChunkChildTraceMessage, + object, +] + + +class DocumentConversationChildChildChunk(BaseModel): + id: Optional[str] = None + + children: Optional[List[DocumentConversationChildChildChunkChild]] = None + + text: Optional[str] = None + + type: Optional[Literal["chunk"]] = None + + +class DocumentConversationChildChildCode(BaseModel): + text: str + + id: Optional[str] = None + + language: Optional[str] = None + + type: Optional[Literal["code"]] = None + + +class DocumentConversationChildChildComment(BaseModel): + text: str + + id: Optional[str] = None + + created_at: Optional[datetime] = None + + type: Optional[Literal["comment"]] = None + + +class DocumentConversationChildChildDivider(BaseModel): + id: Optional[str] = None + + type: Optional[Literal["divider"]] = None + + +class DocumentConversationChildChildEquationChildBlob(BaseModel): + """Represents embedded binary data using data URI scheme. + + Format: data:[][;base64], + Example: data:text/html;base64,PGh0bWw+... + """ + + data: str + + mimetype: str + + id: Optional[str] = None + + type: Optional[Literal["blob"]] = None + + +class DocumentConversationChildChildEquationChildCode(BaseModel): + text: str + + id: Optional[str] = None + + language: Optional[str] = None + + type: Optional[Literal["code"]] = None + + +class DocumentConversationChildChildEquationChildComment(BaseModel): + text: str + + id: Optional[str] = None + + created_at: Optional[datetime] = None + + type: Optional[Literal["comment"]] = None + + +class DocumentConversationChildChildEquationChildDivider(BaseModel): + id: Optional[str] = None + + type: Optional[Literal["divider"]] = None + + +class DocumentConversationChildChildEquationChildImage(BaseModel): + src: str + + text: str + + id: Optional[str] = None + + type: Optional[Literal["image"]] = None + + +class DocumentConversationChildChildEquationChildLink(BaseModel): + text: str + + url: str + + id: Optional[str] = None + + type: Optional[Literal["link"]] = None + + +class DocumentConversationChildChildEquationChildLineBreak(BaseModel): + id: Optional[str] = None + + type: Optional[Literal["line_break"]] = None + + +class DocumentConversationChildChildEquationChildText(BaseModel): + text: str + + id: Optional[str] = None + + marks: Optional[List[Literal["bold", "italic", "underline", "strikethrough", "code", "math"]]] = None + + type: Optional[Literal["text"]] = None + + +class DocumentConversationChildChildEquationChildToolCall(BaseModel): + """A tool/function call made by the assistant.""" + + tool_call_id: str + + tool_name: str + + id: Optional[str] = None + + args: Optional[Dict[str, object]] = None + + type: Optional[Literal["tool_call"]] = None + + +class DocumentConversationChildChildEquationChildToolResult(BaseModel): + """The result of a tool call.""" + + output: Union[str, Dict[str, object], List[object]] + + tool_call_id: str + + tool_name: str + + id: Optional[str] = None + + is_error: Optional[bool] = None + + type: Optional[Literal["tool_result"]] = None + + +class DocumentConversationChildChildEquationChildTraceMessage(BaseModel): + """A message in an agent trace (user message, assistant message, or thinking).""" + + text: str + + id: Optional[str] = None + + message_type: Optional[Literal["message", "thinking"]] = None + + role: Optional[Literal["user", "assistant"]] = None + + timestamp: Optional[datetime] = None + + type: Optional[Literal["trace_message"]] = None + + +DocumentConversationChildChildEquationChild: TypeAlias = Union[ + DocumentConversationChildChildEquationChildBlob, + DocumentConversationChildChildEquationChildCode, + DocumentConversationChildChildEquationChildComment, + DocumentConversationChildChildEquationChildDivider, + DocumentConversationChildChildEquationChildImage, + DocumentConversationChildChildEquationChildLink, + DocumentConversationChildChildEquationChildLineBreak, + DocumentConversationChildChildEquationChildText, + DocumentConversationChildChildEquationChildToolCall, + DocumentConversationChildChildEquationChildToolResult, + DocumentConversationChildChildEquationChildTraceMessage, + object, +] + + +class DocumentConversationChildChildEquation(BaseModel): + id: Optional[str] = None + + children: Optional[List[DocumentConversationChildChildEquationChild]] = None + + text: Optional[str] = None + + type: Optional[Literal["equation"]] = None + + +class DocumentConversationChildChildFootnoteChildBlob(BaseModel): + """Represents embedded binary data using data URI scheme. + + Format: data:[][;base64], + Example: data:text/html;base64,PGh0bWw+... + """ + + data: str + + mimetype: str + + id: Optional[str] = None + + type: Optional[Literal["blob"]] = None + + +class DocumentConversationChildChildFootnoteChildCode(BaseModel): + text: str + + id: Optional[str] = None + + language: Optional[str] = None + + type: Optional[Literal["code"]] = None + + +class DocumentConversationChildChildFootnoteChildComment(BaseModel): + text: str + + id: Optional[str] = None + + created_at: Optional[datetime] = None + + type: Optional[Literal["comment"]] = None + + +class DocumentConversationChildChildFootnoteChildDivider(BaseModel): + id: Optional[str] = None + + type: Optional[Literal["divider"]] = None + + +class DocumentConversationChildChildFootnoteChildImage(BaseModel): + src: str + + text: str + + id: Optional[str] = None + + type: Optional[Literal["image"]] = None + + +class DocumentConversationChildChildFootnoteChildLink(BaseModel): + text: str + + url: str + + id: Optional[str] = None + + type: Optional[Literal["link"]] = None + + +class DocumentConversationChildChildFootnoteChildLineBreak(BaseModel): + id: Optional[str] = None + + type: Optional[Literal["line_break"]] = None + + +class DocumentConversationChildChildFootnoteChildText(BaseModel): + text: str + + id: Optional[str] = None + + marks: Optional[List[Literal["bold", "italic", "underline", "strikethrough", "code", "math"]]] = None + + type: Optional[Literal["text"]] = None + + +class DocumentConversationChildChildFootnoteChildToolCall(BaseModel): + """A tool/function call made by the assistant.""" + + tool_call_id: str + + tool_name: str + + id: Optional[str] = None + + args: Optional[Dict[str, object]] = None + + type: Optional[Literal["tool_call"]] = None + + +class DocumentConversationChildChildFootnoteChildToolResult(BaseModel): + """The result of a tool call.""" + + output: Union[str, Dict[str, object], List[object]] + + tool_call_id: str + + tool_name: str + + id: Optional[str] = None + + is_error: Optional[bool] = None + + type: Optional[Literal["tool_result"]] = None + + +class DocumentConversationChildChildFootnoteChildTraceMessage(BaseModel): + """A message in an agent trace (user message, assistant message, or thinking).""" + + text: str + + id: Optional[str] = None + + message_type: Optional[Literal["message", "thinking"]] = None + + role: Optional[Literal["user", "assistant"]] = None + + timestamp: Optional[datetime] = None + + type: Optional[Literal["trace_message"]] = None + + +DocumentConversationChildChildFootnoteChild: TypeAlias = Union[ + DocumentConversationChildChildFootnoteChildBlob, + DocumentConversationChildChildFootnoteChildCode, + DocumentConversationChildChildFootnoteChildComment, + DocumentConversationChildChildFootnoteChildDivider, + DocumentConversationChildChildFootnoteChildImage, + DocumentConversationChildChildFootnoteChildLink, + DocumentConversationChildChildFootnoteChildLineBreak, + DocumentConversationChildChildFootnoteChildText, + DocumentConversationChildChildFootnoteChildToolCall, + DocumentConversationChildChildFootnoteChildToolResult, + DocumentConversationChildChildFootnoteChildTraceMessage, + object, +] + + +class DocumentConversationChildChildFootnote(BaseModel): + id: Optional[str] = None + + children: Optional[List[DocumentConversationChildChildFootnoteChild]] = None + + text: Optional[str] = None + + type: Optional[Literal["footnote"]] = None + + +class DocumentConversationChildChildHeadingChildBlob(BaseModel): + """Represents embedded binary data using data URI scheme. + + Format: data:[][;base64], + Example: data:text/html;base64,PGh0bWw+... + """ + + data: str + + mimetype: str + + id: Optional[str] = None + + type: Optional[Literal["blob"]] = None + + +class DocumentConversationChildChildHeadingChildCode(BaseModel): + text: str + + id: Optional[str] = None + + language: Optional[str] = None + + type: Optional[Literal["code"]] = None + + +class DocumentConversationChildChildHeadingChildComment(BaseModel): + text: str + + id: Optional[str] = None + + created_at: Optional[datetime] = None + + type: Optional[Literal["comment"]] = None + + +class DocumentConversationChildChildHeadingChildDivider(BaseModel): + id: Optional[str] = None + + type: Optional[Literal["divider"]] = None + + +class DocumentConversationChildChildHeadingChildImage(BaseModel): + src: str + + text: str + + id: Optional[str] = None + + type: Optional[Literal["image"]] = None + + +class DocumentConversationChildChildHeadingChildLink(BaseModel): + text: str + + url: str + + id: Optional[str] = None + + type: Optional[Literal["link"]] = None + + +class DocumentConversationChildChildHeadingChildLineBreak(BaseModel): + id: Optional[str] = None + + type: Optional[Literal["line_break"]] = None + + +class DocumentConversationChildChildHeadingChildText(BaseModel): + text: str + + id: Optional[str] = None + + marks: Optional[List[Literal["bold", "italic", "underline", "strikethrough", "code", "math"]]] = None + + type: Optional[Literal["text"]] = None + + +class DocumentConversationChildChildHeadingChildToolCall(BaseModel): + """A tool/function call made by the assistant.""" + + tool_call_id: str + + tool_name: str + + id: Optional[str] = None + + args: Optional[Dict[str, object]] = None + + type: Optional[Literal["tool_call"]] = None + + +class DocumentConversationChildChildHeadingChildToolResult(BaseModel): + """The result of a tool call.""" + + output: Union[str, Dict[str, object], List[object]] + + tool_call_id: str + + tool_name: str + + id: Optional[str] = None + + is_error: Optional[bool] = None + + type: Optional[Literal["tool_result"]] = None + + +class DocumentConversationChildChildHeadingChildTraceMessage(BaseModel): + """A message in an agent trace (user message, assistant message, or thinking).""" + + text: str + + id: Optional[str] = None + + message_type: Optional[Literal["message", "thinking"]] = None + + role: Optional[Literal["user", "assistant"]] = None + + timestamp: Optional[datetime] = None + + type: Optional[Literal["trace_message"]] = None + + +DocumentConversationChildChildHeadingChild: TypeAlias = Union[ + DocumentConversationChildChildHeadingChildBlob, + DocumentConversationChildChildHeadingChildCode, + DocumentConversationChildChildHeadingChildComment, + DocumentConversationChildChildHeadingChildDivider, + DocumentConversationChildChildHeadingChildImage, + DocumentConversationChildChildHeadingChildLink, + DocumentConversationChildChildHeadingChildLineBreak, + DocumentConversationChildChildHeadingChildText, + DocumentConversationChildChildHeadingChildToolCall, + DocumentConversationChildChildHeadingChildToolResult, + DocumentConversationChildChildHeadingChildTraceMessage, + object, +] + + +class DocumentConversationChildChildHeading(BaseModel): + level: int + + id: Optional[str] = None + + children: Optional[List[DocumentConversationChildChildHeadingChild]] = None + + text: Optional[str] = None + + type: Optional[Literal["heading"]] = None + + +class DocumentConversationChildChildImage(BaseModel): + src: str + + text: str + + id: Optional[str] = None + + type: Optional[Literal["image"]] = None + + +class DocumentConversationChildChildLink(BaseModel): + text: str + + url: str + + id: Optional[str] = None + + type: Optional[Literal["link"]] = None + + +class DocumentConversationChildChildLineBreak(BaseModel): + id: Optional[str] = None + + type: Optional[Literal["line_break"]] = None + + +class DocumentConversationChildChildList(BaseModel): + id: Optional[str] = None + + children: Optional[List[object]] = None + + ordered: Optional[bool] = None + + text: Optional[str] = None + + type: Optional[Literal["list"]] = None + + +class DocumentConversationChildChildListItemChildBlob(BaseModel): + """Represents embedded binary data using data URI scheme. + + Format: data:[][;base64], + Example: data:text/html;base64,PGh0bWw+... + """ + + data: str + + mimetype: str + + id: Optional[str] = None + + type: Optional[Literal["blob"]] = None + + +class DocumentConversationChildChildListItemChildCode(BaseModel): + text: str + + id: Optional[str] = None + + language: Optional[str] = None + + type: Optional[Literal["code"]] = None + + +class DocumentConversationChildChildListItemChildComment(BaseModel): + text: str + + id: Optional[str] = None + + created_at: Optional[datetime] = None + + type: Optional[Literal["comment"]] = None + + +class DocumentConversationChildChildListItemChildDivider(BaseModel): + id: Optional[str] = None + + type: Optional[Literal["divider"]] = None + + +class DocumentConversationChildChildListItemChildImage(BaseModel): + src: str + + text: str + + id: Optional[str] = None + + type: Optional[Literal["image"]] = None + + +class DocumentConversationChildChildListItemChildLink(BaseModel): + text: str + + url: str + + id: Optional[str] = None + + type: Optional[Literal["link"]] = None + + +class DocumentConversationChildChildListItemChildLineBreak(BaseModel): + id: Optional[str] = None + + type: Optional[Literal["line_break"]] = None + + +class DocumentConversationChildChildListItemChildText(BaseModel): + text: str + + id: Optional[str] = None + + marks: Optional[List[Literal["bold", "italic", "underline", "strikethrough", "code", "math"]]] = None + + type: Optional[Literal["text"]] = None + + +class DocumentConversationChildChildListItemChildToolCall(BaseModel): + """A tool/function call made by the assistant.""" + + tool_call_id: str + + tool_name: str + + id: Optional[str] = None + + args: Optional[Dict[str, object]] = None + + type: Optional[Literal["tool_call"]] = None + + +class DocumentConversationChildChildListItemChildToolResult(BaseModel): + """The result of a tool call.""" + + output: Union[str, Dict[str, object], List[object]] + + tool_call_id: str + + tool_name: str + + id: Optional[str] = None + + is_error: Optional[bool] = None + + type: Optional[Literal["tool_result"]] = None + + +class DocumentConversationChildChildListItemChildTraceMessage(BaseModel): + """A message in an agent trace (user message, assistant message, or thinking).""" + + text: str + + id: Optional[str] = None + + message_type: Optional[Literal["message", "thinking"]] = None + + role: Optional[Literal["user", "assistant"]] = None + + timestamp: Optional[datetime] = None + + type: Optional[Literal["trace_message"]] = None + + +DocumentConversationChildChildListItemChild: TypeAlias = Union[ + DocumentConversationChildChildListItemChildBlob, + DocumentConversationChildChildListItemChildCode, + DocumentConversationChildChildListItemChildComment, + DocumentConversationChildChildListItemChildDivider, + DocumentConversationChildChildListItemChildImage, + DocumentConversationChildChildListItemChildLink, + DocumentConversationChildChildListItemChildLineBreak, + DocumentConversationChildChildListItemChildText, + DocumentConversationChildChildListItemChildToolCall, + DocumentConversationChildChildListItemChildToolResult, + DocumentConversationChildChildListItemChildTraceMessage, + object, +] + + +class DocumentConversationChildChildListItem(BaseModel): + id: Optional[str] = None + + children: Optional[List[DocumentConversationChildChildListItemChild]] = None + + text: Optional[str] = None + + type: Optional[Literal["list_item"]] = None + + +class DocumentConversationChildChildParagraphChildBlob(BaseModel): + """Represents embedded binary data using data URI scheme. + + Format: data:[][;base64], + Example: data:text/html;base64,PGh0bWw+... + """ + + data: str + + mimetype: str + + id: Optional[str] = None + + type: Optional[Literal["blob"]] = None + + +class DocumentConversationChildChildParagraphChildCode(BaseModel): + text: str + + id: Optional[str] = None + + language: Optional[str] = None + + type: Optional[Literal["code"]] = None + + +class DocumentConversationChildChildParagraphChildComment(BaseModel): + text: str + + id: Optional[str] = None + + created_at: Optional[datetime] = None + + type: Optional[Literal["comment"]] = None + + +class DocumentConversationChildChildParagraphChildDivider(BaseModel): + id: Optional[str] = None + + type: Optional[Literal["divider"]] = None + + +class DocumentConversationChildChildParagraphChildImage(BaseModel): + src: str + + text: str + + id: Optional[str] = None + + type: Optional[Literal["image"]] = None + + +class DocumentConversationChildChildParagraphChildLink(BaseModel): + text: str + + url: str + + id: Optional[str] = None + + type: Optional[Literal["link"]] = None + + +class DocumentConversationChildChildParagraphChildLineBreak(BaseModel): + id: Optional[str] = None + + type: Optional[Literal["line_break"]] = None + + +class DocumentConversationChildChildParagraphChildText(BaseModel): + text: str + + id: Optional[str] = None + + marks: Optional[List[Literal["bold", "italic", "underline", "strikethrough", "code", "math"]]] = None + + type: Optional[Literal["text"]] = None + + +class DocumentConversationChildChildParagraphChildToolCall(BaseModel): + """A tool/function call made by the assistant.""" + + tool_call_id: str + + tool_name: str + + id: Optional[str] = None + + args: Optional[Dict[str, object]] = None + + type: Optional[Literal["tool_call"]] = None + + +class DocumentConversationChildChildParagraphChildToolResult(BaseModel): + """The result of a tool call.""" + + output: Union[str, Dict[str, object], List[object]] + + tool_call_id: str + + tool_name: str + + id: Optional[str] = None + + is_error: Optional[bool] = None + + type: Optional[Literal["tool_result"]] = None + + +class DocumentConversationChildChildParagraphChildTraceMessage(BaseModel): + """A message in an agent trace (user message, assistant message, or thinking).""" + + text: str + + id: Optional[str] = None + + message_type: Optional[Literal["message", "thinking"]] = None + + role: Optional[Literal["user", "assistant"]] = None + + timestamp: Optional[datetime] = None + + type: Optional[Literal["trace_message"]] = None + + +DocumentConversationChildChildParagraphChild: TypeAlias = Union[ + DocumentConversationChildChildParagraphChildBlob, + DocumentConversationChildChildParagraphChildCode, + DocumentConversationChildChildParagraphChildComment, + DocumentConversationChildChildParagraphChildDivider, + DocumentConversationChildChildParagraphChildImage, + DocumentConversationChildChildParagraphChildLink, + DocumentConversationChildChildParagraphChildLineBreak, + DocumentConversationChildChildParagraphChildText, + DocumentConversationChildChildParagraphChildToolCall, + DocumentConversationChildChildParagraphChildToolResult, + DocumentConversationChildChildParagraphChildTraceMessage, + object, +] + + +class DocumentConversationChildChildParagraph(BaseModel): + id: Optional[str] = None + + children: Optional[List[DocumentConversationChildChildParagraphChild]] = None + + text: Optional[str] = None + + type: Optional[Literal["paragraph"]] = None + + +class DocumentConversationChildChildQuoteChildBlob(BaseModel): + """Represents embedded binary data using data URI scheme. + + Format: data:[][;base64], + Example: data:text/html;base64,PGh0bWw+... + """ + + data: str + + mimetype: str + + id: Optional[str] = None + + type: Optional[Literal["blob"]] = None + + +class DocumentConversationChildChildQuoteChildCode(BaseModel): + text: str + + id: Optional[str] = None + + language: Optional[str] = None + + type: Optional[Literal["code"]] = None + + +class DocumentConversationChildChildQuoteChildComment(BaseModel): + text: str + + id: Optional[str] = None + + created_at: Optional[datetime] = None + + type: Optional[Literal["comment"]] = None + + +class DocumentConversationChildChildQuoteChildDivider(BaseModel): + id: Optional[str] = None + + type: Optional[Literal["divider"]] = None + + +class DocumentConversationChildChildQuoteChildImage(BaseModel): + src: str + + text: str + + id: Optional[str] = None + + type: Optional[Literal["image"]] = None + + +class DocumentConversationChildChildQuoteChildLink(BaseModel): + text: str + + url: str + + id: Optional[str] = None + + type: Optional[Literal["link"]] = None + + +class DocumentConversationChildChildQuoteChildLineBreak(BaseModel): + id: Optional[str] = None + + type: Optional[Literal["line_break"]] = None + + +class DocumentConversationChildChildQuoteChildText(BaseModel): + text: str + + id: Optional[str] = None + + marks: Optional[List[Literal["bold", "italic", "underline", "strikethrough", "code", "math"]]] = None + + type: Optional[Literal["text"]] = None + + +class DocumentConversationChildChildQuoteChildToolCall(BaseModel): + """A tool/function call made by the assistant.""" + + tool_call_id: str + + tool_name: str + + id: Optional[str] = None + + args: Optional[Dict[str, object]] = None + + type: Optional[Literal["tool_call"]] = None + + +class DocumentConversationChildChildQuoteChildToolResult(BaseModel): + """The result of a tool call.""" + + output: Union[str, Dict[str, object], List[object]] + + tool_call_id: str + + tool_name: str + + id: Optional[str] = None + + is_error: Optional[bool] = None + + type: Optional[Literal["tool_result"]] = None + + +class DocumentConversationChildChildQuoteChildTraceMessage(BaseModel): + """A message in an agent trace (user message, assistant message, or thinking).""" + + text: str + + id: Optional[str] = None + + message_type: Optional[Literal["message", "thinking"]] = None + + role: Optional[Literal["user", "assistant"]] = None + + timestamp: Optional[datetime] = None + + type: Optional[Literal["trace_message"]] = None + + +DocumentConversationChildChildQuoteChild: TypeAlias = Union[ + DocumentConversationChildChildQuoteChildBlob, + DocumentConversationChildChildQuoteChildCode, + DocumentConversationChildChildQuoteChildComment, + DocumentConversationChildChildQuoteChildDivider, + DocumentConversationChildChildQuoteChildImage, + DocumentConversationChildChildQuoteChildLink, + DocumentConversationChildChildQuoteChildLineBreak, + DocumentConversationChildChildQuoteChildText, + DocumentConversationChildChildQuoteChildToolCall, + DocumentConversationChildChildQuoteChildToolResult, + DocumentConversationChildChildQuoteChildTraceMessage, + object, +] + + +class DocumentConversationChildChildQuote(BaseModel): + id: Optional[str] = None + + children: Optional[List[DocumentConversationChildChildQuoteChild]] = None + + text: Optional[str] = None + + type: Optional[Literal["quote"]] = None + + +class DocumentConversationChildChildTable(BaseModel): + id: Optional[str] = None + + children: Optional[List[object]] = None + + has_header: Optional[bool] = None + """Whether the first row should be treated as a header""" + + text: Optional[str] = None + + type: Optional[Literal["table"]] = None + + +class DocumentConversationChildChildTableCellChildBlob(BaseModel): + """Represents embedded binary data using data URI scheme. + + Format: data:[][;base64], + Example: data:text/html;base64,PGh0bWw+... + """ + + data: str + + mimetype: str + + id: Optional[str] = None + + type: Optional[Literal["blob"]] = None + + +class DocumentConversationChildChildTableCellChildCode(BaseModel): + text: str + + id: Optional[str] = None + + language: Optional[str] = None + + type: Optional[Literal["code"]] = None + + +class DocumentConversationChildChildTableCellChildComment(BaseModel): + text: str + + id: Optional[str] = None + + created_at: Optional[datetime] = None + + type: Optional[Literal["comment"]] = None + + +class DocumentConversationChildChildTableCellChildDivider(BaseModel): + id: Optional[str] = None + + type: Optional[Literal["divider"]] = None + + +class DocumentConversationChildChildTableCellChildImage(BaseModel): + src: str + + text: str + + id: Optional[str] = None + + type: Optional[Literal["image"]] = None + + +class DocumentConversationChildChildTableCellChildLink(BaseModel): + text: str + + url: str + + id: Optional[str] = None + + type: Optional[Literal["link"]] = None + + +class DocumentConversationChildChildTableCellChildLineBreak(BaseModel): + id: Optional[str] = None + + type: Optional[Literal["line_break"]] = None + + +class DocumentConversationChildChildTableCellChildText(BaseModel): + text: str + + id: Optional[str] = None + + marks: Optional[List[Literal["bold", "italic", "underline", "strikethrough", "code", "math"]]] = None + + type: Optional[Literal["text"]] = None + + +class DocumentConversationChildChildTableCellChildToolCall(BaseModel): + """A tool/function call made by the assistant.""" + + tool_call_id: str + + tool_name: str + + id: Optional[str] = None + + args: Optional[Dict[str, object]] = None + + type: Optional[Literal["tool_call"]] = None + + +class DocumentConversationChildChildTableCellChildToolResult(BaseModel): + """The result of a tool call.""" + + output: Union[str, Dict[str, object], List[object]] + + tool_call_id: str + + tool_name: str + + id: Optional[str] = None + + is_error: Optional[bool] = None + + type: Optional[Literal["tool_result"]] = None + + +class DocumentConversationChildChildTableCellChildTraceMessage(BaseModel): + """A message in an agent trace (user message, assistant message, or thinking).""" + + text: str + + id: Optional[str] = None + + message_type: Optional[Literal["message", "thinking"]] = None + + role: Optional[Literal["user", "assistant"]] = None + + timestamp: Optional[datetime] = None + + type: Optional[Literal["trace_message"]] = None + + +DocumentConversationChildChildTableCellChild: TypeAlias = Union[ + DocumentConversationChildChildTableCellChildBlob, + DocumentConversationChildChildTableCellChildCode, + DocumentConversationChildChildTableCellChildComment, + DocumentConversationChildChildTableCellChildDivider, + DocumentConversationChildChildTableCellChildImage, + DocumentConversationChildChildTableCellChildLink, + DocumentConversationChildChildTableCellChildLineBreak, + DocumentConversationChildChildTableCellChildText, + DocumentConversationChildChildTableCellChildToolCall, + DocumentConversationChildChildTableCellChildToolResult, + DocumentConversationChildChildTableCellChildTraceMessage, + object, +] + + +class DocumentConversationChildChildTableCell(BaseModel): + id: Optional[str] = None + + align: Optional[Literal["left", "center", "right"]] = None + + children: Optional[List[DocumentConversationChildChildTableCellChild]] = None + + text: Optional[str] = None + + type: Optional[Literal["table_cell"]] = None + + +class DocumentConversationChildChildTableRow(BaseModel): + id: Optional[str] = None + + children: Optional[List[object]] = None + + text: Optional[str] = None + + type: Optional[Literal["table_row"]] = None + + +class DocumentConversationChildChildText(BaseModel): + text: str + + id: Optional[str] = None + + marks: Optional[List[Literal["bold", "italic", "underline", "strikethrough", "code", "math"]]] = None + + type: Optional[Literal["text"]] = None + + +class DocumentConversationChildChildToDoChildBlob(BaseModel): + """Represents embedded binary data using data URI scheme. + + Format: data:[][;base64], + Example: data:text/html;base64,PGh0bWw+... + """ + + data: str + + mimetype: str + + id: Optional[str] = None + + type: Optional[Literal["blob"]] = None + + +class DocumentConversationChildChildToDoChildCode(BaseModel): + text: str + + id: Optional[str] = None + + language: Optional[str] = None + + type: Optional[Literal["code"]] = None + + +class DocumentConversationChildChildToDoChildComment(BaseModel): + text: str + + id: Optional[str] = None + + created_at: Optional[datetime] = None + + type: Optional[Literal["comment"]] = None + + +class DocumentConversationChildChildToDoChildDivider(BaseModel): + id: Optional[str] = None + + type: Optional[Literal["divider"]] = None + + +class DocumentConversationChildChildToDoChildImage(BaseModel): + src: str + + text: str + + id: Optional[str] = None + + type: Optional[Literal["image"]] = None + + +class DocumentConversationChildChildToDoChildLink(BaseModel): + text: str + + url: str + + id: Optional[str] = None + + type: Optional[Literal["link"]] = None + + +class DocumentConversationChildChildToDoChildLineBreak(BaseModel): + id: Optional[str] = None + + type: Optional[Literal["line_break"]] = None + + +class DocumentConversationChildChildToDoChildText(BaseModel): + text: str + + id: Optional[str] = None + + marks: Optional[List[Literal["bold", "italic", "underline", "strikethrough", "code", "math"]]] = None + + type: Optional[Literal["text"]] = None + + +class DocumentConversationChildChildToDoChildToolCall(BaseModel): + """A tool/function call made by the assistant.""" + + tool_call_id: str + + tool_name: str + + id: Optional[str] = None + + args: Optional[Dict[str, object]] = None + + type: Optional[Literal["tool_call"]] = None + + +class DocumentConversationChildChildToDoChildToolResult(BaseModel): + """The result of a tool call.""" + + output: Union[str, Dict[str, object], List[object]] + + tool_call_id: str + + tool_name: str + + id: Optional[str] = None + + is_error: Optional[bool] = None + + type: Optional[Literal["tool_result"]] = None + + +class DocumentConversationChildChildToDoChildTraceMessage(BaseModel): + """A message in an agent trace (user message, assistant message, or thinking).""" + + text: str + + id: Optional[str] = None + + message_type: Optional[Literal["message", "thinking"]] = None + + role: Optional[Literal["user", "assistant"]] = None + + timestamp: Optional[datetime] = None + + type: Optional[Literal["trace_message"]] = None + + +DocumentConversationChildChildToDoChild: TypeAlias = Union[ + DocumentConversationChildChildToDoChildBlob, + DocumentConversationChildChildToDoChildCode, + DocumentConversationChildChildToDoChildComment, + DocumentConversationChildChildToDoChildDivider, + DocumentConversationChildChildToDoChildImage, + DocumentConversationChildChildToDoChildLink, + DocumentConversationChildChildToDoChildLineBreak, + DocumentConversationChildChildToDoChildText, + DocumentConversationChildChildToDoChildToolCall, + DocumentConversationChildChildToDoChildToolResult, + DocumentConversationChildChildToDoChildTraceMessage, + object, +] + + +class DocumentConversationChildChildToDo(BaseModel): + id: Optional[str] = None + + checked: Optional[bool] = None + + children: Optional[List[DocumentConversationChildChildToDoChild]] = None + + text: Optional[str] = None + + type: Optional[Literal["todo"]] = None + + +class DocumentConversationChildChildToolCall(BaseModel): + """A tool/function call made by the assistant.""" + + tool_call_id: str + + tool_name: str + + id: Optional[str] = None + + args: Optional[Dict[str, object]] = None + + type: Optional[Literal["tool_call"]] = None + + +class DocumentConversationChildChildToolResult(BaseModel): + """The result of a tool call.""" + + output: Union[str, Dict[str, object], List[object]] + + tool_call_id: str + + tool_name: str + + id: Optional[str] = None + + is_error: Optional[bool] = None + + type: Optional[Literal["tool_result"]] = None + + +class DocumentConversationChildChildTraceMessage(BaseModel): + """A message in an agent trace (user message, assistant message, or thinking).""" + + text: str + + id: Optional[str] = None + + message_type: Optional[Literal["message", "thinking"]] = None + + role: Optional[Literal["user", "assistant"]] = None + + timestamp: Optional[datetime] = None + + type: Optional[Literal["trace_message"]] = None + + +class DocumentConversationChildChildUtterance(BaseModel): + """A speaker-attributed segment of a transcript (ENG-2476/D10). + + "Utterance" is the standard name for this across transcription providers + (AssemblyAI, Deepgram, Rev). Timestamps are relative offsets in seconds — + provider-native; absolute times derive from `Transcript.started_at`. + """ + + text: str + + id: Optional[str] = None + + end: Optional[float] = None + + speaker: Optional[object] = None + + start: Optional[float] = None + + type: Optional[Literal["utterance"]] = None + + +DocumentConversationChildChild: TypeAlias = Annotated[ + Union[ + DocumentConversationChildChildBlob, + DocumentConversationChildChildCallout, + DocumentConversationChildChildChunk, + DocumentConversationChildChildCode, + DocumentConversationChildChildComment, + DocumentConversationChildChildDivider, + DocumentConversationChildChildEquation, + DocumentConversationChildChildFootnote, + DocumentConversationChildChildHeading, + DocumentConversationChildChildImage, + DocumentConversationChildChildLink, + DocumentConversationChildChildLineBreak, + DocumentConversationChildChildList, + DocumentConversationChildChildListItem, + DocumentConversationChildChildParagraph, + DocumentConversationChildChildQuote, + DocumentConversationChildChildTable, + DocumentConversationChildChildTableCell, + DocumentConversationChildChildTableRow, + DocumentConversationChildChildText, + DocumentConversationChildChildToDo, + DocumentConversationChildChildToolCall, + DocumentConversationChildChildToolResult, + DocumentConversationChildChildTraceMessage, + DocumentConversationChildChildUtterance, + ], + PropertyInfo(discriminator="type"), +] + + +class DocumentConversationChildMentionedUserChildBlob(BaseModel): + """Represents embedded binary data using data URI scheme. + + Format: data:[][;base64], + Example: data:text/html;base64,PGh0bWw+... + """ + + data: str + + mimetype: str + + id: Optional[str] = None + + type: Optional[Literal["blob"]] = None + + +class DocumentConversationChildMentionedUserChildCode(BaseModel): + text: str + + id: Optional[str] = None + + language: Optional[str] = None + + type: Optional[Literal["code"]] = None + + +class DocumentConversationChildMentionedUserChildComment(BaseModel): + text: str + + id: Optional[str] = None + + created_at: Optional[datetime] = None + + type: Optional[Literal["comment"]] = None + + +class DocumentConversationChildMentionedUserChildDivider(BaseModel): + id: Optional[str] = None + + type: Optional[Literal["divider"]] = None + + +class DocumentConversationChildMentionedUserChildImage(BaseModel): + src: str + + text: str + + id: Optional[str] = None + + type: Optional[Literal["image"]] = None + + +class DocumentConversationChildMentionedUserChildLink(BaseModel): + text: str + + url: str + + id: Optional[str] = None + + type: Optional[Literal["link"]] = None + + +class DocumentConversationChildMentionedUserChildLineBreak(BaseModel): + id: Optional[str] = None + + type: Optional[Literal["line_break"]] = None + + +class DocumentConversationChildMentionedUserChildText(BaseModel): + text: str + + id: Optional[str] = None + + marks: Optional[List[Literal["bold", "italic", "underline", "strikethrough", "code", "math"]]] = None + + type: Optional[Literal["text"]] = None + + +class DocumentConversationChildMentionedUserChildToolCall(BaseModel): + """A tool/function call made by the assistant.""" + + tool_call_id: str + + tool_name: str + + id: Optional[str] = None + + args: Optional[Dict[str, object]] = None + + type: Optional[Literal["tool_call"]] = None + + +class DocumentConversationChildMentionedUserChildToolResult(BaseModel): + """The result of a tool call.""" + + output: Union[str, Dict[str, object], List[object]] + + tool_call_id: str + + tool_name: str + + id: Optional[str] = None + + is_error: Optional[bool] = None + + type: Optional[Literal["tool_result"]] = None + + +class DocumentConversationChildMentionedUserChildTraceMessage(BaseModel): + """A message in an agent trace (user message, assistant message, or thinking).""" + + text: str + + id: Optional[str] = None + + message_type: Optional[Literal["message", "thinking"]] = None + + role: Optional[Literal["user", "assistant"]] = None + + timestamp: Optional[datetime] = None + + type: Optional[Literal["trace_message"]] = None + + +DocumentConversationChildMentionedUserChild: TypeAlias = Union[ + DocumentConversationChildMentionedUserChildBlob, + DocumentConversationChildMentionedUserChildCode, + DocumentConversationChildMentionedUserChildComment, + DocumentConversationChildMentionedUserChildDivider, + DocumentConversationChildMentionedUserChildImage, + DocumentConversationChildMentionedUserChildLink, + DocumentConversationChildMentionedUserChildLineBreak, + DocumentConversationChildMentionedUserChildText, + DocumentConversationChildMentionedUserChildToolCall, + DocumentConversationChildMentionedUserChildToolResult, + DocumentConversationChildMentionedUserChildTraceMessage, + object, +] + + +class DocumentConversationChildMentionedUser(BaseModel): + id: Optional[str] = None + + address: Optional[str] = None + + alt_names: Optional[List[str]] = None + + children: Optional[List[DocumentConversationChildMentionedUserChild]] = None + + company: Optional[str] = None + + company_ids: Optional[List[str]] = None + + date_of_birth: Optional[date] = None + + deal_ids: Optional[List[str]] = None + + email: Optional[str] = None + + emails: Optional[List[str]] = None + """All known email addresses; `email` holds the primary one""" + + image_url: Optional[str] = None + + job_title: Optional[str] = None + + link_urls: Optional[List[str]] = None + + name: Optional[str] = None + + phone_numbers: Optional[List[str]] = None + + tags: Optional[List[str]] = None + + text: Optional[str] = None + + type: Optional[Literal["person"]] = None + + username: Optional[str] = None + + +class DocumentConversationChild(BaseModel): + date: datetime + + sender: DocumentConversationChildSender + + id: Optional[str] = None + + channel: Optional[str] = None + """ + The channel or platform where the message was posted, if this Message is not + explicitly part of a conversation + """ + + children: Optional[List[DocumentConversationChildChild]] = None + + external_id: Optional[str] = None + """Provider message id (e.g. Slack ts, Gmail message id) — merge-dedup key""" + + is_self: Optional[bool] = None + + mentioned_users: Optional[List[DocumentConversationChildMentionedUser]] = None + + num_replies: Optional[int] = None + + replies: Optional[List[object]] = None + """The replies or comments to the message""" + + text: Optional[str] = None + + thread_id: Optional[str] = None + + title: Optional[str] = None + """The subject or title of the message""" + + type: Optional[Literal["message"]] = None + + updated_at: Optional[datetime] = None + + upvotes: Optional[int] = None + """The number of upvotes, likes, or reactions on the message""" + + +class DocumentConversation(BaseModel): + id: Optional[str] = None + + channel: Optional[str] = None + + children: Optional[List[DocumentConversationChild]] = None + + text: Optional[str] = None + + type: Optional[Literal["conversation"]] = None + + +class DocumentTraceChildTraceMessage(BaseModel): + """A message in an agent trace (user message, assistant message, or thinking).""" + + text: str + + id: Optional[str] = None + + message_type: Optional[Literal["message", "thinking"]] = None + + role: Optional[Literal["user", "assistant"]] = None + + timestamp: Optional[datetime] = None + + type: Optional[Literal["trace_message"]] = None + + +class DocumentTraceChildToolCall(BaseModel): + """A tool/function call made by the assistant.""" + + tool_call_id: str + + tool_name: str + + id: Optional[str] = None + + args: Optional[Dict[str, object]] = None + + type: Optional[Literal["tool_call"]] = None + + +class DocumentTraceChildToolResult(BaseModel): + """The result of a tool call.""" + + output: Union[str, Dict[str, object], List[object]] + + tool_call_id: str + + tool_name: str + + id: Optional[str] = None + + is_error: Optional[bool] = None + + type: Optional[Literal["tool_result"]] = None + + +DocumentTraceChild: TypeAlias = Annotated[ + Union[DocumentTraceChildTraceMessage, DocumentTraceChildToolCall, DocumentTraceChildToolResult], + PropertyInfo(discriminator="type"), +] + + +class DocumentTrace(BaseModel): + """An agent trace/transcript containing a sequence of steps. + + Steps can be TraceMessage (user/assistant messages or thinking), + ToolCall (function calls), or ToolResult (tool responses). + """ + + id: Optional[str] = None + + children: Optional[List[DocumentTraceChild]] = None + + text: Optional[str] = None + + title: Optional[str] = None + + type: Optional[Literal["trace"]] = None + + +class DocumentTranscriptChild(BaseModel): + """A speaker-attributed segment of a transcript (ENG-2476/D10). + + "Utterance" is the standard name for this across transcription providers + (AssemblyAI, Deepgram, Rev). Timestamps are relative offsets in seconds — + provider-native; absolute times derive from `Transcript.started_at`. + """ + + text: str + + id: Optional[str] = None + + end: Optional[float] = None + + speaker: Optional[object] = None + + start: Optional[float] = None + + type: Optional[Literal["utterance"]] = None + + +class DocumentTranscriptParticipantChildBlob(BaseModel): + """Represents embedded binary data using data URI scheme. + + Format: data:[][;base64], + Example: data:text/html;base64,PGh0bWw+... + """ + + data: str + + mimetype: str + + id: Optional[str] = None + + type: Optional[Literal["blob"]] = None + + +class DocumentTranscriptParticipantChildCode(BaseModel): + text: str + + id: Optional[str] = None + + language: Optional[str] = None + + type: Optional[Literal["code"]] = None + + +class DocumentTranscriptParticipantChildComment(BaseModel): + text: str + + id: Optional[str] = None + + created_at: Optional[datetime] = None + + type: Optional[Literal["comment"]] = None + + +class DocumentTranscriptParticipantChildDivider(BaseModel): + id: Optional[str] = None + + type: Optional[Literal["divider"]] = None + + +class DocumentTranscriptParticipantChildImage(BaseModel): + src: str + + text: str + + id: Optional[str] = None + + type: Optional[Literal["image"]] = None + + +class DocumentTranscriptParticipantChildLink(BaseModel): + text: str + + url: str + + id: Optional[str] = None + + type: Optional[Literal["link"]] = None + + +class DocumentTranscriptParticipantChildLineBreak(BaseModel): + id: Optional[str] = None + + type: Optional[Literal["line_break"]] = None + + +class DocumentTranscriptParticipantChildText(BaseModel): + text: str + + id: Optional[str] = None + + marks: Optional[List[Literal["bold", "italic", "underline", "strikethrough", "code", "math"]]] = None + + type: Optional[Literal["text"]] = None + + +class DocumentTranscriptParticipantChildToolCall(BaseModel): + """A tool/function call made by the assistant.""" + + tool_call_id: str + + tool_name: str + + id: Optional[str] = None + + args: Optional[Dict[str, object]] = None + + type: Optional[Literal["tool_call"]] = None + + +class DocumentTranscriptParticipantChildToolResult(BaseModel): + """The result of a tool call.""" + + output: Union[str, Dict[str, object], List[object]] + + tool_call_id: str + + tool_name: str + + id: Optional[str] = None + + is_error: Optional[bool] = None + + type: Optional[Literal["tool_result"]] = None + + +class DocumentTranscriptParticipantChildTraceMessage(BaseModel): + """A message in an agent trace (user message, assistant message, or thinking).""" + + text: str + + id: Optional[str] = None + + message_type: Optional[Literal["message", "thinking"]] = None + + role: Optional[Literal["user", "assistant"]] = None + + timestamp: Optional[datetime] = None + + type: Optional[Literal["trace_message"]] = None + + +DocumentTranscriptParticipantChild: TypeAlias = Union[ + DocumentTranscriptParticipantChildBlob, + DocumentTranscriptParticipantChildCode, + DocumentTranscriptParticipantChildComment, + DocumentTranscriptParticipantChildDivider, + DocumentTranscriptParticipantChildImage, + DocumentTranscriptParticipantChildLink, + DocumentTranscriptParticipantChildLineBreak, + DocumentTranscriptParticipantChildText, + DocumentTranscriptParticipantChildToolCall, + DocumentTranscriptParticipantChildToolResult, + DocumentTranscriptParticipantChildTraceMessage, + object, +] + + +class DocumentTranscriptParticipant(BaseModel): + id: Optional[str] = None + + address: Optional[str] = None + + alt_names: Optional[List[str]] = None + + children: Optional[List[DocumentTranscriptParticipantChild]] = None + + company: Optional[str] = None + + company_ids: Optional[List[str]] = None + + date_of_birth: Optional[date] = None + + deal_ids: Optional[List[str]] = None + + email: Optional[str] = None + + emails: Optional[List[str]] = None + """All known email addresses; `email` holds the primary one""" + + image_url: Optional[str] = None + + job_title: Optional[str] = None + + link_urls: Optional[List[str]] = None + + name: Optional[str] = None + + phone_numbers: Optional[List[str]] = None + + tags: Optional[List[str]] = None + + text: Optional[str] = None + + type: Optional[Literal["person"]] = None + + username: Optional[str] = None + + +class DocumentTranscript(BaseModel): + """ + A time-anchored, speaker-attributed transcript — meetings, calls + (ENG-2476/D10; mirrors the Trace+TraceStep precedent). + + Utterance timestamps are relative offsets from `started_at`, which is the + absolute wall-clock anchor. + """ + + id: Optional[str] = None + + children: Optional[List[DocumentTranscriptChild]] = None + + ended_at: Optional[datetime] = None + + participants: Optional[List[DocumentTranscriptParticipant]] = None + + started_at: Optional[datetime] = None + + text: Optional[str] = None + + title: Optional[str] = None + + type: Optional[Literal["transcript"]] = None + + +class DocumentCompanyChildBlob(BaseModel): + """Represents embedded binary data using data URI scheme. + + Format: data:[][;base64], + Example: data:text/html;base64,PGh0bWw+... + """ + + data: str + + mimetype: str + + id: Optional[str] = None + + type: Optional[Literal["blob"]] = None + + +class DocumentCompanyChildCalloutChildBlob(BaseModel): + """Represents embedded binary data using data URI scheme. + + Format: data:[][;base64], + Example: data:text/html;base64,PGh0bWw+... + """ + + data: str + + mimetype: str + + id: Optional[str] = None + + type: Optional[Literal["blob"]] = None + + +class DocumentCompanyChildCalloutChildCode(BaseModel): + text: str + + id: Optional[str] = None + + language: Optional[str] = None + + type: Optional[Literal["code"]] = None + + +class DocumentCompanyChildCalloutChildComment(BaseModel): + text: str + + id: Optional[str] = None + + created_at: Optional[datetime] = None + + type: Optional[Literal["comment"]] = None + + +class DocumentCompanyChildCalloutChildDivider(BaseModel): + id: Optional[str] = None + + type: Optional[Literal["divider"]] = None + + +class DocumentCompanyChildCalloutChildImage(BaseModel): + src: str + + text: str + + id: Optional[str] = None + + type: Optional[Literal["image"]] = None + + +class DocumentCompanyChildCalloutChildLink(BaseModel): + text: str + + url: str + + id: Optional[str] = None + + type: Optional[Literal["link"]] = None + + +class DocumentCompanyChildCalloutChildLineBreak(BaseModel): + id: Optional[str] = None + + type: Optional[Literal["line_break"]] = None + + +class DocumentCompanyChildCalloutChildText(BaseModel): + text: str + + id: Optional[str] = None + + marks: Optional[List[Literal["bold", "italic", "underline", "strikethrough", "code", "math"]]] = None + + type: Optional[Literal["text"]] = None + + +class DocumentCompanyChildCalloutChildToolCall(BaseModel): + """A tool/function call made by the assistant.""" + + tool_call_id: str + + tool_name: str + + id: Optional[str] = None + + args: Optional[Dict[str, object]] = None + + type: Optional[Literal["tool_call"]] = None + + +class DocumentCompanyChildCalloutChildToolResult(BaseModel): + """The result of a tool call.""" + + output: Union[str, Dict[str, object], List[object]] + + tool_call_id: str + + tool_name: str + + id: Optional[str] = None + + is_error: Optional[bool] = None + + type: Optional[Literal["tool_result"]] = None + + +class DocumentCompanyChildCalloutChildTraceMessage(BaseModel): + """A message in an agent trace (user message, assistant message, or thinking).""" + + text: str + + id: Optional[str] = None + + message_type: Optional[Literal["message", "thinking"]] = None + + role: Optional[Literal["user", "assistant"]] = None + + timestamp: Optional[datetime] = None + + type: Optional[Literal["trace_message"]] = None + + +DocumentCompanyChildCalloutChild: TypeAlias = Union[ + DocumentCompanyChildCalloutChildBlob, + DocumentCompanyChildCalloutChildCode, + DocumentCompanyChildCalloutChildComment, + DocumentCompanyChildCalloutChildDivider, + DocumentCompanyChildCalloutChildImage, + DocumentCompanyChildCalloutChildLink, + DocumentCompanyChildCalloutChildLineBreak, + DocumentCompanyChildCalloutChildText, + DocumentCompanyChildCalloutChildToolCall, + DocumentCompanyChildCalloutChildToolResult, + DocumentCompanyChildCalloutChildTraceMessage, + object, +] + + +class DocumentCompanyChildCallout(BaseModel): + id: Optional[str] = None + + children: Optional[List[DocumentCompanyChildCalloutChild]] = None + + text: Optional[str] = None + + title: Optional[str] = None + + type: Optional[Literal["callout"]] = None + + +class DocumentCompanyChildChunkChildBlob(BaseModel): + """Represents embedded binary data using data URI scheme. + + Format: data:[][;base64], + Example: data:text/html;base64,PGh0bWw+... + """ + + data: str + + mimetype: str + + id: Optional[str] = None + + type: Optional[Literal["blob"]] = None + + +class DocumentCompanyChildChunkChildCode(BaseModel): + text: str + + id: Optional[str] = None + + language: Optional[str] = None + + type: Optional[Literal["code"]] = None + + +class DocumentCompanyChildChunkChildComment(BaseModel): + text: str + + id: Optional[str] = None + + created_at: Optional[datetime] = None + + type: Optional[Literal["comment"]] = None + + +class DocumentCompanyChildChunkChildDivider(BaseModel): + id: Optional[str] = None + + type: Optional[Literal["divider"]] = None + + +class DocumentCompanyChildChunkChildImage(BaseModel): + src: str + + text: str + + id: Optional[str] = None + + type: Optional[Literal["image"]] = None + + +class DocumentCompanyChildChunkChildLink(BaseModel): + text: str + + url: str + + id: Optional[str] = None + + type: Optional[Literal["link"]] = None + + +class DocumentCompanyChildChunkChildLineBreak(BaseModel): + id: Optional[str] = None + + type: Optional[Literal["line_break"]] = None + + +class DocumentCompanyChildChunkChildText(BaseModel): + text: str + + id: Optional[str] = None + + marks: Optional[List[Literal["bold", "italic", "underline", "strikethrough", "code", "math"]]] = None + + type: Optional[Literal["text"]] = None + + +class DocumentCompanyChildChunkChildToolCall(BaseModel): + """A tool/function call made by the assistant.""" + + tool_call_id: str + + tool_name: str + + id: Optional[str] = None + + args: Optional[Dict[str, object]] = None + + type: Optional[Literal["tool_call"]] = None + + +class DocumentCompanyChildChunkChildToolResult(BaseModel): + """The result of a tool call.""" + + output: Union[str, Dict[str, object], List[object]] + + tool_call_id: str + + tool_name: str + + id: Optional[str] = None + + is_error: Optional[bool] = None + + type: Optional[Literal["tool_result"]] = None + + +class DocumentCompanyChildChunkChildTraceMessage(BaseModel): + """A message in an agent trace (user message, assistant message, or thinking).""" + + text: str + + id: Optional[str] = None + + message_type: Optional[Literal["message", "thinking"]] = None + + role: Optional[Literal["user", "assistant"]] = None + + timestamp: Optional[datetime] = None + + type: Optional[Literal["trace_message"]] = None + + +DocumentCompanyChildChunkChild: TypeAlias = Union[ + DocumentCompanyChildChunkChildBlob, + DocumentCompanyChildChunkChildCode, + DocumentCompanyChildChunkChildComment, + DocumentCompanyChildChunkChildDivider, + DocumentCompanyChildChunkChildImage, + DocumentCompanyChildChunkChildLink, + DocumentCompanyChildChunkChildLineBreak, + DocumentCompanyChildChunkChildText, + DocumentCompanyChildChunkChildToolCall, + DocumentCompanyChildChunkChildToolResult, + DocumentCompanyChildChunkChildTraceMessage, + object, +] + + +class DocumentCompanyChildChunk(BaseModel): + id: Optional[str] = None + + children: Optional[List[DocumentCompanyChildChunkChild]] = None + + text: Optional[str] = None + + type: Optional[Literal["chunk"]] = None + + +class DocumentCompanyChildCode(BaseModel): + text: str + + id: Optional[str] = None + + language: Optional[str] = None + + type: Optional[Literal["code"]] = None + + +class DocumentCompanyChildComment(BaseModel): + text: str + + id: Optional[str] = None + + created_at: Optional[datetime] = None + + type: Optional[Literal["comment"]] = None + + +class DocumentCompanyChildDivider(BaseModel): + id: Optional[str] = None + + type: Optional[Literal["divider"]] = None + + +class DocumentCompanyChildEquationChildBlob(BaseModel): + """Represents embedded binary data using data URI scheme. + + Format: data:[][;base64], + Example: data:text/html;base64,PGh0bWw+... + """ + + data: str + + mimetype: str + + id: Optional[str] = None + + type: Optional[Literal["blob"]] = None + + +class DocumentCompanyChildEquationChildCode(BaseModel): + text: str + + id: Optional[str] = None + + language: Optional[str] = None + + type: Optional[Literal["code"]] = None + + +class DocumentCompanyChildEquationChildComment(BaseModel): + text: str + + id: Optional[str] = None + + created_at: Optional[datetime] = None + + type: Optional[Literal["comment"]] = None + + +class DocumentCompanyChildEquationChildDivider(BaseModel): + id: Optional[str] = None + + type: Optional[Literal["divider"]] = None + + +class DocumentCompanyChildEquationChildImage(BaseModel): + src: str + + text: str + + id: Optional[str] = None + + type: Optional[Literal["image"]] = None + + +class DocumentCompanyChildEquationChildLink(BaseModel): + text: str + + url: str + + id: Optional[str] = None + + type: Optional[Literal["link"]] = None + + +class DocumentCompanyChildEquationChildLineBreak(BaseModel): + id: Optional[str] = None + + type: Optional[Literal["line_break"]] = None + + +class DocumentCompanyChildEquationChildText(BaseModel): + text: str + + id: Optional[str] = None + + marks: Optional[List[Literal["bold", "italic", "underline", "strikethrough", "code", "math"]]] = None + + type: Optional[Literal["text"]] = None + + +class DocumentCompanyChildEquationChildToolCall(BaseModel): + """A tool/function call made by the assistant.""" + + tool_call_id: str + + tool_name: str + + id: Optional[str] = None + + args: Optional[Dict[str, object]] = None + + type: Optional[Literal["tool_call"]] = None + + +class DocumentCompanyChildEquationChildToolResult(BaseModel): + """The result of a tool call.""" + + output: Union[str, Dict[str, object], List[object]] + + tool_call_id: str + + tool_name: str + + id: Optional[str] = None + + is_error: Optional[bool] = None + + type: Optional[Literal["tool_result"]] = None + + +class DocumentCompanyChildEquationChildTraceMessage(BaseModel): + """A message in an agent trace (user message, assistant message, or thinking).""" + + text: str + + id: Optional[str] = None + + message_type: Optional[Literal["message", "thinking"]] = None + + role: Optional[Literal["user", "assistant"]] = None + + timestamp: Optional[datetime] = None + + type: Optional[Literal["trace_message"]] = None + + +DocumentCompanyChildEquationChild: TypeAlias = Union[ + DocumentCompanyChildEquationChildBlob, + DocumentCompanyChildEquationChildCode, + DocumentCompanyChildEquationChildComment, + DocumentCompanyChildEquationChildDivider, + DocumentCompanyChildEquationChildImage, + DocumentCompanyChildEquationChildLink, + DocumentCompanyChildEquationChildLineBreak, + DocumentCompanyChildEquationChildText, + DocumentCompanyChildEquationChildToolCall, + DocumentCompanyChildEquationChildToolResult, + DocumentCompanyChildEquationChildTraceMessage, + object, +] + + +class DocumentCompanyChildEquation(BaseModel): + id: Optional[str] = None + + children: Optional[List[DocumentCompanyChildEquationChild]] = None + + text: Optional[str] = None + + type: Optional[Literal["equation"]] = None + + +class DocumentCompanyChildFootnoteChildBlob(BaseModel): + """Represents embedded binary data using data URI scheme. + + Format: data:[][;base64], + Example: data:text/html;base64,PGh0bWw+... + """ + + data: str + + mimetype: str + + id: Optional[str] = None + + type: Optional[Literal["blob"]] = None + + +class DocumentCompanyChildFootnoteChildCode(BaseModel): + text: str + + id: Optional[str] = None + + language: Optional[str] = None + + type: Optional[Literal["code"]] = None + + +class DocumentCompanyChildFootnoteChildComment(BaseModel): + text: str + + id: Optional[str] = None + + created_at: Optional[datetime] = None + + type: Optional[Literal["comment"]] = None + + +class DocumentCompanyChildFootnoteChildDivider(BaseModel): + id: Optional[str] = None + + type: Optional[Literal["divider"]] = None + + +class DocumentCompanyChildFootnoteChildImage(BaseModel): + src: str + + text: str + + id: Optional[str] = None + + type: Optional[Literal["image"]] = None + + +class DocumentCompanyChildFootnoteChildLink(BaseModel): + text: str + + url: str + + id: Optional[str] = None + + type: Optional[Literal["link"]] = None + + +class DocumentCompanyChildFootnoteChildLineBreak(BaseModel): + id: Optional[str] = None + + type: Optional[Literal["line_break"]] = None + + +class DocumentCompanyChildFootnoteChildText(BaseModel): + text: str + + id: Optional[str] = None + + marks: Optional[List[Literal["bold", "italic", "underline", "strikethrough", "code", "math"]]] = None + + type: Optional[Literal["text"]] = None + + +class DocumentCompanyChildFootnoteChildToolCall(BaseModel): + """A tool/function call made by the assistant.""" + + tool_call_id: str + + tool_name: str + + id: Optional[str] = None + + args: Optional[Dict[str, object]] = None + + type: Optional[Literal["tool_call"]] = None + + +class DocumentCompanyChildFootnoteChildToolResult(BaseModel): + """The result of a tool call.""" + + output: Union[str, Dict[str, object], List[object]] + + tool_call_id: str + + tool_name: str + + id: Optional[str] = None + + is_error: Optional[bool] = None + + type: Optional[Literal["tool_result"]] = None + + +class DocumentCompanyChildFootnoteChildTraceMessage(BaseModel): + """A message in an agent trace (user message, assistant message, or thinking).""" + + text: str + + id: Optional[str] = None + + message_type: Optional[Literal["message", "thinking"]] = None + + role: Optional[Literal["user", "assistant"]] = None + + timestamp: Optional[datetime] = None + + type: Optional[Literal["trace_message"]] = None + + +DocumentCompanyChildFootnoteChild: TypeAlias = Union[ + DocumentCompanyChildFootnoteChildBlob, + DocumentCompanyChildFootnoteChildCode, + DocumentCompanyChildFootnoteChildComment, + DocumentCompanyChildFootnoteChildDivider, + DocumentCompanyChildFootnoteChildImage, + DocumentCompanyChildFootnoteChildLink, + DocumentCompanyChildFootnoteChildLineBreak, + DocumentCompanyChildFootnoteChildText, + DocumentCompanyChildFootnoteChildToolCall, + DocumentCompanyChildFootnoteChildToolResult, + DocumentCompanyChildFootnoteChildTraceMessage, + object, +] + + +class DocumentCompanyChildFootnote(BaseModel): + id: Optional[str] = None + + children: Optional[List[DocumentCompanyChildFootnoteChild]] = None + + text: Optional[str] = None + + type: Optional[Literal["footnote"]] = None + + +class DocumentCompanyChildHeadingChildBlob(BaseModel): + """Represents embedded binary data using data URI scheme. + + Format: data:[][;base64], + Example: data:text/html;base64,PGh0bWw+... + """ + + data: str + + mimetype: str + + id: Optional[str] = None + + type: Optional[Literal["blob"]] = None + + +class DocumentCompanyChildHeadingChildCode(BaseModel): + text: str + + id: Optional[str] = None + + language: Optional[str] = None + + type: Optional[Literal["code"]] = None + + +class DocumentCompanyChildHeadingChildComment(BaseModel): + text: str + + id: Optional[str] = None + + created_at: Optional[datetime] = None + + type: Optional[Literal["comment"]] = None + + +class DocumentCompanyChildHeadingChildDivider(BaseModel): + id: Optional[str] = None + + type: Optional[Literal["divider"]] = None + + +class DocumentCompanyChildHeadingChildImage(BaseModel): + src: str + + text: str + + id: Optional[str] = None + + type: Optional[Literal["image"]] = None + + +class DocumentCompanyChildHeadingChildLink(BaseModel): + text: str + + url: str + + id: Optional[str] = None + + type: Optional[Literal["link"]] = None + + +class DocumentCompanyChildHeadingChildLineBreak(BaseModel): + id: Optional[str] = None + + type: Optional[Literal["line_break"]] = None + + +class DocumentCompanyChildHeadingChildText(BaseModel): + text: str + + id: Optional[str] = None + + marks: Optional[List[Literal["bold", "italic", "underline", "strikethrough", "code", "math"]]] = None + + type: Optional[Literal["text"]] = None + + +class DocumentCompanyChildHeadingChildToolCall(BaseModel): + """A tool/function call made by the assistant.""" + + tool_call_id: str + + tool_name: str + + id: Optional[str] = None + + args: Optional[Dict[str, object]] = None + + type: Optional[Literal["tool_call"]] = None + + +class DocumentCompanyChildHeadingChildToolResult(BaseModel): + """The result of a tool call.""" + + output: Union[str, Dict[str, object], List[object]] + + tool_call_id: str + + tool_name: str + + id: Optional[str] = None + + is_error: Optional[bool] = None + + type: Optional[Literal["tool_result"]] = None + + +class DocumentCompanyChildHeadingChildTraceMessage(BaseModel): + """A message in an agent trace (user message, assistant message, or thinking).""" + + text: str + + id: Optional[str] = None + + message_type: Optional[Literal["message", "thinking"]] = None + + role: Optional[Literal["user", "assistant"]] = None + + timestamp: Optional[datetime] = None + + type: Optional[Literal["trace_message"]] = None + + +DocumentCompanyChildHeadingChild: TypeAlias = Union[ + DocumentCompanyChildHeadingChildBlob, + DocumentCompanyChildHeadingChildCode, + DocumentCompanyChildHeadingChildComment, + DocumentCompanyChildHeadingChildDivider, + DocumentCompanyChildHeadingChildImage, + DocumentCompanyChildHeadingChildLink, + DocumentCompanyChildHeadingChildLineBreak, + DocumentCompanyChildHeadingChildText, + DocumentCompanyChildHeadingChildToolCall, + DocumentCompanyChildHeadingChildToolResult, + DocumentCompanyChildHeadingChildTraceMessage, + object, +] + + +class DocumentCompanyChildHeading(BaseModel): + level: int + + id: Optional[str] = None + + children: Optional[List[DocumentCompanyChildHeadingChild]] = None + + text: Optional[str] = None + + type: Optional[Literal["heading"]] = None + + +class DocumentCompanyChildImage(BaseModel): + src: str + + text: str + + id: Optional[str] = None + + type: Optional[Literal["image"]] = None + + +class DocumentCompanyChildLink(BaseModel): + text: str + + url: str + + id: Optional[str] = None + + type: Optional[Literal["link"]] = None + + +class DocumentCompanyChildLineBreak(BaseModel): + id: Optional[str] = None + + type: Optional[Literal["line_break"]] = None + + +class DocumentCompanyChildList(BaseModel): + id: Optional[str] = None + + children: Optional[List[object]] = None + + ordered: Optional[bool] = None + + text: Optional[str] = None + + type: Optional[Literal["list"]] = None + + +class DocumentCompanyChildListItemChildBlob(BaseModel): + """Represents embedded binary data using data URI scheme. + + Format: data:[][;base64], + Example: data:text/html;base64,PGh0bWw+... + """ + + data: str + + mimetype: str + + id: Optional[str] = None + + type: Optional[Literal["blob"]] = None + + +class DocumentCompanyChildListItemChildCode(BaseModel): + text: str + + id: Optional[str] = None + + language: Optional[str] = None + + type: Optional[Literal["code"]] = None + + +class DocumentCompanyChildListItemChildComment(BaseModel): + text: str + + id: Optional[str] = None + + created_at: Optional[datetime] = None + + type: Optional[Literal["comment"]] = None + + +class DocumentCompanyChildListItemChildDivider(BaseModel): + id: Optional[str] = None + + type: Optional[Literal["divider"]] = None + + +class DocumentCompanyChildListItemChildImage(BaseModel): + src: str + + text: str + + id: Optional[str] = None + + type: Optional[Literal["image"]] = None + + +class DocumentCompanyChildListItemChildLink(BaseModel): + text: str + + url: str + + id: Optional[str] = None + + type: Optional[Literal["link"]] = None + + +class DocumentCompanyChildListItemChildLineBreak(BaseModel): + id: Optional[str] = None + + type: Optional[Literal["line_break"]] = None + + +class DocumentCompanyChildListItemChildText(BaseModel): + text: str + + id: Optional[str] = None + + marks: Optional[List[Literal["bold", "italic", "underline", "strikethrough", "code", "math"]]] = None + + type: Optional[Literal["text"]] = None + + +class DocumentCompanyChildListItemChildToolCall(BaseModel): + """A tool/function call made by the assistant.""" + + tool_call_id: str + + tool_name: str + + id: Optional[str] = None + + args: Optional[Dict[str, object]] = None + + type: Optional[Literal["tool_call"]] = None + + +class DocumentCompanyChildListItemChildToolResult(BaseModel): + """The result of a tool call.""" + + output: Union[str, Dict[str, object], List[object]] + + tool_call_id: str + + tool_name: str + + id: Optional[str] = None + + is_error: Optional[bool] = None + + type: Optional[Literal["tool_result"]] = None + + +class DocumentCompanyChildListItemChildTraceMessage(BaseModel): + """A message in an agent trace (user message, assistant message, or thinking).""" + + text: str + + id: Optional[str] = None + + message_type: Optional[Literal["message", "thinking"]] = None + + role: Optional[Literal["user", "assistant"]] = None + + timestamp: Optional[datetime] = None + + type: Optional[Literal["trace_message"]] = None + + +DocumentCompanyChildListItemChild: TypeAlias = Union[ + DocumentCompanyChildListItemChildBlob, + DocumentCompanyChildListItemChildCode, + DocumentCompanyChildListItemChildComment, + DocumentCompanyChildListItemChildDivider, + DocumentCompanyChildListItemChildImage, + DocumentCompanyChildListItemChildLink, + DocumentCompanyChildListItemChildLineBreak, + DocumentCompanyChildListItemChildText, + DocumentCompanyChildListItemChildToolCall, + DocumentCompanyChildListItemChildToolResult, + DocumentCompanyChildListItemChildTraceMessage, + object, +] + + +class DocumentCompanyChildListItem(BaseModel): + id: Optional[str] = None + + children: Optional[List[DocumentCompanyChildListItemChild]] = None + + text: Optional[str] = None + + type: Optional[Literal["list_item"]] = None + + +class DocumentCompanyChildParagraphChildBlob(BaseModel): + """Represents embedded binary data using data URI scheme. + + Format: data:[][;base64], + Example: data:text/html;base64,PGh0bWw+... + """ + + data: str + + mimetype: str + + id: Optional[str] = None + + type: Optional[Literal["blob"]] = None + + +class DocumentCompanyChildParagraphChildCode(BaseModel): + text: str + + id: Optional[str] = None + + language: Optional[str] = None + + type: Optional[Literal["code"]] = None + + +class DocumentCompanyChildParagraphChildComment(BaseModel): + text: str + + id: Optional[str] = None + + created_at: Optional[datetime] = None + + type: Optional[Literal["comment"]] = None + + +class DocumentCompanyChildParagraphChildDivider(BaseModel): + id: Optional[str] = None + + type: Optional[Literal["divider"]] = None + + +class DocumentCompanyChildParagraphChildImage(BaseModel): + src: str + + text: str + + id: Optional[str] = None + + type: Optional[Literal["image"]] = None + + +class DocumentCompanyChildParagraphChildLink(BaseModel): + text: str + + url: str + + id: Optional[str] = None + + type: Optional[Literal["link"]] = None + + +class DocumentCompanyChildParagraphChildLineBreak(BaseModel): + id: Optional[str] = None + + type: Optional[Literal["line_break"]] = None + + +class DocumentCompanyChildParagraphChildText(BaseModel): + text: str + + id: Optional[str] = None + + marks: Optional[List[Literal["bold", "italic", "underline", "strikethrough", "code", "math"]]] = None + + type: Optional[Literal["text"]] = None + + +class DocumentCompanyChildParagraphChildToolCall(BaseModel): + """A tool/function call made by the assistant.""" + + tool_call_id: str + + tool_name: str + + id: Optional[str] = None + + args: Optional[Dict[str, object]] = None + + type: Optional[Literal["tool_call"]] = None + + +class DocumentCompanyChildParagraphChildToolResult(BaseModel): + """The result of a tool call.""" + + output: Union[str, Dict[str, object], List[object]] + + tool_call_id: str + + tool_name: str + + id: Optional[str] = None + + is_error: Optional[bool] = None + + type: Optional[Literal["tool_result"]] = None + + +class DocumentCompanyChildParagraphChildTraceMessage(BaseModel): + """A message in an agent trace (user message, assistant message, or thinking).""" + + text: str + + id: Optional[str] = None + + message_type: Optional[Literal["message", "thinking"]] = None + + role: Optional[Literal["user", "assistant"]] = None + + timestamp: Optional[datetime] = None + + type: Optional[Literal["trace_message"]] = None + + +DocumentCompanyChildParagraphChild: TypeAlias = Union[ + DocumentCompanyChildParagraphChildBlob, + DocumentCompanyChildParagraphChildCode, + DocumentCompanyChildParagraphChildComment, + DocumentCompanyChildParagraphChildDivider, + DocumentCompanyChildParagraphChildImage, + DocumentCompanyChildParagraphChildLink, + DocumentCompanyChildParagraphChildLineBreak, + DocumentCompanyChildParagraphChildText, + DocumentCompanyChildParagraphChildToolCall, + DocumentCompanyChildParagraphChildToolResult, + DocumentCompanyChildParagraphChildTraceMessage, + object, +] + + +class DocumentCompanyChildParagraph(BaseModel): + id: Optional[str] = None + + children: Optional[List[DocumentCompanyChildParagraphChild]] = None + + text: Optional[str] = None + + type: Optional[Literal["paragraph"]] = None + + +class DocumentCompanyChildQuoteChildBlob(BaseModel): + """Represents embedded binary data using data URI scheme. + + Format: data:[][;base64], + Example: data:text/html;base64,PGh0bWw+... + """ + + data: str + + mimetype: str + + id: Optional[str] = None + + type: Optional[Literal["blob"]] = None + + +class DocumentCompanyChildQuoteChildCode(BaseModel): + text: str + + id: Optional[str] = None + + language: Optional[str] = None + + type: Optional[Literal["code"]] = None + + +class DocumentCompanyChildQuoteChildComment(BaseModel): + text: str + + id: Optional[str] = None + + created_at: Optional[datetime] = None + + type: Optional[Literal["comment"]] = None + + +class DocumentCompanyChildQuoteChildDivider(BaseModel): + id: Optional[str] = None + + type: Optional[Literal["divider"]] = None + + +class DocumentCompanyChildQuoteChildImage(BaseModel): + src: str + + text: str + + id: Optional[str] = None + + type: Optional[Literal["image"]] = None + + +class DocumentCompanyChildQuoteChildLink(BaseModel): + text: str + + url: str + + id: Optional[str] = None + + type: Optional[Literal["link"]] = None + + +class DocumentCompanyChildQuoteChildLineBreak(BaseModel): + id: Optional[str] = None + + type: Optional[Literal["line_break"]] = None + + +class DocumentCompanyChildQuoteChildText(BaseModel): + text: str + + id: Optional[str] = None + + marks: Optional[List[Literal["bold", "italic", "underline", "strikethrough", "code", "math"]]] = None + + type: Optional[Literal["text"]] = None + + +class DocumentCompanyChildQuoteChildToolCall(BaseModel): + """A tool/function call made by the assistant.""" + + tool_call_id: str + + tool_name: str + + id: Optional[str] = None + + args: Optional[Dict[str, object]] = None + + type: Optional[Literal["tool_call"]] = None + + +class DocumentCompanyChildQuoteChildToolResult(BaseModel): + """The result of a tool call.""" + + output: Union[str, Dict[str, object], List[object]] + + tool_call_id: str + + tool_name: str + + id: Optional[str] = None + + is_error: Optional[bool] = None + + type: Optional[Literal["tool_result"]] = None + + +class DocumentCompanyChildQuoteChildTraceMessage(BaseModel): + """A message in an agent trace (user message, assistant message, or thinking).""" + + text: str + + id: Optional[str] = None + + message_type: Optional[Literal["message", "thinking"]] = None + + role: Optional[Literal["user", "assistant"]] = None + + timestamp: Optional[datetime] = None + + type: Optional[Literal["trace_message"]] = None + + +DocumentCompanyChildQuoteChild: TypeAlias = Union[ + DocumentCompanyChildQuoteChildBlob, + DocumentCompanyChildQuoteChildCode, + DocumentCompanyChildQuoteChildComment, + DocumentCompanyChildQuoteChildDivider, + DocumentCompanyChildQuoteChildImage, + DocumentCompanyChildQuoteChildLink, + DocumentCompanyChildQuoteChildLineBreak, + DocumentCompanyChildQuoteChildText, + DocumentCompanyChildQuoteChildToolCall, + DocumentCompanyChildQuoteChildToolResult, + DocumentCompanyChildQuoteChildTraceMessage, + object, +] + + +class DocumentCompanyChildQuote(BaseModel): + id: Optional[str] = None + + children: Optional[List[DocumentCompanyChildQuoteChild]] = None + + text: Optional[str] = None + + type: Optional[Literal["quote"]] = None + + +class DocumentCompanyChildTable(BaseModel): + id: Optional[str] = None + + children: Optional[List[object]] = None + + has_header: Optional[bool] = None + """Whether the first row should be treated as a header""" + + text: Optional[str] = None + + type: Optional[Literal["table"]] = None + + +class DocumentCompanyChildTableCellChildBlob(BaseModel): + """Represents embedded binary data using data URI scheme. + + Format: data:[][;base64], + Example: data:text/html;base64,PGh0bWw+... + """ + + data: str + + mimetype: str + + id: Optional[str] = None + + type: Optional[Literal["blob"]] = None + + +class DocumentCompanyChildTableCellChildCode(BaseModel): + text: str + + id: Optional[str] = None + + language: Optional[str] = None + + type: Optional[Literal["code"]] = None + + +class DocumentCompanyChildTableCellChildComment(BaseModel): + text: str + + id: Optional[str] = None + + created_at: Optional[datetime] = None + + type: Optional[Literal["comment"]] = None + + +class DocumentCompanyChildTableCellChildDivider(BaseModel): + id: Optional[str] = None + + type: Optional[Literal["divider"]] = None + + +class DocumentCompanyChildTableCellChildImage(BaseModel): + src: str + + text: str + + id: Optional[str] = None + + type: Optional[Literal["image"]] = None + + +class DocumentCompanyChildTableCellChildLink(BaseModel): + text: str + + url: str + + id: Optional[str] = None + + type: Optional[Literal["link"]] = None + + +class DocumentCompanyChildTableCellChildLineBreak(BaseModel): + id: Optional[str] = None + + type: Optional[Literal["line_break"]] = None + + +class DocumentCompanyChildTableCellChildText(BaseModel): + text: str + + id: Optional[str] = None + + marks: Optional[List[Literal["bold", "italic", "underline", "strikethrough", "code", "math"]]] = None + + type: Optional[Literal["text"]] = None + + +class DocumentCompanyChildTableCellChildToolCall(BaseModel): + """A tool/function call made by the assistant.""" + + tool_call_id: str + + tool_name: str + + id: Optional[str] = None + + args: Optional[Dict[str, object]] = None + + type: Optional[Literal["tool_call"]] = None + + +class DocumentCompanyChildTableCellChildToolResult(BaseModel): + """The result of a tool call.""" + + output: Union[str, Dict[str, object], List[object]] + + tool_call_id: str + + tool_name: str + + id: Optional[str] = None + + is_error: Optional[bool] = None + + type: Optional[Literal["tool_result"]] = None + + +class DocumentCompanyChildTableCellChildTraceMessage(BaseModel): + """A message in an agent trace (user message, assistant message, or thinking).""" + + text: str + + id: Optional[str] = None + + message_type: Optional[Literal["message", "thinking"]] = None + + role: Optional[Literal["user", "assistant"]] = None + + timestamp: Optional[datetime] = None + + type: Optional[Literal["trace_message"]] = None + + +DocumentCompanyChildTableCellChild: TypeAlias = Union[ + DocumentCompanyChildTableCellChildBlob, + DocumentCompanyChildTableCellChildCode, + DocumentCompanyChildTableCellChildComment, + DocumentCompanyChildTableCellChildDivider, + DocumentCompanyChildTableCellChildImage, + DocumentCompanyChildTableCellChildLink, + DocumentCompanyChildTableCellChildLineBreak, + DocumentCompanyChildTableCellChildText, + DocumentCompanyChildTableCellChildToolCall, + DocumentCompanyChildTableCellChildToolResult, + DocumentCompanyChildTableCellChildTraceMessage, + object, +] + + +class DocumentCompanyChildTableCell(BaseModel): + id: Optional[str] = None + + align: Optional[Literal["left", "center", "right"]] = None + + children: Optional[List[DocumentCompanyChildTableCellChild]] = None + + text: Optional[str] = None + + type: Optional[Literal["table_cell"]] = None + + +class DocumentCompanyChildTableRow(BaseModel): + id: Optional[str] = None + + children: Optional[List[object]] = None + + text: Optional[str] = None + + type: Optional[Literal["table_row"]] = None + + +class DocumentCompanyChildText(BaseModel): + text: str + + id: Optional[str] = None + + marks: Optional[List[Literal["bold", "italic", "underline", "strikethrough", "code", "math"]]] = None + + type: Optional[Literal["text"]] = None + + +class DocumentCompanyChildToDoChildBlob(BaseModel): + """Represents embedded binary data using data URI scheme. + + Format: data:[][;base64], + Example: data:text/html;base64,PGh0bWw+... + """ + + data: str + + mimetype: str + + id: Optional[str] = None + + type: Optional[Literal["blob"]] = None + + +class DocumentCompanyChildToDoChildCode(BaseModel): + text: str + + id: Optional[str] = None + + language: Optional[str] = None + + type: Optional[Literal["code"]] = None + + +class DocumentCompanyChildToDoChildComment(BaseModel): + text: str + + id: Optional[str] = None + + created_at: Optional[datetime] = None + + type: Optional[Literal["comment"]] = None + + +class DocumentCompanyChildToDoChildDivider(BaseModel): + id: Optional[str] = None + + type: Optional[Literal["divider"]] = None + + +class DocumentCompanyChildToDoChildImage(BaseModel): + src: str + + text: str + + id: Optional[str] = None + + type: Optional[Literal["image"]] = None + + +class DocumentCompanyChildToDoChildLink(BaseModel): + text: str + + url: str + + id: Optional[str] = None + + type: Optional[Literal["link"]] = None + + +class DocumentCompanyChildToDoChildLineBreak(BaseModel): + id: Optional[str] = None + + type: Optional[Literal["line_break"]] = None + + +class DocumentCompanyChildToDoChildText(BaseModel): + text: str + + id: Optional[str] = None + + marks: Optional[List[Literal["bold", "italic", "underline", "strikethrough", "code", "math"]]] = None + + type: Optional[Literal["text"]] = None + + +class DocumentCompanyChildToDoChildToolCall(BaseModel): + """A tool/function call made by the assistant.""" + + tool_call_id: str + + tool_name: str + + id: Optional[str] = None + + args: Optional[Dict[str, object]] = None + + type: Optional[Literal["tool_call"]] = None + + +class DocumentCompanyChildToDoChildToolResult(BaseModel): + """The result of a tool call.""" + + output: Union[str, Dict[str, object], List[object]] + + tool_call_id: str + + tool_name: str + + id: Optional[str] = None + + is_error: Optional[bool] = None + + type: Optional[Literal["tool_result"]] = None + + +class DocumentCompanyChildToDoChildTraceMessage(BaseModel): + """A message in an agent trace (user message, assistant message, or thinking).""" + + text: str + + id: Optional[str] = None + + message_type: Optional[Literal["message", "thinking"]] = None + + role: Optional[Literal["user", "assistant"]] = None + + timestamp: Optional[datetime] = None + + type: Optional[Literal["trace_message"]] = None + + +DocumentCompanyChildToDoChild: TypeAlias = Union[ + DocumentCompanyChildToDoChildBlob, + DocumentCompanyChildToDoChildCode, + DocumentCompanyChildToDoChildComment, + DocumentCompanyChildToDoChildDivider, + DocumentCompanyChildToDoChildImage, + DocumentCompanyChildToDoChildLink, + DocumentCompanyChildToDoChildLineBreak, + DocumentCompanyChildToDoChildText, + DocumentCompanyChildToDoChildToolCall, + DocumentCompanyChildToDoChildToolResult, + DocumentCompanyChildToDoChildTraceMessage, + object, +] + + +class DocumentCompanyChildToDo(BaseModel): + id: Optional[str] = None + + checked: Optional[bool] = None + + children: Optional[List[DocumentCompanyChildToDoChild]] = None + + text: Optional[str] = None + + type: Optional[Literal["todo"]] = None + + +class DocumentCompanyChildToolCall(BaseModel): + """A tool/function call made by the assistant.""" + + tool_call_id: str + + tool_name: str + + id: Optional[str] = None + + args: Optional[Dict[str, object]] = None + + type: Optional[Literal["tool_call"]] = None + + +class DocumentCompanyChildToolResult(BaseModel): + """The result of a tool call.""" + + output: Union[str, Dict[str, object], List[object]] + + tool_call_id: str + + tool_name: str + + id: Optional[str] = None + + is_error: Optional[bool] = None + + type: Optional[Literal["tool_result"]] = None + + +class DocumentCompanyChildTraceMessage(BaseModel): + """A message in an agent trace (user message, assistant message, or thinking).""" + + text: str + + id: Optional[str] = None + + message_type: Optional[Literal["message", "thinking"]] = None + + role: Optional[Literal["user", "assistant"]] = None + + timestamp: Optional[datetime] = None + + type: Optional[Literal["trace_message"]] = None + + +class DocumentCompanyChildUtterance(BaseModel): + """A speaker-attributed segment of a transcript (ENG-2476/D10). + + "Utterance" is the standard name for this across transcription providers + (AssemblyAI, Deepgram, Rev). Timestamps are relative offsets in seconds — + provider-native; absolute times derive from `Transcript.started_at`. + """ + + text: str + + id: Optional[str] = None + + end: Optional[float] = None + + speaker: Optional[object] = None + + start: Optional[float] = None + + type: Optional[Literal["utterance"]] = None + + +DocumentCompanyChild: TypeAlias = Annotated[ + Union[ + DocumentCompanyChildBlob, + DocumentCompanyChildCallout, + DocumentCompanyChildChunk, + DocumentCompanyChildCode, + DocumentCompanyChildComment, + DocumentCompanyChildDivider, + DocumentCompanyChildEquation, + DocumentCompanyChildFootnote, + DocumentCompanyChildHeading, + DocumentCompanyChildImage, + DocumentCompanyChildLink, + DocumentCompanyChildLineBreak, + DocumentCompanyChildList, + DocumentCompanyChildListItem, + DocumentCompanyChildParagraph, + DocumentCompanyChildQuote, + DocumentCompanyChildTable, + DocumentCompanyChildTableCell, + DocumentCompanyChildTableRow, + DocumentCompanyChildText, + DocumentCompanyChildToDo, + DocumentCompanyChildToolCall, + DocumentCompanyChildToolResult, + DocumentCompanyChildTraceMessage, + DocumentCompanyChildUtterance, + ], + PropertyInfo(discriminator="type"), +] + + +class DocumentCompany(BaseModel): + """A CRM company/account record (ENG-2476/D10).""" + + id: Optional[str] = None + + address: Optional[str] = None + + children: Optional[List[DocumentCompanyChild]] = None + + contact_ids: Optional[List[str]] = None + + deal_ids: Optional[List[str]] = None + + description: Optional[str] = None + + emails: Optional[List[str]] = None + + employees: Optional[int] = None + + image_url: Optional[str] = None + + industry: Optional[str] = None + + is_active: Optional[bool] = None + + name: Optional[str] = None + + phone_numbers: Optional[List[str]] = None + + tags: Optional[List[str]] = None + + text: Optional[str] = None + + timezone: Optional[str] = None + + type: Optional[Literal["company"]] = None + + websites: Optional[List[str]] = None + + +class DocumentDealChildBlob(BaseModel): + """Represents embedded binary data using data URI scheme. + + Format: data:[][;base64], + Example: data:text/html;base64,PGh0bWw+... + """ + + data: str + + mimetype: str + + id: Optional[str] = None + + type: Optional[Literal["blob"]] = None + + +class DocumentDealChildCalloutChildBlob(BaseModel): + """Represents embedded binary data using data URI scheme. + + Format: data:[][;base64], + Example: data:text/html;base64,PGh0bWw+... + """ + + data: str + + mimetype: str + + id: Optional[str] = None + + type: Optional[Literal["blob"]] = None + + +class DocumentDealChildCalloutChildCode(BaseModel): + text: str + + id: Optional[str] = None + + language: Optional[str] = None + + type: Optional[Literal["code"]] = None + + +class DocumentDealChildCalloutChildComment(BaseModel): + text: str + + id: Optional[str] = None + + created_at: Optional[datetime] = None + + type: Optional[Literal["comment"]] = None + + +class DocumentDealChildCalloutChildDivider(BaseModel): + id: Optional[str] = None + + type: Optional[Literal["divider"]] = None + + +class DocumentDealChildCalloutChildImage(BaseModel): + src: str + + text: str + + id: Optional[str] = None + + type: Optional[Literal["image"]] = None + + +class DocumentDealChildCalloutChildLink(BaseModel): + text: str + + url: str + + id: Optional[str] = None + + type: Optional[Literal["link"]] = None + + +class DocumentDealChildCalloutChildLineBreak(BaseModel): + id: Optional[str] = None + + type: Optional[Literal["line_break"]] = None + + +class DocumentDealChildCalloutChildText(BaseModel): + text: str + + id: Optional[str] = None + + marks: Optional[List[Literal["bold", "italic", "underline", "strikethrough", "code", "math"]]] = None + + type: Optional[Literal["text"]] = None + + +class DocumentDealChildCalloutChildToolCall(BaseModel): + """A tool/function call made by the assistant.""" + + tool_call_id: str + + tool_name: str + + id: Optional[str] = None + + args: Optional[Dict[str, object]] = None + + type: Optional[Literal["tool_call"]] = None + + +class DocumentDealChildCalloutChildToolResult(BaseModel): + """The result of a tool call.""" + + output: Union[str, Dict[str, object], List[object]] + + tool_call_id: str + + tool_name: str + + id: Optional[str] = None + + is_error: Optional[bool] = None + + type: Optional[Literal["tool_result"]] = None + + +class DocumentDealChildCalloutChildTraceMessage(BaseModel): + """A message in an agent trace (user message, assistant message, or thinking).""" + + text: str + + id: Optional[str] = None + + message_type: Optional[Literal["message", "thinking"]] = None + + role: Optional[Literal["user", "assistant"]] = None + + timestamp: Optional[datetime] = None + + type: Optional[Literal["trace_message"]] = None + + +DocumentDealChildCalloutChild: TypeAlias = Union[ + DocumentDealChildCalloutChildBlob, + DocumentDealChildCalloutChildCode, + DocumentDealChildCalloutChildComment, + DocumentDealChildCalloutChildDivider, + DocumentDealChildCalloutChildImage, + DocumentDealChildCalloutChildLink, + DocumentDealChildCalloutChildLineBreak, + DocumentDealChildCalloutChildText, + DocumentDealChildCalloutChildToolCall, + DocumentDealChildCalloutChildToolResult, + DocumentDealChildCalloutChildTraceMessage, + object, +] + + +class DocumentDealChildCallout(BaseModel): + id: Optional[str] = None + + children: Optional[List[DocumentDealChildCalloutChild]] = None + + text: Optional[str] = None + + title: Optional[str] = None + + type: Optional[Literal["callout"]] = None + + +class DocumentDealChildChunkChildBlob(BaseModel): + """Represents embedded binary data using data URI scheme. + + Format: data:[][;base64], + Example: data:text/html;base64,PGh0bWw+... + """ + + data: str + + mimetype: str + + id: Optional[str] = None + + type: Optional[Literal["blob"]] = None + + +class DocumentDealChildChunkChildCode(BaseModel): + text: str + + id: Optional[str] = None + + language: Optional[str] = None + + type: Optional[Literal["code"]] = None + + +class DocumentDealChildChunkChildComment(BaseModel): + text: str + + id: Optional[str] = None + + created_at: Optional[datetime] = None + + type: Optional[Literal["comment"]] = None + + +class DocumentDealChildChunkChildDivider(BaseModel): + id: Optional[str] = None + + type: Optional[Literal["divider"]] = None + + +class DocumentDealChildChunkChildImage(BaseModel): + src: str + + text: str + + id: Optional[str] = None + + type: Optional[Literal["image"]] = None + + +class DocumentDealChildChunkChildLink(BaseModel): + text: str + + url: str + + id: Optional[str] = None + + type: Optional[Literal["link"]] = None + + +class DocumentDealChildChunkChildLineBreak(BaseModel): + id: Optional[str] = None + + type: Optional[Literal["line_break"]] = None + + +class DocumentDealChildChunkChildText(BaseModel): + text: str + + id: Optional[str] = None + + marks: Optional[List[Literal["bold", "italic", "underline", "strikethrough", "code", "math"]]] = None + + type: Optional[Literal["text"]] = None + + +class DocumentDealChildChunkChildToolCall(BaseModel): + """A tool/function call made by the assistant.""" + + tool_call_id: str + + tool_name: str + + id: Optional[str] = None + + args: Optional[Dict[str, object]] = None + + type: Optional[Literal["tool_call"]] = None + + +class DocumentDealChildChunkChildToolResult(BaseModel): + """The result of a tool call.""" + + output: Union[str, Dict[str, object], List[object]] + + tool_call_id: str + + tool_name: str + + id: Optional[str] = None + + is_error: Optional[bool] = None + + type: Optional[Literal["tool_result"]] = None + + +class DocumentDealChildChunkChildTraceMessage(BaseModel): + """A message in an agent trace (user message, assistant message, or thinking).""" + + text: str + + id: Optional[str] = None + + message_type: Optional[Literal["message", "thinking"]] = None + + role: Optional[Literal["user", "assistant"]] = None + + timestamp: Optional[datetime] = None + + type: Optional[Literal["trace_message"]] = None + + +DocumentDealChildChunkChild: TypeAlias = Union[ + DocumentDealChildChunkChildBlob, + DocumentDealChildChunkChildCode, + DocumentDealChildChunkChildComment, + DocumentDealChildChunkChildDivider, + DocumentDealChildChunkChildImage, + DocumentDealChildChunkChildLink, + DocumentDealChildChunkChildLineBreak, + DocumentDealChildChunkChildText, + DocumentDealChildChunkChildToolCall, + DocumentDealChildChunkChildToolResult, + DocumentDealChildChunkChildTraceMessage, + object, +] + + +class DocumentDealChildChunk(BaseModel): + id: Optional[str] = None + + children: Optional[List[DocumentDealChildChunkChild]] = None + + text: Optional[str] = None + + type: Optional[Literal["chunk"]] = None + + +class DocumentDealChildCode(BaseModel): + text: str + + id: Optional[str] = None + + language: Optional[str] = None + + type: Optional[Literal["code"]] = None + + +class DocumentDealChildComment(BaseModel): + text: str + + id: Optional[str] = None + + created_at: Optional[datetime] = None + + type: Optional[Literal["comment"]] = None + + +class DocumentDealChildDivider(BaseModel): + id: Optional[str] = None + + type: Optional[Literal["divider"]] = None + + +class DocumentDealChildEquationChildBlob(BaseModel): + """Represents embedded binary data using data URI scheme. + + Format: data:[][;base64], + Example: data:text/html;base64,PGh0bWw+... + """ + + data: str + + mimetype: str + + id: Optional[str] = None + + type: Optional[Literal["blob"]] = None + + +class DocumentDealChildEquationChildCode(BaseModel): + text: str + + id: Optional[str] = None + + language: Optional[str] = None + + type: Optional[Literal["code"]] = None + + +class DocumentDealChildEquationChildComment(BaseModel): + text: str + + id: Optional[str] = None + + created_at: Optional[datetime] = None + + type: Optional[Literal["comment"]] = None + + +class DocumentDealChildEquationChildDivider(BaseModel): + id: Optional[str] = None + + type: Optional[Literal["divider"]] = None + + +class DocumentDealChildEquationChildImage(BaseModel): + src: str + + text: str + + id: Optional[str] = None + + type: Optional[Literal["image"]] = None + + +class DocumentDealChildEquationChildLink(BaseModel): + text: str + + url: str + + id: Optional[str] = None + + type: Optional[Literal["link"]] = None + + +class DocumentDealChildEquationChildLineBreak(BaseModel): + id: Optional[str] = None + + type: Optional[Literal["line_break"]] = None + + +class DocumentDealChildEquationChildText(BaseModel): + text: str + + id: Optional[str] = None + + marks: Optional[List[Literal["bold", "italic", "underline", "strikethrough", "code", "math"]]] = None + + type: Optional[Literal["text"]] = None + + +class DocumentDealChildEquationChildToolCall(BaseModel): + """A tool/function call made by the assistant.""" + + tool_call_id: str + + tool_name: str + + id: Optional[str] = None + + args: Optional[Dict[str, object]] = None + + type: Optional[Literal["tool_call"]] = None + + +class DocumentDealChildEquationChildToolResult(BaseModel): + """The result of a tool call.""" + + output: Union[str, Dict[str, object], List[object]] + + tool_call_id: str + + tool_name: str + + id: Optional[str] = None + + is_error: Optional[bool] = None + + type: Optional[Literal["tool_result"]] = None + + +class DocumentDealChildEquationChildTraceMessage(BaseModel): + """A message in an agent trace (user message, assistant message, or thinking).""" + + text: str + + id: Optional[str] = None + + message_type: Optional[Literal["message", "thinking"]] = None + + role: Optional[Literal["user", "assistant"]] = None + + timestamp: Optional[datetime] = None + + type: Optional[Literal["trace_message"]] = None + + +DocumentDealChildEquationChild: TypeAlias = Union[ + DocumentDealChildEquationChildBlob, + DocumentDealChildEquationChildCode, + DocumentDealChildEquationChildComment, + DocumentDealChildEquationChildDivider, + DocumentDealChildEquationChildImage, + DocumentDealChildEquationChildLink, + DocumentDealChildEquationChildLineBreak, + DocumentDealChildEquationChildText, + DocumentDealChildEquationChildToolCall, + DocumentDealChildEquationChildToolResult, + DocumentDealChildEquationChildTraceMessage, + object, +] + + +class DocumentDealChildEquation(BaseModel): + id: Optional[str] = None + + children: Optional[List[DocumentDealChildEquationChild]] = None + + text: Optional[str] = None + + type: Optional[Literal["equation"]] = None + + +class DocumentDealChildFootnoteChildBlob(BaseModel): + """Represents embedded binary data using data URI scheme. + + Format: data:[][;base64], + Example: data:text/html;base64,PGh0bWw+... + """ + + data: str + + mimetype: str + + id: Optional[str] = None + + type: Optional[Literal["blob"]] = None + + +class DocumentDealChildFootnoteChildCode(BaseModel): + text: str + + id: Optional[str] = None + + language: Optional[str] = None + + type: Optional[Literal["code"]] = None + + +class DocumentDealChildFootnoteChildComment(BaseModel): + text: str + + id: Optional[str] = None + + created_at: Optional[datetime] = None + + type: Optional[Literal["comment"]] = None + + +class DocumentDealChildFootnoteChildDivider(BaseModel): + id: Optional[str] = None + + type: Optional[Literal["divider"]] = None + + +class DocumentDealChildFootnoteChildImage(BaseModel): + src: str + + text: str + + id: Optional[str] = None + + type: Optional[Literal["image"]] = None + + +class DocumentDealChildFootnoteChildLink(BaseModel): + text: str + + url: str + + id: Optional[str] = None + + type: Optional[Literal["link"]] = None + + +class DocumentDealChildFootnoteChildLineBreak(BaseModel): + id: Optional[str] = None + + type: Optional[Literal["line_break"]] = None + + +class DocumentDealChildFootnoteChildText(BaseModel): + text: str + + id: Optional[str] = None + + marks: Optional[List[Literal["bold", "italic", "underline", "strikethrough", "code", "math"]]] = None + + type: Optional[Literal["text"]] = None + + +class DocumentDealChildFootnoteChildToolCall(BaseModel): + """A tool/function call made by the assistant.""" + + tool_call_id: str + + tool_name: str + + id: Optional[str] = None + + args: Optional[Dict[str, object]] = None + + type: Optional[Literal["tool_call"]] = None + + +class DocumentDealChildFootnoteChildToolResult(BaseModel): + """The result of a tool call.""" + + output: Union[str, Dict[str, object], List[object]] + + tool_call_id: str + + tool_name: str + + id: Optional[str] = None + + is_error: Optional[bool] = None + + type: Optional[Literal["tool_result"]] = None + + +class DocumentDealChildFootnoteChildTraceMessage(BaseModel): + """A message in an agent trace (user message, assistant message, or thinking).""" + + text: str + + id: Optional[str] = None + + message_type: Optional[Literal["message", "thinking"]] = None + + role: Optional[Literal["user", "assistant"]] = None + + timestamp: Optional[datetime] = None + + type: Optional[Literal["trace_message"]] = None + + +DocumentDealChildFootnoteChild: TypeAlias = Union[ + DocumentDealChildFootnoteChildBlob, + DocumentDealChildFootnoteChildCode, + DocumentDealChildFootnoteChildComment, + DocumentDealChildFootnoteChildDivider, + DocumentDealChildFootnoteChildImage, + DocumentDealChildFootnoteChildLink, + DocumentDealChildFootnoteChildLineBreak, + DocumentDealChildFootnoteChildText, + DocumentDealChildFootnoteChildToolCall, + DocumentDealChildFootnoteChildToolResult, + DocumentDealChildFootnoteChildTraceMessage, + object, +] + + +class DocumentDealChildFootnote(BaseModel): + id: Optional[str] = None + + children: Optional[List[DocumentDealChildFootnoteChild]] = None + + text: Optional[str] = None + + type: Optional[Literal["footnote"]] = None + + +class DocumentDealChildHeadingChildBlob(BaseModel): + """Represents embedded binary data using data URI scheme. + + Format: data:[][;base64], + Example: data:text/html;base64,PGh0bWw+... + """ + + data: str + + mimetype: str + + id: Optional[str] = None + + type: Optional[Literal["blob"]] = None + + +class DocumentDealChildHeadingChildCode(BaseModel): + text: str + + id: Optional[str] = None + + language: Optional[str] = None + + type: Optional[Literal["code"]] = None + + +class DocumentDealChildHeadingChildComment(BaseModel): + text: str + + id: Optional[str] = None + + created_at: Optional[datetime] = None + + type: Optional[Literal["comment"]] = None + + +class DocumentDealChildHeadingChildDivider(BaseModel): + id: Optional[str] = None + + type: Optional[Literal["divider"]] = None + + +class DocumentDealChildHeadingChildImage(BaseModel): + src: str + + text: str + + id: Optional[str] = None + + type: Optional[Literal["image"]] = None + + +class DocumentDealChildHeadingChildLink(BaseModel): + text: str + + url: str + + id: Optional[str] = None + + type: Optional[Literal["link"]] = None + + +class DocumentDealChildHeadingChildLineBreak(BaseModel): + id: Optional[str] = None + + type: Optional[Literal["line_break"]] = None + + +class DocumentDealChildHeadingChildText(BaseModel): + text: str + + id: Optional[str] = None + + marks: Optional[List[Literal["bold", "italic", "underline", "strikethrough", "code", "math"]]] = None + + type: Optional[Literal["text"]] = None + + +class DocumentDealChildHeadingChildToolCall(BaseModel): + """A tool/function call made by the assistant.""" + + tool_call_id: str + + tool_name: str + + id: Optional[str] = None + + args: Optional[Dict[str, object]] = None + + type: Optional[Literal["tool_call"]] = None + + +class DocumentDealChildHeadingChildToolResult(BaseModel): + """The result of a tool call.""" + + output: Union[str, Dict[str, object], List[object]] + + tool_call_id: str + + tool_name: str + + id: Optional[str] = None + + is_error: Optional[bool] = None + + type: Optional[Literal["tool_result"]] = None + + +class DocumentDealChildHeadingChildTraceMessage(BaseModel): + """A message in an agent trace (user message, assistant message, or thinking).""" + + text: str + + id: Optional[str] = None + + message_type: Optional[Literal["message", "thinking"]] = None + + role: Optional[Literal["user", "assistant"]] = None + + timestamp: Optional[datetime] = None + + type: Optional[Literal["trace_message"]] = None + + +DocumentDealChildHeadingChild: TypeAlias = Union[ + DocumentDealChildHeadingChildBlob, + DocumentDealChildHeadingChildCode, + DocumentDealChildHeadingChildComment, + DocumentDealChildHeadingChildDivider, + DocumentDealChildHeadingChildImage, + DocumentDealChildHeadingChildLink, + DocumentDealChildHeadingChildLineBreak, + DocumentDealChildHeadingChildText, + DocumentDealChildHeadingChildToolCall, + DocumentDealChildHeadingChildToolResult, + DocumentDealChildHeadingChildTraceMessage, + object, +] + + +class DocumentDealChildHeading(BaseModel): + level: int + + id: Optional[str] = None + + children: Optional[List[DocumentDealChildHeadingChild]] = None + + text: Optional[str] = None + + type: Optional[Literal["heading"]] = None + + +class DocumentDealChildImage(BaseModel): + src: str + + text: str + + id: Optional[str] = None + + type: Optional[Literal["image"]] = None + + +class DocumentDealChildLink(BaseModel): + text: str + + url: str + + id: Optional[str] = None + + type: Optional[Literal["link"]] = None + + +class DocumentDealChildLineBreak(BaseModel): + id: Optional[str] = None + + type: Optional[Literal["line_break"]] = None + + +class DocumentDealChildList(BaseModel): + id: Optional[str] = None + + children: Optional[List[object]] = None + + ordered: Optional[bool] = None + + text: Optional[str] = None + + type: Optional[Literal["list"]] = None + + +class DocumentDealChildListItemChildBlob(BaseModel): + """Represents embedded binary data using data URI scheme. + + Format: data:[][;base64], + Example: data:text/html;base64,PGh0bWw+... + """ + + data: str + + mimetype: str + + id: Optional[str] = None + + type: Optional[Literal["blob"]] = None + + +class DocumentDealChildListItemChildCode(BaseModel): + text: str + + id: Optional[str] = None + + language: Optional[str] = None + + type: Optional[Literal["code"]] = None + + +class DocumentDealChildListItemChildComment(BaseModel): + text: str + + id: Optional[str] = None + + created_at: Optional[datetime] = None + + type: Optional[Literal["comment"]] = None + + +class DocumentDealChildListItemChildDivider(BaseModel): + id: Optional[str] = None + + type: Optional[Literal["divider"]] = None + + +class DocumentDealChildListItemChildImage(BaseModel): + src: str + + text: str + + id: Optional[str] = None + + type: Optional[Literal["image"]] = None + + +class DocumentDealChildListItemChildLink(BaseModel): + text: str + + url: str + + id: Optional[str] = None + + type: Optional[Literal["link"]] = None + + +class DocumentDealChildListItemChildLineBreak(BaseModel): + id: Optional[str] = None + + type: Optional[Literal["line_break"]] = None + + +class DocumentDealChildListItemChildText(BaseModel): + text: str + + id: Optional[str] = None + + marks: Optional[List[Literal["bold", "italic", "underline", "strikethrough", "code", "math"]]] = None + + type: Optional[Literal["text"]] = None + + +class DocumentDealChildListItemChildToolCall(BaseModel): + """A tool/function call made by the assistant.""" + + tool_call_id: str + + tool_name: str + + id: Optional[str] = None + + args: Optional[Dict[str, object]] = None + + type: Optional[Literal["tool_call"]] = None + + +class DocumentDealChildListItemChildToolResult(BaseModel): + """The result of a tool call.""" + + output: Union[str, Dict[str, object], List[object]] + + tool_call_id: str + + tool_name: str + + id: Optional[str] = None + + is_error: Optional[bool] = None + + type: Optional[Literal["tool_result"]] = None + + +class DocumentDealChildListItemChildTraceMessage(BaseModel): + """A message in an agent trace (user message, assistant message, or thinking).""" + + text: str + + id: Optional[str] = None + + message_type: Optional[Literal["message", "thinking"]] = None + + role: Optional[Literal["user", "assistant"]] = None + + timestamp: Optional[datetime] = None + + type: Optional[Literal["trace_message"]] = None + + +DocumentDealChildListItemChild: TypeAlias = Union[ + DocumentDealChildListItemChildBlob, + DocumentDealChildListItemChildCode, + DocumentDealChildListItemChildComment, + DocumentDealChildListItemChildDivider, + DocumentDealChildListItemChildImage, + DocumentDealChildListItemChildLink, + DocumentDealChildListItemChildLineBreak, + DocumentDealChildListItemChildText, + DocumentDealChildListItemChildToolCall, + DocumentDealChildListItemChildToolResult, + DocumentDealChildListItemChildTraceMessage, + object, +] + + +class DocumentDealChildListItem(BaseModel): + id: Optional[str] = None + + children: Optional[List[DocumentDealChildListItemChild]] = None + + text: Optional[str] = None + + type: Optional[Literal["list_item"]] = None + + +class DocumentDealChildParagraphChildBlob(BaseModel): + """Represents embedded binary data using data URI scheme. + + Format: data:[][;base64], + Example: data:text/html;base64,PGh0bWw+... + """ + + data: str + + mimetype: str + + id: Optional[str] = None + + type: Optional[Literal["blob"]] = None + + +class DocumentDealChildParagraphChildCode(BaseModel): + text: str + + id: Optional[str] = None + + language: Optional[str] = None + + type: Optional[Literal["code"]] = None + + +class DocumentDealChildParagraphChildComment(BaseModel): + text: str + + id: Optional[str] = None + + created_at: Optional[datetime] = None + + type: Optional[Literal["comment"]] = None + + +class DocumentDealChildParagraphChildDivider(BaseModel): + id: Optional[str] = None + + type: Optional[Literal["divider"]] = None + + +class DocumentDealChildParagraphChildImage(BaseModel): + src: str + + text: str + + id: Optional[str] = None + + type: Optional[Literal["image"]] = None + + +class DocumentDealChildParagraphChildLink(BaseModel): + text: str + + url: str + + id: Optional[str] = None + + type: Optional[Literal["link"]] = None + + +class DocumentDealChildParagraphChildLineBreak(BaseModel): + id: Optional[str] = None + + type: Optional[Literal["line_break"]] = None + + +class DocumentDealChildParagraphChildText(BaseModel): + text: str + + id: Optional[str] = None + + marks: Optional[List[Literal["bold", "italic", "underline", "strikethrough", "code", "math"]]] = None + + type: Optional[Literal["text"]] = None + + +class DocumentDealChildParagraphChildToolCall(BaseModel): + """A tool/function call made by the assistant.""" + + tool_call_id: str + + tool_name: str + + id: Optional[str] = None + + args: Optional[Dict[str, object]] = None + + type: Optional[Literal["tool_call"]] = None + + +class DocumentDealChildParagraphChildToolResult(BaseModel): + """The result of a tool call.""" + + output: Union[str, Dict[str, object], List[object]] + + tool_call_id: str + + tool_name: str + + id: Optional[str] = None + + is_error: Optional[bool] = None + + type: Optional[Literal["tool_result"]] = None + + +class DocumentDealChildParagraphChildTraceMessage(BaseModel): + """A message in an agent trace (user message, assistant message, or thinking).""" + + text: str + + id: Optional[str] = None + + message_type: Optional[Literal["message", "thinking"]] = None + + role: Optional[Literal["user", "assistant"]] = None + + timestamp: Optional[datetime] = None + + type: Optional[Literal["trace_message"]] = None + + +DocumentDealChildParagraphChild: TypeAlias = Union[ + DocumentDealChildParagraphChildBlob, + DocumentDealChildParagraphChildCode, + DocumentDealChildParagraphChildComment, + DocumentDealChildParagraphChildDivider, + DocumentDealChildParagraphChildImage, + DocumentDealChildParagraphChildLink, + DocumentDealChildParagraphChildLineBreak, + DocumentDealChildParagraphChildText, + DocumentDealChildParagraphChildToolCall, + DocumentDealChildParagraphChildToolResult, + DocumentDealChildParagraphChildTraceMessage, + object, +] + + +class DocumentDealChildParagraph(BaseModel): + id: Optional[str] = None + + children: Optional[List[DocumentDealChildParagraphChild]] = None + + text: Optional[str] = None + + type: Optional[Literal["paragraph"]] = None + + +class DocumentDealChildQuoteChildBlob(BaseModel): + """Represents embedded binary data using data URI scheme. + + Format: data:[][;base64], + Example: data:text/html;base64,PGh0bWw+... + """ + + data: str + + mimetype: str + + id: Optional[str] = None + + type: Optional[Literal["blob"]] = None + + +class DocumentDealChildQuoteChildCode(BaseModel): + text: str + + id: Optional[str] = None + + language: Optional[str] = None + + type: Optional[Literal["code"]] = None + + +class DocumentDealChildQuoteChildComment(BaseModel): + text: str + + id: Optional[str] = None + + created_at: Optional[datetime] = None + + type: Optional[Literal["comment"]] = None + + +class DocumentDealChildQuoteChildDivider(BaseModel): + id: Optional[str] = None + + type: Optional[Literal["divider"]] = None + + +class DocumentDealChildQuoteChildImage(BaseModel): + src: str + + text: str + + id: Optional[str] = None + + type: Optional[Literal["image"]] = None + + +class DocumentDealChildQuoteChildLink(BaseModel): + text: str + + url: str + + id: Optional[str] = None + + type: Optional[Literal["link"]] = None + + +class DocumentDealChildQuoteChildLineBreak(BaseModel): + id: Optional[str] = None + + type: Optional[Literal["line_break"]] = None + + +class DocumentDealChildQuoteChildText(BaseModel): + text: str + + id: Optional[str] = None + + marks: Optional[List[Literal["bold", "italic", "underline", "strikethrough", "code", "math"]]] = None + + type: Optional[Literal["text"]] = None + + +class DocumentDealChildQuoteChildToolCall(BaseModel): + """A tool/function call made by the assistant.""" + + tool_call_id: str + + tool_name: str + + id: Optional[str] = None + + args: Optional[Dict[str, object]] = None + + type: Optional[Literal["tool_call"]] = None + + +class DocumentDealChildQuoteChildToolResult(BaseModel): + """The result of a tool call.""" + + output: Union[str, Dict[str, object], List[object]] + + tool_call_id: str + + tool_name: str + + id: Optional[str] = None + + is_error: Optional[bool] = None + + type: Optional[Literal["tool_result"]] = None + + +class DocumentDealChildQuoteChildTraceMessage(BaseModel): + """A message in an agent trace (user message, assistant message, or thinking).""" + + text: str + + id: Optional[str] = None + + message_type: Optional[Literal["message", "thinking"]] = None + + role: Optional[Literal["user", "assistant"]] = None + + timestamp: Optional[datetime] = None + + type: Optional[Literal["trace_message"]] = None + + +DocumentDealChildQuoteChild: TypeAlias = Union[ + DocumentDealChildQuoteChildBlob, + DocumentDealChildQuoteChildCode, + DocumentDealChildQuoteChildComment, + DocumentDealChildQuoteChildDivider, + DocumentDealChildQuoteChildImage, + DocumentDealChildQuoteChildLink, + DocumentDealChildQuoteChildLineBreak, + DocumentDealChildQuoteChildText, + DocumentDealChildQuoteChildToolCall, + DocumentDealChildQuoteChildToolResult, + DocumentDealChildQuoteChildTraceMessage, + object, +] + + +class DocumentDealChildQuote(BaseModel): + id: Optional[str] = None + + children: Optional[List[DocumentDealChildQuoteChild]] = None + + text: Optional[str] = None + + type: Optional[Literal["quote"]] = None + + +class DocumentDealChildTable(BaseModel): + id: Optional[str] = None + + children: Optional[List[object]] = None + + has_header: Optional[bool] = None + """Whether the first row should be treated as a header""" + + text: Optional[str] = None + + type: Optional[Literal["table"]] = None + + +class DocumentDealChildTableCellChildBlob(BaseModel): + """Represents embedded binary data using data URI scheme. + + Format: data:[][;base64], + Example: data:text/html;base64,PGh0bWw+... + """ + + data: str + + mimetype: str + + id: Optional[str] = None + + type: Optional[Literal["blob"]] = None + + +class DocumentDealChildTableCellChildCode(BaseModel): + text: str + + id: Optional[str] = None + + language: Optional[str] = None + + type: Optional[Literal["code"]] = None + + +class DocumentDealChildTableCellChildComment(BaseModel): + text: str + + id: Optional[str] = None + + created_at: Optional[datetime] = None + + type: Optional[Literal["comment"]] = None + + +class DocumentDealChildTableCellChildDivider(BaseModel): + id: Optional[str] = None + + type: Optional[Literal["divider"]] = None + + +class DocumentDealChildTableCellChildImage(BaseModel): + src: str + + text: str + + id: Optional[str] = None + + type: Optional[Literal["image"]] = None + + +class DocumentDealChildTableCellChildLink(BaseModel): + text: str + + url: str + + id: Optional[str] = None + + type: Optional[Literal["link"]] = None + + +class DocumentDealChildTableCellChildLineBreak(BaseModel): + id: Optional[str] = None + + type: Optional[Literal["line_break"]] = None + + +class DocumentDealChildTableCellChildText(BaseModel): + text: str + + id: Optional[str] = None + + marks: Optional[List[Literal["bold", "italic", "underline", "strikethrough", "code", "math"]]] = None + + type: Optional[Literal["text"]] = None + + +class DocumentDealChildTableCellChildToolCall(BaseModel): + """A tool/function call made by the assistant.""" + + tool_call_id: str + + tool_name: str + + id: Optional[str] = None + + args: Optional[Dict[str, object]] = None + + type: Optional[Literal["tool_call"]] = None + + +class DocumentDealChildTableCellChildToolResult(BaseModel): + """The result of a tool call.""" + + output: Union[str, Dict[str, object], List[object]] + + tool_call_id: str + + tool_name: str + + id: Optional[str] = None + + is_error: Optional[bool] = None + + type: Optional[Literal["tool_result"]] = None + + +class DocumentDealChildTableCellChildTraceMessage(BaseModel): + """A message in an agent trace (user message, assistant message, or thinking).""" + + text: str + + id: Optional[str] = None + + message_type: Optional[Literal["message", "thinking"]] = None + + role: Optional[Literal["user", "assistant"]] = None + + timestamp: Optional[datetime] = None + + type: Optional[Literal["trace_message"]] = None + + +DocumentDealChildTableCellChild: TypeAlias = Union[ + DocumentDealChildTableCellChildBlob, + DocumentDealChildTableCellChildCode, + DocumentDealChildTableCellChildComment, + DocumentDealChildTableCellChildDivider, + DocumentDealChildTableCellChildImage, + DocumentDealChildTableCellChildLink, + DocumentDealChildTableCellChildLineBreak, + DocumentDealChildTableCellChildText, + DocumentDealChildTableCellChildToolCall, + DocumentDealChildTableCellChildToolResult, + DocumentDealChildTableCellChildTraceMessage, + object, +] + + +class DocumentDealChildTableCell(BaseModel): + id: Optional[str] = None + + align: Optional[Literal["left", "center", "right"]] = None + + children: Optional[List[DocumentDealChildTableCellChild]] = None + + text: Optional[str] = None + + type: Optional[Literal["table_cell"]] = None + + +class DocumentDealChildTableRow(BaseModel): + id: Optional[str] = None + + children: Optional[List[object]] = None + + text: Optional[str] = None + + type: Optional[Literal["table_row"]] = None + + +class DocumentDealChildText(BaseModel): + text: str + + id: Optional[str] = None + + marks: Optional[List[Literal["bold", "italic", "underline", "strikethrough", "code", "math"]]] = None + + type: Optional[Literal["text"]] = None + + +class DocumentDealChildToDoChildBlob(BaseModel): + """Represents embedded binary data using data URI scheme. + + Format: data:[][;base64], + Example: data:text/html;base64,PGh0bWw+... + """ + + data: str + + mimetype: str + + id: Optional[str] = None + + type: Optional[Literal["blob"]] = None + + +class DocumentDealChildToDoChildCode(BaseModel): + text: str + + id: Optional[str] = None + + language: Optional[str] = None + + type: Optional[Literal["code"]] = None + + +class DocumentDealChildToDoChildComment(BaseModel): + text: str + + id: Optional[str] = None + + created_at: Optional[datetime] = None + + type: Optional[Literal["comment"]] = None + + +class DocumentDealChildToDoChildDivider(BaseModel): + id: Optional[str] = None + + type: Optional[Literal["divider"]] = None + + +class DocumentDealChildToDoChildImage(BaseModel): + src: str + + text: str + + id: Optional[str] = None + + type: Optional[Literal["image"]] = None + + +class DocumentDealChildToDoChildLink(BaseModel): + text: str + + url: str + + id: Optional[str] = None + + type: Optional[Literal["link"]] = None + + +class DocumentDealChildToDoChildLineBreak(BaseModel): + id: Optional[str] = None + + type: Optional[Literal["line_break"]] = None + + +class DocumentDealChildToDoChildText(BaseModel): + text: str + + id: Optional[str] = None + + marks: Optional[List[Literal["bold", "italic", "underline", "strikethrough", "code", "math"]]] = None + + type: Optional[Literal["text"]] = None + + +class DocumentDealChildToDoChildToolCall(BaseModel): + """A tool/function call made by the assistant.""" + + tool_call_id: str + + tool_name: str + + id: Optional[str] = None + + args: Optional[Dict[str, object]] = None + + type: Optional[Literal["tool_call"]] = None + + +class DocumentDealChildToDoChildToolResult(BaseModel): + """The result of a tool call.""" + + output: Union[str, Dict[str, object], List[object]] + + tool_call_id: str + + tool_name: str + + id: Optional[str] = None + + is_error: Optional[bool] = None + + type: Optional[Literal["tool_result"]] = None + + +class DocumentDealChildToDoChildTraceMessage(BaseModel): + """A message in an agent trace (user message, assistant message, or thinking).""" + + text: str + + id: Optional[str] = None + + message_type: Optional[Literal["message", "thinking"]] = None + + role: Optional[Literal["user", "assistant"]] = None + + timestamp: Optional[datetime] = None + + type: Optional[Literal["trace_message"]] = None + + +DocumentDealChildToDoChild: TypeAlias = Union[ + DocumentDealChildToDoChildBlob, + DocumentDealChildToDoChildCode, + DocumentDealChildToDoChildComment, + DocumentDealChildToDoChildDivider, + DocumentDealChildToDoChildImage, + DocumentDealChildToDoChildLink, + DocumentDealChildToDoChildLineBreak, + DocumentDealChildToDoChildText, + DocumentDealChildToDoChildToolCall, + DocumentDealChildToDoChildToolResult, + DocumentDealChildToDoChildTraceMessage, + object, +] + + +class DocumentDealChildToDo(BaseModel): + id: Optional[str] = None + + checked: Optional[bool] = None + + children: Optional[List[DocumentDealChildToDoChild]] = None + + text: Optional[str] = None + + type: Optional[Literal["todo"]] = None + + +class DocumentDealChildToolCall(BaseModel): + """A tool/function call made by the assistant.""" + + tool_call_id: str + + tool_name: str + + id: Optional[str] = None + + args: Optional[Dict[str, object]] = None + + type: Optional[Literal["tool_call"]] = None + + +class DocumentDealChildToolResult(BaseModel): + """The result of a tool call.""" + + output: Union[str, Dict[str, object], List[object]] + + tool_call_id: str + + tool_name: str + + id: Optional[str] = None + + is_error: Optional[bool] = None + + type: Optional[Literal["tool_result"]] = None + + +class DocumentDealChildTraceMessage(BaseModel): + """A message in an agent trace (user message, assistant message, or thinking).""" + + text: str + + id: Optional[str] = None + + message_type: Optional[Literal["message", "thinking"]] = None + + role: Optional[Literal["user", "assistant"]] = None + + timestamp: Optional[datetime] = None + + type: Optional[Literal["trace_message"]] = None + + +class DocumentDealChildUtterance(BaseModel): + """A speaker-attributed segment of a transcript (ENG-2476/D10). + + "Utterance" is the standard name for this across transcription providers + (AssemblyAI, Deepgram, Rev). Timestamps are relative offsets in seconds — + provider-native; absolute times derive from `Transcript.started_at`. + """ + + text: str + + id: Optional[str] = None + + end: Optional[float] = None + + speaker: Optional[object] = None + + start: Optional[float] = None + + type: Optional[Literal["utterance"]] = None + + +DocumentDealChild: TypeAlias = Annotated[ + Union[ + DocumentDealChildBlob, + DocumentDealChildCallout, + DocumentDealChildChunk, + DocumentDealChildCode, + DocumentDealChildComment, + DocumentDealChildDivider, + DocumentDealChildEquation, + DocumentDealChildFootnote, + DocumentDealChildHeading, + DocumentDealChildImage, + DocumentDealChildLink, + DocumentDealChildLineBreak, + DocumentDealChildList, + DocumentDealChildListItem, + DocumentDealChildParagraph, + DocumentDealChildQuote, + DocumentDealChildTable, + DocumentDealChildTableCell, + DocumentDealChildTableRow, + DocumentDealChildText, + DocumentDealChildToDo, + DocumentDealChildToolCall, + DocumentDealChildToolResult, + DocumentDealChildTraceMessage, + DocumentDealChildUtterance, + ], + PropertyInfo(discriminator="type"), +] + + +class DocumentDeal(BaseModel): + """A CRM deal/opportunity record (ENG-2476/D10).""" + + id: Optional[str] = None + + amount: Optional[float] = None + + children: Optional[List[DocumentDealChild]] = None + + closed_at: Optional[datetime] = None + + company_ids: Optional[List[str]] = None + + contact_ids: Optional[List[str]] = None + + currency: Optional[str] = None + + deal_source: Optional[str] = None + + lost_reason: Optional[str] = None + + name: Optional[str] = None + + pipeline: Optional[str] = None + + probability: Optional[float] = None + + stage: Optional[str] = None + + tags: Optional[List[str]] = None + + text: Optional[str] = None + + type: Optional[Literal["deal"]] = None + + won_reason: Optional[str] = None + + +Document: TypeAlias = Annotated[ + Union[ + DocumentDocument, + DocumentWebsite, + DocumentTask, + DocumentPerson, + DocumentMessage, + DocumentEvent, + DocumentFile, + DocumentConversation, + DocumentTrace, + DocumentTranscript, + DocumentCompany, + DocumentDeal, + ], + PropertyInfo(discriminator="type"), +] + + +class MemoryListResponse(BaseModel): + """A document-shaped API response carrying the hyperdoc tree (ENG-2479/D12).""" + + document: Document + """The full hyperdoc tree. + + Switch on `type` for the document frame and recurse `children` for the body — + see the `` renderer. + """ + + resource_id: str + + source: Literal[ + "reddit", + "notion", + "slack", + "google_calendar", + "google_mail", + "box", + "dropbox", + "github", + "google_drive", + "vault", + "web_crawler", + "trace", + "microsoft_teams", + "gmail_actions", + "granola", + "fathom", + "fireflies", + "linear", + "hubspot", + "salesforce", + "coda", + "lightfield", + ] + + type: str + """Hyperdoc document type discriminator (document, message, file, event, ...).""" + + collection: Optional[str] = None + """The document's collection, if any.""" + + document_date: Optional[datetime] = None + """The document's own date (e.g. email sent date, event date).""" + + ingested_at: Optional[datetime] = None + """When Hyperspell first indexed the document.""" + + last_modified_at: Optional[datetime] = None + """When the source document was last modified.""" + + metadata: Optional[Dict[str, object]] = None + """Filterable custom metadata attached to the document.""" + + status: Optional[Literal["pending", "processing", "completed", "failed", "pending_review", "skipped"]] = None + """Indexing status of the document.""" + + title: Optional[str] = None + """Human-readable document title.""" diff --git a/src/hyperspell/types/shared/__init__.py b/src/hyperspell/types/shared/__init__.py index ffb125a3..029f085f 100644 --- a/src/hyperspell/types/shared/__init__.py +++ b/src/hyperspell/types/shared/__init__.py @@ -1,6 +1,3 @@ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -from .metadata import Metadata as Metadata -from .resource import Resource as Resource -from .notification import Notification as Notification from .query_result import QueryResult as QueryResult diff --git a/src/hyperspell/types/shared/metadata.py b/src/hyperspell/types/shared/metadata.py deleted file mode 100644 index d433c051..00000000 --- a/src/hyperspell/types/shared/metadata.py +++ /dev/null @@ -1,38 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - -from typing import TYPE_CHECKING, Dict, List, Optional -from datetime import datetime -from typing_extensions import Literal - -from pydantic import Field as FieldInfo - -from ..._models import BaseModel -from .notification import Notification - -__all__ = ["Metadata"] - - -class Metadata(BaseModel): - created_at: Optional[datetime] = None - - events: Optional[List[Notification]] = None - - indexed_at: Optional[datetime] = None - - last_modified: Optional[datetime] = None - - status: Optional[Literal["pending", "processing", "completed", "failed", "pending_review", "skipped"]] = None - - url: Optional[str] = None - - if TYPE_CHECKING: - # Some versions of Pydantic <2.8.0 have a bug and don’t allow assigning a - # value to this field, so for compatibility we avoid doing it at runtime. - __pydantic_extra__: Dict[str, object] = FieldInfo(init=False) # pyright: ignore[reportIncompatibleVariableOverride] - - # Stub to indicate that arbitrary properties are accepted. - # To access properties that are not valid identifiers you can use `getattr`, e.g. - # `getattr(obj, '$type')` - def __getattr__(self, attr: str) -> object: ... - else: - __pydantic_extra__: Dict[str, object] diff --git a/src/hyperspell/types/shared/notification.py b/src/hyperspell/types/shared/notification.py deleted file mode 100644 index a78f858d..00000000 --- a/src/hyperspell/types/shared/notification.py +++ /dev/null @@ -1,17 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - -from typing import Optional -from datetime import datetime -from typing_extensions import Literal - -from ..._models import BaseModel - -__all__ = ["Notification"] - - -class Notification(BaseModel): - message: str - - type: Literal["error", "warning", "info", "success"] - - time: Optional[datetime] = None diff --git a/src/hyperspell/types/shared/query_result.py b/src/hyperspell/types/shared/query_result.py index 4b5d806a..e26dd6aa 100644 --- a/src/hyperspell/types/shared/query_result.py +++ b/src/hyperspell/types/shared/query_result.py @@ -1,12 +1,20966 @@ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -from typing import Dict, List, Optional -from typing_extensions import Literal +from typing import Dict, List, Union, Optional +from datetime import date, datetime +from typing_extensions import Literal, Annotated, TypeAlias -from .resource import Resource +from ..._utils import PropertyInfo from ..._models import BaseModel -__all__ = ["QueryResult", "Provenance", "ProvenanceEntity", "ProvenanceSource", "ProvenanceStep"] +__all__ = [ + "QueryResult", + "Document", + "DocumentDocument", + "DocumentDocumentDocument", + "DocumentDocumentDocumentChild", + "DocumentDocumentDocumentChildBlob", + "DocumentDocumentDocumentChildCallout", + "DocumentDocumentDocumentChildCalloutChild", + "DocumentDocumentDocumentChildCalloutChildBlob", + "DocumentDocumentDocumentChildCalloutChildCode", + "DocumentDocumentDocumentChildCalloutChildComment", + "DocumentDocumentDocumentChildCalloutChildDivider", + "DocumentDocumentDocumentChildCalloutChildImage", + "DocumentDocumentDocumentChildCalloutChildLink", + "DocumentDocumentDocumentChildCalloutChildLineBreak", + "DocumentDocumentDocumentChildCalloutChildText", + "DocumentDocumentDocumentChildCalloutChildToolCall", + "DocumentDocumentDocumentChildCalloutChildToolResult", + "DocumentDocumentDocumentChildCalloutChildTraceMessage", + "DocumentDocumentDocumentChildChunk", + "DocumentDocumentDocumentChildChunkChild", + "DocumentDocumentDocumentChildChunkChildBlob", + "DocumentDocumentDocumentChildChunkChildCode", + "DocumentDocumentDocumentChildChunkChildComment", + "DocumentDocumentDocumentChildChunkChildDivider", + "DocumentDocumentDocumentChildChunkChildImage", + "DocumentDocumentDocumentChildChunkChildLink", + "DocumentDocumentDocumentChildChunkChildLineBreak", + "DocumentDocumentDocumentChildChunkChildText", + "DocumentDocumentDocumentChildChunkChildToolCall", + "DocumentDocumentDocumentChildChunkChildToolResult", + "DocumentDocumentDocumentChildChunkChildTraceMessage", + "DocumentDocumentDocumentChildCode", + "DocumentDocumentDocumentChildComment", + "DocumentDocumentDocumentChildDivider", + "DocumentDocumentDocumentChildEquation", + "DocumentDocumentDocumentChildEquationChild", + "DocumentDocumentDocumentChildEquationChildBlob", + "DocumentDocumentDocumentChildEquationChildCode", + "DocumentDocumentDocumentChildEquationChildComment", + "DocumentDocumentDocumentChildEquationChildDivider", + "DocumentDocumentDocumentChildEquationChildImage", + "DocumentDocumentDocumentChildEquationChildLink", + "DocumentDocumentDocumentChildEquationChildLineBreak", + "DocumentDocumentDocumentChildEquationChildText", + "DocumentDocumentDocumentChildEquationChildToolCall", + "DocumentDocumentDocumentChildEquationChildToolResult", + "DocumentDocumentDocumentChildEquationChildTraceMessage", + "DocumentDocumentDocumentChildFootnote", + "DocumentDocumentDocumentChildFootnoteChild", + "DocumentDocumentDocumentChildFootnoteChildBlob", + "DocumentDocumentDocumentChildFootnoteChildCode", + "DocumentDocumentDocumentChildFootnoteChildComment", + "DocumentDocumentDocumentChildFootnoteChildDivider", + "DocumentDocumentDocumentChildFootnoteChildImage", + "DocumentDocumentDocumentChildFootnoteChildLink", + "DocumentDocumentDocumentChildFootnoteChildLineBreak", + "DocumentDocumentDocumentChildFootnoteChildText", + "DocumentDocumentDocumentChildFootnoteChildToolCall", + "DocumentDocumentDocumentChildFootnoteChildToolResult", + "DocumentDocumentDocumentChildFootnoteChildTraceMessage", + "DocumentDocumentDocumentChildHeading", + "DocumentDocumentDocumentChildHeadingChild", + "DocumentDocumentDocumentChildHeadingChildBlob", + "DocumentDocumentDocumentChildHeadingChildCode", + "DocumentDocumentDocumentChildHeadingChildComment", + "DocumentDocumentDocumentChildHeadingChildDivider", + "DocumentDocumentDocumentChildHeadingChildImage", + "DocumentDocumentDocumentChildHeadingChildLink", + "DocumentDocumentDocumentChildHeadingChildLineBreak", + "DocumentDocumentDocumentChildHeadingChildText", + "DocumentDocumentDocumentChildHeadingChildToolCall", + "DocumentDocumentDocumentChildHeadingChildToolResult", + "DocumentDocumentDocumentChildHeadingChildTraceMessage", + "DocumentDocumentDocumentChildImage", + "DocumentDocumentDocumentChildLink", + "DocumentDocumentDocumentChildLineBreak", + "DocumentDocumentDocumentChildList", + "DocumentDocumentDocumentChildListItem", + "DocumentDocumentDocumentChildListItemChild", + "DocumentDocumentDocumentChildListItemChildBlob", + "DocumentDocumentDocumentChildListItemChildCode", + "DocumentDocumentDocumentChildListItemChildComment", + "DocumentDocumentDocumentChildListItemChildDivider", + "DocumentDocumentDocumentChildListItemChildImage", + "DocumentDocumentDocumentChildListItemChildLink", + "DocumentDocumentDocumentChildListItemChildLineBreak", + "DocumentDocumentDocumentChildListItemChildText", + "DocumentDocumentDocumentChildListItemChildToolCall", + "DocumentDocumentDocumentChildListItemChildToolResult", + "DocumentDocumentDocumentChildListItemChildTraceMessage", + "DocumentDocumentDocumentChildParagraph", + "DocumentDocumentDocumentChildParagraphChild", + "DocumentDocumentDocumentChildParagraphChildBlob", + "DocumentDocumentDocumentChildParagraphChildCode", + "DocumentDocumentDocumentChildParagraphChildComment", + "DocumentDocumentDocumentChildParagraphChildDivider", + "DocumentDocumentDocumentChildParagraphChildImage", + "DocumentDocumentDocumentChildParagraphChildLink", + "DocumentDocumentDocumentChildParagraphChildLineBreak", + "DocumentDocumentDocumentChildParagraphChildText", + "DocumentDocumentDocumentChildParagraphChildToolCall", + "DocumentDocumentDocumentChildParagraphChildToolResult", + "DocumentDocumentDocumentChildParagraphChildTraceMessage", + "DocumentDocumentDocumentChildQuote", + "DocumentDocumentDocumentChildQuoteChild", + "DocumentDocumentDocumentChildQuoteChildBlob", + "DocumentDocumentDocumentChildQuoteChildCode", + "DocumentDocumentDocumentChildQuoteChildComment", + "DocumentDocumentDocumentChildQuoteChildDivider", + "DocumentDocumentDocumentChildQuoteChildImage", + "DocumentDocumentDocumentChildQuoteChildLink", + "DocumentDocumentDocumentChildQuoteChildLineBreak", + "DocumentDocumentDocumentChildQuoteChildText", + "DocumentDocumentDocumentChildQuoteChildToolCall", + "DocumentDocumentDocumentChildQuoteChildToolResult", + "DocumentDocumentDocumentChildQuoteChildTraceMessage", + "DocumentDocumentDocumentChildTable", + "DocumentDocumentDocumentChildTableCell", + "DocumentDocumentDocumentChildTableCellChild", + "DocumentDocumentDocumentChildTableCellChildBlob", + "DocumentDocumentDocumentChildTableCellChildCode", + "DocumentDocumentDocumentChildTableCellChildComment", + "DocumentDocumentDocumentChildTableCellChildDivider", + "DocumentDocumentDocumentChildTableCellChildImage", + "DocumentDocumentDocumentChildTableCellChildLink", + "DocumentDocumentDocumentChildTableCellChildLineBreak", + "DocumentDocumentDocumentChildTableCellChildText", + "DocumentDocumentDocumentChildTableCellChildToolCall", + "DocumentDocumentDocumentChildTableCellChildToolResult", + "DocumentDocumentDocumentChildTableCellChildTraceMessage", + "DocumentDocumentDocumentChildTableRow", + "DocumentDocumentDocumentChildText", + "DocumentDocumentDocumentChildToDo", + "DocumentDocumentDocumentChildToDoChild", + "DocumentDocumentDocumentChildToDoChildBlob", + "DocumentDocumentDocumentChildToDoChildCode", + "DocumentDocumentDocumentChildToDoChildComment", + "DocumentDocumentDocumentChildToDoChildDivider", + "DocumentDocumentDocumentChildToDoChildImage", + "DocumentDocumentDocumentChildToDoChildLink", + "DocumentDocumentDocumentChildToDoChildLineBreak", + "DocumentDocumentDocumentChildToDoChildText", + "DocumentDocumentDocumentChildToDoChildToolCall", + "DocumentDocumentDocumentChildToDoChildToolResult", + "DocumentDocumentDocumentChildToDoChildTraceMessage", + "DocumentDocumentDocumentChildToolCall", + "DocumentDocumentDocumentChildToolResult", + "DocumentDocumentDocumentChildTraceMessage", + "DocumentDocumentDocumentChildUtterance", + "DocumentDocumentWebsite", + "DocumentDocumentWebsiteChild", + "DocumentDocumentWebsiteChildBlob", + "DocumentDocumentWebsiteChildCallout", + "DocumentDocumentWebsiteChildCalloutChild", + "DocumentDocumentWebsiteChildCalloutChildBlob", + "DocumentDocumentWebsiteChildCalloutChildCode", + "DocumentDocumentWebsiteChildCalloutChildComment", + "DocumentDocumentWebsiteChildCalloutChildDivider", + "DocumentDocumentWebsiteChildCalloutChildImage", + "DocumentDocumentWebsiteChildCalloutChildLink", + "DocumentDocumentWebsiteChildCalloutChildLineBreak", + "DocumentDocumentWebsiteChildCalloutChildText", + "DocumentDocumentWebsiteChildCalloutChildToolCall", + "DocumentDocumentWebsiteChildCalloutChildToolResult", + "DocumentDocumentWebsiteChildCalloutChildTraceMessage", + "DocumentDocumentWebsiteChildChunk", + "DocumentDocumentWebsiteChildChunkChild", + "DocumentDocumentWebsiteChildChunkChildBlob", + "DocumentDocumentWebsiteChildChunkChildCode", + "DocumentDocumentWebsiteChildChunkChildComment", + "DocumentDocumentWebsiteChildChunkChildDivider", + "DocumentDocumentWebsiteChildChunkChildImage", + "DocumentDocumentWebsiteChildChunkChildLink", + "DocumentDocumentWebsiteChildChunkChildLineBreak", + "DocumentDocumentWebsiteChildChunkChildText", + "DocumentDocumentWebsiteChildChunkChildToolCall", + "DocumentDocumentWebsiteChildChunkChildToolResult", + "DocumentDocumentWebsiteChildChunkChildTraceMessage", + "DocumentDocumentWebsiteChildCode", + "DocumentDocumentWebsiteChildComment", + "DocumentDocumentWebsiteChildDivider", + "DocumentDocumentWebsiteChildEquation", + "DocumentDocumentWebsiteChildEquationChild", + "DocumentDocumentWebsiteChildEquationChildBlob", + "DocumentDocumentWebsiteChildEquationChildCode", + "DocumentDocumentWebsiteChildEquationChildComment", + "DocumentDocumentWebsiteChildEquationChildDivider", + "DocumentDocumentWebsiteChildEquationChildImage", + "DocumentDocumentWebsiteChildEquationChildLink", + "DocumentDocumentWebsiteChildEquationChildLineBreak", + "DocumentDocumentWebsiteChildEquationChildText", + "DocumentDocumentWebsiteChildEquationChildToolCall", + "DocumentDocumentWebsiteChildEquationChildToolResult", + "DocumentDocumentWebsiteChildEquationChildTraceMessage", + "DocumentDocumentWebsiteChildFootnote", + "DocumentDocumentWebsiteChildFootnoteChild", + "DocumentDocumentWebsiteChildFootnoteChildBlob", + "DocumentDocumentWebsiteChildFootnoteChildCode", + "DocumentDocumentWebsiteChildFootnoteChildComment", + "DocumentDocumentWebsiteChildFootnoteChildDivider", + "DocumentDocumentWebsiteChildFootnoteChildImage", + "DocumentDocumentWebsiteChildFootnoteChildLink", + "DocumentDocumentWebsiteChildFootnoteChildLineBreak", + "DocumentDocumentWebsiteChildFootnoteChildText", + "DocumentDocumentWebsiteChildFootnoteChildToolCall", + "DocumentDocumentWebsiteChildFootnoteChildToolResult", + "DocumentDocumentWebsiteChildFootnoteChildTraceMessage", + "DocumentDocumentWebsiteChildHeading", + "DocumentDocumentWebsiteChildHeadingChild", + "DocumentDocumentWebsiteChildHeadingChildBlob", + "DocumentDocumentWebsiteChildHeadingChildCode", + "DocumentDocumentWebsiteChildHeadingChildComment", + "DocumentDocumentWebsiteChildHeadingChildDivider", + "DocumentDocumentWebsiteChildHeadingChildImage", + "DocumentDocumentWebsiteChildHeadingChildLink", + "DocumentDocumentWebsiteChildHeadingChildLineBreak", + "DocumentDocumentWebsiteChildHeadingChildText", + "DocumentDocumentWebsiteChildHeadingChildToolCall", + "DocumentDocumentWebsiteChildHeadingChildToolResult", + "DocumentDocumentWebsiteChildHeadingChildTraceMessage", + "DocumentDocumentWebsiteChildImage", + "DocumentDocumentWebsiteChildLink", + "DocumentDocumentWebsiteChildLineBreak", + "DocumentDocumentWebsiteChildList", + "DocumentDocumentWebsiteChildListItem", + "DocumentDocumentWebsiteChildListItemChild", + "DocumentDocumentWebsiteChildListItemChildBlob", + "DocumentDocumentWebsiteChildListItemChildCode", + "DocumentDocumentWebsiteChildListItemChildComment", + "DocumentDocumentWebsiteChildListItemChildDivider", + "DocumentDocumentWebsiteChildListItemChildImage", + "DocumentDocumentWebsiteChildListItemChildLink", + "DocumentDocumentWebsiteChildListItemChildLineBreak", + "DocumentDocumentWebsiteChildListItemChildText", + "DocumentDocumentWebsiteChildListItemChildToolCall", + "DocumentDocumentWebsiteChildListItemChildToolResult", + "DocumentDocumentWebsiteChildListItemChildTraceMessage", + "DocumentDocumentWebsiteChildParagraph", + "DocumentDocumentWebsiteChildParagraphChild", + "DocumentDocumentWebsiteChildParagraphChildBlob", + "DocumentDocumentWebsiteChildParagraphChildCode", + "DocumentDocumentWebsiteChildParagraphChildComment", + "DocumentDocumentWebsiteChildParagraphChildDivider", + "DocumentDocumentWebsiteChildParagraphChildImage", + "DocumentDocumentWebsiteChildParagraphChildLink", + "DocumentDocumentWebsiteChildParagraphChildLineBreak", + "DocumentDocumentWebsiteChildParagraphChildText", + "DocumentDocumentWebsiteChildParagraphChildToolCall", + "DocumentDocumentWebsiteChildParagraphChildToolResult", + "DocumentDocumentWebsiteChildParagraphChildTraceMessage", + "DocumentDocumentWebsiteChildQuote", + "DocumentDocumentWebsiteChildQuoteChild", + "DocumentDocumentWebsiteChildQuoteChildBlob", + "DocumentDocumentWebsiteChildQuoteChildCode", + "DocumentDocumentWebsiteChildQuoteChildComment", + "DocumentDocumentWebsiteChildQuoteChildDivider", + "DocumentDocumentWebsiteChildQuoteChildImage", + "DocumentDocumentWebsiteChildQuoteChildLink", + "DocumentDocumentWebsiteChildQuoteChildLineBreak", + "DocumentDocumentWebsiteChildQuoteChildText", + "DocumentDocumentWebsiteChildQuoteChildToolCall", + "DocumentDocumentWebsiteChildQuoteChildToolResult", + "DocumentDocumentWebsiteChildQuoteChildTraceMessage", + "DocumentDocumentWebsiteChildTable", + "DocumentDocumentWebsiteChildTableCell", + "DocumentDocumentWebsiteChildTableCellChild", + "DocumentDocumentWebsiteChildTableCellChildBlob", + "DocumentDocumentWebsiteChildTableCellChildCode", + "DocumentDocumentWebsiteChildTableCellChildComment", + "DocumentDocumentWebsiteChildTableCellChildDivider", + "DocumentDocumentWebsiteChildTableCellChildImage", + "DocumentDocumentWebsiteChildTableCellChildLink", + "DocumentDocumentWebsiteChildTableCellChildLineBreak", + "DocumentDocumentWebsiteChildTableCellChildText", + "DocumentDocumentWebsiteChildTableCellChildToolCall", + "DocumentDocumentWebsiteChildTableCellChildToolResult", + "DocumentDocumentWebsiteChildTableCellChildTraceMessage", + "DocumentDocumentWebsiteChildTableRow", + "DocumentDocumentWebsiteChildText", + "DocumentDocumentWebsiteChildToDo", + "DocumentDocumentWebsiteChildToDoChild", + "DocumentDocumentWebsiteChildToDoChildBlob", + "DocumentDocumentWebsiteChildToDoChildCode", + "DocumentDocumentWebsiteChildToDoChildComment", + "DocumentDocumentWebsiteChildToDoChildDivider", + "DocumentDocumentWebsiteChildToDoChildImage", + "DocumentDocumentWebsiteChildToDoChildLink", + "DocumentDocumentWebsiteChildToDoChildLineBreak", + "DocumentDocumentWebsiteChildToDoChildText", + "DocumentDocumentWebsiteChildToDoChildToolCall", + "DocumentDocumentWebsiteChildToDoChildToolResult", + "DocumentDocumentWebsiteChildToDoChildTraceMessage", + "DocumentDocumentWebsiteChildToolCall", + "DocumentDocumentWebsiteChildToolResult", + "DocumentDocumentWebsiteChildTraceMessage", + "DocumentDocumentWebsiteChildUtterance", + "DocumentDocumentTask", + "DocumentDocumentTaskChild", + "DocumentDocumentTaskChildBlob", + "DocumentDocumentTaskChildCallout", + "DocumentDocumentTaskChildCalloutChild", + "DocumentDocumentTaskChildCalloutChildBlob", + "DocumentDocumentTaskChildCalloutChildCode", + "DocumentDocumentTaskChildCalloutChildComment", + "DocumentDocumentTaskChildCalloutChildDivider", + "DocumentDocumentTaskChildCalloutChildImage", + "DocumentDocumentTaskChildCalloutChildLink", + "DocumentDocumentTaskChildCalloutChildLineBreak", + "DocumentDocumentTaskChildCalloutChildText", + "DocumentDocumentTaskChildCalloutChildToolCall", + "DocumentDocumentTaskChildCalloutChildToolResult", + "DocumentDocumentTaskChildCalloutChildTraceMessage", + "DocumentDocumentTaskChildChunk", + "DocumentDocumentTaskChildChunkChild", + "DocumentDocumentTaskChildChunkChildBlob", + "DocumentDocumentTaskChildChunkChildCode", + "DocumentDocumentTaskChildChunkChildComment", + "DocumentDocumentTaskChildChunkChildDivider", + "DocumentDocumentTaskChildChunkChildImage", + "DocumentDocumentTaskChildChunkChildLink", + "DocumentDocumentTaskChildChunkChildLineBreak", + "DocumentDocumentTaskChildChunkChildText", + "DocumentDocumentTaskChildChunkChildToolCall", + "DocumentDocumentTaskChildChunkChildToolResult", + "DocumentDocumentTaskChildChunkChildTraceMessage", + "DocumentDocumentTaskChildCode", + "DocumentDocumentTaskChildComment", + "DocumentDocumentTaskChildDivider", + "DocumentDocumentTaskChildEquation", + "DocumentDocumentTaskChildEquationChild", + "DocumentDocumentTaskChildEquationChildBlob", + "DocumentDocumentTaskChildEquationChildCode", + "DocumentDocumentTaskChildEquationChildComment", + "DocumentDocumentTaskChildEquationChildDivider", + "DocumentDocumentTaskChildEquationChildImage", + "DocumentDocumentTaskChildEquationChildLink", + "DocumentDocumentTaskChildEquationChildLineBreak", + "DocumentDocumentTaskChildEquationChildText", + "DocumentDocumentTaskChildEquationChildToolCall", + "DocumentDocumentTaskChildEquationChildToolResult", + "DocumentDocumentTaskChildEquationChildTraceMessage", + "DocumentDocumentTaskChildFootnote", + "DocumentDocumentTaskChildFootnoteChild", + "DocumentDocumentTaskChildFootnoteChildBlob", + "DocumentDocumentTaskChildFootnoteChildCode", + "DocumentDocumentTaskChildFootnoteChildComment", + "DocumentDocumentTaskChildFootnoteChildDivider", + "DocumentDocumentTaskChildFootnoteChildImage", + "DocumentDocumentTaskChildFootnoteChildLink", + "DocumentDocumentTaskChildFootnoteChildLineBreak", + "DocumentDocumentTaskChildFootnoteChildText", + "DocumentDocumentTaskChildFootnoteChildToolCall", + "DocumentDocumentTaskChildFootnoteChildToolResult", + "DocumentDocumentTaskChildFootnoteChildTraceMessage", + "DocumentDocumentTaskChildHeading", + "DocumentDocumentTaskChildHeadingChild", + "DocumentDocumentTaskChildHeadingChildBlob", + "DocumentDocumentTaskChildHeadingChildCode", + "DocumentDocumentTaskChildHeadingChildComment", + "DocumentDocumentTaskChildHeadingChildDivider", + "DocumentDocumentTaskChildHeadingChildImage", + "DocumentDocumentTaskChildHeadingChildLink", + "DocumentDocumentTaskChildHeadingChildLineBreak", + "DocumentDocumentTaskChildHeadingChildText", + "DocumentDocumentTaskChildHeadingChildToolCall", + "DocumentDocumentTaskChildHeadingChildToolResult", + "DocumentDocumentTaskChildHeadingChildTraceMessage", + "DocumentDocumentTaskChildImage", + "DocumentDocumentTaskChildLink", + "DocumentDocumentTaskChildLineBreak", + "DocumentDocumentTaskChildList", + "DocumentDocumentTaskChildListItem", + "DocumentDocumentTaskChildListItemChild", + "DocumentDocumentTaskChildListItemChildBlob", + "DocumentDocumentTaskChildListItemChildCode", + "DocumentDocumentTaskChildListItemChildComment", + "DocumentDocumentTaskChildListItemChildDivider", + "DocumentDocumentTaskChildListItemChildImage", + "DocumentDocumentTaskChildListItemChildLink", + "DocumentDocumentTaskChildListItemChildLineBreak", + "DocumentDocumentTaskChildListItemChildText", + "DocumentDocumentTaskChildListItemChildToolCall", + "DocumentDocumentTaskChildListItemChildToolResult", + "DocumentDocumentTaskChildListItemChildTraceMessage", + "DocumentDocumentTaskChildParagraph", + "DocumentDocumentTaskChildParagraphChild", + "DocumentDocumentTaskChildParagraphChildBlob", + "DocumentDocumentTaskChildParagraphChildCode", + "DocumentDocumentTaskChildParagraphChildComment", + "DocumentDocumentTaskChildParagraphChildDivider", + "DocumentDocumentTaskChildParagraphChildImage", + "DocumentDocumentTaskChildParagraphChildLink", + "DocumentDocumentTaskChildParagraphChildLineBreak", + "DocumentDocumentTaskChildParagraphChildText", + "DocumentDocumentTaskChildParagraphChildToolCall", + "DocumentDocumentTaskChildParagraphChildToolResult", + "DocumentDocumentTaskChildParagraphChildTraceMessage", + "DocumentDocumentTaskChildQuote", + "DocumentDocumentTaskChildQuoteChild", + "DocumentDocumentTaskChildQuoteChildBlob", + "DocumentDocumentTaskChildQuoteChildCode", + "DocumentDocumentTaskChildQuoteChildComment", + "DocumentDocumentTaskChildQuoteChildDivider", + "DocumentDocumentTaskChildQuoteChildImage", + "DocumentDocumentTaskChildQuoteChildLink", + "DocumentDocumentTaskChildQuoteChildLineBreak", + "DocumentDocumentTaskChildQuoteChildText", + "DocumentDocumentTaskChildQuoteChildToolCall", + "DocumentDocumentTaskChildQuoteChildToolResult", + "DocumentDocumentTaskChildQuoteChildTraceMessage", + "DocumentDocumentTaskChildTable", + "DocumentDocumentTaskChildTableCell", + "DocumentDocumentTaskChildTableCellChild", + "DocumentDocumentTaskChildTableCellChildBlob", + "DocumentDocumentTaskChildTableCellChildCode", + "DocumentDocumentTaskChildTableCellChildComment", + "DocumentDocumentTaskChildTableCellChildDivider", + "DocumentDocumentTaskChildTableCellChildImage", + "DocumentDocumentTaskChildTableCellChildLink", + "DocumentDocumentTaskChildTableCellChildLineBreak", + "DocumentDocumentTaskChildTableCellChildText", + "DocumentDocumentTaskChildTableCellChildToolCall", + "DocumentDocumentTaskChildTableCellChildToolResult", + "DocumentDocumentTaskChildTableCellChildTraceMessage", + "DocumentDocumentTaskChildTableRow", + "DocumentDocumentTaskChildText", + "DocumentDocumentTaskChildToDo", + "DocumentDocumentTaskChildToDoChild", + "DocumentDocumentTaskChildToDoChildBlob", + "DocumentDocumentTaskChildToDoChildCode", + "DocumentDocumentTaskChildToDoChildComment", + "DocumentDocumentTaskChildToDoChildDivider", + "DocumentDocumentTaskChildToDoChildImage", + "DocumentDocumentTaskChildToDoChildLink", + "DocumentDocumentTaskChildToDoChildLineBreak", + "DocumentDocumentTaskChildToDoChildText", + "DocumentDocumentTaskChildToDoChildToolCall", + "DocumentDocumentTaskChildToDoChildToolResult", + "DocumentDocumentTaskChildToDoChildTraceMessage", + "DocumentDocumentTaskChildToolCall", + "DocumentDocumentTaskChildToolResult", + "DocumentDocumentTaskChildTraceMessage", + "DocumentDocumentTaskChildUtterance", + "DocumentDocumentTaskComment", + "DocumentDocumentTaskCommentSender", + "DocumentDocumentTaskCommentSenderChild", + "DocumentDocumentTaskCommentSenderChildBlob", + "DocumentDocumentTaskCommentSenderChildCode", + "DocumentDocumentTaskCommentSenderChildComment", + "DocumentDocumentTaskCommentSenderChildDivider", + "DocumentDocumentTaskCommentSenderChildImage", + "DocumentDocumentTaskCommentSenderChildLink", + "DocumentDocumentTaskCommentSenderChildLineBreak", + "DocumentDocumentTaskCommentSenderChildText", + "DocumentDocumentTaskCommentSenderChildToolCall", + "DocumentDocumentTaskCommentSenderChildToolResult", + "DocumentDocumentTaskCommentSenderChildTraceMessage", + "DocumentDocumentTaskCommentChild", + "DocumentDocumentTaskCommentChildBlob", + "DocumentDocumentTaskCommentChildCallout", + "DocumentDocumentTaskCommentChildCalloutChild", + "DocumentDocumentTaskCommentChildCalloutChildBlob", + "DocumentDocumentTaskCommentChildCalloutChildCode", + "DocumentDocumentTaskCommentChildCalloutChildComment", + "DocumentDocumentTaskCommentChildCalloutChildDivider", + "DocumentDocumentTaskCommentChildCalloutChildImage", + "DocumentDocumentTaskCommentChildCalloutChildLink", + "DocumentDocumentTaskCommentChildCalloutChildLineBreak", + "DocumentDocumentTaskCommentChildCalloutChildText", + "DocumentDocumentTaskCommentChildCalloutChildToolCall", + "DocumentDocumentTaskCommentChildCalloutChildToolResult", + "DocumentDocumentTaskCommentChildCalloutChildTraceMessage", + "DocumentDocumentTaskCommentChildChunk", + "DocumentDocumentTaskCommentChildChunkChild", + "DocumentDocumentTaskCommentChildChunkChildBlob", + "DocumentDocumentTaskCommentChildChunkChildCode", + "DocumentDocumentTaskCommentChildChunkChildComment", + "DocumentDocumentTaskCommentChildChunkChildDivider", + "DocumentDocumentTaskCommentChildChunkChildImage", + "DocumentDocumentTaskCommentChildChunkChildLink", + "DocumentDocumentTaskCommentChildChunkChildLineBreak", + "DocumentDocumentTaskCommentChildChunkChildText", + "DocumentDocumentTaskCommentChildChunkChildToolCall", + "DocumentDocumentTaskCommentChildChunkChildToolResult", + "DocumentDocumentTaskCommentChildChunkChildTraceMessage", + "DocumentDocumentTaskCommentChildCode", + "DocumentDocumentTaskCommentChildComment", + "DocumentDocumentTaskCommentChildDivider", + "DocumentDocumentTaskCommentChildEquation", + "DocumentDocumentTaskCommentChildEquationChild", + "DocumentDocumentTaskCommentChildEquationChildBlob", + "DocumentDocumentTaskCommentChildEquationChildCode", + "DocumentDocumentTaskCommentChildEquationChildComment", + "DocumentDocumentTaskCommentChildEquationChildDivider", + "DocumentDocumentTaskCommentChildEquationChildImage", + "DocumentDocumentTaskCommentChildEquationChildLink", + "DocumentDocumentTaskCommentChildEquationChildLineBreak", + "DocumentDocumentTaskCommentChildEquationChildText", + "DocumentDocumentTaskCommentChildEquationChildToolCall", + "DocumentDocumentTaskCommentChildEquationChildToolResult", + "DocumentDocumentTaskCommentChildEquationChildTraceMessage", + "DocumentDocumentTaskCommentChildFootnote", + "DocumentDocumentTaskCommentChildFootnoteChild", + "DocumentDocumentTaskCommentChildFootnoteChildBlob", + "DocumentDocumentTaskCommentChildFootnoteChildCode", + "DocumentDocumentTaskCommentChildFootnoteChildComment", + "DocumentDocumentTaskCommentChildFootnoteChildDivider", + "DocumentDocumentTaskCommentChildFootnoteChildImage", + "DocumentDocumentTaskCommentChildFootnoteChildLink", + "DocumentDocumentTaskCommentChildFootnoteChildLineBreak", + "DocumentDocumentTaskCommentChildFootnoteChildText", + "DocumentDocumentTaskCommentChildFootnoteChildToolCall", + "DocumentDocumentTaskCommentChildFootnoteChildToolResult", + "DocumentDocumentTaskCommentChildFootnoteChildTraceMessage", + "DocumentDocumentTaskCommentChildHeading", + "DocumentDocumentTaskCommentChildHeadingChild", + "DocumentDocumentTaskCommentChildHeadingChildBlob", + "DocumentDocumentTaskCommentChildHeadingChildCode", + "DocumentDocumentTaskCommentChildHeadingChildComment", + "DocumentDocumentTaskCommentChildHeadingChildDivider", + "DocumentDocumentTaskCommentChildHeadingChildImage", + "DocumentDocumentTaskCommentChildHeadingChildLink", + "DocumentDocumentTaskCommentChildHeadingChildLineBreak", + "DocumentDocumentTaskCommentChildHeadingChildText", + "DocumentDocumentTaskCommentChildHeadingChildToolCall", + "DocumentDocumentTaskCommentChildHeadingChildToolResult", + "DocumentDocumentTaskCommentChildHeadingChildTraceMessage", + "DocumentDocumentTaskCommentChildImage", + "DocumentDocumentTaskCommentChildLink", + "DocumentDocumentTaskCommentChildLineBreak", + "DocumentDocumentTaskCommentChildList", + "DocumentDocumentTaskCommentChildListItem", + "DocumentDocumentTaskCommentChildListItemChild", + "DocumentDocumentTaskCommentChildListItemChildBlob", + "DocumentDocumentTaskCommentChildListItemChildCode", + "DocumentDocumentTaskCommentChildListItemChildComment", + "DocumentDocumentTaskCommentChildListItemChildDivider", + "DocumentDocumentTaskCommentChildListItemChildImage", + "DocumentDocumentTaskCommentChildListItemChildLink", + "DocumentDocumentTaskCommentChildListItemChildLineBreak", + "DocumentDocumentTaskCommentChildListItemChildText", + "DocumentDocumentTaskCommentChildListItemChildToolCall", + "DocumentDocumentTaskCommentChildListItemChildToolResult", + "DocumentDocumentTaskCommentChildListItemChildTraceMessage", + "DocumentDocumentTaskCommentChildParagraph", + "DocumentDocumentTaskCommentChildParagraphChild", + "DocumentDocumentTaskCommentChildParagraphChildBlob", + "DocumentDocumentTaskCommentChildParagraphChildCode", + "DocumentDocumentTaskCommentChildParagraphChildComment", + "DocumentDocumentTaskCommentChildParagraphChildDivider", + "DocumentDocumentTaskCommentChildParagraphChildImage", + "DocumentDocumentTaskCommentChildParagraphChildLink", + "DocumentDocumentTaskCommentChildParagraphChildLineBreak", + "DocumentDocumentTaskCommentChildParagraphChildText", + "DocumentDocumentTaskCommentChildParagraphChildToolCall", + "DocumentDocumentTaskCommentChildParagraphChildToolResult", + "DocumentDocumentTaskCommentChildParagraphChildTraceMessage", + "DocumentDocumentTaskCommentChildQuote", + "DocumentDocumentTaskCommentChildQuoteChild", + "DocumentDocumentTaskCommentChildQuoteChildBlob", + "DocumentDocumentTaskCommentChildQuoteChildCode", + "DocumentDocumentTaskCommentChildQuoteChildComment", + "DocumentDocumentTaskCommentChildQuoteChildDivider", + "DocumentDocumentTaskCommentChildQuoteChildImage", + "DocumentDocumentTaskCommentChildQuoteChildLink", + "DocumentDocumentTaskCommentChildQuoteChildLineBreak", + "DocumentDocumentTaskCommentChildQuoteChildText", + "DocumentDocumentTaskCommentChildQuoteChildToolCall", + "DocumentDocumentTaskCommentChildQuoteChildToolResult", + "DocumentDocumentTaskCommentChildQuoteChildTraceMessage", + "DocumentDocumentTaskCommentChildTable", + "DocumentDocumentTaskCommentChildTableCell", + "DocumentDocumentTaskCommentChildTableCellChild", + "DocumentDocumentTaskCommentChildTableCellChildBlob", + "DocumentDocumentTaskCommentChildTableCellChildCode", + "DocumentDocumentTaskCommentChildTableCellChildComment", + "DocumentDocumentTaskCommentChildTableCellChildDivider", + "DocumentDocumentTaskCommentChildTableCellChildImage", + "DocumentDocumentTaskCommentChildTableCellChildLink", + "DocumentDocumentTaskCommentChildTableCellChildLineBreak", + "DocumentDocumentTaskCommentChildTableCellChildText", + "DocumentDocumentTaskCommentChildTableCellChildToolCall", + "DocumentDocumentTaskCommentChildTableCellChildToolResult", + "DocumentDocumentTaskCommentChildTableCellChildTraceMessage", + "DocumentDocumentTaskCommentChildTableRow", + "DocumentDocumentTaskCommentChildText", + "DocumentDocumentTaskCommentChildToDo", + "DocumentDocumentTaskCommentChildToDoChild", + "DocumentDocumentTaskCommentChildToDoChildBlob", + "DocumentDocumentTaskCommentChildToDoChildCode", + "DocumentDocumentTaskCommentChildToDoChildComment", + "DocumentDocumentTaskCommentChildToDoChildDivider", + "DocumentDocumentTaskCommentChildToDoChildImage", + "DocumentDocumentTaskCommentChildToDoChildLink", + "DocumentDocumentTaskCommentChildToDoChildLineBreak", + "DocumentDocumentTaskCommentChildToDoChildText", + "DocumentDocumentTaskCommentChildToDoChildToolCall", + "DocumentDocumentTaskCommentChildToDoChildToolResult", + "DocumentDocumentTaskCommentChildToDoChildTraceMessage", + "DocumentDocumentTaskCommentChildToolCall", + "DocumentDocumentTaskCommentChildToolResult", + "DocumentDocumentTaskCommentChildTraceMessage", + "DocumentDocumentTaskCommentChildUtterance", + "DocumentDocumentTaskCommentMentionedUser", + "DocumentDocumentTaskCommentMentionedUserChild", + "DocumentDocumentTaskCommentMentionedUserChildBlob", + "DocumentDocumentTaskCommentMentionedUserChildCode", + "DocumentDocumentTaskCommentMentionedUserChildComment", + "DocumentDocumentTaskCommentMentionedUserChildDivider", + "DocumentDocumentTaskCommentMentionedUserChildImage", + "DocumentDocumentTaskCommentMentionedUserChildLink", + "DocumentDocumentTaskCommentMentionedUserChildLineBreak", + "DocumentDocumentTaskCommentMentionedUserChildText", + "DocumentDocumentTaskCommentMentionedUserChildToolCall", + "DocumentDocumentTaskCommentMentionedUserChildToolResult", + "DocumentDocumentTaskCommentMentionedUserChildTraceMessage", + "DocumentDocumentPerson", + "DocumentDocumentPersonChild", + "DocumentDocumentPersonChildBlob", + "DocumentDocumentPersonChildCode", + "DocumentDocumentPersonChildComment", + "DocumentDocumentPersonChildDivider", + "DocumentDocumentPersonChildImage", + "DocumentDocumentPersonChildLink", + "DocumentDocumentPersonChildLineBreak", + "DocumentDocumentPersonChildText", + "DocumentDocumentPersonChildToolCall", + "DocumentDocumentPersonChildToolResult", + "DocumentDocumentPersonChildTraceMessage", + "DocumentDocumentMessage", + "DocumentDocumentMessageSender", + "DocumentDocumentMessageSenderChild", + "DocumentDocumentMessageSenderChildBlob", + "DocumentDocumentMessageSenderChildCode", + "DocumentDocumentMessageSenderChildComment", + "DocumentDocumentMessageSenderChildDivider", + "DocumentDocumentMessageSenderChildImage", + "DocumentDocumentMessageSenderChildLink", + "DocumentDocumentMessageSenderChildLineBreak", + "DocumentDocumentMessageSenderChildText", + "DocumentDocumentMessageSenderChildToolCall", + "DocumentDocumentMessageSenderChildToolResult", + "DocumentDocumentMessageSenderChildTraceMessage", + "DocumentDocumentMessageChild", + "DocumentDocumentMessageChildBlob", + "DocumentDocumentMessageChildCallout", + "DocumentDocumentMessageChildCalloutChild", + "DocumentDocumentMessageChildCalloutChildBlob", + "DocumentDocumentMessageChildCalloutChildCode", + "DocumentDocumentMessageChildCalloutChildComment", + "DocumentDocumentMessageChildCalloutChildDivider", + "DocumentDocumentMessageChildCalloutChildImage", + "DocumentDocumentMessageChildCalloutChildLink", + "DocumentDocumentMessageChildCalloutChildLineBreak", + "DocumentDocumentMessageChildCalloutChildText", + "DocumentDocumentMessageChildCalloutChildToolCall", + "DocumentDocumentMessageChildCalloutChildToolResult", + "DocumentDocumentMessageChildCalloutChildTraceMessage", + "DocumentDocumentMessageChildChunk", + "DocumentDocumentMessageChildChunkChild", + "DocumentDocumentMessageChildChunkChildBlob", + "DocumentDocumentMessageChildChunkChildCode", + "DocumentDocumentMessageChildChunkChildComment", + "DocumentDocumentMessageChildChunkChildDivider", + "DocumentDocumentMessageChildChunkChildImage", + "DocumentDocumentMessageChildChunkChildLink", + "DocumentDocumentMessageChildChunkChildLineBreak", + "DocumentDocumentMessageChildChunkChildText", + "DocumentDocumentMessageChildChunkChildToolCall", + "DocumentDocumentMessageChildChunkChildToolResult", + "DocumentDocumentMessageChildChunkChildTraceMessage", + "DocumentDocumentMessageChildCode", + "DocumentDocumentMessageChildComment", + "DocumentDocumentMessageChildDivider", + "DocumentDocumentMessageChildEquation", + "DocumentDocumentMessageChildEquationChild", + "DocumentDocumentMessageChildEquationChildBlob", + "DocumentDocumentMessageChildEquationChildCode", + "DocumentDocumentMessageChildEquationChildComment", + "DocumentDocumentMessageChildEquationChildDivider", + "DocumentDocumentMessageChildEquationChildImage", + "DocumentDocumentMessageChildEquationChildLink", + "DocumentDocumentMessageChildEquationChildLineBreak", + "DocumentDocumentMessageChildEquationChildText", + "DocumentDocumentMessageChildEquationChildToolCall", + "DocumentDocumentMessageChildEquationChildToolResult", + "DocumentDocumentMessageChildEquationChildTraceMessage", + "DocumentDocumentMessageChildFootnote", + "DocumentDocumentMessageChildFootnoteChild", + "DocumentDocumentMessageChildFootnoteChildBlob", + "DocumentDocumentMessageChildFootnoteChildCode", + "DocumentDocumentMessageChildFootnoteChildComment", + "DocumentDocumentMessageChildFootnoteChildDivider", + "DocumentDocumentMessageChildFootnoteChildImage", + "DocumentDocumentMessageChildFootnoteChildLink", + "DocumentDocumentMessageChildFootnoteChildLineBreak", + "DocumentDocumentMessageChildFootnoteChildText", + "DocumentDocumentMessageChildFootnoteChildToolCall", + "DocumentDocumentMessageChildFootnoteChildToolResult", + "DocumentDocumentMessageChildFootnoteChildTraceMessage", + "DocumentDocumentMessageChildHeading", + "DocumentDocumentMessageChildHeadingChild", + "DocumentDocumentMessageChildHeadingChildBlob", + "DocumentDocumentMessageChildHeadingChildCode", + "DocumentDocumentMessageChildHeadingChildComment", + "DocumentDocumentMessageChildHeadingChildDivider", + "DocumentDocumentMessageChildHeadingChildImage", + "DocumentDocumentMessageChildHeadingChildLink", + "DocumentDocumentMessageChildHeadingChildLineBreak", + "DocumentDocumentMessageChildHeadingChildText", + "DocumentDocumentMessageChildHeadingChildToolCall", + "DocumentDocumentMessageChildHeadingChildToolResult", + "DocumentDocumentMessageChildHeadingChildTraceMessage", + "DocumentDocumentMessageChildImage", + "DocumentDocumentMessageChildLink", + "DocumentDocumentMessageChildLineBreak", + "DocumentDocumentMessageChildList", + "DocumentDocumentMessageChildListItem", + "DocumentDocumentMessageChildListItemChild", + "DocumentDocumentMessageChildListItemChildBlob", + "DocumentDocumentMessageChildListItemChildCode", + "DocumentDocumentMessageChildListItemChildComment", + "DocumentDocumentMessageChildListItemChildDivider", + "DocumentDocumentMessageChildListItemChildImage", + "DocumentDocumentMessageChildListItemChildLink", + "DocumentDocumentMessageChildListItemChildLineBreak", + "DocumentDocumentMessageChildListItemChildText", + "DocumentDocumentMessageChildListItemChildToolCall", + "DocumentDocumentMessageChildListItemChildToolResult", + "DocumentDocumentMessageChildListItemChildTraceMessage", + "DocumentDocumentMessageChildParagraph", + "DocumentDocumentMessageChildParagraphChild", + "DocumentDocumentMessageChildParagraphChildBlob", + "DocumentDocumentMessageChildParagraphChildCode", + "DocumentDocumentMessageChildParagraphChildComment", + "DocumentDocumentMessageChildParagraphChildDivider", + "DocumentDocumentMessageChildParagraphChildImage", + "DocumentDocumentMessageChildParagraphChildLink", + "DocumentDocumentMessageChildParagraphChildLineBreak", + "DocumentDocumentMessageChildParagraphChildText", + "DocumentDocumentMessageChildParagraphChildToolCall", + "DocumentDocumentMessageChildParagraphChildToolResult", + "DocumentDocumentMessageChildParagraphChildTraceMessage", + "DocumentDocumentMessageChildQuote", + "DocumentDocumentMessageChildQuoteChild", + "DocumentDocumentMessageChildQuoteChildBlob", + "DocumentDocumentMessageChildQuoteChildCode", + "DocumentDocumentMessageChildQuoteChildComment", + "DocumentDocumentMessageChildQuoteChildDivider", + "DocumentDocumentMessageChildQuoteChildImage", + "DocumentDocumentMessageChildQuoteChildLink", + "DocumentDocumentMessageChildQuoteChildLineBreak", + "DocumentDocumentMessageChildQuoteChildText", + "DocumentDocumentMessageChildQuoteChildToolCall", + "DocumentDocumentMessageChildQuoteChildToolResult", + "DocumentDocumentMessageChildQuoteChildTraceMessage", + "DocumentDocumentMessageChildTable", + "DocumentDocumentMessageChildTableCell", + "DocumentDocumentMessageChildTableCellChild", + "DocumentDocumentMessageChildTableCellChildBlob", + "DocumentDocumentMessageChildTableCellChildCode", + "DocumentDocumentMessageChildTableCellChildComment", + "DocumentDocumentMessageChildTableCellChildDivider", + "DocumentDocumentMessageChildTableCellChildImage", + "DocumentDocumentMessageChildTableCellChildLink", + "DocumentDocumentMessageChildTableCellChildLineBreak", + "DocumentDocumentMessageChildTableCellChildText", + "DocumentDocumentMessageChildTableCellChildToolCall", + "DocumentDocumentMessageChildTableCellChildToolResult", + "DocumentDocumentMessageChildTableCellChildTraceMessage", + "DocumentDocumentMessageChildTableRow", + "DocumentDocumentMessageChildText", + "DocumentDocumentMessageChildToDo", + "DocumentDocumentMessageChildToDoChild", + "DocumentDocumentMessageChildToDoChildBlob", + "DocumentDocumentMessageChildToDoChildCode", + "DocumentDocumentMessageChildToDoChildComment", + "DocumentDocumentMessageChildToDoChildDivider", + "DocumentDocumentMessageChildToDoChildImage", + "DocumentDocumentMessageChildToDoChildLink", + "DocumentDocumentMessageChildToDoChildLineBreak", + "DocumentDocumentMessageChildToDoChildText", + "DocumentDocumentMessageChildToDoChildToolCall", + "DocumentDocumentMessageChildToDoChildToolResult", + "DocumentDocumentMessageChildToDoChildTraceMessage", + "DocumentDocumentMessageChildToolCall", + "DocumentDocumentMessageChildToolResult", + "DocumentDocumentMessageChildTraceMessage", + "DocumentDocumentMessageChildUtterance", + "DocumentDocumentMessageMentionedUser", + "DocumentDocumentMessageMentionedUserChild", + "DocumentDocumentMessageMentionedUserChildBlob", + "DocumentDocumentMessageMentionedUserChildCode", + "DocumentDocumentMessageMentionedUserChildComment", + "DocumentDocumentMessageMentionedUserChildDivider", + "DocumentDocumentMessageMentionedUserChildImage", + "DocumentDocumentMessageMentionedUserChildLink", + "DocumentDocumentMessageMentionedUserChildLineBreak", + "DocumentDocumentMessageMentionedUserChildText", + "DocumentDocumentMessageMentionedUserChildToolCall", + "DocumentDocumentMessageMentionedUserChildToolResult", + "DocumentDocumentMessageMentionedUserChildTraceMessage", + "DocumentDocumentEvent", + "DocumentDocumentEventAttendee", + "DocumentDocumentEventAttendeeChild", + "DocumentDocumentEventAttendeeChildBlob", + "DocumentDocumentEventAttendeeChildCode", + "DocumentDocumentEventAttendeeChildComment", + "DocumentDocumentEventAttendeeChildDivider", + "DocumentDocumentEventAttendeeChildImage", + "DocumentDocumentEventAttendeeChildLink", + "DocumentDocumentEventAttendeeChildLineBreak", + "DocumentDocumentEventAttendeeChildText", + "DocumentDocumentEventAttendeeChildToolCall", + "DocumentDocumentEventAttendeeChildToolResult", + "DocumentDocumentEventAttendeeChildTraceMessage", + "DocumentDocumentEventChild", + "DocumentDocumentEventChildBlob", + "DocumentDocumentEventChildCallout", + "DocumentDocumentEventChildCalloutChild", + "DocumentDocumentEventChildCalloutChildBlob", + "DocumentDocumentEventChildCalloutChildCode", + "DocumentDocumentEventChildCalloutChildComment", + "DocumentDocumentEventChildCalloutChildDivider", + "DocumentDocumentEventChildCalloutChildImage", + "DocumentDocumentEventChildCalloutChildLink", + "DocumentDocumentEventChildCalloutChildLineBreak", + "DocumentDocumentEventChildCalloutChildText", + "DocumentDocumentEventChildCalloutChildToolCall", + "DocumentDocumentEventChildCalloutChildToolResult", + "DocumentDocumentEventChildCalloutChildTraceMessage", + "DocumentDocumentEventChildChunk", + "DocumentDocumentEventChildChunkChild", + "DocumentDocumentEventChildChunkChildBlob", + "DocumentDocumentEventChildChunkChildCode", + "DocumentDocumentEventChildChunkChildComment", + "DocumentDocumentEventChildChunkChildDivider", + "DocumentDocumentEventChildChunkChildImage", + "DocumentDocumentEventChildChunkChildLink", + "DocumentDocumentEventChildChunkChildLineBreak", + "DocumentDocumentEventChildChunkChildText", + "DocumentDocumentEventChildChunkChildToolCall", + "DocumentDocumentEventChildChunkChildToolResult", + "DocumentDocumentEventChildChunkChildTraceMessage", + "DocumentDocumentEventChildCode", + "DocumentDocumentEventChildComment", + "DocumentDocumentEventChildDivider", + "DocumentDocumentEventChildEquation", + "DocumentDocumentEventChildEquationChild", + "DocumentDocumentEventChildEquationChildBlob", + "DocumentDocumentEventChildEquationChildCode", + "DocumentDocumentEventChildEquationChildComment", + "DocumentDocumentEventChildEquationChildDivider", + "DocumentDocumentEventChildEquationChildImage", + "DocumentDocumentEventChildEquationChildLink", + "DocumentDocumentEventChildEquationChildLineBreak", + "DocumentDocumentEventChildEquationChildText", + "DocumentDocumentEventChildEquationChildToolCall", + "DocumentDocumentEventChildEquationChildToolResult", + "DocumentDocumentEventChildEquationChildTraceMessage", + "DocumentDocumentEventChildFootnote", + "DocumentDocumentEventChildFootnoteChild", + "DocumentDocumentEventChildFootnoteChildBlob", + "DocumentDocumentEventChildFootnoteChildCode", + "DocumentDocumentEventChildFootnoteChildComment", + "DocumentDocumentEventChildFootnoteChildDivider", + "DocumentDocumentEventChildFootnoteChildImage", + "DocumentDocumentEventChildFootnoteChildLink", + "DocumentDocumentEventChildFootnoteChildLineBreak", + "DocumentDocumentEventChildFootnoteChildText", + "DocumentDocumentEventChildFootnoteChildToolCall", + "DocumentDocumentEventChildFootnoteChildToolResult", + "DocumentDocumentEventChildFootnoteChildTraceMessage", + "DocumentDocumentEventChildHeading", + "DocumentDocumentEventChildHeadingChild", + "DocumentDocumentEventChildHeadingChildBlob", + "DocumentDocumentEventChildHeadingChildCode", + "DocumentDocumentEventChildHeadingChildComment", + "DocumentDocumentEventChildHeadingChildDivider", + "DocumentDocumentEventChildHeadingChildImage", + "DocumentDocumentEventChildHeadingChildLink", + "DocumentDocumentEventChildHeadingChildLineBreak", + "DocumentDocumentEventChildHeadingChildText", + "DocumentDocumentEventChildHeadingChildToolCall", + "DocumentDocumentEventChildHeadingChildToolResult", + "DocumentDocumentEventChildHeadingChildTraceMessage", + "DocumentDocumentEventChildImage", + "DocumentDocumentEventChildLink", + "DocumentDocumentEventChildLineBreak", + "DocumentDocumentEventChildList", + "DocumentDocumentEventChildListItem", + "DocumentDocumentEventChildListItemChild", + "DocumentDocumentEventChildListItemChildBlob", + "DocumentDocumentEventChildListItemChildCode", + "DocumentDocumentEventChildListItemChildComment", + "DocumentDocumentEventChildListItemChildDivider", + "DocumentDocumentEventChildListItemChildImage", + "DocumentDocumentEventChildListItemChildLink", + "DocumentDocumentEventChildListItemChildLineBreak", + "DocumentDocumentEventChildListItemChildText", + "DocumentDocumentEventChildListItemChildToolCall", + "DocumentDocumentEventChildListItemChildToolResult", + "DocumentDocumentEventChildListItemChildTraceMessage", + "DocumentDocumentEventChildParagraph", + "DocumentDocumentEventChildParagraphChild", + "DocumentDocumentEventChildParagraphChildBlob", + "DocumentDocumentEventChildParagraphChildCode", + "DocumentDocumentEventChildParagraphChildComment", + "DocumentDocumentEventChildParagraphChildDivider", + "DocumentDocumentEventChildParagraphChildImage", + "DocumentDocumentEventChildParagraphChildLink", + "DocumentDocumentEventChildParagraphChildLineBreak", + "DocumentDocumentEventChildParagraphChildText", + "DocumentDocumentEventChildParagraphChildToolCall", + "DocumentDocumentEventChildParagraphChildToolResult", + "DocumentDocumentEventChildParagraphChildTraceMessage", + "DocumentDocumentEventChildQuote", + "DocumentDocumentEventChildQuoteChild", + "DocumentDocumentEventChildQuoteChildBlob", + "DocumentDocumentEventChildQuoteChildCode", + "DocumentDocumentEventChildQuoteChildComment", + "DocumentDocumentEventChildQuoteChildDivider", + "DocumentDocumentEventChildQuoteChildImage", + "DocumentDocumentEventChildQuoteChildLink", + "DocumentDocumentEventChildQuoteChildLineBreak", + "DocumentDocumentEventChildQuoteChildText", + "DocumentDocumentEventChildQuoteChildToolCall", + "DocumentDocumentEventChildQuoteChildToolResult", + "DocumentDocumentEventChildQuoteChildTraceMessage", + "DocumentDocumentEventChildTable", + "DocumentDocumentEventChildTableCell", + "DocumentDocumentEventChildTableCellChild", + "DocumentDocumentEventChildTableCellChildBlob", + "DocumentDocumentEventChildTableCellChildCode", + "DocumentDocumentEventChildTableCellChildComment", + "DocumentDocumentEventChildTableCellChildDivider", + "DocumentDocumentEventChildTableCellChildImage", + "DocumentDocumentEventChildTableCellChildLink", + "DocumentDocumentEventChildTableCellChildLineBreak", + "DocumentDocumentEventChildTableCellChildText", + "DocumentDocumentEventChildTableCellChildToolCall", + "DocumentDocumentEventChildTableCellChildToolResult", + "DocumentDocumentEventChildTableCellChildTraceMessage", + "DocumentDocumentEventChildTableRow", + "DocumentDocumentEventChildText", + "DocumentDocumentEventChildToDo", + "DocumentDocumentEventChildToDoChild", + "DocumentDocumentEventChildToDoChildBlob", + "DocumentDocumentEventChildToDoChildCode", + "DocumentDocumentEventChildToDoChildComment", + "DocumentDocumentEventChildToDoChildDivider", + "DocumentDocumentEventChildToDoChildImage", + "DocumentDocumentEventChildToDoChildLink", + "DocumentDocumentEventChildToDoChildLineBreak", + "DocumentDocumentEventChildToDoChildText", + "DocumentDocumentEventChildToDoChildToolCall", + "DocumentDocumentEventChildToDoChildToolResult", + "DocumentDocumentEventChildToDoChildTraceMessage", + "DocumentDocumentEventChildToolCall", + "DocumentDocumentEventChildToolResult", + "DocumentDocumentEventChildTraceMessage", + "DocumentDocumentEventChildUtterance", + "DocumentDocumentFile", + "DocumentDocumentFileChild", + "DocumentDocumentFileChildBlob", + "DocumentDocumentFileChildCallout", + "DocumentDocumentFileChildCalloutChild", + "DocumentDocumentFileChildCalloutChildBlob", + "DocumentDocumentFileChildCalloutChildCode", + "DocumentDocumentFileChildCalloutChildComment", + "DocumentDocumentFileChildCalloutChildDivider", + "DocumentDocumentFileChildCalloutChildImage", + "DocumentDocumentFileChildCalloutChildLink", + "DocumentDocumentFileChildCalloutChildLineBreak", + "DocumentDocumentFileChildCalloutChildText", + "DocumentDocumentFileChildCalloutChildToolCall", + "DocumentDocumentFileChildCalloutChildToolResult", + "DocumentDocumentFileChildCalloutChildTraceMessage", + "DocumentDocumentFileChildChunk", + "DocumentDocumentFileChildChunkChild", + "DocumentDocumentFileChildChunkChildBlob", + "DocumentDocumentFileChildChunkChildCode", + "DocumentDocumentFileChildChunkChildComment", + "DocumentDocumentFileChildChunkChildDivider", + "DocumentDocumentFileChildChunkChildImage", + "DocumentDocumentFileChildChunkChildLink", + "DocumentDocumentFileChildChunkChildLineBreak", + "DocumentDocumentFileChildChunkChildText", + "DocumentDocumentFileChildChunkChildToolCall", + "DocumentDocumentFileChildChunkChildToolResult", + "DocumentDocumentFileChildChunkChildTraceMessage", + "DocumentDocumentFileChildCode", + "DocumentDocumentFileChildComment", + "DocumentDocumentFileChildDivider", + "DocumentDocumentFileChildEquation", + "DocumentDocumentFileChildEquationChild", + "DocumentDocumentFileChildEquationChildBlob", + "DocumentDocumentFileChildEquationChildCode", + "DocumentDocumentFileChildEquationChildComment", + "DocumentDocumentFileChildEquationChildDivider", + "DocumentDocumentFileChildEquationChildImage", + "DocumentDocumentFileChildEquationChildLink", + "DocumentDocumentFileChildEquationChildLineBreak", + "DocumentDocumentFileChildEquationChildText", + "DocumentDocumentFileChildEquationChildToolCall", + "DocumentDocumentFileChildEquationChildToolResult", + "DocumentDocumentFileChildEquationChildTraceMessage", + "DocumentDocumentFileChildFootnote", + "DocumentDocumentFileChildFootnoteChild", + "DocumentDocumentFileChildFootnoteChildBlob", + "DocumentDocumentFileChildFootnoteChildCode", + "DocumentDocumentFileChildFootnoteChildComment", + "DocumentDocumentFileChildFootnoteChildDivider", + "DocumentDocumentFileChildFootnoteChildImage", + "DocumentDocumentFileChildFootnoteChildLink", + "DocumentDocumentFileChildFootnoteChildLineBreak", + "DocumentDocumentFileChildFootnoteChildText", + "DocumentDocumentFileChildFootnoteChildToolCall", + "DocumentDocumentFileChildFootnoteChildToolResult", + "DocumentDocumentFileChildFootnoteChildTraceMessage", + "DocumentDocumentFileChildHeading", + "DocumentDocumentFileChildHeadingChild", + "DocumentDocumentFileChildHeadingChildBlob", + "DocumentDocumentFileChildHeadingChildCode", + "DocumentDocumentFileChildHeadingChildComment", + "DocumentDocumentFileChildHeadingChildDivider", + "DocumentDocumentFileChildHeadingChildImage", + "DocumentDocumentFileChildHeadingChildLink", + "DocumentDocumentFileChildHeadingChildLineBreak", + "DocumentDocumentFileChildHeadingChildText", + "DocumentDocumentFileChildHeadingChildToolCall", + "DocumentDocumentFileChildHeadingChildToolResult", + "DocumentDocumentFileChildHeadingChildTraceMessage", + "DocumentDocumentFileChildImage", + "DocumentDocumentFileChildLink", + "DocumentDocumentFileChildLineBreak", + "DocumentDocumentFileChildList", + "DocumentDocumentFileChildListItem", + "DocumentDocumentFileChildListItemChild", + "DocumentDocumentFileChildListItemChildBlob", + "DocumentDocumentFileChildListItemChildCode", + "DocumentDocumentFileChildListItemChildComment", + "DocumentDocumentFileChildListItemChildDivider", + "DocumentDocumentFileChildListItemChildImage", + "DocumentDocumentFileChildListItemChildLink", + "DocumentDocumentFileChildListItemChildLineBreak", + "DocumentDocumentFileChildListItemChildText", + "DocumentDocumentFileChildListItemChildToolCall", + "DocumentDocumentFileChildListItemChildToolResult", + "DocumentDocumentFileChildListItemChildTraceMessage", + "DocumentDocumentFileChildParagraph", + "DocumentDocumentFileChildParagraphChild", + "DocumentDocumentFileChildParagraphChildBlob", + "DocumentDocumentFileChildParagraphChildCode", + "DocumentDocumentFileChildParagraphChildComment", + "DocumentDocumentFileChildParagraphChildDivider", + "DocumentDocumentFileChildParagraphChildImage", + "DocumentDocumentFileChildParagraphChildLink", + "DocumentDocumentFileChildParagraphChildLineBreak", + "DocumentDocumentFileChildParagraphChildText", + "DocumentDocumentFileChildParagraphChildToolCall", + "DocumentDocumentFileChildParagraphChildToolResult", + "DocumentDocumentFileChildParagraphChildTraceMessage", + "DocumentDocumentFileChildQuote", + "DocumentDocumentFileChildQuoteChild", + "DocumentDocumentFileChildQuoteChildBlob", + "DocumentDocumentFileChildQuoteChildCode", + "DocumentDocumentFileChildQuoteChildComment", + "DocumentDocumentFileChildQuoteChildDivider", + "DocumentDocumentFileChildQuoteChildImage", + "DocumentDocumentFileChildQuoteChildLink", + "DocumentDocumentFileChildQuoteChildLineBreak", + "DocumentDocumentFileChildQuoteChildText", + "DocumentDocumentFileChildQuoteChildToolCall", + "DocumentDocumentFileChildQuoteChildToolResult", + "DocumentDocumentFileChildQuoteChildTraceMessage", + "DocumentDocumentFileChildTable", + "DocumentDocumentFileChildTableCell", + "DocumentDocumentFileChildTableCellChild", + "DocumentDocumentFileChildTableCellChildBlob", + "DocumentDocumentFileChildTableCellChildCode", + "DocumentDocumentFileChildTableCellChildComment", + "DocumentDocumentFileChildTableCellChildDivider", + "DocumentDocumentFileChildTableCellChildImage", + "DocumentDocumentFileChildTableCellChildLink", + "DocumentDocumentFileChildTableCellChildLineBreak", + "DocumentDocumentFileChildTableCellChildText", + "DocumentDocumentFileChildTableCellChildToolCall", + "DocumentDocumentFileChildTableCellChildToolResult", + "DocumentDocumentFileChildTableCellChildTraceMessage", + "DocumentDocumentFileChildTableRow", + "DocumentDocumentFileChildText", + "DocumentDocumentFileChildToDo", + "DocumentDocumentFileChildToDoChild", + "DocumentDocumentFileChildToDoChildBlob", + "DocumentDocumentFileChildToDoChildCode", + "DocumentDocumentFileChildToDoChildComment", + "DocumentDocumentFileChildToDoChildDivider", + "DocumentDocumentFileChildToDoChildImage", + "DocumentDocumentFileChildToDoChildLink", + "DocumentDocumentFileChildToDoChildLineBreak", + "DocumentDocumentFileChildToDoChildText", + "DocumentDocumentFileChildToDoChildToolCall", + "DocumentDocumentFileChildToDoChildToolResult", + "DocumentDocumentFileChildToDoChildTraceMessage", + "DocumentDocumentFileChildToolCall", + "DocumentDocumentFileChildToolResult", + "DocumentDocumentFileChildTraceMessage", + "DocumentDocumentFileChildUtterance", + "DocumentDocumentConversation", + "DocumentDocumentConversationChild", + "DocumentDocumentConversationChildSender", + "DocumentDocumentConversationChildSenderChild", + "DocumentDocumentConversationChildSenderChildBlob", + "DocumentDocumentConversationChildSenderChildCode", + "DocumentDocumentConversationChildSenderChildComment", + "DocumentDocumentConversationChildSenderChildDivider", + "DocumentDocumentConversationChildSenderChildImage", + "DocumentDocumentConversationChildSenderChildLink", + "DocumentDocumentConversationChildSenderChildLineBreak", + "DocumentDocumentConversationChildSenderChildText", + "DocumentDocumentConversationChildSenderChildToolCall", + "DocumentDocumentConversationChildSenderChildToolResult", + "DocumentDocumentConversationChildSenderChildTraceMessage", + "DocumentDocumentConversationChildChild", + "DocumentDocumentConversationChildChildBlob", + "DocumentDocumentConversationChildChildCallout", + "DocumentDocumentConversationChildChildCalloutChild", + "DocumentDocumentConversationChildChildCalloutChildBlob", + "DocumentDocumentConversationChildChildCalloutChildCode", + "DocumentDocumentConversationChildChildCalloutChildComment", + "DocumentDocumentConversationChildChildCalloutChildDivider", + "DocumentDocumentConversationChildChildCalloutChildImage", + "DocumentDocumentConversationChildChildCalloutChildLink", + "DocumentDocumentConversationChildChildCalloutChildLineBreak", + "DocumentDocumentConversationChildChildCalloutChildText", + "DocumentDocumentConversationChildChildCalloutChildToolCall", + "DocumentDocumentConversationChildChildCalloutChildToolResult", + "DocumentDocumentConversationChildChildCalloutChildTraceMessage", + "DocumentDocumentConversationChildChildChunk", + "DocumentDocumentConversationChildChildChunkChild", + "DocumentDocumentConversationChildChildChunkChildBlob", + "DocumentDocumentConversationChildChildChunkChildCode", + "DocumentDocumentConversationChildChildChunkChildComment", + "DocumentDocumentConversationChildChildChunkChildDivider", + "DocumentDocumentConversationChildChildChunkChildImage", + "DocumentDocumentConversationChildChildChunkChildLink", + "DocumentDocumentConversationChildChildChunkChildLineBreak", + "DocumentDocumentConversationChildChildChunkChildText", + "DocumentDocumentConversationChildChildChunkChildToolCall", + "DocumentDocumentConversationChildChildChunkChildToolResult", + "DocumentDocumentConversationChildChildChunkChildTraceMessage", + "DocumentDocumentConversationChildChildCode", + "DocumentDocumentConversationChildChildComment", + "DocumentDocumentConversationChildChildDivider", + "DocumentDocumentConversationChildChildEquation", + "DocumentDocumentConversationChildChildEquationChild", + "DocumentDocumentConversationChildChildEquationChildBlob", + "DocumentDocumentConversationChildChildEquationChildCode", + "DocumentDocumentConversationChildChildEquationChildComment", + "DocumentDocumentConversationChildChildEquationChildDivider", + "DocumentDocumentConversationChildChildEquationChildImage", + "DocumentDocumentConversationChildChildEquationChildLink", + "DocumentDocumentConversationChildChildEquationChildLineBreak", + "DocumentDocumentConversationChildChildEquationChildText", + "DocumentDocumentConversationChildChildEquationChildToolCall", + "DocumentDocumentConversationChildChildEquationChildToolResult", + "DocumentDocumentConversationChildChildEquationChildTraceMessage", + "DocumentDocumentConversationChildChildFootnote", + "DocumentDocumentConversationChildChildFootnoteChild", + "DocumentDocumentConversationChildChildFootnoteChildBlob", + "DocumentDocumentConversationChildChildFootnoteChildCode", + "DocumentDocumentConversationChildChildFootnoteChildComment", + "DocumentDocumentConversationChildChildFootnoteChildDivider", + "DocumentDocumentConversationChildChildFootnoteChildImage", + "DocumentDocumentConversationChildChildFootnoteChildLink", + "DocumentDocumentConversationChildChildFootnoteChildLineBreak", + "DocumentDocumentConversationChildChildFootnoteChildText", + "DocumentDocumentConversationChildChildFootnoteChildToolCall", + "DocumentDocumentConversationChildChildFootnoteChildToolResult", + "DocumentDocumentConversationChildChildFootnoteChildTraceMessage", + "DocumentDocumentConversationChildChildHeading", + "DocumentDocumentConversationChildChildHeadingChild", + "DocumentDocumentConversationChildChildHeadingChildBlob", + "DocumentDocumentConversationChildChildHeadingChildCode", + "DocumentDocumentConversationChildChildHeadingChildComment", + "DocumentDocumentConversationChildChildHeadingChildDivider", + "DocumentDocumentConversationChildChildHeadingChildImage", + "DocumentDocumentConversationChildChildHeadingChildLink", + "DocumentDocumentConversationChildChildHeadingChildLineBreak", + "DocumentDocumentConversationChildChildHeadingChildText", + "DocumentDocumentConversationChildChildHeadingChildToolCall", + "DocumentDocumentConversationChildChildHeadingChildToolResult", + "DocumentDocumentConversationChildChildHeadingChildTraceMessage", + "DocumentDocumentConversationChildChildImage", + "DocumentDocumentConversationChildChildLink", + "DocumentDocumentConversationChildChildLineBreak", + "DocumentDocumentConversationChildChildList", + "DocumentDocumentConversationChildChildListItem", + "DocumentDocumentConversationChildChildListItemChild", + "DocumentDocumentConversationChildChildListItemChildBlob", + "DocumentDocumentConversationChildChildListItemChildCode", + "DocumentDocumentConversationChildChildListItemChildComment", + "DocumentDocumentConversationChildChildListItemChildDivider", + "DocumentDocumentConversationChildChildListItemChildImage", + "DocumentDocumentConversationChildChildListItemChildLink", + "DocumentDocumentConversationChildChildListItemChildLineBreak", + "DocumentDocumentConversationChildChildListItemChildText", + "DocumentDocumentConversationChildChildListItemChildToolCall", + "DocumentDocumentConversationChildChildListItemChildToolResult", + "DocumentDocumentConversationChildChildListItemChildTraceMessage", + "DocumentDocumentConversationChildChildParagraph", + "DocumentDocumentConversationChildChildParagraphChild", + "DocumentDocumentConversationChildChildParagraphChildBlob", + "DocumentDocumentConversationChildChildParagraphChildCode", + "DocumentDocumentConversationChildChildParagraphChildComment", + "DocumentDocumentConversationChildChildParagraphChildDivider", + "DocumentDocumentConversationChildChildParagraphChildImage", + "DocumentDocumentConversationChildChildParagraphChildLink", + "DocumentDocumentConversationChildChildParagraphChildLineBreak", + "DocumentDocumentConversationChildChildParagraphChildText", + "DocumentDocumentConversationChildChildParagraphChildToolCall", + "DocumentDocumentConversationChildChildParagraphChildToolResult", + "DocumentDocumentConversationChildChildParagraphChildTraceMessage", + "DocumentDocumentConversationChildChildQuote", + "DocumentDocumentConversationChildChildQuoteChild", + "DocumentDocumentConversationChildChildQuoteChildBlob", + "DocumentDocumentConversationChildChildQuoteChildCode", + "DocumentDocumentConversationChildChildQuoteChildComment", + "DocumentDocumentConversationChildChildQuoteChildDivider", + "DocumentDocumentConversationChildChildQuoteChildImage", + "DocumentDocumentConversationChildChildQuoteChildLink", + "DocumentDocumentConversationChildChildQuoteChildLineBreak", + "DocumentDocumentConversationChildChildQuoteChildText", + "DocumentDocumentConversationChildChildQuoteChildToolCall", + "DocumentDocumentConversationChildChildQuoteChildToolResult", + "DocumentDocumentConversationChildChildQuoteChildTraceMessage", + "DocumentDocumentConversationChildChildTable", + "DocumentDocumentConversationChildChildTableCell", + "DocumentDocumentConversationChildChildTableCellChild", + "DocumentDocumentConversationChildChildTableCellChildBlob", + "DocumentDocumentConversationChildChildTableCellChildCode", + "DocumentDocumentConversationChildChildTableCellChildComment", + "DocumentDocumentConversationChildChildTableCellChildDivider", + "DocumentDocumentConversationChildChildTableCellChildImage", + "DocumentDocumentConversationChildChildTableCellChildLink", + "DocumentDocumentConversationChildChildTableCellChildLineBreak", + "DocumentDocumentConversationChildChildTableCellChildText", + "DocumentDocumentConversationChildChildTableCellChildToolCall", + "DocumentDocumentConversationChildChildTableCellChildToolResult", + "DocumentDocumentConversationChildChildTableCellChildTraceMessage", + "DocumentDocumentConversationChildChildTableRow", + "DocumentDocumentConversationChildChildText", + "DocumentDocumentConversationChildChildToDo", + "DocumentDocumentConversationChildChildToDoChild", + "DocumentDocumentConversationChildChildToDoChildBlob", + "DocumentDocumentConversationChildChildToDoChildCode", + "DocumentDocumentConversationChildChildToDoChildComment", + "DocumentDocumentConversationChildChildToDoChildDivider", + "DocumentDocumentConversationChildChildToDoChildImage", + "DocumentDocumentConversationChildChildToDoChildLink", + "DocumentDocumentConversationChildChildToDoChildLineBreak", + "DocumentDocumentConversationChildChildToDoChildText", + "DocumentDocumentConversationChildChildToDoChildToolCall", + "DocumentDocumentConversationChildChildToDoChildToolResult", + "DocumentDocumentConversationChildChildToDoChildTraceMessage", + "DocumentDocumentConversationChildChildToolCall", + "DocumentDocumentConversationChildChildToolResult", + "DocumentDocumentConversationChildChildTraceMessage", + "DocumentDocumentConversationChildChildUtterance", + "DocumentDocumentConversationChildMentionedUser", + "DocumentDocumentConversationChildMentionedUserChild", + "DocumentDocumentConversationChildMentionedUserChildBlob", + "DocumentDocumentConversationChildMentionedUserChildCode", + "DocumentDocumentConversationChildMentionedUserChildComment", + "DocumentDocumentConversationChildMentionedUserChildDivider", + "DocumentDocumentConversationChildMentionedUserChildImage", + "DocumentDocumentConversationChildMentionedUserChildLink", + "DocumentDocumentConversationChildMentionedUserChildLineBreak", + "DocumentDocumentConversationChildMentionedUserChildText", + "DocumentDocumentConversationChildMentionedUserChildToolCall", + "DocumentDocumentConversationChildMentionedUserChildToolResult", + "DocumentDocumentConversationChildMentionedUserChildTraceMessage", + "DocumentDocumentTrace", + "DocumentDocumentTraceChild", + "DocumentDocumentTraceChildTraceMessage", + "DocumentDocumentTraceChildToolCall", + "DocumentDocumentTraceChildToolResult", + "DocumentDocumentTranscript", + "DocumentDocumentTranscriptChild", + "DocumentDocumentTranscriptParticipant", + "DocumentDocumentTranscriptParticipantChild", + "DocumentDocumentTranscriptParticipantChildBlob", + "DocumentDocumentTranscriptParticipantChildCode", + "DocumentDocumentTranscriptParticipantChildComment", + "DocumentDocumentTranscriptParticipantChildDivider", + "DocumentDocumentTranscriptParticipantChildImage", + "DocumentDocumentTranscriptParticipantChildLink", + "DocumentDocumentTranscriptParticipantChildLineBreak", + "DocumentDocumentTranscriptParticipantChildText", + "DocumentDocumentTranscriptParticipantChildToolCall", + "DocumentDocumentTranscriptParticipantChildToolResult", + "DocumentDocumentTranscriptParticipantChildTraceMessage", + "DocumentDocumentCompany", + "DocumentDocumentCompanyChild", + "DocumentDocumentCompanyChildBlob", + "DocumentDocumentCompanyChildCallout", + "DocumentDocumentCompanyChildCalloutChild", + "DocumentDocumentCompanyChildCalloutChildBlob", + "DocumentDocumentCompanyChildCalloutChildCode", + "DocumentDocumentCompanyChildCalloutChildComment", + "DocumentDocumentCompanyChildCalloutChildDivider", + "DocumentDocumentCompanyChildCalloutChildImage", + "DocumentDocumentCompanyChildCalloutChildLink", + "DocumentDocumentCompanyChildCalloutChildLineBreak", + "DocumentDocumentCompanyChildCalloutChildText", + "DocumentDocumentCompanyChildCalloutChildToolCall", + "DocumentDocumentCompanyChildCalloutChildToolResult", + "DocumentDocumentCompanyChildCalloutChildTraceMessage", + "DocumentDocumentCompanyChildChunk", + "DocumentDocumentCompanyChildChunkChild", + "DocumentDocumentCompanyChildChunkChildBlob", + "DocumentDocumentCompanyChildChunkChildCode", + "DocumentDocumentCompanyChildChunkChildComment", + "DocumentDocumentCompanyChildChunkChildDivider", + "DocumentDocumentCompanyChildChunkChildImage", + "DocumentDocumentCompanyChildChunkChildLink", + "DocumentDocumentCompanyChildChunkChildLineBreak", + "DocumentDocumentCompanyChildChunkChildText", + "DocumentDocumentCompanyChildChunkChildToolCall", + "DocumentDocumentCompanyChildChunkChildToolResult", + "DocumentDocumentCompanyChildChunkChildTraceMessage", + "DocumentDocumentCompanyChildCode", + "DocumentDocumentCompanyChildComment", + "DocumentDocumentCompanyChildDivider", + "DocumentDocumentCompanyChildEquation", + "DocumentDocumentCompanyChildEquationChild", + "DocumentDocumentCompanyChildEquationChildBlob", + "DocumentDocumentCompanyChildEquationChildCode", + "DocumentDocumentCompanyChildEquationChildComment", + "DocumentDocumentCompanyChildEquationChildDivider", + "DocumentDocumentCompanyChildEquationChildImage", + "DocumentDocumentCompanyChildEquationChildLink", + "DocumentDocumentCompanyChildEquationChildLineBreak", + "DocumentDocumentCompanyChildEquationChildText", + "DocumentDocumentCompanyChildEquationChildToolCall", + "DocumentDocumentCompanyChildEquationChildToolResult", + "DocumentDocumentCompanyChildEquationChildTraceMessage", + "DocumentDocumentCompanyChildFootnote", + "DocumentDocumentCompanyChildFootnoteChild", + "DocumentDocumentCompanyChildFootnoteChildBlob", + "DocumentDocumentCompanyChildFootnoteChildCode", + "DocumentDocumentCompanyChildFootnoteChildComment", + "DocumentDocumentCompanyChildFootnoteChildDivider", + "DocumentDocumentCompanyChildFootnoteChildImage", + "DocumentDocumentCompanyChildFootnoteChildLink", + "DocumentDocumentCompanyChildFootnoteChildLineBreak", + "DocumentDocumentCompanyChildFootnoteChildText", + "DocumentDocumentCompanyChildFootnoteChildToolCall", + "DocumentDocumentCompanyChildFootnoteChildToolResult", + "DocumentDocumentCompanyChildFootnoteChildTraceMessage", + "DocumentDocumentCompanyChildHeading", + "DocumentDocumentCompanyChildHeadingChild", + "DocumentDocumentCompanyChildHeadingChildBlob", + "DocumentDocumentCompanyChildHeadingChildCode", + "DocumentDocumentCompanyChildHeadingChildComment", + "DocumentDocumentCompanyChildHeadingChildDivider", + "DocumentDocumentCompanyChildHeadingChildImage", + "DocumentDocumentCompanyChildHeadingChildLink", + "DocumentDocumentCompanyChildHeadingChildLineBreak", + "DocumentDocumentCompanyChildHeadingChildText", + "DocumentDocumentCompanyChildHeadingChildToolCall", + "DocumentDocumentCompanyChildHeadingChildToolResult", + "DocumentDocumentCompanyChildHeadingChildTraceMessage", + "DocumentDocumentCompanyChildImage", + "DocumentDocumentCompanyChildLink", + "DocumentDocumentCompanyChildLineBreak", + "DocumentDocumentCompanyChildList", + "DocumentDocumentCompanyChildListItem", + "DocumentDocumentCompanyChildListItemChild", + "DocumentDocumentCompanyChildListItemChildBlob", + "DocumentDocumentCompanyChildListItemChildCode", + "DocumentDocumentCompanyChildListItemChildComment", + "DocumentDocumentCompanyChildListItemChildDivider", + "DocumentDocumentCompanyChildListItemChildImage", + "DocumentDocumentCompanyChildListItemChildLink", + "DocumentDocumentCompanyChildListItemChildLineBreak", + "DocumentDocumentCompanyChildListItemChildText", + "DocumentDocumentCompanyChildListItemChildToolCall", + "DocumentDocumentCompanyChildListItemChildToolResult", + "DocumentDocumentCompanyChildListItemChildTraceMessage", + "DocumentDocumentCompanyChildParagraph", + "DocumentDocumentCompanyChildParagraphChild", + "DocumentDocumentCompanyChildParagraphChildBlob", + "DocumentDocumentCompanyChildParagraphChildCode", + "DocumentDocumentCompanyChildParagraphChildComment", + "DocumentDocumentCompanyChildParagraphChildDivider", + "DocumentDocumentCompanyChildParagraphChildImage", + "DocumentDocumentCompanyChildParagraphChildLink", + "DocumentDocumentCompanyChildParagraphChildLineBreak", + "DocumentDocumentCompanyChildParagraphChildText", + "DocumentDocumentCompanyChildParagraphChildToolCall", + "DocumentDocumentCompanyChildParagraphChildToolResult", + "DocumentDocumentCompanyChildParagraphChildTraceMessage", + "DocumentDocumentCompanyChildQuote", + "DocumentDocumentCompanyChildQuoteChild", + "DocumentDocumentCompanyChildQuoteChildBlob", + "DocumentDocumentCompanyChildQuoteChildCode", + "DocumentDocumentCompanyChildQuoteChildComment", + "DocumentDocumentCompanyChildQuoteChildDivider", + "DocumentDocumentCompanyChildQuoteChildImage", + "DocumentDocumentCompanyChildQuoteChildLink", + "DocumentDocumentCompanyChildQuoteChildLineBreak", + "DocumentDocumentCompanyChildQuoteChildText", + "DocumentDocumentCompanyChildQuoteChildToolCall", + "DocumentDocumentCompanyChildQuoteChildToolResult", + "DocumentDocumentCompanyChildQuoteChildTraceMessage", + "DocumentDocumentCompanyChildTable", + "DocumentDocumentCompanyChildTableCell", + "DocumentDocumentCompanyChildTableCellChild", + "DocumentDocumentCompanyChildTableCellChildBlob", + "DocumentDocumentCompanyChildTableCellChildCode", + "DocumentDocumentCompanyChildTableCellChildComment", + "DocumentDocumentCompanyChildTableCellChildDivider", + "DocumentDocumentCompanyChildTableCellChildImage", + "DocumentDocumentCompanyChildTableCellChildLink", + "DocumentDocumentCompanyChildTableCellChildLineBreak", + "DocumentDocumentCompanyChildTableCellChildText", + "DocumentDocumentCompanyChildTableCellChildToolCall", + "DocumentDocumentCompanyChildTableCellChildToolResult", + "DocumentDocumentCompanyChildTableCellChildTraceMessage", + "DocumentDocumentCompanyChildTableRow", + "DocumentDocumentCompanyChildText", + "DocumentDocumentCompanyChildToDo", + "DocumentDocumentCompanyChildToDoChild", + "DocumentDocumentCompanyChildToDoChildBlob", + "DocumentDocumentCompanyChildToDoChildCode", + "DocumentDocumentCompanyChildToDoChildComment", + "DocumentDocumentCompanyChildToDoChildDivider", + "DocumentDocumentCompanyChildToDoChildImage", + "DocumentDocumentCompanyChildToDoChildLink", + "DocumentDocumentCompanyChildToDoChildLineBreak", + "DocumentDocumentCompanyChildToDoChildText", + "DocumentDocumentCompanyChildToDoChildToolCall", + "DocumentDocumentCompanyChildToDoChildToolResult", + "DocumentDocumentCompanyChildToDoChildTraceMessage", + "DocumentDocumentCompanyChildToolCall", + "DocumentDocumentCompanyChildToolResult", + "DocumentDocumentCompanyChildTraceMessage", + "DocumentDocumentCompanyChildUtterance", + "DocumentDocumentDeal", + "DocumentDocumentDealChild", + "DocumentDocumentDealChildBlob", + "DocumentDocumentDealChildCallout", + "DocumentDocumentDealChildCalloutChild", + "DocumentDocumentDealChildCalloutChildBlob", + "DocumentDocumentDealChildCalloutChildCode", + "DocumentDocumentDealChildCalloutChildComment", + "DocumentDocumentDealChildCalloutChildDivider", + "DocumentDocumentDealChildCalloutChildImage", + "DocumentDocumentDealChildCalloutChildLink", + "DocumentDocumentDealChildCalloutChildLineBreak", + "DocumentDocumentDealChildCalloutChildText", + "DocumentDocumentDealChildCalloutChildToolCall", + "DocumentDocumentDealChildCalloutChildToolResult", + "DocumentDocumentDealChildCalloutChildTraceMessage", + "DocumentDocumentDealChildChunk", + "DocumentDocumentDealChildChunkChild", + "DocumentDocumentDealChildChunkChildBlob", + "DocumentDocumentDealChildChunkChildCode", + "DocumentDocumentDealChildChunkChildComment", + "DocumentDocumentDealChildChunkChildDivider", + "DocumentDocumentDealChildChunkChildImage", + "DocumentDocumentDealChildChunkChildLink", + "DocumentDocumentDealChildChunkChildLineBreak", + "DocumentDocumentDealChildChunkChildText", + "DocumentDocumentDealChildChunkChildToolCall", + "DocumentDocumentDealChildChunkChildToolResult", + "DocumentDocumentDealChildChunkChildTraceMessage", + "DocumentDocumentDealChildCode", + "DocumentDocumentDealChildComment", + "DocumentDocumentDealChildDivider", + "DocumentDocumentDealChildEquation", + "DocumentDocumentDealChildEquationChild", + "DocumentDocumentDealChildEquationChildBlob", + "DocumentDocumentDealChildEquationChildCode", + "DocumentDocumentDealChildEquationChildComment", + "DocumentDocumentDealChildEquationChildDivider", + "DocumentDocumentDealChildEquationChildImage", + "DocumentDocumentDealChildEquationChildLink", + "DocumentDocumentDealChildEquationChildLineBreak", + "DocumentDocumentDealChildEquationChildText", + "DocumentDocumentDealChildEquationChildToolCall", + "DocumentDocumentDealChildEquationChildToolResult", + "DocumentDocumentDealChildEquationChildTraceMessage", + "DocumentDocumentDealChildFootnote", + "DocumentDocumentDealChildFootnoteChild", + "DocumentDocumentDealChildFootnoteChildBlob", + "DocumentDocumentDealChildFootnoteChildCode", + "DocumentDocumentDealChildFootnoteChildComment", + "DocumentDocumentDealChildFootnoteChildDivider", + "DocumentDocumentDealChildFootnoteChildImage", + "DocumentDocumentDealChildFootnoteChildLink", + "DocumentDocumentDealChildFootnoteChildLineBreak", + "DocumentDocumentDealChildFootnoteChildText", + "DocumentDocumentDealChildFootnoteChildToolCall", + "DocumentDocumentDealChildFootnoteChildToolResult", + "DocumentDocumentDealChildFootnoteChildTraceMessage", + "DocumentDocumentDealChildHeading", + "DocumentDocumentDealChildHeadingChild", + "DocumentDocumentDealChildHeadingChildBlob", + "DocumentDocumentDealChildHeadingChildCode", + "DocumentDocumentDealChildHeadingChildComment", + "DocumentDocumentDealChildHeadingChildDivider", + "DocumentDocumentDealChildHeadingChildImage", + "DocumentDocumentDealChildHeadingChildLink", + "DocumentDocumentDealChildHeadingChildLineBreak", + "DocumentDocumentDealChildHeadingChildText", + "DocumentDocumentDealChildHeadingChildToolCall", + "DocumentDocumentDealChildHeadingChildToolResult", + "DocumentDocumentDealChildHeadingChildTraceMessage", + "DocumentDocumentDealChildImage", + "DocumentDocumentDealChildLink", + "DocumentDocumentDealChildLineBreak", + "DocumentDocumentDealChildList", + "DocumentDocumentDealChildListItem", + "DocumentDocumentDealChildListItemChild", + "DocumentDocumentDealChildListItemChildBlob", + "DocumentDocumentDealChildListItemChildCode", + "DocumentDocumentDealChildListItemChildComment", + "DocumentDocumentDealChildListItemChildDivider", + "DocumentDocumentDealChildListItemChildImage", + "DocumentDocumentDealChildListItemChildLink", + "DocumentDocumentDealChildListItemChildLineBreak", + "DocumentDocumentDealChildListItemChildText", + "DocumentDocumentDealChildListItemChildToolCall", + "DocumentDocumentDealChildListItemChildToolResult", + "DocumentDocumentDealChildListItemChildTraceMessage", + "DocumentDocumentDealChildParagraph", + "DocumentDocumentDealChildParagraphChild", + "DocumentDocumentDealChildParagraphChildBlob", + "DocumentDocumentDealChildParagraphChildCode", + "DocumentDocumentDealChildParagraphChildComment", + "DocumentDocumentDealChildParagraphChildDivider", + "DocumentDocumentDealChildParagraphChildImage", + "DocumentDocumentDealChildParagraphChildLink", + "DocumentDocumentDealChildParagraphChildLineBreak", + "DocumentDocumentDealChildParagraphChildText", + "DocumentDocumentDealChildParagraphChildToolCall", + "DocumentDocumentDealChildParagraphChildToolResult", + "DocumentDocumentDealChildParagraphChildTraceMessage", + "DocumentDocumentDealChildQuote", + "DocumentDocumentDealChildQuoteChild", + "DocumentDocumentDealChildQuoteChildBlob", + "DocumentDocumentDealChildQuoteChildCode", + "DocumentDocumentDealChildQuoteChildComment", + "DocumentDocumentDealChildQuoteChildDivider", + "DocumentDocumentDealChildQuoteChildImage", + "DocumentDocumentDealChildQuoteChildLink", + "DocumentDocumentDealChildQuoteChildLineBreak", + "DocumentDocumentDealChildQuoteChildText", + "DocumentDocumentDealChildQuoteChildToolCall", + "DocumentDocumentDealChildQuoteChildToolResult", + "DocumentDocumentDealChildQuoteChildTraceMessage", + "DocumentDocumentDealChildTable", + "DocumentDocumentDealChildTableCell", + "DocumentDocumentDealChildTableCellChild", + "DocumentDocumentDealChildTableCellChildBlob", + "DocumentDocumentDealChildTableCellChildCode", + "DocumentDocumentDealChildTableCellChildComment", + "DocumentDocumentDealChildTableCellChildDivider", + "DocumentDocumentDealChildTableCellChildImage", + "DocumentDocumentDealChildTableCellChildLink", + "DocumentDocumentDealChildTableCellChildLineBreak", + "DocumentDocumentDealChildTableCellChildText", + "DocumentDocumentDealChildTableCellChildToolCall", + "DocumentDocumentDealChildTableCellChildToolResult", + "DocumentDocumentDealChildTableCellChildTraceMessage", + "DocumentDocumentDealChildTableRow", + "DocumentDocumentDealChildText", + "DocumentDocumentDealChildToDo", + "DocumentDocumentDealChildToDoChild", + "DocumentDocumentDealChildToDoChildBlob", + "DocumentDocumentDealChildToDoChildCode", + "DocumentDocumentDealChildToDoChildComment", + "DocumentDocumentDealChildToDoChildDivider", + "DocumentDocumentDealChildToDoChildImage", + "DocumentDocumentDealChildToDoChildLink", + "DocumentDocumentDealChildToDoChildLineBreak", + "DocumentDocumentDealChildToDoChildText", + "DocumentDocumentDealChildToDoChildToolCall", + "DocumentDocumentDealChildToDoChildToolResult", + "DocumentDocumentDealChildToDoChildTraceMessage", + "DocumentDocumentDealChildToolCall", + "DocumentDocumentDealChildToolResult", + "DocumentDocumentDealChildTraceMessage", + "DocumentDocumentDealChildUtterance", + "Provenance", + "ProvenanceEntity", + "ProvenanceSource", + "ProvenanceStep", +] + + +class DocumentDocumentDocumentChildBlob(BaseModel): + """Represents embedded binary data using data URI scheme. + + Format: data:[][;base64], + Example: data:text/html;base64,PGh0bWw+... + """ + + data: str + + mimetype: str + + id: Optional[str] = None + + type: Optional[Literal["blob"]] = None + + +class DocumentDocumentDocumentChildCalloutChildBlob(BaseModel): + """Represents embedded binary data using data URI scheme. + + Format: data:[][;base64], + Example: data:text/html;base64,PGh0bWw+... + """ + + data: str + + mimetype: str + + id: Optional[str] = None + + type: Optional[Literal["blob"]] = None + + +class DocumentDocumentDocumentChildCalloutChildCode(BaseModel): + text: str + + id: Optional[str] = None + + language: Optional[str] = None + + type: Optional[Literal["code"]] = None + + +class DocumentDocumentDocumentChildCalloutChildComment(BaseModel): + text: str + + id: Optional[str] = None + + created_at: Optional[datetime] = None + + type: Optional[Literal["comment"]] = None + + +class DocumentDocumentDocumentChildCalloutChildDivider(BaseModel): + id: Optional[str] = None + + type: Optional[Literal["divider"]] = None + + +class DocumentDocumentDocumentChildCalloutChildImage(BaseModel): + src: str + + text: str + + id: Optional[str] = None + + type: Optional[Literal["image"]] = None + + +class DocumentDocumentDocumentChildCalloutChildLink(BaseModel): + text: str + + url: str + + id: Optional[str] = None + + type: Optional[Literal["link"]] = None + + +class DocumentDocumentDocumentChildCalloutChildLineBreak(BaseModel): + id: Optional[str] = None + + type: Optional[Literal["line_break"]] = None + + +class DocumentDocumentDocumentChildCalloutChildText(BaseModel): + text: str + + id: Optional[str] = None + + marks: Optional[List[Literal["bold", "italic", "underline", "strikethrough", "code", "math"]]] = None + + type: Optional[Literal["text"]] = None + + +class DocumentDocumentDocumentChildCalloutChildToolCall(BaseModel): + """A tool/function call made by the assistant.""" + + tool_call_id: str + + tool_name: str + + id: Optional[str] = None + + args: Optional[Dict[str, object]] = None + + type: Optional[Literal["tool_call"]] = None + + +class DocumentDocumentDocumentChildCalloutChildToolResult(BaseModel): + """The result of a tool call.""" + + output: Union[str, Dict[str, object], List[object]] + + tool_call_id: str + + tool_name: str + + id: Optional[str] = None + + is_error: Optional[bool] = None + + type: Optional[Literal["tool_result"]] = None + + +class DocumentDocumentDocumentChildCalloutChildTraceMessage(BaseModel): + """A message in an agent trace (user message, assistant message, or thinking).""" + + text: str + + id: Optional[str] = None + + message_type: Optional[Literal["message", "thinking"]] = None + + role: Optional[Literal["user", "assistant"]] = None + + timestamp: Optional[datetime] = None + + type: Optional[Literal["trace_message"]] = None + + +DocumentDocumentDocumentChildCalloutChild: TypeAlias = Union[ + DocumentDocumentDocumentChildCalloutChildBlob, + DocumentDocumentDocumentChildCalloutChildCode, + DocumentDocumentDocumentChildCalloutChildComment, + DocumentDocumentDocumentChildCalloutChildDivider, + DocumentDocumentDocumentChildCalloutChildImage, + DocumentDocumentDocumentChildCalloutChildLink, + DocumentDocumentDocumentChildCalloutChildLineBreak, + DocumentDocumentDocumentChildCalloutChildText, + DocumentDocumentDocumentChildCalloutChildToolCall, + DocumentDocumentDocumentChildCalloutChildToolResult, + DocumentDocumentDocumentChildCalloutChildTraceMessage, + object, +] + + +class DocumentDocumentDocumentChildCallout(BaseModel): + id: Optional[str] = None + + children: Optional[List[DocumentDocumentDocumentChildCalloutChild]] = None + + text: Optional[str] = None + + title: Optional[str] = None + + type: Optional[Literal["callout"]] = None + + +class DocumentDocumentDocumentChildChunkChildBlob(BaseModel): + """Represents embedded binary data using data URI scheme. + + Format: data:[][;base64], + Example: data:text/html;base64,PGh0bWw+... + """ + + data: str + + mimetype: str + + id: Optional[str] = None + + type: Optional[Literal["blob"]] = None + + +class DocumentDocumentDocumentChildChunkChildCode(BaseModel): + text: str + + id: Optional[str] = None + + language: Optional[str] = None + + type: Optional[Literal["code"]] = None + + +class DocumentDocumentDocumentChildChunkChildComment(BaseModel): + text: str + + id: Optional[str] = None + + created_at: Optional[datetime] = None + + type: Optional[Literal["comment"]] = None + + +class DocumentDocumentDocumentChildChunkChildDivider(BaseModel): + id: Optional[str] = None + + type: Optional[Literal["divider"]] = None + + +class DocumentDocumentDocumentChildChunkChildImage(BaseModel): + src: str + + text: str + + id: Optional[str] = None + + type: Optional[Literal["image"]] = None + + +class DocumentDocumentDocumentChildChunkChildLink(BaseModel): + text: str + + url: str + + id: Optional[str] = None + + type: Optional[Literal["link"]] = None + + +class DocumentDocumentDocumentChildChunkChildLineBreak(BaseModel): + id: Optional[str] = None + + type: Optional[Literal["line_break"]] = None + + +class DocumentDocumentDocumentChildChunkChildText(BaseModel): + text: str + + id: Optional[str] = None + + marks: Optional[List[Literal["bold", "italic", "underline", "strikethrough", "code", "math"]]] = None + + type: Optional[Literal["text"]] = None + + +class DocumentDocumentDocumentChildChunkChildToolCall(BaseModel): + """A tool/function call made by the assistant.""" + + tool_call_id: str + + tool_name: str + + id: Optional[str] = None + + args: Optional[Dict[str, object]] = None + + type: Optional[Literal["tool_call"]] = None + + +class DocumentDocumentDocumentChildChunkChildToolResult(BaseModel): + """The result of a tool call.""" + + output: Union[str, Dict[str, object], List[object]] + + tool_call_id: str + + tool_name: str + + id: Optional[str] = None + + is_error: Optional[bool] = None + + type: Optional[Literal["tool_result"]] = None + + +class DocumentDocumentDocumentChildChunkChildTraceMessage(BaseModel): + """A message in an agent trace (user message, assistant message, or thinking).""" + + text: str + + id: Optional[str] = None + + message_type: Optional[Literal["message", "thinking"]] = None + + role: Optional[Literal["user", "assistant"]] = None + + timestamp: Optional[datetime] = None + + type: Optional[Literal["trace_message"]] = None + + +DocumentDocumentDocumentChildChunkChild: TypeAlias = Union[ + DocumentDocumentDocumentChildChunkChildBlob, + DocumentDocumentDocumentChildChunkChildCode, + DocumentDocumentDocumentChildChunkChildComment, + DocumentDocumentDocumentChildChunkChildDivider, + DocumentDocumentDocumentChildChunkChildImage, + DocumentDocumentDocumentChildChunkChildLink, + DocumentDocumentDocumentChildChunkChildLineBreak, + DocumentDocumentDocumentChildChunkChildText, + DocumentDocumentDocumentChildChunkChildToolCall, + DocumentDocumentDocumentChildChunkChildToolResult, + DocumentDocumentDocumentChildChunkChildTraceMessage, + object, +] + + +class DocumentDocumentDocumentChildChunk(BaseModel): + id: Optional[str] = None + + children: Optional[List[DocumentDocumentDocumentChildChunkChild]] = None + + text: Optional[str] = None + + type: Optional[Literal["chunk"]] = None + + +class DocumentDocumentDocumentChildCode(BaseModel): + text: str + + id: Optional[str] = None + + language: Optional[str] = None + + type: Optional[Literal["code"]] = None + + +class DocumentDocumentDocumentChildComment(BaseModel): + text: str + + id: Optional[str] = None + + created_at: Optional[datetime] = None + + type: Optional[Literal["comment"]] = None + + +class DocumentDocumentDocumentChildDivider(BaseModel): + id: Optional[str] = None + + type: Optional[Literal["divider"]] = None + + +class DocumentDocumentDocumentChildEquationChildBlob(BaseModel): + """Represents embedded binary data using data URI scheme. + + Format: data:[][;base64], + Example: data:text/html;base64,PGh0bWw+... + """ + + data: str + + mimetype: str + + id: Optional[str] = None + + type: Optional[Literal["blob"]] = None + + +class DocumentDocumentDocumentChildEquationChildCode(BaseModel): + text: str + + id: Optional[str] = None + + language: Optional[str] = None + + type: Optional[Literal["code"]] = None + + +class DocumentDocumentDocumentChildEquationChildComment(BaseModel): + text: str + + id: Optional[str] = None + + created_at: Optional[datetime] = None + + type: Optional[Literal["comment"]] = None + + +class DocumentDocumentDocumentChildEquationChildDivider(BaseModel): + id: Optional[str] = None + + type: Optional[Literal["divider"]] = None + + +class DocumentDocumentDocumentChildEquationChildImage(BaseModel): + src: str + + text: str + + id: Optional[str] = None + + type: Optional[Literal["image"]] = None + + +class DocumentDocumentDocumentChildEquationChildLink(BaseModel): + text: str + + url: str + + id: Optional[str] = None + + type: Optional[Literal["link"]] = None + + +class DocumentDocumentDocumentChildEquationChildLineBreak(BaseModel): + id: Optional[str] = None + + type: Optional[Literal["line_break"]] = None + + +class DocumentDocumentDocumentChildEquationChildText(BaseModel): + text: str + + id: Optional[str] = None + + marks: Optional[List[Literal["bold", "italic", "underline", "strikethrough", "code", "math"]]] = None + + type: Optional[Literal["text"]] = None + + +class DocumentDocumentDocumentChildEquationChildToolCall(BaseModel): + """A tool/function call made by the assistant.""" + + tool_call_id: str + + tool_name: str + + id: Optional[str] = None + + args: Optional[Dict[str, object]] = None + + type: Optional[Literal["tool_call"]] = None + + +class DocumentDocumentDocumentChildEquationChildToolResult(BaseModel): + """The result of a tool call.""" + + output: Union[str, Dict[str, object], List[object]] + + tool_call_id: str + + tool_name: str + + id: Optional[str] = None + + is_error: Optional[bool] = None + + type: Optional[Literal["tool_result"]] = None + + +class DocumentDocumentDocumentChildEquationChildTraceMessage(BaseModel): + """A message in an agent trace (user message, assistant message, or thinking).""" + + text: str + + id: Optional[str] = None + + message_type: Optional[Literal["message", "thinking"]] = None + + role: Optional[Literal["user", "assistant"]] = None + + timestamp: Optional[datetime] = None + + type: Optional[Literal["trace_message"]] = None + + +DocumentDocumentDocumentChildEquationChild: TypeAlias = Union[ + DocumentDocumentDocumentChildEquationChildBlob, + DocumentDocumentDocumentChildEquationChildCode, + DocumentDocumentDocumentChildEquationChildComment, + DocumentDocumentDocumentChildEquationChildDivider, + DocumentDocumentDocumentChildEquationChildImage, + DocumentDocumentDocumentChildEquationChildLink, + DocumentDocumentDocumentChildEquationChildLineBreak, + DocumentDocumentDocumentChildEquationChildText, + DocumentDocumentDocumentChildEquationChildToolCall, + DocumentDocumentDocumentChildEquationChildToolResult, + DocumentDocumentDocumentChildEquationChildTraceMessage, + object, +] + + +class DocumentDocumentDocumentChildEquation(BaseModel): + id: Optional[str] = None + + children: Optional[List[DocumentDocumentDocumentChildEquationChild]] = None + + text: Optional[str] = None + + type: Optional[Literal["equation"]] = None + + +class DocumentDocumentDocumentChildFootnoteChildBlob(BaseModel): + """Represents embedded binary data using data URI scheme. + + Format: data:[][;base64], + Example: data:text/html;base64,PGh0bWw+... + """ + + data: str + + mimetype: str + + id: Optional[str] = None + + type: Optional[Literal["blob"]] = None + + +class DocumentDocumentDocumentChildFootnoteChildCode(BaseModel): + text: str + + id: Optional[str] = None + + language: Optional[str] = None + + type: Optional[Literal["code"]] = None + + +class DocumentDocumentDocumentChildFootnoteChildComment(BaseModel): + text: str + + id: Optional[str] = None + + created_at: Optional[datetime] = None + + type: Optional[Literal["comment"]] = None + + +class DocumentDocumentDocumentChildFootnoteChildDivider(BaseModel): + id: Optional[str] = None + + type: Optional[Literal["divider"]] = None + + +class DocumentDocumentDocumentChildFootnoteChildImage(BaseModel): + src: str + + text: str + + id: Optional[str] = None + + type: Optional[Literal["image"]] = None + + +class DocumentDocumentDocumentChildFootnoteChildLink(BaseModel): + text: str + + url: str + + id: Optional[str] = None + + type: Optional[Literal["link"]] = None + + +class DocumentDocumentDocumentChildFootnoteChildLineBreak(BaseModel): + id: Optional[str] = None + + type: Optional[Literal["line_break"]] = None + + +class DocumentDocumentDocumentChildFootnoteChildText(BaseModel): + text: str + + id: Optional[str] = None + + marks: Optional[List[Literal["bold", "italic", "underline", "strikethrough", "code", "math"]]] = None + + type: Optional[Literal["text"]] = None + + +class DocumentDocumentDocumentChildFootnoteChildToolCall(BaseModel): + """A tool/function call made by the assistant.""" + + tool_call_id: str + + tool_name: str + + id: Optional[str] = None + + args: Optional[Dict[str, object]] = None + + type: Optional[Literal["tool_call"]] = None + + +class DocumentDocumentDocumentChildFootnoteChildToolResult(BaseModel): + """The result of a tool call.""" + + output: Union[str, Dict[str, object], List[object]] + + tool_call_id: str + + tool_name: str + + id: Optional[str] = None + + is_error: Optional[bool] = None + + type: Optional[Literal["tool_result"]] = None + + +class DocumentDocumentDocumentChildFootnoteChildTraceMessage(BaseModel): + """A message in an agent trace (user message, assistant message, or thinking).""" + + text: str + + id: Optional[str] = None + + message_type: Optional[Literal["message", "thinking"]] = None + + role: Optional[Literal["user", "assistant"]] = None + + timestamp: Optional[datetime] = None + + type: Optional[Literal["trace_message"]] = None + + +DocumentDocumentDocumentChildFootnoteChild: TypeAlias = Union[ + DocumentDocumentDocumentChildFootnoteChildBlob, + DocumentDocumentDocumentChildFootnoteChildCode, + DocumentDocumentDocumentChildFootnoteChildComment, + DocumentDocumentDocumentChildFootnoteChildDivider, + DocumentDocumentDocumentChildFootnoteChildImage, + DocumentDocumentDocumentChildFootnoteChildLink, + DocumentDocumentDocumentChildFootnoteChildLineBreak, + DocumentDocumentDocumentChildFootnoteChildText, + DocumentDocumentDocumentChildFootnoteChildToolCall, + DocumentDocumentDocumentChildFootnoteChildToolResult, + DocumentDocumentDocumentChildFootnoteChildTraceMessage, + object, +] + + +class DocumentDocumentDocumentChildFootnote(BaseModel): + id: Optional[str] = None + + children: Optional[List[DocumentDocumentDocumentChildFootnoteChild]] = None + + text: Optional[str] = None + + type: Optional[Literal["footnote"]] = None + + +class DocumentDocumentDocumentChildHeadingChildBlob(BaseModel): + """Represents embedded binary data using data URI scheme. + + Format: data:[][;base64], + Example: data:text/html;base64,PGh0bWw+... + """ + + data: str + + mimetype: str + + id: Optional[str] = None + + type: Optional[Literal["blob"]] = None + + +class DocumentDocumentDocumentChildHeadingChildCode(BaseModel): + text: str + + id: Optional[str] = None + + language: Optional[str] = None + + type: Optional[Literal["code"]] = None + + +class DocumentDocumentDocumentChildHeadingChildComment(BaseModel): + text: str + + id: Optional[str] = None + + created_at: Optional[datetime] = None + + type: Optional[Literal["comment"]] = None + + +class DocumentDocumentDocumentChildHeadingChildDivider(BaseModel): + id: Optional[str] = None + + type: Optional[Literal["divider"]] = None + + +class DocumentDocumentDocumentChildHeadingChildImage(BaseModel): + src: str + + text: str + + id: Optional[str] = None + + type: Optional[Literal["image"]] = None + + +class DocumentDocumentDocumentChildHeadingChildLink(BaseModel): + text: str + + url: str + + id: Optional[str] = None + + type: Optional[Literal["link"]] = None + + +class DocumentDocumentDocumentChildHeadingChildLineBreak(BaseModel): + id: Optional[str] = None + + type: Optional[Literal["line_break"]] = None + + +class DocumentDocumentDocumentChildHeadingChildText(BaseModel): + text: str + + id: Optional[str] = None + + marks: Optional[List[Literal["bold", "italic", "underline", "strikethrough", "code", "math"]]] = None + + type: Optional[Literal["text"]] = None + + +class DocumentDocumentDocumentChildHeadingChildToolCall(BaseModel): + """A tool/function call made by the assistant.""" + + tool_call_id: str + + tool_name: str + + id: Optional[str] = None + + args: Optional[Dict[str, object]] = None + + type: Optional[Literal["tool_call"]] = None + + +class DocumentDocumentDocumentChildHeadingChildToolResult(BaseModel): + """The result of a tool call.""" + + output: Union[str, Dict[str, object], List[object]] + + tool_call_id: str + + tool_name: str + + id: Optional[str] = None + + is_error: Optional[bool] = None + + type: Optional[Literal["tool_result"]] = None + + +class DocumentDocumentDocumentChildHeadingChildTraceMessage(BaseModel): + """A message in an agent trace (user message, assistant message, or thinking).""" + + text: str + + id: Optional[str] = None + + message_type: Optional[Literal["message", "thinking"]] = None + + role: Optional[Literal["user", "assistant"]] = None + + timestamp: Optional[datetime] = None + + type: Optional[Literal["trace_message"]] = None + + +DocumentDocumentDocumentChildHeadingChild: TypeAlias = Union[ + DocumentDocumentDocumentChildHeadingChildBlob, + DocumentDocumentDocumentChildHeadingChildCode, + DocumentDocumentDocumentChildHeadingChildComment, + DocumentDocumentDocumentChildHeadingChildDivider, + DocumentDocumentDocumentChildHeadingChildImage, + DocumentDocumentDocumentChildHeadingChildLink, + DocumentDocumentDocumentChildHeadingChildLineBreak, + DocumentDocumentDocumentChildHeadingChildText, + DocumentDocumentDocumentChildHeadingChildToolCall, + DocumentDocumentDocumentChildHeadingChildToolResult, + DocumentDocumentDocumentChildHeadingChildTraceMessage, + object, +] + + +class DocumentDocumentDocumentChildHeading(BaseModel): + level: int + + id: Optional[str] = None + + children: Optional[List[DocumentDocumentDocumentChildHeadingChild]] = None + + text: Optional[str] = None + + type: Optional[Literal["heading"]] = None + + +class DocumentDocumentDocumentChildImage(BaseModel): + src: str + + text: str + + id: Optional[str] = None + + type: Optional[Literal["image"]] = None + + +class DocumentDocumentDocumentChildLink(BaseModel): + text: str + + url: str + + id: Optional[str] = None + + type: Optional[Literal["link"]] = None + + +class DocumentDocumentDocumentChildLineBreak(BaseModel): + id: Optional[str] = None + + type: Optional[Literal["line_break"]] = None + + +class DocumentDocumentDocumentChildList(BaseModel): + id: Optional[str] = None + + children: Optional[List[object]] = None + + ordered: Optional[bool] = None + + text: Optional[str] = None + + type: Optional[Literal["list"]] = None + + +class DocumentDocumentDocumentChildListItemChildBlob(BaseModel): + """Represents embedded binary data using data URI scheme. + + Format: data:[][;base64], + Example: data:text/html;base64,PGh0bWw+... + """ + + data: str + + mimetype: str + + id: Optional[str] = None + + type: Optional[Literal["blob"]] = None + + +class DocumentDocumentDocumentChildListItemChildCode(BaseModel): + text: str + + id: Optional[str] = None + + language: Optional[str] = None + + type: Optional[Literal["code"]] = None + + +class DocumentDocumentDocumentChildListItemChildComment(BaseModel): + text: str + + id: Optional[str] = None + + created_at: Optional[datetime] = None + + type: Optional[Literal["comment"]] = None + + +class DocumentDocumentDocumentChildListItemChildDivider(BaseModel): + id: Optional[str] = None + + type: Optional[Literal["divider"]] = None + + +class DocumentDocumentDocumentChildListItemChildImage(BaseModel): + src: str + + text: str + + id: Optional[str] = None + + type: Optional[Literal["image"]] = None + + +class DocumentDocumentDocumentChildListItemChildLink(BaseModel): + text: str + + url: str + + id: Optional[str] = None + + type: Optional[Literal["link"]] = None + + +class DocumentDocumentDocumentChildListItemChildLineBreak(BaseModel): + id: Optional[str] = None + + type: Optional[Literal["line_break"]] = None + + +class DocumentDocumentDocumentChildListItemChildText(BaseModel): + text: str + + id: Optional[str] = None + + marks: Optional[List[Literal["bold", "italic", "underline", "strikethrough", "code", "math"]]] = None + + type: Optional[Literal["text"]] = None + + +class DocumentDocumentDocumentChildListItemChildToolCall(BaseModel): + """A tool/function call made by the assistant.""" + + tool_call_id: str + + tool_name: str + + id: Optional[str] = None + + args: Optional[Dict[str, object]] = None + + type: Optional[Literal["tool_call"]] = None + + +class DocumentDocumentDocumentChildListItemChildToolResult(BaseModel): + """The result of a tool call.""" + + output: Union[str, Dict[str, object], List[object]] + + tool_call_id: str + + tool_name: str + + id: Optional[str] = None + + is_error: Optional[bool] = None + + type: Optional[Literal["tool_result"]] = None + + +class DocumentDocumentDocumentChildListItemChildTraceMessage(BaseModel): + """A message in an agent trace (user message, assistant message, or thinking).""" + + text: str + + id: Optional[str] = None + + message_type: Optional[Literal["message", "thinking"]] = None + + role: Optional[Literal["user", "assistant"]] = None + + timestamp: Optional[datetime] = None + + type: Optional[Literal["trace_message"]] = None + + +DocumentDocumentDocumentChildListItemChild: TypeAlias = Union[ + DocumentDocumentDocumentChildListItemChildBlob, + DocumentDocumentDocumentChildListItemChildCode, + DocumentDocumentDocumentChildListItemChildComment, + DocumentDocumentDocumentChildListItemChildDivider, + DocumentDocumentDocumentChildListItemChildImage, + DocumentDocumentDocumentChildListItemChildLink, + DocumentDocumentDocumentChildListItemChildLineBreak, + DocumentDocumentDocumentChildListItemChildText, + DocumentDocumentDocumentChildListItemChildToolCall, + DocumentDocumentDocumentChildListItemChildToolResult, + DocumentDocumentDocumentChildListItemChildTraceMessage, + object, +] + + +class DocumentDocumentDocumentChildListItem(BaseModel): + id: Optional[str] = None + + children: Optional[List[DocumentDocumentDocumentChildListItemChild]] = None + + text: Optional[str] = None + + type: Optional[Literal["list_item"]] = None + + +class DocumentDocumentDocumentChildParagraphChildBlob(BaseModel): + """Represents embedded binary data using data URI scheme. + + Format: data:[][;base64], + Example: data:text/html;base64,PGh0bWw+... + """ + + data: str + + mimetype: str + + id: Optional[str] = None + + type: Optional[Literal["blob"]] = None + + +class DocumentDocumentDocumentChildParagraphChildCode(BaseModel): + text: str + + id: Optional[str] = None + + language: Optional[str] = None + + type: Optional[Literal["code"]] = None + + +class DocumentDocumentDocumentChildParagraphChildComment(BaseModel): + text: str + + id: Optional[str] = None + + created_at: Optional[datetime] = None + + type: Optional[Literal["comment"]] = None + + +class DocumentDocumentDocumentChildParagraphChildDivider(BaseModel): + id: Optional[str] = None + + type: Optional[Literal["divider"]] = None + + +class DocumentDocumentDocumentChildParagraphChildImage(BaseModel): + src: str + + text: str + + id: Optional[str] = None + + type: Optional[Literal["image"]] = None + + +class DocumentDocumentDocumentChildParagraphChildLink(BaseModel): + text: str + + url: str + + id: Optional[str] = None + + type: Optional[Literal["link"]] = None + + +class DocumentDocumentDocumentChildParagraphChildLineBreak(BaseModel): + id: Optional[str] = None + + type: Optional[Literal["line_break"]] = None + + +class DocumentDocumentDocumentChildParagraphChildText(BaseModel): + text: str + + id: Optional[str] = None + + marks: Optional[List[Literal["bold", "italic", "underline", "strikethrough", "code", "math"]]] = None + + type: Optional[Literal["text"]] = None + + +class DocumentDocumentDocumentChildParagraphChildToolCall(BaseModel): + """A tool/function call made by the assistant.""" + + tool_call_id: str + + tool_name: str + + id: Optional[str] = None + + args: Optional[Dict[str, object]] = None + + type: Optional[Literal["tool_call"]] = None + + +class DocumentDocumentDocumentChildParagraphChildToolResult(BaseModel): + """The result of a tool call.""" + + output: Union[str, Dict[str, object], List[object]] + + tool_call_id: str + + tool_name: str + + id: Optional[str] = None + + is_error: Optional[bool] = None + + type: Optional[Literal["tool_result"]] = None + + +class DocumentDocumentDocumentChildParagraphChildTraceMessage(BaseModel): + """A message in an agent trace (user message, assistant message, or thinking).""" + + text: str + + id: Optional[str] = None + + message_type: Optional[Literal["message", "thinking"]] = None + + role: Optional[Literal["user", "assistant"]] = None + + timestamp: Optional[datetime] = None + + type: Optional[Literal["trace_message"]] = None + + +DocumentDocumentDocumentChildParagraphChild: TypeAlias = Union[ + DocumentDocumentDocumentChildParagraphChildBlob, + DocumentDocumentDocumentChildParagraphChildCode, + DocumentDocumentDocumentChildParagraphChildComment, + DocumentDocumentDocumentChildParagraphChildDivider, + DocumentDocumentDocumentChildParagraphChildImage, + DocumentDocumentDocumentChildParagraphChildLink, + DocumentDocumentDocumentChildParagraphChildLineBreak, + DocumentDocumentDocumentChildParagraphChildText, + DocumentDocumentDocumentChildParagraphChildToolCall, + DocumentDocumentDocumentChildParagraphChildToolResult, + DocumentDocumentDocumentChildParagraphChildTraceMessage, + object, +] + + +class DocumentDocumentDocumentChildParagraph(BaseModel): + id: Optional[str] = None + + children: Optional[List[DocumentDocumentDocumentChildParagraphChild]] = None + + text: Optional[str] = None + + type: Optional[Literal["paragraph"]] = None + + +class DocumentDocumentDocumentChildQuoteChildBlob(BaseModel): + """Represents embedded binary data using data URI scheme. + + Format: data:[][;base64], + Example: data:text/html;base64,PGh0bWw+... + """ + + data: str + + mimetype: str + + id: Optional[str] = None + + type: Optional[Literal["blob"]] = None + + +class DocumentDocumentDocumentChildQuoteChildCode(BaseModel): + text: str + + id: Optional[str] = None + + language: Optional[str] = None + + type: Optional[Literal["code"]] = None + + +class DocumentDocumentDocumentChildQuoteChildComment(BaseModel): + text: str + + id: Optional[str] = None + + created_at: Optional[datetime] = None + + type: Optional[Literal["comment"]] = None + + +class DocumentDocumentDocumentChildQuoteChildDivider(BaseModel): + id: Optional[str] = None + + type: Optional[Literal["divider"]] = None + + +class DocumentDocumentDocumentChildQuoteChildImage(BaseModel): + src: str + + text: str + + id: Optional[str] = None + + type: Optional[Literal["image"]] = None + + +class DocumentDocumentDocumentChildQuoteChildLink(BaseModel): + text: str + + url: str + + id: Optional[str] = None + + type: Optional[Literal["link"]] = None + + +class DocumentDocumentDocumentChildQuoteChildLineBreak(BaseModel): + id: Optional[str] = None + + type: Optional[Literal["line_break"]] = None + + +class DocumentDocumentDocumentChildQuoteChildText(BaseModel): + text: str + + id: Optional[str] = None + + marks: Optional[List[Literal["bold", "italic", "underline", "strikethrough", "code", "math"]]] = None + + type: Optional[Literal["text"]] = None + + +class DocumentDocumentDocumentChildQuoteChildToolCall(BaseModel): + """A tool/function call made by the assistant.""" + + tool_call_id: str + + tool_name: str + + id: Optional[str] = None + + args: Optional[Dict[str, object]] = None + + type: Optional[Literal["tool_call"]] = None + + +class DocumentDocumentDocumentChildQuoteChildToolResult(BaseModel): + """The result of a tool call.""" + + output: Union[str, Dict[str, object], List[object]] + + tool_call_id: str + + tool_name: str + + id: Optional[str] = None + + is_error: Optional[bool] = None + + type: Optional[Literal["tool_result"]] = None + + +class DocumentDocumentDocumentChildQuoteChildTraceMessage(BaseModel): + """A message in an agent trace (user message, assistant message, or thinking).""" + + text: str + + id: Optional[str] = None + + message_type: Optional[Literal["message", "thinking"]] = None + + role: Optional[Literal["user", "assistant"]] = None + + timestamp: Optional[datetime] = None + + type: Optional[Literal["trace_message"]] = None + + +DocumentDocumentDocumentChildQuoteChild: TypeAlias = Union[ + DocumentDocumentDocumentChildQuoteChildBlob, + DocumentDocumentDocumentChildQuoteChildCode, + DocumentDocumentDocumentChildQuoteChildComment, + DocumentDocumentDocumentChildQuoteChildDivider, + DocumentDocumentDocumentChildQuoteChildImage, + DocumentDocumentDocumentChildQuoteChildLink, + DocumentDocumentDocumentChildQuoteChildLineBreak, + DocumentDocumentDocumentChildQuoteChildText, + DocumentDocumentDocumentChildQuoteChildToolCall, + DocumentDocumentDocumentChildQuoteChildToolResult, + DocumentDocumentDocumentChildQuoteChildTraceMessage, + object, +] + + +class DocumentDocumentDocumentChildQuote(BaseModel): + id: Optional[str] = None + + children: Optional[List[DocumentDocumentDocumentChildQuoteChild]] = None + + text: Optional[str] = None + + type: Optional[Literal["quote"]] = None + + +class DocumentDocumentDocumentChildTable(BaseModel): + id: Optional[str] = None + + children: Optional[List[object]] = None + + has_header: Optional[bool] = None + """Whether the first row should be treated as a header""" + + text: Optional[str] = None + + type: Optional[Literal["table"]] = None + + +class DocumentDocumentDocumentChildTableCellChildBlob(BaseModel): + """Represents embedded binary data using data URI scheme. + + Format: data:[][;base64], + Example: data:text/html;base64,PGh0bWw+... + """ + + data: str + + mimetype: str + + id: Optional[str] = None + + type: Optional[Literal["blob"]] = None + + +class DocumentDocumentDocumentChildTableCellChildCode(BaseModel): + text: str + + id: Optional[str] = None + + language: Optional[str] = None + + type: Optional[Literal["code"]] = None + + +class DocumentDocumentDocumentChildTableCellChildComment(BaseModel): + text: str + + id: Optional[str] = None + + created_at: Optional[datetime] = None + + type: Optional[Literal["comment"]] = None + + +class DocumentDocumentDocumentChildTableCellChildDivider(BaseModel): + id: Optional[str] = None + + type: Optional[Literal["divider"]] = None + + +class DocumentDocumentDocumentChildTableCellChildImage(BaseModel): + src: str + + text: str + + id: Optional[str] = None + + type: Optional[Literal["image"]] = None + + +class DocumentDocumentDocumentChildTableCellChildLink(BaseModel): + text: str + + url: str + + id: Optional[str] = None + + type: Optional[Literal["link"]] = None + + +class DocumentDocumentDocumentChildTableCellChildLineBreak(BaseModel): + id: Optional[str] = None + + type: Optional[Literal["line_break"]] = None + + +class DocumentDocumentDocumentChildTableCellChildText(BaseModel): + text: str + + id: Optional[str] = None + + marks: Optional[List[Literal["bold", "italic", "underline", "strikethrough", "code", "math"]]] = None + + type: Optional[Literal["text"]] = None + + +class DocumentDocumentDocumentChildTableCellChildToolCall(BaseModel): + """A tool/function call made by the assistant.""" + + tool_call_id: str + + tool_name: str + + id: Optional[str] = None + + args: Optional[Dict[str, object]] = None + + type: Optional[Literal["tool_call"]] = None + + +class DocumentDocumentDocumentChildTableCellChildToolResult(BaseModel): + """The result of a tool call.""" + + output: Union[str, Dict[str, object], List[object]] + + tool_call_id: str + + tool_name: str + + id: Optional[str] = None + + is_error: Optional[bool] = None + + type: Optional[Literal["tool_result"]] = None + + +class DocumentDocumentDocumentChildTableCellChildTraceMessage(BaseModel): + """A message in an agent trace (user message, assistant message, or thinking).""" + + text: str + + id: Optional[str] = None + + message_type: Optional[Literal["message", "thinking"]] = None + + role: Optional[Literal["user", "assistant"]] = None + + timestamp: Optional[datetime] = None + + type: Optional[Literal["trace_message"]] = None + + +DocumentDocumentDocumentChildTableCellChild: TypeAlias = Union[ + DocumentDocumentDocumentChildTableCellChildBlob, + DocumentDocumentDocumentChildTableCellChildCode, + DocumentDocumentDocumentChildTableCellChildComment, + DocumentDocumentDocumentChildTableCellChildDivider, + DocumentDocumentDocumentChildTableCellChildImage, + DocumentDocumentDocumentChildTableCellChildLink, + DocumentDocumentDocumentChildTableCellChildLineBreak, + DocumentDocumentDocumentChildTableCellChildText, + DocumentDocumentDocumentChildTableCellChildToolCall, + DocumentDocumentDocumentChildTableCellChildToolResult, + DocumentDocumentDocumentChildTableCellChildTraceMessage, + object, +] + + +class DocumentDocumentDocumentChildTableCell(BaseModel): + id: Optional[str] = None + + align: Optional[Literal["left", "center", "right"]] = None + + children: Optional[List[DocumentDocumentDocumentChildTableCellChild]] = None + + text: Optional[str] = None + + type: Optional[Literal["table_cell"]] = None + + +class DocumentDocumentDocumentChildTableRow(BaseModel): + id: Optional[str] = None + + children: Optional[List[object]] = None + + text: Optional[str] = None + + type: Optional[Literal["table_row"]] = None + + +class DocumentDocumentDocumentChildText(BaseModel): + text: str + + id: Optional[str] = None + + marks: Optional[List[Literal["bold", "italic", "underline", "strikethrough", "code", "math"]]] = None + + type: Optional[Literal["text"]] = None + + +class DocumentDocumentDocumentChildToDoChildBlob(BaseModel): + """Represents embedded binary data using data URI scheme. + + Format: data:[][;base64], + Example: data:text/html;base64,PGh0bWw+... + """ + + data: str + + mimetype: str + + id: Optional[str] = None + + type: Optional[Literal["blob"]] = None + + +class DocumentDocumentDocumentChildToDoChildCode(BaseModel): + text: str + + id: Optional[str] = None + + language: Optional[str] = None + + type: Optional[Literal["code"]] = None + + +class DocumentDocumentDocumentChildToDoChildComment(BaseModel): + text: str + + id: Optional[str] = None + + created_at: Optional[datetime] = None + + type: Optional[Literal["comment"]] = None + + +class DocumentDocumentDocumentChildToDoChildDivider(BaseModel): + id: Optional[str] = None + + type: Optional[Literal["divider"]] = None + + +class DocumentDocumentDocumentChildToDoChildImage(BaseModel): + src: str + + text: str + + id: Optional[str] = None + + type: Optional[Literal["image"]] = None + + +class DocumentDocumentDocumentChildToDoChildLink(BaseModel): + text: str + + url: str + + id: Optional[str] = None + + type: Optional[Literal["link"]] = None + + +class DocumentDocumentDocumentChildToDoChildLineBreak(BaseModel): + id: Optional[str] = None + + type: Optional[Literal["line_break"]] = None + + +class DocumentDocumentDocumentChildToDoChildText(BaseModel): + text: str + + id: Optional[str] = None + + marks: Optional[List[Literal["bold", "italic", "underline", "strikethrough", "code", "math"]]] = None + + type: Optional[Literal["text"]] = None + + +class DocumentDocumentDocumentChildToDoChildToolCall(BaseModel): + """A tool/function call made by the assistant.""" + + tool_call_id: str + + tool_name: str + + id: Optional[str] = None + + args: Optional[Dict[str, object]] = None + + type: Optional[Literal["tool_call"]] = None + + +class DocumentDocumentDocumentChildToDoChildToolResult(BaseModel): + """The result of a tool call.""" + + output: Union[str, Dict[str, object], List[object]] + + tool_call_id: str + + tool_name: str + + id: Optional[str] = None + + is_error: Optional[bool] = None + + type: Optional[Literal["tool_result"]] = None + + +class DocumentDocumentDocumentChildToDoChildTraceMessage(BaseModel): + """A message in an agent trace (user message, assistant message, or thinking).""" + + text: str + + id: Optional[str] = None + + message_type: Optional[Literal["message", "thinking"]] = None + + role: Optional[Literal["user", "assistant"]] = None + + timestamp: Optional[datetime] = None + + type: Optional[Literal["trace_message"]] = None + + +DocumentDocumentDocumentChildToDoChild: TypeAlias = Union[ + DocumentDocumentDocumentChildToDoChildBlob, + DocumentDocumentDocumentChildToDoChildCode, + DocumentDocumentDocumentChildToDoChildComment, + DocumentDocumentDocumentChildToDoChildDivider, + DocumentDocumentDocumentChildToDoChildImage, + DocumentDocumentDocumentChildToDoChildLink, + DocumentDocumentDocumentChildToDoChildLineBreak, + DocumentDocumentDocumentChildToDoChildText, + DocumentDocumentDocumentChildToDoChildToolCall, + DocumentDocumentDocumentChildToDoChildToolResult, + DocumentDocumentDocumentChildToDoChildTraceMessage, + object, +] + + +class DocumentDocumentDocumentChildToDo(BaseModel): + id: Optional[str] = None + + checked: Optional[bool] = None + + children: Optional[List[DocumentDocumentDocumentChildToDoChild]] = None + + text: Optional[str] = None + + type: Optional[Literal["todo"]] = None + + +class DocumentDocumentDocumentChildToolCall(BaseModel): + """A tool/function call made by the assistant.""" + + tool_call_id: str + + tool_name: str + + id: Optional[str] = None + + args: Optional[Dict[str, object]] = None + + type: Optional[Literal["tool_call"]] = None + + +class DocumentDocumentDocumentChildToolResult(BaseModel): + """The result of a tool call.""" + + output: Union[str, Dict[str, object], List[object]] + + tool_call_id: str + + tool_name: str + + id: Optional[str] = None + + is_error: Optional[bool] = None + + type: Optional[Literal["tool_result"]] = None + + +class DocumentDocumentDocumentChildTraceMessage(BaseModel): + """A message in an agent trace (user message, assistant message, or thinking).""" + + text: str + + id: Optional[str] = None + + message_type: Optional[Literal["message", "thinking"]] = None + + role: Optional[Literal["user", "assistant"]] = None + + timestamp: Optional[datetime] = None + + type: Optional[Literal["trace_message"]] = None + + +class DocumentDocumentDocumentChildUtterance(BaseModel): + """A speaker-attributed segment of a transcript (ENG-2476/D10). + + "Utterance" is the standard name for this across transcription providers + (AssemblyAI, Deepgram, Rev). Timestamps are relative offsets in seconds — + provider-native; absolute times derive from `Transcript.started_at`. + """ + + text: str + + id: Optional[str] = None + + end: Optional[float] = None + + speaker: Optional[object] = None + + start: Optional[float] = None + + type: Optional[Literal["utterance"]] = None + + +DocumentDocumentDocumentChild: TypeAlias = Annotated[ + Union[ + DocumentDocumentDocumentChildBlob, + DocumentDocumentDocumentChildCallout, + DocumentDocumentDocumentChildChunk, + DocumentDocumentDocumentChildCode, + DocumentDocumentDocumentChildComment, + DocumentDocumentDocumentChildDivider, + DocumentDocumentDocumentChildEquation, + DocumentDocumentDocumentChildFootnote, + DocumentDocumentDocumentChildHeading, + DocumentDocumentDocumentChildImage, + DocumentDocumentDocumentChildLink, + DocumentDocumentDocumentChildLineBreak, + DocumentDocumentDocumentChildList, + DocumentDocumentDocumentChildListItem, + DocumentDocumentDocumentChildParagraph, + DocumentDocumentDocumentChildQuote, + DocumentDocumentDocumentChildTable, + DocumentDocumentDocumentChildTableCell, + DocumentDocumentDocumentChildTableRow, + DocumentDocumentDocumentChildText, + DocumentDocumentDocumentChildToDo, + DocumentDocumentDocumentChildToolCall, + DocumentDocumentDocumentChildToolResult, + DocumentDocumentDocumentChildTraceMessage, + DocumentDocumentDocumentChildUtterance, + ], + PropertyInfo(discriminator="type"), +] + + +class DocumentDocumentDocument(BaseModel): + id: Optional[str] = None + + children: Optional[List[DocumentDocumentDocumentChild]] = None + + text: Optional[str] = None + + title: Optional[str] = None + + type: Optional[Literal["document"]] = None + + +class DocumentDocumentWebsiteChildBlob(BaseModel): + """Represents embedded binary data using data URI scheme. + + Format: data:[][;base64], + Example: data:text/html;base64,PGh0bWw+... + """ + + data: str + + mimetype: str + + id: Optional[str] = None + + type: Optional[Literal["blob"]] = None + + +class DocumentDocumentWebsiteChildCalloutChildBlob(BaseModel): + """Represents embedded binary data using data URI scheme. + + Format: data:[][;base64], + Example: data:text/html;base64,PGh0bWw+... + """ + + data: str + + mimetype: str + + id: Optional[str] = None + + type: Optional[Literal["blob"]] = None + + +class DocumentDocumentWebsiteChildCalloutChildCode(BaseModel): + text: str + + id: Optional[str] = None + + language: Optional[str] = None + + type: Optional[Literal["code"]] = None + + +class DocumentDocumentWebsiteChildCalloutChildComment(BaseModel): + text: str + + id: Optional[str] = None + + created_at: Optional[datetime] = None + + type: Optional[Literal["comment"]] = None + + +class DocumentDocumentWebsiteChildCalloutChildDivider(BaseModel): + id: Optional[str] = None + + type: Optional[Literal["divider"]] = None + + +class DocumentDocumentWebsiteChildCalloutChildImage(BaseModel): + src: str + + text: str + + id: Optional[str] = None + + type: Optional[Literal["image"]] = None + + +class DocumentDocumentWebsiteChildCalloutChildLink(BaseModel): + text: str + + url: str + + id: Optional[str] = None + + type: Optional[Literal["link"]] = None + + +class DocumentDocumentWebsiteChildCalloutChildLineBreak(BaseModel): + id: Optional[str] = None + + type: Optional[Literal["line_break"]] = None + + +class DocumentDocumentWebsiteChildCalloutChildText(BaseModel): + text: str + + id: Optional[str] = None + + marks: Optional[List[Literal["bold", "italic", "underline", "strikethrough", "code", "math"]]] = None + + type: Optional[Literal["text"]] = None + + +class DocumentDocumentWebsiteChildCalloutChildToolCall(BaseModel): + """A tool/function call made by the assistant.""" + + tool_call_id: str + + tool_name: str + + id: Optional[str] = None + + args: Optional[Dict[str, object]] = None + + type: Optional[Literal["tool_call"]] = None + + +class DocumentDocumentWebsiteChildCalloutChildToolResult(BaseModel): + """The result of a tool call.""" + + output: Union[str, Dict[str, object], List[object]] + + tool_call_id: str + + tool_name: str + + id: Optional[str] = None + + is_error: Optional[bool] = None + + type: Optional[Literal["tool_result"]] = None + + +class DocumentDocumentWebsiteChildCalloutChildTraceMessage(BaseModel): + """A message in an agent trace (user message, assistant message, or thinking).""" + + text: str + + id: Optional[str] = None + + message_type: Optional[Literal["message", "thinking"]] = None + + role: Optional[Literal["user", "assistant"]] = None + + timestamp: Optional[datetime] = None + + type: Optional[Literal["trace_message"]] = None + + +DocumentDocumentWebsiteChildCalloutChild: TypeAlias = Union[ + DocumentDocumentWebsiteChildCalloutChildBlob, + DocumentDocumentWebsiteChildCalloutChildCode, + DocumentDocumentWebsiteChildCalloutChildComment, + DocumentDocumentWebsiteChildCalloutChildDivider, + DocumentDocumentWebsiteChildCalloutChildImage, + DocumentDocumentWebsiteChildCalloutChildLink, + DocumentDocumentWebsiteChildCalloutChildLineBreak, + DocumentDocumentWebsiteChildCalloutChildText, + DocumentDocumentWebsiteChildCalloutChildToolCall, + DocumentDocumentWebsiteChildCalloutChildToolResult, + DocumentDocumentWebsiteChildCalloutChildTraceMessage, + object, +] + + +class DocumentDocumentWebsiteChildCallout(BaseModel): + id: Optional[str] = None + + children: Optional[List[DocumentDocumentWebsiteChildCalloutChild]] = None + + text: Optional[str] = None + + title: Optional[str] = None + + type: Optional[Literal["callout"]] = None + + +class DocumentDocumentWebsiteChildChunkChildBlob(BaseModel): + """Represents embedded binary data using data URI scheme. + + Format: data:[][;base64], + Example: data:text/html;base64,PGh0bWw+... + """ + + data: str + + mimetype: str + + id: Optional[str] = None + + type: Optional[Literal["blob"]] = None + + +class DocumentDocumentWebsiteChildChunkChildCode(BaseModel): + text: str + + id: Optional[str] = None + + language: Optional[str] = None + + type: Optional[Literal["code"]] = None + + +class DocumentDocumentWebsiteChildChunkChildComment(BaseModel): + text: str + + id: Optional[str] = None + + created_at: Optional[datetime] = None + + type: Optional[Literal["comment"]] = None + + +class DocumentDocumentWebsiteChildChunkChildDivider(BaseModel): + id: Optional[str] = None + + type: Optional[Literal["divider"]] = None + + +class DocumentDocumentWebsiteChildChunkChildImage(BaseModel): + src: str + + text: str + + id: Optional[str] = None + + type: Optional[Literal["image"]] = None + + +class DocumentDocumentWebsiteChildChunkChildLink(BaseModel): + text: str + + url: str + + id: Optional[str] = None + + type: Optional[Literal["link"]] = None + + +class DocumentDocumentWebsiteChildChunkChildLineBreak(BaseModel): + id: Optional[str] = None + + type: Optional[Literal["line_break"]] = None + + +class DocumentDocumentWebsiteChildChunkChildText(BaseModel): + text: str + + id: Optional[str] = None + + marks: Optional[List[Literal["bold", "italic", "underline", "strikethrough", "code", "math"]]] = None + + type: Optional[Literal["text"]] = None + + +class DocumentDocumentWebsiteChildChunkChildToolCall(BaseModel): + """A tool/function call made by the assistant.""" + + tool_call_id: str + + tool_name: str + + id: Optional[str] = None + + args: Optional[Dict[str, object]] = None + + type: Optional[Literal["tool_call"]] = None + + +class DocumentDocumentWebsiteChildChunkChildToolResult(BaseModel): + """The result of a tool call.""" + + output: Union[str, Dict[str, object], List[object]] + + tool_call_id: str + + tool_name: str + + id: Optional[str] = None + + is_error: Optional[bool] = None + + type: Optional[Literal["tool_result"]] = None + + +class DocumentDocumentWebsiteChildChunkChildTraceMessage(BaseModel): + """A message in an agent trace (user message, assistant message, or thinking).""" + + text: str + + id: Optional[str] = None + + message_type: Optional[Literal["message", "thinking"]] = None + + role: Optional[Literal["user", "assistant"]] = None + + timestamp: Optional[datetime] = None + + type: Optional[Literal["trace_message"]] = None + + +DocumentDocumentWebsiteChildChunkChild: TypeAlias = Union[ + DocumentDocumentWebsiteChildChunkChildBlob, + DocumentDocumentWebsiteChildChunkChildCode, + DocumentDocumentWebsiteChildChunkChildComment, + DocumentDocumentWebsiteChildChunkChildDivider, + DocumentDocumentWebsiteChildChunkChildImage, + DocumentDocumentWebsiteChildChunkChildLink, + DocumentDocumentWebsiteChildChunkChildLineBreak, + DocumentDocumentWebsiteChildChunkChildText, + DocumentDocumentWebsiteChildChunkChildToolCall, + DocumentDocumentWebsiteChildChunkChildToolResult, + DocumentDocumentWebsiteChildChunkChildTraceMessage, + object, +] + + +class DocumentDocumentWebsiteChildChunk(BaseModel): + id: Optional[str] = None + + children: Optional[List[DocumentDocumentWebsiteChildChunkChild]] = None + + text: Optional[str] = None + + type: Optional[Literal["chunk"]] = None + + +class DocumentDocumentWebsiteChildCode(BaseModel): + text: str + + id: Optional[str] = None + + language: Optional[str] = None + + type: Optional[Literal["code"]] = None + + +class DocumentDocumentWebsiteChildComment(BaseModel): + text: str + + id: Optional[str] = None + + created_at: Optional[datetime] = None + + type: Optional[Literal["comment"]] = None + + +class DocumentDocumentWebsiteChildDivider(BaseModel): + id: Optional[str] = None + + type: Optional[Literal["divider"]] = None + + +class DocumentDocumentWebsiteChildEquationChildBlob(BaseModel): + """Represents embedded binary data using data URI scheme. + + Format: data:[][;base64], + Example: data:text/html;base64,PGh0bWw+... + """ + + data: str + + mimetype: str + + id: Optional[str] = None + + type: Optional[Literal["blob"]] = None + + +class DocumentDocumentWebsiteChildEquationChildCode(BaseModel): + text: str + + id: Optional[str] = None + + language: Optional[str] = None + + type: Optional[Literal["code"]] = None + + +class DocumentDocumentWebsiteChildEquationChildComment(BaseModel): + text: str + + id: Optional[str] = None + + created_at: Optional[datetime] = None + + type: Optional[Literal["comment"]] = None + + +class DocumentDocumentWebsiteChildEquationChildDivider(BaseModel): + id: Optional[str] = None + + type: Optional[Literal["divider"]] = None + + +class DocumentDocumentWebsiteChildEquationChildImage(BaseModel): + src: str + + text: str + + id: Optional[str] = None + + type: Optional[Literal["image"]] = None + + +class DocumentDocumentWebsiteChildEquationChildLink(BaseModel): + text: str + + url: str + + id: Optional[str] = None + + type: Optional[Literal["link"]] = None + + +class DocumentDocumentWebsiteChildEquationChildLineBreak(BaseModel): + id: Optional[str] = None + + type: Optional[Literal["line_break"]] = None + + +class DocumentDocumentWebsiteChildEquationChildText(BaseModel): + text: str + + id: Optional[str] = None + + marks: Optional[List[Literal["bold", "italic", "underline", "strikethrough", "code", "math"]]] = None + + type: Optional[Literal["text"]] = None + + +class DocumentDocumentWebsiteChildEquationChildToolCall(BaseModel): + """A tool/function call made by the assistant.""" + + tool_call_id: str + + tool_name: str + + id: Optional[str] = None + + args: Optional[Dict[str, object]] = None + + type: Optional[Literal["tool_call"]] = None + + +class DocumentDocumentWebsiteChildEquationChildToolResult(BaseModel): + """The result of a tool call.""" + + output: Union[str, Dict[str, object], List[object]] + + tool_call_id: str + + tool_name: str + + id: Optional[str] = None + + is_error: Optional[bool] = None + + type: Optional[Literal["tool_result"]] = None + + +class DocumentDocumentWebsiteChildEquationChildTraceMessage(BaseModel): + """A message in an agent trace (user message, assistant message, or thinking).""" + + text: str + + id: Optional[str] = None + + message_type: Optional[Literal["message", "thinking"]] = None + + role: Optional[Literal["user", "assistant"]] = None + + timestamp: Optional[datetime] = None + + type: Optional[Literal["trace_message"]] = None + + +DocumentDocumentWebsiteChildEquationChild: TypeAlias = Union[ + DocumentDocumentWebsiteChildEquationChildBlob, + DocumentDocumentWebsiteChildEquationChildCode, + DocumentDocumentWebsiteChildEquationChildComment, + DocumentDocumentWebsiteChildEquationChildDivider, + DocumentDocumentWebsiteChildEquationChildImage, + DocumentDocumentWebsiteChildEquationChildLink, + DocumentDocumentWebsiteChildEquationChildLineBreak, + DocumentDocumentWebsiteChildEquationChildText, + DocumentDocumentWebsiteChildEquationChildToolCall, + DocumentDocumentWebsiteChildEquationChildToolResult, + DocumentDocumentWebsiteChildEquationChildTraceMessage, + object, +] + + +class DocumentDocumentWebsiteChildEquation(BaseModel): + id: Optional[str] = None + + children: Optional[List[DocumentDocumentWebsiteChildEquationChild]] = None + + text: Optional[str] = None + + type: Optional[Literal["equation"]] = None + + +class DocumentDocumentWebsiteChildFootnoteChildBlob(BaseModel): + """Represents embedded binary data using data URI scheme. + + Format: data:[][;base64], + Example: data:text/html;base64,PGh0bWw+... + """ + + data: str + + mimetype: str + + id: Optional[str] = None + + type: Optional[Literal["blob"]] = None + + +class DocumentDocumentWebsiteChildFootnoteChildCode(BaseModel): + text: str + + id: Optional[str] = None + + language: Optional[str] = None + + type: Optional[Literal["code"]] = None + + +class DocumentDocumentWebsiteChildFootnoteChildComment(BaseModel): + text: str + + id: Optional[str] = None + + created_at: Optional[datetime] = None + + type: Optional[Literal["comment"]] = None + + +class DocumentDocumentWebsiteChildFootnoteChildDivider(BaseModel): + id: Optional[str] = None + + type: Optional[Literal["divider"]] = None + + +class DocumentDocumentWebsiteChildFootnoteChildImage(BaseModel): + src: str + + text: str + + id: Optional[str] = None + + type: Optional[Literal["image"]] = None + + +class DocumentDocumentWebsiteChildFootnoteChildLink(BaseModel): + text: str + + url: str + + id: Optional[str] = None + + type: Optional[Literal["link"]] = None + + +class DocumentDocumentWebsiteChildFootnoteChildLineBreak(BaseModel): + id: Optional[str] = None + + type: Optional[Literal["line_break"]] = None + + +class DocumentDocumentWebsiteChildFootnoteChildText(BaseModel): + text: str + + id: Optional[str] = None + + marks: Optional[List[Literal["bold", "italic", "underline", "strikethrough", "code", "math"]]] = None + + type: Optional[Literal["text"]] = None + + +class DocumentDocumentWebsiteChildFootnoteChildToolCall(BaseModel): + """A tool/function call made by the assistant.""" + + tool_call_id: str + + tool_name: str + + id: Optional[str] = None + + args: Optional[Dict[str, object]] = None + + type: Optional[Literal["tool_call"]] = None + + +class DocumentDocumentWebsiteChildFootnoteChildToolResult(BaseModel): + """The result of a tool call.""" + + output: Union[str, Dict[str, object], List[object]] + + tool_call_id: str + + tool_name: str + + id: Optional[str] = None + + is_error: Optional[bool] = None + + type: Optional[Literal["tool_result"]] = None + + +class DocumentDocumentWebsiteChildFootnoteChildTraceMessage(BaseModel): + """A message in an agent trace (user message, assistant message, or thinking).""" + + text: str + + id: Optional[str] = None + + message_type: Optional[Literal["message", "thinking"]] = None + + role: Optional[Literal["user", "assistant"]] = None + + timestamp: Optional[datetime] = None + + type: Optional[Literal["trace_message"]] = None + + +DocumentDocumentWebsiteChildFootnoteChild: TypeAlias = Union[ + DocumentDocumentWebsiteChildFootnoteChildBlob, + DocumentDocumentWebsiteChildFootnoteChildCode, + DocumentDocumentWebsiteChildFootnoteChildComment, + DocumentDocumentWebsiteChildFootnoteChildDivider, + DocumentDocumentWebsiteChildFootnoteChildImage, + DocumentDocumentWebsiteChildFootnoteChildLink, + DocumentDocumentWebsiteChildFootnoteChildLineBreak, + DocumentDocumentWebsiteChildFootnoteChildText, + DocumentDocumentWebsiteChildFootnoteChildToolCall, + DocumentDocumentWebsiteChildFootnoteChildToolResult, + DocumentDocumentWebsiteChildFootnoteChildTraceMessage, + object, +] + + +class DocumentDocumentWebsiteChildFootnote(BaseModel): + id: Optional[str] = None + + children: Optional[List[DocumentDocumentWebsiteChildFootnoteChild]] = None + + text: Optional[str] = None + + type: Optional[Literal["footnote"]] = None + + +class DocumentDocumentWebsiteChildHeadingChildBlob(BaseModel): + """Represents embedded binary data using data URI scheme. + + Format: data:[][;base64], + Example: data:text/html;base64,PGh0bWw+... + """ + + data: str + + mimetype: str + + id: Optional[str] = None + + type: Optional[Literal["blob"]] = None + + +class DocumentDocumentWebsiteChildHeadingChildCode(BaseModel): + text: str + + id: Optional[str] = None + + language: Optional[str] = None + + type: Optional[Literal["code"]] = None + + +class DocumentDocumentWebsiteChildHeadingChildComment(BaseModel): + text: str + + id: Optional[str] = None + + created_at: Optional[datetime] = None + + type: Optional[Literal["comment"]] = None + + +class DocumentDocumentWebsiteChildHeadingChildDivider(BaseModel): + id: Optional[str] = None + + type: Optional[Literal["divider"]] = None + + +class DocumentDocumentWebsiteChildHeadingChildImage(BaseModel): + src: str + + text: str + + id: Optional[str] = None + + type: Optional[Literal["image"]] = None + + +class DocumentDocumentWebsiteChildHeadingChildLink(BaseModel): + text: str + + url: str + + id: Optional[str] = None + + type: Optional[Literal["link"]] = None + + +class DocumentDocumentWebsiteChildHeadingChildLineBreak(BaseModel): + id: Optional[str] = None + + type: Optional[Literal["line_break"]] = None + + +class DocumentDocumentWebsiteChildHeadingChildText(BaseModel): + text: str + + id: Optional[str] = None + + marks: Optional[List[Literal["bold", "italic", "underline", "strikethrough", "code", "math"]]] = None + + type: Optional[Literal["text"]] = None + + +class DocumentDocumentWebsiteChildHeadingChildToolCall(BaseModel): + """A tool/function call made by the assistant.""" + + tool_call_id: str + + tool_name: str + + id: Optional[str] = None + + args: Optional[Dict[str, object]] = None + + type: Optional[Literal["tool_call"]] = None + + +class DocumentDocumentWebsiteChildHeadingChildToolResult(BaseModel): + """The result of a tool call.""" + + output: Union[str, Dict[str, object], List[object]] + + tool_call_id: str + + tool_name: str + + id: Optional[str] = None + + is_error: Optional[bool] = None + + type: Optional[Literal["tool_result"]] = None + + +class DocumentDocumentWebsiteChildHeadingChildTraceMessage(BaseModel): + """A message in an agent trace (user message, assistant message, or thinking).""" + + text: str + + id: Optional[str] = None + + message_type: Optional[Literal["message", "thinking"]] = None + + role: Optional[Literal["user", "assistant"]] = None + + timestamp: Optional[datetime] = None + + type: Optional[Literal["trace_message"]] = None + + +DocumentDocumentWebsiteChildHeadingChild: TypeAlias = Union[ + DocumentDocumentWebsiteChildHeadingChildBlob, + DocumentDocumentWebsiteChildHeadingChildCode, + DocumentDocumentWebsiteChildHeadingChildComment, + DocumentDocumentWebsiteChildHeadingChildDivider, + DocumentDocumentWebsiteChildHeadingChildImage, + DocumentDocumentWebsiteChildHeadingChildLink, + DocumentDocumentWebsiteChildHeadingChildLineBreak, + DocumentDocumentWebsiteChildHeadingChildText, + DocumentDocumentWebsiteChildHeadingChildToolCall, + DocumentDocumentWebsiteChildHeadingChildToolResult, + DocumentDocumentWebsiteChildHeadingChildTraceMessage, + object, +] + + +class DocumentDocumentWebsiteChildHeading(BaseModel): + level: int + + id: Optional[str] = None + + children: Optional[List[DocumentDocumentWebsiteChildHeadingChild]] = None + + text: Optional[str] = None + + type: Optional[Literal["heading"]] = None + + +class DocumentDocumentWebsiteChildImage(BaseModel): + src: str + + text: str + + id: Optional[str] = None + + type: Optional[Literal["image"]] = None + + +class DocumentDocumentWebsiteChildLink(BaseModel): + text: str + + url: str + + id: Optional[str] = None + + type: Optional[Literal["link"]] = None + + +class DocumentDocumentWebsiteChildLineBreak(BaseModel): + id: Optional[str] = None + + type: Optional[Literal["line_break"]] = None + + +class DocumentDocumentWebsiteChildList(BaseModel): + id: Optional[str] = None + + children: Optional[List[object]] = None + + ordered: Optional[bool] = None + + text: Optional[str] = None + + type: Optional[Literal["list"]] = None + + +class DocumentDocumentWebsiteChildListItemChildBlob(BaseModel): + """Represents embedded binary data using data URI scheme. + + Format: data:[][;base64], + Example: data:text/html;base64,PGh0bWw+... + """ + + data: str + + mimetype: str + + id: Optional[str] = None + + type: Optional[Literal["blob"]] = None + + +class DocumentDocumentWebsiteChildListItemChildCode(BaseModel): + text: str + + id: Optional[str] = None + + language: Optional[str] = None + + type: Optional[Literal["code"]] = None + + +class DocumentDocumentWebsiteChildListItemChildComment(BaseModel): + text: str + + id: Optional[str] = None + + created_at: Optional[datetime] = None + + type: Optional[Literal["comment"]] = None + + +class DocumentDocumentWebsiteChildListItemChildDivider(BaseModel): + id: Optional[str] = None + + type: Optional[Literal["divider"]] = None + + +class DocumentDocumentWebsiteChildListItemChildImage(BaseModel): + src: str + + text: str + + id: Optional[str] = None + + type: Optional[Literal["image"]] = None + + +class DocumentDocumentWebsiteChildListItemChildLink(BaseModel): + text: str + + url: str + + id: Optional[str] = None + + type: Optional[Literal["link"]] = None + + +class DocumentDocumentWebsiteChildListItemChildLineBreak(BaseModel): + id: Optional[str] = None + + type: Optional[Literal["line_break"]] = None + + +class DocumentDocumentWebsiteChildListItemChildText(BaseModel): + text: str + + id: Optional[str] = None + + marks: Optional[List[Literal["bold", "italic", "underline", "strikethrough", "code", "math"]]] = None + + type: Optional[Literal["text"]] = None + + +class DocumentDocumentWebsiteChildListItemChildToolCall(BaseModel): + """A tool/function call made by the assistant.""" + + tool_call_id: str + + tool_name: str + + id: Optional[str] = None + + args: Optional[Dict[str, object]] = None + + type: Optional[Literal["tool_call"]] = None + + +class DocumentDocumentWebsiteChildListItemChildToolResult(BaseModel): + """The result of a tool call.""" + + output: Union[str, Dict[str, object], List[object]] + + tool_call_id: str + + tool_name: str + + id: Optional[str] = None + + is_error: Optional[bool] = None + + type: Optional[Literal["tool_result"]] = None + + +class DocumentDocumentWebsiteChildListItemChildTraceMessage(BaseModel): + """A message in an agent trace (user message, assistant message, or thinking).""" + + text: str + + id: Optional[str] = None + + message_type: Optional[Literal["message", "thinking"]] = None + + role: Optional[Literal["user", "assistant"]] = None + + timestamp: Optional[datetime] = None + + type: Optional[Literal["trace_message"]] = None + + +DocumentDocumentWebsiteChildListItemChild: TypeAlias = Union[ + DocumentDocumentWebsiteChildListItemChildBlob, + DocumentDocumentWebsiteChildListItemChildCode, + DocumentDocumentWebsiteChildListItemChildComment, + DocumentDocumentWebsiteChildListItemChildDivider, + DocumentDocumentWebsiteChildListItemChildImage, + DocumentDocumentWebsiteChildListItemChildLink, + DocumentDocumentWebsiteChildListItemChildLineBreak, + DocumentDocumentWebsiteChildListItemChildText, + DocumentDocumentWebsiteChildListItemChildToolCall, + DocumentDocumentWebsiteChildListItemChildToolResult, + DocumentDocumentWebsiteChildListItemChildTraceMessage, + object, +] + + +class DocumentDocumentWebsiteChildListItem(BaseModel): + id: Optional[str] = None + + children: Optional[List[DocumentDocumentWebsiteChildListItemChild]] = None + + text: Optional[str] = None + + type: Optional[Literal["list_item"]] = None + + +class DocumentDocumentWebsiteChildParagraphChildBlob(BaseModel): + """Represents embedded binary data using data URI scheme. + + Format: data:[][;base64], + Example: data:text/html;base64,PGh0bWw+... + """ + + data: str + + mimetype: str + + id: Optional[str] = None + + type: Optional[Literal["blob"]] = None + + +class DocumentDocumentWebsiteChildParagraphChildCode(BaseModel): + text: str + + id: Optional[str] = None + + language: Optional[str] = None + + type: Optional[Literal["code"]] = None + + +class DocumentDocumentWebsiteChildParagraphChildComment(BaseModel): + text: str + + id: Optional[str] = None + + created_at: Optional[datetime] = None + + type: Optional[Literal["comment"]] = None + + +class DocumentDocumentWebsiteChildParagraphChildDivider(BaseModel): + id: Optional[str] = None + + type: Optional[Literal["divider"]] = None + + +class DocumentDocumentWebsiteChildParagraphChildImage(BaseModel): + src: str + + text: str + + id: Optional[str] = None + + type: Optional[Literal["image"]] = None + + +class DocumentDocumentWebsiteChildParagraphChildLink(BaseModel): + text: str + + url: str + + id: Optional[str] = None + + type: Optional[Literal["link"]] = None + + +class DocumentDocumentWebsiteChildParagraphChildLineBreak(BaseModel): + id: Optional[str] = None + + type: Optional[Literal["line_break"]] = None + + +class DocumentDocumentWebsiteChildParagraphChildText(BaseModel): + text: str + + id: Optional[str] = None + + marks: Optional[List[Literal["bold", "italic", "underline", "strikethrough", "code", "math"]]] = None + + type: Optional[Literal["text"]] = None + + +class DocumentDocumentWebsiteChildParagraphChildToolCall(BaseModel): + """A tool/function call made by the assistant.""" + + tool_call_id: str + + tool_name: str + + id: Optional[str] = None + + args: Optional[Dict[str, object]] = None + + type: Optional[Literal["tool_call"]] = None + + +class DocumentDocumentWebsiteChildParagraphChildToolResult(BaseModel): + """The result of a tool call.""" + + output: Union[str, Dict[str, object], List[object]] + + tool_call_id: str + + tool_name: str + + id: Optional[str] = None + + is_error: Optional[bool] = None + + type: Optional[Literal["tool_result"]] = None + + +class DocumentDocumentWebsiteChildParagraphChildTraceMessage(BaseModel): + """A message in an agent trace (user message, assistant message, or thinking).""" + + text: str + + id: Optional[str] = None + + message_type: Optional[Literal["message", "thinking"]] = None + + role: Optional[Literal["user", "assistant"]] = None + + timestamp: Optional[datetime] = None + + type: Optional[Literal["trace_message"]] = None + + +DocumentDocumentWebsiteChildParagraphChild: TypeAlias = Union[ + DocumentDocumentWebsiteChildParagraphChildBlob, + DocumentDocumentWebsiteChildParagraphChildCode, + DocumentDocumentWebsiteChildParagraphChildComment, + DocumentDocumentWebsiteChildParagraphChildDivider, + DocumentDocumentWebsiteChildParagraphChildImage, + DocumentDocumentWebsiteChildParagraphChildLink, + DocumentDocumentWebsiteChildParagraphChildLineBreak, + DocumentDocumentWebsiteChildParagraphChildText, + DocumentDocumentWebsiteChildParagraphChildToolCall, + DocumentDocumentWebsiteChildParagraphChildToolResult, + DocumentDocumentWebsiteChildParagraphChildTraceMessage, + object, +] + + +class DocumentDocumentWebsiteChildParagraph(BaseModel): + id: Optional[str] = None + + children: Optional[List[DocumentDocumentWebsiteChildParagraphChild]] = None + + text: Optional[str] = None + + type: Optional[Literal["paragraph"]] = None + + +class DocumentDocumentWebsiteChildQuoteChildBlob(BaseModel): + """Represents embedded binary data using data URI scheme. + + Format: data:[][;base64], + Example: data:text/html;base64,PGh0bWw+... + """ + + data: str + + mimetype: str + + id: Optional[str] = None + + type: Optional[Literal["blob"]] = None + + +class DocumentDocumentWebsiteChildQuoteChildCode(BaseModel): + text: str + + id: Optional[str] = None + + language: Optional[str] = None + + type: Optional[Literal["code"]] = None + + +class DocumentDocumentWebsiteChildQuoteChildComment(BaseModel): + text: str + + id: Optional[str] = None + + created_at: Optional[datetime] = None + + type: Optional[Literal["comment"]] = None + + +class DocumentDocumentWebsiteChildQuoteChildDivider(BaseModel): + id: Optional[str] = None + + type: Optional[Literal["divider"]] = None + + +class DocumentDocumentWebsiteChildQuoteChildImage(BaseModel): + src: str + + text: str + + id: Optional[str] = None + + type: Optional[Literal["image"]] = None + + +class DocumentDocumentWebsiteChildQuoteChildLink(BaseModel): + text: str + + url: str + + id: Optional[str] = None + + type: Optional[Literal["link"]] = None + + +class DocumentDocumentWebsiteChildQuoteChildLineBreak(BaseModel): + id: Optional[str] = None + + type: Optional[Literal["line_break"]] = None + + +class DocumentDocumentWebsiteChildQuoteChildText(BaseModel): + text: str + + id: Optional[str] = None + + marks: Optional[List[Literal["bold", "italic", "underline", "strikethrough", "code", "math"]]] = None + + type: Optional[Literal["text"]] = None + + +class DocumentDocumentWebsiteChildQuoteChildToolCall(BaseModel): + """A tool/function call made by the assistant.""" + + tool_call_id: str + + tool_name: str + + id: Optional[str] = None + + args: Optional[Dict[str, object]] = None + + type: Optional[Literal["tool_call"]] = None + + +class DocumentDocumentWebsiteChildQuoteChildToolResult(BaseModel): + """The result of a tool call.""" + + output: Union[str, Dict[str, object], List[object]] + + tool_call_id: str + + tool_name: str + + id: Optional[str] = None + + is_error: Optional[bool] = None + + type: Optional[Literal["tool_result"]] = None + + +class DocumentDocumentWebsiteChildQuoteChildTraceMessage(BaseModel): + """A message in an agent trace (user message, assistant message, or thinking).""" + + text: str + + id: Optional[str] = None + + message_type: Optional[Literal["message", "thinking"]] = None + + role: Optional[Literal["user", "assistant"]] = None + + timestamp: Optional[datetime] = None + + type: Optional[Literal["trace_message"]] = None + + +DocumentDocumentWebsiteChildQuoteChild: TypeAlias = Union[ + DocumentDocumentWebsiteChildQuoteChildBlob, + DocumentDocumentWebsiteChildQuoteChildCode, + DocumentDocumentWebsiteChildQuoteChildComment, + DocumentDocumentWebsiteChildQuoteChildDivider, + DocumentDocumentWebsiteChildQuoteChildImage, + DocumentDocumentWebsiteChildQuoteChildLink, + DocumentDocumentWebsiteChildQuoteChildLineBreak, + DocumentDocumentWebsiteChildQuoteChildText, + DocumentDocumentWebsiteChildQuoteChildToolCall, + DocumentDocumentWebsiteChildQuoteChildToolResult, + DocumentDocumentWebsiteChildQuoteChildTraceMessage, + object, +] + + +class DocumentDocumentWebsiteChildQuote(BaseModel): + id: Optional[str] = None + + children: Optional[List[DocumentDocumentWebsiteChildQuoteChild]] = None + + text: Optional[str] = None + + type: Optional[Literal["quote"]] = None + + +class DocumentDocumentWebsiteChildTable(BaseModel): + id: Optional[str] = None + + children: Optional[List[object]] = None + + has_header: Optional[bool] = None + """Whether the first row should be treated as a header""" + + text: Optional[str] = None + + type: Optional[Literal["table"]] = None + + +class DocumentDocumentWebsiteChildTableCellChildBlob(BaseModel): + """Represents embedded binary data using data URI scheme. + + Format: data:[][;base64], + Example: data:text/html;base64,PGh0bWw+... + """ + + data: str + + mimetype: str + + id: Optional[str] = None + + type: Optional[Literal["blob"]] = None + + +class DocumentDocumentWebsiteChildTableCellChildCode(BaseModel): + text: str + + id: Optional[str] = None + + language: Optional[str] = None + + type: Optional[Literal["code"]] = None + + +class DocumentDocumentWebsiteChildTableCellChildComment(BaseModel): + text: str + + id: Optional[str] = None + + created_at: Optional[datetime] = None + + type: Optional[Literal["comment"]] = None + + +class DocumentDocumentWebsiteChildTableCellChildDivider(BaseModel): + id: Optional[str] = None + + type: Optional[Literal["divider"]] = None + + +class DocumentDocumentWebsiteChildTableCellChildImage(BaseModel): + src: str + + text: str + + id: Optional[str] = None + + type: Optional[Literal["image"]] = None + + +class DocumentDocumentWebsiteChildTableCellChildLink(BaseModel): + text: str + + url: str + + id: Optional[str] = None + + type: Optional[Literal["link"]] = None + + +class DocumentDocumentWebsiteChildTableCellChildLineBreak(BaseModel): + id: Optional[str] = None + + type: Optional[Literal["line_break"]] = None + + +class DocumentDocumentWebsiteChildTableCellChildText(BaseModel): + text: str + + id: Optional[str] = None + + marks: Optional[List[Literal["bold", "italic", "underline", "strikethrough", "code", "math"]]] = None + + type: Optional[Literal["text"]] = None + + +class DocumentDocumentWebsiteChildTableCellChildToolCall(BaseModel): + """A tool/function call made by the assistant.""" + + tool_call_id: str + + tool_name: str + + id: Optional[str] = None + + args: Optional[Dict[str, object]] = None + + type: Optional[Literal["tool_call"]] = None + + +class DocumentDocumentWebsiteChildTableCellChildToolResult(BaseModel): + """The result of a tool call.""" + + output: Union[str, Dict[str, object], List[object]] + + tool_call_id: str + + tool_name: str + + id: Optional[str] = None + + is_error: Optional[bool] = None + + type: Optional[Literal["tool_result"]] = None + + +class DocumentDocumentWebsiteChildTableCellChildTraceMessage(BaseModel): + """A message in an agent trace (user message, assistant message, or thinking).""" + + text: str + + id: Optional[str] = None + + message_type: Optional[Literal["message", "thinking"]] = None + + role: Optional[Literal["user", "assistant"]] = None + + timestamp: Optional[datetime] = None + + type: Optional[Literal["trace_message"]] = None + + +DocumentDocumentWebsiteChildTableCellChild: TypeAlias = Union[ + DocumentDocumentWebsiteChildTableCellChildBlob, + DocumentDocumentWebsiteChildTableCellChildCode, + DocumentDocumentWebsiteChildTableCellChildComment, + DocumentDocumentWebsiteChildTableCellChildDivider, + DocumentDocumentWebsiteChildTableCellChildImage, + DocumentDocumentWebsiteChildTableCellChildLink, + DocumentDocumentWebsiteChildTableCellChildLineBreak, + DocumentDocumentWebsiteChildTableCellChildText, + DocumentDocumentWebsiteChildTableCellChildToolCall, + DocumentDocumentWebsiteChildTableCellChildToolResult, + DocumentDocumentWebsiteChildTableCellChildTraceMessage, + object, +] + + +class DocumentDocumentWebsiteChildTableCell(BaseModel): + id: Optional[str] = None + + align: Optional[Literal["left", "center", "right"]] = None + + children: Optional[List[DocumentDocumentWebsiteChildTableCellChild]] = None + + text: Optional[str] = None + + type: Optional[Literal["table_cell"]] = None + + +class DocumentDocumentWebsiteChildTableRow(BaseModel): + id: Optional[str] = None + + children: Optional[List[object]] = None + + text: Optional[str] = None + + type: Optional[Literal["table_row"]] = None + + +class DocumentDocumentWebsiteChildText(BaseModel): + text: str + + id: Optional[str] = None + + marks: Optional[List[Literal["bold", "italic", "underline", "strikethrough", "code", "math"]]] = None + + type: Optional[Literal["text"]] = None + + +class DocumentDocumentWebsiteChildToDoChildBlob(BaseModel): + """Represents embedded binary data using data URI scheme. + + Format: data:[][;base64], + Example: data:text/html;base64,PGh0bWw+... + """ + + data: str + + mimetype: str + + id: Optional[str] = None + + type: Optional[Literal["blob"]] = None + + +class DocumentDocumentWebsiteChildToDoChildCode(BaseModel): + text: str + + id: Optional[str] = None + + language: Optional[str] = None + + type: Optional[Literal["code"]] = None + + +class DocumentDocumentWebsiteChildToDoChildComment(BaseModel): + text: str + + id: Optional[str] = None + + created_at: Optional[datetime] = None + + type: Optional[Literal["comment"]] = None + + +class DocumentDocumentWebsiteChildToDoChildDivider(BaseModel): + id: Optional[str] = None + + type: Optional[Literal["divider"]] = None + + +class DocumentDocumentWebsiteChildToDoChildImage(BaseModel): + src: str + + text: str + + id: Optional[str] = None + + type: Optional[Literal["image"]] = None + + +class DocumentDocumentWebsiteChildToDoChildLink(BaseModel): + text: str + + url: str + + id: Optional[str] = None + + type: Optional[Literal["link"]] = None + + +class DocumentDocumentWebsiteChildToDoChildLineBreak(BaseModel): + id: Optional[str] = None + + type: Optional[Literal["line_break"]] = None + + +class DocumentDocumentWebsiteChildToDoChildText(BaseModel): + text: str + + id: Optional[str] = None + + marks: Optional[List[Literal["bold", "italic", "underline", "strikethrough", "code", "math"]]] = None + + type: Optional[Literal["text"]] = None + + +class DocumentDocumentWebsiteChildToDoChildToolCall(BaseModel): + """A tool/function call made by the assistant.""" + + tool_call_id: str + + tool_name: str + + id: Optional[str] = None + + args: Optional[Dict[str, object]] = None + + type: Optional[Literal["tool_call"]] = None + + +class DocumentDocumentWebsiteChildToDoChildToolResult(BaseModel): + """The result of a tool call.""" + + output: Union[str, Dict[str, object], List[object]] + + tool_call_id: str + + tool_name: str + + id: Optional[str] = None + + is_error: Optional[bool] = None + + type: Optional[Literal["tool_result"]] = None + + +class DocumentDocumentWebsiteChildToDoChildTraceMessage(BaseModel): + """A message in an agent trace (user message, assistant message, or thinking).""" + + text: str + + id: Optional[str] = None + + message_type: Optional[Literal["message", "thinking"]] = None + + role: Optional[Literal["user", "assistant"]] = None + + timestamp: Optional[datetime] = None + + type: Optional[Literal["trace_message"]] = None + + +DocumentDocumentWebsiteChildToDoChild: TypeAlias = Union[ + DocumentDocumentWebsiteChildToDoChildBlob, + DocumentDocumentWebsiteChildToDoChildCode, + DocumentDocumentWebsiteChildToDoChildComment, + DocumentDocumentWebsiteChildToDoChildDivider, + DocumentDocumentWebsiteChildToDoChildImage, + DocumentDocumentWebsiteChildToDoChildLink, + DocumentDocumentWebsiteChildToDoChildLineBreak, + DocumentDocumentWebsiteChildToDoChildText, + DocumentDocumentWebsiteChildToDoChildToolCall, + DocumentDocumentWebsiteChildToDoChildToolResult, + DocumentDocumentWebsiteChildToDoChildTraceMessage, + object, +] + + +class DocumentDocumentWebsiteChildToDo(BaseModel): + id: Optional[str] = None + + checked: Optional[bool] = None + + children: Optional[List[DocumentDocumentWebsiteChildToDoChild]] = None + + text: Optional[str] = None + + type: Optional[Literal["todo"]] = None + + +class DocumentDocumentWebsiteChildToolCall(BaseModel): + """A tool/function call made by the assistant.""" + + tool_call_id: str + + tool_name: str + + id: Optional[str] = None + + args: Optional[Dict[str, object]] = None + + type: Optional[Literal["tool_call"]] = None + + +class DocumentDocumentWebsiteChildToolResult(BaseModel): + """The result of a tool call.""" + + output: Union[str, Dict[str, object], List[object]] + + tool_call_id: str + + tool_name: str + + id: Optional[str] = None + + is_error: Optional[bool] = None + + type: Optional[Literal["tool_result"]] = None + + +class DocumentDocumentWebsiteChildTraceMessage(BaseModel): + """A message in an agent trace (user message, assistant message, or thinking).""" + + text: str + + id: Optional[str] = None + + message_type: Optional[Literal["message", "thinking"]] = None + + role: Optional[Literal["user", "assistant"]] = None + + timestamp: Optional[datetime] = None + + type: Optional[Literal["trace_message"]] = None + + +class DocumentDocumentWebsiteChildUtterance(BaseModel): + """A speaker-attributed segment of a transcript (ENG-2476/D10). + + "Utterance" is the standard name for this across transcription providers + (AssemblyAI, Deepgram, Rev). Timestamps are relative offsets in seconds — + provider-native; absolute times derive from `Transcript.started_at`. + """ + + text: str + + id: Optional[str] = None + + end: Optional[float] = None + + speaker: Optional[object] = None + + start: Optional[float] = None + + type: Optional[Literal["utterance"]] = None + + +DocumentDocumentWebsiteChild: TypeAlias = Annotated[ + Union[ + DocumentDocumentWebsiteChildBlob, + DocumentDocumentWebsiteChildCallout, + DocumentDocumentWebsiteChildChunk, + DocumentDocumentWebsiteChildCode, + DocumentDocumentWebsiteChildComment, + DocumentDocumentWebsiteChildDivider, + DocumentDocumentWebsiteChildEquation, + DocumentDocumentWebsiteChildFootnote, + DocumentDocumentWebsiteChildHeading, + DocumentDocumentWebsiteChildImage, + DocumentDocumentWebsiteChildLink, + DocumentDocumentWebsiteChildLineBreak, + DocumentDocumentWebsiteChildList, + DocumentDocumentWebsiteChildListItem, + DocumentDocumentWebsiteChildParagraph, + DocumentDocumentWebsiteChildQuote, + DocumentDocumentWebsiteChildTable, + DocumentDocumentWebsiteChildTableCell, + DocumentDocumentWebsiteChildTableRow, + DocumentDocumentWebsiteChildText, + DocumentDocumentWebsiteChildToDo, + DocumentDocumentWebsiteChildToolCall, + DocumentDocumentWebsiteChildToolResult, + DocumentDocumentWebsiteChildTraceMessage, + DocumentDocumentWebsiteChildUtterance, + ], + PropertyInfo(discriminator="type"), +] + + +class DocumentDocumentWebsite(BaseModel): + url: str + + id: Optional[str] = None + + children: Optional[List[DocumentDocumentWebsiteChild]] = None + + description: Optional[str] = None + + favicon: Optional[str] = None + + image_url: Optional[str] = None + + language: Optional[str] = None + + text: Optional[str] = None + + title: Optional[str] = None + + type: Optional[Literal["website"]] = None + + +class DocumentDocumentTaskChildBlob(BaseModel): + """Represents embedded binary data using data URI scheme. + + Format: data:[][;base64], + Example: data:text/html;base64,PGh0bWw+... + """ + + data: str + + mimetype: str + + id: Optional[str] = None + + type: Optional[Literal["blob"]] = None + + +class DocumentDocumentTaskChildCalloutChildBlob(BaseModel): + """Represents embedded binary data using data URI scheme. + + Format: data:[][;base64], + Example: data:text/html;base64,PGh0bWw+... + """ + + data: str + + mimetype: str + + id: Optional[str] = None + + type: Optional[Literal["blob"]] = None + + +class DocumentDocumentTaskChildCalloutChildCode(BaseModel): + text: str + + id: Optional[str] = None + + language: Optional[str] = None + + type: Optional[Literal["code"]] = None + + +class DocumentDocumentTaskChildCalloutChildComment(BaseModel): + text: str + + id: Optional[str] = None + + created_at: Optional[datetime] = None + + type: Optional[Literal["comment"]] = None + + +class DocumentDocumentTaskChildCalloutChildDivider(BaseModel): + id: Optional[str] = None + + type: Optional[Literal["divider"]] = None + + +class DocumentDocumentTaskChildCalloutChildImage(BaseModel): + src: str + + text: str + + id: Optional[str] = None + + type: Optional[Literal["image"]] = None + + +class DocumentDocumentTaskChildCalloutChildLink(BaseModel): + text: str + + url: str + + id: Optional[str] = None + + type: Optional[Literal["link"]] = None + + +class DocumentDocumentTaskChildCalloutChildLineBreak(BaseModel): + id: Optional[str] = None + + type: Optional[Literal["line_break"]] = None + + +class DocumentDocumentTaskChildCalloutChildText(BaseModel): + text: str + + id: Optional[str] = None + + marks: Optional[List[Literal["bold", "italic", "underline", "strikethrough", "code", "math"]]] = None + + type: Optional[Literal["text"]] = None + + +class DocumentDocumentTaskChildCalloutChildToolCall(BaseModel): + """A tool/function call made by the assistant.""" + + tool_call_id: str + + tool_name: str + + id: Optional[str] = None + + args: Optional[Dict[str, object]] = None + + type: Optional[Literal["tool_call"]] = None + + +class DocumentDocumentTaskChildCalloutChildToolResult(BaseModel): + """The result of a tool call.""" + + output: Union[str, Dict[str, object], List[object]] + + tool_call_id: str + + tool_name: str + + id: Optional[str] = None + + is_error: Optional[bool] = None + + type: Optional[Literal["tool_result"]] = None + + +class DocumentDocumentTaskChildCalloutChildTraceMessage(BaseModel): + """A message in an agent trace (user message, assistant message, or thinking).""" + + text: str + + id: Optional[str] = None + + message_type: Optional[Literal["message", "thinking"]] = None + + role: Optional[Literal["user", "assistant"]] = None + + timestamp: Optional[datetime] = None + + type: Optional[Literal["trace_message"]] = None + + +DocumentDocumentTaskChildCalloutChild: TypeAlias = Union[ + DocumentDocumentTaskChildCalloutChildBlob, + DocumentDocumentTaskChildCalloutChildCode, + DocumentDocumentTaskChildCalloutChildComment, + DocumentDocumentTaskChildCalloutChildDivider, + DocumentDocumentTaskChildCalloutChildImage, + DocumentDocumentTaskChildCalloutChildLink, + DocumentDocumentTaskChildCalloutChildLineBreak, + DocumentDocumentTaskChildCalloutChildText, + DocumentDocumentTaskChildCalloutChildToolCall, + DocumentDocumentTaskChildCalloutChildToolResult, + DocumentDocumentTaskChildCalloutChildTraceMessage, + object, +] + + +class DocumentDocumentTaskChildCallout(BaseModel): + id: Optional[str] = None + + children: Optional[List[DocumentDocumentTaskChildCalloutChild]] = None + + text: Optional[str] = None + + title: Optional[str] = None + + type: Optional[Literal["callout"]] = None + + +class DocumentDocumentTaskChildChunkChildBlob(BaseModel): + """Represents embedded binary data using data URI scheme. + + Format: data:[][;base64], + Example: data:text/html;base64,PGh0bWw+... + """ + + data: str + + mimetype: str + + id: Optional[str] = None + + type: Optional[Literal["blob"]] = None + + +class DocumentDocumentTaskChildChunkChildCode(BaseModel): + text: str + + id: Optional[str] = None + + language: Optional[str] = None + + type: Optional[Literal["code"]] = None + + +class DocumentDocumentTaskChildChunkChildComment(BaseModel): + text: str + + id: Optional[str] = None + + created_at: Optional[datetime] = None + + type: Optional[Literal["comment"]] = None + + +class DocumentDocumentTaskChildChunkChildDivider(BaseModel): + id: Optional[str] = None + + type: Optional[Literal["divider"]] = None + + +class DocumentDocumentTaskChildChunkChildImage(BaseModel): + src: str + + text: str + + id: Optional[str] = None + + type: Optional[Literal["image"]] = None + + +class DocumentDocumentTaskChildChunkChildLink(BaseModel): + text: str + + url: str + + id: Optional[str] = None + + type: Optional[Literal["link"]] = None + + +class DocumentDocumentTaskChildChunkChildLineBreak(BaseModel): + id: Optional[str] = None + + type: Optional[Literal["line_break"]] = None + + +class DocumentDocumentTaskChildChunkChildText(BaseModel): + text: str + + id: Optional[str] = None + + marks: Optional[List[Literal["bold", "italic", "underline", "strikethrough", "code", "math"]]] = None + + type: Optional[Literal["text"]] = None + + +class DocumentDocumentTaskChildChunkChildToolCall(BaseModel): + """A tool/function call made by the assistant.""" + + tool_call_id: str + + tool_name: str + + id: Optional[str] = None + + args: Optional[Dict[str, object]] = None + + type: Optional[Literal["tool_call"]] = None + + +class DocumentDocumentTaskChildChunkChildToolResult(BaseModel): + """The result of a tool call.""" + + output: Union[str, Dict[str, object], List[object]] + + tool_call_id: str + + tool_name: str + + id: Optional[str] = None + + is_error: Optional[bool] = None + + type: Optional[Literal["tool_result"]] = None + + +class DocumentDocumentTaskChildChunkChildTraceMessage(BaseModel): + """A message in an agent trace (user message, assistant message, or thinking).""" + + text: str + + id: Optional[str] = None + + message_type: Optional[Literal["message", "thinking"]] = None + + role: Optional[Literal["user", "assistant"]] = None + + timestamp: Optional[datetime] = None + + type: Optional[Literal["trace_message"]] = None + + +DocumentDocumentTaskChildChunkChild: TypeAlias = Union[ + DocumentDocumentTaskChildChunkChildBlob, + DocumentDocumentTaskChildChunkChildCode, + DocumentDocumentTaskChildChunkChildComment, + DocumentDocumentTaskChildChunkChildDivider, + DocumentDocumentTaskChildChunkChildImage, + DocumentDocumentTaskChildChunkChildLink, + DocumentDocumentTaskChildChunkChildLineBreak, + DocumentDocumentTaskChildChunkChildText, + DocumentDocumentTaskChildChunkChildToolCall, + DocumentDocumentTaskChildChunkChildToolResult, + DocumentDocumentTaskChildChunkChildTraceMessage, + object, +] + + +class DocumentDocumentTaskChildChunk(BaseModel): + id: Optional[str] = None + + children: Optional[List[DocumentDocumentTaskChildChunkChild]] = None + + text: Optional[str] = None + + type: Optional[Literal["chunk"]] = None + + +class DocumentDocumentTaskChildCode(BaseModel): + text: str + + id: Optional[str] = None + + language: Optional[str] = None + + type: Optional[Literal["code"]] = None + + +class DocumentDocumentTaskChildComment(BaseModel): + text: str + + id: Optional[str] = None + + created_at: Optional[datetime] = None + + type: Optional[Literal["comment"]] = None + + +class DocumentDocumentTaskChildDivider(BaseModel): + id: Optional[str] = None + + type: Optional[Literal["divider"]] = None + + +class DocumentDocumentTaskChildEquationChildBlob(BaseModel): + """Represents embedded binary data using data URI scheme. + + Format: data:[][;base64], + Example: data:text/html;base64,PGh0bWw+... + """ + + data: str + + mimetype: str + + id: Optional[str] = None + + type: Optional[Literal["blob"]] = None + + +class DocumentDocumentTaskChildEquationChildCode(BaseModel): + text: str + + id: Optional[str] = None + + language: Optional[str] = None + + type: Optional[Literal["code"]] = None + + +class DocumentDocumentTaskChildEquationChildComment(BaseModel): + text: str + + id: Optional[str] = None + + created_at: Optional[datetime] = None + + type: Optional[Literal["comment"]] = None + + +class DocumentDocumentTaskChildEquationChildDivider(BaseModel): + id: Optional[str] = None + + type: Optional[Literal["divider"]] = None + + +class DocumentDocumentTaskChildEquationChildImage(BaseModel): + src: str + + text: str + + id: Optional[str] = None + + type: Optional[Literal["image"]] = None + + +class DocumentDocumentTaskChildEquationChildLink(BaseModel): + text: str + + url: str + + id: Optional[str] = None + + type: Optional[Literal["link"]] = None + + +class DocumentDocumentTaskChildEquationChildLineBreak(BaseModel): + id: Optional[str] = None + + type: Optional[Literal["line_break"]] = None + + +class DocumentDocumentTaskChildEquationChildText(BaseModel): + text: str + + id: Optional[str] = None + + marks: Optional[List[Literal["bold", "italic", "underline", "strikethrough", "code", "math"]]] = None + + type: Optional[Literal["text"]] = None + + +class DocumentDocumentTaskChildEquationChildToolCall(BaseModel): + """A tool/function call made by the assistant.""" + + tool_call_id: str + + tool_name: str + + id: Optional[str] = None + + args: Optional[Dict[str, object]] = None + + type: Optional[Literal["tool_call"]] = None + + +class DocumentDocumentTaskChildEquationChildToolResult(BaseModel): + """The result of a tool call.""" + + output: Union[str, Dict[str, object], List[object]] + + tool_call_id: str + + tool_name: str + + id: Optional[str] = None + + is_error: Optional[bool] = None + + type: Optional[Literal["tool_result"]] = None + + +class DocumentDocumentTaskChildEquationChildTraceMessage(BaseModel): + """A message in an agent trace (user message, assistant message, or thinking).""" + + text: str + + id: Optional[str] = None + + message_type: Optional[Literal["message", "thinking"]] = None + + role: Optional[Literal["user", "assistant"]] = None + + timestamp: Optional[datetime] = None + + type: Optional[Literal["trace_message"]] = None + + +DocumentDocumentTaskChildEquationChild: TypeAlias = Union[ + DocumentDocumentTaskChildEquationChildBlob, + DocumentDocumentTaskChildEquationChildCode, + DocumentDocumentTaskChildEquationChildComment, + DocumentDocumentTaskChildEquationChildDivider, + DocumentDocumentTaskChildEquationChildImage, + DocumentDocumentTaskChildEquationChildLink, + DocumentDocumentTaskChildEquationChildLineBreak, + DocumentDocumentTaskChildEquationChildText, + DocumentDocumentTaskChildEquationChildToolCall, + DocumentDocumentTaskChildEquationChildToolResult, + DocumentDocumentTaskChildEquationChildTraceMessage, + object, +] + + +class DocumentDocumentTaskChildEquation(BaseModel): + id: Optional[str] = None + + children: Optional[List[DocumentDocumentTaskChildEquationChild]] = None + + text: Optional[str] = None + + type: Optional[Literal["equation"]] = None + + +class DocumentDocumentTaskChildFootnoteChildBlob(BaseModel): + """Represents embedded binary data using data URI scheme. + + Format: data:[][;base64], + Example: data:text/html;base64,PGh0bWw+... + """ + + data: str + + mimetype: str + + id: Optional[str] = None + + type: Optional[Literal["blob"]] = None + + +class DocumentDocumentTaskChildFootnoteChildCode(BaseModel): + text: str + + id: Optional[str] = None + + language: Optional[str] = None + + type: Optional[Literal["code"]] = None + + +class DocumentDocumentTaskChildFootnoteChildComment(BaseModel): + text: str + + id: Optional[str] = None + + created_at: Optional[datetime] = None + + type: Optional[Literal["comment"]] = None + + +class DocumentDocumentTaskChildFootnoteChildDivider(BaseModel): + id: Optional[str] = None + + type: Optional[Literal["divider"]] = None + + +class DocumentDocumentTaskChildFootnoteChildImage(BaseModel): + src: str + + text: str + + id: Optional[str] = None + + type: Optional[Literal["image"]] = None + + +class DocumentDocumentTaskChildFootnoteChildLink(BaseModel): + text: str + + url: str + + id: Optional[str] = None + + type: Optional[Literal["link"]] = None + + +class DocumentDocumentTaskChildFootnoteChildLineBreak(BaseModel): + id: Optional[str] = None + + type: Optional[Literal["line_break"]] = None + + +class DocumentDocumentTaskChildFootnoteChildText(BaseModel): + text: str + + id: Optional[str] = None + + marks: Optional[List[Literal["bold", "italic", "underline", "strikethrough", "code", "math"]]] = None + + type: Optional[Literal["text"]] = None + + +class DocumentDocumentTaskChildFootnoteChildToolCall(BaseModel): + """A tool/function call made by the assistant.""" + + tool_call_id: str + + tool_name: str + + id: Optional[str] = None + + args: Optional[Dict[str, object]] = None + + type: Optional[Literal["tool_call"]] = None + + +class DocumentDocumentTaskChildFootnoteChildToolResult(BaseModel): + """The result of a tool call.""" + + output: Union[str, Dict[str, object], List[object]] + + tool_call_id: str + + tool_name: str + + id: Optional[str] = None + + is_error: Optional[bool] = None + + type: Optional[Literal["tool_result"]] = None + + +class DocumentDocumentTaskChildFootnoteChildTraceMessage(BaseModel): + """A message in an agent trace (user message, assistant message, or thinking).""" + + text: str + + id: Optional[str] = None + + message_type: Optional[Literal["message", "thinking"]] = None + + role: Optional[Literal["user", "assistant"]] = None + + timestamp: Optional[datetime] = None + + type: Optional[Literal["trace_message"]] = None + + +DocumentDocumentTaskChildFootnoteChild: TypeAlias = Union[ + DocumentDocumentTaskChildFootnoteChildBlob, + DocumentDocumentTaskChildFootnoteChildCode, + DocumentDocumentTaskChildFootnoteChildComment, + DocumentDocumentTaskChildFootnoteChildDivider, + DocumentDocumentTaskChildFootnoteChildImage, + DocumentDocumentTaskChildFootnoteChildLink, + DocumentDocumentTaskChildFootnoteChildLineBreak, + DocumentDocumentTaskChildFootnoteChildText, + DocumentDocumentTaskChildFootnoteChildToolCall, + DocumentDocumentTaskChildFootnoteChildToolResult, + DocumentDocumentTaskChildFootnoteChildTraceMessage, + object, +] + + +class DocumentDocumentTaskChildFootnote(BaseModel): + id: Optional[str] = None + + children: Optional[List[DocumentDocumentTaskChildFootnoteChild]] = None + + text: Optional[str] = None + + type: Optional[Literal["footnote"]] = None + + +class DocumentDocumentTaskChildHeadingChildBlob(BaseModel): + """Represents embedded binary data using data URI scheme. + + Format: data:[][;base64], + Example: data:text/html;base64,PGh0bWw+... + """ + + data: str + + mimetype: str + + id: Optional[str] = None + + type: Optional[Literal["blob"]] = None + + +class DocumentDocumentTaskChildHeadingChildCode(BaseModel): + text: str + + id: Optional[str] = None + + language: Optional[str] = None + + type: Optional[Literal["code"]] = None + + +class DocumentDocumentTaskChildHeadingChildComment(BaseModel): + text: str + + id: Optional[str] = None + + created_at: Optional[datetime] = None + + type: Optional[Literal["comment"]] = None + + +class DocumentDocumentTaskChildHeadingChildDivider(BaseModel): + id: Optional[str] = None + + type: Optional[Literal["divider"]] = None + + +class DocumentDocumentTaskChildHeadingChildImage(BaseModel): + src: str + + text: str + + id: Optional[str] = None + + type: Optional[Literal["image"]] = None + + +class DocumentDocumentTaskChildHeadingChildLink(BaseModel): + text: str + + url: str + + id: Optional[str] = None + + type: Optional[Literal["link"]] = None + + +class DocumentDocumentTaskChildHeadingChildLineBreak(BaseModel): + id: Optional[str] = None + + type: Optional[Literal["line_break"]] = None + + +class DocumentDocumentTaskChildHeadingChildText(BaseModel): + text: str + + id: Optional[str] = None + + marks: Optional[List[Literal["bold", "italic", "underline", "strikethrough", "code", "math"]]] = None + + type: Optional[Literal["text"]] = None + + +class DocumentDocumentTaskChildHeadingChildToolCall(BaseModel): + """A tool/function call made by the assistant.""" + + tool_call_id: str + + tool_name: str + + id: Optional[str] = None + + args: Optional[Dict[str, object]] = None + + type: Optional[Literal["tool_call"]] = None + + +class DocumentDocumentTaskChildHeadingChildToolResult(BaseModel): + """The result of a tool call.""" + + output: Union[str, Dict[str, object], List[object]] + + tool_call_id: str + + tool_name: str + + id: Optional[str] = None + + is_error: Optional[bool] = None + + type: Optional[Literal["tool_result"]] = None + + +class DocumentDocumentTaskChildHeadingChildTraceMessage(BaseModel): + """A message in an agent trace (user message, assistant message, or thinking).""" + + text: str + + id: Optional[str] = None + + message_type: Optional[Literal["message", "thinking"]] = None + + role: Optional[Literal["user", "assistant"]] = None + + timestamp: Optional[datetime] = None + + type: Optional[Literal["trace_message"]] = None + + +DocumentDocumentTaskChildHeadingChild: TypeAlias = Union[ + DocumentDocumentTaskChildHeadingChildBlob, + DocumentDocumentTaskChildHeadingChildCode, + DocumentDocumentTaskChildHeadingChildComment, + DocumentDocumentTaskChildHeadingChildDivider, + DocumentDocumentTaskChildHeadingChildImage, + DocumentDocumentTaskChildHeadingChildLink, + DocumentDocumentTaskChildHeadingChildLineBreak, + DocumentDocumentTaskChildHeadingChildText, + DocumentDocumentTaskChildHeadingChildToolCall, + DocumentDocumentTaskChildHeadingChildToolResult, + DocumentDocumentTaskChildHeadingChildTraceMessage, + object, +] + + +class DocumentDocumentTaskChildHeading(BaseModel): + level: int + + id: Optional[str] = None + + children: Optional[List[DocumentDocumentTaskChildHeadingChild]] = None + + text: Optional[str] = None + + type: Optional[Literal["heading"]] = None + + +class DocumentDocumentTaskChildImage(BaseModel): + src: str + + text: str + + id: Optional[str] = None + + type: Optional[Literal["image"]] = None + + +class DocumentDocumentTaskChildLink(BaseModel): + text: str + + url: str + + id: Optional[str] = None + + type: Optional[Literal["link"]] = None + + +class DocumentDocumentTaskChildLineBreak(BaseModel): + id: Optional[str] = None + + type: Optional[Literal["line_break"]] = None + + +class DocumentDocumentTaskChildList(BaseModel): + id: Optional[str] = None + + children: Optional[List[object]] = None + + ordered: Optional[bool] = None + + text: Optional[str] = None + + type: Optional[Literal["list"]] = None + + +class DocumentDocumentTaskChildListItemChildBlob(BaseModel): + """Represents embedded binary data using data URI scheme. + + Format: data:[][;base64], + Example: data:text/html;base64,PGh0bWw+... + """ + + data: str + + mimetype: str + + id: Optional[str] = None + + type: Optional[Literal["blob"]] = None + + +class DocumentDocumentTaskChildListItemChildCode(BaseModel): + text: str + + id: Optional[str] = None + + language: Optional[str] = None + + type: Optional[Literal["code"]] = None + + +class DocumentDocumentTaskChildListItemChildComment(BaseModel): + text: str + + id: Optional[str] = None + + created_at: Optional[datetime] = None + + type: Optional[Literal["comment"]] = None + + +class DocumentDocumentTaskChildListItemChildDivider(BaseModel): + id: Optional[str] = None + + type: Optional[Literal["divider"]] = None + + +class DocumentDocumentTaskChildListItemChildImage(BaseModel): + src: str + + text: str + + id: Optional[str] = None + + type: Optional[Literal["image"]] = None + + +class DocumentDocumentTaskChildListItemChildLink(BaseModel): + text: str + + url: str + + id: Optional[str] = None + + type: Optional[Literal["link"]] = None + + +class DocumentDocumentTaskChildListItemChildLineBreak(BaseModel): + id: Optional[str] = None + + type: Optional[Literal["line_break"]] = None + + +class DocumentDocumentTaskChildListItemChildText(BaseModel): + text: str + + id: Optional[str] = None + + marks: Optional[List[Literal["bold", "italic", "underline", "strikethrough", "code", "math"]]] = None + + type: Optional[Literal["text"]] = None + + +class DocumentDocumentTaskChildListItemChildToolCall(BaseModel): + """A tool/function call made by the assistant.""" + + tool_call_id: str + + tool_name: str + + id: Optional[str] = None + + args: Optional[Dict[str, object]] = None + + type: Optional[Literal["tool_call"]] = None + + +class DocumentDocumentTaskChildListItemChildToolResult(BaseModel): + """The result of a tool call.""" + + output: Union[str, Dict[str, object], List[object]] + + tool_call_id: str + + tool_name: str + + id: Optional[str] = None + + is_error: Optional[bool] = None + + type: Optional[Literal["tool_result"]] = None + + +class DocumentDocumentTaskChildListItemChildTraceMessage(BaseModel): + """A message in an agent trace (user message, assistant message, or thinking).""" + + text: str + + id: Optional[str] = None + + message_type: Optional[Literal["message", "thinking"]] = None + + role: Optional[Literal["user", "assistant"]] = None + + timestamp: Optional[datetime] = None + + type: Optional[Literal["trace_message"]] = None + + +DocumentDocumentTaskChildListItemChild: TypeAlias = Union[ + DocumentDocumentTaskChildListItemChildBlob, + DocumentDocumentTaskChildListItemChildCode, + DocumentDocumentTaskChildListItemChildComment, + DocumentDocumentTaskChildListItemChildDivider, + DocumentDocumentTaskChildListItemChildImage, + DocumentDocumentTaskChildListItemChildLink, + DocumentDocumentTaskChildListItemChildLineBreak, + DocumentDocumentTaskChildListItemChildText, + DocumentDocumentTaskChildListItemChildToolCall, + DocumentDocumentTaskChildListItemChildToolResult, + DocumentDocumentTaskChildListItemChildTraceMessage, + object, +] + + +class DocumentDocumentTaskChildListItem(BaseModel): + id: Optional[str] = None + + children: Optional[List[DocumentDocumentTaskChildListItemChild]] = None + + text: Optional[str] = None + + type: Optional[Literal["list_item"]] = None + + +class DocumentDocumentTaskChildParagraphChildBlob(BaseModel): + """Represents embedded binary data using data URI scheme. + + Format: data:[][;base64], + Example: data:text/html;base64,PGh0bWw+... + """ + + data: str + + mimetype: str + + id: Optional[str] = None + + type: Optional[Literal["blob"]] = None + + +class DocumentDocumentTaskChildParagraphChildCode(BaseModel): + text: str + + id: Optional[str] = None + + language: Optional[str] = None + + type: Optional[Literal["code"]] = None + + +class DocumentDocumentTaskChildParagraphChildComment(BaseModel): + text: str + + id: Optional[str] = None + + created_at: Optional[datetime] = None + + type: Optional[Literal["comment"]] = None + + +class DocumentDocumentTaskChildParagraphChildDivider(BaseModel): + id: Optional[str] = None + + type: Optional[Literal["divider"]] = None + + +class DocumentDocumentTaskChildParagraphChildImage(BaseModel): + src: str + + text: str + + id: Optional[str] = None + + type: Optional[Literal["image"]] = None + + +class DocumentDocumentTaskChildParagraphChildLink(BaseModel): + text: str + + url: str + + id: Optional[str] = None + + type: Optional[Literal["link"]] = None + + +class DocumentDocumentTaskChildParagraphChildLineBreak(BaseModel): + id: Optional[str] = None + + type: Optional[Literal["line_break"]] = None + + +class DocumentDocumentTaskChildParagraphChildText(BaseModel): + text: str + + id: Optional[str] = None + + marks: Optional[List[Literal["bold", "italic", "underline", "strikethrough", "code", "math"]]] = None + + type: Optional[Literal["text"]] = None + + +class DocumentDocumentTaskChildParagraphChildToolCall(BaseModel): + """A tool/function call made by the assistant.""" + + tool_call_id: str + + tool_name: str + + id: Optional[str] = None + + args: Optional[Dict[str, object]] = None + + type: Optional[Literal["tool_call"]] = None + + +class DocumentDocumentTaskChildParagraphChildToolResult(BaseModel): + """The result of a tool call.""" + + output: Union[str, Dict[str, object], List[object]] + + tool_call_id: str + + tool_name: str + + id: Optional[str] = None + + is_error: Optional[bool] = None + + type: Optional[Literal["tool_result"]] = None + + +class DocumentDocumentTaskChildParagraphChildTraceMessage(BaseModel): + """A message in an agent trace (user message, assistant message, or thinking).""" + + text: str + + id: Optional[str] = None + + message_type: Optional[Literal["message", "thinking"]] = None + + role: Optional[Literal["user", "assistant"]] = None + + timestamp: Optional[datetime] = None + + type: Optional[Literal["trace_message"]] = None + + +DocumentDocumentTaskChildParagraphChild: TypeAlias = Union[ + DocumentDocumentTaskChildParagraphChildBlob, + DocumentDocumentTaskChildParagraphChildCode, + DocumentDocumentTaskChildParagraphChildComment, + DocumentDocumentTaskChildParagraphChildDivider, + DocumentDocumentTaskChildParagraphChildImage, + DocumentDocumentTaskChildParagraphChildLink, + DocumentDocumentTaskChildParagraphChildLineBreak, + DocumentDocumentTaskChildParagraphChildText, + DocumentDocumentTaskChildParagraphChildToolCall, + DocumentDocumentTaskChildParagraphChildToolResult, + DocumentDocumentTaskChildParagraphChildTraceMessage, + object, +] + + +class DocumentDocumentTaskChildParagraph(BaseModel): + id: Optional[str] = None + + children: Optional[List[DocumentDocumentTaskChildParagraphChild]] = None + + text: Optional[str] = None + + type: Optional[Literal["paragraph"]] = None + + +class DocumentDocumentTaskChildQuoteChildBlob(BaseModel): + """Represents embedded binary data using data URI scheme. + + Format: data:[][;base64], + Example: data:text/html;base64,PGh0bWw+... + """ + + data: str + + mimetype: str + + id: Optional[str] = None + + type: Optional[Literal["blob"]] = None + + +class DocumentDocumentTaskChildQuoteChildCode(BaseModel): + text: str + + id: Optional[str] = None + + language: Optional[str] = None + + type: Optional[Literal["code"]] = None + + +class DocumentDocumentTaskChildQuoteChildComment(BaseModel): + text: str + + id: Optional[str] = None + + created_at: Optional[datetime] = None + + type: Optional[Literal["comment"]] = None + + +class DocumentDocumentTaskChildQuoteChildDivider(BaseModel): + id: Optional[str] = None + + type: Optional[Literal["divider"]] = None + + +class DocumentDocumentTaskChildQuoteChildImage(BaseModel): + src: str + + text: str + + id: Optional[str] = None + + type: Optional[Literal["image"]] = None + + +class DocumentDocumentTaskChildQuoteChildLink(BaseModel): + text: str + + url: str + + id: Optional[str] = None + + type: Optional[Literal["link"]] = None + + +class DocumentDocumentTaskChildQuoteChildLineBreak(BaseModel): + id: Optional[str] = None + + type: Optional[Literal["line_break"]] = None + + +class DocumentDocumentTaskChildQuoteChildText(BaseModel): + text: str + + id: Optional[str] = None + + marks: Optional[List[Literal["bold", "italic", "underline", "strikethrough", "code", "math"]]] = None + + type: Optional[Literal["text"]] = None + + +class DocumentDocumentTaskChildQuoteChildToolCall(BaseModel): + """A tool/function call made by the assistant.""" + + tool_call_id: str + + tool_name: str + + id: Optional[str] = None + + args: Optional[Dict[str, object]] = None + + type: Optional[Literal["tool_call"]] = None + + +class DocumentDocumentTaskChildQuoteChildToolResult(BaseModel): + """The result of a tool call.""" + + output: Union[str, Dict[str, object], List[object]] + + tool_call_id: str + + tool_name: str + + id: Optional[str] = None + + is_error: Optional[bool] = None + + type: Optional[Literal["tool_result"]] = None + + +class DocumentDocumentTaskChildQuoteChildTraceMessage(BaseModel): + """A message in an agent trace (user message, assistant message, or thinking).""" + + text: str + + id: Optional[str] = None + + message_type: Optional[Literal["message", "thinking"]] = None + + role: Optional[Literal["user", "assistant"]] = None + + timestamp: Optional[datetime] = None + + type: Optional[Literal["trace_message"]] = None + + +DocumentDocumentTaskChildQuoteChild: TypeAlias = Union[ + DocumentDocumentTaskChildQuoteChildBlob, + DocumentDocumentTaskChildQuoteChildCode, + DocumentDocumentTaskChildQuoteChildComment, + DocumentDocumentTaskChildQuoteChildDivider, + DocumentDocumentTaskChildQuoteChildImage, + DocumentDocumentTaskChildQuoteChildLink, + DocumentDocumentTaskChildQuoteChildLineBreak, + DocumentDocumentTaskChildQuoteChildText, + DocumentDocumentTaskChildQuoteChildToolCall, + DocumentDocumentTaskChildQuoteChildToolResult, + DocumentDocumentTaskChildQuoteChildTraceMessage, + object, +] + + +class DocumentDocumentTaskChildQuote(BaseModel): + id: Optional[str] = None + + children: Optional[List[DocumentDocumentTaskChildQuoteChild]] = None + + text: Optional[str] = None + + type: Optional[Literal["quote"]] = None + + +class DocumentDocumentTaskChildTable(BaseModel): + id: Optional[str] = None + + children: Optional[List[object]] = None + + has_header: Optional[bool] = None + """Whether the first row should be treated as a header""" + + text: Optional[str] = None + + type: Optional[Literal["table"]] = None + + +class DocumentDocumentTaskChildTableCellChildBlob(BaseModel): + """Represents embedded binary data using data URI scheme. + + Format: data:[][;base64], + Example: data:text/html;base64,PGh0bWw+... + """ + + data: str + + mimetype: str + + id: Optional[str] = None + + type: Optional[Literal["blob"]] = None + + +class DocumentDocumentTaskChildTableCellChildCode(BaseModel): + text: str + + id: Optional[str] = None + + language: Optional[str] = None + + type: Optional[Literal["code"]] = None + + +class DocumentDocumentTaskChildTableCellChildComment(BaseModel): + text: str + + id: Optional[str] = None + + created_at: Optional[datetime] = None + + type: Optional[Literal["comment"]] = None + + +class DocumentDocumentTaskChildTableCellChildDivider(BaseModel): + id: Optional[str] = None + + type: Optional[Literal["divider"]] = None + + +class DocumentDocumentTaskChildTableCellChildImage(BaseModel): + src: str + + text: str + + id: Optional[str] = None + + type: Optional[Literal["image"]] = None + + +class DocumentDocumentTaskChildTableCellChildLink(BaseModel): + text: str + + url: str + + id: Optional[str] = None + + type: Optional[Literal["link"]] = None + + +class DocumentDocumentTaskChildTableCellChildLineBreak(BaseModel): + id: Optional[str] = None + + type: Optional[Literal["line_break"]] = None + + +class DocumentDocumentTaskChildTableCellChildText(BaseModel): + text: str + + id: Optional[str] = None + + marks: Optional[List[Literal["bold", "italic", "underline", "strikethrough", "code", "math"]]] = None + + type: Optional[Literal["text"]] = None + + +class DocumentDocumentTaskChildTableCellChildToolCall(BaseModel): + """A tool/function call made by the assistant.""" + + tool_call_id: str + + tool_name: str + + id: Optional[str] = None + + args: Optional[Dict[str, object]] = None + + type: Optional[Literal["tool_call"]] = None + + +class DocumentDocumentTaskChildTableCellChildToolResult(BaseModel): + """The result of a tool call.""" + + output: Union[str, Dict[str, object], List[object]] + + tool_call_id: str + + tool_name: str + + id: Optional[str] = None + + is_error: Optional[bool] = None + + type: Optional[Literal["tool_result"]] = None + + +class DocumentDocumentTaskChildTableCellChildTraceMessage(BaseModel): + """A message in an agent trace (user message, assistant message, or thinking).""" + + text: str + + id: Optional[str] = None + + message_type: Optional[Literal["message", "thinking"]] = None + + role: Optional[Literal["user", "assistant"]] = None + + timestamp: Optional[datetime] = None + + type: Optional[Literal["trace_message"]] = None + + +DocumentDocumentTaskChildTableCellChild: TypeAlias = Union[ + DocumentDocumentTaskChildTableCellChildBlob, + DocumentDocumentTaskChildTableCellChildCode, + DocumentDocumentTaskChildTableCellChildComment, + DocumentDocumentTaskChildTableCellChildDivider, + DocumentDocumentTaskChildTableCellChildImage, + DocumentDocumentTaskChildTableCellChildLink, + DocumentDocumentTaskChildTableCellChildLineBreak, + DocumentDocumentTaskChildTableCellChildText, + DocumentDocumentTaskChildTableCellChildToolCall, + DocumentDocumentTaskChildTableCellChildToolResult, + DocumentDocumentTaskChildTableCellChildTraceMessage, + object, +] + + +class DocumentDocumentTaskChildTableCell(BaseModel): + id: Optional[str] = None + + align: Optional[Literal["left", "center", "right"]] = None + + children: Optional[List[DocumentDocumentTaskChildTableCellChild]] = None + + text: Optional[str] = None + + type: Optional[Literal["table_cell"]] = None + + +class DocumentDocumentTaskChildTableRow(BaseModel): + id: Optional[str] = None + + children: Optional[List[object]] = None + + text: Optional[str] = None + + type: Optional[Literal["table_row"]] = None + + +class DocumentDocumentTaskChildText(BaseModel): + text: str + + id: Optional[str] = None + + marks: Optional[List[Literal["bold", "italic", "underline", "strikethrough", "code", "math"]]] = None + + type: Optional[Literal["text"]] = None + + +class DocumentDocumentTaskChildToDoChildBlob(BaseModel): + """Represents embedded binary data using data URI scheme. + + Format: data:[][;base64], + Example: data:text/html;base64,PGh0bWw+... + """ + + data: str + + mimetype: str + + id: Optional[str] = None + + type: Optional[Literal["blob"]] = None + + +class DocumentDocumentTaskChildToDoChildCode(BaseModel): + text: str + + id: Optional[str] = None + + language: Optional[str] = None + + type: Optional[Literal["code"]] = None + + +class DocumentDocumentTaskChildToDoChildComment(BaseModel): + text: str + + id: Optional[str] = None + + created_at: Optional[datetime] = None + + type: Optional[Literal["comment"]] = None + + +class DocumentDocumentTaskChildToDoChildDivider(BaseModel): + id: Optional[str] = None + + type: Optional[Literal["divider"]] = None + + +class DocumentDocumentTaskChildToDoChildImage(BaseModel): + src: str + + text: str + + id: Optional[str] = None + + type: Optional[Literal["image"]] = None + + +class DocumentDocumentTaskChildToDoChildLink(BaseModel): + text: str + + url: str + + id: Optional[str] = None + + type: Optional[Literal["link"]] = None + + +class DocumentDocumentTaskChildToDoChildLineBreak(BaseModel): + id: Optional[str] = None + + type: Optional[Literal["line_break"]] = None + + +class DocumentDocumentTaskChildToDoChildText(BaseModel): + text: str + + id: Optional[str] = None + + marks: Optional[List[Literal["bold", "italic", "underline", "strikethrough", "code", "math"]]] = None + + type: Optional[Literal["text"]] = None + + +class DocumentDocumentTaskChildToDoChildToolCall(BaseModel): + """A tool/function call made by the assistant.""" + + tool_call_id: str + + tool_name: str + + id: Optional[str] = None + + args: Optional[Dict[str, object]] = None + + type: Optional[Literal["tool_call"]] = None + + +class DocumentDocumentTaskChildToDoChildToolResult(BaseModel): + """The result of a tool call.""" + + output: Union[str, Dict[str, object], List[object]] + + tool_call_id: str + + tool_name: str + + id: Optional[str] = None + + is_error: Optional[bool] = None + + type: Optional[Literal["tool_result"]] = None + + +class DocumentDocumentTaskChildToDoChildTraceMessage(BaseModel): + """A message in an agent trace (user message, assistant message, or thinking).""" + + text: str + + id: Optional[str] = None + + message_type: Optional[Literal["message", "thinking"]] = None + + role: Optional[Literal["user", "assistant"]] = None + + timestamp: Optional[datetime] = None + + type: Optional[Literal["trace_message"]] = None + + +DocumentDocumentTaskChildToDoChild: TypeAlias = Union[ + DocumentDocumentTaskChildToDoChildBlob, + DocumentDocumentTaskChildToDoChildCode, + DocumentDocumentTaskChildToDoChildComment, + DocumentDocumentTaskChildToDoChildDivider, + DocumentDocumentTaskChildToDoChildImage, + DocumentDocumentTaskChildToDoChildLink, + DocumentDocumentTaskChildToDoChildLineBreak, + DocumentDocumentTaskChildToDoChildText, + DocumentDocumentTaskChildToDoChildToolCall, + DocumentDocumentTaskChildToDoChildToolResult, + DocumentDocumentTaskChildToDoChildTraceMessage, + object, +] + + +class DocumentDocumentTaskChildToDo(BaseModel): + id: Optional[str] = None + + checked: Optional[bool] = None + + children: Optional[List[DocumentDocumentTaskChildToDoChild]] = None + + text: Optional[str] = None + + type: Optional[Literal["todo"]] = None + + +class DocumentDocumentTaskChildToolCall(BaseModel): + """A tool/function call made by the assistant.""" + + tool_call_id: str + + tool_name: str + + id: Optional[str] = None + + args: Optional[Dict[str, object]] = None + + type: Optional[Literal["tool_call"]] = None + + +class DocumentDocumentTaskChildToolResult(BaseModel): + """The result of a tool call.""" + + output: Union[str, Dict[str, object], List[object]] + + tool_call_id: str + + tool_name: str + + id: Optional[str] = None + + is_error: Optional[bool] = None + + type: Optional[Literal["tool_result"]] = None + + +class DocumentDocumentTaskChildTraceMessage(BaseModel): + """A message in an agent trace (user message, assistant message, or thinking).""" + + text: str + + id: Optional[str] = None + + message_type: Optional[Literal["message", "thinking"]] = None + + role: Optional[Literal["user", "assistant"]] = None + + timestamp: Optional[datetime] = None + + type: Optional[Literal["trace_message"]] = None + + +class DocumentDocumentTaskChildUtterance(BaseModel): + """A speaker-attributed segment of a transcript (ENG-2476/D10). + + "Utterance" is the standard name for this across transcription providers + (AssemblyAI, Deepgram, Rev). Timestamps are relative offsets in seconds — + provider-native; absolute times derive from `Transcript.started_at`. + """ + + text: str + + id: Optional[str] = None + + end: Optional[float] = None + + speaker: Optional[object] = None + + start: Optional[float] = None + + type: Optional[Literal["utterance"]] = None + + +DocumentDocumentTaskChild: TypeAlias = Annotated[ + Union[ + DocumentDocumentTaskChildBlob, + DocumentDocumentTaskChildCallout, + DocumentDocumentTaskChildChunk, + DocumentDocumentTaskChildCode, + DocumentDocumentTaskChildComment, + DocumentDocumentTaskChildDivider, + DocumentDocumentTaskChildEquation, + DocumentDocumentTaskChildFootnote, + DocumentDocumentTaskChildHeading, + DocumentDocumentTaskChildImage, + DocumentDocumentTaskChildLink, + DocumentDocumentTaskChildLineBreak, + DocumentDocumentTaskChildList, + DocumentDocumentTaskChildListItem, + DocumentDocumentTaskChildParagraph, + DocumentDocumentTaskChildQuote, + DocumentDocumentTaskChildTable, + DocumentDocumentTaskChildTableCell, + DocumentDocumentTaskChildTableRow, + DocumentDocumentTaskChildText, + DocumentDocumentTaskChildToDo, + DocumentDocumentTaskChildToolCall, + DocumentDocumentTaskChildToolResult, + DocumentDocumentTaskChildTraceMessage, + DocumentDocumentTaskChildUtterance, + ], + PropertyInfo(discriminator="type"), +] + + +class DocumentDocumentTaskCommentSenderChildBlob(BaseModel): + """Represents embedded binary data using data URI scheme. + + Format: data:[][;base64], + Example: data:text/html;base64,PGh0bWw+... + """ + + data: str + + mimetype: str + + id: Optional[str] = None + + type: Optional[Literal["blob"]] = None + + +class DocumentDocumentTaskCommentSenderChildCode(BaseModel): + text: str + + id: Optional[str] = None + + language: Optional[str] = None + + type: Optional[Literal["code"]] = None + + +class DocumentDocumentTaskCommentSenderChildComment(BaseModel): + text: str + + id: Optional[str] = None + + created_at: Optional[datetime] = None + + type: Optional[Literal["comment"]] = None + + +class DocumentDocumentTaskCommentSenderChildDivider(BaseModel): + id: Optional[str] = None + + type: Optional[Literal["divider"]] = None + + +class DocumentDocumentTaskCommentSenderChildImage(BaseModel): + src: str + + text: str + + id: Optional[str] = None + + type: Optional[Literal["image"]] = None + + +class DocumentDocumentTaskCommentSenderChildLink(BaseModel): + text: str + + url: str + + id: Optional[str] = None + + type: Optional[Literal["link"]] = None + + +class DocumentDocumentTaskCommentSenderChildLineBreak(BaseModel): + id: Optional[str] = None + + type: Optional[Literal["line_break"]] = None + + +class DocumentDocumentTaskCommentSenderChildText(BaseModel): + text: str + + id: Optional[str] = None + + marks: Optional[List[Literal["bold", "italic", "underline", "strikethrough", "code", "math"]]] = None + + type: Optional[Literal["text"]] = None + + +class DocumentDocumentTaskCommentSenderChildToolCall(BaseModel): + """A tool/function call made by the assistant.""" + + tool_call_id: str + + tool_name: str + + id: Optional[str] = None + + args: Optional[Dict[str, object]] = None + + type: Optional[Literal["tool_call"]] = None + + +class DocumentDocumentTaskCommentSenderChildToolResult(BaseModel): + """The result of a tool call.""" + + output: Union[str, Dict[str, object], List[object]] + + tool_call_id: str + + tool_name: str + + id: Optional[str] = None + + is_error: Optional[bool] = None + + type: Optional[Literal["tool_result"]] = None + + +class DocumentDocumentTaskCommentSenderChildTraceMessage(BaseModel): + """A message in an agent trace (user message, assistant message, or thinking).""" + + text: str + + id: Optional[str] = None + + message_type: Optional[Literal["message", "thinking"]] = None + + role: Optional[Literal["user", "assistant"]] = None + + timestamp: Optional[datetime] = None + + type: Optional[Literal["trace_message"]] = None + + +DocumentDocumentTaskCommentSenderChild: TypeAlias = Union[ + DocumentDocumentTaskCommentSenderChildBlob, + DocumentDocumentTaskCommentSenderChildCode, + DocumentDocumentTaskCommentSenderChildComment, + DocumentDocumentTaskCommentSenderChildDivider, + DocumentDocumentTaskCommentSenderChildImage, + DocumentDocumentTaskCommentSenderChildLink, + DocumentDocumentTaskCommentSenderChildLineBreak, + DocumentDocumentTaskCommentSenderChildText, + DocumentDocumentTaskCommentSenderChildToolCall, + DocumentDocumentTaskCommentSenderChildToolResult, + DocumentDocumentTaskCommentSenderChildTraceMessage, + object, +] + + +class DocumentDocumentTaskCommentSender(BaseModel): + id: Optional[str] = None + + address: Optional[str] = None + + alt_names: Optional[List[str]] = None + + children: Optional[List[DocumentDocumentTaskCommentSenderChild]] = None + + company: Optional[str] = None + + company_ids: Optional[List[str]] = None + + date_of_birth: Optional[date] = None + + deal_ids: Optional[List[str]] = None + + email: Optional[str] = None + + emails: Optional[List[str]] = None + """All known email addresses; `email` holds the primary one""" + + image_url: Optional[str] = None + + job_title: Optional[str] = None + + link_urls: Optional[List[str]] = None + + name: Optional[str] = None + + phone_numbers: Optional[List[str]] = None + + tags: Optional[List[str]] = None + + text: Optional[str] = None + + type: Optional[Literal["person"]] = None + + username: Optional[str] = None + + +class DocumentDocumentTaskCommentChildBlob(BaseModel): + """Represents embedded binary data using data URI scheme. + + Format: data:[][;base64], + Example: data:text/html;base64,PGh0bWw+... + """ + + data: str + + mimetype: str + + id: Optional[str] = None + + type: Optional[Literal["blob"]] = None + + +class DocumentDocumentTaskCommentChildCalloutChildBlob(BaseModel): + """Represents embedded binary data using data URI scheme. + + Format: data:[][;base64], + Example: data:text/html;base64,PGh0bWw+... + """ + + data: str + + mimetype: str + + id: Optional[str] = None + + type: Optional[Literal["blob"]] = None + + +class DocumentDocumentTaskCommentChildCalloutChildCode(BaseModel): + text: str + + id: Optional[str] = None + + language: Optional[str] = None + + type: Optional[Literal["code"]] = None + + +class DocumentDocumentTaskCommentChildCalloutChildComment(BaseModel): + text: str + + id: Optional[str] = None + + created_at: Optional[datetime] = None + + type: Optional[Literal["comment"]] = None + + +class DocumentDocumentTaskCommentChildCalloutChildDivider(BaseModel): + id: Optional[str] = None + + type: Optional[Literal["divider"]] = None + + +class DocumentDocumentTaskCommentChildCalloutChildImage(BaseModel): + src: str + + text: str + + id: Optional[str] = None + + type: Optional[Literal["image"]] = None + + +class DocumentDocumentTaskCommentChildCalloutChildLink(BaseModel): + text: str + + url: str + + id: Optional[str] = None + + type: Optional[Literal["link"]] = None + + +class DocumentDocumentTaskCommentChildCalloutChildLineBreak(BaseModel): + id: Optional[str] = None + + type: Optional[Literal["line_break"]] = None + + +class DocumentDocumentTaskCommentChildCalloutChildText(BaseModel): + text: str + + id: Optional[str] = None + + marks: Optional[List[Literal["bold", "italic", "underline", "strikethrough", "code", "math"]]] = None + + type: Optional[Literal["text"]] = None + + +class DocumentDocumentTaskCommentChildCalloutChildToolCall(BaseModel): + """A tool/function call made by the assistant.""" + + tool_call_id: str + + tool_name: str + + id: Optional[str] = None + + args: Optional[Dict[str, object]] = None + + type: Optional[Literal["tool_call"]] = None + + +class DocumentDocumentTaskCommentChildCalloutChildToolResult(BaseModel): + """The result of a tool call.""" + + output: Union[str, Dict[str, object], List[object]] + + tool_call_id: str + + tool_name: str + + id: Optional[str] = None + + is_error: Optional[bool] = None + + type: Optional[Literal["tool_result"]] = None + + +class DocumentDocumentTaskCommentChildCalloutChildTraceMessage(BaseModel): + """A message in an agent trace (user message, assistant message, or thinking).""" + + text: str + + id: Optional[str] = None + + message_type: Optional[Literal["message", "thinking"]] = None + + role: Optional[Literal["user", "assistant"]] = None + + timestamp: Optional[datetime] = None + + type: Optional[Literal["trace_message"]] = None + + +DocumentDocumentTaskCommentChildCalloutChild: TypeAlias = Union[ + DocumentDocumentTaskCommentChildCalloutChildBlob, + DocumentDocumentTaskCommentChildCalloutChildCode, + DocumentDocumentTaskCommentChildCalloutChildComment, + DocumentDocumentTaskCommentChildCalloutChildDivider, + DocumentDocumentTaskCommentChildCalloutChildImage, + DocumentDocumentTaskCommentChildCalloutChildLink, + DocumentDocumentTaskCommentChildCalloutChildLineBreak, + DocumentDocumentTaskCommentChildCalloutChildText, + DocumentDocumentTaskCommentChildCalloutChildToolCall, + DocumentDocumentTaskCommentChildCalloutChildToolResult, + DocumentDocumentTaskCommentChildCalloutChildTraceMessage, + object, +] + + +class DocumentDocumentTaskCommentChildCallout(BaseModel): + id: Optional[str] = None + + children: Optional[List[DocumentDocumentTaskCommentChildCalloutChild]] = None + + text: Optional[str] = None + + title: Optional[str] = None + + type: Optional[Literal["callout"]] = None + + +class DocumentDocumentTaskCommentChildChunkChildBlob(BaseModel): + """Represents embedded binary data using data URI scheme. + + Format: data:[][;base64], + Example: data:text/html;base64,PGh0bWw+... + """ + + data: str + + mimetype: str + + id: Optional[str] = None + + type: Optional[Literal["blob"]] = None + + +class DocumentDocumentTaskCommentChildChunkChildCode(BaseModel): + text: str + + id: Optional[str] = None + + language: Optional[str] = None + + type: Optional[Literal["code"]] = None + + +class DocumentDocumentTaskCommentChildChunkChildComment(BaseModel): + text: str + + id: Optional[str] = None + + created_at: Optional[datetime] = None + + type: Optional[Literal["comment"]] = None + + +class DocumentDocumentTaskCommentChildChunkChildDivider(BaseModel): + id: Optional[str] = None + + type: Optional[Literal["divider"]] = None + + +class DocumentDocumentTaskCommentChildChunkChildImage(BaseModel): + src: str + + text: str + + id: Optional[str] = None + + type: Optional[Literal["image"]] = None + + +class DocumentDocumentTaskCommentChildChunkChildLink(BaseModel): + text: str + + url: str + + id: Optional[str] = None + + type: Optional[Literal["link"]] = None + + +class DocumentDocumentTaskCommentChildChunkChildLineBreak(BaseModel): + id: Optional[str] = None + + type: Optional[Literal["line_break"]] = None + + +class DocumentDocumentTaskCommentChildChunkChildText(BaseModel): + text: str + + id: Optional[str] = None + + marks: Optional[List[Literal["bold", "italic", "underline", "strikethrough", "code", "math"]]] = None + + type: Optional[Literal["text"]] = None + + +class DocumentDocumentTaskCommentChildChunkChildToolCall(BaseModel): + """A tool/function call made by the assistant.""" + + tool_call_id: str + + tool_name: str + + id: Optional[str] = None + + args: Optional[Dict[str, object]] = None + + type: Optional[Literal["tool_call"]] = None + + +class DocumentDocumentTaskCommentChildChunkChildToolResult(BaseModel): + """The result of a tool call.""" + + output: Union[str, Dict[str, object], List[object]] + + tool_call_id: str + + tool_name: str + + id: Optional[str] = None + + is_error: Optional[bool] = None + + type: Optional[Literal["tool_result"]] = None + + +class DocumentDocumentTaskCommentChildChunkChildTraceMessage(BaseModel): + """A message in an agent trace (user message, assistant message, or thinking).""" + + text: str + + id: Optional[str] = None + + message_type: Optional[Literal["message", "thinking"]] = None + + role: Optional[Literal["user", "assistant"]] = None + + timestamp: Optional[datetime] = None + + type: Optional[Literal["trace_message"]] = None + + +DocumentDocumentTaskCommentChildChunkChild: TypeAlias = Union[ + DocumentDocumentTaskCommentChildChunkChildBlob, + DocumentDocumentTaskCommentChildChunkChildCode, + DocumentDocumentTaskCommentChildChunkChildComment, + DocumentDocumentTaskCommentChildChunkChildDivider, + DocumentDocumentTaskCommentChildChunkChildImage, + DocumentDocumentTaskCommentChildChunkChildLink, + DocumentDocumentTaskCommentChildChunkChildLineBreak, + DocumentDocumentTaskCommentChildChunkChildText, + DocumentDocumentTaskCommentChildChunkChildToolCall, + DocumentDocumentTaskCommentChildChunkChildToolResult, + DocumentDocumentTaskCommentChildChunkChildTraceMessage, + object, +] + + +class DocumentDocumentTaskCommentChildChunk(BaseModel): + id: Optional[str] = None + + children: Optional[List[DocumentDocumentTaskCommentChildChunkChild]] = None + + text: Optional[str] = None + + type: Optional[Literal["chunk"]] = None + + +class DocumentDocumentTaskCommentChildCode(BaseModel): + text: str + + id: Optional[str] = None + + language: Optional[str] = None + + type: Optional[Literal["code"]] = None + + +class DocumentDocumentTaskCommentChildComment(BaseModel): + text: str + + id: Optional[str] = None + + created_at: Optional[datetime] = None + + type: Optional[Literal["comment"]] = None + + +class DocumentDocumentTaskCommentChildDivider(BaseModel): + id: Optional[str] = None + + type: Optional[Literal["divider"]] = None + + +class DocumentDocumentTaskCommentChildEquationChildBlob(BaseModel): + """Represents embedded binary data using data URI scheme. + + Format: data:[][;base64], + Example: data:text/html;base64,PGh0bWw+... + """ + + data: str + + mimetype: str + + id: Optional[str] = None + + type: Optional[Literal["blob"]] = None + + +class DocumentDocumentTaskCommentChildEquationChildCode(BaseModel): + text: str + + id: Optional[str] = None + + language: Optional[str] = None + + type: Optional[Literal["code"]] = None + + +class DocumentDocumentTaskCommentChildEquationChildComment(BaseModel): + text: str + + id: Optional[str] = None + + created_at: Optional[datetime] = None + + type: Optional[Literal["comment"]] = None + + +class DocumentDocumentTaskCommentChildEquationChildDivider(BaseModel): + id: Optional[str] = None + + type: Optional[Literal["divider"]] = None + + +class DocumentDocumentTaskCommentChildEquationChildImage(BaseModel): + src: str + + text: str + + id: Optional[str] = None + + type: Optional[Literal["image"]] = None + + +class DocumentDocumentTaskCommentChildEquationChildLink(BaseModel): + text: str + + url: str + + id: Optional[str] = None + + type: Optional[Literal["link"]] = None + + +class DocumentDocumentTaskCommentChildEquationChildLineBreak(BaseModel): + id: Optional[str] = None + + type: Optional[Literal["line_break"]] = None + + +class DocumentDocumentTaskCommentChildEquationChildText(BaseModel): + text: str + + id: Optional[str] = None + + marks: Optional[List[Literal["bold", "italic", "underline", "strikethrough", "code", "math"]]] = None + + type: Optional[Literal["text"]] = None + + +class DocumentDocumentTaskCommentChildEquationChildToolCall(BaseModel): + """A tool/function call made by the assistant.""" + + tool_call_id: str + + tool_name: str + + id: Optional[str] = None + + args: Optional[Dict[str, object]] = None + + type: Optional[Literal["tool_call"]] = None + + +class DocumentDocumentTaskCommentChildEquationChildToolResult(BaseModel): + """The result of a tool call.""" + + output: Union[str, Dict[str, object], List[object]] + + tool_call_id: str + + tool_name: str + + id: Optional[str] = None + + is_error: Optional[bool] = None + + type: Optional[Literal["tool_result"]] = None + + +class DocumentDocumentTaskCommentChildEquationChildTraceMessage(BaseModel): + """A message in an agent trace (user message, assistant message, or thinking).""" + + text: str + + id: Optional[str] = None + + message_type: Optional[Literal["message", "thinking"]] = None + + role: Optional[Literal["user", "assistant"]] = None + + timestamp: Optional[datetime] = None + + type: Optional[Literal["trace_message"]] = None + + +DocumentDocumentTaskCommentChildEquationChild: TypeAlias = Union[ + DocumentDocumentTaskCommentChildEquationChildBlob, + DocumentDocumentTaskCommentChildEquationChildCode, + DocumentDocumentTaskCommentChildEquationChildComment, + DocumentDocumentTaskCommentChildEquationChildDivider, + DocumentDocumentTaskCommentChildEquationChildImage, + DocumentDocumentTaskCommentChildEquationChildLink, + DocumentDocumentTaskCommentChildEquationChildLineBreak, + DocumentDocumentTaskCommentChildEquationChildText, + DocumentDocumentTaskCommentChildEquationChildToolCall, + DocumentDocumentTaskCommentChildEquationChildToolResult, + DocumentDocumentTaskCommentChildEquationChildTraceMessage, + object, +] + + +class DocumentDocumentTaskCommentChildEquation(BaseModel): + id: Optional[str] = None + + children: Optional[List[DocumentDocumentTaskCommentChildEquationChild]] = None + + text: Optional[str] = None + + type: Optional[Literal["equation"]] = None + + +class DocumentDocumentTaskCommentChildFootnoteChildBlob(BaseModel): + """Represents embedded binary data using data URI scheme. + + Format: data:[][;base64], + Example: data:text/html;base64,PGh0bWw+... + """ + + data: str + + mimetype: str + + id: Optional[str] = None + + type: Optional[Literal["blob"]] = None + + +class DocumentDocumentTaskCommentChildFootnoteChildCode(BaseModel): + text: str + + id: Optional[str] = None + + language: Optional[str] = None + + type: Optional[Literal["code"]] = None + + +class DocumentDocumentTaskCommentChildFootnoteChildComment(BaseModel): + text: str + + id: Optional[str] = None + + created_at: Optional[datetime] = None + + type: Optional[Literal["comment"]] = None + + +class DocumentDocumentTaskCommentChildFootnoteChildDivider(BaseModel): + id: Optional[str] = None + + type: Optional[Literal["divider"]] = None + + +class DocumentDocumentTaskCommentChildFootnoteChildImage(BaseModel): + src: str + + text: str + + id: Optional[str] = None + + type: Optional[Literal["image"]] = None + + +class DocumentDocumentTaskCommentChildFootnoteChildLink(BaseModel): + text: str + + url: str + + id: Optional[str] = None + + type: Optional[Literal["link"]] = None + + +class DocumentDocumentTaskCommentChildFootnoteChildLineBreak(BaseModel): + id: Optional[str] = None + + type: Optional[Literal["line_break"]] = None + + +class DocumentDocumentTaskCommentChildFootnoteChildText(BaseModel): + text: str + + id: Optional[str] = None + + marks: Optional[List[Literal["bold", "italic", "underline", "strikethrough", "code", "math"]]] = None + + type: Optional[Literal["text"]] = None + + +class DocumentDocumentTaskCommentChildFootnoteChildToolCall(BaseModel): + """A tool/function call made by the assistant.""" + + tool_call_id: str + + tool_name: str + + id: Optional[str] = None + + args: Optional[Dict[str, object]] = None + + type: Optional[Literal["tool_call"]] = None + + +class DocumentDocumentTaskCommentChildFootnoteChildToolResult(BaseModel): + """The result of a tool call.""" + + output: Union[str, Dict[str, object], List[object]] + + tool_call_id: str + + tool_name: str + + id: Optional[str] = None + + is_error: Optional[bool] = None + + type: Optional[Literal["tool_result"]] = None + + +class DocumentDocumentTaskCommentChildFootnoteChildTraceMessage(BaseModel): + """A message in an agent trace (user message, assistant message, or thinking).""" + + text: str + + id: Optional[str] = None + + message_type: Optional[Literal["message", "thinking"]] = None + + role: Optional[Literal["user", "assistant"]] = None + + timestamp: Optional[datetime] = None + + type: Optional[Literal["trace_message"]] = None + + +DocumentDocumentTaskCommentChildFootnoteChild: TypeAlias = Union[ + DocumentDocumentTaskCommentChildFootnoteChildBlob, + DocumentDocumentTaskCommentChildFootnoteChildCode, + DocumentDocumentTaskCommentChildFootnoteChildComment, + DocumentDocumentTaskCommentChildFootnoteChildDivider, + DocumentDocumentTaskCommentChildFootnoteChildImage, + DocumentDocumentTaskCommentChildFootnoteChildLink, + DocumentDocumentTaskCommentChildFootnoteChildLineBreak, + DocumentDocumentTaskCommentChildFootnoteChildText, + DocumentDocumentTaskCommentChildFootnoteChildToolCall, + DocumentDocumentTaskCommentChildFootnoteChildToolResult, + DocumentDocumentTaskCommentChildFootnoteChildTraceMessage, + object, +] + + +class DocumentDocumentTaskCommentChildFootnote(BaseModel): + id: Optional[str] = None + + children: Optional[List[DocumentDocumentTaskCommentChildFootnoteChild]] = None + + text: Optional[str] = None + + type: Optional[Literal["footnote"]] = None + + +class DocumentDocumentTaskCommentChildHeadingChildBlob(BaseModel): + """Represents embedded binary data using data URI scheme. + + Format: data:[][;base64], + Example: data:text/html;base64,PGh0bWw+... + """ + + data: str + + mimetype: str + + id: Optional[str] = None + + type: Optional[Literal["blob"]] = None + + +class DocumentDocumentTaskCommentChildHeadingChildCode(BaseModel): + text: str + + id: Optional[str] = None + + language: Optional[str] = None + + type: Optional[Literal["code"]] = None + + +class DocumentDocumentTaskCommentChildHeadingChildComment(BaseModel): + text: str + + id: Optional[str] = None + + created_at: Optional[datetime] = None + + type: Optional[Literal["comment"]] = None + + +class DocumentDocumentTaskCommentChildHeadingChildDivider(BaseModel): + id: Optional[str] = None + + type: Optional[Literal["divider"]] = None + + +class DocumentDocumentTaskCommentChildHeadingChildImage(BaseModel): + src: str + + text: str + + id: Optional[str] = None + + type: Optional[Literal["image"]] = None + + +class DocumentDocumentTaskCommentChildHeadingChildLink(BaseModel): + text: str + + url: str + + id: Optional[str] = None + + type: Optional[Literal["link"]] = None + + +class DocumentDocumentTaskCommentChildHeadingChildLineBreak(BaseModel): + id: Optional[str] = None + + type: Optional[Literal["line_break"]] = None + + +class DocumentDocumentTaskCommentChildHeadingChildText(BaseModel): + text: str + + id: Optional[str] = None + + marks: Optional[List[Literal["bold", "italic", "underline", "strikethrough", "code", "math"]]] = None + + type: Optional[Literal["text"]] = None + + +class DocumentDocumentTaskCommentChildHeadingChildToolCall(BaseModel): + """A tool/function call made by the assistant.""" + + tool_call_id: str + + tool_name: str + + id: Optional[str] = None + + args: Optional[Dict[str, object]] = None + + type: Optional[Literal["tool_call"]] = None + + +class DocumentDocumentTaskCommentChildHeadingChildToolResult(BaseModel): + """The result of a tool call.""" + + output: Union[str, Dict[str, object], List[object]] + + tool_call_id: str + + tool_name: str + + id: Optional[str] = None + + is_error: Optional[bool] = None + + type: Optional[Literal["tool_result"]] = None + + +class DocumentDocumentTaskCommentChildHeadingChildTraceMessage(BaseModel): + """A message in an agent trace (user message, assistant message, or thinking).""" + + text: str + + id: Optional[str] = None + + message_type: Optional[Literal["message", "thinking"]] = None + + role: Optional[Literal["user", "assistant"]] = None + + timestamp: Optional[datetime] = None + + type: Optional[Literal["trace_message"]] = None + + +DocumentDocumentTaskCommentChildHeadingChild: TypeAlias = Union[ + DocumentDocumentTaskCommentChildHeadingChildBlob, + DocumentDocumentTaskCommentChildHeadingChildCode, + DocumentDocumentTaskCommentChildHeadingChildComment, + DocumentDocumentTaskCommentChildHeadingChildDivider, + DocumentDocumentTaskCommentChildHeadingChildImage, + DocumentDocumentTaskCommentChildHeadingChildLink, + DocumentDocumentTaskCommentChildHeadingChildLineBreak, + DocumentDocumentTaskCommentChildHeadingChildText, + DocumentDocumentTaskCommentChildHeadingChildToolCall, + DocumentDocumentTaskCommentChildHeadingChildToolResult, + DocumentDocumentTaskCommentChildHeadingChildTraceMessage, + object, +] + + +class DocumentDocumentTaskCommentChildHeading(BaseModel): + level: int + + id: Optional[str] = None + + children: Optional[List[DocumentDocumentTaskCommentChildHeadingChild]] = None + + text: Optional[str] = None + + type: Optional[Literal["heading"]] = None + + +class DocumentDocumentTaskCommentChildImage(BaseModel): + src: str + + text: str + + id: Optional[str] = None + + type: Optional[Literal["image"]] = None + + +class DocumentDocumentTaskCommentChildLink(BaseModel): + text: str + + url: str + + id: Optional[str] = None + + type: Optional[Literal["link"]] = None + + +class DocumentDocumentTaskCommentChildLineBreak(BaseModel): + id: Optional[str] = None + + type: Optional[Literal["line_break"]] = None + + +class DocumentDocumentTaskCommentChildList(BaseModel): + id: Optional[str] = None + + children: Optional[List[object]] = None + + ordered: Optional[bool] = None + + text: Optional[str] = None + + type: Optional[Literal["list"]] = None + + +class DocumentDocumentTaskCommentChildListItemChildBlob(BaseModel): + """Represents embedded binary data using data URI scheme. + + Format: data:[][;base64], + Example: data:text/html;base64,PGh0bWw+... + """ + + data: str + + mimetype: str + + id: Optional[str] = None + + type: Optional[Literal["blob"]] = None + + +class DocumentDocumentTaskCommentChildListItemChildCode(BaseModel): + text: str + + id: Optional[str] = None + + language: Optional[str] = None + + type: Optional[Literal["code"]] = None + + +class DocumentDocumentTaskCommentChildListItemChildComment(BaseModel): + text: str + + id: Optional[str] = None + + created_at: Optional[datetime] = None + + type: Optional[Literal["comment"]] = None + + +class DocumentDocumentTaskCommentChildListItemChildDivider(BaseModel): + id: Optional[str] = None + + type: Optional[Literal["divider"]] = None + + +class DocumentDocumentTaskCommentChildListItemChildImage(BaseModel): + src: str + + text: str + + id: Optional[str] = None + + type: Optional[Literal["image"]] = None + + +class DocumentDocumentTaskCommentChildListItemChildLink(BaseModel): + text: str + + url: str + + id: Optional[str] = None + + type: Optional[Literal["link"]] = None + + +class DocumentDocumentTaskCommentChildListItemChildLineBreak(BaseModel): + id: Optional[str] = None + + type: Optional[Literal["line_break"]] = None + + +class DocumentDocumentTaskCommentChildListItemChildText(BaseModel): + text: str + + id: Optional[str] = None + + marks: Optional[List[Literal["bold", "italic", "underline", "strikethrough", "code", "math"]]] = None + + type: Optional[Literal["text"]] = None + + +class DocumentDocumentTaskCommentChildListItemChildToolCall(BaseModel): + """A tool/function call made by the assistant.""" + + tool_call_id: str + + tool_name: str + + id: Optional[str] = None + + args: Optional[Dict[str, object]] = None + + type: Optional[Literal["tool_call"]] = None + + +class DocumentDocumentTaskCommentChildListItemChildToolResult(BaseModel): + """The result of a tool call.""" + + output: Union[str, Dict[str, object], List[object]] + + tool_call_id: str + + tool_name: str + + id: Optional[str] = None + + is_error: Optional[bool] = None + + type: Optional[Literal["tool_result"]] = None + + +class DocumentDocumentTaskCommentChildListItemChildTraceMessage(BaseModel): + """A message in an agent trace (user message, assistant message, or thinking).""" + + text: str + + id: Optional[str] = None + + message_type: Optional[Literal["message", "thinking"]] = None + + role: Optional[Literal["user", "assistant"]] = None + + timestamp: Optional[datetime] = None + + type: Optional[Literal["trace_message"]] = None + + +DocumentDocumentTaskCommentChildListItemChild: TypeAlias = Union[ + DocumentDocumentTaskCommentChildListItemChildBlob, + DocumentDocumentTaskCommentChildListItemChildCode, + DocumentDocumentTaskCommentChildListItemChildComment, + DocumentDocumentTaskCommentChildListItemChildDivider, + DocumentDocumentTaskCommentChildListItemChildImage, + DocumentDocumentTaskCommentChildListItemChildLink, + DocumentDocumentTaskCommentChildListItemChildLineBreak, + DocumentDocumentTaskCommentChildListItemChildText, + DocumentDocumentTaskCommentChildListItemChildToolCall, + DocumentDocumentTaskCommentChildListItemChildToolResult, + DocumentDocumentTaskCommentChildListItemChildTraceMessage, + object, +] + + +class DocumentDocumentTaskCommentChildListItem(BaseModel): + id: Optional[str] = None + + children: Optional[List[DocumentDocumentTaskCommentChildListItemChild]] = None + + text: Optional[str] = None + + type: Optional[Literal["list_item"]] = None + + +class DocumentDocumentTaskCommentChildParagraphChildBlob(BaseModel): + """Represents embedded binary data using data URI scheme. + + Format: data:[][;base64], + Example: data:text/html;base64,PGh0bWw+... + """ + + data: str + + mimetype: str + + id: Optional[str] = None + + type: Optional[Literal["blob"]] = None + + +class DocumentDocumentTaskCommentChildParagraphChildCode(BaseModel): + text: str + + id: Optional[str] = None + + language: Optional[str] = None + + type: Optional[Literal["code"]] = None + + +class DocumentDocumentTaskCommentChildParagraphChildComment(BaseModel): + text: str + + id: Optional[str] = None + + created_at: Optional[datetime] = None + + type: Optional[Literal["comment"]] = None + + +class DocumentDocumentTaskCommentChildParagraphChildDivider(BaseModel): + id: Optional[str] = None + + type: Optional[Literal["divider"]] = None + + +class DocumentDocumentTaskCommentChildParagraphChildImage(BaseModel): + src: str + + text: str + + id: Optional[str] = None + + type: Optional[Literal["image"]] = None + + +class DocumentDocumentTaskCommentChildParagraphChildLink(BaseModel): + text: str + + url: str + + id: Optional[str] = None + + type: Optional[Literal["link"]] = None + + +class DocumentDocumentTaskCommentChildParagraphChildLineBreak(BaseModel): + id: Optional[str] = None + + type: Optional[Literal["line_break"]] = None + + +class DocumentDocumentTaskCommentChildParagraphChildText(BaseModel): + text: str + + id: Optional[str] = None + + marks: Optional[List[Literal["bold", "italic", "underline", "strikethrough", "code", "math"]]] = None + + type: Optional[Literal["text"]] = None + + +class DocumentDocumentTaskCommentChildParagraphChildToolCall(BaseModel): + """A tool/function call made by the assistant.""" + + tool_call_id: str + + tool_name: str + + id: Optional[str] = None + + args: Optional[Dict[str, object]] = None + + type: Optional[Literal["tool_call"]] = None + + +class DocumentDocumentTaskCommentChildParagraphChildToolResult(BaseModel): + """The result of a tool call.""" + + output: Union[str, Dict[str, object], List[object]] + + tool_call_id: str + + tool_name: str + + id: Optional[str] = None + + is_error: Optional[bool] = None + + type: Optional[Literal["tool_result"]] = None + + +class DocumentDocumentTaskCommentChildParagraphChildTraceMessage(BaseModel): + """A message in an agent trace (user message, assistant message, or thinking).""" + + text: str + + id: Optional[str] = None + + message_type: Optional[Literal["message", "thinking"]] = None + + role: Optional[Literal["user", "assistant"]] = None + + timestamp: Optional[datetime] = None + + type: Optional[Literal["trace_message"]] = None + + +DocumentDocumentTaskCommentChildParagraphChild: TypeAlias = Union[ + DocumentDocumentTaskCommentChildParagraphChildBlob, + DocumentDocumentTaskCommentChildParagraphChildCode, + DocumentDocumentTaskCommentChildParagraphChildComment, + DocumentDocumentTaskCommentChildParagraphChildDivider, + DocumentDocumentTaskCommentChildParagraphChildImage, + DocumentDocumentTaskCommentChildParagraphChildLink, + DocumentDocumentTaskCommentChildParagraphChildLineBreak, + DocumentDocumentTaskCommentChildParagraphChildText, + DocumentDocumentTaskCommentChildParagraphChildToolCall, + DocumentDocumentTaskCommentChildParagraphChildToolResult, + DocumentDocumentTaskCommentChildParagraphChildTraceMessage, + object, +] + + +class DocumentDocumentTaskCommentChildParagraph(BaseModel): + id: Optional[str] = None + + children: Optional[List[DocumentDocumentTaskCommentChildParagraphChild]] = None + + text: Optional[str] = None + + type: Optional[Literal["paragraph"]] = None + + +class DocumentDocumentTaskCommentChildQuoteChildBlob(BaseModel): + """Represents embedded binary data using data URI scheme. + + Format: data:[][;base64], + Example: data:text/html;base64,PGh0bWw+... + """ + + data: str + + mimetype: str + + id: Optional[str] = None + + type: Optional[Literal["blob"]] = None + + +class DocumentDocumentTaskCommentChildQuoteChildCode(BaseModel): + text: str + + id: Optional[str] = None + + language: Optional[str] = None + + type: Optional[Literal["code"]] = None + + +class DocumentDocumentTaskCommentChildQuoteChildComment(BaseModel): + text: str + + id: Optional[str] = None + + created_at: Optional[datetime] = None + + type: Optional[Literal["comment"]] = None + + +class DocumentDocumentTaskCommentChildQuoteChildDivider(BaseModel): + id: Optional[str] = None + + type: Optional[Literal["divider"]] = None + + +class DocumentDocumentTaskCommentChildQuoteChildImage(BaseModel): + src: str + + text: str + + id: Optional[str] = None + + type: Optional[Literal["image"]] = None + + +class DocumentDocumentTaskCommentChildQuoteChildLink(BaseModel): + text: str + + url: str + + id: Optional[str] = None + + type: Optional[Literal["link"]] = None + + +class DocumentDocumentTaskCommentChildQuoteChildLineBreak(BaseModel): + id: Optional[str] = None + + type: Optional[Literal["line_break"]] = None + + +class DocumentDocumentTaskCommentChildQuoteChildText(BaseModel): + text: str + + id: Optional[str] = None + + marks: Optional[List[Literal["bold", "italic", "underline", "strikethrough", "code", "math"]]] = None + + type: Optional[Literal["text"]] = None + + +class DocumentDocumentTaskCommentChildQuoteChildToolCall(BaseModel): + """A tool/function call made by the assistant.""" + + tool_call_id: str + + tool_name: str + + id: Optional[str] = None + + args: Optional[Dict[str, object]] = None + + type: Optional[Literal["tool_call"]] = None + + +class DocumentDocumentTaskCommentChildQuoteChildToolResult(BaseModel): + """The result of a tool call.""" + + output: Union[str, Dict[str, object], List[object]] + + tool_call_id: str + + tool_name: str + + id: Optional[str] = None + + is_error: Optional[bool] = None + + type: Optional[Literal["tool_result"]] = None + + +class DocumentDocumentTaskCommentChildQuoteChildTraceMessage(BaseModel): + """A message in an agent trace (user message, assistant message, or thinking).""" + + text: str + + id: Optional[str] = None + + message_type: Optional[Literal["message", "thinking"]] = None + + role: Optional[Literal["user", "assistant"]] = None + + timestamp: Optional[datetime] = None + + type: Optional[Literal["trace_message"]] = None + + +DocumentDocumentTaskCommentChildQuoteChild: TypeAlias = Union[ + DocumentDocumentTaskCommentChildQuoteChildBlob, + DocumentDocumentTaskCommentChildQuoteChildCode, + DocumentDocumentTaskCommentChildQuoteChildComment, + DocumentDocumentTaskCommentChildQuoteChildDivider, + DocumentDocumentTaskCommentChildQuoteChildImage, + DocumentDocumentTaskCommentChildQuoteChildLink, + DocumentDocumentTaskCommentChildQuoteChildLineBreak, + DocumentDocumentTaskCommentChildQuoteChildText, + DocumentDocumentTaskCommentChildQuoteChildToolCall, + DocumentDocumentTaskCommentChildQuoteChildToolResult, + DocumentDocumentTaskCommentChildQuoteChildTraceMessage, + object, +] + + +class DocumentDocumentTaskCommentChildQuote(BaseModel): + id: Optional[str] = None + + children: Optional[List[DocumentDocumentTaskCommentChildQuoteChild]] = None + + text: Optional[str] = None + + type: Optional[Literal["quote"]] = None + + +class DocumentDocumentTaskCommentChildTable(BaseModel): + id: Optional[str] = None + + children: Optional[List[object]] = None + + has_header: Optional[bool] = None + """Whether the first row should be treated as a header""" + + text: Optional[str] = None + + type: Optional[Literal["table"]] = None + + +class DocumentDocumentTaskCommentChildTableCellChildBlob(BaseModel): + """Represents embedded binary data using data URI scheme. + + Format: data:[][;base64], + Example: data:text/html;base64,PGh0bWw+... + """ + + data: str + + mimetype: str + + id: Optional[str] = None + + type: Optional[Literal["blob"]] = None + + +class DocumentDocumentTaskCommentChildTableCellChildCode(BaseModel): + text: str + + id: Optional[str] = None + + language: Optional[str] = None + + type: Optional[Literal["code"]] = None + + +class DocumentDocumentTaskCommentChildTableCellChildComment(BaseModel): + text: str + + id: Optional[str] = None + + created_at: Optional[datetime] = None + + type: Optional[Literal["comment"]] = None + + +class DocumentDocumentTaskCommentChildTableCellChildDivider(BaseModel): + id: Optional[str] = None + + type: Optional[Literal["divider"]] = None + + +class DocumentDocumentTaskCommentChildTableCellChildImage(BaseModel): + src: str + + text: str + + id: Optional[str] = None + + type: Optional[Literal["image"]] = None + + +class DocumentDocumentTaskCommentChildTableCellChildLink(BaseModel): + text: str + + url: str + + id: Optional[str] = None + + type: Optional[Literal["link"]] = None + + +class DocumentDocumentTaskCommentChildTableCellChildLineBreak(BaseModel): + id: Optional[str] = None + + type: Optional[Literal["line_break"]] = None + + +class DocumentDocumentTaskCommentChildTableCellChildText(BaseModel): + text: str + + id: Optional[str] = None + + marks: Optional[List[Literal["bold", "italic", "underline", "strikethrough", "code", "math"]]] = None + + type: Optional[Literal["text"]] = None + + +class DocumentDocumentTaskCommentChildTableCellChildToolCall(BaseModel): + """A tool/function call made by the assistant.""" + + tool_call_id: str + + tool_name: str + + id: Optional[str] = None + + args: Optional[Dict[str, object]] = None + + type: Optional[Literal["tool_call"]] = None + + +class DocumentDocumentTaskCommentChildTableCellChildToolResult(BaseModel): + """The result of a tool call.""" + + output: Union[str, Dict[str, object], List[object]] + + tool_call_id: str + + tool_name: str + + id: Optional[str] = None + + is_error: Optional[bool] = None + + type: Optional[Literal["tool_result"]] = None + + +class DocumentDocumentTaskCommentChildTableCellChildTraceMessage(BaseModel): + """A message in an agent trace (user message, assistant message, or thinking).""" + + text: str + + id: Optional[str] = None + + message_type: Optional[Literal["message", "thinking"]] = None + + role: Optional[Literal["user", "assistant"]] = None + + timestamp: Optional[datetime] = None + + type: Optional[Literal["trace_message"]] = None + + +DocumentDocumentTaskCommentChildTableCellChild: TypeAlias = Union[ + DocumentDocumentTaskCommentChildTableCellChildBlob, + DocumentDocumentTaskCommentChildTableCellChildCode, + DocumentDocumentTaskCommentChildTableCellChildComment, + DocumentDocumentTaskCommentChildTableCellChildDivider, + DocumentDocumentTaskCommentChildTableCellChildImage, + DocumentDocumentTaskCommentChildTableCellChildLink, + DocumentDocumentTaskCommentChildTableCellChildLineBreak, + DocumentDocumentTaskCommentChildTableCellChildText, + DocumentDocumentTaskCommentChildTableCellChildToolCall, + DocumentDocumentTaskCommentChildTableCellChildToolResult, + DocumentDocumentTaskCommentChildTableCellChildTraceMessage, + object, +] + + +class DocumentDocumentTaskCommentChildTableCell(BaseModel): + id: Optional[str] = None + + align: Optional[Literal["left", "center", "right"]] = None + + children: Optional[List[DocumentDocumentTaskCommentChildTableCellChild]] = None + + text: Optional[str] = None + + type: Optional[Literal["table_cell"]] = None + + +class DocumentDocumentTaskCommentChildTableRow(BaseModel): + id: Optional[str] = None + + children: Optional[List[object]] = None + + text: Optional[str] = None + + type: Optional[Literal["table_row"]] = None + + +class DocumentDocumentTaskCommentChildText(BaseModel): + text: str + + id: Optional[str] = None + + marks: Optional[List[Literal["bold", "italic", "underline", "strikethrough", "code", "math"]]] = None + + type: Optional[Literal["text"]] = None + + +class DocumentDocumentTaskCommentChildToDoChildBlob(BaseModel): + """Represents embedded binary data using data URI scheme. + + Format: data:[][;base64], + Example: data:text/html;base64,PGh0bWw+... + """ + + data: str + + mimetype: str + + id: Optional[str] = None + + type: Optional[Literal["blob"]] = None + + +class DocumentDocumentTaskCommentChildToDoChildCode(BaseModel): + text: str + + id: Optional[str] = None + + language: Optional[str] = None + + type: Optional[Literal["code"]] = None + + +class DocumentDocumentTaskCommentChildToDoChildComment(BaseModel): + text: str + + id: Optional[str] = None + + created_at: Optional[datetime] = None + + type: Optional[Literal["comment"]] = None + + +class DocumentDocumentTaskCommentChildToDoChildDivider(BaseModel): + id: Optional[str] = None + + type: Optional[Literal["divider"]] = None + + +class DocumentDocumentTaskCommentChildToDoChildImage(BaseModel): + src: str + + text: str + + id: Optional[str] = None + + type: Optional[Literal["image"]] = None + + +class DocumentDocumentTaskCommentChildToDoChildLink(BaseModel): + text: str + + url: str + + id: Optional[str] = None + + type: Optional[Literal["link"]] = None + + +class DocumentDocumentTaskCommentChildToDoChildLineBreak(BaseModel): + id: Optional[str] = None + + type: Optional[Literal["line_break"]] = None + + +class DocumentDocumentTaskCommentChildToDoChildText(BaseModel): + text: str + + id: Optional[str] = None + + marks: Optional[List[Literal["bold", "italic", "underline", "strikethrough", "code", "math"]]] = None + + type: Optional[Literal["text"]] = None + + +class DocumentDocumentTaskCommentChildToDoChildToolCall(BaseModel): + """A tool/function call made by the assistant.""" + + tool_call_id: str + + tool_name: str + + id: Optional[str] = None + + args: Optional[Dict[str, object]] = None + + type: Optional[Literal["tool_call"]] = None + + +class DocumentDocumentTaskCommentChildToDoChildToolResult(BaseModel): + """The result of a tool call.""" + + output: Union[str, Dict[str, object], List[object]] + + tool_call_id: str + + tool_name: str + + id: Optional[str] = None + + is_error: Optional[bool] = None + + type: Optional[Literal["tool_result"]] = None + + +class DocumentDocumentTaskCommentChildToDoChildTraceMessage(BaseModel): + """A message in an agent trace (user message, assistant message, or thinking).""" + + text: str + + id: Optional[str] = None + + message_type: Optional[Literal["message", "thinking"]] = None + + role: Optional[Literal["user", "assistant"]] = None + + timestamp: Optional[datetime] = None + + type: Optional[Literal["trace_message"]] = None + + +DocumentDocumentTaskCommentChildToDoChild: TypeAlias = Union[ + DocumentDocumentTaskCommentChildToDoChildBlob, + DocumentDocumentTaskCommentChildToDoChildCode, + DocumentDocumentTaskCommentChildToDoChildComment, + DocumentDocumentTaskCommentChildToDoChildDivider, + DocumentDocumentTaskCommentChildToDoChildImage, + DocumentDocumentTaskCommentChildToDoChildLink, + DocumentDocumentTaskCommentChildToDoChildLineBreak, + DocumentDocumentTaskCommentChildToDoChildText, + DocumentDocumentTaskCommentChildToDoChildToolCall, + DocumentDocumentTaskCommentChildToDoChildToolResult, + DocumentDocumentTaskCommentChildToDoChildTraceMessage, + object, +] + + +class DocumentDocumentTaskCommentChildToDo(BaseModel): + id: Optional[str] = None + + checked: Optional[bool] = None + + children: Optional[List[DocumentDocumentTaskCommentChildToDoChild]] = None + + text: Optional[str] = None + + type: Optional[Literal["todo"]] = None + + +class DocumentDocumentTaskCommentChildToolCall(BaseModel): + """A tool/function call made by the assistant.""" + + tool_call_id: str + + tool_name: str + + id: Optional[str] = None + + args: Optional[Dict[str, object]] = None + + type: Optional[Literal["tool_call"]] = None + + +class DocumentDocumentTaskCommentChildToolResult(BaseModel): + """The result of a tool call.""" + + output: Union[str, Dict[str, object], List[object]] + + tool_call_id: str + + tool_name: str + + id: Optional[str] = None + + is_error: Optional[bool] = None + + type: Optional[Literal["tool_result"]] = None + + +class DocumentDocumentTaskCommentChildTraceMessage(BaseModel): + """A message in an agent trace (user message, assistant message, or thinking).""" + + text: str + + id: Optional[str] = None + + message_type: Optional[Literal["message", "thinking"]] = None + + role: Optional[Literal["user", "assistant"]] = None + + timestamp: Optional[datetime] = None + + type: Optional[Literal["trace_message"]] = None + + +class DocumentDocumentTaskCommentChildUtterance(BaseModel): + """A speaker-attributed segment of a transcript (ENG-2476/D10). + + "Utterance" is the standard name for this across transcription providers + (AssemblyAI, Deepgram, Rev). Timestamps are relative offsets in seconds — + provider-native; absolute times derive from `Transcript.started_at`. + """ + + text: str + + id: Optional[str] = None + + end: Optional[float] = None + + speaker: Optional[object] = None + + start: Optional[float] = None + + type: Optional[Literal["utterance"]] = None + + +DocumentDocumentTaskCommentChild: TypeAlias = Annotated[ + Union[ + DocumentDocumentTaskCommentChildBlob, + DocumentDocumentTaskCommentChildCallout, + DocumentDocumentTaskCommentChildChunk, + DocumentDocumentTaskCommentChildCode, + DocumentDocumentTaskCommentChildComment, + DocumentDocumentTaskCommentChildDivider, + DocumentDocumentTaskCommentChildEquation, + DocumentDocumentTaskCommentChildFootnote, + DocumentDocumentTaskCommentChildHeading, + DocumentDocumentTaskCommentChildImage, + DocumentDocumentTaskCommentChildLink, + DocumentDocumentTaskCommentChildLineBreak, + DocumentDocumentTaskCommentChildList, + DocumentDocumentTaskCommentChildListItem, + DocumentDocumentTaskCommentChildParagraph, + DocumentDocumentTaskCommentChildQuote, + DocumentDocumentTaskCommentChildTable, + DocumentDocumentTaskCommentChildTableCell, + DocumentDocumentTaskCommentChildTableRow, + DocumentDocumentTaskCommentChildText, + DocumentDocumentTaskCommentChildToDo, + DocumentDocumentTaskCommentChildToolCall, + DocumentDocumentTaskCommentChildToolResult, + DocumentDocumentTaskCommentChildTraceMessage, + DocumentDocumentTaskCommentChildUtterance, + ], + PropertyInfo(discriminator="type"), +] + + +class DocumentDocumentTaskCommentMentionedUserChildBlob(BaseModel): + """Represents embedded binary data using data URI scheme. + + Format: data:[][;base64], + Example: data:text/html;base64,PGh0bWw+... + """ + + data: str + + mimetype: str + + id: Optional[str] = None + + type: Optional[Literal["blob"]] = None + + +class DocumentDocumentTaskCommentMentionedUserChildCode(BaseModel): + text: str + + id: Optional[str] = None + + language: Optional[str] = None + + type: Optional[Literal["code"]] = None + + +class DocumentDocumentTaskCommentMentionedUserChildComment(BaseModel): + text: str + + id: Optional[str] = None + + created_at: Optional[datetime] = None + + type: Optional[Literal["comment"]] = None + + +class DocumentDocumentTaskCommentMentionedUserChildDivider(BaseModel): + id: Optional[str] = None + + type: Optional[Literal["divider"]] = None + + +class DocumentDocumentTaskCommentMentionedUserChildImage(BaseModel): + src: str + + text: str + + id: Optional[str] = None + + type: Optional[Literal["image"]] = None + + +class DocumentDocumentTaskCommentMentionedUserChildLink(BaseModel): + text: str + + url: str + + id: Optional[str] = None + + type: Optional[Literal["link"]] = None + + +class DocumentDocumentTaskCommentMentionedUserChildLineBreak(BaseModel): + id: Optional[str] = None + + type: Optional[Literal["line_break"]] = None + + +class DocumentDocumentTaskCommentMentionedUserChildText(BaseModel): + text: str + + id: Optional[str] = None + + marks: Optional[List[Literal["bold", "italic", "underline", "strikethrough", "code", "math"]]] = None + + type: Optional[Literal["text"]] = None + + +class DocumentDocumentTaskCommentMentionedUserChildToolCall(BaseModel): + """A tool/function call made by the assistant.""" + + tool_call_id: str + + tool_name: str + + id: Optional[str] = None + + args: Optional[Dict[str, object]] = None + + type: Optional[Literal["tool_call"]] = None + + +class DocumentDocumentTaskCommentMentionedUserChildToolResult(BaseModel): + """The result of a tool call.""" + + output: Union[str, Dict[str, object], List[object]] + + tool_call_id: str + + tool_name: str + + id: Optional[str] = None + + is_error: Optional[bool] = None + + type: Optional[Literal["tool_result"]] = None + + +class DocumentDocumentTaskCommentMentionedUserChildTraceMessage(BaseModel): + """A message in an agent trace (user message, assistant message, or thinking).""" + + text: str + + id: Optional[str] = None + + message_type: Optional[Literal["message", "thinking"]] = None + + role: Optional[Literal["user", "assistant"]] = None + + timestamp: Optional[datetime] = None + + type: Optional[Literal["trace_message"]] = None + + +DocumentDocumentTaskCommentMentionedUserChild: TypeAlias = Union[ + DocumentDocumentTaskCommentMentionedUserChildBlob, + DocumentDocumentTaskCommentMentionedUserChildCode, + DocumentDocumentTaskCommentMentionedUserChildComment, + DocumentDocumentTaskCommentMentionedUserChildDivider, + DocumentDocumentTaskCommentMentionedUserChildImage, + DocumentDocumentTaskCommentMentionedUserChildLink, + DocumentDocumentTaskCommentMentionedUserChildLineBreak, + DocumentDocumentTaskCommentMentionedUserChildText, + DocumentDocumentTaskCommentMentionedUserChildToolCall, + DocumentDocumentTaskCommentMentionedUserChildToolResult, + DocumentDocumentTaskCommentMentionedUserChildTraceMessage, + object, +] + + +class DocumentDocumentTaskCommentMentionedUser(BaseModel): + id: Optional[str] = None + + address: Optional[str] = None + + alt_names: Optional[List[str]] = None + + children: Optional[List[DocumentDocumentTaskCommentMentionedUserChild]] = None + + company: Optional[str] = None + + company_ids: Optional[List[str]] = None + + date_of_birth: Optional[date] = None + + deal_ids: Optional[List[str]] = None + + email: Optional[str] = None + + emails: Optional[List[str]] = None + """All known email addresses; `email` holds the primary one""" + + image_url: Optional[str] = None + + job_title: Optional[str] = None + + link_urls: Optional[List[str]] = None + + name: Optional[str] = None + + phone_numbers: Optional[List[str]] = None + + tags: Optional[List[str]] = None + + text: Optional[str] = None + + type: Optional[Literal["person"]] = None + + username: Optional[str] = None + + +class DocumentDocumentTaskComment(BaseModel): + date: datetime + + sender: DocumentDocumentTaskCommentSender + + id: Optional[str] = None + + channel: Optional[str] = None + """ + The channel or platform where the message was posted, if this Message is not + explicitly part of a conversation + """ + + children: Optional[List[DocumentDocumentTaskCommentChild]] = None + + external_id: Optional[str] = None + """Provider message id (e.g. Slack ts, Gmail message id) — merge-dedup key""" + + is_self: Optional[bool] = None + + mentioned_users: Optional[List[DocumentDocumentTaskCommentMentionedUser]] = None + + num_replies: Optional[int] = None + + replies: Optional[List[object]] = None + """The replies or comments to the message""" + + text: Optional[str] = None + + thread_id: Optional[str] = None + + title: Optional[str] = None + """The subject or title of the message""" + + type: Optional[Literal["message"]] = None + + updated_at: Optional[datetime] = None + + upvotes: Optional[int] = None + """The number of upvotes, likes, or reactions on the message""" + + +class DocumentDocumentTask(BaseModel): + id: Optional[str] = None + + children: Optional[List[DocumentDocumentTaskChild]] = None + + comments: Optional[List[DocumentDocumentTaskComment]] = None + + due_at: Optional[datetime] = None + + priority: Optional[Literal["urgent", "high", "medium", "low"]] = None + + status: Optional[Literal["completed", "not_started", "in_progress", "cancelled"]] = None + + text: Optional[str] = None + + type: Optional[Literal["task"]] = None + + +class DocumentDocumentPersonChildBlob(BaseModel): + """Represents embedded binary data using data URI scheme. + + Format: data:[][;base64], + Example: data:text/html;base64,PGh0bWw+... + """ + + data: str + + mimetype: str + + id: Optional[str] = None + + type: Optional[Literal["blob"]] = None + + +class DocumentDocumentPersonChildCode(BaseModel): + text: str + + id: Optional[str] = None + + language: Optional[str] = None + + type: Optional[Literal["code"]] = None + + +class DocumentDocumentPersonChildComment(BaseModel): + text: str + + id: Optional[str] = None + + created_at: Optional[datetime] = None + + type: Optional[Literal["comment"]] = None + + +class DocumentDocumentPersonChildDivider(BaseModel): + id: Optional[str] = None + + type: Optional[Literal["divider"]] = None + + +class DocumentDocumentPersonChildImage(BaseModel): + src: str + + text: str + + id: Optional[str] = None + + type: Optional[Literal["image"]] = None + + +class DocumentDocumentPersonChildLink(BaseModel): + text: str + + url: str + + id: Optional[str] = None + + type: Optional[Literal["link"]] = None + + +class DocumentDocumentPersonChildLineBreak(BaseModel): + id: Optional[str] = None + + type: Optional[Literal["line_break"]] = None + + +class DocumentDocumentPersonChildText(BaseModel): + text: str + + id: Optional[str] = None + + marks: Optional[List[Literal["bold", "italic", "underline", "strikethrough", "code", "math"]]] = None + + type: Optional[Literal["text"]] = None + + +class DocumentDocumentPersonChildToolCall(BaseModel): + """A tool/function call made by the assistant.""" + + tool_call_id: str + + tool_name: str + + id: Optional[str] = None + + args: Optional[Dict[str, object]] = None + + type: Optional[Literal["tool_call"]] = None + + +class DocumentDocumentPersonChildToolResult(BaseModel): + """The result of a tool call.""" + + output: Union[str, Dict[str, object], List[object]] + + tool_call_id: str + + tool_name: str + + id: Optional[str] = None + + is_error: Optional[bool] = None + + type: Optional[Literal["tool_result"]] = None + + +class DocumentDocumentPersonChildTraceMessage(BaseModel): + """A message in an agent trace (user message, assistant message, or thinking).""" + + text: str + + id: Optional[str] = None + + message_type: Optional[Literal["message", "thinking"]] = None + + role: Optional[Literal["user", "assistant"]] = None + + timestamp: Optional[datetime] = None + + type: Optional[Literal["trace_message"]] = None + + +DocumentDocumentPersonChild: TypeAlias = Union[ + DocumentDocumentPersonChildBlob, + DocumentDocumentPersonChildCode, + DocumentDocumentPersonChildComment, + DocumentDocumentPersonChildDivider, + DocumentDocumentPersonChildImage, + DocumentDocumentPersonChildLink, + DocumentDocumentPersonChildLineBreak, + DocumentDocumentPersonChildText, + DocumentDocumentPersonChildToolCall, + DocumentDocumentPersonChildToolResult, + DocumentDocumentPersonChildTraceMessage, + object, +] + + +class DocumentDocumentPerson(BaseModel): + id: Optional[str] = None + + address: Optional[str] = None + + alt_names: Optional[List[str]] = None + + children: Optional[List[DocumentDocumentPersonChild]] = None + + company: Optional[str] = None + + company_ids: Optional[List[str]] = None + + date_of_birth: Optional[date] = None + + deal_ids: Optional[List[str]] = None + + email: Optional[str] = None + + emails: Optional[List[str]] = None + """All known email addresses; `email` holds the primary one""" + + image_url: Optional[str] = None + + job_title: Optional[str] = None + + link_urls: Optional[List[str]] = None + + name: Optional[str] = None + + phone_numbers: Optional[List[str]] = None + + tags: Optional[List[str]] = None + + text: Optional[str] = None + + type: Optional[Literal["person"]] = None + + username: Optional[str] = None + + +class DocumentDocumentMessageSenderChildBlob(BaseModel): + """Represents embedded binary data using data URI scheme. + + Format: data:[][;base64], + Example: data:text/html;base64,PGh0bWw+... + """ + + data: str + + mimetype: str + + id: Optional[str] = None + + type: Optional[Literal["blob"]] = None + + +class DocumentDocumentMessageSenderChildCode(BaseModel): + text: str + + id: Optional[str] = None + + language: Optional[str] = None + + type: Optional[Literal["code"]] = None + + +class DocumentDocumentMessageSenderChildComment(BaseModel): + text: str + + id: Optional[str] = None + + created_at: Optional[datetime] = None + + type: Optional[Literal["comment"]] = None + + +class DocumentDocumentMessageSenderChildDivider(BaseModel): + id: Optional[str] = None + + type: Optional[Literal["divider"]] = None + + +class DocumentDocumentMessageSenderChildImage(BaseModel): + src: str + + text: str + + id: Optional[str] = None + + type: Optional[Literal["image"]] = None + + +class DocumentDocumentMessageSenderChildLink(BaseModel): + text: str + + url: str + + id: Optional[str] = None + + type: Optional[Literal["link"]] = None + + +class DocumentDocumentMessageSenderChildLineBreak(BaseModel): + id: Optional[str] = None + + type: Optional[Literal["line_break"]] = None + + +class DocumentDocumentMessageSenderChildText(BaseModel): + text: str + + id: Optional[str] = None + + marks: Optional[List[Literal["bold", "italic", "underline", "strikethrough", "code", "math"]]] = None + + type: Optional[Literal["text"]] = None + + +class DocumentDocumentMessageSenderChildToolCall(BaseModel): + """A tool/function call made by the assistant.""" + + tool_call_id: str + + tool_name: str + + id: Optional[str] = None + + args: Optional[Dict[str, object]] = None + + type: Optional[Literal["tool_call"]] = None + + +class DocumentDocumentMessageSenderChildToolResult(BaseModel): + """The result of a tool call.""" + + output: Union[str, Dict[str, object], List[object]] + + tool_call_id: str + + tool_name: str + + id: Optional[str] = None + + is_error: Optional[bool] = None + + type: Optional[Literal["tool_result"]] = None + + +class DocumentDocumentMessageSenderChildTraceMessage(BaseModel): + """A message in an agent trace (user message, assistant message, or thinking).""" + + text: str + + id: Optional[str] = None + + message_type: Optional[Literal["message", "thinking"]] = None + + role: Optional[Literal["user", "assistant"]] = None + + timestamp: Optional[datetime] = None + + type: Optional[Literal["trace_message"]] = None + + +DocumentDocumentMessageSenderChild: TypeAlias = Union[ + DocumentDocumentMessageSenderChildBlob, + DocumentDocumentMessageSenderChildCode, + DocumentDocumentMessageSenderChildComment, + DocumentDocumentMessageSenderChildDivider, + DocumentDocumentMessageSenderChildImage, + DocumentDocumentMessageSenderChildLink, + DocumentDocumentMessageSenderChildLineBreak, + DocumentDocumentMessageSenderChildText, + DocumentDocumentMessageSenderChildToolCall, + DocumentDocumentMessageSenderChildToolResult, + DocumentDocumentMessageSenderChildTraceMessage, + object, +] + + +class DocumentDocumentMessageSender(BaseModel): + id: Optional[str] = None + + address: Optional[str] = None + + alt_names: Optional[List[str]] = None + + children: Optional[List[DocumentDocumentMessageSenderChild]] = None + + company: Optional[str] = None + + company_ids: Optional[List[str]] = None + + date_of_birth: Optional[date] = None + + deal_ids: Optional[List[str]] = None + + email: Optional[str] = None + + emails: Optional[List[str]] = None + """All known email addresses; `email` holds the primary one""" + + image_url: Optional[str] = None + + job_title: Optional[str] = None + + link_urls: Optional[List[str]] = None + + name: Optional[str] = None + + phone_numbers: Optional[List[str]] = None + + tags: Optional[List[str]] = None + + text: Optional[str] = None + + type: Optional[Literal["person"]] = None + + username: Optional[str] = None + + +class DocumentDocumentMessageChildBlob(BaseModel): + """Represents embedded binary data using data URI scheme. + + Format: data:[][;base64], + Example: data:text/html;base64,PGh0bWw+... + """ + + data: str + + mimetype: str + + id: Optional[str] = None + + type: Optional[Literal["blob"]] = None + + +class DocumentDocumentMessageChildCalloutChildBlob(BaseModel): + """Represents embedded binary data using data URI scheme. + + Format: data:[][;base64], + Example: data:text/html;base64,PGh0bWw+... + """ + + data: str + + mimetype: str + + id: Optional[str] = None + + type: Optional[Literal["blob"]] = None + + +class DocumentDocumentMessageChildCalloutChildCode(BaseModel): + text: str + + id: Optional[str] = None + + language: Optional[str] = None + + type: Optional[Literal["code"]] = None + + +class DocumentDocumentMessageChildCalloutChildComment(BaseModel): + text: str + + id: Optional[str] = None + + created_at: Optional[datetime] = None + + type: Optional[Literal["comment"]] = None + + +class DocumentDocumentMessageChildCalloutChildDivider(BaseModel): + id: Optional[str] = None + + type: Optional[Literal["divider"]] = None + + +class DocumentDocumentMessageChildCalloutChildImage(BaseModel): + src: str + + text: str + + id: Optional[str] = None + + type: Optional[Literal["image"]] = None + + +class DocumentDocumentMessageChildCalloutChildLink(BaseModel): + text: str + + url: str + + id: Optional[str] = None + + type: Optional[Literal["link"]] = None + + +class DocumentDocumentMessageChildCalloutChildLineBreak(BaseModel): + id: Optional[str] = None + + type: Optional[Literal["line_break"]] = None + + +class DocumentDocumentMessageChildCalloutChildText(BaseModel): + text: str + + id: Optional[str] = None + + marks: Optional[List[Literal["bold", "italic", "underline", "strikethrough", "code", "math"]]] = None + + type: Optional[Literal["text"]] = None + + +class DocumentDocumentMessageChildCalloutChildToolCall(BaseModel): + """A tool/function call made by the assistant.""" + + tool_call_id: str + + tool_name: str + + id: Optional[str] = None + + args: Optional[Dict[str, object]] = None + + type: Optional[Literal["tool_call"]] = None + + +class DocumentDocumentMessageChildCalloutChildToolResult(BaseModel): + """The result of a tool call.""" + + output: Union[str, Dict[str, object], List[object]] + + tool_call_id: str + + tool_name: str + + id: Optional[str] = None + + is_error: Optional[bool] = None + + type: Optional[Literal["tool_result"]] = None + + +class DocumentDocumentMessageChildCalloutChildTraceMessage(BaseModel): + """A message in an agent trace (user message, assistant message, or thinking).""" + + text: str + + id: Optional[str] = None + + message_type: Optional[Literal["message", "thinking"]] = None + + role: Optional[Literal["user", "assistant"]] = None + + timestamp: Optional[datetime] = None + + type: Optional[Literal["trace_message"]] = None + + +DocumentDocumentMessageChildCalloutChild: TypeAlias = Union[ + DocumentDocumentMessageChildCalloutChildBlob, + DocumentDocumentMessageChildCalloutChildCode, + DocumentDocumentMessageChildCalloutChildComment, + DocumentDocumentMessageChildCalloutChildDivider, + DocumentDocumentMessageChildCalloutChildImage, + DocumentDocumentMessageChildCalloutChildLink, + DocumentDocumentMessageChildCalloutChildLineBreak, + DocumentDocumentMessageChildCalloutChildText, + DocumentDocumentMessageChildCalloutChildToolCall, + DocumentDocumentMessageChildCalloutChildToolResult, + DocumentDocumentMessageChildCalloutChildTraceMessage, + object, +] + + +class DocumentDocumentMessageChildCallout(BaseModel): + id: Optional[str] = None + + children: Optional[List[DocumentDocumentMessageChildCalloutChild]] = None + + text: Optional[str] = None + + title: Optional[str] = None + + type: Optional[Literal["callout"]] = None + + +class DocumentDocumentMessageChildChunkChildBlob(BaseModel): + """Represents embedded binary data using data URI scheme. + + Format: data:[][;base64], + Example: data:text/html;base64,PGh0bWw+... + """ + + data: str + + mimetype: str + + id: Optional[str] = None + + type: Optional[Literal["blob"]] = None + + +class DocumentDocumentMessageChildChunkChildCode(BaseModel): + text: str + + id: Optional[str] = None + + language: Optional[str] = None + + type: Optional[Literal["code"]] = None + + +class DocumentDocumentMessageChildChunkChildComment(BaseModel): + text: str + + id: Optional[str] = None + + created_at: Optional[datetime] = None + + type: Optional[Literal["comment"]] = None + + +class DocumentDocumentMessageChildChunkChildDivider(BaseModel): + id: Optional[str] = None + + type: Optional[Literal["divider"]] = None + + +class DocumentDocumentMessageChildChunkChildImage(BaseModel): + src: str + + text: str + + id: Optional[str] = None + + type: Optional[Literal["image"]] = None + + +class DocumentDocumentMessageChildChunkChildLink(BaseModel): + text: str + + url: str + + id: Optional[str] = None + + type: Optional[Literal["link"]] = None + + +class DocumentDocumentMessageChildChunkChildLineBreak(BaseModel): + id: Optional[str] = None + + type: Optional[Literal["line_break"]] = None + + +class DocumentDocumentMessageChildChunkChildText(BaseModel): + text: str + + id: Optional[str] = None + + marks: Optional[List[Literal["bold", "italic", "underline", "strikethrough", "code", "math"]]] = None + + type: Optional[Literal["text"]] = None + + +class DocumentDocumentMessageChildChunkChildToolCall(BaseModel): + """A tool/function call made by the assistant.""" + + tool_call_id: str + + tool_name: str + + id: Optional[str] = None + + args: Optional[Dict[str, object]] = None + + type: Optional[Literal["tool_call"]] = None + + +class DocumentDocumentMessageChildChunkChildToolResult(BaseModel): + """The result of a tool call.""" + + output: Union[str, Dict[str, object], List[object]] + + tool_call_id: str + + tool_name: str + + id: Optional[str] = None + + is_error: Optional[bool] = None + + type: Optional[Literal["tool_result"]] = None + + +class DocumentDocumentMessageChildChunkChildTraceMessage(BaseModel): + """A message in an agent trace (user message, assistant message, or thinking).""" + + text: str + + id: Optional[str] = None + + message_type: Optional[Literal["message", "thinking"]] = None + + role: Optional[Literal["user", "assistant"]] = None + + timestamp: Optional[datetime] = None + + type: Optional[Literal["trace_message"]] = None + + +DocumentDocumentMessageChildChunkChild: TypeAlias = Union[ + DocumentDocumentMessageChildChunkChildBlob, + DocumentDocumentMessageChildChunkChildCode, + DocumentDocumentMessageChildChunkChildComment, + DocumentDocumentMessageChildChunkChildDivider, + DocumentDocumentMessageChildChunkChildImage, + DocumentDocumentMessageChildChunkChildLink, + DocumentDocumentMessageChildChunkChildLineBreak, + DocumentDocumentMessageChildChunkChildText, + DocumentDocumentMessageChildChunkChildToolCall, + DocumentDocumentMessageChildChunkChildToolResult, + DocumentDocumentMessageChildChunkChildTraceMessage, + object, +] + + +class DocumentDocumentMessageChildChunk(BaseModel): + id: Optional[str] = None + + children: Optional[List[DocumentDocumentMessageChildChunkChild]] = None + + text: Optional[str] = None + + type: Optional[Literal["chunk"]] = None + + +class DocumentDocumentMessageChildCode(BaseModel): + text: str + + id: Optional[str] = None + + language: Optional[str] = None + + type: Optional[Literal["code"]] = None + + +class DocumentDocumentMessageChildComment(BaseModel): + text: str + + id: Optional[str] = None + + created_at: Optional[datetime] = None + + type: Optional[Literal["comment"]] = None + + +class DocumentDocumentMessageChildDivider(BaseModel): + id: Optional[str] = None + + type: Optional[Literal["divider"]] = None + + +class DocumentDocumentMessageChildEquationChildBlob(BaseModel): + """Represents embedded binary data using data URI scheme. + + Format: data:[][;base64], + Example: data:text/html;base64,PGh0bWw+... + """ + + data: str + + mimetype: str + + id: Optional[str] = None + + type: Optional[Literal["blob"]] = None + + +class DocumentDocumentMessageChildEquationChildCode(BaseModel): + text: str + + id: Optional[str] = None + + language: Optional[str] = None + + type: Optional[Literal["code"]] = None + + +class DocumentDocumentMessageChildEquationChildComment(BaseModel): + text: str + + id: Optional[str] = None + + created_at: Optional[datetime] = None + + type: Optional[Literal["comment"]] = None + + +class DocumentDocumentMessageChildEquationChildDivider(BaseModel): + id: Optional[str] = None + + type: Optional[Literal["divider"]] = None + + +class DocumentDocumentMessageChildEquationChildImage(BaseModel): + src: str + + text: str + + id: Optional[str] = None + + type: Optional[Literal["image"]] = None + + +class DocumentDocumentMessageChildEquationChildLink(BaseModel): + text: str + + url: str + + id: Optional[str] = None + + type: Optional[Literal["link"]] = None + + +class DocumentDocumentMessageChildEquationChildLineBreak(BaseModel): + id: Optional[str] = None + + type: Optional[Literal["line_break"]] = None + + +class DocumentDocumentMessageChildEquationChildText(BaseModel): + text: str + + id: Optional[str] = None + + marks: Optional[List[Literal["bold", "italic", "underline", "strikethrough", "code", "math"]]] = None + + type: Optional[Literal["text"]] = None + + +class DocumentDocumentMessageChildEquationChildToolCall(BaseModel): + """A tool/function call made by the assistant.""" + + tool_call_id: str + + tool_name: str + + id: Optional[str] = None + + args: Optional[Dict[str, object]] = None + + type: Optional[Literal["tool_call"]] = None + + +class DocumentDocumentMessageChildEquationChildToolResult(BaseModel): + """The result of a tool call.""" + + output: Union[str, Dict[str, object], List[object]] + + tool_call_id: str + + tool_name: str + + id: Optional[str] = None + + is_error: Optional[bool] = None + + type: Optional[Literal["tool_result"]] = None + + +class DocumentDocumentMessageChildEquationChildTraceMessage(BaseModel): + """A message in an agent trace (user message, assistant message, or thinking).""" + + text: str + + id: Optional[str] = None + + message_type: Optional[Literal["message", "thinking"]] = None + + role: Optional[Literal["user", "assistant"]] = None + + timestamp: Optional[datetime] = None + + type: Optional[Literal["trace_message"]] = None + + +DocumentDocumentMessageChildEquationChild: TypeAlias = Union[ + DocumentDocumentMessageChildEquationChildBlob, + DocumentDocumentMessageChildEquationChildCode, + DocumentDocumentMessageChildEquationChildComment, + DocumentDocumentMessageChildEquationChildDivider, + DocumentDocumentMessageChildEquationChildImage, + DocumentDocumentMessageChildEquationChildLink, + DocumentDocumentMessageChildEquationChildLineBreak, + DocumentDocumentMessageChildEquationChildText, + DocumentDocumentMessageChildEquationChildToolCall, + DocumentDocumentMessageChildEquationChildToolResult, + DocumentDocumentMessageChildEquationChildTraceMessage, + object, +] + + +class DocumentDocumentMessageChildEquation(BaseModel): + id: Optional[str] = None + + children: Optional[List[DocumentDocumentMessageChildEquationChild]] = None + + text: Optional[str] = None + + type: Optional[Literal["equation"]] = None + + +class DocumentDocumentMessageChildFootnoteChildBlob(BaseModel): + """Represents embedded binary data using data URI scheme. + + Format: data:[][;base64], + Example: data:text/html;base64,PGh0bWw+... + """ + + data: str + + mimetype: str + + id: Optional[str] = None + + type: Optional[Literal["blob"]] = None + + +class DocumentDocumentMessageChildFootnoteChildCode(BaseModel): + text: str + + id: Optional[str] = None + + language: Optional[str] = None + + type: Optional[Literal["code"]] = None + + +class DocumentDocumentMessageChildFootnoteChildComment(BaseModel): + text: str + + id: Optional[str] = None + + created_at: Optional[datetime] = None + + type: Optional[Literal["comment"]] = None + + +class DocumentDocumentMessageChildFootnoteChildDivider(BaseModel): + id: Optional[str] = None + + type: Optional[Literal["divider"]] = None + + +class DocumentDocumentMessageChildFootnoteChildImage(BaseModel): + src: str + + text: str + + id: Optional[str] = None + + type: Optional[Literal["image"]] = None + + +class DocumentDocumentMessageChildFootnoteChildLink(BaseModel): + text: str + + url: str + + id: Optional[str] = None + + type: Optional[Literal["link"]] = None + + +class DocumentDocumentMessageChildFootnoteChildLineBreak(BaseModel): + id: Optional[str] = None + + type: Optional[Literal["line_break"]] = None + + +class DocumentDocumentMessageChildFootnoteChildText(BaseModel): + text: str + + id: Optional[str] = None + + marks: Optional[List[Literal["bold", "italic", "underline", "strikethrough", "code", "math"]]] = None + + type: Optional[Literal["text"]] = None + + +class DocumentDocumentMessageChildFootnoteChildToolCall(BaseModel): + """A tool/function call made by the assistant.""" + + tool_call_id: str + + tool_name: str + + id: Optional[str] = None + + args: Optional[Dict[str, object]] = None + + type: Optional[Literal["tool_call"]] = None + + +class DocumentDocumentMessageChildFootnoteChildToolResult(BaseModel): + """The result of a tool call.""" + + output: Union[str, Dict[str, object], List[object]] + + tool_call_id: str + + tool_name: str + + id: Optional[str] = None + + is_error: Optional[bool] = None + + type: Optional[Literal["tool_result"]] = None + + +class DocumentDocumentMessageChildFootnoteChildTraceMessage(BaseModel): + """A message in an agent trace (user message, assistant message, or thinking).""" + + text: str + + id: Optional[str] = None + + message_type: Optional[Literal["message", "thinking"]] = None + + role: Optional[Literal["user", "assistant"]] = None + + timestamp: Optional[datetime] = None + + type: Optional[Literal["trace_message"]] = None + + +DocumentDocumentMessageChildFootnoteChild: TypeAlias = Union[ + DocumentDocumentMessageChildFootnoteChildBlob, + DocumentDocumentMessageChildFootnoteChildCode, + DocumentDocumentMessageChildFootnoteChildComment, + DocumentDocumentMessageChildFootnoteChildDivider, + DocumentDocumentMessageChildFootnoteChildImage, + DocumentDocumentMessageChildFootnoteChildLink, + DocumentDocumentMessageChildFootnoteChildLineBreak, + DocumentDocumentMessageChildFootnoteChildText, + DocumentDocumentMessageChildFootnoteChildToolCall, + DocumentDocumentMessageChildFootnoteChildToolResult, + DocumentDocumentMessageChildFootnoteChildTraceMessage, + object, +] + + +class DocumentDocumentMessageChildFootnote(BaseModel): + id: Optional[str] = None + + children: Optional[List[DocumentDocumentMessageChildFootnoteChild]] = None + + text: Optional[str] = None + + type: Optional[Literal["footnote"]] = None + + +class DocumentDocumentMessageChildHeadingChildBlob(BaseModel): + """Represents embedded binary data using data URI scheme. + + Format: data:[][;base64], + Example: data:text/html;base64,PGh0bWw+... + """ + + data: str + + mimetype: str + + id: Optional[str] = None + + type: Optional[Literal["blob"]] = None + + +class DocumentDocumentMessageChildHeadingChildCode(BaseModel): + text: str + + id: Optional[str] = None + + language: Optional[str] = None + + type: Optional[Literal["code"]] = None + + +class DocumentDocumentMessageChildHeadingChildComment(BaseModel): + text: str + + id: Optional[str] = None + + created_at: Optional[datetime] = None + + type: Optional[Literal["comment"]] = None + + +class DocumentDocumentMessageChildHeadingChildDivider(BaseModel): + id: Optional[str] = None + + type: Optional[Literal["divider"]] = None + + +class DocumentDocumentMessageChildHeadingChildImage(BaseModel): + src: str + + text: str + + id: Optional[str] = None + + type: Optional[Literal["image"]] = None + + +class DocumentDocumentMessageChildHeadingChildLink(BaseModel): + text: str + + url: str + + id: Optional[str] = None + + type: Optional[Literal["link"]] = None + + +class DocumentDocumentMessageChildHeadingChildLineBreak(BaseModel): + id: Optional[str] = None + + type: Optional[Literal["line_break"]] = None + + +class DocumentDocumentMessageChildHeadingChildText(BaseModel): + text: str + + id: Optional[str] = None + + marks: Optional[List[Literal["bold", "italic", "underline", "strikethrough", "code", "math"]]] = None + + type: Optional[Literal["text"]] = None + + +class DocumentDocumentMessageChildHeadingChildToolCall(BaseModel): + """A tool/function call made by the assistant.""" + + tool_call_id: str + + tool_name: str + + id: Optional[str] = None + + args: Optional[Dict[str, object]] = None + + type: Optional[Literal["tool_call"]] = None + + +class DocumentDocumentMessageChildHeadingChildToolResult(BaseModel): + """The result of a tool call.""" + + output: Union[str, Dict[str, object], List[object]] + + tool_call_id: str + + tool_name: str + + id: Optional[str] = None + + is_error: Optional[bool] = None + + type: Optional[Literal["tool_result"]] = None + + +class DocumentDocumentMessageChildHeadingChildTraceMessage(BaseModel): + """A message in an agent trace (user message, assistant message, or thinking).""" + + text: str + + id: Optional[str] = None + + message_type: Optional[Literal["message", "thinking"]] = None + + role: Optional[Literal["user", "assistant"]] = None + + timestamp: Optional[datetime] = None + + type: Optional[Literal["trace_message"]] = None + + +DocumentDocumentMessageChildHeadingChild: TypeAlias = Union[ + DocumentDocumentMessageChildHeadingChildBlob, + DocumentDocumentMessageChildHeadingChildCode, + DocumentDocumentMessageChildHeadingChildComment, + DocumentDocumentMessageChildHeadingChildDivider, + DocumentDocumentMessageChildHeadingChildImage, + DocumentDocumentMessageChildHeadingChildLink, + DocumentDocumentMessageChildHeadingChildLineBreak, + DocumentDocumentMessageChildHeadingChildText, + DocumentDocumentMessageChildHeadingChildToolCall, + DocumentDocumentMessageChildHeadingChildToolResult, + DocumentDocumentMessageChildHeadingChildTraceMessage, + object, +] + + +class DocumentDocumentMessageChildHeading(BaseModel): + level: int + + id: Optional[str] = None + + children: Optional[List[DocumentDocumentMessageChildHeadingChild]] = None + + text: Optional[str] = None + + type: Optional[Literal["heading"]] = None + + +class DocumentDocumentMessageChildImage(BaseModel): + src: str + + text: str + + id: Optional[str] = None + + type: Optional[Literal["image"]] = None + + +class DocumentDocumentMessageChildLink(BaseModel): + text: str + + url: str + + id: Optional[str] = None + + type: Optional[Literal["link"]] = None + + +class DocumentDocumentMessageChildLineBreak(BaseModel): + id: Optional[str] = None + + type: Optional[Literal["line_break"]] = None + + +class DocumentDocumentMessageChildList(BaseModel): + id: Optional[str] = None + + children: Optional[List[object]] = None + + ordered: Optional[bool] = None + + text: Optional[str] = None + + type: Optional[Literal["list"]] = None + + +class DocumentDocumentMessageChildListItemChildBlob(BaseModel): + """Represents embedded binary data using data URI scheme. + + Format: data:[][;base64], + Example: data:text/html;base64,PGh0bWw+... + """ + + data: str + + mimetype: str + + id: Optional[str] = None + + type: Optional[Literal["blob"]] = None + + +class DocumentDocumentMessageChildListItemChildCode(BaseModel): + text: str + + id: Optional[str] = None + + language: Optional[str] = None + + type: Optional[Literal["code"]] = None + + +class DocumentDocumentMessageChildListItemChildComment(BaseModel): + text: str + + id: Optional[str] = None + + created_at: Optional[datetime] = None + + type: Optional[Literal["comment"]] = None + + +class DocumentDocumentMessageChildListItemChildDivider(BaseModel): + id: Optional[str] = None + + type: Optional[Literal["divider"]] = None + + +class DocumentDocumentMessageChildListItemChildImage(BaseModel): + src: str + + text: str + + id: Optional[str] = None + + type: Optional[Literal["image"]] = None + + +class DocumentDocumentMessageChildListItemChildLink(BaseModel): + text: str + + url: str + + id: Optional[str] = None + + type: Optional[Literal["link"]] = None + + +class DocumentDocumentMessageChildListItemChildLineBreak(BaseModel): + id: Optional[str] = None + + type: Optional[Literal["line_break"]] = None + + +class DocumentDocumentMessageChildListItemChildText(BaseModel): + text: str + + id: Optional[str] = None + + marks: Optional[List[Literal["bold", "italic", "underline", "strikethrough", "code", "math"]]] = None + + type: Optional[Literal["text"]] = None + + +class DocumentDocumentMessageChildListItemChildToolCall(BaseModel): + """A tool/function call made by the assistant.""" + + tool_call_id: str + + tool_name: str + + id: Optional[str] = None + + args: Optional[Dict[str, object]] = None + + type: Optional[Literal["tool_call"]] = None + + +class DocumentDocumentMessageChildListItemChildToolResult(BaseModel): + """The result of a tool call.""" + + output: Union[str, Dict[str, object], List[object]] + + tool_call_id: str + + tool_name: str + + id: Optional[str] = None + + is_error: Optional[bool] = None + + type: Optional[Literal["tool_result"]] = None + + +class DocumentDocumentMessageChildListItemChildTraceMessage(BaseModel): + """A message in an agent trace (user message, assistant message, or thinking).""" + + text: str + + id: Optional[str] = None + + message_type: Optional[Literal["message", "thinking"]] = None + + role: Optional[Literal["user", "assistant"]] = None + + timestamp: Optional[datetime] = None + + type: Optional[Literal["trace_message"]] = None + + +DocumentDocumentMessageChildListItemChild: TypeAlias = Union[ + DocumentDocumentMessageChildListItemChildBlob, + DocumentDocumentMessageChildListItemChildCode, + DocumentDocumentMessageChildListItemChildComment, + DocumentDocumentMessageChildListItemChildDivider, + DocumentDocumentMessageChildListItemChildImage, + DocumentDocumentMessageChildListItemChildLink, + DocumentDocumentMessageChildListItemChildLineBreak, + DocumentDocumentMessageChildListItemChildText, + DocumentDocumentMessageChildListItemChildToolCall, + DocumentDocumentMessageChildListItemChildToolResult, + DocumentDocumentMessageChildListItemChildTraceMessage, + object, +] + + +class DocumentDocumentMessageChildListItem(BaseModel): + id: Optional[str] = None + + children: Optional[List[DocumentDocumentMessageChildListItemChild]] = None + + text: Optional[str] = None + + type: Optional[Literal["list_item"]] = None + + +class DocumentDocumentMessageChildParagraphChildBlob(BaseModel): + """Represents embedded binary data using data URI scheme. + + Format: data:[][;base64], + Example: data:text/html;base64,PGh0bWw+... + """ + + data: str + + mimetype: str + + id: Optional[str] = None + + type: Optional[Literal["blob"]] = None + + +class DocumentDocumentMessageChildParagraphChildCode(BaseModel): + text: str + + id: Optional[str] = None + + language: Optional[str] = None + + type: Optional[Literal["code"]] = None + + +class DocumentDocumentMessageChildParagraphChildComment(BaseModel): + text: str + + id: Optional[str] = None + + created_at: Optional[datetime] = None + + type: Optional[Literal["comment"]] = None + + +class DocumentDocumentMessageChildParagraphChildDivider(BaseModel): + id: Optional[str] = None + + type: Optional[Literal["divider"]] = None + + +class DocumentDocumentMessageChildParagraphChildImage(BaseModel): + src: str + + text: str + + id: Optional[str] = None + + type: Optional[Literal["image"]] = None + + +class DocumentDocumentMessageChildParagraphChildLink(BaseModel): + text: str + + url: str + + id: Optional[str] = None + + type: Optional[Literal["link"]] = None + + +class DocumentDocumentMessageChildParagraphChildLineBreak(BaseModel): + id: Optional[str] = None + + type: Optional[Literal["line_break"]] = None + + +class DocumentDocumentMessageChildParagraphChildText(BaseModel): + text: str + + id: Optional[str] = None + + marks: Optional[List[Literal["bold", "italic", "underline", "strikethrough", "code", "math"]]] = None + + type: Optional[Literal["text"]] = None + + +class DocumentDocumentMessageChildParagraphChildToolCall(BaseModel): + """A tool/function call made by the assistant.""" + + tool_call_id: str + + tool_name: str + + id: Optional[str] = None + + args: Optional[Dict[str, object]] = None + + type: Optional[Literal["tool_call"]] = None + + +class DocumentDocumentMessageChildParagraphChildToolResult(BaseModel): + """The result of a tool call.""" + + output: Union[str, Dict[str, object], List[object]] + + tool_call_id: str + + tool_name: str + + id: Optional[str] = None + + is_error: Optional[bool] = None + + type: Optional[Literal["tool_result"]] = None + + +class DocumentDocumentMessageChildParagraphChildTraceMessage(BaseModel): + """A message in an agent trace (user message, assistant message, or thinking).""" + + text: str + + id: Optional[str] = None + + message_type: Optional[Literal["message", "thinking"]] = None + + role: Optional[Literal["user", "assistant"]] = None + + timestamp: Optional[datetime] = None + + type: Optional[Literal["trace_message"]] = None + + +DocumentDocumentMessageChildParagraphChild: TypeAlias = Union[ + DocumentDocumentMessageChildParagraphChildBlob, + DocumentDocumentMessageChildParagraphChildCode, + DocumentDocumentMessageChildParagraphChildComment, + DocumentDocumentMessageChildParagraphChildDivider, + DocumentDocumentMessageChildParagraphChildImage, + DocumentDocumentMessageChildParagraphChildLink, + DocumentDocumentMessageChildParagraphChildLineBreak, + DocumentDocumentMessageChildParagraphChildText, + DocumentDocumentMessageChildParagraphChildToolCall, + DocumentDocumentMessageChildParagraphChildToolResult, + DocumentDocumentMessageChildParagraphChildTraceMessage, + object, +] + + +class DocumentDocumentMessageChildParagraph(BaseModel): + id: Optional[str] = None + + children: Optional[List[DocumentDocumentMessageChildParagraphChild]] = None + + text: Optional[str] = None + + type: Optional[Literal["paragraph"]] = None + + +class DocumentDocumentMessageChildQuoteChildBlob(BaseModel): + """Represents embedded binary data using data URI scheme. + + Format: data:[][;base64], + Example: data:text/html;base64,PGh0bWw+... + """ + + data: str + + mimetype: str + + id: Optional[str] = None + + type: Optional[Literal["blob"]] = None + + +class DocumentDocumentMessageChildQuoteChildCode(BaseModel): + text: str + + id: Optional[str] = None + + language: Optional[str] = None + + type: Optional[Literal["code"]] = None + + +class DocumentDocumentMessageChildQuoteChildComment(BaseModel): + text: str + + id: Optional[str] = None + + created_at: Optional[datetime] = None + + type: Optional[Literal["comment"]] = None + + +class DocumentDocumentMessageChildQuoteChildDivider(BaseModel): + id: Optional[str] = None + + type: Optional[Literal["divider"]] = None + + +class DocumentDocumentMessageChildQuoteChildImage(BaseModel): + src: str + + text: str + + id: Optional[str] = None + + type: Optional[Literal["image"]] = None + + +class DocumentDocumentMessageChildQuoteChildLink(BaseModel): + text: str + + url: str + + id: Optional[str] = None + + type: Optional[Literal["link"]] = None + + +class DocumentDocumentMessageChildQuoteChildLineBreak(BaseModel): + id: Optional[str] = None + + type: Optional[Literal["line_break"]] = None + + +class DocumentDocumentMessageChildQuoteChildText(BaseModel): + text: str + + id: Optional[str] = None + + marks: Optional[List[Literal["bold", "italic", "underline", "strikethrough", "code", "math"]]] = None + + type: Optional[Literal["text"]] = None + + +class DocumentDocumentMessageChildQuoteChildToolCall(BaseModel): + """A tool/function call made by the assistant.""" + + tool_call_id: str + + tool_name: str + + id: Optional[str] = None + + args: Optional[Dict[str, object]] = None + + type: Optional[Literal["tool_call"]] = None + + +class DocumentDocumentMessageChildQuoteChildToolResult(BaseModel): + """The result of a tool call.""" + + output: Union[str, Dict[str, object], List[object]] + + tool_call_id: str + + tool_name: str + + id: Optional[str] = None + + is_error: Optional[bool] = None + + type: Optional[Literal["tool_result"]] = None + + +class DocumentDocumentMessageChildQuoteChildTraceMessage(BaseModel): + """A message in an agent trace (user message, assistant message, or thinking).""" + + text: str + + id: Optional[str] = None + + message_type: Optional[Literal["message", "thinking"]] = None + + role: Optional[Literal["user", "assistant"]] = None + + timestamp: Optional[datetime] = None + + type: Optional[Literal["trace_message"]] = None + + +DocumentDocumentMessageChildQuoteChild: TypeAlias = Union[ + DocumentDocumentMessageChildQuoteChildBlob, + DocumentDocumentMessageChildQuoteChildCode, + DocumentDocumentMessageChildQuoteChildComment, + DocumentDocumentMessageChildQuoteChildDivider, + DocumentDocumentMessageChildQuoteChildImage, + DocumentDocumentMessageChildQuoteChildLink, + DocumentDocumentMessageChildQuoteChildLineBreak, + DocumentDocumentMessageChildQuoteChildText, + DocumentDocumentMessageChildQuoteChildToolCall, + DocumentDocumentMessageChildQuoteChildToolResult, + DocumentDocumentMessageChildQuoteChildTraceMessage, + object, +] + + +class DocumentDocumentMessageChildQuote(BaseModel): + id: Optional[str] = None + + children: Optional[List[DocumentDocumentMessageChildQuoteChild]] = None + + text: Optional[str] = None + + type: Optional[Literal["quote"]] = None + + +class DocumentDocumentMessageChildTable(BaseModel): + id: Optional[str] = None + + children: Optional[List[object]] = None + + has_header: Optional[bool] = None + """Whether the first row should be treated as a header""" + + text: Optional[str] = None + + type: Optional[Literal["table"]] = None + + +class DocumentDocumentMessageChildTableCellChildBlob(BaseModel): + """Represents embedded binary data using data URI scheme. + + Format: data:[][;base64], + Example: data:text/html;base64,PGh0bWw+... + """ + + data: str + + mimetype: str + + id: Optional[str] = None + + type: Optional[Literal["blob"]] = None + + +class DocumentDocumentMessageChildTableCellChildCode(BaseModel): + text: str + + id: Optional[str] = None + + language: Optional[str] = None + + type: Optional[Literal["code"]] = None + + +class DocumentDocumentMessageChildTableCellChildComment(BaseModel): + text: str + + id: Optional[str] = None + + created_at: Optional[datetime] = None + + type: Optional[Literal["comment"]] = None + + +class DocumentDocumentMessageChildTableCellChildDivider(BaseModel): + id: Optional[str] = None + + type: Optional[Literal["divider"]] = None + + +class DocumentDocumentMessageChildTableCellChildImage(BaseModel): + src: str + + text: str + + id: Optional[str] = None + + type: Optional[Literal["image"]] = None + + +class DocumentDocumentMessageChildTableCellChildLink(BaseModel): + text: str + + url: str + + id: Optional[str] = None + + type: Optional[Literal["link"]] = None + + +class DocumentDocumentMessageChildTableCellChildLineBreak(BaseModel): + id: Optional[str] = None + + type: Optional[Literal["line_break"]] = None + + +class DocumentDocumentMessageChildTableCellChildText(BaseModel): + text: str + + id: Optional[str] = None + + marks: Optional[List[Literal["bold", "italic", "underline", "strikethrough", "code", "math"]]] = None + + type: Optional[Literal["text"]] = None + + +class DocumentDocumentMessageChildTableCellChildToolCall(BaseModel): + """A tool/function call made by the assistant.""" + + tool_call_id: str + + tool_name: str + + id: Optional[str] = None + + args: Optional[Dict[str, object]] = None + + type: Optional[Literal["tool_call"]] = None + + +class DocumentDocumentMessageChildTableCellChildToolResult(BaseModel): + """The result of a tool call.""" + + output: Union[str, Dict[str, object], List[object]] + + tool_call_id: str + + tool_name: str + + id: Optional[str] = None + + is_error: Optional[bool] = None + + type: Optional[Literal["tool_result"]] = None + + +class DocumentDocumentMessageChildTableCellChildTraceMessage(BaseModel): + """A message in an agent trace (user message, assistant message, or thinking).""" + + text: str + + id: Optional[str] = None + + message_type: Optional[Literal["message", "thinking"]] = None + + role: Optional[Literal["user", "assistant"]] = None + + timestamp: Optional[datetime] = None + + type: Optional[Literal["trace_message"]] = None + + +DocumentDocumentMessageChildTableCellChild: TypeAlias = Union[ + DocumentDocumentMessageChildTableCellChildBlob, + DocumentDocumentMessageChildTableCellChildCode, + DocumentDocumentMessageChildTableCellChildComment, + DocumentDocumentMessageChildTableCellChildDivider, + DocumentDocumentMessageChildTableCellChildImage, + DocumentDocumentMessageChildTableCellChildLink, + DocumentDocumentMessageChildTableCellChildLineBreak, + DocumentDocumentMessageChildTableCellChildText, + DocumentDocumentMessageChildTableCellChildToolCall, + DocumentDocumentMessageChildTableCellChildToolResult, + DocumentDocumentMessageChildTableCellChildTraceMessage, + object, +] + + +class DocumentDocumentMessageChildTableCell(BaseModel): + id: Optional[str] = None + + align: Optional[Literal["left", "center", "right"]] = None + + children: Optional[List[DocumentDocumentMessageChildTableCellChild]] = None + + text: Optional[str] = None + + type: Optional[Literal["table_cell"]] = None + + +class DocumentDocumentMessageChildTableRow(BaseModel): + id: Optional[str] = None + + children: Optional[List[object]] = None + + text: Optional[str] = None + + type: Optional[Literal["table_row"]] = None + + +class DocumentDocumentMessageChildText(BaseModel): + text: str + + id: Optional[str] = None + + marks: Optional[List[Literal["bold", "italic", "underline", "strikethrough", "code", "math"]]] = None + + type: Optional[Literal["text"]] = None + + +class DocumentDocumentMessageChildToDoChildBlob(BaseModel): + """Represents embedded binary data using data URI scheme. + + Format: data:[][;base64], + Example: data:text/html;base64,PGh0bWw+... + """ + + data: str + + mimetype: str + + id: Optional[str] = None + + type: Optional[Literal["blob"]] = None + + +class DocumentDocumentMessageChildToDoChildCode(BaseModel): + text: str + + id: Optional[str] = None + + language: Optional[str] = None + + type: Optional[Literal["code"]] = None + + +class DocumentDocumentMessageChildToDoChildComment(BaseModel): + text: str + + id: Optional[str] = None + + created_at: Optional[datetime] = None + + type: Optional[Literal["comment"]] = None + + +class DocumentDocumentMessageChildToDoChildDivider(BaseModel): + id: Optional[str] = None + + type: Optional[Literal["divider"]] = None + + +class DocumentDocumentMessageChildToDoChildImage(BaseModel): + src: str + + text: str + + id: Optional[str] = None + + type: Optional[Literal["image"]] = None + + +class DocumentDocumentMessageChildToDoChildLink(BaseModel): + text: str + + url: str + + id: Optional[str] = None + + type: Optional[Literal["link"]] = None + + +class DocumentDocumentMessageChildToDoChildLineBreak(BaseModel): + id: Optional[str] = None + + type: Optional[Literal["line_break"]] = None + + +class DocumentDocumentMessageChildToDoChildText(BaseModel): + text: str + + id: Optional[str] = None + + marks: Optional[List[Literal["bold", "italic", "underline", "strikethrough", "code", "math"]]] = None + + type: Optional[Literal["text"]] = None + + +class DocumentDocumentMessageChildToDoChildToolCall(BaseModel): + """A tool/function call made by the assistant.""" + + tool_call_id: str + + tool_name: str + + id: Optional[str] = None + + args: Optional[Dict[str, object]] = None + + type: Optional[Literal["tool_call"]] = None + + +class DocumentDocumentMessageChildToDoChildToolResult(BaseModel): + """The result of a tool call.""" + + output: Union[str, Dict[str, object], List[object]] + + tool_call_id: str + + tool_name: str + + id: Optional[str] = None + + is_error: Optional[bool] = None + + type: Optional[Literal["tool_result"]] = None + + +class DocumentDocumentMessageChildToDoChildTraceMessage(BaseModel): + """A message in an agent trace (user message, assistant message, or thinking).""" + + text: str + + id: Optional[str] = None + + message_type: Optional[Literal["message", "thinking"]] = None + + role: Optional[Literal["user", "assistant"]] = None + + timestamp: Optional[datetime] = None + + type: Optional[Literal["trace_message"]] = None + + +DocumentDocumentMessageChildToDoChild: TypeAlias = Union[ + DocumentDocumentMessageChildToDoChildBlob, + DocumentDocumentMessageChildToDoChildCode, + DocumentDocumentMessageChildToDoChildComment, + DocumentDocumentMessageChildToDoChildDivider, + DocumentDocumentMessageChildToDoChildImage, + DocumentDocumentMessageChildToDoChildLink, + DocumentDocumentMessageChildToDoChildLineBreak, + DocumentDocumentMessageChildToDoChildText, + DocumentDocumentMessageChildToDoChildToolCall, + DocumentDocumentMessageChildToDoChildToolResult, + DocumentDocumentMessageChildToDoChildTraceMessage, + object, +] + + +class DocumentDocumentMessageChildToDo(BaseModel): + id: Optional[str] = None + + checked: Optional[bool] = None + + children: Optional[List[DocumentDocumentMessageChildToDoChild]] = None + + text: Optional[str] = None + + type: Optional[Literal["todo"]] = None + + +class DocumentDocumentMessageChildToolCall(BaseModel): + """A tool/function call made by the assistant.""" + + tool_call_id: str + + tool_name: str + + id: Optional[str] = None + + args: Optional[Dict[str, object]] = None + + type: Optional[Literal["tool_call"]] = None + + +class DocumentDocumentMessageChildToolResult(BaseModel): + """The result of a tool call.""" + + output: Union[str, Dict[str, object], List[object]] + + tool_call_id: str + + tool_name: str + + id: Optional[str] = None + + is_error: Optional[bool] = None + + type: Optional[Literal["tool_result"]] = None + + +class DocumentDocumentMessageChildTraceMessage(BaseModel): + """A message in an agent trace (user message, assistant message, or thinking).""" + + text: str + + id: Optional[str] = None + + message_type: Optional[Literal["message", "thinking"]] = None + + role: Optional[Literal["user", "assistant"]] = None + + timestamp: Optional[datetime] = None + + type: Optional[Literal["trace_message"]] = None + + +class DocumentDocumentMessageChildUtterance(BaseModel): + """A speaker-attributed segment of a transcript (ENG-2476/D10). + + "Utterance" is the standard name for this across transcription providers + (AssemblyAI, Deepgram, Rev). Timestamps are relative offsets in seconds — + provider-native; absolute times derive from `Transcript.started_at`. + """ + + text: str + + id: Optional[str] = None + + end: Optional[float] = None + + speaker: Optional[object] = None + + start: Optional[float] = None + + type: Optional[Literal["utterance"]] = None + + +DocumentDocumentMessageChild: TypeAlias = Annotated[ + Union[ + DocumentDocumentMessageChildBlob, + DocumentDocumentMessageChildCallout, + DocumentDocumentMessageChildChunk, + DocumentDocumentMessageChildCode, + DocumentDocumentMessageChildComment, + DocumentDocumentMessageChildDivider, + DocumentDocumentMessageChildEquation, + DocumentDocumentMessageChildFootnote, + DocumentDocumentMessageChildHeading, + DocumentDocumentMessageChildImage, + DocumentDocumentMessageChildLink, + DocumentDocumentMessageChildLineBreak, + DocumentDocumentMessageChildList, + DocumentDocumentMessageChildListItem, + DocumentDocumentMessageChildParagraph, + DocumentDocumentMessageChildQuote, + DocumentDocumentMessageChildTable, + DocumentDocumentMessageChildTableCell, + DocumentDocumentMessageChildTableRow, + DocumentDocumentMessageChildText, + DocumentDocumentMessageChildToDo, + DocumentDocumentMessageChildToolCall, + DocumentDocumentMessageChildToolResult, + DocumentDocumentMessageChildTraceMessage, + DocumentDocumentMessageChildUtterance, + ], + PropertyInfo(discriminator="type"), +] + + +class DocumentDocumentMessageMentionedUserChildBlob(BaseModel): + """Represents embedded binary data using data URI scheme. + + Format: data:[][;base64], + Example: data:text/html;base64,PGh0bWw+... + """ + + data: str + + mimetype: str + + id: Optional[str] = None + + type: Optional[Literal["blob"]] = None + + +class DocumentDocumentMessageMentionedUserChildCode(BaseModel): + text: str + + id: Optional[str] = None + + language: Optional[str] = None + + type: Optional[Literal["code"]] = None + + +class DocumentDocumentMessageMentionedUserChildComment(BaseModel): + text: str + + id: Optional[str] = None + + created_at: Optional[datetime] = None + + type: Optional[Literal["comment"]] = None + + +class DocumentDocumentMessageMentionedUserChildDivider(BaseModel): + id: Optional[str] = None + + type: Optional[Literal["divider"]] = None + + +class DocumentDocumentMessageMentionedUserChildImage(BaseModel): + src: str + + text: str + + id: Optional[str] = None + + type: Optional[Literal["image"]] = None + + +class DocumentDocumentMessageMentionedUserChildLink(BaseModel): + text: str + + url: str + + id: Optional[str] = None + + type: Optional[Literal["link"]] = None + + +class DocumentDocumentMessageMentionedUserChildLineBreak(BaseModel): + id: Optional[str] = None + + type: Optional[Literal["line_break"]] = None + + +class DocumentDocumentMessageMentionedUserChildText(BaseModel): + text: str + + id: Optional[str] = None + + marks: Optional[List[Literal["bold", "italic", "underline", "strikethrough", "code", "math"]]] = None + + type: Optional[Literal["text"]] = None + + +class DocumentDocumentMessageMentionedUserChildToolCall(BaseModel): + """A tool/function call made by the assistant.""" + + tool_call_id: str + + tool_name: str + + id: Optional[str] = None + + args: Optional[Dict[str, object]] = None + + type: Optional[Literal["tool_call"]] = None + + +class DocumentDocumentMessageMentionedUserChildToolResult(BaseModel): + """The result of a tool call.""" + + output: Union[str, Dict[str, object], List[object]] + + tool_call_id: str + + tool_name: str + + id: Optional[str] = None + + is_error: Optional[bool] = None + + type: Optional[Literal["tool_result"]] = None + + +class DocumentDocumentMessageMentionedUserChildTraceMessage(BaseModel): + """A message in an agent trace (user message, assistant message, or thinking).""" + + text: str + + id: Optional[str] = None + + message_type: Optional[Literal["message", "thinking"]] = None + + role: Optional[Literal["user", "assistant"]] = None + + timestamp: Optional[datetime] = None + + type: Optional[Literal["trace_message"]] = None + + +DocumentDocumentMessageMentionedUserChild: TypeAlias = Union[ + DocumentDocumentMessageMentionedUserChildBlob, + DocumentDocumentMessageMentionedUserChildCode, + DocumentDocumentMessageMentionedUserChildComment, + DocumentDocumentMessageMentionedUserChildDivider, + DocumentDocumentMessageMentionedUserChildImage, + DocumentDocumentMessageMentionedUserChildLink, + DocumentDocumentMessageMentionedUserChildLineBreak, + DocumentDocumentMessageMentionedUserChildText, + DocumentDocumentMessageMentionedUserChildToolCall, + DocumentDocumentMessageMentionedUserChildToolResult, + DocumentDocumentMessageMentionedUserChildTraceMessage, + object, +] + + +class DocumentDocumentMessageMentionedUser(BaseModel): + id: Optional[str] = None + + address: Optional[str] = None + + alt_names: Optional[List[str]] = None + + children: Optional[List[DocumentDocumentMessageMentionedUserChild]] = None + + company: Optional[str] = None + + company_ids: Optional[List[str]] = None + + date_of_birth: Optional[date] = None + + deal_ids: Optional[List[str]] = None + + email: Optional[str] = None + + emails: Optional[List[str]] = None + """All known email addresses; `email` holds the primary one""" + + image_url: Optional[str] = None + + job_title: Optional[str] = None + + link_urls: Optional[List[str]] = None + + name: Optional[str] = None + + phone_numbers: Optional[List[str]] = None + + tags: Optional[List[str]] = None + + text: Optional[str] = None + + type: Optional[Literal["person"]] = None + + username: Optional[str] = None + + +class DocumentDocumentMessage(BaseModel): + date: datetime + + sender: DocumentDocumentMessageSender + + id: Optional[str] = None + + channel: Optional[str] = None + """ + The channel or platform where the message was posted, if this Message is not + explicitly part of a conversation + """ + + children: Optional[List[DocumentDocumentMessageChild]] = None + + external_id: Optional[str] = None + """Provider message id (e.g. Slack ts, Gmail message id) — merge-dedup key""" + + is_self: Optional[bool] = None + + mentioned_users: Optional[List[DocumentDocumentMessageMentionedUser]] = None + + num_replies: Optional[int] = None + + replies: Optional[List[object]] = None + """The replies or comments to the message""" + + text: Optional[str] = None + + thread_id: Optional[str] = None + + title: Optional[str] = None + """The subject or title of the message""" + + type: Optional[Literal["message"]] = None + + updated_at: Optional[datetime] = None + + upvotes: Optional[int] = None + """The number of upvotes, likes, or reactions on the message""" + + +class DocumentDocumentEventAttendeeChildBlob(BaseModel): + """Represents embedded binary data using data URI scheme. + + Format: data:[][;base64], + Example: data:text/html;base64,PGh0bWw+... + """ + + data: str + + mimetype: str + + id: Optional[str] = None + + type: Optional[Literal["blob"]] = None + + +class DocumentDocumentEventAttendeeChildCode(BaseModel): + text: str + + id: Optional[str] = None + + language: Optional[str] = None + + type: Optional[Literal["code"]] = None + + +class DocumentDocumentEventAttendeeChildComment(BaseModel): + text: str + + id: Optional[str] = None + + created_at: Optional[datetime] = None + + type: Optional[Literal["comment"]] = None + + +class DocumentDocumentEventAttendeeChildDivider(BaseModel): + id: Optional[str] = None + + type: Optional[Literal["divider"]] = None + + +class DocumentDocumentEventAttendeeChildImage(BaseModel): + src: str + + text: str + + id: Optional[str] = None + + type: Optional[Literal["image"]] = None + + +class DocumentDocumentEventAttendeeChildLink(BaseModel): + text: str + + url: str + + id: Optional[str] = None + + type: Optional[Literal["link"]] = None + + +class DocumentDocumentEventAttendeeChildLineBreak(BaseModel): + id: Optional[str] = None + + type: Optional[Literal["line_break"]] = None + + +class DocumentDocumentEventAttendeeChildText(BaseModel): + text: str + + id: Optional[str] = None + + marks: Optional[List[Literal["bold", "italic", "underline", "strikethrough", "code", "math"]]] = None + + type: Optional[Literal["text"]] = None + + +class DocumentDocumentEventAttendeeChildToolCall(BaseModel): + """A tool/function call made by the assistant.""" + + tool_call_id: str + + tool_name: str + + id: Optional[str] = None + + args: Optional[Dict[str, object]] = None + + type: Optional[Literal["tool_call"]] = None + + +class DocumentDocumentEventAttendeeChildToolResult(BaseModel): + """The result of a tool call.""" + + output: Union[str, Dict[str, object], List[object]] + + tool_call_id: str + + tool_name: str + + id: Optional[str] = None + + is_error: Optional[bool] = None + + type: Optional[Literal["tool_result"]] = None + + +class DocumentDocumentEventAttendeeChildTraceMessage(BaseModel): + """A message in an agent trace (user message, assistant message, or thinking).""" + + text: str + + id: Optional[str] = None + + message_type: Optional[Literal["message", "thinking"]] = None + + role: Optional[Literal["user", "assistant"]] = None + + timestamp: Optional[datetime] = None + + type: Optional[Literal["trace_message"]] = None + + +DocumentDocumentEventAttendeeChild: TypeAlias = Union[ + DocumentDocumentEventAttendeeChildBlob, + DocumentDocumentEventAttendeeChildCode, + DocumentDocumentEventAttendeeChildComment, + DocumentDocumentEventAttendeeChildDivider, + DocumentDocumentEventAttendeeChildImage, + DocumentDocumentEventAttendeeChildLink, + DocumentDocumentEventAttendeeChildLineBreak, + DocumentDocumentEventAttendeeChildText, + DocumentDocumentEventAttendeeChildToolCall, + DocumentDocumentEventAttendeeChildToolResult, + DocumentDocumentEventAttendeeChildTraceMessage, + object, +] + + +class DocumentDocumentEventAttendee(BaseModel): + id: Optional[str] = None + + address: Optional[str] = None + + alt_names: Optional[List[str]] = None + + children: Optional[List[DocumentDocumentEventAttendeeChild]] = None + + company: Optional[str] = None + + company_ids: Optional[List[str]] = None + + date_of_birth: Optional[date] = None + + deal_ids: Optional[List[str]] = None + + email: Optional[str] = None + + emails: Optional[List[str]] = None + """All known email addresses; `email` holds the primary one""" + + image_url: Optional[str] = None + + job_title: Optional[str] = None + + link_urls: Optional[List[str]] = None + + name: Optional[str] = None + + phone_numbers: Optional[List[str]] = None + + tags: Optional[List[str]] = None + + text: Optional[str] = None + + type: Optional[Literal["person"]] = None + + username: Optional[str] = None + + +class DocumentDocumentEventChildBlob(BaseModel): + """Represents embedded binary data using data URI scheme. + + Format: data:[][;base64], + Example: data:text/html;base64,PGh0bWw+... + """ + + data: str + + mimetype: str + + id: Optional[str] = None + + type: Optional[Literal["blob"]] = None + + +class DocumentDocumentEventChildCalloutChildBlob(BaseModel): + """Represents embedded binary data using data URI scheme. + + Format: data:[][;base64], + Example: data:text/html;base64,PGh0bWw+... + """ + + data: str + + mimetype: str + + id: Optional[str] = None + + type: Optional[Literal["blob"]] = None + + +class DocumentDocumentEventChildCalloutChildCode(BaseModel): + text: str + + id: Optional[str] = None + + language: Optional[str] = None + + type: Optional[Literal["code"]] = None + + +class DocumentDocumentEventChildCalloutChildComment(BaseModel): + text: str + + id: Optional[str] = None + + created_at: Optional[datetime] = None + + type: Optional[Literal["comment"]] = None + + +class DocumentDocumentEventChildCalloutChildDivider(BaseModel): + id: Optional[str] = None + + type: Optional[Literal["divider"]] = None + + +class DocumentDocumentEventChildCalloutChildImage(BaseModel): + src: str + + text: str + + id: Optional[str] = None + + type: Optional[Literal["image"]] = None + + +class DocumentDocumentEventChildCalloutChildLink(BaseModel): + text: str + + url: str + + id: Optional[str] = None + + type: Optional[Literal["link"]] = None + + +class DocumentDocumentEventChildCalloutChildLineBreak(BaseModel): + id: Optional[str] = None + + type: Optional[Literal["line_break"]] = None + + +class DocumentDocumentEventChildCalloutChildText(BaseModel): + text: str + + id: Optional[str] = None + + marks: Optional[List[Literal["bold", "italic", "underline", "strikethrough", "code", "math"]]] = None + + type: Optional[Literal["text"]] = None + + +class DocumentDocumentEventChildCalloutChildToolCall(BaseModel): + """A tool/function call made by the assistant.""" + + tool_call_id: str + + tool_name: str + + id: Optional[str] = None + + args: Optional[Dict[str, object]] = None + + type: Optional[Literal["tool_call"]] = None + + +class DocumentDocumentEventChildCalloutChildToolResult(BaseModel): + """The result of a tool call.""" + + output: Union[str, Dict[str, object], List[object]] + + tool_call_id: str + + tool_name: str + + id: Optional[str] = None + + is_error: Optional[bool] = None + + type: Optional[Literal["tool_result"]] = None + + +class DocumentDocumentEventChildCalloutChildTraceMessage(BaseModel): + """A message in an agent trace (user message, assistant message, or thinking).""" + + text: str + + id: Optional[str] = None + + message_type: Optional[Literal["message", "thinking"]] = None + + role: Optional[Literal["user", "assistant"]] = None + + timestamp: Optional[datetime] = None + + type: Optional[Literal["trace_message"]] = None + + +DocumentDocumentEventChildCalloutChild: TypeAlias = Union[ + DocumentDocumentEventChildCalloutChildBlob, + DocumentDocumentEventChildCalloutChildCode, + DocumentDocumentEventChildCalloutChildComment, + DocumentDocumentEventChildCalloutChildDivider, + DocumentDocumentEventChildCalloutChildImage, + DocumentDocumentEventChildCalloutChildLink, + DocumentDocumentEventChildCalloutChildLineBreak, + DocumentDocumentEventChildCalloutChildText, + DocumentDocumentEventChildCalloutChildToolCall, + DocumentDocumentEventChildCalloutChildToolResult, + DocumentDocumentEventChildCalloutChildTraceMessage, + object, +] + + +class DocumentDocumentEventChildCallout(BaseModel): + id: Optional[str] = None + + children: Optional[List[DocumentDocumentEventChildCalloutChild]] = None + + text: Optional[str] = None + + title: Optional[str] = None + + type: Optional[Literal["callout"]] = None + + +class DocumentDocumentEventChildChunkChildBlob(BaseModel): + """Represents embedded binary data using data URI scheme. + + Format: data:[][;base64], + Example: data:text/html;base64,PGh0bWw+... + """ + + data: str + + mimetype: str + + id: Optional[str] = None + + type: Optional[Literal["blob"]] = None + + +class DocumentDocumentEventChildChunkChildCode(BaseModel): + text: str + + id: Optional[str] = None + + language: Optional[str] = None + + type: Optional[Literal["code"]] = None + + +class DocumentDocumentEventChildChunkChildComment(BaseModel): + text: str + + id: Optional[str] = None + + created_at: Optional[datetime] = None + + type: Optional[Literal["comment"]] = None + + +class DocumentDocumentEventChildChunkChildDivider(BaseModel): + id: Optional[str] = None + + type: Optional[Literal["divider"]] = None + + +class DocumentDocumentEventChildChunkChildImage(BaseModel): + src: str + + text: str + + id: Optional[str] = None + + type: Optional[Literal["image"]] = None + + +class DocumentDocumentEventChildChunkChildLink(BaseModel): + text: str + + url: str + + id: Optional[str] = None + + type: Optional[Literal["link"]] = None + + +class DocumentDocumentEventChildChunkChildLineBreak(BaseModel): + id: Optional[str] = None + + type: Optional[Literal["line_break"]] = None + + +class DocumentDocumentEventChildChunkChildText(BaseModel): + text: str + + id: Optional[str] = None + + marks: Optional[List[Literal["bold", "italic", "underline", "strikethrough", "code", "math"]]] = None + + type: Optional[Literal["text"]] = None + + +class DocumentDocumentEventChildChunkChildToolCall(BaseModel): + """A tool/function call made by the assistant.""" + + tool_call_id: str + + tool_name: str + + id: Optional[str] = None + + args: Optional[Dict[str, object]] = None + + type: Optional[Literal["tool_call"]] = None + + +class DocumentDocumentEventChildChunkChildToolResult(BaseModel): + """The result of a tool call.""" + + output: Union[str, Dict[str, object], List[object]] + + tool_call_id: str + + tool_name: str + + id: Optional[str] = None + + is_error: Optional[bool] = None + + type: Optional[Literal["tool_result"]] = None + + +class DocumentDocumentEventChildChunkChildTraceMessage(BaseModel): + """A message in an agent trace (user message, assistant message, or thinking).""" + + text: str + + id: Optional[str] = None + + message_type: Optional[Literal["message", "thinking"]] = None + + role: Optional[Literal["user", "assistant"]] = None + + timestamp: Optional[datetime] = None + + type: Optional[Literal["trace_message"]] = None + + +DocumentDocumentEventChildChunkChild: TypeAlias = Union[ + DocumentDocumentEventChildChunkChildBlob, + DocumentDocumentEventChildChunkChildCode, + DocumentDocumentEventChildChunkChildComment, + DocumentDocumentEventChildChunkChildDivider, + DocumentDocumentEventChildChunkChildImage, + DocumentDocumentEventChildChunkChildLink, + DocumentDocumentEventChildChunkChildLineBreak, + DocumentDocumentEventChildChunkChildText, + DocumentDocumentEventChildChunkChildToolCall, + DocumentDocumentEventChildChunkChildToolResult, + DocumentDocumentEventChildChunkChildTraceMessage, + object, +] + + +class DocumentDocumentEventChildChunk(BaseModel): + id: Optional[str] = None + + children: Optional[List[DocumentDocumentEventChildChunkChild]] = None + + text: Optional[str] = None + + type: Optional[Literal["chunk"]] = None + + +class DocumentDocumentEventChildCode(BaseModel): + text: str + + id: Optional[str] = None + + language: Optional[str] = None + + type: Optional[Literal["code"]] = None + + +class DocumentDocumentEventChildComment(BaseModel): + text: str + + id: Optional[str] = None + + created_at: Optional[datetime] = None + + type: Optional[Literal["comment"]] = None + + +class DocumentDocumentEventChildDivider(BaseModel): + id: Optional[str] = None + + type: Optional[Literal["divider"]] = None + + +class DocumentDocumentEventChildEquationChildBlob(BaseModel): + """Represents embedded binary data using data URI scheme. + + Format: data:[][;base64], + Example: data:text/html;base64,PGh0bWw+... + """ + + data: str + + mimetype: str + + id: Optional[str] = None + + type: Optional[Literal["blob"]] = None + + +class DocumentDocumentEventChildEquationChildCode(BaseModel): + text: str + + id: Optional[str] = None + + language: Optional[str] = None + + type: Optional[Literal["code"]] = None + + +class DocumentDocumentEventChildEquationChildComment(BaseModel): + text: str + + id: Optional[str] = None + + created_at: Optional[datetime] = None + + type: Optional[Literal["comment"]] = None + + +class DocumentDocumentEventChildEquationChildDivider(BaseModel): + id: Optional[str] = None + + type: Optional[Literal["divider"]] = None + + +class DocumentDocumentEventChildEquationChildImage(BaseModel): + src: str + + text: str + + id: Optional[str] = None + + type: Optional[Literal["image"]] = None + + +class DocumentDocumentEventChildEquationChildLink(BaseModel): + text: str + + url: str + + id: Optional[str] = None + + type: Optional[Literal["link"]] = None + + +class DocumentDocumentEventChildEquationChildLineBreak(BaseModel): + id: Optional[str] = None + + type: Optional[Literal["line_break"]] = None + + +class DocumentDocumentEventChildEquationChildText(BaseModel): + text: str + + id: Optional[str] = None + + marks: Optional[List[Literal["bold", "italic", "underline", "strikethrough", "code", "math"]]] = None + + type: Optional[Literal["text"]] = None + + +class DocumentDocumentEventChildEquationChildToolCall(BaseModel): + """A tool/function call made by the assistant.""" + + tool_call_id: str + + tool_name: str + + id: Optional[str] = None + + args: Optional[Dict[str, object]] = None + + type: Optional[Literal["tool_call"]] = None + + +class DocumentDocumentEventChildEquationChildToolResult(BaseModel): + """The result of a tool call.""" + + output: Union[str, Dict[str, object], List[object]] + + tool_call_id: str + + tool_name: str + + id: Optional[str] = None + + is_error: Optional[bool] = None + + type: Optional[Literal["tool_result"]] = None + + +class DocumentDocumentEventChildEquationChildTraceMessage(BaseModel): + """A message in an agent trace (user message, assistant message, or thinking).""" + + text: str + + id: Optional[str] = None + + message_type: Optional[Literal["message", "thinking"]] = None + + role: Optional[Literal["user", "assistant"]] = None + + timestamp: Optional[datetime] = None + + type: Optional[Literal["trace_message"]] = None + + +DocumentDocumentEventChildEquationChild: TypeAlias = Union[ + DocumentDocumentEventChildEquationChildBlob, + DocumentDocumentEventChildEquationChildCode, + DocumentDocumentEventChildEquationChildComment, + DocumentDocumentEventChildEquationChildDivider, + DocumentDocumentEventChildEquationChildImage, + DocumentDocumentEventChildEquationChildLink, + DocumentDocumentEventChildEquationChildLineBreak, + DocumentDocumentEventChildEquationChildText, + DocumentDocumentEventChildEquationChildToolCall, + DocumentDocumentEventChildEquationChildToolResult, + DocumentDocumentEventChildEquationChildTraceMessage, + object, +] + + +class DocumentDocumentEventChildEquation(BaseModel): + id: Optional[str] = None + + children: Optional[List[DocumentDocumentEventChildEquationChild]] = None + + text: Optional[str] = None + + type: Optional[Literal["equation"]] = None + + +class DocumentDocumentEventChildFootnoteChildBlob(BaseModel): + """Represents embedded binary data using data URI scheme. + + Format: data:[][;base64], + Example: data:text/html;base64,PGh0bWw+... + """ + + data: str + + mimetype: str + + id: Optional[str] = None + + type: Optional[Literal["blob"]] = None + + +class DocumentDocumentEventChildFootnoteChildCode(BaseModel): + text: str + + id: Optional[str] = None + + language: Optional[str] = None + + type: Optional[Literal["code"]] = None + + +class DocumentDocumentEventChildFootnoteChildComment(BaseModel): + text: str + + id: Optional[str] = None + + created_at: Optional[datetime] = None + + type: Optional[Literal["comment"]] = None + + +class DocumentDocumentEventChildFootnoteChildDivider(BaseModel): + id: Optional[str] = None + + type: Optional[Literal["divider"]] = None + + +class DocumentDocumentEventChildFootnoteChildImage(BaseModel): + src: str + + text: str + + id: Optional[str] = None + + type: Optional[Literal["image"]] = None + + +class DocumentDocumentEventChildFootnoteChildLink(BaseModel): + text: str + + url: str + + id: Optional[str] = None + + type: Optional[Literal["link"]] = None + + +class DocumentDocumentEventChildFootnoteChildLineBreak(BaseModel): + id: Optional[str] = None + + type: Optional[Literal["line_break"]] = None + + +class DocumentDocumentEventChildFootnoteChildText(BaseModel): + text: str + + id: Optional[str] = None + + marks: Optional[List[Literal["bold", "italic", "underline", "strikethrough", "code", "math"]]] = None + + type: Optional[Literal["text"]] = None + + +class DocumentDocumentEventChildFootnoteChildToolCall(BaseModel): + """A tool/function call made by the assistant.""" + + tool_call_id: str + + tool_name: str + + id: Optional[str] = None + + args: Optional[Dict[str, object]] = None + + type: Optional[Literal["tool_call"]] = None + + +class DocumentDocumentEventChildFootnoteChildToolResult(BaseModel): + """The result of a tool call.""" + + output: Union[str, Dict[str, object], List[object]] + + tool_call_id: str + + tool_name: str + + id: Optional[str] = None + + is_error: Optional[bool] = None + + type: Optional[Literal["tool_result"]] = None + + +class DocumentDocumentEventChildFootnoteChildTraceMessage(BaseModel): + """A message in an agent trace (user message, assistant message, or thinking).""" + + text: str + + id: Optional[str] = None + + message_type: Optional[Literal["message", "thinking"]] = None + + role: Optional[Literal["user", "assistant"]] = None + + timestamp: Optional[datetime] = None + + type: Optional[Literal["trace_message"]] = None + + +DocumentDocumentEventChildFootnoteChild: TypeAlias = Union[ + DocumentDocumentEventChildFootnoteChildBlob, + DocumentDocumentEventChildFootnoteChildCode, + DocumentDocumentEventChildFootnoteChildComment, + DocumentDocumentEventChildFootnoteChildDivider, + DocumentDocumentEventChildFootnoteChildImage, + DocumentDocumentEventChildFootnoteChildLink, + DocumentDocumentEventChildFootnoteChildLineBreak, + DocumentDocumentEventChildFootnoteChildText, + DocumentDocumentEventChildFootnoteChildToolCall, + DocumentDocumentEventChildFootnoteChildToolResult, + DocumentDocumentEventChildFootnoteChildTraceMessage, + object, +] + + +class DocumentDocumentEventChildFootnote(BaseModel): + id: Optional[str] = None + + children: Optional[List[DocumentDocumentEventChildFootnoteChild]] = None + + text: Optional[str] = None + + type: Optional[Literal["footnote"]] = None + + +class DocumentDocumentEventChildHeadingChildBlob(BaseModel): + """Represents embedded binary data using data URI scheme. + + Format: data:[][;base64], + Example: data:text/html;base64,PGh0bWw+... + """ + + data: str + + mimetype: str + + id: Optional[str] = None + + type: Optional[Literal["blob"]] = None + + +class DocumentDocumentEventChildHeadingChildCode(BaseModel): + text: str + + id: Optional[str] = None + + language: Optional[str] = None + + type: Optional[Literal["code"]] = None + + +class DocumentDocumentEventChildHeadingChildComment(BaseModel): + text: str + + id: Optional[str] = None + + created_at: Optional[datetime] = None + + type: Optional[Literal["comment"]] = None + + +class DocumentDocumentEventChildHeadingChildDivider(BaseModel): + id: Optional[str] = None + + type: Optional[Literal["divider"]] = None + + +class DocumentDocumentEventChildHeadingChildImage(BaseModel): + src: str + + text: str + + id: Optional[str] = None + + type: Optional[Literal["image"]] = None + + +class DocumentDocumentEventChildHeadingChildLink(BaseModel): + text: str + + url: str + + id: Optional[str] = None + + type: Optional[Literal["link"]] = None + + +class DocumentDocumentEventChildHeadingChildLineBreak(BaseModel): + id: Optional[str] = None + + type: Optional[Literal["line_break"]] = None + + +class DocumentDocumentEventChildHeadingChildText(BaseModel): + text: str + + id: Optional[str] = None + + marks: Optional[List[Literal["bold", "italic", "underline", "strikethrough", "code", "math"]]] = None + + type: Optional[Literal["text"]] = None + + +class DocumentDocumentEventChildHeadingChildToolCall(BaseModel): + """A tool/function call made by the assistant.""" + + tool_call_id: str + + tool_name: str + + id: Optional[str] = None + + args: Optional[Dict[str, object]] = None + + type: Optional[Literal["tool_call"]] = None + + +class DocumentDocumentEventChildHeadingChildToolResult(BaseModel): + """The result of a tool call.""" + + output: Union[str, Dict[str, object], List[object]] + + tool_call_id: str + + tool_name: str + + id: Optional[str] = None + + is_error: Optional[bool] = None + + type: Optional[Literal["tool_result"]] = None + + +class DocumentDocumentEventChildHeadingChildTraceMessage(BaseModel): + """A message in an agent trace (user message, assistant message, or thinking).""" + + text: str + + id: Optional[str] = None + + message_type: Optional[Literal["message", "thinking"]] = None + + role: Optional[Literal["user", "assistant"]] = None + + timestamp: Optional[datetime] = None + + type: Optional[Literal["trace_message"]] = None + + +DocumentDocumentEventChildHeadingChild: TypeAlias = Union[ + DocumentDocumentEventChildHeadingChildBlob, + DocumentDocumentEventChildHeadingChildCode, + DocumentDocumentEventChildHeadingChildComment, + DocumentDocumentEventChildHeadingChildDivider, + DocumentDocumentEventChildHeadingChildImage, + DocumentDocumentEventChildHeadingChildLink, + DocumentDocumentEventChildHeadingChildLineBreak, + DocumentDocumentEventChildHeadingChildText, + DocumentDocumentEventChildHeadingChildToolCall, + DocumentDocumentEventChildHeadingChildToolResult, + DocumentDocumentEventChildHeadingChildTraceMessage, + object, +] + + +class DocumentDocumentEventChildHeading(BaseModel): + level: int + + id: Optional[str] = None + + children: Optional[List[DocumentDocumentEventChildHeadingChild]] = None + + text: Optional[str] = None + + type: Optional[Literal["heading"]] = None + + +class DocumentDocumentEventChildImage(BaseModel): + src: str + + text: str + + id: Optional[str] = None + + type: Optional[Literal["image"]] = None + + +class DocumentDocumentEventChildLink(BaseModel): + text: str + + url: str + + id: Optional[str] = None + + type: Optional[Literal["link"]] = None + + +class DocumentDocumentEventChildLineBreak(BaseModel): + id: Optional[str] = None + + type: Optional[Literal["line_break"]] = None + + +class DocumentDocumentEventChildList(BaseModel): + id: Optional[str] = None + + children: Optional[List[object]] = None + + ordered: Optional[bool] = None + + text: Optional[str] = None + + type: Optional[Literal["list"]] = None + + +class DocumentDocumentEventChildListItemChildBlob(BaseModel): + """Represents embedded binary data using data URI scheme. + + Format: data:[][;base64], + Example: data:text/html;base64,PGh0bWw+... + """ + + data: str + + mimetype: str + + id: Optional[str] = None + + type: Optional[Literal["blob"]] = None + + +class DocumentDocumentEventChildListItemChildCode(BaseModel): + text: str + + id: Optional[str] = None + + language: Optional[str] = None + + type: Optional[Literal["code"]] = None + + +class DocumentDocumentEventChildListItemChildComment(BaseModel): + text: str + + id: Optional[str] = None + + created_at: Optional[datetime] = None + + type: Optional[Literal["comment"]] = None + + +class DocumentDocumentEventChildListItemChildDivider(BaseModel): + id: Optional[str] = None + + type: Optional[Literal["divider"]] = None + + +class DocumentDocumentEventChildListItemChildImage(BaseModel): + src: str + + text: str + + id: Optional[str] = None + + type: Optional[Literal["image"]] = None + + +class DocumentDocumentEventChildListItemChildLink(BaseModel): + text: str + + url: str + + id: Optional[str] = None + + type: Optional[Literal["link"]] = None + + +class DocumentDocumentEventChildListItemChildLineBreak(BaseModel): + id: Optional[str] = None + + type: Optional[Literal["line_break"]] = None + + +class DocumentDocumentEventChildListItemChildText(BaseModel): + text: str + + id: Optional[str] = None + + marks: Optional[List[Literal["bold", "italic", "underline", "strikethrough", "code", "math"]]] = None + + type: Optional[Literal["text"]] = None + + +class DocumentDocumentEventChildListItemChildToolCall(BaseModel): + """A tool/function call made by the assistant.""" + + tool_call_id: str + + tool_name: str + + id: Optional[str] = None + + args: Optional[Dict[str, object]] = None + + type: Optional[Literal["tool_call"]] = None + + +class DocumentDocumentEventChildListItemChildToolResult(BaseModel): + """The result of a tool call.""" + + output: Union[str, Dict[str, object], List[object]] + + tool_call_id: str + + tool_name: str + + id: Optional[str] = None + + is_error: Optional[bool] = None + + type: Optional[Literal["tool_result"]] = None + + +class DocumentDocumentEventChildListItemChildTraceMessage(BaseModel): + """A message in an agent trace (user message, assistant message, or thinking).""" + + text: str + + id: Optional[str] = None + + message_type: Optional[Literal["message", "thinking"]] = None + + role: Optional[Literal["user", "assistant"]] = None + + timestamp: Optional[datetime] = None + + type: Optional[Literal["trace_message"]] = None + + +DocumentDocumentEventChildListItemChild: TypeAlias = Union[ + DocumentDocumentEventChildListItemChildBlob, + DocumentDocumentEventChildListItemChildCode, + DocumentDocumentEventChildListItemChildComment, + DocumentDocumentEventChildListItemChildDivider, + DocumentDocumentEventChildListItemChildImage, + DocumentDocumentEventChildListItemChildLink, + DocumentDocumentEventChildListItemChildLineBreak, + DocumentDocumentEventChildListItemChildText, + DocumentDocumentEventChildListItemChildToolCall, + DocumentDocumentEventChildListItemChildToolResult, + DocumentDocumentEventChildListItemChildTraceMessage, + object, +] + + +class DocumentDocumentEventChildListItem(BaseModel): + id: Optional[str] = None + + children: Optional[List[DocumentDocumentEventChildListItemChild]] = None + + text: Optional[str] = None + + type: Optional[Literal["list_item"]] = None + + +class DocumentDocumentEventChildParagraphChildBlob(BaseModel): + """Represents embedded binary data using data URI scheme. + + Format: data:[][;base64], + Example: data:text/html;base64,PGh0bWw+... + """ + + data: str + + mimetype: str + + id: Optional[str] = None + + type: Optional[Literal["blob"]] = None + + +class DocumentDocumentEventChildParagraphChildCode(BaseModel): + text: str + + id: Optional[str] = None + + language: Optional[str] = None + + type: Optional[Literal["code"]] = None + + +class DocumentDocumentEventChildParagraphChildComment(BaseModel): + text: str + + id: Optional[str] = None + + created_at: Optional[datetime] = None + + type: Optional[Literal["comment"]] = None + + +class DocumentDocumentEventChildParagraphChildDivider(BaseModel): + id: Optional[str] = None + + type: Optional[Literal["divider"]] = None + + +class DocumentDocumentEventChildParagraphChildImage(BaseModel): + src: str + + text: str + + id: Optional[str] = None + + type: Optional[Literal["image"]] = None + + +class DocumentDocumentEventChildParagraphChildLink(BaseModel): + text: str + + url: str + + id: Optional[str] = None + + type: Optional[Literal["link"]] = None + + +class DocumentDocumentEventChildParagraphChildLineBreak(BaseModel): + id: Optional[str] = None + + type: Optional[Literal["line_break"]] = None + + +class DocumentDocumentEventChildParagraphChildText(BaseModel): + text: str + + id: Optional[str] = None + + marks: Optional[List[Literal["bold", "italic", "underline", "strikethrough", "code", "math"]]] = None + + type: Optional[Literal["text"]] = None + + +class DocumentDocumentEventChildParagraphChildToolCall(BaseModel): + """A tool/function call made by the assistant.""" + + tool_call_id: str + + tool_name: str + + id: Optional[str] = None + + args: Optional[Dict[str, object]] = None + + type: Optional[Literal["tool_call"]] = None + + +class DocumentDocumentEventChildParagraphChildToolResult(BaseModel): + """The result of a tool call.""" + + output: Union[str, Dict[str, object], List[object]] + + tool_call_id: str + + tool_name: str + + id: Optional[str] = None + + is_error: Optional[bool] = None + + type: Optional[Literal["tool_result"]] = None + + +class DocumentDocumentEventChildParagraphChildTraceMessage(BaseModel): + """A message in an agent trace (user message, assistant message, or thinking).""" + + text: str + + id: Optional[str] = None + + message_type: Optional[Literal["message", "thinking"]] = None + + role: Optional[Literal["user", "assistant"]] = None + + timestamp: Optional[datetime] = None + + type: Optional[Literal["trace_message"]] = None + + +DocumentDocumentEventChildParagraphChild: TypeAlias = Union[ + DocumentDocumentEventChildParagraphChildBlob, + DocumentDocumentEventChildParagraphChildCode, + DocumentDocumentEventChildParagraphChildComment, + DocumentDocumentEventChildParagraphChildDivider, + DocumentDocumentEventChildParagraphChildImage, + DocumentDocumentEventChildParagraphChildLink, + DocumentDocumentEventChildParagraphChildLineBreak, + DocumentDocumentEventChildParagraphChildText, + DocumentDocumentEventChildParagraphChildToolCall, + DocumentDocumentEventChildParagraphChildToolResult, + DocumentDocumentEventChildParagraphChildTraceMessage, + object, +] + + +class DocumentDocumentEventChildParagraph(BaseModel): + id: Optional[str] = None + + children: Optional[List[DocumentDocumentEventChildParagraphChild]] = None + + text: Optional[str] = None + + type: Optional[Literal["paragraph"]] = None + + +class DocumentDocumentEventChildQuoteChildBlob(BaseModel): + """Represents embedded binary data using data URI scheme. + + Format: data:[][;base64], + Example: data:text/html;base64,PGh0bWw+... + """ + + data: str + + mimetype: str + + id: Optional[str] = None + + type: Optional[Literal["blob"]] = None + + +class DocumentDocumentEventChildQuoteChildCode(BaseModel): + text: str + + id: Optional[str] = None + + language: Optional[str] = None + + type: Optional[Literal["code"]] = None + + +class DocumentDocumentEventChildQuoteChildComment(BaseModel): + text: str + + id: Optional[str] = None + + created_at: Optional[datetime] = None + + type: Optional[Literal["comment"]] = None + + +class DocumentDocumentEventChildQuoteChildDivider(BaseModel): + id: Optional[str] = None + + type: Optional[Literal["divider"]] = None + + +class DocumentDocumentEventChildQuoteChildImage(BaseModel): + src: str + + text: str + + id: Optional[str] = None + + type: Optional[Literal["image"]] = None + + +class DocumentDocumentEventChildQuoteChildLink(BaseModel): + text: str + + url: str + + id: Optional[str] = None + + type: Optional[Literal["link"]] = None + + +class DocumentDocumentEventChildQuoteChildLineBreak(BaseModel): + id: Optional[str] = None + + type: Optional[Literal["line_break"]] = None + + +class DocumentDocumentEventChildQuoteChildText(BaseModel): + text: str + + id: Optional[str] = None + + marks: Optional[List[Literal["bold", "italic", "underline", "strikethrough", "code", "math"]]] = None + + type: Optional[Literal["text"]] = None + + +class DocumentDocumentEventChildQuoteChildToolCall(BaseModel): + """A tool/function call made by the assistant.""" + + tool_call_id: str + + tool_name: str + + id: Optional[str] = None + + args: Optional[Dict[str, object]] = None + + type: Optional[Literal["tool_call"]] = None + + +class DocumentDocumentEventChildQuoteChildToolResult(BaseModel): + """The result of a tool call.""" + + output: Union[str, Dict[str, object], List[object]] + + tool_call_id: str + + tool_name: str + + id: Optional[str] = None + + is_error: Optional[bool] = None + + type: Optional[Literal["tool_result"]] = None + + +class DocumentDocumentEventChildQuoteChildTraceMessage(BaseModel): + """A message in an agent trace (user message, assistant message, or thinking).""" + + text: str + + id: Optional[str] = None + + message_type: Optional[Literal["message", "thinking"]] = None + + role: Optional[Literal["user", "assistant"]] = None + + timestamp: Optional[datetime] = None + + type: Optional[Literal["trace_message"]] = None + + +DocumentDocumentEventChildQuoteChild: TypeAlias = Union[ + DocumentDocumentEventChildQuoteChildBlob, + DocumentDocumentEventChildQuoteChildCode, + DocumentDocumentEventChildQuoteChildComment, + DocumentDocumentEventChildQuoteChildDivider, + DocumentDocumentEventChildQuoteChildImage, + DocumentDocumentEventChildQuoteChildLink, + DocumentDocumentEventChildQuoteChildLineBreak, + DocumentDocumentEventChildQuoteChildText, + DocumentDocumentEventChildQuoteChildToolCall, + DocumentDocumentEventChildQuoteChildToolResult, + DocumentDocumentEventChildQuoteChildTraceMessage, + object, +] + + +class DocumentDocumentEventChildQuote(BaseModel): + id: Optional[str] = None + + children: Optional[List[DocumentDocumentEventChildQuoteChild]] = None + + text: Optional[str] = None + + type: Optional[Literal["quote"]] = None + + +class DocumentDocumentEventChildTable(BaseModel): + id: Optional[str] = None + + children: Optional[List[object]] = None + + has_header: Optional[bool] = None + """Whether the first row should be treated as a header""" + + text: Optional[str] = None + + type: Optional[Literal["table"]] = None + + +class DocumentDocumentEventChildTableCellChildBlob(BaseModel): + """Represents embedded binary data using data URI scheme. + + Format: data:[][;base64], + Example: data:text/html;base64,PGh0bWw+... + """ + + data: str + + mimetype: str + + id: Optional[str] = None + + type: Optional[Literal["blob"]] = None + + +class DocumentDocumentEventChildTableCellChildCode(BaseModel): + text: str + + id: Optional[str] = None + + language: Optional[str] = None + + type: Optional[Literal["code"]] = None + + +class DocumentDocumentEventChildTableCellChildComment(BaseModel): + text: str + + id: Optional[str] = None + + created_at: Optional[datetime] = None + + type: Optional[Literal["comment"]] = None + + +class DocumentDocumentEventChildTableCellChildDivider(BaseModel): + id: Optional[str] = None + + type: Optional[Literal["divider"]] = None + + +class DocumentDocumentEventChildTableCellChildImage(BaseModel): + src: str + + text: str + + id: Optional[str] = None + + type: Optional[Literal["image"]] = None + + +class DocumentDocumentEventChildTableCellChildLink(BaseModel): + text: str + + url: str + + id: Optional[str] = None + + type: Optional[Literal["link"]] = None + + +class DocumentDocumentEventChildTableCellChildLineBreak(BaseModel): + id: Optional[str] = None + + type: Optional[Literal["line_break"]] = None + + +class DocumentDocumentEventChildTableCellChildText(BaseModel): + text: str + + id: Optional[str] = None + + marks: Optional[List[Literal["bold", "italic", "underline", "strikethrough", "code", "math"]]] = None + + type: Optional[Literal["text"]] = None + + +class DocumentDocumentEventChildTableCellChildToolCall(BaseModel): + """A tool/function call made by the assistant.""" + + tool_call_id: str + + tool_name: str + + id: Optional[str] = None + + args: Optional[Dict[str, object]] = None + + type: Optional[Literal["tool_call"]] = None + + +class DocumentDocumentEventChildTableCellChildToolResult(BaseModel): + """The result of a tool call.""" + + output: Union[str, Dict[str, object], List[object]] + + tool_call_id: str + + tool_name: str + + id: Optional[str] = None + + is_error: Optional[bool] = None + + type: Optional[Literal["tool_result"]] = None + + +class DocumentDocumentEventChildTableCellChildTraceMessage(BaseModel): + """A message in an agent trace (user message, assistant message, or thinking).""" + + text: str + + id: Optional[str] = None + + message_type: Optional[Literal["message", "thinking"]] = None + + role: Optional[Literal["user", "assistant"]] = None + + timestamp: Optional[datetime] = None + + type: Optional[Literal["trace_message"]] = None + + +DocumentDocumentEventChildTableCellChild: TypeAlias = Union[ + DocumentDocumentEventChildTableCellChildBlob, + DocumentDocumentEventChildTableCellChildCode, + DocumentDocumentEventChildTableCellChildComment, + DocumentDocumentEventChildTableCellChildDivider, + DocumentDocumentEventChildTableCellChildImage, + DocumentDocumentEventChildTableCellChildLink, + DocumentDocumentEventChildTableCellChildLineBreak, + DocumentDocumentEventChildTableCellChildText, + DocumentDocumentEventChildTableCellChildToolCall, + DocumentDocumentEventChildTableCellChildToolResult, + DocumentDocumentEventChildTableCellChildTraceMessage, + object, +] + + +class DocumentDocumentEventChildTableCell(BaseModel): + id: Optional[str] = None + + align: Optional[Literal["left", "center", "right"]] = None + + children: Optional[List[DocumentDocumentEventChildTableCellChild]] = None + + text: Optional[str] = None + + type: Optional[Literal["table_cell"]] = None + + +class DocumentDocumentEventChildTableRow(BaseModel): + id: Optional[str] = None + + children: Optional[List[object]] = None + + text: Optional[str] = None + + type: Optional[Literal["table_row"]] = None + + +class DocumentDocumentEventChildText(BaseModel): + text: str + + id: Optional[str] = None + + marks: Optional[List[Literal["bold", "italic", "underline", "strikethrough", "code", "math"]]] = None + + type: Optional[Literal["text"]] = None + + +class DocumentDocumentEventChildToDoChildBlob(BaseModel): + """Represents embedded binary data using data URI scheme. + + Format: data:[][;base64], + Example: data:text/html;base64,PGh0bWw+... + """ + + data: str + + mimetype: str + + id: Optional[str] = None + + type: Optional[Literal["blob"]] = None + + +class DocumentDocumentEventChildToDoChildCode(BaseModel): + text: str + + id: Optional[str] = None + + language: Optional[str] = None + + type: Optional[Literal["code"]] = None + + +class DocumentDocumentEventChildToDoChildComment(BaseModel): + text: str + + id: Optional[str] = None + + created_at: Optional[datetime] = None + + type: Optional[Literal["comment"]] = None + + +class DocumentDocumentEventChildToDoChildDivider(BaseModel): + id: Optional[str] = None + + type: Optional[Literal["divider"]] = None + + +class DocumentDocumentEventChildToDoChildImage(BaseModel): + src: str + + text: str + + id: Optional[str] = None + + type: Optional[Literal["image"]] = None + + +class DocumentDocumentEventChildToDoChildLink(BaseModel): + text: str + + url: str + + id: Optional[str] = None + + type: Optional[Literal["link"]] = None + + +class DocumentDocumentEventChildToDoChildLineBreak(BaseModel): + id: Optional[str] = None + + type: Optional[Literal["line_break"]] = None + + +class DocumentDocumentEventChildToDoChildText(BaseModel): + text: str + + id: Optional[str] = None + + marks: Optional[List[Literal["bold", "italic", "underline", "strikethrough", "code", "math"]]] = None + + type: Optional[Literal["text"]] = None + + +class DocumentDocumentEventChildToDoChildToolCall(BaseModel): + """A tool/function call made by the assistant.""" + + tool_call_id: str + + tool_name: str + + id: Optional[str] = None + + args: Optional[Dict[str, object]] = None + + type: Optional[Literal["tool_call"]] = None + + +class DocumentDocumentEventChildToDoChildToolResult(BaseModel): + """The result of a tool call.""" + + output: Union[str, Dict[str, object], List[object]] + + tool_call_id: str + + tool_name: str + + id: Optional[str] = None + + is_error: Optional[bool] = None + + type: Optional[Literal["tool_result"]] = None + + +class DocumentDocumentEventChildToDoChildTraceMessage(BaseModel): + """A message in an agent trace (user message, assistant message, or thinking).""" + + text: str + + id: Optional[str] = None + + message_type: Optional[Literal["message", "thinking"]] = None + + role: Optional[Literal["user", "assistant"]] = None + + timestamp: Optional[datetime] = None + + type: Optional[Literal["trace_message"]] = None + + +DocumentDocumentEventChildToDoChild: TypeAlias = Union[ + DocumentDocumentEventChildToDoChildBlob, + DocumentDocumentEventChildToDoChildCode, + DocumentDocumentEventChildToDoChildComment, + DocumentDocumentEventChildToDoChildDivider, + DocumentDocumentEventChildToDoChildImage, + DocumentDocumentEventChildToDoChildLink, + DocumentDocumentEventChildToDoChildLineBreak, + DocumentDocumentEventChildToDoChildText, + DocumentDocumentEventChildToDoChildToolCall, + DocumentDocumentEventChildToDoChildToolResult, + DocumentDocumentEventChildToDoChildTraceMessage, + object, +] + + +class DocumentDocumentEventChildToDo(BaseModel): + id: Optional[str] = None + + checked: Optional[bool] = None + + children: Optional[List[DocumentDocumentEventChildToDoChild]] = None + + text: Optional[str] = None + + type: Optional[Literal["todo"]] = None + + +class DocumentDocumentEventChildToolCall(BaseModel): + """A tool/function call made by the assistant.""" + + tool_call_id: str + + tool_name: str + + id: Optional[str] = None + + args: Optional[Dict[str, object]] = None + + type: Optional[Literal["tool_call"]] = None + + +class DocumentDocumentEventChildToolResult(BaseModel): + """The result of a tool call.""" + + output: Union[str, Dict[str, object], List[object]] + + tool_call_id: str + + tool_name: str + + id: Optional[str] = None + + is_error: Optional[bool] = None + + type: Optional[Literal["tool_result"]] = None + + +class DocumentDocumentEventChildTraceMessage(BaseModel): + """A message in an agent trace (user message, assistant message, or thinking).""" + + text: str + + id: Optional[str] = None + + message_type: Optional[Literal["message", "thinking"]] = None + + role: Optional[Literal["user", "assistant"]] = None + + timestamp: Optional[datetime] = None + + type: Optional[Literal["trace_message"]] = None + + +class DocumentDocumentEventChildUtterance(BaseModel): + """A speaker-attributed segment of a transcript (ENG-2476/D10). + + "Utterance" is the standard name for this across transcription providers + (AssemblyAI, Deepgram, Rev). Timestamps are relative offsets in seconds — + provider-native; absolute times derive from `Transcript.started_at`. + """ + + text: str + + id: Optional[str] = None + + end: Optional[float] = None + + speaker: Optional[object] = None + + start: Optional[float] = None + + type: Optional[Literal["utterance"]] = None + + +DocumentDocumentEventChild: TypeAlias = Annotated[ + Union[ + DocumentDocumentEventChildBlob, + DocumentDocumentEventChildCallout, + DocumentDocumentEventChildChunk, + DocumentDocumentEventChildCode, + DocumentDocumentEventChildComment, + DocumentDocumentEventChildDivider, + DocumentDocumentEventChildEquation, + DocumentDocumentEventChildFootnote, + DocumentDocumentEventChildHeading, + DocumentDocumentEventChildImage, + DocumentDocumentEventChildLink, + DocumentDocumentEventChildLineBreak, + DocumentDocumentEventChildList, + DocumentDocumentEventChildListItem, + DocumentDocumentEventChildParagraph, + DocumentDocumentEventChildQuote, + DocumentDocumentEventChildTable, + DocumentDocumentEventChildTableCell, + DocumentDocumentEventChildTableRow, + DocumentDocumentEventChildText, + DocumentDocumentEventChildToDo, + DocumentDocumentEventChildToolCall, + DocumentDocumentEventChildToolResult, + DocumentDocumentEventChildTraceMessage, + DocumentDocumentEventChildUtterance, + ], + PropertyInfo(discriminator="type"), +] + + +class DocumentDocumentEvent(BaseModel): + id: Optional[str] = None + + attendees: Optional[List[DocumentDocumentEventAttendee]] = None + + children: Optional[List[DocumentDocumentEventChild]] = None + + end_at: Optional[datetime] = None + + location: Optional[str] = None + + meeting_url: Optional[str] = None + + start_at: Optional[datetime] = None + + text: Optional[str] = None + + title: Optional[str] = None + + type: Optional[Literal["event"]] = None + + +class DocumentDocumentFileChildBlob(BaseModel): + """Represents embedded binary data using data URI scheme. + + Format: data:[][;base64], + Example: data:text/html;base64,PGh0bWw+... + """ + + data: str + + mimetype: str + + id: Optional[str] = None + + type: Optional[Literal["blob"]] = None + + +class DocumentDocumentFileChildCalloutChildBlob(BaseModel): + """Represents embedded binary data using data URI scheme. + + Format: data:[][;base64], + Example: data:text/html;base64,PGh0bWw+... + """ + + data: str + + mimetype: str + + id: Optional[str] = None + + type: Optional[Literal["blob"]] = None + + +class DocumentDocumentFileChildCalloutChildCode(BaseModel): + text: str + + id: Optional[str] = None + + language: Optional[str] = None + + type: Optional[Literal["code"]] = None + + +class DocumentDocumentFileChildCalloutChildComment(BaseModel): + text: str + + id: Optional[str] = None + + created_at: Optional[datetime] = None + + type: Optional[Literal["comment"]] = None + + +class DocumentDocumentFileChildCalloutChildDivider(BaseModel): + id: Optional[str] = None + + type: Optional[Literal["divider"]] = None + + +class DocumentDocumentFileChildCalloutChildImage(BaseModel): + src: str + + text: str + + id: Optional[str] = None + + type: Optional[Literal["image"]] = None + + +class DocumentDocumentFileChildCalloutChildLink(BaseModel): + text: str + + url: str + + id: Optional[str] = None + + type: Optional[Literal["link"]] = None + + +class DocumentDocumentFileChildCalloutChildLineBreak(BaseModel): + id: Optional[str] = None + + type: Optional[Literal["line_break"]] = None + + +class DocumentDocumentFileChildCalloutChildText(BaseModel): + text: str + + id: Optional[str] = None + + marks: Optional[List[Literal["bold", "italic", "underline", "strikethrough", "code", "math"]]] = None + + type: Optional[Literal["text"]] = None + + +class DocumentDocumentFileChildCalloutChildToolCall(BaseModel): + """A tool/function call made by the assistant.""" + + tool_call_id: str + + tool_name: str + + id: Optional[str] = None + + args: Optional[Dict[str, object]] = None + + type: Optional[Literal["tool_call"]] = None + + +class DocumentDocumentFileChildCalloutChildToolResult(BaseModel): + """The result of a tool call.""" + + output: Union[str, Dict[str, object], List[object]] + + tool_call_id: str + + tool_name: str + + id: Optional[str] = None + + is_error: Optional[bool] = None + + type: Optional[Literal["tool_result"]] = None + + +class DocumentDocumentFileChildCalloutChildTraceMessage(BaseModel): + """A message in an agent trace (user message, assistant message, or thinking).""" + + text: str + + id: Optional[str] = None + + message_type: Optional[Literal["message", "thinking"]] = None + + role: Optional[Literal["user", "assistant"]] = None + + timestamp: Optional[datetime] = None + + type: Optional[Literal["trace_message"]] = None + + +DocumentDocumentFileChildCalloutChild: TypeAlias = Union[ + DocumentDocumentFileChildCalloutChildBlob, + DocumentDocumentFileChildCalloutChildCode, + DocumentDocumentFileChildCalloutChildComment, + DocumentDocumentFileChildCalloutChildDivider, + DocumentDocumentFileChildCalloutChildImage, + DocumentDocumentFileChildCalloutChildLink, + DocumentDocumentFileChildCalloutChildLineBreak, + DocumentDocumentFileChildCalloutChildText, + DocumentDocumentFileChildCalloutChildToolCall, + DocumentDocumentFileChildCalloutChildToolResult, + DocumentDocumentFileChildCalloutChildTraceMessage, + object, +] + + +class DocumentDocumentFileChildCallout(BaseModel): + id: Optional[str] = None + + children: Optional[List[DocumentDocumentFileChildCalloutChild]] = None + + text: Optional[str] = None + + title: Optional[str] = None + + type: Optional[Literal["callout"]] = None + + +class DocumentDocumentFileChildChunkChildBlob(BaseModel): + """Represents embedded binary data using data URI scheme. + + Format: data:[][;base64], + Example: data:text/html;base64,PGh0bWw+... + """ + + data: str + + mimetype: str + + id: Optional[str] = None + + type: Optional[Literal["blob"]] = None + + +class DocumentDocumentFileChildChunkChildCode(BaseModel): + text: str + + id: Optional[str] = None + + language: Optional[str] = None + + type: Optional[Literal["code"]] = None + + +class DocumentDocumentFileChildChunkChildComment(BaseModel): + text: str + + id: Optional[str] = None + + created_at: Optional[datetime] = None + + type: Optional[Literal["comment"]] = None + + +class DocumentDocumentFileChildChunkChildDivider(BaseModel): + id: Optional[str] = None + + type: Optional[Literal["divider"]] = None + + +class DocumentDocumentFileChildChunkChildImage(BaseModel): + src: str + + text: str + + id: Optional[str] = None + + type: Optional[Literal["image"]] = None + + +class DocumentDocumentFileChildChunkChildLink(BaseModel): + text: str + + url: str + + id: Optional[str] = None + + type: Optional[Literal["link"]] = None + + +class DocumentDocumentFileChildChunkChildLineBreak(BaseModel): + id: Optional[str] = None + + type: Optional[Literal["line_break"]] = None + + +class DocumentDocumentFileChildChunkChildText(BaseModel): + text: str + + id: Optional[str] = None + + marks: Optional[List[Literal["bold", "italic", "underline", "strikethrough", "code", "math"]]] = None + + type: Optional[Literal["text"]] = None + + +class DocumentDocumentFileChildChunkChildToolCall(BaseModel): + """A tool/function call made by the assistant.""" + + tool_call_id: str + + tool_name: str + + id: Optional[str] = None + + args: Optional[Dict[str, object]] = None + + type: Optional[Literal["tool_call"]] = None + + +class DocumentDocumentFileChildChunkChildToolResult(BaseModel): + """The result of a tool call.""" + + output: Union[str, Dict[str, object], List[object]] + + tool_call_id: str + + tool_name: str + + id: Optional[str] = None + + is_error: Optional[bool] = None + + type: Optional[Literal["tool_result"]] = None + + +class DocumentDocumentFileChildChunkChildTraceMessage(BaseModel): + """A message in an agent trace (user message, assistant message, or thinking).""" + + text: str + + id: Optional[str] = None + + message_type: Optional[Literal["message", "thinking"]] = None + + role: Optional[Literal["user", "assistant"]] = None + + timestamp: Optional[datetime] = None + + type: Optional[Literal["trace_message"]] = None + + +DocumentDocumentFileChildChunkChild: TypeAlias = Union[ + DocumentDocumentFileChildChunkChildBlob, + DocumentDocumentFileChildChunkChildCode, + DocumentDocumentFileChildChunkChildComment, + DocumentDocumentFileChildChunkChildDivider, + DocumentDocumentFileChildChunkChildImage, + DocumentDocumentFileChildChunkChildLink, + DocumentDocumentFileChildChunkChildLineBreak, + DocumentDocumentFileChildChunkChildText, + DocumentDocumentFileChildChunkChildToolCall, + DocumentDocumentFileChildChunkChildToolResult, + DocumentDocumentFileChildChunkChildTraceMessage, + object, +] + + +class DocumentDocumentFileChildChunk(BaseModel): + id: Optional[str] = None + + children: Optional[List[DocumentDocumentFileChildChunkChild]] = None + + text: Optional[str] = None + + type: Optional[Literal["chunk"]] = None + + +class DocumentDocumentFileChildCode(BaseModel): + text: str + + id: Optional[str] = None + + language: Optional[str] = None + + type: Optional[Literal["code"]] = None + + +class DocumentDocumentFileChildComment(BaseModel): + text: str + + id: Optional[str] = None + + created_at: Optional[datetime] = None + + type: Optional[Literal["comment"]] = None + + +class DocumentDocumentFileChildDivider(BaseModel): + id: Optional[str] = None + + type: Optional[Literal["divider"]] = None + + +class DocumentDocumentFileChildEquationChildBlob(BaseModel): + """Represents embedded binary data using data URI scheme. + + Format: data:[][;base64], + Example: data:text/html;base64,PGh0bWw+... + """ + + data: str + + mimetype: str + + id: Optional[str] = None + + type: Optional[Literal["blob"]] = None + + +class DocumentDocumentFileChildEquationChildCode(BaseModel): + text: str + + id: Optional[str] = None + + language: Optional[str] = None + + type: Optional[Literal["code"]] = None + + +class DocumentDocumentFileChildEquationChildComment(BaseModel): + text: str + + id: Optional[str] = None + + created_at: Optional[datetime] = None + + type: Optional[Literal["comment"]] = None + + +class DocumentDocumentFileChildEquationChildDivider(BaseModel): + id: Optional[str] = None + + type: Optional[Literal["divider"]] = None + + +class DocumentDocumentFileChildEquationChildImage(BaseModel): + src: str + + text: str + + id: Optional[str] = None + + type: Optional[Literal["image"]] = None + + +class DocumentDocumentFileChildEquationChildLink(BaseModel): + text: str + + url: str + + id: Optional[str] = None + + type: Optional[Literal["link"]] = None + + +class DocumentDocumentFileChildEquationChildLineBreak(BaseModel): + id: Optional[str] = None + + type: Optional[Literal["line_break"]] = None + + +class DocumentDocumentFileChildEquationChildText(BaseModel): + text: str + + id: Optional[str] = None + + marks: Optional[List[Literal["bold", "italic", "underline", "strikethrough", "code", "math"]]] = None + + type: Optional[Literal["text"]] = None + + +class DocumentDocumentFileChildEquationChildToolCall(BaseModel): + """A tool/function call made by the assistant.""" + + tool_call_id: str + + tool_name: str + + id: Optional[str] = None + + args: Optional[Dict[str, object]] = None + + type: Optional[Literal["tool_call"]] = None + + +class DocumentDocumentFileChildEquationChildToolResult(BaseModel): + """The result of a tool call.""" + + output: Union[str, Dict[str, object], List[object]] + + tool_call_id: str + + tool_name: str + + id: Optional[str] = None + + is_error: Optional[bool] = None + + type: Optional[Literal["tool_result"]] = None + + +class DocumentDocumentFileChildEquationChildTraceMessage(BaseModel): + """A message in an agent trace (user message, assistant message, or thinking).""" + + text: str + + id: Optional[str] = None + + message_type: Optional[Literal["message", "thinking"]] = None + + role: Optional[Literal["user", "assistant"]] = None + + timestamp: Optional[datetime] = None + + type: Optional[Literal["trace_message"]] = None + + +DocumentDocumentFileChildEquationChild: TypeAlias = Union[ + DocumentDocumentFileChildEquationChildBlob, + DocumentDocumentFileChildEquationChildCode, + DocumentDocumentFileChildEquationChildComment, + DocumentDocumentFileChildEquationChildDivider, + DocumentDocumentFileChildEquationChildImage, + DocumentDocumentFileChildEquationChildLink, + DocumentDocumentFileChildEquationChildLineBreak, + DocumentDocumentFileChildEquationChildText, + DocumentDocumentFileChildEquationChildToolCall, + DocumentDocumentFileChildEquationChildToolResult, + DocumentDocumentFileChildEquationChildTraceMessage, + object, +] + + +class DocumentDocumentFileChildEquation(BaseModel): + id: Optional[str] = None + + children: Optional[List[DocumentDocumentFileChildEquationChild]] = None + + text: Optional[str] = None + + type: Optional[Literal["equation"]] = None + + +class DocumentDocumentFileChildFootnoteChildBlob(BaseModel): + """Represents embedded binary data using data URI scheme. + + Format: data:[][;base64], + Example: data:text/html;base64,PGh0bWw+... + """ + + data: str + + mimetype: str + + id: Optional[str] = None + + type: Optional[Literal["blob"]] = None + + +class DocumentDocumentFileChildFootnoteChildCode(BaseModel): + text: str + + id: Optional[str] = None + + language: Optional[str] = None + + type: Optional[Literal["code"]] = None + + +class DocumentDocumentFileChildFootnoteChildComment(BaseModel): + text: str + + id: Optional[str] = None + + created_at: Optional[datetime] = None + + type: Optional[Literal["comment"]] = None + + +class DocumentDocumentFileChildFootnoteChildDivider(BaseModel): + id: Optional[str] = None + + type: Optional[Literal["divider"]] = None + + +class DocumentDocumentFileChildFootnoteChildImage(BaseModel): + src: str + + text: str + + id: Optional[str] = None + + type: Optional[Literal["image"]] = None + + +class DocumentDocumentFileChildFootnoteChildLink(BaseModel): + text: str + + url: str + + id: Optional[str] = None + + type: Optional[Literal["link"]] = None + + +class DocumentDocumentFileChildFootnoteChildLineBreak(BaseModel): + id: Optional[str] = None + + type: Optional[Literal["line_break"]] = None + + +class DocumentDocumentFileChildFootnoteChildText(BaseModel): + text: str + + id: Optional[str] = None + + marks: Optional[List[Literal["bold", "italic", "underline", "strikethrough", "code", "math"]]] = None + + type: Optional[Literal["text"]] = None + + +class DocumentDocumentFileChildFootnoteChildToolCall(BaseModel): + """A tool/function call made by the assistant.""" + + tool_call_id: str + + tool_name: str + + id: Optional[str] = None + + args: Optional[Dict[str, object]] = None + + type: Optional[Literal["tool_call"]] = None + + +class DocumentDocumentFileChildFootnoteChildToolResult(BaseModel): + """The result of a tool call.""" + + output: Union[str, Dict[str, object], List[object]] + + tool_call_id: str + + tool_name: str + + id: Optional[str] = None + + is_error: Optional[bool] = None + + type: Optional[Literal["tool_result"]] = None + + +class DocumentDocumentFileChildFootnoteChildTraceMessage(BaseModel): + """A message in an agent trace (user message, assistant message, or thinking).""" + + text: str + + id: Optional[str] = None + + message_type: Optional[Literal["message", "thinking"]] = None + + role: Optional[Literal["user", "assistant"]] = None + + timestamp: Optional[datetime] = None + + type: Optional[Literal["trace_message"]] = None + + +DocumentDocumentFileChildFootnoteChild: TypeAlias = Union[ + DocumentDocumentFileChildFootnoteChildBlob, + DocumentDocumentFileChildFootnoteChildCode, + DocumentDocumentFileChildFootnoteChildComment, + DocumentDocumentFileChildFootnoteChildDivider, + DocumentDocumentFileChildFootnoteChildImage, + DocumentDocumentFileChildFootnoteChildLink, + DocumentDocumentFileChildFootnoteChildLineBreak, + DocumentDocumentFileChildFootnoteChildText, + DocumentDocumentFileChildFootnoteChildToolCall, + DocumentDocumentFileChildFootnoteChildToolResult, + DocumentDocumentFileChildFootnoteChildTraceMessage, + object, +] + + +class DocumentDocumentFileChildFootnote(BaseModel): + id: Optional[str] = None + + children: Optional[List[DocumentDocumentFileChildFootnoteChild]] = None + + text: Optional[str] = None + + type: Optional[Literal["footnote"]] = None + + +class DocumentDocumentFileChildHeadingChildBlob(BaseModel): + """Represents embedded binary data using data URI scheme. + + Format: data:[][;base64], + Example: data:text/html;base64,PGh0bWw+... + """ + + data: str + + mimetype: str + + id: Optional[str] = None + + type: Optional[Literal["blob"]] = None + + +class DocumentDocumentFileChildHeadingChildCode(BaseModel): + text: str + + id: Optional[str] = None + + language: Optional[str] = None + + type: Optional[Literal["code"]] = None + + +class DocumentDocumentFileChildHeadingChildComment(BaseModel): + text: str + + id: Optional[str] = None + + created_at: Optional[datetime] = None + + type: Optional[Literal["comment"]] = None + + +class DocumentDocumentFileChildHeadingChildDivider(BaseModel): + id: Optional[str] = None + + type: Optional[Literal["divider"]] = None + + +class DocumentDocumentFileChildHeadingChildImage(BaseModel): + src: str + + text: str + + id: Optional[str] = None + + type: Optional[Literal["image"]] = None + + +class DocumentDocumentFileChildHeadingChildLink(BaseModel): + text: str + + url: str + + id: Optional[str] = None + + type: Optional[Literal["link"]] = None + + +class DocumentDocumentFileChildHeadingChildLineBreak(BaseModel): + id: Optional[str] = None + + type: Optional[Literal["line_break"]] = None + + +class DocumentDocumentFileChildHeadingChildText(BaseModel): + text: str + + id: Optional[str] = None + + marks: Optional[List[Literal["bold", "italic", "underline", "strikethrough", "code", "math"]]] = None + + type: Optional[Literal["text"]] = None + + +class DocumentDocumentFileChildHeadingChildToolCall(BaseModel): + """A tool/function call made by the assistant.""" + + tool_call_id: str + + tool_name: str + + id: Optional[str] = None + + args: Optional[Dict[str, object]] = None + + type: Optional[Literal["tool_call"]] = None + + +class DocumentDocumentFileChildHeadingChildToolResult(BaseModel): + """The result of a tool call.""" + + output: Union[str, Dict[str, object], List[object]] + + tool_call_id: str + + tool_name: str + + id: Optional[str] = None + + is_error: Optional[bool] = None + + type: Optional[Literal["tool_result"]] = None + + +class DocumentDocumentFileChildHeadingChildTraceMessage(BaseModel): + """A message in an agent trace (user message, assistant message, or thinking).""" + + text: str + + id: Optional[str] = None + + message_type: Optional[Literal["message", "thinking"]] = None + + role: Optional[Literal["user", "assistant"]] = None + + timestamp: Optional[datetime] = None + + type: Optional[Literal["trace_message"]] = None + + +DocumentDocumentFileChildHeadingChild: TypeAlias = Union[ + DocumentDocumentFileChildHeadingChildBlob, + DocumentDocumentFileChildHeadingChildCode, + DocumentDocumentFileChildHeadingChildComment, + DocumentDocumentFileChildHeadingChildDivider, + DocumentDocumentFileChildHeadingChildImage, + DocumentDocumentFileChildHeadingChildLink, + DocumentDocumentFileChildHeadingChildLineBreak, + DocumentDocumentFileChildHeadingChildText, + DocumentDocumentFileChildHeadingChildToolCall, + DocumentDocumentFileChildHeadingChildToolResult, + DocumentDocumentFileChildHeadingChildTraceMessage, + object, +] + + +class DocumentDocumentFileChildHeading(BaseModel): + level: int + + id: Optional[str] = None + + children: Optional[List[DocumentDocumentFileChildHeadingChild]] = None + + text: Optional[str] = None + + type: Optional[Literal["heading"]] = None + + +class DocumentDocumentFileChildImage(BaseModel): + src: str + + text: str + + id: Optional[str] = None + + type: Optional[Literal["image"]] = None + + +class DocumentDocumentFileChildLink(BaseModel): + text: str + + url: str + + id: Optional[str] = None + + type: Optional[Literal["link"]] = None + + +class DocumentDocumentFileChildLineBreak(BaseModel): + id: Optional[str] = None + + type: Optional[Literal["line_break"]] = None + + +class DocumentDocumentFileChildList(BaseModel): + id: Optional[str] = None + + children: Optional[List[object]] = None + + ordered: Optional[bool] = None + + text: Optional[str] = None + + type: Optional[Literal["list"]] = None + + +class DocumentDocumentFileChildListItemChildBlob(BaseModel): + """Represents embedded binary data using data URI scheme. + + Format: data:[][;base64], + Example: data:text/html;base64,PGh0bWw+... + """ + + data: str + + mimetype: str + + id: Optional[str] = None + + type: Optional[Literal["blob"]] = None + + +class DocumentDocumentFileChildListItemChildCode(BaseModel): + text: str + + id: Optional[str] = None + + language: Optional[str] = None + + type: Optional[Literal["code"]] = None + + +class DocumentDocumentFileChildListItemChildComment(BaseModel): + text: str + + id: Optional[str] = None + + created_at: Optional[datetime] = None + + type: Optional[Literal["comment"]] = None + + +class DocumentDocumentFileChildListItemChildDivider(BaseModel): + id: Optional[str] = None + + type: Optional[Literal["divider"]] = None + + +class DocumentDocumentFileChildListItemChildImage(BaseModel): + src: str + + text: str + + id: Optional[str] = None + + type: Optional[Literal["image"]] = None + + +class DocumentDocumentFileChildListItemChildLink(BaseModel): + text: str + + url: str + + id: Optional[str] = None + + type: Optional[Literal["link"]] = None + + +class DocumentDocumentFileChildListItemChildLineBreak(BaseModel): + id: Optional[str] = None + + type: Optional[Literal["line_break"]] = None + + +class DocumentDocumentFileChildListItemChildText(BaseModel): + text: str + + id: Optional[str] = None + + marks: Optional[List[Literal["bold", "italic", "underline", "strikethrough", "code", "math"]]] = None + + type: Optional[Literal["text"]] = None + + +class DocumentDocumentFileChildListItemChildToolCall(BaseModel): + """A tool/function call made by the assistant.""" + + tool_call_id: str + + tool_name: str + + id: Optional[str] = None + + args: Optional[Dict[str, object]] = None + + type: Optional[Literal["tool_call"]] = None + + +class DocumentDocumentFileChildListItemChildToolResult(BaseModel): + """The result of a tool call.""" + + output: Union[str, Dict[str, object], List[object]] + + tool_call_id: str + + tool_name: str + + id: Optional[str] = None + + is_error: Optional[bool] = None + + type: Optional[Literal["tool_result"]] = None + + +class DocumentDocumentFileChildListItemChildTraceMessage(BaseModel): + """A message in an agent trace (user message, assistant message, or thinking).""" + + text: str + + id: Optional[str] = None + + message_type: Optional[Literal["message", "thinking"]] = None + + role: Optional[Literal["user", "assistant"]] = None + + timestamp: Optional[datetime] = None + + type: Optional[Literal["trace_message"]] = None + + +DocumentDocumentFileChildListItemChild: TypeAlias = Union[ + DocumentDocumentFileChildListItemChildBlob, + DocumentDocumentFileChildListItemChildCode, + DocumentDocumentFileChildListItemChildComment, + DocumentDocumentFileChildListItemChildDivider, + DocumentDocumentFileChildListItemChildImage, + DocumentDocumentFileChildListItemChildLink, + DocumentDocumentFileChildListItemChildLineBreak, + DocumentDocumentFileChildListItemChildText, + DocumentDocumentFileChildListItemChildToolCall, + DocumentDocumentFileChildListItemChildToolResult, + DocumentDocumentFileChildListItemChildTraceMessage, + object, +] + + +class DocumentDocumentFileChildListItem(BaseModel): + id: Optional[str] = None + + children: Optional[List[DocumentDocumentFileChildListItemChild]] = None + + text: Optional[str] = None + + type: Optional[Literal["list_item"]] = None + + +class DocumentDocumentFileChildParagraphChildBlob(BaseModel): + """Represents embedded binary data using data URI scheme. + + Format: data:[][;base64], + Example: data:text/html;base64,PGh0bWw+... + """ + + data: str + + mimetype: str + + id: Optional[str] = None + + type: Optional[Literal["blob"]] = None + + +class DocumentDocumentFileChildParagraphChildCode(BaseModel): + text: str + + id: Optional[str] = None + + language: Optional[str] = None + + type: Optional[Literal["code"]] = None + + +class DocumentDocumentFileChildParagraphChildComment(BaseModel): + text: str + + id: Optional[str] = None + + created_at: Optional[datetime] = None + + type: Optional[Literal["comment"]] = None + + +class DocumentDocumentFileChildParagraphChildDivider(BaseModel): + id: Optional[str] = None + + type: Optional[Literal["divider"]] = None + + +class DocumentDocumentFileChildParagraphChildImage(BaseModel): + src: str + + text: str + + id: Optional[str] = None + + type: Optional[Literal["image"]] = None + + +class DocumentDocumentFileChildParagraphChildLink(BaseModel): + text: str + + url: str + + id: Optional[str] = None + + type: Optional[Literal["link"]] = None + + +class DocumentDocumentFileChildParagraphChildLineBreak(BaseModel): + id: Optional[str] = None + + type: Optional[Literal["line_break"]] = None + + +class DocumentDocumentFileChildParagraphChildText(BaseModel): + text: str + + id: Optional[str] = None + + marks: Optional[List[Literal["bold", "italic", "underline", "strikethrough", "code", "math"]]] = None + + type: Optional[Literal["text"]] = None + + +class DocumentDocumentFileChildParagraphChildToolCall(BaseModel): + """A tool/function call made by the assistant.""" + + tool_call_id: str + + tool_name: str + + id: Optional[str] = None + + args: Optional[Dict[str, object]] = None + + type: Optional[Literal["tool_call"]] = None + + +class DocumentDocumentFileChildParagraphChildToolResult(BaseModel): + """The result of a tool call.""" + + output: Union[str, Dict[str, object], List[object]] + + tool_call_id: str + + tool_name: str + + id: Optional[str] = None + + is_error: Optional[bool] = None + + type: Optional[Literal["tool_result"]] = None + + +class DocumentDocumentFileChildParagraphChildTraceMessage(BaseModel): + """A message in an agent trace (user message, assistant message, or thinking).""" + + text: str + + id: Optional[str] = None + + message_type: Optional[Literal["message", "thinking"]] = None + + role: Optional[Literal["user", "assistant"]] = None + + timestamp: Optional[datetime] = None + + type: Optional[Literal["trace_message"]] = None + + +DocumentDocumentFileChildParagraphChild: TypeAlias = Union[ + DocumentDocumentFileChildParagraphChildBlob, + DocumentDocumentFileChildParagraphChildCode, + DocumentDocumentFileChildParagraphChildComment, + DocumentDocumentFileChildParagraphChildDivider, + DocumentDocumentFileChildParagraphChildImage, + DocumentDocumentFileChildParagraphChildLink, + DocumentDocumentFileChildParagraphChildLineBreak, + DocumentDocumentFileChildParagraphChildText, + DocumentDocumentFileChildParagraphChildToolCall, + DocumentDocumentFileChildParagraphChildToolResult, + DocumentDocumentFileChildParagraphChildTraceMessage, + object, +] + + +class DocumentDocumentFileChildParagraph(BaseModel): + id: Optional[str] = None + + children: Optional[List[DocumentDocumentFileChildParagraphChild]] = None + + text: Optional[str] = None + + type: Optional[Literal["paragraph"]] = None + + +class DocumentDocumentFileChildQuoteChildBlob(BaseModel): + """Represents embedded binary data using data URI scheme. + + Format: data:[][;base64], + Example: data:text/html;base64,PGh0bWw+... + """ + + data: str + + mimetype: str + + id: Optional[str] = None + + type: Optional[Literal["blob"]] = None + + +class DocumentDocumentFileChildQuoteChildCode(BaseModel): + text: str + + id: Optional[str] = None + + language: Optional[str] = None + + type: Optional[Literal["code"]] = None + + +class DocumentDocumentFileChildQuoteChildComment(BaseModel): + text: str + + id: Optional[str] = None + + created_at: Optional[datetime] = None + + type: Optional[Literal["comment"]] = None + + +class DocumentDocumentFileChildQuoteChildDivider(BaseModel): + id: Optional[str] = None + + type: Optional[Literal["divider"]] = None + + +class DocumentDocumentFileChildQuoteChildImage(BaseModel): + src: str + + text: str + + id: Optional[str] = None + + type: Optional[Literal["image"]] = None + + +class DocumentDocumentFileChildQuoteChildLink(BaseModel): + text: str + + url: str + + id: Optional[str] = None + + type: Optional[Literal["link"]] = None + + +class DocumentDocumentFileChildQuoteChildLineBreak(BaseModel): + id: Optional[str] = None + + type: Optional[Literal["line_break"]] = None + + +class DocumentDocumentFileChildQuoteChildText(BaseModel): + text: str + + id: Optional[str] = None + + marks: Optional[List[Literal["bold", "italic", "underline", "strikethrough", "code", "math"]]] = None + + type: Optional[Literal["text"]] = None + + +class DocumentDocumentFileChildQuoteChildToolCall(BaseModel): + """A tool/function call made by the assistant.""" + + tool_call_id: str + + tool_name: str + + id: Optional[str] = None + + args: Optional[Dict[str, object]] = None + + type: Optional[Literal["tool_call"]] = None + + +class DocumentDocumentFileChildQuoteChildToolResult(BaseModel): + """The result of a tool call.""" + + output: Union[str, Dict[str, object], List[object]] + + tool_call_id: str + + tool_name: str + + id: Optional[str] = None + + is_error: Optional[bool] = None + + type: Optional[Literal["tool_result"]] = None + + +class DocumentDocumentFileChildQuoteChildTraceMessage(BaseModel): + """A message in an agent trace (user message, assistant message, or thinking).""" + + text: str + + id: Optional[str] = None + + message_type: Optional[Literal["message", "thinking"]] = None + + role: Optional[Literal["user", "assistant"]] = None + + timestamp: Optional[datetime] = None + + type: Optional[Literal["trace_message"]] = None + + +DocumentDocumentFileChildQuoteChild: TypeAlias = Union[ + DocumentDocumentFileChildQuoteChildBlob, + DocumentDocumentFileChildQuoteChildCode, + DocumentDocumentFileChildQuoteChildComment, + DocumentDocumentFileChildQuoteChildDivider, + DocumentDocumentFileChildQuoteChildImage, + DocumentDocumentFileChildQuoteChildLink, + DocumentDocumentFileChildQuoteChildLineBreak, + DocumentDocumentFileChildQuoteChildText, + DocumentDocumentFileChildQuoteChildToolCall, + DocumentDocumentFileChildQuoteChildToolResult, + DocumentDocumentFileChildQuoteChildTraceMessage, + object, +] + + +class DocumentDocumentFileChildQuote(BaseModel): + id: Optional[str] = None + + children: Optional[List[DocumentDocumentFileChildQuoteChild]] = None + + text: Optional[str] = None + + type: Optional[Literal["quote"]] = None + + +class DocumentDocumentFileChildTable(BaseModel): + id: Optional[str] = None + + children: Optional[List[object]] = None + + has_header: Optional[bool] = None + """Whether the first row should be treated as a header""" + + text: Optional[str] = None + + type: Optional[Literal["table"]] = None + + +class DocumentDocumentFileChildTableCellChildBlob(BaseModel): + """Represents embedded binary data using data URI scheme. + + Format: data:[][;base64], + Example: data:text/html;base64,PGh0bWw+... + """ + + data: str + + mimetype: str + + id: Optional[str] = None + + type: Optional[Literal["blob"]] = None + + +class DocumentDocumentFileChildTableCellChildCode(BaseModel): + text: str + + id: Optional[str] = None + + language: Optional[str] = None + + type: Optional[Literal["code"]] = None + + +class DocumentDocumentFileChildTableCellChildComment(BaseModel): + text: str + + id: Optional[str] = None + + created_at: Optional[datetime] = None + + type: Optional[Literal["comment"]] = None + + +class DocumentDocumentFileChildTableCellChildDivider(BaseModel): + id: Optional[str] = None + + type: Optional[Literal["divider"]] = None + + +class DocumentDocumentFileChildTableCellChildImage(BaseModel): + src: str + + text: str + + id: Optional[str] = None + + type: Optional[Literal["image"]] = None + + +class DocumentDocumentFileChildTableCellChildLink(BaseModel): + text: str + + url: str + + id: Optional[str] = None + + type: Optional[Literal["link"]] = None + + +class DocumentDocumentFileChildTableCellChildLineBreak(BaseModel): + id: Optional[str] = None + + type: Optional[Literal["line_break"]] = None + + +class DocumentDocumentFileChildTableCellChildText(BaseModel): + text: str + + id: Optional[str] = None + + marks: Optional[List[Literal["bold", "italic", "underline", "strikethrough", "code", "math"]]] = None + + type: Optional[Literal["text"]] = None + + +class DocumentDocumentFileChildTableCellChildToolCall(BaseModel): + """A tool/function call made by the assistant.""" + + tool_call_id: str + + tool_name: str + + id: Optional[str] = None + + args: Optional[Dict[str, object]] = None + + type: Optional[Literal["tool_call"]] = None + + +class DocumentDocumentFileChildTableCellChildToolResult(BaseModel): + """The result of a tool call.""" + + output: Union[str, Dict[str, object], List[object]] + + tool_call_id: str + + tool_name: str + + id: Optional[str] = None + + is_error: Optional[bool] = None + + type: Optional[Literal["tool_result"]] = None + + +class DocumentDocumentFileChildTableCellChildTraceMessage(BaseModel): + """A message in an agent trace (user message, assistant message, or thinking).""" + + text: str + + id: Optional[str] = None + + message_type: Optional[Literal["message", "thinking"]] = None + + role: Optional[Literal["user", "assistant"]] = None + + timestamp: Optional[datetime] = None + + type: Optional[Literal["trace_message"]] = None + + +DocumentDocumentFileChildTableCellChild: TypeAlias = Union[ + DocumentDocumentFileChildTableCellChildBlob, + DocumentDocumentFileChildTableCellChildCode, + DocumentDocumentFileChildTableCellChildComment, + DocumentDocumentFileChildTableCellChildDivider, + DocumentDocumentFileChildTableCellChildImage, + DocumentDocumentFileChildTableCellChildLink, + DocumentDocumentFileChildTableCellChildLineBreak, + DocumentDocumentFileChildTableCellChildText, + DocumentDocumentFileChildTableCellChildToolCall, + DocumentDocumentFileChildTableCellChildToolResult, + DocumentDocumentFileChildTableCellChildTraceMessage, + object, +] + + +class DocumentDocumentFileChildTableCell(BaseModel): + id: Optional[str] = None + + align: Optional[Literal["left", "center", "right"]] = None + + children: Optional[List[DocumentDocumentFileChildTableCellChild]] = None + + text: Optional[str] = None + + type: Optional[Literal["table_cell"]] = None + + +class DocumentDocumentFileChildTableRow(BaseModel): + id: Optional[str] = None + + children: Optional[List[object]] = None + + text: Optional[str] = None + + type: Optional[Literal["table_row"]] = None + + +class DocumentDocumentFileChildText(BaseModel): + text: str + + id: Optional[str] = None + + marks: Optional[List[Literal["bold", "italic", "underline", "strikethrough", "code", "math"]]] = None + + type: Optional[Literal["text"]] = None + + +class DocumentDocumentFileChildToDoChildBlob(BaseModel): + """Represents embedded binary data using data URI scheme. + + Format: data:[][;base64], + Example: data:text/html;base64,PGh0bWw+... + """ + + data: str + + mimetype: str + + id: Optional[str] = None + + type: Optional[Literal["blob"]] = None + + +class DocumentDocumentFileChildToDoChildCode(BaseModel): + text: str + + id: Optional[str] = None + + language: Optional[str] = None + + type: Optional[Literal["code"]] = None + + +class DocumentDocumentFileChildToDoChildComment(BaseModel): + text: str + + id: Optional[str] = None + + created_at: Optional[datetime] = None + + type: Optional[Literal["comment"]] = None + + +class DocumentDocumentFileChildToDoChildDivider(BaseModel): + id: Optional[str] = None + + type: Optional[Literal["divider"]] = None + + +class DocumentDocumentFileChildToDoChildImage(BaseModel): + src: str + + text: str + + id: Optional[str] = None + + type: Optional[Literal["image"]] = None + + +class DocumentDocumentFileChildToDoChildLink(BaseModel): + text: str + + url: str + + id: Optional[str] = None + + type: Optional[Literal["link"]] = None + + +class DocumentDocumentFileChildToDoChildLineBreak(BaseModel): + id: Optional[str] = None + + type: Optional[Literal["line_break"]] = None + + +class DocumentDocumentFileChildToDoChildText(BaseModel): + text: str + + id: Optional[str] = None + + marks: Optional[List[Literal["bold", "italic", "underline", "strikethrough", "code", "math"]]] = None + + type: Optional[Literal["text"]] = None + + +class DocumentDocumentFileChildToDoChildToolCall(BaseModel): + """A tool/function call made by the assistant.""" + + tool_call_id: str + + tool_name: str + + id: Optional[str] = None + + args: Optional[Dict[str, object]] = None + + type: Optional[Literal["tool_call"]] = None + + +class DocumentDocumentFileChildToDoChildToolResult(BaseModel): + """The result of a tool call.""" + + output: Union[str, Dict[str, object], List[object]] + + tool_call_id: str + + tool_name: str + + id: Optional[str] = None + + is_error: Optional[bool] = None + + type: Optional[Literal["tool_result"]] = None + + +class DocumentDocumentFileChildToDoChildTraceMessage(BaseModel): + """A message in an agent trace (user message, assistant message, or thinking).""" + + text: str + + id: Optional[str] = None + + message_type: Optional[Literal["message", "thinking"]] = None + + role: Optional[Literal["user", "assistant"]] = None + + timestamp: Optional[datetime] = None + + type: Optional[Literal["trace_message"]] = None + + +DocumentDocumentFileChildToDoChild: TypeAlias = Union[ + DocumentDocumentFileChildToDoChildBlob, + DocumentDocumentFileChildToDoChildCode, + DocumentDocumentFileChildToDoChildComment, + DocumentDocumentFileChildToDoChildDivider, + DocumentDocumentFileChildToDoChildImage, + DocumentDocumentFileChildToDoChildLink, + DocumentDocumentFileChildToDoChildLineBreak, + DocumentDocumentFileChildToDoChildText, + DocumentDocumentFileChildToDoChildToolCall, + DocumentDocumentFileChildToDoChildToolResult, + DocumentDocumentFileChildToDoChildTraceMessage, + object, +] + + +class DocumentDocumentFileChildToDo(BaseModel): + id: Optional[str] = None + + checked: Optional[bool] = None + + children: Optional[List[DocumentDocumentFileChildToDoChild]] = None + + text: Optional[str] = None + + type: Optional[Literal["todo"]] = None + + +class DocumentDocumentFileChildToolCall(BaseModel): + """A tool/function call made by the assistant.""" + + tool_call_id: str + + tool_name: str + + id: Optional[str] = None + + args: Optional[Dict[str, object]] = None + + type: Optional[Literal["tool_call"]] = None + + +class DocumentDocumentFileChildToolResult(BaseModel): + """The result of a tool call.""" + + output: Union[str, Dict[str, object], List[object]] + + tool_call_id: str + + tool_name: str + + id: Optional[str] = None + + is_error: Optional[bool] = None + + type: Optional[Literal["tool_result"]] = None + + +class DocumentDocumentFileChildTraceMessage(BaseModel): + """A message in an agent trace (user message, assistant message, or thinking).""" + + text: str + + id: Optional[str] = None + + message_type: Optional[Literal["message", "thinking"]] = None + + role: Optional[Literal["user", "assistant"]] = None + + timestamp: Optional[datetime] = None + + type: Optional[Literal["trace_message"]] = None + + +class DocumentDocumentFileChildUtterance(BaseModel): + """A speaker-attributed segment of a transcript (ENG-2476/D10). + + "Utterance" is the standard name for this across transcription providers + (AssemblyAI, Deepgram, Rev). Timestamps are relative offsets in seconds — + provider-native; absolute times derive from `Transcript.started_at`. + """ + + text: str + + id: Optional[str] = None + + end: Optional[float] = None + + speaker: Optional[object] = None + + start: Optional[float] = None + + type: Optional[Literal["utterance"]] = None + + +DocumentDocumentFileChild: TypeAlias = Annotated[ + Union[ + DocumentDocumentFileChildBlob, + DocumentDocumentFileChildCallout, + DocumentDocumentFileChildChunk, + DocumentDocumentFileChildCode, + DocumentDocumentFileChildComment, + DocumentDocumentFileChildDivider, + DocumentDocumentFileChildEquation, + DocumentDocumentFileChildFootnote, + DocumentDocumentFileChildHeading, + DocumentDocumentFileChildImage, + DocumentDocumentFileChildLink, + DocumentDocumentFileChildLineBreak, + DocumentDocumentFileChildList, + DocumentDocumentFileChildListItem, + DocumentDocumentFileChildParagraph, + DocumentDocumentFileChildQuote, + DocumentDocumentFileChildTable, + DocumentDocumentFileChildTableCell, + DocumentDocumentFileChildTableRow, + DocumentDocumentFileChildText, + DocumentDocumentFileChildToDo, + DocumentDocumentFileChildToolCall, + DocumentDocumentFileChildToolResult, + DocumentDocumentFileChildTraceMessage, + DocumentDocumentFileChildUtterance, + ], + PropertyInfo(discriminator="type"), +] + + +class DocumentDocumentFile(BaseModel): + content_type: str + + filename: str + + id: Optional[str] = None + + children: Optional[List[DocumentDocumentFileChild]] = None + + path: Optional[List[str]] = None + + text: Optional[str] = None + + title: Optional[str] = None + + type: Optional[Literal["file"]] = None + + +class DocumentDocumentConversationChildSenderChildBlob(BaseModel): + """Represents embedded binary data using data URI scheme. + + Format: data:[][;base64], + Example: data:text/html;base64,PGh0bWw+... + """ + + data: str + + mimetype: str + + id: Optional[str] = None + + type: Optional[Literal["blob"]] = None + + +class DocumentDocumentConversationChildSenderChildCode(BaseModel): + text: str + + id: Optional[str] = None + + language: Optional[str] = None + + type: Optional[Literal["code"]] = None + + +class DocumentDocumentConversationChildSenderChildComment(BaseModel): + text: str + + id: Optional[str] = None + + created_at: Optional[datetime] = None + + type: Optional[Literal["comment"]] = None + + +class DocumentDocumentConversationChildSenderChildDivider(BaseModel): + id: Optional[str] = None + + type: Optional[Literal["divider"]] = None + + +class DocumentDocumentConversationChildSenderChildImage(BaseModel): + src: str + + text: str + + id: Optional[str] = None + + type: Optional[Literal["image"]] = None + + +class DocumentDocumentConversationChildSenderChildLink(BaseModel): + text: str + + url: str + + id: Optional[str] = None + + type: Optional[Literal["link"]] = None + + +class DocumentDocumentConversationChildSenderChildLineBreak(BaseModel): + id: Optional[str] = None + + type: Optional[Literal["line_break"]] = None + + +class DocumentDocumentConversationChildSenderChildText(BaseModel): + text: str + + id: Optional[str] = None + + marks: Optional[List[Literal["bold", "italic", "underline", "strikethrough", "code", "math"]]] = None + + type: Optional[Literal["text"]] = None + + +class DocumentDocumentConversationChildSenderChildToolCall(BaseModel): + """A tool/function call made by the assistant.""" + + tool_call_id: str + + tool_name: str + + id: Optional[str] = None + + args: Optional[Dict[str, object]] = None + + type: Optional[Literal["tool_call"]] = None + + +class DocumentDocumentConversationChildSenderChildToolResult(BaseModel): + """The result of a tool call.""" + + output: Union[str, Dict[str, object], List[object]] + + tool_call_id: str + + tool_name: str + + id: Optional[str] = None + + is_error: Optional[bool] = None + + type: Optional[Literal["tool_result"]] = None + + +class DocumentDocumentConversationChildSenderChildTraceMessage(BaseModel): + """A message in an agent trace (user message, assistant message, or thinking).""" + + text: str + + id: Optional[str] = None + + message_type: Optional[Literal["message", "thinking"]] = None + + role: Optional[Literal["user", "assistant"]] = None + + timestamp: Optional[datetime] = None + + type: Optional[Literal["trace_message"]] = None + + +DocumentDocumentConversationChildSenderChild: TypeAlias = Union[ + DocumentDocumentConversationChildSenderChildBlob, + DocumentDocumentConversationChildSenderChildCode, + DocumentDocumentConversationChildSenderChildComment, + DocumentDocumentConversationChildSenderChildDivider, + DocumentDocumentConversationChildSenderChildImage, + DocumentDocumentConversationChildSenderChildLink, + DocumentDocumentConversationChildSenderChildLineBreak, + DocumentDocumentConversationChildSenderChildText, + DocumentDocumentConversationChildSenderChildToolCall, + DocumentDocumentConversationChildSenderChildToolResult, + DocumentDocumentConversationChildSenderChildTraceMessage, + object, +] + + +class DocumentDocumentConversationChildSender(BaseModel): + id: Optional[str] = None + + address: Optional[str] = None + + alt_names: Optional[List[str]] = None + + children: Optional[List[DocumentDocumentConversationChildSenderChild]] = None + + company: Optional[str] = None + + company_ids: Optional[List[str]] = None + + date_of_birth: Optional[date] = None + + deal_ids: Optional[List[str]] = None + + email: Optional[str] = None + + emails: Optional[List[str]] = None + """All known email addresses; `email` holds the primary one""" + + image_url: Optional[str] = None + + job_title: Optional[str] = None + + link_urls: Optional[List[str]] = None + + name: Optional[str] = None + + phone_numbers: Optional[List[str]] = None + + tags: Optional[List[str]] = None + + text: Optional[str] = None + + type: Optional[Literal["person"]] = None + + username: Optional[str] = None + + +class DocumentDocumentConversationChildChildBlob(BaseModel): + """Represents embedded binary data using data URI scheme. + + Format: data:[][;base64], + Example: data:text/html;base64,PGh0bWw+... + """ + + data: str + + mimetype: str + + id: Optional[str] = None + + type: Optional[Literal["blob"]] = None + + +class DocumentDocumentConversationChildChildCalloutChildBlob(BaseModel): + """Represents embedded binary data using data URI scheme. + + Format: data:[][;base64], + Example: data:text/html;base64,PGh0bWw+... + """ + + data: str + + mimetype: str + + id: Optional[str] = None + + type: Optional[Literal["blob"]] = None + + +class DocumentDocumentConversationChildChildCalloutChildCode(BaseModel): + text: str + + id: Optional[str] = None + + language: Optional[str] = None + + type: Optional[Literal["code"]] = None + + +class DocumentDocumentConversationChildChildCalloutChildComment(BaseModel): + text: str + + id: Optional[str] = None + + created_at: Optional[datetime] = None + + type: Optional[Literal["comment"]] = None + + +class DocumentDocumentConversationChildChildCalloutChildDivider(BaseModel): + id: Optional[str] = None + + type: Optional[Literal["divider"]] = None + + +class DocumentDocumentConversationChildChildCalloutChildImage(BaseModel): + src: str + + text: str + + id: Optional[str] = None + + type: Optional[Literal["image"]] = None + + +class DocumentDocumentConversationChildChildCalloutChildLink(BaseModel): + text: str + + url: str + + id: Optional[str] = None + + type: Optional[Literal["link"]] = None + + +class DocumentDocumentConversationChildChildCalloutChildLineBreak(BaseModel): + id: Optional[str] = None + + type: Optional[Literal["line_break"]] = None + + +class DocumentDocumentConversationChildChildCalloutChildText(BaseModel): + text: str + + id: Optional[str] = None + + marks: Optional[List[Literal["bold", "italic", "underline", "strikethrough", "code", "math"]]] = None + + type: Optional[Literal["text"]] = None + + +class DocumentDocumentConversationChildChildCalloutChildToolCall(BaseModel): + """A tool/function call made by the assistant.""" + + tool_call_id: str + + tool_name: str + + id: Optional[str] = None + + args: Optional[Dict[str, object]] = None + + type: Optional[Literal["tool_call"]] = None + + +class DocumentDocumentConversationChildChildCalloutChildToolResult(BaseModel): + """The result of a tool call.""" + + output: Union[str, Dict[str, object], List[object]] + + tool_call_id: str + + tool_name: str + + id: Optional[str] = None + + is_error: Optional[bool] = None + + type: Optional[Literal["tool_result"]] = None + + +class DocumentDocumentConversationChildChildCalloutChildTraceMessage(BaseModel): + """A message in an agent trace (user message, assistant message, or thinking).""" + + text: str + + id: Optional[str] = None + + message_type: Optional[Literal["message", "thinking"]] = None + + role: Optional[Literal["user", "assistant"]] = None + + timestamp: Optional[datetime] = None + + type: Optional[Literal["trace_message"]] = None + + +DocumentDocumentConversationChildChildCalloutChild: TypeAlias = Union[ + DocumentDocumentConversationChildChildCalloutChildBlob, + DocumentDocumentConversationChildChildCalloutChildCode, + DocumentDocumentConversationChildChildCalloutChildComment, + DocumentDocumentConversationChildChildCalloutChildDivider, + DocumentDocumentConversationChildChildCalloutChildImage, + DocumentDocumentConversationChildChildCalloutChildLink, + DocumentDocumentConversationChildChildCalloutChildLineBreak, + DocumentDocumentConversationChildChildCalloutChildText, + DocumentDocumentConversationChildChildCalloutChildToolCall, + DocumentDocumentConversationChildChildCalloutChildToolResult, + DocumentDocumentConversationChildChildCalloutChildTraceMessage, + object, +] + + +class DocumentDocumentConversationChildChildCallout(BaseModel): + id: Optional[str] = None + + children: Optional[List[DocumentDocumentConversationChildChildCalloutChild]] = None + + text: Optional[str] = None + + title: Optional[str] = None + + type: Optional[Literal["callout"]] = None + + +class DocumentDocumentConversationChildChildChunkChildBlob(BaseModel): + """Represents embedded binary data using data URI scheme. + + Format: data:[][;base64], + Example: data:text/html;base64,PGh0bWw+... + """ + + data: str + + mimetype: str + + id: Optional[str] = None + + type: Optional[Literal["blob"]] = None + + +class DocumentDocumentConversationChildChildChunkChildCode(BaseModel): + text: str + + id: Optional[str] = None + + language: Optional[str] = None + + type: Optional[Literal["code"]] = None + + +class DocumentDocumentConversationChildChildChunkChildComment(BaseModel): + text: str + + id: Optional[str] = None + + created_at: Optional[datetime] = None + + type: Optional[Literal["comment"]] = None + + +class DocumentDocumentConversationChildChildChunkChildDivider(BaseModel): + id: Optional[str] = None + + type: Optional[Literal["divider"]] = None + + +class DocumentDocumentConversationChildChildChunkChildImage(BaseModel): + src: str + + text: str + + id: Optional[str] = None + + type: Optional[Literal["image"]] = None + + +class DocumentDocumentConversationChildChildChunkChildLink(BaseModel): + text: str + + url: str + + id: Optional[str] = None + + type: Optional[Literal["link"]] = None + + +class DocumentDocumentConversationChildChildChunkChildLineBreak(BaseModel): + id: Optional[str] = None + + type: Optional[Literal["line_break"]] = None + + +class DocumentDocumentConversationChildChildChunkChildText(BaseModel): + text: str + + id: Optional[str] = None + + marks: Optional[List[Literal["bold", "italic", "underline", "strikethrough", "code", "math"]]] = None + + type: Optional[Literal["text"]] = None + + +class DocumentDocumentConversationChildChildChunkChildToolCall(BaseModel): + """A tool/function call made by the assistant.""" + + tool_call_id: str + + tool_name: str + + id: Optional[str] = None + + args: Optional[Dict[str, object]] = None + + type: Optional[Literal["tool_call"]] = None + + +class DocumentDocumentConversationChildChildChunkChildToolResult(BaseModel): + """The result of a tool call.""" + + output: Union[str, Dict[str, object], List[object]] + + tool_call_id: str + + tool_name: str + + id: Optional[str] = None + + is_error: Optional[bool] = None + + type: Optional[Literal["tool_result"]] = None + + +class DocumentDocumentConversationChildChildChunkChildTraceMessage(BaseModel): + """A message in an agent trace (user message, assistant message, or thinking).""" + + text: str + + id: Optional[str] = None + + message_type: Optional[Literal["message", "thinking"]] = None + + role: Optional[Literal["user", "assistant"]] = None + + timestamp: Optional[datetime] = None + + type: Optional[Literal["trace_message"]] = None + + +DocumentDocumentConversationChildChildChunkChild: TypeAlias = Union[ + DocumentDocumentConversationChildChildChunkChildBlob, + DocumentDocumentConversationChildChildChunkChildCode, + DocumentDocumentConversationChildChildChunkChildComment, + DocumentDocumentConversationChildChildChunkChildDivider, + DocumentDocumentConversationChildChildChunkChildImage, + DocumentDocumentConversationChildChildChunkChildLink, + DocumentDocumentConversationChildChildChunkChildLineBreak, + DocumentDocumentConversationChildChildChunkChildText, + DocumentDocumentConversationChildChildChunkChildToolCall, + DocumentDocumentConversationChildChildChunkChildToolResult, + DocumentDocumentConversationChildChildChunkChildTraceMessage, + object, +] + + +class DocumentDocumentConversationChildChildChunk(BaseModel): + id: Optional[str] = None + + children: Optional[List[DocumentDocumentConversationChildChildChunkChild]] = None + + text: Optional[str] = None + + type: Optional[Literal["chunk"]] = None + + +class DocumentDocumentConversationChildChildCode(BaseModel): + text: str + + id: Optional[str] = None + + language: Optional[str] = None + + type: Optional[Literal["code"]] = None + + +class DocumentDocumentConversationChildChildComment(BaseModel): + text: str + + id: Optional[str] = None + + created_at: Optional[datetime] = None + + type: Optional[Literal["comment"]] = None + + +class DocumentDocumentConversationChildChildDivider(BaseModel): + id: Optional[str] = None + + type: Optional[Literal["divider"]] = None + + +class DocumentDocumentConversationChildChildEquationChildBlob(BaseModel): + """Represents embedded binary data using data URI scheme. + + Format: data:[][;base64], + Example: data:text/html;base64,PGh0bWw+... + """ + + data: str + + mimetype: str + + id: Optional[str] = None + + type: Optional[Literal["blob"]] = None + + +class DocumentDocumentConversationChildChildEquationChildCode(BaseModel): + text: str + + id: Optional[str] = None + + language: Optional[str] = None + + type: Optional[Literal["code"]] = None + + +class DocumentDocumentConversationChildChildEquationChildComment(BaseModel): + text: str + + id: Optional[str] = None + + created_at: Optional[datetime] = None + + type: Optional[Literal["comment"]] = None + + +class DocumentDocumentConversationChildChildEquationChildDivider(BaseModel): + id: Optional[str] = None + + type: Optional[Literal["divider"]] = None + + +class DocumentDocumentConversationChildChildEquationChildImage(BaseModel): + src: str + + text: str + + id: Optional[str] = None + + type: Optional[Literal["image"]] = None + + +class DocumentDocumentConversationChildChildEquationChildLink(BaseModel): + text: str + + url: str + + id: Optional[str] = None + + type: Optional[Literal["link"]] = None + + +class DocumentDocumentConversationChildChildEquationChildLineBreak(BaseModel): + id: Optional[str] = None + + type: Optional[Literal["line_break"]] = None + + +class DocumentDocumentConversationChildChildEquationChildText(BaseModel): + text: str + + id: Optional[str] = None + + marks: Optional[List[Literal["bold", "italic", "underline", "strikethrough", "code", "math"]]] = None + + type: Optional[Literal["text"]] = None + + +class DocumentDocumentConversationChildChildEquationChildToolCall(BaseModel): + """A tool/function call made by the assistant.""" + + tool_call_id: str + + tool_name: str + + id: Optional[str] = None + + args: Optional[Dict[str, object]] = None + + type: Optional[Literal["tool_call"]] = None + + +class DocumentDocumentConversationChildChildEquationChildToolResult(BaseModel): + """The result of a tool call.""" + + output: Union[str, Dict[str, object], List[object]] + + tool_call_id: str + + tool_name: str + + id: Optional[str] = None + + is_error: Optional[bool] = None + + type: Optional[Literal["tool_result"]] = None + + +class DocumentDocumentConversationChildChildEquationChildTraceMessage(BaseModel): + """A message in an agent trace (user message, assistant message, or thinking).""" + + text: str + + id: Optional[str] = None + + message_type: Optional[Literal["message", "thinking"]] = None + + role: Optional[Literal["user", "assistant"]] = None + + timestamp: Optional[datetime] = None + + type: Optional[Literal["trace_message"]] = None + + +DocumentDocumentConversationChildChildEquationChild: TypeAlias = Union[ + DocumentDocumentConversationChildChildEquationChildBlob, + DocumentDocumentConversationChildChildEquationChildCode, + DocumentDocumentConversationChildChildEquationChildComment, + DocumentDocumentConversationChildChildEquationChildDivider, + DocumentDocumentConversationChildChildEquationChildImage, + DocumentDocumentConversationChildChildEquationChildLink, + DocumentDocumentConversationChildChildEquationChildLineBreak, + DocumentDocumentConversationChildChildEquationChildText, + DocumentDocumentConversationChildChildEquationChildToolCall, + DocumentDocumentConversationChildChildEquationChildToolResult, + DocumentDocumentConversationChildChildEquationChildTraceMessage, + object, +] + + +class DocumentDocumentConversationChildChildEquation(BaseModel): + id: Optional[str] = None + + children: Optional[List[DocumentDocumentConversationChildChildEquationChild]] = None + + text: Optional[str] = None + + type: Optional[Literal["equation"]] = None + + +class DocumentDocumentConversationChildChildFootnoteChildBlob(BaseModel): + """Represents embedded binary data using data URI scheme. + + Format: data:[][;base64], + Example: data:text/html;base64,PGh0bWw+... + """ + + data: str + + mimetype: str + + id: Optional[str] = None + + type: Optional[Literal["blob"]] = None + + +class DocumentDocumentConversationChildChildFootnoteChildCode(BaseModel): + text: str + + id: Optional[str] = None + + language: Optional[str] = None + + type: Optional[Literal["code"]] = None + + +class DocumentDocumentConversationChildChildFootnoteChildComment(BaseModel): + text: str + + id: Optional[str] = None + + created_at: Optional[datetime] = None + + type: Optional[Literal["comment"]] = None + + +class DocumentDocumentConversationChildChildFootnoteChildDivider(BaseModel): + id: Optional[str] = None + + type: Optional[Literal["divider"]] = None + + +class DocumentDocumentConversationChildChildFootnoteChildImage(BaseModel): + src: str + + text: str + + id: Optional[str] = None + + type: Optional[Literal["image"]] = None + + +class DocumentDocumentConversationChildChildFootnoteChildLink(BaseModel): + text: str + + url: str + + id: Optional[str] = None + + type: Optional[Literal["link"]] = None + + +class DocumentDocumentConversationChildChildFootnoteChildLineBreak(BaseModel): + id: Optional[str] = None + + type: Optional[Literal["line_break"]] = None + + +class DocumentDocumentConversationChildChildFootnoteChildText(BaseModel): + text: str + + id: Optional[str] = None + + marks: Optional[List[Literal["bold", "italic", "underline", "strikethrough", "code", "math"]]] = None + + type: Optional[Literal["text"]] = None + + +class DocumentDocumentConversationChildChildFootnoteChildToolCall(BaseModel): + """A tool/function call made by the assistant.""" + + tool_call_id: str + + tool_name: str + + id: Optional[str] = None + + args: Optional[Dict[str, object]] = None + + type: Optional[Literal["tool_call"]] = None + + +class DocumentDocumentConversationChildChildFootnoteChildToolResult(BaseModel): + """The result of a tool call.""" + + output: Union[str, Dict[str, object], List[object]] + + tool_call_id: str + + tool_name: str + + id: Optional[str] = None + + is_error: Optional[bool] = None + + type: Optional[Literal["tool_result"]] = None + + +class DocumentDocumentConversationChildChildFootnoteChildTraceMessage(BaseModel): + """A message in an agent trace (user message, assistant message, or thinking).""" + + text: str + + id: Optional[str] = None + + message_type: Optional[Literal["message", "thinking"]] = None + + role: Optional[Literal["user", "assistant"]] = None + + timestamp: Optional[datetime] = None + + type: Optional[Literal["trace_message"]] = None + + +DocumentDocumentConversationChildChildFootnoteChild: TypeAlias = Union[ + DocumentDocumentConversationChildChildFootnoteChildBlob, + DocumentDocumentConversationChildChildFootnoteChildCode, + DocumentDocumentConversationChildChildFootnoteChildComment, + DocumentDocumentConversationChildChildFootnoteChildDivider, + DocumentDocumentConversationChildChildFootnoteChildImage, + DocumentDocumentConversationChildChildFootnoteChildLink, + DocumentDocumentConversationChildChildFootnoteChildLineBreak, + DocumentDocumentConversationChildChildFootnoteChildText, + DocumentDocumentConversationChildChildFootnoteChildToolCall, + DocumentDocumentConversationChildChildFootnoteChildToolResult, + DocumentDocumentConversationChildChildFootnoteChildTraceMessage, + object, +] + + +class DocumentDocumentConversationChildChildFootnote(BaseModel): + id: Optional[str] = None + + children: Optional[List[DocumentDocumentConversationChildChildFootnoteChild]] = None + + text: Optional[str] = None + + type: Optional[Literal["footnote"]] = None + + +class DocumentDocumentConversationChildChildHeadingChildBlob(BaseModel): + """Represents embedded binary data using data URI scheme. + + Format: data:[][;base64], + Example: data:text/html;base64,PGh0bWw+... + """ + + data: str + + mimetype: str + + id: Optional[str] = None + + type: Optional[Literal["blob"]] = None + + +class DocumentDocumentConversationChildChildHeadingChildCode(BaseModel): + text: str + + id: Optional[str] = None + + language: Optional[str] = None + + type: Optional[Literal["code"]] = None + + +class DocumentDocumentConversationChildChildHeadingChildComment(BaseModel): + text: str + + id: Optional[str] = None + + created_at: Optional[datetime] = None + + type: Optional[Literal["comment"]] = None + + +class DocumentDocumentConversationChildChildHeadingChildDivider(BaseModel): + id: Optional[str] = None + + type: Optional[Literal["divider"]] = None + + +class DocumentDocumentConversationChildChildHeadingChildImage(BaseModel): + src: str + + text: str + + id: Optional[str] = None + + type: Optional[Literal["image"]] = None + + +class DocumentDocumentConversationChildChildHeadingChildLink(BaseModel): + text: str + + url: str + + id: Optional[str] = None + + type: Optional[Literal["link"]] = None + + +class DocumentDocumentConversationChildChildHeadingChildLineBreak(BaseModel): + id: Optional[str] = None + + type: Optional[Literal["line_break"]] = None + + +class DocumentDocumentConversationChildChildHeadingChildText(BaseModel): + text: str + + id: Optional[str] = None + + marks: Optional[List[Literal["bold", "italic", "underline", "strikethrough", "code", "math"]]] = None + + type: Optional[Literal["text"]] = None + + +class DocumentDocumentConversationChildChildHeadingChildToolCall(BaseModel): + """A tool/function call made by the assistant.""" + + tool_call_id: str + + tool_name: str + + id: Optional[str] = None + + args: Optional[Dict[str, object]] = None + + type: Optional[Literal["tool_call"]] = None + + +class DocumentDocumentConversationChildChildHeadingChildToolResult(BaseModel): + """The result of a tool call.""" + + output: Union[str, Dict[str, object], List[object]] + + tool_call_id: str + + tool_name: str + + id: Optional[str] = None + + is_error: Optional[bool] = None + + type: Optional[Literal["tool_result"]] = None + + +class DocumentDocumentConversationChildChildHeadingChildTraceMessage(BaseModel): + """A message in an agent trace (user message, assistant message, or thinking).""" + + text: str + + id: Optional[str] = None + + message_type: Optional[Literal["message", "thinking"]] = None + + role: Optional[Literal["user", "assistant"]] = None + + timestamp: Optional[datetime] = None + + type: Optional[Literal["trace_message"]] = None + + +DocumentDocumentConversationChildChildHeadingChild: TypeAlias = Union[ + DocumentDocumentConversationChildChildHeadingChildBlob, + DocumentDocumentConversationChildChildHeadingChildCode, + DocumentDocumentConversationChildChildHeadingChildComment, + DocumentDocumentConversationChildChildHeadingChildDivider, + DocumentDocumentConversationChildChildHeadingChildImage, + DocumentDocumentConversationChildChildHeadingChildLink, + DocumentDocumentConversationChildChildHeadingChildLineBreak, + DocumentDocumentConversationChildChildHeadingChildText, + DocumentDocumentConversationChildChildHeadingChildToolCall, + DocumentDocumentConversationChildChildHeadingChildToolResult, + DocumentDocumentConversationChildChildHeadingChildTraceMessage, + object, +] + + +class DocumentDocumentConversationChildChildHeading(BaseModel): + level: int + + id: Optional[str] = None + + children: Optional[List[DocumentDocumentConversationChildChildHeadingChild]] = None + + text: Optional[str] = None + + type: Optional[Literal["heading"]] = None + + +class DocumentDocumentConversationChildChildImage(BaseModel): + src: str + + text: str + + id: Optional[str] = None + + type: Optional[Literal["image"]] = None + + +class DocumentDocumentConversationChildChildLink(BaseModel): + text: str + + url: str + + id: Optional[str] = None + + type: Optional[Literal["link"]] = None + + +class DocumentDocumentConversationChildChildLineBreak(BaseModel): + id: Optional[str] = None + + type: Optional[Literal["line_break"]] = None + + +class DocumentDocumentConversationChildChildList(BaseModel): + id: Optional[str] = None + + children: Optional[List[object]] = None + + ordered: Optional[bool] = None + + text: Optional[str] = None + + type: Optional[Literal["list"]] = None + + +class DocumentDocumentConversationChildChildListItemChildBlob(BaseModel): + """Represents embedded binary data using data URI scheme. + + Format: data:[][;base64], + Example: data:text/html;base64,PGh0bWw+... + """ + + data: str + + mimetype: str + + id: Optional[str] = None + + type: Optional[Literal["blob"]] = None + + +class DocumentDocumentConversationChildChildListItemChildCode(BaseModel): + text: str + + id: Optional[str] = None + + language: Optional[str] = None + + type: Optional[Literal["code"]] = None + + +class DocumentDocumentConversationChildChildListItemChildComment(BaseModel): + text: str + + id: Optional[str] = None + + created_at: Optional[datetime] = None + + type: Optional[Literal["comment"]] = None + + +class DocumentDocumentConversationChildChildListItemChildDivider(BaseModel): + id: Optional[str] = None + + type: Optional[Literal["divider"]] = None + + +class DocumentDocumentConversationChildChildListItemChildImage(BaseModel): + src: str + + text: str + + id: Optional[str] = None + + type: Optional[Literal["image"]] = None + + +class DocumentDocumentConversationChildChildListItemChildLink(BaseModel): + text: str + + url: str + + id: Optional[str] = None + + type: Optional[Literal["link"]] = None + + +class DocumentDocumentConversationChildChildListItemChildLineBreak(BaseModel): + id: Optional[str] = None + + type: Optional[Literal["line_break"]] = None + + +class DocumentDocumentConversationChildChildListItemChildText(BaseModel): + text: str + + id: Optional[str] = None + + marks: Optional[List[Literal["bold", "italic", "underline", "strikethrough", "code", "math"]]] = None + + type: Optional[Literal["text"]] = None + + +class DocumentDocumentConversationChildChildListItemChildToolCall(BaseModel): + """A tool/function call made by the assistant.""" + + tool_call_id: str + + tool_name: str + + id: Optional[str] = None + + args: Optional[Dict[str, object]] = None + + type: Optional[Literal["tool_call"]] = None + + +class DocumentDocumentConversationChildChildListItemChildToolResult(BaseModel): + """The result of a tool call.""" + + output: Union[str, Dict[str, object], List[object]] + + tool_call_id: str + + tool_name: str + + id: Optional[str] = None + + is_error: Optional[bool] = None + + type: Optional[Literal["tool_result"]] = None + + +class DocumentDocumentConversationChildChildListItemChildTraceMessage(BaseModel): + """A message in an agent trace (user message, assistant message, or thinking).""" + + text: str + + id: Optional[str] = None + + message_type: Optional[Literal["message", "thinking"]] = None + + role: Optional[Literal["user", "assistant"]] = None + + timestamp: Optional[datetime] = None + + type: Optional[Literal["trace_message"]] = None + + +DocumentDocumentConversationChildChildListItemChild: TypeAlias = Union[ + DocumentDocumentConversationChildChildListItemChildBlob, + DocumentDocumentConversationChildChildListItemChildCode, + DocumentDocumentConversationChildChildListItemChildComment, + DocumentDocumentConversationChildChildListItemChildDivider, + DocumentDocumentConversationChildChildListItemChildImage, + DocumentDocumentConversationChildChildListItemChildLink, + DocumentDocumentConversationChildChildListItemChildLineBreak, + DocumentDocumentConversationChildChildListItemChildText, + DocumentDocumentConversationChildChildListItemChildToolCall, + DocumentDocumentConversationChildChildListItemChildToolResult, + DocumentDocumentConversationChildChildListItemChildTraceMessage, + object, +] + + +class DocumentDocumentConversationChildChildListItem(BaseModel): + id: Optional[str] = None + + children: Optional[List[DocumentDocumentConversationChildChildListItemChild]] = None + + text: Optional[str] = None + + type: Optional[Literal["list_item"]] = None + + +class DocumentDocumentConversationChildChildParagraphChildBlob(BaseModel): + """Represents embedded binary data using data URI scheme. + + Format: data:[][;base64], + Example: data:text/html;base64,PGh0bWw+... + """ + + data: str + + mimetype: str + + id: Optional[str] = None + + type: Optional[Literal["blob"]] = None + + +class DocumentDocumentConversationChildChildParagraphChildCode(BaseModel): + text: str + + id: Optional[str] = None + + language: Optional[str] = None + + type: Optional[Literal["code"]] = None + + +class DocumentDocumentConversationChildChildParagraphChildComment(BaseModel): + text: str + + id: Optional[str] = None + + created_at: Optional[datetime] = None + + type: Optional[Literal["comment"]] = None + + +class DocumentDocumentConversationChildChildParagraphChildDivider(BaseModel): + id: Optional[str] = None + + type: Optional[Literal["divider"]] = None + + +class DocumentDocumentConversationChildChildParagraphChildImage(BaseModel): + src: str + + text: str + + id: Optional[str] = None + + type: Optional[Literal["image"]] = None + + +class DocumentDocumentConversationChildChildParagraphChildLink(BaseModel): + text: str + + url: str + + id: Optional[str] = None + + type: Optional[Literal["link"]] = None + + +class DocumentDocumentConversationChildChildParagraphChildLineBreak(BaseModel): + id: Optional[str] = None + + type: Optional[Literal["line_break"]] = None + + +class DocumentDocumentConversationChildChildParagraphChildText(BaseModel): + text: str + + id: Optional[str] = None + + marks: Optional[List[Literal["bold", "italic", "underline", "strikethrough", "code", "math"]]] = None + + type: Optional[Literal["text"]] = None + + +class DocumentDocumentConversationChildChildParagraphChildToolCall(BaseModel): + """A tool/function call made by the assistant.""" + + tool_call_id: str + + tool_name: str + + id: Optional[str] = None + + args: Optional[Dict[str, object]] = None + + type: Optional[Literal["tool_call"]] = None + + +class DocumentDocumentConversationChildChildParagraphChildToolResult(BaseModel): + """The result of a tool call.""" + + output: Union[str, Dict[str, object], List[object]] + + tool_call_id: str + + tool_name: str + + id: Optional[str] = None + + is_error: Optional[bool] = None + + type: Optional[Literal["tool_result"]] = None + + +class DocumentDocumentConversationChildChildParagraphChildTraceMessage(BaseModel): + """A message in an agent trace (user message, assistant message, or thinking).""" + + text: str + + id: Optional[str] = None + + message_type: Optional[Literal["message", "thinking"]] = None + + role: Optional[Literal["user", "assistant"]] = None + + timestamp: Optional[datetime] = None + + type: Optional[Literal["trace_message"]] = None + + +DocumentDocumentConversationChildChildParagraphChild: TypeAlias = Union[ + DocumentDocumentConversationChildChildParagraphChildBlob, + DocumentDocumentConversationChildChildParagraphChildCode, + DocumentDocumentConversationChildChildParagraphChildComment, + DocumentDocumentConversationChildChildParagraphChildDivider, + DocumentDocumentConversationChildChildParagraphChildImage, + DocumentDocumentConversationChildChildParagraphChildLink, + DocumentDocumentConversationChildChildParagraphChildLineBreak, + DocumentDocumentConversationChildChildParagraphChildText, + DocumentDocumentConversationChildChildParagraphChildToolCall, + DocumentDocumentConversationChildChildParagraphChildToolResult, + DocumentDocumentConversationChildChildParagraphChildTraceMessage, + object, +] + + +class DocumentDocumentConversationChildChildParagraph(BaseModel): + id: Optional[str] = None + + children: Optional[List[DocumentDocumentConversationChildChildParagraphChild]] = None + + text: Optional[str] = None + + type: Optional[Literal["paragraph"]] = None + + +class DocumentDocumentConversationChildChildQuoteChildBlob(BaseModel): + """Represents embedded binary data using data URI scheme. + + Format: data:[][;base64], + Example: data:text/html;base64,PGh0bWw+... + """ + + data: str + + mimetype: str + + id: Optional[str] = None + + type: Optional[Literal["blob"]] = None + + +class DocumentDocumentConversationChildChildQuoteChildCode(BaseModel): + text: str + + id: Optional[str] = None + + language: Optional[str] = None + + type: Optional[Literal["code"]] = None + + +class DocumentDocumentConversationChildChildQuoteChildComment(BaseModel): + text: str + + id: Optional[str] = None + + created_at: Optional[datetime] = None + + type: Optional[Literal["comment"]] = None + + +class DocumentDocumentConversationChildChildQuoteChildDivider(BaseModel): + id: Optional[str] = None + + type: Optional[Literal["divider"]] = None + + +class DocumentDocumentConversationChildChildQuoteChildImage(BaseModel): + src: str + + text: str + + id: Optional[str] = None + + type: Optional[Literal["image"]] = None + + +class DocumentDocumentConversationChildChildQuoteChildLink(BaseModel): + text: str + + url: str + + id: Optional[str] = None + + type: Optional[Literal["link"]] = None + + +class DocumentDocumentConversationChildChildQuoteChildLineBreak(BaseModel): + id: Optional[str] = None + + type: Optional[Literal["line_break"]] = None + + +class DocumentDocumentConversationChildChildQuoteChildText(BaseModel): + text: str + + id: Optional[str] = None + + marks: Optional[List[Literal["bold", "italic", "underline", "strikethrough", "code", "math"]]] = None + + type: Optional[Literal["text"]] = None + + +class DocumentDocumentConversationChildChildQuoteChildToolCall(BaseModel): + """A tool/function call made by the assistant.""" + + tool_call_id: str + + tool_name: str + + id: Optional[str] = None + + args: Optional[Dict[str, object]] = None + + type: Optional[Literal["tool_call"]] = None + + +class DocumentDocumentConversationChildChildQuoteChildToolResult(BaseModel): + """The result of a tool call.""" + + output: Union[str, Dict[str, object], List[object]] + + tool_call_id: str + + tool_name: str + + id: Optional[str] = None + + is_error: Optional[bool] = None + + type: Optional[Literal["tool_result"]] = None + + +class DocumentDocumentConversationChildChildQuoteChildTraceMessage(BaseModel): + """A message in an agent trace (user message, assistant message, or thinking).""" + + text: str + + id: Optional[str] = None + + message_type: Optional[Literal["message", "thinking"]] = None + + role: Optional[Literal["user", "assistant"]] = None + + timestamp: Optional[datetime] = None + + type: Optional[Literal["trace_message"]] = None + + +DocumentDocumentConversationChildChildQuoteChild: TypeAlias = Union[ + DocumentDocumentConversationChildChildQuoteChildBlob, + DocumentDocumentConversationChildChildQuoteChildCode, + DocumentDocumentConversationChildChildQuoteChildComment, + DocumentDocumentConversationChildChildQuoteChildDivider, + DocumentDocumentConversationChildChildQuoteChildImage, + DocumentDocumentConversationChildChildQuoteChildLink, + DocumentDocumentConversationChildChildQuoteChildLineBreak, + DocumentDocumentConversationChildChildQuoteChildText, + DocumentDocumentConversationChildChildQuoteChildToolCall, + DocumentDocumentConversationChildChildQuoteChildToolResult, + DocumentDocumentConversationChildChildQuoteChildTraceMessage, + object, +] + + +class DocumentDocumentConversationChildChildQuote(BaseModel): + id: Optional[str] = None + + children: Optional[List[DocumentDocumentConversationChildChildQuoteChild]] = None + + text: Optional[str] = None + + type: Optional[Literal["quote"]] = None + + +class DocumentDocumentConversationChildChildTable(BaseModel): + id: Optional[str] = None + + children: Optional[List[object]] = None + + has_header: Optional[bool] = None + """Whether the first row should be treated as a header""" + + text: Optional[str] = None + + type: Optional[Literal["table"]] = None + + +class DocumentDocumentConversationChildChildTableCellChildBlob(BaseModel): + """Represents embedded binary data using data URI scheme. + + Format: data:[][;base64], + Example: data:text/html;base64,PGh0bWw+... + """ + + data: str + + mimetype: str + + id: Optional[str] = None + + type: Optional[Literal["blob"]] = None + + +class DocumentDocumentConversationChildChildTableCellChildCode(BaseModel): + text: str + + id: Optional[str] = None + + language: Optional[str] = None + + type: Optional[Literal["code"]] = None + + +class DocumentDocumentConversationChildChildTableCellChildComment(BaseModel): + text: str + + id: Optional[str] = None + + created_at: Optional[datetime] = None + + type: Optional[Literal["comment"]] = None + + +class DocumentDocumentConversationChildChildTableCellChildDivider(BaseModel): + id: Optional[str] = None + + type: Optional[Literal["divider"]] = None + + +class DocumentDocumentConversationChildChildTableCellChildImage(BaseModel): + src: str + + text: str + + id: Optional[str] = None + + type: Optional[Literal["image"]] = None + + +class DocumentDocumentConversationChildChildTableCellChildLink(BaseModel): + text: str + + url: str + + id: Optional[str] = None + + type: Optional[Literal["link"]] = None + + +class DocumentDocumentConversationChildChildTableCellChildLineBreak(BaseModel): + id: Optional[str] = None + + type: Optional[Literal["line_break"]] = None + + +class DocumentDocumentConversationChildChildTableCellChildText(BaseModel): + text: str + + id: Optional[str] = None + + marks: Optional[List[Literal["bold", "italic", "underline", "strikethrough", "code", "math"]]] = None + + type: Optional[Literal["text"]] = None + + +class DocumentDocumentConversationChildChildTableCellChildToolCall(BaseModel): + """A tool/function call made by the assistant.""" + + tool_call_id: str + + tool_name: str + + id: Optional[str] = None + + args: Optional[Dict[str, object]] = None + + type: Optional[Literal["tool_call"]] = None + + +class DocumentDocumentConversationChildChildTableCellChildToolResult(BaseModel): + """The result of a tool call.""" + + output: Union[str, Dict[str, object], List[object]] + + tool_call_id: str + + tool_name: str + + id: Optional[str] = None + + is_error: Optional[bool] = None + + type: Optional[Literal["tool_result"]] = None + + +class DocumentDocumentConversationChildChildTableCellChildTraceMessage(BaseModel): + """A message in an agent trace (user message, assistant message, or thinking).""" + + text: str + + id: Optional[str] = None + + message_type: Optional[Literal["message", "thinking"]] = None + + role: Optional[Literal["user", "assistant"]] = None + + timestamp: Optional[datetime] = None + + type: Optional[Literal["trace_message"]] = None + + +DocumentDocumentConversationChildChildTableCellChild: TypeAlias = Union[ + DocumentDocumentConversationChildChildTableCellChildBlob, + DocumentDocumentConversationChildChildTableCellChildCode, + DocumentDocumentConversationChildChildTableCellChildComment, + DocumentDocumentConversationChildChildTableCellChildDivider, + DocumentDocumentConversationChildChildTableCellChildImage, + DocumentDocumentConversationChildChildTableCellChildLink, + DocumentDocumentConversationChildChildTableCellChildLineBreak, + DocumentDocumentConversationChildChildTableCellChildText, + DocumentDocumentConversationChildChildTableCellChildToolCall, + DocumentDocumentConversationChildChildTableCellChildToolResult, + DocumentDocumentConversationChildChildTableCellChildTraceMessage, + object, +] + + +class DocumentDocumentConversationChildChildTableCell(BaseModel): + id: Optional[str] = None + + align: Optional[Literal["left", "center", "right"]] = None + + children: Optional[List[DocumentDocumentConversationChildChildTableCellChild]] = None + + text: Optional[str] = None + + type: Optional[Literal["table_cell"]] = None + + +class DocumentDocumentConversationChildChildTableRow(BaseModel): + id: Optional[str] = None + + children: Optional[List[object]] = None + + text: Optional[str] = None + + type: Optional[Literal["table_row"]] = None + + +class DocumentDocumentConversationChildChildText(BaseModel): + text: str + + id: Optional[str] = None + + marks: Optional[List[Literal["bold", "italic", "underline", "strikethrough", "code", "math"]]] = None + + type: Optional[Literal["text"]] = None + + +class DocumentDocumentConversationChildChildToDoChildBlob(BaseModel): + """Represents embedded binary data using data URI scheme. + + Format: data:[][;base64], + Example: data:text/html;base64,PGh0bWw+... + """ + + data: str + + mimetype: str + + id: Optional[str] = None + + type: Optional[Literal["blob"]] = None + + +class DocumentDocumentConversationChildChildToDoChildCode(BaseModel): + text: str + + id: Optional[str] = None + + language: Optional[str] = None + + type: Optional[Literal["code"]] = None + + +class DocumentDocumentConversationChildChildToDoChildComment(BaseModel): + text: str + + id: Optional[str] = None + + created_at: Optional[datetime] = None + + type: Optional[Literal["comment"]] = None + + +class DocumentDocumentConversationChildChildToDoChildDivider(BaseModel): + id: Optional[str] = None + + type: Optional[Literal["divider"]] = None + + +class DocumentDocumentConversationChildChildToDoChildImage(BaseModel): + src: str + + text: str + + id: Optional[str] = None + + type: Optional[Literal["image"]] = None + + +class DocumentDocumentConversationChildChildToDoChildLink(BaseModel): + text: str + + url: str + + id: Optional[str] = None + + type: Optional[Literal["link"]] = None + + +class DocumentDocumentConversationChildChildToDoChildLineBreak(BaseModel): + id: Optional[str] = None + + type: Optional[Literal["line_break"]] = None + + +class DocumentDocumentConversationChildChildToDoChildText(BaseModel): + text: str + + id: Optional[str] = None + + marks: Optional[List[Literal["bold", "italic", "underline", "strikethrough", "code", "math"]]] = None + + type: Optional[Literal["text"]] = None + + +class DocumentDocumentConversationChildChildToDoChildToolCall(BaseModel): + """A tool/function call made by the assistant.""" + + tool_call_id: str + + tool_name: str + + id: Optional[str] = None + + args: Optional[Dict[str, object]] = None + + type: Optional[Literal["tool_call"]] = None + + +class DocumentDocumentConversationChildChildToDoChildToolResult(BaseModel): + """The result of a tool call.""" + + output: Union[str, Dict[str, object], List[object]] + + tool_call_id: str + + tool_name: str + + id: Optional[str] = None + + is_error: Optional[bool] = None + + type: Optional[Literal["tool_result"]] = None + + +class DocumentDocumentConversationChildChildToDoChildTraceMessage(BaseModel): + """A message in an agent trace (user message, assistant message, or thinking).""" + + text: str + + id: Optional[str] = None + + message_type: Optional[Literal["message", "thinking"]] = None + + role: Optional[Literal["user", "assistant"]] = None + + timestamp: Optional[datetime] = None + + type: Optional[Literal["trace_message"]] = None + + +DocumentDocumentConversationChildChildToDoChild: TypeAlias = Union[ + DocumentDocumentConversationChildChildToDoChildBlob, + DocumentDocumentConversationChildChildToDoChildCode, + DocumentDocumentConversationChildChildToDoChildComment, + DocumentDocumentConversationChildChildToDoChildDivider, + DocumentDocumentConversationChildChildToDoChildImage, + DocumentDocumentConversationChildChildToDoChildLink, + DocumentDocumentConversationChildChildToDoChildLineBreak, + DocumentDocumentConversationChildChildToDoChildText, + DocumentDocumentConversationChildChildToDoChildToolCall, + DocumentDocumentConversationChildChildToDoChildToolResult, + DocumentDocumentConversationChildChildToDoChildTraceMessage, + object, +] + + +class DocumentDocumentConversationChildChildToDo(BaseModel): + id: Optional[str] = None + + checked: Optional[bool] = None + + children: Optional[List[DocumentDocumentConversationChildChildToDoChild]] = None + + text: Optional[str] = None + + type: Optional[Literal["todo"]] = None + + +class DocumentDocumentConversationChildChildToolCall(BaseModel): + """A tool/function call made by the assistant.""" + + tool_call_id: str + + tool_name: str + + id: Optional[str] = None + + args: Optional[Dict[str, object]] = None + + type: Optional[Literal["tool_call"]] = None + + +class DocumentDocumentConversationChildChildToolResult(BaseModel): + """The result of a tool call.""" + + output: Union[str, Dict[str, object], List[object]] + + tool_call_id: str + + tool_name: str + + id: Optional[str] = None + + is_error: Optional[bool] = None + + type: Optional[Literal["tool_result"]] = None + + +class DocumentDocumentConversationChildChildTraceMessage(BaseModel): + """A message in an agent trace (user message, assistant message, or thinking).""" + + text: str + + id: Optional[str] = None + + message_type: Optional[Literal["message", "thinking"]] = None + + role: Optional[Literal["user", "assistant"]] = None + + timestamp: Optional[datetime] = None + + type: Optional[Literal["trace_message"]] = None + + +class DocumentDocumentConversationChildChildUtterance(BaseModel): + """A speaker-attributed segment of a transcript (ENG-2476/D10). + + "Utterance" is the standard name for this across transcription providers + (AssemblyAI, Deepgram, Rev). Timestamps are relative offsets in seconds — + provider-native; absolute times derive from `Transcript.started_at`. + """ + + text: str + + id: Optional[str] = None + + end: Optional[float] = None + + speaker: Optional[object] = None + + start: Optional[float] = None + + type: Optional[Literal["utterance"]] = None + + +DocumentDocumentConversationChildChild: TypeAlias = Annotated[ + Union[ + DocumentDocumentConversationChildChildBlob, + DocumentDocumentConversationChildChildCallout, + DocumentDocumentConversationChildChildChunk, + DocumentDocumentConversationChildChildCode, + DocumentDocumentConversationChildChildComment, + DocumentDocumentConversationChildChildDivider, + DocumentDocumentConversationChildChildEquation, + DocumentDocumentConversationChildChildFootnote, + DocumentDocumentConversationChildChildHeading, + DocumentDocumentConversationChildChildImage, + DocumentDocumentConversationChildChildLink, + DocumentDocumentConversationChildChildLineBreak, + DocumentDocumentConversationChildChildList, + DocumentDocumentConversationChildChildListItem, + DocumentDocumentConversationChildChildParagraph, + DocumentDocumentConversationChildChildQuote, + DocumentDocumentConversationChildChildTable, + DocumentDocumentConversationChildChildTableCell, + DocumentDocumentConversationChildChildTableRow, + DocumentDocumentConversationChildChildText, + DocumentDocumentConversationChildChildToDo, + DocumentDocumentConversationChildChildToolCall, + DocumentDocumentConversationChildChildToolResult, + DocumentDocumentConversationChildChildTraceMessage, + DocumentDocumentConversationChildChildUtterance, + ], + PropertyInfo(discriminator="type"), +] + + +class DocumentDocumentConversationChildMentionedUserChildBlob(BaseModel): + """Represents embedded binary data using data URI scheme. + + Format: data:[][;base64], + Example: data:text/html;base64,PGh0bWw+... + """ + + data: str + + mimetype: str + + id: Optional[str] = None + + type: Optional[Literal["blob"]] = None + + +class DocumentDocumentConversationChildMentionedUserChildCode(BaseModel): + text: str + + id: Optional[str] = None + + language: Optional[str] = None + + type: Optional[Literal["code"]] = None + + +class DocumentDocumentConversationChildMentionedUserChildComment(BaseModel): + text: str + + id: Optional[str] = None + + created_at: Optional[datetime] = None + + type: Optional[Literal["comment"]] = None + + +class DocumentDocumentConversationChildMentionedUserChildDivider(BaseModel): + id: Optional[str] = None + + type: Optional[Literal["divider"]] = None + + +class DocumentDocumentConversationChildMentionedUserChildImage(BaseModel): + src: str + + text: str + + id: Optional[str] = None + + type: Optional[Literal["image"]] = None + + +class DocumentDocumentConversationChildMentionedUserChildLink(BaseModel): + text: str + + url: str + + id: Optional[str] = None + + type: Optional[Literal["link"]] = None + + +class DocumentDocumentConversationChildMentionedUserChildLineBreak(BaseModel): + id: Optional[str] = None + + type: Optional[Literal["line_break"]] = None + + +class DocumentDocumentConversationChildMentionedUserChildText(BaseModel): + text: str + + id: Optional[str] = None + + marks: Optional[List[Literal["bold", "italic", "underline", "strikethrough", "code", "math"]]] = None + + type: Optional[Literal["text"]] = None + + +class DocumentDocumentConversationChildMentionedUserChildToolCall(BaseModel): + """A tool/function call made by the assistant.""" + + tool_call_id: str + + tool_name: str + + id: Optional[str] = None + + args: Optional[Dict[str, object]] = None + + type: Optional[Literal["tool_call"]] = None + + +class DocumentDocumentConversationChildMentionedUserChildToolResult(BaseModel): + """The result of a tool call.""" + + output: Union[str, Dict[str, object], List[object]] + + tool_call_id: str + + tool_name: str + + id: Optional[str] = None + + is_error: Optional[bool] = None + + type: Optional[Literal["tool_result"]] = None + + +class DocumentDocumentConversationChildMentionedUserChildTraceMessage(BaseModel): + """A message in an agent trace (user message, assistant message, or thinking).""" + + text: str + + id: Optional[str] = None + + message_type: Optional[Literal["message", "thinking"]] = None + + role: Optional[Literal["user", "assistant"]] = None + + timestamp: Optional[datetime] = None + + type: Optional[Literal["trace_message"]] = None + + +DocumentDocumentConversationChildMentionedUserChild: TypeAlias = Union[ + DocumentDocumentConversationChildMentionedUserChildBlob, + DocumentDocumentConversationChildMentionedUserChildCode, + DocumentDocumentConversationChildMentionedUserChildComment, + DocumentDocumentConversationChildMentionedUserChildDivider, + DocumentDocumentConversationChildMentionedUserChildImage, + DocumentDocumentConversationChildMentionedUserChildLink, + DocumentDocumentConversationChildMentionedUserChildLineBreak, + DocumentDocumentConversationChildMentionedUserChildText, + DocumentDocumentConversationChildMentionedUserChildToolCall, + DocumentDocumentConversationChildMentionedUserChildToolResult, + DocumentDocumentConversationChildMentionedUserChildTraceMessage, + object, +] + + +class DocumentDocumentConversationChildMentionedUser(BaseModel): + id: Optional[str] = None + + address: Optional[str] = None + + alt_names: Optional[List[str]] = None + + children: Optional[List[DocumentDocumentConversationChildMentionedUserChild]] = None + + company: Optional[str] = None + + company_ids: Optional[List[str]] = None + + date_of_birth: Optional[date] = None + + deal_ids: Optional[List[str]] = None + + email: Optional[str] = None + + emails: Optional[List[str]] = None + """All known email addresses; `email` holds the primary one""" + + image_url: Optional[str] = None + + job_title: Optional[str] = None + + link_urls: Optional[List[str]] = None + + name: Optional[str] = None + + phone_numbers: Optional[List[str]] = None + + tags: Optional[List[str]] = None + + text: Optional[str] = None + + type: Optional[Literal["person"]] = None + + username: Optional[str] = None + + +class DocumentDocumentConversationChild(BaseModel): + date: datetime + + sender: DocumentDocumentConversationChildSender + + id: Optional[str] = None + + channel: Optional[str] = None + """ + The channel or platform where the message was posted, if this Message is not + explicitly part of a conversation + """ + + children: Optional[List[DocumentDocumentConversationChildChild]] = None + + external_id: Optional[str] = None + """Provider message id (e.g. Slack ts, Gmail message id) — merge-dedup key""" + + is_self: Optional[bool] = None + + mentioned_users: Optional[List[DocumentDocumentConversationChildMentionedUser]] = None + + num_replies: Optional[int] = None + + replies: Optional[List[object]] = None + """The replies or comments to the message""" + + text: Optional[str] = None + + thread_id: Optional[str] = None + + title: Optional[str] = None + """The subject or title of the message""" + + type: Optional[Literal["message"]] = None + + updated_at: Optional[datetime] = None + + upvotes: Optional[int] = None + """The number of upvotes, likes, or reactions on the message""" + + +class DocumentDocumentConversation(BaseModel): + id: Optional[str] = None + + channel: Optional[str] = None + + children: Optional[List[DocumentDocumentConversationChild]] = None + + text: Optional[str] = None + + type: Optional[Literal["conversation"]] = None + + +class DocumentDocumentTraceChildTraceMessage(BaseModel): + """A message in an agent trace (user message, assistant message, or thinking).""" + + text: str + + id: Optional[str] = None + + message_type: Optional[Literal["message", "thinking"]] = None + + role: Optional[Literal["user", "assistant"]] = None + + timestamp: Optional[datetime] = None + + type: Optional[Literal["trace_message"]] = None + + +class DocumentDocumentTraceChildToolCall(BaseModel): + """A tool/function call made by the assistant.""" + + tool_call_id: str + + tool_name: str + + id: Optional[str] = None + + args: Optional[Dict[str, object]] = None + + type: Optional[Literal["tool_call"]] = None + + +class DocumentDocumentTraceChildToolResult(BaseModel): + """The result of a tool call.""" + + output: Union[str, Dict[str, object], List[object]] + + tool_call_id: str + + tool_name: str + + id: Optional[str] = None + + is_error: Optional[bool] = None + + type: Optional[Literal["tool_result"]] = None + + +DocumentDocumentTraceChild: TypeAlias = Annotated[ + Union[ + DocumentDocumentTraceChildTraceMessage, DocumentDocumentTraceChildToolCall, DocumentDocumentTraceChildToolResult + ], + PropertyInfo(discriminator="type"), +] + + +class DocumentDocumentTrace(BaseModel): + """An agent trace/transcript containing a sequence of steps. + + Steps can be TraceMessage (user/assistant messages or thinking), + ToolCall (function calls), or ToolResult (tool responses). + """ + + id: Optional[str] = None + + children: Optional[List[DocumentDocumentTraceChild]] = None + + text: Optional[str] = None + + title: Optional[str] = None + + type: Optional[Literal["trace"]] = None + + +class DocumentDocumentTranscriptChild(BaseModel): + """A speaker-attributed segment of a transcript (ENG-2476/D10). + + "Utterance" is the standard name for this across transcription providers + (AssemblyAI, Deepgram, Rev). Timestamps are relative offsets in seconds — + provider-native; absolute times derive from `Transcript.started_at`. + """ + + text: str + + id: Optional[str] = None + + end: Optional[float] = None + + speaker: Optional[object] = None + + start: Optional[float] = None + + type: Optional[Literal["utterance"]] = None + + +class DocumentDocumentTranscriptParticipantChildBlob(BaseModel): + """Represents embedded binary data using data URI scheme. + + Format: data:[][;base64], + Example: data:text/html;base64,PGh0bWw+... + """ + + data: str + + mimetype: str + + id: Optional[str] = None + + type: Optional[Literal["blob"]] = None + + +class DocumentDocumentTranscriptParticipantChildCode(BaseModel): + text: str + + id: Optional[str] = None + + language: Optional[str] = None + + type: Optional[Literal["code"]] = None + + +class DocumentDocumentTranscriptParticipantChildComment(BaseModel): + text: str + + id: Optional[str] = None + + created_at: Optional[datetime] = None + + type: Optional[Literal["comment"]] = None + + +class DocumentDocumentTranscriptParticipantChildDivider(BaseModel): + id: Optional[str] = None + + type: Optional[Literal["divider"]] = None + + +class DocumentDocumentTranscriptParticipantChildImage(BaseModel): + src: str + + text: str + + id: Optional[str] = None + + type: Optional[Literal["image"]] = None + + +class DocumentDocumentTranscriptParticipantChildLink(BaseModel): + text: str + + url: str + + id: Optional[str] = None + + type: Optional[Literal["link"]] = None + + +class DocumentDocumentTranscriptParticipantChildLineBreak(BaseModel): + id: Optional[str] = None + + type: Optional[Literal["line_break"]] = None + + +class DocumentDocumentTranscriptParticipantChildText(BaseModel): + text: str + + id: Optional[str] = None + + marks: Optional[List[Literal["bold", "italic", "underline", "strikethrough", "code", "math"]]] = None + + type: Optional[Literal["text"]] = None + + +class DocumentDocumentTranscriptParticipantChildToolCall(BaseModel): + """A tool/function call made by the assistant.""" + + tool_call_id: str + + tool_name: str + + id: Optional[str] = None + + args: Optional[Dict[str, object]] = None + + type: Optional[Literal["tool_call"]] = None + + +class DocumentDocumentTranscriptParticipantChildToolResult(BaseModel): + """The result of a tool call.""" + + output: Union[str, Dict[str, object], List[object]] + + tool_call_id: str + + tool_name: str + + id: Optional[str] = None + + is_error: Optional[bool] = None + + type: Optional[Literal["tool_result"]] = None + + +class DocumentDocumentTranscriptParticipantChildTraceMessage(BaseModel): + """A message in an agent trace (user message, assistant message, or thinking).""" + + text: str + + id: Optional[str] = None + + message_type: Optional[Literal["message", "thinking"]] = None + + role: Optional[Literal["user", "assistant"]] = None + + timestamp: Optional[datetime] = None + + type: Optional[Literal["trace_message"]] = None + + +DocumentDocumentTranscriptParticipantChild: TypeAlias = Union[ + DocumentDocumentTranscriptParticipantChildBlob, + DocumentDocumentTranscriptParticipantChildCode, + DocumentDocumentTranscriptParticipantChildComment, + DocumentDocumentTranscriptParticipantChildDivider, + DocumentDocumentTranscriptParticipantChildImage, + DocumentDocumentTranscriptParticipantChildLink, + DocumentDocumentTranscriptParticipantChildLineBreak, + DocumentDocumentTranscriptParticipantChildText, + DocumentDocumentTranscriptParticipantChildToolCall, + DocumentDocumentTranscriptParticipantChildToolResult, + DocumentDocumentTranscriptParticipantChildTraceMessage, + object, +] + + +class DocumentDocumentTranscriptParticipant(BaseModel): + id: Optional[str] = None + + address: Optional[str] = None + + alt_names: Optional[List[str]] = None + + children: Optional[List[DocumentDocumentTranscriptParticipantChild]] = None + + company: Optional[str] = None + + company_ids: Optional[List[str]] = None + + date_of_birth: Optional[date] = None + + deal_ids: Optional[List[str]] = None + + email: Optional[str] = None + + emails: Optional[List[str]] = None + """All known email addresses; `email` holds the primary one""" + + image_url: Optional[str] = None + + job_title: Optional[str] = None + + link_urls: Optional[List[str]] = None + + name: Optional[str] = None + + phone_numbers: Optional[List[str]] = None + + tags: Optional[List[str]] = None + + text: Optional[str] = None + + type: Optional[Literal["person"]] = None + + username: Optional[str] = None + + +class DocumentDocumentTranscript(BaseModel): + """ + A time-anchored, speaker-attributed transcript — meetings, calls + (ENG-2476/D10; mirrors the Trace+TraceStep precedent). + + Utterance timestamps are relative offsets from `started_at`, which is the + absolute wall-clock anchor. + """ + + id: Optional[str] = None + + children: Optional[List[DocumentDocumentTranscriptChild]] = None + + ended_at: Optional[datetime] = None + + participants: Optional[List[DocumentDocumentTranscriptParticipant]] = None + + started_at: Optional[datetime] = None + + text: Optional[str] = None + + title: Optional[str] = None + + type: Optional[Literal["transcript"]] = None + + +class DocumentDocumentCompanyChildBlob(BaseModel): + """Represents embedded binary data using data URI scheme. + + Format: data:[][;base64], + Example: data:text/html;base64,PGh0bWw+... + """ + + data: str + + mimetype: str + + id: Optional[str] = None + + type: Optional[Literal["blob"]] = None + + +class DocumentDocumentCompanyChildCalloutChildBlob(BaseModel): + """Represents embedded binary data using data URI scheme. + + Format: data:[][;base64], + Example: data:text/html;base64,PGh0bWw+... + """ + + data: str + + mimetype: str + + id: Optional[str] = None + + type: Optional[Literal["blob"]] = None + + +class DocumentDocumentCompanyChildCalloutChildCode(BaseModel): + text: str + + id: Optional[str] = None + + language: Optional[str] = None + + type: Optional[Literal["code"]] = None + + +class DocumentDocumentCompanyChildCalloutChildComment(BaseModel): + text: str + + id: Optional[str] = None + + created_at: Optional[datetime] = None + + type: Optional[Literal["comment"]] = None + + +class DocumentDocumentCompanyChildCalloutChildDivider(BaseModel): + id: Optional[str] = None + + type: Optional[Literal["divider"]] = None + + +class DocumentDocumentCompanyChildCalloutChildImage(BaseModel): + src: str + + text: str + + id: Optional[str] = None + + type: Optional[Literal["image"]] = None + + +class DocumentDocumentCompanyChildCalloutChildLink(BaseModel): + text: str + + url: str + + id: Optional[str] = None + + type: Optional[Literal["link"]] = None + + +class DocumentDocumentCompanyChildCalloutChildLineBreak(BaseModel): + id: Optional[str] = None + + type: Optional[Literal["line_break"]] = None + + +class DocumentDocumentCompanyChildCalloutChildText(BaseModel): + text: str + + id: Optional[str] = None + + marks: Optional[List[Literal["bold", "italic", "underline", "strikethrough", "code", "math"]]] = None + + type: Optional[Literal["text"]] = None + + +class DocumentDocumentCompanyChildCalloutChildToolCall(BaseModel): + """A tool/function call made by the assistant.""" + + tool_call_id: str + + tool_name: str + + id: Optional[str] = None + + args: Optional[Dict[str, object]] = None + + type: Optional[Literal["tool_call"]] = None + + +class DocumentDocumentCompanyChildCalloutChildToolResult(BaseModel): + """The result of a tool call.""" + + output: Union[str, Dict[str, object], List[object]] + + tool_call_id: str + + tool_name: str + + id: Optional[str] = None + + is_error: Optional[bool] = None + + type: Optional[Literal["tool_result"]] = None + + +class DocumentDocumentCompanyChildCalloutChildTraceMessage(BaseModel): + """A message in an agent trace (user message, assistant message, or thinking).""" + + text: str + + id: Optional[str] = None + + message_type: Optional[Literal["message", "thinking"]] = None + + role: Optional[Literal["user", "assistant"]] = None + + timestamp: Optional[datetime] = None + + type: Optional[Literal["trace_message"]] = None + + +DocumentDocumentCompanyChildCalloutChild: TypeAlias = Union[ + DocumentDocumentCompanyChildCalloutChildBlob, + DocumentDocumentCompanyChildCalloutChildCode, + DocumentDocumentCompanyChildCalloutChildComment, + DocumentDocumentCompanyChildCalloutChildDivider, + DocumentDocumentCompanyChildCalloutChildImage, + DocumentDocumentCompanyChildCalloutChildLink, + DocumentDocumentCompanyChildCalloutChildLineBreak, + DocumentDocumentCompanyChildCalloutChildText, + DocumentDocumentCompanyChildCalloutChildToolCall, + DocumentDocumentCompanyChildCalloutChildToolResult, + DocumentDocumentCompanyChildCalloutChildTraceMessage, + object, +] + + +class DocumentDocumentCompanyChildCallout(BaseModel): + id: Optional[str] = None + + children: Optional[List[DocumentDocumentCompanyChildCalloutChild]] = None + + text: Optional[str] = None + + title: Optional[str] = None + + type: Optional[Literal["callout"]] = None + + +class DocumentDocumentCompanyChildChunkChildBlob(BaseModel): + """Represents embedded binary data using data URI scheme. + + Format: data:[][;base64], + Example: data:text/html;base64,PGh0bWw+... + """ + + data: str + + mimetype: str + + id: Optional[str] = None + + type: Optional[Literal["blob"]] = None + + +class DocumentDocumentCompanyChildChunkChildCode(BaseModel): + text: str + + id: Optional[str] = None + + language: Optional[str] = None + + type: Optional[Literal["code"]] = None + + +class DocumentDocumentCompanyChildChunkChildComment(BaseModel): + text: str + + id: Optional[str] = None + + created_at: Optional[datetime] = None + + type: Optional[Literal["comment"]] = None + + +class DocumentDocumentCompanyChildChunkChildDivider(BaseModel): + id: Optional[str] = None + + type: Optional[Literal["divider"]] = None + + +class DocumentDocumentCompanyChildChunkChildImage(BaseModel): + src: str + + text: str + + id: Optional[str] = None + + type: Optional[Literal["image"]] = None + + +class DocumentDocumentCompanyChildChunkChildLink(BaseModel): + text: str + + url: str + + id: Optional[str] = None + + type: Optional[Literal["link"]] = None + + +class DocumentDocumentCompanyChildChunkChildLineBreak(BaseModel): + id: Optional[str] = None + + type: Optional[Literal["line_break"]] = None + + +class DocumentDocumentCompanyChildChunkChildText(BaseModel): + text: str + + id: Optional[str] = None + + marks: Optional[List[Literal["bold", "italic", "underline", "strikethrough", "code", "math"]]] = None + + type: Optional[Literal["text"]] = None + + +class DocumentDocumentCompanyChildChunkChildToolCall(BaseModel): + """A tool/function call made by the assistant.""" + + tool_call_id: str + + tool_name: str + + id: Optional[str] = None + + args: Optional[Dict[str, object]] = None + + type: Optional[Literal["tool_call"]] = None + + +class DocumentDocumentCompanyChildChunkChildToolResult(BaseModel): + """The result of a tool call.""" + + output: Union[str, Dict[str, object], List[object]] + + tool_call_id: str + + tool_name: str + + id: Optional[str] = None + + is_error: Optional[bool] = None + + type: Optional[Literal["tool_result"]] = None + + +class DocumentDocumentCompanyChildChunkChildTraceMessage(BaseModel): + """A message in an agent trace (user message, assistant message, or thinking).""" + + text: str + + id: Optional[str] = None + + message_type: Optional[Literal["message", "thinking"]] = None + + role: Optional[Literal["user", "assistant"]] = None + + timestamp: Optional[datetime] = None + + type: Optional[Literal["trace_message"]] = None + + +DocumentDocumentCompanyChildChunkChild: TypeAlias = Union[ + DocumentDocumentCompanyChildChunkChildBlob, + DocumentDocumentCompanyChildChunkChildCode, + DocumentDocumentCompanyChildChunkChildComment, + DocumentDocumentCompanyChildChunkChildDivider, + DocumentDocumentCompanyChildChunkChildImage, + DocumentDocumentCompanyChildChunkChildLink, + DocumentDocumentCompanyChildChunkChildLineBreak, + DocumentDocumentCompanyChildChunkChildText, + DocumentDocumentCompanyChildChunkChildToolCall, + DocumentDocumentCompanyChildChunkChildToolResult, + DocumentDocumentCompanyChildChunkChildTraceMessage, + object, +] + + +class DocumentDocumentCompanyChildChunk(BaseModel): + id: Optional[str] = None + + children: Optional[List[DocumentDocumentCompanyChildChunkChild]] = None + + text: Optional[str] = None + + type: Optional[Literal["chunk"]] = None + + +class DocumentDocumentCompanyChildCode(BaseModel): + text: str + + id: Optional[str] = None + + language: Optional[str] = None + + type: Optional[Literal["code"]] = None + + +class DocumentDocumentCompanyChildComment(BaseModel): + text: str + + id: Optional[str] = None + + created_at: Optional[datetime] = None + + type: Optional[Literal["comment"]] = None + + +class DocumentDocumentCompanyChildDivider(BaseModel): + id: Optional[str] = None + + type: Optional[Literal["divider"]] = None + + +class DocumentDocumentCompanyChildEquationChildBlob(BaseModel): + """Represents embedded binary data using data URI scheme. + + Format: data:[][;base64], + Example: data:text/html;base64,PGh0bWw+... + """ + + data: str + + mimetype: str + + id: Optional[str] = None + + type: Optional[Literal["blob"]] = None + + +class DocumentDocumentCompanyChildEquationChildCode(BaseModel): + text: str + + id: Optional[str] = None + + language: Optional[str] = None + + type: Optional[Literal["code"]] = None + + +class DocumentDocumentCompanyChildEquationChildComment(BaseModel): + text: str + + id: Optional[str] = None + + created_at: Optional[datetime] = None + + type: Optional[Literal["comment"]] = None + + +class DocumentDocumentCompanyChildEquationChildDivider(BaseModel): + id: Optional[str] = None + + type: Optional[Literal["divider"]] = None + + +class DocumentDocumentCompanyChildEquationChildImage(BaseModel): + src: str + + text: str + + id: Optional[str] = None + + type: Optional[Literal["image"]] = None + + +class DocumentDocumentCompanyChildEquationChildLink(BaseModel): + text: str + + url: str + + id: Optional[str] = None + + type: Optional[Literal["link"]] = None + + +class DocumentDocumentCompanyChildEquationChildLineBreak(BaseModel): + id: Optional[str] = None + + type: Optional[Literal["line_break"]] = None + + +class DocumentDocumentCompanyChildEquationChildText(BaseModel): + text: str + + id: Optional[str] = None + + marks: Optional[List[Literal["bold", "italic", "underline", "strikethrough", "code", "math"]]] = None + + type: Optional[Literal["text"]] = None + + +class DocumentDocumentCompanyChildEquationChildToolCall(BaseModel): + """A tool/function call made by the assistant.""" + + tool_call_id: str + + tool_name: str + + id: Optional[str] = None + + args: Optional[Dict[str, object]] = None + + type: Optional[Literal["tool_call"]] = None + + +class DocumentDocumentCompanyChildEquationChildToolResult(BaseModel): + """The result of a tool call.""" + + output: Union[str, Dict[str, object], List[object]] + + tool_call_id: str + + tool_name: str + + id: Optional[str] = None + + is_error: Optional[bool] = None + + type: Optional[Literal["tool_result"]] = None + + +class DocumentDocumentCompanyChildEquationChildTraceMessage(BaseModel): + """A message in an agent trace (user message, assistant message, or thinking).""" + + text: str + + id: Optional[str] = None + + message_type: Optional[Literal["message", "thinking"]] = None + + role: Optional[Literal["user", "assistant"]] = None + + timestamp: Optional[datetime] = None + + type: Optional[Literal["trace_message"]] = None + + +DocumentDocumentCompanyChildEquationChild: TypeAlias = Union[ + DocumentDocumentCompanyChildEquationChildBlob, + DocumentDocumentCompanyChildEquationChildCode, + DocumentDocumentCompanyChildEquationChildComment, + DocumentDocumentCompanyChildEquationChildDivider, + DocumentDocumentCompanyChildEquationChildImage, + DocumentDocumentCompanyChildEquationChildLink, + DocumentDocumentCompanyChildEquationChildLineBreak, + DocumentDocumentCompanyChildEquationChildText, + DocumentDocumentCompanyChildEquationChildToolCall, + DocumentDocumentCompanyChildEquationChildToolResult, + DocumentDocumentCompanyChildEquationChildTraceMessage, + object, +] + + +class DocumentDocumentCompanyChildEquation(BaseModel): + id: Optional[str] = None + + children: Optional[List[DocumentDocumentCompanyChildEquationChild]] = None + + text: Optional[str] = None + + type: Optional[Literal["equation"]] = None + + +class DocumentDocumentCompanyChildFootnoteChildBlob(BaseModel): + """Represents embedded binary data using data URI scheme. + + Format: data:[][;base64], + Example: data:text/html;base64,PGh0bWw+... + """ + + data: str + + mimetype: str + + id: Optional[str] = None + + type: Optional[Literal["blob"]] = None + + +class DocumentDocumentCompanyChildFootnoteChildCode(BaseModel): + text: str + + id: Optional[str] = None + + language: Optional[str] = None + + type: Optional[Literal["code"]] = None + + +class DocumentDocumentCompanyChildFootnoteChildComment(BaseModel): + text: str + + id: Optional[str] = None + + created_at: Optional[datetime] = None + + type: Optional[Literal["comment"]] = None + + +class DocumentDocumentCompanyChildFootnoteChildDivider(BaseModel): + id: Optional[str] = None + + type: Optional[Literal["divider"]] = None + + +class DocumentDocumentCompanyChildFootnoteChildImage(BaseModel): + src: str + + text: str + + id: Optional[str] = None + + type: Optional[Literal["image"]] = None + + +class DocumentDocumentCompanyChildFootnoteChildLink(BaseModel): + text: str + + url: str + + id: Optional[str] = None + + type: Optional[Literal["link"]] = None + + +class DocumentDocumentCompanyChildFootnoteChildLineBreak(BaseModel): + id: Optional[str] = None + + type: Optional[Literal["line_break"]] = None + + +class DocumentDocumentCompanyChildFootnoteChildText(BaseModel): + text: str + + id: Optional[str] = None + + marks: Optional[List[Literal["bold", "italic", "underline", "strikethrough", "code", "math"]]] = None + + type: Optional[Literal["text"]] = None + + +class DocumentDocumentCompanyChildFootnoteChildToolCall(BaseModel): + """A tool/function call made by the assistant.""" + + tool_call_id: str + + tool_name: str + + id: Optional[str] = None + + args: Optional[Dict[str, object]] = None + + type: Optional[Literal["tool_call"]] = None + + +class DocumentDocumentCompanyChildFootnoteChildToolResult(BaseModel): + """The result of a tool call.""" + + output: Union[str, Dict[str, object], List[object]] + + tool_call_id: str + + tool_name: str + + id: Optional[str] = None + + is_error: Optional[bool] = None + + type: Optional[Literal["tool_result"]] = None + + +class DocumentDocumentCompanyChildFootnoteChildTraceMessage(BaseModel): + """A message in an agent trace (user message, assistant message, or thinking).""" + + text: str + + id: Optional[str] = None + + message_type: Optional[Literal["message", "thinking"]] = None + + role: Optional[Literal["user", "assistant"]] = None + + timestamp: Optional[datetime] = None + + type: Optional[Literal["trace_message"]] = None + + +DocumentDocumentCompanyChildFootnoteChild: TypeAlias = Union[ + DocumentDocumentCompanyChildFootnoteChildBlob, + DocumentDocumentCompanyChildFootnoteChildCode, + DocumentDocumentCompanyChildFootnoteChildComment, + DocumentDocumentCompanyChildFootnoteChildDivider, + DocumentDocumentCompanyChildFootnoteChildImage, + DocumentDocumentCompanyChildFootnoteChildLink, + DocumentDocumentCompanyChildFootnoteChildLineBreak, + DocumentDocumentCompanyChildFootnoteChildText, + DocumentDocumentCompanyChildFootnoteChildToolCall, + DocumentDocumentCompanyChildFootnoteChildToolResult, + DocumentDocumentCompanyChildFootnoteChildTraceMessage, + object, +] + + +class DocumentDocumentCompanyChildFootnote(BaseModel): + id: Optional[str] = None + + children: Optional[List[DocumentDocumentCompanyChildFootnoteChild]] = None + + text: Optional[str] = None + + type: Optional[Literal["footnote"]] = None + + +class DocumentDocumentCompanyChildHeadingChildBlob(BaseModel): + """Represents embedded binary data using data URI scheme. + + Format: data:[][;base64], + Example: data:text/html;base64,PGh0bWw+... + """ + + data: str + + mimetype: str + + id: Optional[str] = None + + type: Optional[Literal["blob"]] = None + + +class DocumentDocumentCompanyChildHeadingChildCode(BaseModel): + text: str + + id: Optional[str] = None + + language: Optional[str] = None + + type: Optional[Literal["code"]] = None + + +class DocumentDocumentCompanyChildHeadingChildComment(BaseModel): + text: str + + id: Optional[str] = None + + created_at: Optional[datetime] = None + + type: Optional[Literal["comment"]] = None + + +class DocumentDocumentCompanyChildHeadingChildDivider(BaseModel): + id: Optional[str] = None + + type: Optional[Literal["divider"]] = None + + +class DocumentDocumentCompanyChildHeadingChildImage(BaseModel): + src: str + + text: str + + id: Optional[str] = None + + type: Optional[Literal["image"]] = None + + +class DocumentDocumentCompanyChildHeadingChildLink(BaseModel): + text: str + + url: str + + id: Optional[str] = None + + type: Optional[Literal["link"]] = None + + +class DocumentDocumentCompanyChildHeadingChildLineBreak(BaseModel): + id: Optional[str] = None + + type: Optional[Literal["line_break"]] = None + + +class DocumentDocumentCompanyChildHeadingChildText(BaseModel): + text: str + + id: Optional[str] = None + + marks: Optional[List[Literal["bold", "italic", "underline", "strikethrough", "code", "math"]]] = None + + type: Optional[Literal["text"]] = None + + +class DocumentDocumentCompanyChildHeadingChildToolCall(BaseModel): + """A tool/function call made by the assistant.""" + + tool_call_id: str + + tool_name: str + + id: Optional[str] = None + + args: Optional[Dict[str, object]] = None + + type: Optional[Literal["tool_call"]] = None + + +class DocumentDocumentCompanyChildHeadingChildToolResult(BaseModel): + """The result of a tool call.""" + + output: Union[str, Dict[str, object], List[object]] + + tool_call_id: str + + tool_name: str + + id: Optional[str] = None + + is_error: Optional[bool] = None + + type: Optional[Literal["tool_result"]] = None + + +class DocumentDocumentCompanyChildHeadingChildTraceMessage(BaseModel): + """A message in an agent trace (user message, assistant message, or thinking).""" + + text: str + + id: Optional[str] = None + + message_type: Optional[Literal["message", "thinking"]] = None + + role: Optional[Literal["user", "assistant"]] = None + + timestamp: Optional[datetime] = None + + type: Optional[Literal["trace_message"]] = None + + +DocumentDocumentCompanyChildHeadingChild: TypeAlias = Union[ + DocumentDocumentCompanyChildHeadingChildBlob, + DocumentDocumentCompanyChildHeadingChildCode, + DocumentDocumentCompanyChildHeadingChildComment, + DocumentDocumentCompanyChildHeadingChildDivider, + DocumentDocumentCompanyChildHeadingChildImage, + DocumentDocumentCompanyChildHeadingChildLink, + DocumentDocumentCompanyChildHeadingChildLineBreak, + DocumentDocumentCompanyChildHeadingChildText, + DocumentDocumentCompanyChildHeadingChildToolCall, + DocumentDocumentCompanyChildHeadingChildToolResult, + DocumentDocumentCompanyChildHeadingChildTraceMessage, + object, +] + + +class DocumentDocumentCompanyChildHeading(BaseModel): + level: int + + id: Optional[str] = None + + children: Optional[List[DocumentDocumentCompanyChildHeadingChild]] = None + + text: Optional[str] = None + + type: Optional[Literal["heading"]] = None + + +class DocumentDocumentCompanyChildImage(BaseModel): + src: str + + text: str + + id: Optional[str] = None + + type: Optional[Literal["image"]] = None + + +class DocumentDocumentCompanyChildLink(BaseModel): + text: str + + url: str + + id: Optional[str] = None + + type: Optional[Literal["link"]] = None + + +class DocumentDocumentCompanyChildLineBreak(BaseModel): + id: Optional[str] = None + + type: Optional[Literal["line_break"]] = None + + +class DocumentDocumentCompanyChildList(BaseModel): + id: Optional[str] = None + + children: Optional[List[object]] = None + + ordered: Optional[bool] = None + + text: Optional[str] = None + + type: Optional[Literal["list"]] = None + + +class DocumentDocumentCompanyChildListItemChildBlob(BaseModel): + """Represents embedded binary data using data URI scheme. + + Format: data:[][;base64], + Example: data:text/html;base64,PGh0bWw+... + """ + + data: str + + mimetype: str + + id: Optional[str] = None + + type: Optional[Literal["blob"]] = None + + +class DocumentDocumentCompanyChildListItemChildCode(BaseModel): + text: str + + id: Optional[str] = None + + language: Optional[str] = None + + type: Optional[Literal["code"]] = None + + +class DocumentDocumentCompanyChildListItemChildComment(BaseModel): + text: str + + id: Optional[str] = None + + created_at: Optional[datetime] = None + + type: Optional[Literal["comment"]] = None + + +class DocumentDocumentCompanyChildListItemChildDivider(BaseModel): + id: Optional[str] = None + + type: Optional[Literal["divider"]] = None + + +class DocumentDocumentCompanyChildListItemChildImage(BaseModel): + src: str + + text: str + + id: Optional[str] = None + + type: Optional[Literal["image"]] = None + + +class DocumentDocumentCompanyChildListItemChildLink(BaseModel): + text: str + + url: str + + id: Optional[str] = None + + type: Optional[Literal["link"]] = None + + +class DocumentDocumentCompanyChildListItemChildLineBreak(BaseModel): + id: Optional[str] = None + + type: Optional[Literal["line_break"]] = None + + +class DocumentDocumentCompanyChildListItemChildText(BaseModel): + text: str + + id: Optional[str] = None + + marks: Optional[List[Literal["bold", "italic", "underline", "strikethrough", "code", "math"]]] = None + + type: Optional[Literal["text"]] = None + + +class DocumentDocumentCompanyChildListItemChildToolCall(BaseModel): + """A tool/function call made by the assistant.""" + + tool_call_id: str + + tool_name: str + + id: Optional[str] = None + + args: Optional[Dict[str, object]] = None + + type: Optional[Literal["tool_call"]] = None + + +class DocumentDocumentCompanyChildListItemChildToolResult(BaseModel): + """The result of a tool call.""" + + output: Union[str, Dict[str, object], List[object]] + + tool_call_id: str + + tool_name: str + + id: Optional[str] = None + + is_error: Optional[bool] = None + + type: Optional[Literal["tool_result"]] = None + + +class DocumentDocumentCompanyChildListItemChildTraceMessage(BaseModel): + """A message in an agent trace (user message, assistant message, or thinking).""" + + text: str + + id: Optional[str] = None + + message_type: Optional[Literal["message", "thinking"]] = None + + role: Optional[Literal["user", "assistant"]] = None + + timestamp: Optional[datetime] = None + + type: Optional[Literal["trace_message"]] = None + + +DocumentDocumentCompanyChildListItemChild: TypeAlias = Union[ + DocumentDocumentCompanyChildListItemChildBlob, + DocumentDocumentCompanyChildListItemChildCode, + DocumentDocumentCompanyChildListItemChildComment, + DocumentDocumentCompanyChildListItemChildDivider, + DocumentDocumentCompanyChildListItemChildImage, + DocumentDocumentCompanyChildListItemChildLink, + DocumentDocumentCompanyChildListItemChildLineBreak, + DocumentDocumentCompanyChildListItemChildText, + DocumentDocumentCompanyChildListItemChildToolCall, + DocumentDocumentCompanyChildListItemChildToolResult, + DocumentDocumentCompanyChildListItemChildTraceMessage, + object, +] + + +class DocumentDocumentCompanyChildListItem(BaseModel): + id: Optional[str] = None + + children: Optional[List[DocumentDocumentCompanyChildListItemChild]] = None + + text: Optional[str] = None + + type: Optional[Literal["list_item"]] = None + + +class DocumentDocumentCompanyChildParagraphChildBlob(BaseModel): + """Represents embedded binary data using data URI scheme. + + Format: data:[][;base64], + Example: data:text/html;base64,PGh0bWw+... + """ + + data: str + + mimetype: str + + id: Optional[str] = None + + type: Optional[Literal["blob"]] = None + + +class DocumentDocumentCompanyChildParagraphChildCode(BaseModel): + text: str + + id: Optional[str] = None + + language: Optional[str] = None + + type: Optional[Literal["code"]] = None + + +class DocumentDocumentCompanyChildParagraphChildComment(BaseModel): + text: str + + id: Optional[str] = None + + created_at: Optional[datetime] = None + + type: Optional[Literal["comment"]] = None + + +class DocumentDocumentCompanyChildParagraphChildDivider(BaseModel): + id: Optional[str] = None + + type: Optional[Literal["divider"]] = None + + +class DocumentDocumentCompanyChildParagraphChildImage(BaseModel): + src: str + + text: str + + id: Optional[str] = None + + type: Optional[Literal["image"]] = None + + +class DocumentDocumentCompanyChildParagraphChildLink(BaseModel): + text: str + + url: str + + id: Optional[str] = None + + type: Optional[Literal["link"]] = None + + +class DocumentDocumentCompanyChildParagraphChildLineBreak(BaseModel): + id: Optional[str] = None + + type: Optional[Literal["line_break"]] = None + + +class DocumentDocumentCompanyChildParagraphChildText(BaseModel): + text: str + + id: Optional[str] = None + + marks: Optional[List[Literal["bold", "italic", "underline", "strikethrough", "code", "math"]]] = None + + type: Optional[Literal["text"]] = None + + +class DocumentDocumentCompanyChildParagraphChildToolCall(BaseModel): + """A tool/function call made by the assistant.""" + + tool_call_id: str + + tool_name: str + + id: Optional[str] = None + + args: Optional[Dict[str, object]] = None + + type: Optional[Literal["tool_call"]] = None + + +class DocumentDocumentCompanyChildParagraphChildToolResult(BaseModel): + """The result of a tool call.""" + + output: Union[str, Dict[str, object], List[object]] + + tool_call_id: str + + tool_name: str + + id: Optional[str] = None + + is_error: Optional[bool] = None + + type: Optional[Literal["tool_result"]] = None + + +class DocumentDocumentCompanyChildParagraphChildTraceMessage(BaseModel): + """A message in an agent trace (user message, assistant message, or thinking).""" + + text: str + + id: Optional[str] = None + + message_type: Optional[Literal["message", "thinking"]] = None + + role: Optional[Literal["user", "assistant"]] = None + + timestamp: Optional[datetime] = None + + type: Optional[Literal["trace_message"]] = None + + +DocumentDocumentCompanyChildParagraphChild: TypeAlias = Union[ + DocumentDocumentCompanyChildParagraphChildBlob, + DocumentDocumentCompanyChildParagraphChildCode, + DocumentDocumentCompanyChildParagraphChildComment, + DocumentDocumentCompanyChildParagraphChildDivider, + DocumentDocumentCompanyChildParagraphChildImage, + DocumentDocumentCompanyChildParagraphChildLink, + DocumentDocumentCompanyChildParagraphChildLineBreak, + DocumentDocumentCompanyChildParagraphChildText, + DocumentDocumentCompanyChildParagraphChildToolCall, + DocumentDocumentCompanyChildParagraphChildToolResult, + DocumentDocumentCompanyChildParagraphChildTraceMessage, + object, +] + + +class DocumentDocumentCompanyChildParagraph(BaseModel): + id: Optional[str] = None + + children: Optional[List[DocumentDocumentCompanyChildParagraphChild]] = None + + text: Optional[str] = None + + type: Optional[Literal["paragraph"]] = None + + +class DocumentDocumentCompanyChildQuoteChildBlob(BaseModel): + """Represents embedded binary data using data URI scheme. + + Format: data:[][;base64], + Example: data:text/html;base64,PGh0bWw+... + """ + + data: str + + mimetype: str + + id: Optional[str] = None + + type: Optional[Literal["blob"]] = None + + +class DocumentDocumentCompanyChildQuoteChildCode(BaseModel): + text: str + + id: Optional[str] = None + + language: Optional[str] = None + + type: Optional[Literal["code"]] = None + + +class DocumentDocumentCompanyChildQuoteChildComment(BaseModel): + text: str + + id: Optional[str] = None + + created_at: Optional[datetime] = None + + type: Optional[Literal["comment"]] = None + + +class DocumentDocumentCompanyChildQuoteChildDivider(BaseModel): + id: Optional[str] = None + + type: Optional[Literal["divider"]] = None + + +class DocumentDocumentCompanyChildQuoteChildImage(BaseModel): + src: str + + text: str + + id: Optional[str] = None + + type: Optional[Literal["image"]] = None + + +class DocumentDocumentCompanyChildQuoteChildLink(BaseModel): + text: str + + url: str + + id: Optional[str] = None + + type: Optional[Literal["link"]] = None + + +class DocumentDocumentCompanyChildQuoteChildLineBreak(BaseModel): + id: Optional[str] = None + + type: Optional[Literal["line_break"]] = None + + +class DocumentDocumentCompanyChildQuoteChildText(BaseModel): + text: str + + id: Optional[str] = None + + marks: Optional[List[Literal["bold", "italic", "underline", "strikethrough", "code", "math"]]] = None + + type: Optional[Literal["text"]] = None + + +class DocumentDocumentCompanyChildQuoteChildToolCall(BaseModel): + """A tool/function call made by the assistant.""" + + tool_call_id: str + + tool_name: str + + id: Optional[str] = None + + args: Optional[Dict[str, object]] = None + + type: Optional[Literal["tool_call"]] = None + + +class DocumentDocumentCompanyChildQuoteChildToolResult(BaseModel): + """The result of a tool call.""" + + output: Union[str, Dict[str, object], List[object]] + + tool_call_id: str + + tool_name: str + + id: Optional[str] = None + + is_error: Optional[bool] = None + + type: Optional[Literal["tool_result"]] = None + + +class DocumentDocumentCompanyChildQuoteChildTraceMessage(BaseModel): + """A message in an agent trace (user message, assistant message, or thinking).""" + + text: str + + id: Optional[str] = None + + message_type: Optional[Literal["message", "thinking"]] = None + + role: Optional[Literal["user", "assistant"]] = None + + timestamp: Optional[datetime] = None + + type: Optional[Literal["trace_message"]] = None + + +DocumentDocumentCompanyChildQuoteChild: TypeAlias = Union[ + DocumentDocumentCompanyChildQuoteChildBlob, + DocumentDocumentCompanyChildQuoteChildCode, + DocumentDocumentCompanyChildQuoteChildComment, + DocumentDocumentCompanyChildQuoteChildDivider, + DocumentDocumentCompanyChildQuoteChildImage, + DocumentDocumentCompanyChildQuoteChildLink, + DocumentDocumentCompanyChildQuoteChildLineBreak, + DocumentDocumentCompanyChildQuoteChildText, + DocumentDocumentCompanyChildQuoteChildToolCall, + DocumentDocumentCompanyChildQuoteChildToolResult, + DocumentDocumentCompanyChildQuoteChildTraceMessage, + object, +] + + +class DocumentDocumentCompanyChildQuote(BaseModel): + id: Optional[str] = None + + children: Optional[List[DocumentDocumentCompanyChildQuoteChild]] = None + + text: Optional[str] = None + + type: Optional[Literal["quote"]] = None + + +class DocumentDocumentCompanyChildTable(BaseModel): + id: Optional[str] = None + + children: Optional[List[object]] = None + + has_header: Optional[bool] = None + """Whether the first row should be treated as a header""" + + text: Optional[str] = None + + type: Optional[Literal["table"]] = None + + +class DocumentDocumentCompanyChildTableCellChildBlob(BaseModel): + """Represents embedded binary data using data URI scheme. + + Format: data:[][;base64], + Example: data:text/html;base64,PGh0bWw+... + """ + + data: str + + mimetype: str + + id: Optional[str] = None + + type: Optional[Literal["blob"]] = None + + +class DocumentDocumentCompanyChildTableCellChildCode(BaseModel): + text: str + + id: Optional[str] = None + + language: Optional[str] = None + + type: Optional[Literal["code"]] = None + + +class DocumentDocumentCompanyChildTableCellChildComment(BaseModel): + text: str + + id: Optional[str] = None + + created_at: Optional[datetime] = None + + type: Optional[Literal["comment"]] = None + + +class DocumentDocumentCompanyChildTableCellChildDivider(BaseModel): + id: Optional[str] = None + + type: Optional[Literal["divider"]] = None + + +class DocumentDocumentCompanyChildTableCellChildImage(BaseModel): + src: str + + text: str + + id: Optional[str] = None + + type: Optional[Literal["image"]] = None + + +class DocumentDocumentCompanyChildTableCellChildLink(BaseModel): + text: str + + url: str + + id: Optional[str] = None + + type: Optional[Literal["link"]] = None + + +class DocumentDocumentCompanyChildTableCellChildLineBreak(BaseModel): + id: Optional[str] = None + + type: Optional[Literal["line_break"]] = None + + +class DocumentDocumentCompanyChildTableCellChildText(BaseModel): + text: str + + id: Optional[str] = None + + marks: Optional[List[Literal["bold", "italic", "underline", "strikethrough", "code", "math"]]] = None + + type: Optional[Literal["text"]] = None + + +class DocumentDocumentCompanyChildTableCellChildToolCall(BaseModel): + """A tool/function call made by the assistant.""" + + tool_call_id: str + + tool_name: str + + id: Optional[str] = None + + args: Optional[Dict[str, object]] = None + + type: Optional[Literal["tool_call"]] = None + + +class DocumentDocumentCompanyChildTableCellChildToolResult(BaseModel): + """The result of a tool call.""" + + output: Union[str, Dict[str, object], List[object]] + + tool_call_id: str + + tool_name: str + + id: Optional[str] = None + + is_error: Optional[bool] = None + + type: Optional[Literal["tool_result"]] = None + + +class DocumentDocumentCompanyChildTableCellChildTraceMessage(BaseModel): + """A message in an agent trace (user message, assistant message, or thinking).""" + + text: str + + id: Optional[str] = None + + message_type: Optional[Literal["message", "thinking"]] = None + + role: Optional[Literal["user", "assistant"]] = None + + timestamp: Optional[datetime] = None + + type: Optional[Literal["trace_message"]] = None + + +DocumentDocumentCompanyChildTableCellChild: TypeAlias = Union[ + DocumentDocumentCompanyChildTableCellChildBlob, + DocumentDocumentCompanyChildTableCellChildCode, + DocumentDocumentCompanyChildTableCellChildComment, + DocumentDocumentCompanyChildTableCellChildDivider, + DocumentDocumentCompanyChildTableCellChildImage, + DocumentDocumentCompanyChildTableCellChildLink, + DocumentDocumentCompanyChildTableCellChildLineBreak, + DocumentDocumentCompanyChildTableCellChildText, + DocumentDocumentCompanyChildTableCellChildToolCall, + DocumentDocumentCompanyChildTableCellChildToolResult, + DocumentDocumentCompanyChildTableCellChildTraceMessage, + object, +] + + +class DocumentDocumentCompanyChildTableCell(BaseModel): + id: Optional[str] = None + + align: Optional[Literal["left", "center", "right"]] = None + + children: Optional[List[DocumentDocumentCompanyChildTableCellChild]] = None + + text: Optional[str] = None + + type: Optional[Literal["table_cell"]] = None + + +class DocumentDocumentCompanyChildTableRow(BaseModel): + id: Optional[str] = None + + children: Optional[List[object]] = None + + text: Optional[str] = None + + type: Optional[Literal["table_row"]] = None + + +class DocumentDocumentCompanyChildText(BaseModel): + text: str + + id: Optional[str] = None + + marks: Optional[List[Literal["bold", "italic", "underline", "strikethrough", "code", "math"]]] = None + + type: Optional[Literal["text"]] = None + + +class DocumentDocumentCompanyChildToDoChildBlob(BaseModel): + """Represents embedded binary data using data URI scheme. + + Format: data:[][;base64], + Example: data:text/html;base64,PGh0bWw+... + """ + + data: str + + mimetype: str + + id: Optional[str] = None + + type: Optional[Literal["blob"]] = None + + +class DocumentDocumentCompanyChildToDoChildCode(BaseModel): + text: str + + id: Optional[str] = None + + language: Optional[str] = None + + type: Optional[Literal["code"]] = None + + +class DocumentDocumentCompanyChildToDoChildComment(BaseModel): + text: str + + id: Optional[str] = None + + created_at: Optional[datetime] = None + + type: Optional[Literal["comment"]] = None + + +class DocumentDocumentCompanyChildToDoChildDivider(BaseModel): + id: Optional[str] = None + + type: Optional[Literal["divider"]] = None + + +class DocumentDocumentCompanyChildToDoChildImage(BaseModel): + src: str + + text: str + + id: Optional[str] = None + + type: Optional[Literal["image"]] = None + + +class DocumentDocumentCompanyChildToDoChildLink(BaseModel): + text: str + + url: str + + id: Optional[str] = None + + type: Optional[Literal["link"]] = None + + +class DocumentDocumentCompanyChildToDoChildLineBreak(BaseModel): + id: Optional[str] = None + + type: Optional[Literal["line_break"]] = None + + +class DocumentDocumentCompanyChildToDoChildText(BaseModel): + text: str + + id: Optional[str] = None + + marks: Optional[List[Literal["bold", "italic", "underline", "strikethrough", "code", "math"]]] = None + + type: Optional[Literal["text"]] = None + + +class DocumentDocumentCompanyChildToDoChildToolCall(BaseModel): + """A tool/function call made by the assistant.""" + + tool_call_id: str + + tool_name: str + + id: Optional[str] = None + + args: Optional[Dict[str, object]] = None + + type: Optional[Literal["tool_call"]] = None + + +class DocumentDocumentCompanyChildToDoChildToolResult(BaseModel): + """The result of a tool call.""" + + output: Union[str, Dict[str, object], List[object]] + + tool_call_id: str + + tool_name: str + + id: Optional[str] = None + + is_error: Optional[bool] = None + + type: Optional[Literal["tool_result"]] = None + + +class DocumentDocumentCompanyChildToDoChildTraceMessage(BaseModel): + """A message in an agent trace (user message, assistant message, or thinking).""" + + text: str + + id: Optional[str] = None + + message_type: Optional[Literal["message", "thinking"]] = None + + role: Optional[Literal["user", "assistant"]] = None + + timestamp: Optional[datetime] = None + + type: Optional[Literal["trace_message"]] = None + + +DocumentDocumentCompanyChildToDoChild: TypeAlias = Union[ + DocumentDocumentCompanyChildToDoChildBlob, + DocumentDocumentCompanyChildToDoChildCode, + DocumentDocumentCompanyChildToDoChildComment, + DocumentDocumentCompanyChildToDoChildDivider, + DocumentDocumentCompanyChildToDoChildImage, + DocumentDocumentCompanyChildToDoChildLink, + DocumentDocumentCompanyChildToDoChildLineBreak, + DocumentDocumentCompanyChildToDoChildText, + DocumentDocumentCompanyChildToDoChildToolCall, + DocumentDocumentCompanyChildToDoChildToolResult, + DocumentDocumentCompanyChildToDoChildTraceMessage, + object, +] + + +class DocumentDocumentCompanyChildToDo(BaseModel): + id: Optional[str] = None + + checked: Optional[bool] = None + + children: Optional[List[DocumentDocumentCompanyChildToDoChild]] = None + + text: Optional[str] = None + + type: Optional[Literal["todo"]] = None + + +class DocumentDocumentCompanyChildToolCall(BaseModel): + """A tool/function call made by the assistant.""" + + tool_call_id: str + + tool_name: str + + id: Optional[str] = None + + args: Optional[Dict[str, object]] = None + + type: Optional[Literal["tool_call"]] = None + + +class DocumentDocumentCompanyChildToolResult(BaseModel): + """The result of a tool call.""" + + output: Union[str, Dict[str, object], List[object]] + + tool_call_id: str + + tool_name: str + + id: Optional[str] = None + + is_error: Optional[bool] = None + + type: Optional[Literal["tool_result"]] = None + + +class DocumentDocumentCompanyChildTraceMessage(BaseModel): + """A message in an agent trace (user message, assistant message, or thinking).""" + + text: str + + id: Optional[str] = None + + message_type: Optional[Literal["message", "thinking"]] = None + + role: Optional[Literal["user", "assistant"]] = None + + timestamp: Optional[datetime] = None + + type: Optional[Literal["trace_message"]] = None + + +class DocumentDocumentCompanyChildUtterance(BaseModel): + """A speaker-attributed segment of a transcript (ENG-2476/D10). + + "Utterance" is the standard name for this across transcription providers + (AssemblyAI, Deepgram, Rev). Timestamps are relative offsets in seconds — + provider-native; absolute times derive from `Transcript.started_at`. + """ + + text: str + + id: Optional[str] = None + + end: Optional[float] = None + + speaker: Optional[object] = None + + start: Optional[float] = None + + type: Optional[Literal["utterance"]] = None + + +DocumentDocumentCompanyChild: TypeAlias = Annotated[ + Union[ + DocumentDocumentCompanyChildBlob, + DocumentDocumentCompanyChildCallout, + DocumentDocumentCompanyChildChunk, + DocumentDocumentCompanyChildCode, + DocumentDocumentCompanyChildComment, + DocumentDocumentCompanyChildDivider, + DocumentDocumentCompanyChildEquation, + DocumentDocumentCompanyChildFootnote, + DocumentDocumentCompanyChildHeading, + DocumentDocumentCompanyChildImage, + DocumentDocumentCompanyChildLink, + DocumentDocumentCompanyChildLineBreak, + DocumentDocumentCompanyChildList, + DocumentDocumentCompanyChildListItem, + DocumentDocumentCompanyChildParagraph, + DocumentDocumentCompanyChildQuote, + DocumentDocumentCompanyChildTable, + DocumentDocumentCompanyChildTableCell, + DocumentDocumentCompanyChildTableRow, + DocumentDocumentCompanyChildText, + DocumentDocumentCompanyChildToDo, + DocumentDocumentCompanyChildToolCall, + DocumentDocumentCompanyChildToolResult, + DocumentDocumentCompanyChildTraceMessage, + DocumentDocumentCompanyChildUtterance, + ], + PropertyInfo(discriminator="type"), +] + + +class DocumentDocumentCompany(BaseModel): + """A CRM company/account record (ENG-2476/D10).""" + + id: Optional[str] = None + + address: Optional[str] = None + + children: Optional[List[DocumentDocumentCompanyChild]] = None + + contact_ids: Optional[List[str]] = None + + deal_ids: Optional[List[str]] = None + + description: Optional[str] = None + + emails: Optional[List[str]] = None + + employees: Optional[int] = None + + image_url: Optional[str] = None + + industry: Optional[str] = None + + is_active: Optional[bool] = None + + name: Optional[str] = None + + phone_numbers: Optional[List[str]] = None + + tags: Optional[List[str]] = None + + text: Optional[str] = None + + timezone: Optional[str] = None + + type: Optional[Literal["company"]] = None + + websites: Optional[List[str]] = None + + +class DocumentDocumentDealChildBlob(BaseModel): + """Represents embedded binary data using data URI scheme. + + Format: data:[][;base64], + Example: data:text/html;base64,PGh0bWw+... + """ + + data: str + + mimetype: str + + id: Optional[str] = None + + type: Optional[Literal["blob"]] = None + + +class DocumentDocumentDealChildCalloutChildBlob(BaseModel): + """Represents embedded binary data using data URI scheme. + + Format: data:[][;base64], + Example: data:text/html;base64,PGh0bWw+... + """ + + data: str + + mimetype: str + + id: Optional[str] = None + + type: Optional[Literal["blob"]] = None + + +class DocumentDocumentDealChildCalloutChildCode(BaseModel): + text: str + + id: Optional[str] = None + + language: Optional[str] = None + + type: Optional[Literal["code"]] = None + + +class DocumentDocumentDealChildCalloutChildComment(BaseModel): + text: str + + id: Optional[str] = None + + created_at: Optional[datetime] = None + + type: Optional[Literal["comment"]] = None + + +class DocumentDocumentDealChildCalloutChildDivider(BaseModel): + id: Optional[str] = None + + type: Optional[Literal["divider"]] = None + + +class DocumentDocumentDealChildCalloutChildImage(BaseModel): + src: str + + text: str + + id: Optional[str] = None + + type: Optional[Literal["image"]] = None + + +class DocumentDocumentDealChildCalloutChildLink(BaseModel): + text: str + + url: str + + id: Optional[str] = None + + type: Optional[Literal["link"]] = None + + +class DocumentDocumentDealChildCalloutChildLineBreak(BaseModel): + id: Optional[str] = None + + type: Optional[Literal["line_break"]] = None + + +class DocumentDocumentDealChildCalloutChildText(BaseModel): + text: str + + id: Optional[str] = None + + marks: Optional[List[Literal["bold", "italic", "underline", "strikethrough", "code", "math"]]] = None + + type: Optional[Literal["text"]] = None + + +class DocumentDocumentDealChildCalloutChildToolCall(BaseModel): + """A tool/function call made by the assistant.""" + + tool_call_id: str + + tool_name: str + + id: Optional[str] = None + + args: Optional[Dict[str, object]] = None + + type: Optional[Literal["tool_call"]] = None + + +class DocumentDocumentDealChildCalloutChildToolResult(BaseModel): + """The result of a tool call.""" + + output: Union[str, Dict[str, object], List[object]] + + tool_call_id: str + + tool_name: str + + id: Optional[str] = None + + is_error: Optional[bool] = None + + type: Optional[Literal["tool_result"]] = None + + +class DocumentDocumentDealChildCalloutChildTraceMessage(BaseModel): + """A message in an agent trace (user message, assistant message, or thinking).""" + + text: str + + id: Optional[str] = None + + message_type: Optional[Literal["message", "thinking"]] = None + + role: Optional[Literal["user", "assistant"]] = None + + timestamp: Optional[datetime] = None + + type: Optional[Literal["trace_message"]] = None + + +DocumentDocumentDealChildCalloutChild: TypeAlias = Union[ + DocumentDocumentDealChildCalloutChildBlob, + DocumentDocumentDealChildCalloutChildCode, + DocumentDocumentDealChildCalloutChildComment, + DocumentDocumentDealChildCalloutChildDivider, + DocumentDocumentDealChildCalloutChildImage, + DocumentDocumentDealChildCalloutChildLink, + DocumentDocumentDealChildCalloutChildLineBreak, + DocumentDocumentDealChildCalloutChildText, + DocumentDocumentDealChildCalloutChildToolCall, + DocumentDocumentDealChildCalloutChildToolResult, + DocumentDocumentDealChildCalloutChildTraceMessage, + object, +] + + +class DocumentDocumentDealChildCallout(BaseModel): + id: Optional[str] = None + + children: Optional[List[DocumentDocumentDealChildCalloutChild]] = None + + text: Optional[str] = None + + title: Optional[str] = None + + type: Optional[Literal["callout"]] = None + + +class DocumentDocumentDealChildChunkChildBlob(BaseModel): + """Represents embedded binary data using data URI scheme. + + Format: data:[][;base64], + Example: data:text/html;base64,PGh0bWw+... + """ + + data: str + + mimetype: str + + id: Optional[str] = None + + type: Optional[Literal["blob"]] = None + + +class DocumentDocumentDealChildChunkChildCode(BaseModel): + text: str + + id: Optional[str] = None + + language: Optional[str] = None + + type: Optional[Literal["code"]] = None + + +class DocumentDocumentDealChildChunkChildComment(BaseModel): + text: str + + id: Optional[str] = None + + created_at: Optional[datetime] = None + + type: Optional[Literal["comment"]] = None + + +class DocumentDocumentDealChildChunkChildDivider(BaseModel): + id: Optional[str] = None + + type: Optional[Literal["divider"]] = None + + +class DocumentDocumentDealChildChunkChildImage(BaseModel): + src: str + + text: str + + id: Optional[str] = None + + type: Optional[Literal["image"]] = None + + +class DocumentDocumentDealChildChunkChildLink(BaseModel): + text: str + + url: str + + id: Optional[str] = None + + type: Optional[Literal["link"]] = None + + +class DocumentDocumentDealChildChunkChildLineBreak(BaseModel): + id: Optional[str] = None + + type: Optional[Literal["line_break"]] = None + + +class DocumentDocumentDealChildChunkChildText(BaseModel): + text: str + + id: Optional[str] = None + + marks: Optional[List[Literal["bold", "italic", "underline", "strikethrough", "code", "math"]]] = None + + type: Optional[Literal["text"]] = None + + +class DocumentDocumentDealChildChunkChildToolCall(BaseModel): + """A tool/function call made by the assistant.""" + + tool_call_id: str + + tool_name: str + + id: Optional[str] = None + + args: Optional[Dict[str, object]] = None + + type: Optional[Literal["tool_call"]] = None + + +class DocumentDocumentDealChildChunkChildToolResult(BaseModel): + """The result of a tool call.""" + + output: Union[str, Dict[str, object], List[object]] + + tool_call_id: str + + tool_name: str + + id: Optional[str] = None + + is_error: Optional[bool] = None + + type: Optional[Literal["tool_result"]] = None + + +class DocumentDocumentDealChildChunkChildTraceMessage(BaseModel): + """A message in an agent trace (user message, assistant message, or thinking).""" + + text: str + + id: Optional[str] = None + + message_type: Optional[Literal["message", "thinking"]] = None + + role: Optional[Literal["user", "assistant"]] = None + + timestamp: Optional[datetime] = None + + type: Optional[Literal["trace_message"]] = None + + +DocumentDocumentDealChildChunkChild: TypeAlias = Union[ + DocumentDocumentDealChildChunkChildBlob, + DocumentDocumentDealChildChunkChildCode, + DocumentDocumentDealChildChunkChildComment, + DocumentDocumentDealChildChunkChildDivider, + DocumentDocumentDealChildChunkChildImage, + DocumentDocumentDealChildChunkChildLink, + DocumentDocumentDealChildChunkChildLineBreak, + DocumentDocumentDealChildChunkChildText, + DocumentDocumentDealChildChunkChildToolCall, + DocumentDocumentDealChildChunkChildToolResult, + DocumentDocumentDealChildChunkChildTraceMessage, + object, +] + + +class DocumentDocumentDealChildChunk(BaseModel): + id: Optional[str] = None + + children: Optional[List[DocumentDocumentDealChildChunkChild]] = None + + text: Optional[str] = None + + type: Optional[Literal["chunk"]] = None + + +class DocumentDocumentDealChildCode(BaseModel): + text: str + + id: Optional[str] = None + + language: Optional[str] = None + + type: Optional[Literal["code"]] = None + + +class DocumentDocumentDealChildComment(BaseModel): + text: str + + id: Optional[str] = None + + created_at: Optional[datetime] = None + + type: Optional[Literal["comment"]] = None + + +class DocumentDocumentDealChildDivider(BaseModel): + id: Optional[str] = None + + type: Optional[Literal["divider"]] = None + + +class DocumentDocumentDealChildEquationChildBlob(BaseModel): + """Represents embedded binary data using data URI scheme. + + Format: data:[][;base64], + Example: data:text/html;base64,PGh0bWw+... + """ + + data: str + + mimetype: str + + id: Optional[str] = None + + type: Optional[Literal["blob"]] = None + + +class DocumentDocumentDealChildEquationChildCode(BaseModel): + text: str + + id: Optional[str] = None + + language: Optional[str] = None + + type: Optional[Literal["code"]] = None + + +class DocumentDocumentDealChildEquationChildComment(BaseModel): + text: str + + id: Optional[str] = None + + created_at: Optional[datetime] = None + + type: Optional[Literal["comment"]] = None + + +class DocumentDocumentDealChildEquationChildDivider(BaseModel): + id: Optional[str] = None + + type: Optional[Literal["divider"]] = None + + +class DocumentDocumentDealChildEquationChildImage(BaseModel): + src: str + + text: str + + id: Optional[str] = None + + type: Optional[Literal["image"]] = None + + +class DocumentDocumentDealChildEquationChildLink(BaseModel): + text: str + + url: str + + id: Optional[str] = None + + type: Optional[Literal["link"]] = None + + +class DocumentDocumentDealChildEquationChildLineBreak(BaseModel): + id: Optional[str] = None + + type: Optional[Literal["line_break"]] = None + + +class DocumentDocumentDealChildEquationChildText(BaseModel): + text: str + + id: Optional[str] = None + + marks: Optional[List[Literal["bold", "italic", "underline", "strikethrough", "code", "math"]]] = None + + type: Optional[Literal["text"]] = None + + +class DocumentDocumentDealChildEquationChildToolCall(BaseModel): + """A tool/function call made by the assistant.""" + + tool_call_id: str + + tool_name: str + + id: Optional[str] = None + + args: Optional[Dict[str, object]] = None + + type: Optional[Literal["tool_call"]] = None + + +class DocumentDocumentDealChildEquationChildToolResult(BaseModel): + """The result of a tool call.""" + + output: Union[str, Dict[str, object], List[object]] + + tool_call_id: str + + tool_name: str + + id: Optional[str] = None + + is_error: Optional[bool] = None + + type: Optional[Literal["tool_result"]] = None + + +class DocumentDocumentDealChildEquationChildTraceMessage(BaseModel): + """A message in an agent trace (user message, assistant message, or thinking).""" + + text: str + + id: Optional[str] = None + + message_type: Optional[Literal["message", "thinking"]] = None + + role: Optional[Literal["user", "assistant"]] = None + + timestamp: Optional[datetime] = None + + type: Optional[Literal["trace_message"]] = None + + +DocumentDocumentDealChildEquationChild: TypeAlias = Union[ + DocumentDocumentDealChildEquationChildBlob, + DocumentDocumentDealChildEquationChildCode, + DocumentDocumentDealChildEquationChildComment, + DocumentDocumentDealChildEquationChildDivider, + DocumentDocumentDealChildEquationChildImage, + DocumentDocumentDealChildEquationChildLink, + DocumentDocumentDealChildEquationChildLineBreak, + DocumentDocumentDealChildEquationChildText, + DocumentDocumentDealChildEquationChildToolCall, + DocumentDocumentDealChildEquationChildToolResult, + DocumentDocumentDealChildEquationChildTraceMessage, + object, +] + + +class DocumentDocumentDealChildEquation(BaseModel): + id: Optional[str] = None + + children: Optional[List[DocumentDocumentDealChildEquationChild]] = None + + text: Optional[str] = None + + type: Optional[Literal["equation"]] = None + + +class DocumentDocumentDealChildFootnoteChildBlob(BaseModel): + """Represents embedded binary data using data URI scheme. + + Format: data:[][;base64], + Example: data:text/html;base64,PGh0bWw+... + """ + + data: str + + mimetype: str + + id: Optional[str] = None + + type: Optional[Literal["blob"]] = None + + +class DocumentDocumentDealChildFootnoteChildCode(BaseModel): + text: str + + id: Optional[str] = None + + language: Optional[str] = None + + type: Optional[Literal["code"]] = None + + +class DocumentDocumentDealChildFootnoteChildComment(BaseModel): + text: str + + id: Optional[str] = None + + created_at: Optional[datetime] = None + + type: Optional[Literal["comment"]] = None + + +class DocumentDocumentDealChildFootnoteChildDivider(BaseModel): + id: Optional[str] = None + + type: Optional[Literal["divider"]] = None + + +class DocumentDocumentDealChildFootnoteChildImage(BaseModel): + src: str + + text: str + + id: Optional[str] = None + + type: Optional[Literal["image"]] = None + + +class DocumentDocumentDealChildFootnoteChildLink(BaseModel): + text: str + + url: str + + id: Optional[str] = None + + type: Optional[Literal["link"]] = None + + +class DocumentDocumentDealChildFootnoteChildLineBreak(BaseModel): + id: Optional[str] = None + + type: Optional[Literal["line_break"]] = None + + +class DocumentDocumentDealChildFootnoteChildText(BaseModel): + text: str + + id: Optional[str] = None + + marks: Optional[List[Literal["bold", "italic", "underline", "strikethrough", "code", "math"]]] = None + + type: Optional[Literal["text"]] = None + + +class DocumentDocumentDealChildFootnoteChildToolCall(BaseModel): + """A tool/function call made by the assistant.""" + + tool_call_id: str + + tool_name: str + + id: Optional[str] = None + + args: Optional[Dict[str, object]] = None + + type: Optional[Literal["tool_call"]] = None + + +class DocumentDocumentDealChildFootnoteChildToolResult(BaseModel): + """The result of a tool call.""" + + output: Union[str, Dict[str, object], List[object]] + + tool_call_id: str + + tool_name: str + + id: Optional[str] = None + + is_error: Optional[bool] = None + + type: Optional[Literal["tool_result"]] = None + + +class DocumentDocumentDealChildFootnoteChildTraceMessage(BaseModel): + """A message in an agent trace (user message, assistant message, or thinking).""" + + text: str + + id: Optional[str] = None + + message_type: Optional[Literal["message", "thinking"]] = None + + role: Optional[Literal["user", "assistant"]] = None + + timestamp: Optional[datetime] = None + + type: Optional[Literal["trace_message"]] = None + + +DocumentDocumentDealChildFootnoteChild: TypeAlias = Union[ + DocumentDocumentDealChildFootnoteChildBlob, + DocumentDocumentDealChildFootnoteChildCode, + DocumentDocumentDealChildFootnoteChildComment, + DocumentDocumentDealChildFootnoteChildDivider, + DocumentDocumentDealChildFootnoteChildImage, + DocumentDocumentDealChildFootnoteChildLink, + DocumentDocumentDealChildFootnoteChildLineBreak, + DocumentDocumentDealChildFootnoteChildText, + DocumentDocumentDealChildFootnoteChildToolCall, + DocumentDocumentDealChildFootnoteChildToolResult, + DocumentDocumentDealChildFootnoteChildTraceMessage, + object, +] + + +class DocumentDocumentDealChildFootnote(BaseModel): + id: Optional[str] = None + + children: Optional[List[DocumentDocumentDealChildFootnoteChild]] = None + + text: Optional[str] = None + + type: Optional[Literal["footnote"]] = None + + +class DocumentDocumentDealChildHeadingChildBlob(BaseModel): + """Represents embedded binary data using data URI scheme. + + Format: data:[][;base64], + Example: data:text/html;base64,PGh0bWw+... + """ + + data: str + + mimetype: str + + id: Optional[str] = None + + type: Optional[Literal["blob"]] = None + + +class DocumentDocumentDealChildHeadingChildCode(BaseModel): + text: str + + id: Optional[str] = None + + language: Optional[str] = None + + type: Optional[Literal["code"]] = None + + +class DocumentDocumentDealChildHeadingChildComment(BaseModel): + text: str + + id: Optional[str] = None + + created_at: Optional[datetime] = None + + type: Optional[Literal["comment"]] = None + + +class DocumentDocumentDealChildHeadingChildDivider(BaseModel): + id: Optional[str] = None + + type: Optional[Literal["divider"]] = None + + +class DocumentDocumentDealChildHeadingChildImage(BaseModel): + src: str + + text: str + + id: Optional[str] = None + + type: Optional[Literal["image"]] = None + + +class DocumentDocumentDealChildHeadingChildLink(BaseModel): + text: str + + url: str + + id: Optional[str] = None + + type: Optional[Literal["link"]] = None + + +class DocumentDocumentDealChildHeadingChildLineBreak(BaseModel): + id: Optional[str] = None + + type: Optional[Literal["line_break"]] = None + + +class DocumentDocumentDealChildHeadingChildText(BaseModel): + text: str + + id: Optional[str] = None + + marks: Optional[List[Literal["bold", "italic", "underline", "strikethrough", "code", "math"]]] = None + + type: Optional[Literal["text"]] = None + + +class DocumentDocumentDealChildHeadingChildToolCall(BaseModel): + """A tool/function call made by the assistant.""" + + tool_call_id: str + + tool_name: str + + id: Optional[str] = None + + args: Optional[Dict[str, object]] = None + + type: Optional[Literal["tool_call"]] = None + + +class DocumentDocumentDealChildHeadingChildToolResult(BaseModel): + """The result of a tool call.""" + + output: Union[str, Dict[str, object], List[object]] + + tool_call_id: str + + tool_name: str + + id: Optional[str] = None + + is_error: Optional[bool] = None + + type: Optional[Literal["tool_result"]] = None + + +class DocumentDocumentDealChildHeadingChildTraceMessage(BaseModel): + """A message in an agent trace (user message, assistant message, or thinking).""" + + text: str + + id: Optional[str] = None + + message_type: Optional[Literal["message", "thinking"]] = None + + role: Optional[Literal["user", "assistant"]] = None + + timestamp: Optional[datetime] = None + + type: Optional[Literal["trace_message"]] = None + + +DocumentDocumentDealChildHeadingChild: TypeAlias = Union[ + DocumentDocumentDealChildHeadingChildBlob, + DocumentDocumentDealChildHeadingChildCode, + DocumentDocumentDealChildHeadingChildComment, + DocumentDocumentDealChildHeadingChildDivider, + DocumentDocumentDealChildHeadingChildImage, + DocumentDocumentDealChildHeadingChildLink, + DocumentDocumentDealChildHeadingChildLineBreak, + DocumentDocumentDealChildHeadingChildText, + DocumentDocumentDealChildHeadingChildToolCall, + DocumentDocumentDealChildHeadingChildToolResult, + DocumentDocumentDealChildHeadingChildTraceMessage, + object, +] + + +class DocumentDocumentDealChildHeading(BaseModel): + level: int + + id: Optional[str] = None + + children: Optional[List[DocumentDocumentDealChildHeadingChild]] = None + + text: Optional[str] = None + + type: Optional[Literal["heading"]] = None + + +class DocumentDocumentDealChildImage(BaseModel): + src: str + + text: str + + id: Optional[str] = None + + type: Optional[Literal["image"]] = None + + +class DocumentDocumentDealChildLink(BaseModel): + text: str + + url: str + + id: Optional[str] = None + + type: Optional[Literal["link"]] = None + + +class DocumentDocumentDealChildLineBreak(BaseModel): + id: Optional[str] = None + + type: Optional[Literal["line_break"]] = None + + +class DocumentDocumentDealChildList(BaseModel): + id: Optional[str] = None + + children: Optional[List[object]] = None + + ordered: Optional[bool] = None + + text: Optional[str] = None + + type: Optional[Literal["list"]] = None + + +class DocumentDocumentDealChildListItemChildBlob(BaseModel): + """Represents embedded binary data using data URI scheme. + + Format: data:[][;base64], + Example: data:text/html;base64,PGh0bWw+... + """ + + data: str + + mimetype: str + + id: Optional[str] = None + + type: Optional[Literal["blob"]] = None + + +class DocumentDocumentDealChildListItemChildCode(BaseModel): + text: str + + id: Optional[str] = None + + language: Optional[str] = None + + type: Optional[Literal["code"]] = None + + +class DocumentDocumentDealChildListItemChildComment(BaseModel): + text: str + + id: Optional[str] = None + + created_at: Optional[datetime] = None + + type: Optional[Literal["comment"]] = None + + +class DocumentDocumentDealChildListItemChildDivider(BaseModel): + id: Optional[str] = None + + type: Optional[Literal["divider"]] = None + + +class DocumentDocumentDealChildListItemChildImage(BaseModel): + src: str + + text: str + + id: Optional[str] = None + + type: Optional[Literal["image"]] = None + + +class DocumentDocumentDealChildListItemChildLink(BaseModel): + text: str + + url: str + + id: Optional[str] = None + + type: Optional[Literal["link"]] = None + + +class DocumentDocumentDealChildListItemChildLineBreak(BaseModel): + id: Optional[str] = None + + type: Optional[Literal["line_break"]] = None + + +class DocumentDocumentDealChildListItemChildText(BaseModel): + text: str + + id: Optional[str] = None + + marks: Optional[List[Literal["bold", "italic", "underline", "strikethrough", "code", "math"]]] = None + + type: Optional[Literal["text"]] = None + + +class DocumentDocumentDealChildListItemChildToolCall(BaseModel): + """A tool/function call made by the assistant.""" + + tool_call_id: str + + tool_name: str + + id: Optional[str] = None + + args: Optional[Dict[str, object]] = None + + type: Optional[Literal["tool_call"]] = None + + +class DocumentDocumentDealChildListItemChildToolResult(BaseModel): + """The result of a tool call.""" + + output: Union[str, Dict[str, object], List[object]] + + tool_call_id: str + + tool_name: str + + id: Optional[str] = None + + is_error: Optional[bool] = None + + type: Optional[Literal["tool_result"]] = None + + +class DocumentDocumentDealChildListItemChildTraceMessage(BaseModel): + """A message in an agent trace (user message, assistant message, or thinking).""" + + text: str + + id: Optional[str] = None + + message_type: Optional[Literal["message", "thinking"]] = None + + role: Optional[Literal["user", "assistant"]] = None + + timestamp: Optional[datetime] = None + + type: Optional[Literal["trace_message"]] = None + + +DocumentDocumentDealChildListItemChild: TypeAlias = Union[ + DocumentDocumentDealChildListItemChildBlob, + DocumentDocumentDealChildListItemChildCode, + DocumentDocumentDealChildListItemChildComment, + DocumentDocumentDealChildListItemChildDivider, + DocumentDocumentDealChildListItemChildImage, + DocumentDocumentDealChildListItemChildLink, + DocumentDocumentDealChildListItemChildLineBreak, + DocumentDocumentDealChildListItemChildText, + DocumentDocumentDealChildListItemChildToolCall, + DocumentDocumentDealChildListItemChildToolResult, + DocumentDocumentDealChildListItemChildTraceMessage, + object, +] + + +class DocumentDocumentDealChildListItem(BaseModel): + id: Optional[str] = None + + children: Optional[List[DocumentDocumentDealChildListItemChild]] = None + + text: Optional[str] = None + + type: Optional[Literal["list_item"]] = None + + +class DocumentDocumentDealChildParagraphChildBlob(BaseModel): + """Represents embedded binary data using data URI scheme. + + Format: data:[][;base64], + Example: data:text/html;base64,PGh0bWw+... + """ + + data: str + + mimetype: str + + id: Optional[str] = None + + type: Optional[Literal["blob"]] = None + + +class DocumentDocumentDealChildParagraphChildCode(BaseModel): + text: str + + id: Optional[str] = None + + language: Optional[str] = None + + type: Optional[Literal["code"]] = None + + +class DocumentDocumentDealChildParagraphChildComment(BaseModel): + text: str + + id: Optional[str] = None + + created_at: Optional[datetime] = None + + type: Optional[Literal["comment"]] = None + + +class DocumentDocumentDealChildParagraphChildDivider(BaseModel): + id: Optional[str] = None + + type: Optional[Literal["divider"]] = None + + +class DocumentDocumentDealChildParagraphChildImage(BaseModel): + src: str + + text: str + + id: Optional[str] = None + + type: Optional[Literal["image"]] = None + + +class DocumentDocumentDealChildParagraphChildLink(BaseModel): + text: str + + url: str + + id: Optional[str] = None + + type: Optional[Literal["link"]] = None + + +class DocumentDocumentDealChildParagraphChildLineBreak(BaseModel): + id: Optional[str] = None + + type: Optional[Literal["line_break"]] = None + + +class DocumentDocumentDealChildParagraphChildText(BaseModel): + text: str + + id: Optional[str] = None + + marks: Optional[List[Literal["bold", "italic", "underline", "strikethrough", "code", "math"]]] = None + + type: Optional[Literal["text"]] = None + + +class DocumentDocumentDealChildParagraphChildToolCall(BaseModel): + """A tool/function call made by the assistant.""" + + tool_call_id: str + + tool_name: str + + id: Optional[str] = None + + args: Optional[Dict[str, object]] = None + + type: Optional[Literal["tool_call"]] = None + + +class DocumentDocumentDealChildParagraphChildToolResult(BaseModel): + """The result of a tool call.""" + + output: Union[str, Dict[str, object], List[object]] + + tool_call_id: str + + tool_name: str + + id: Optional[str] = None + + is_error: Optional[bool] = None + + type: Optional[Literal["tool_result"]] = None + + +class DocumentDocumentDealChildParagraphChildTraceMessage(BaseModel): + """A message in an agent trace (user message, assistant message, or thinking).""" + + text: str + + id: Optional[str] = None + + message_type: Optional[Literal["message", "thinking"]] = None + + role: Optional[Literal["user", "assistant"]] = None + + timestamp: Optional[datetime] = None + + type: Optional[Literal["trace_message"]] = None + + +DocumentDocumentDealChildParagraphChild: TypeAlias = Union[ + DocumentDocumentDealChildParagraphChildBlob, + DocumentDocumentDealChildParagraphChildCode, + DocumentDocumentDealChildParagraphChildComment, + DocumentDocumentDealChildParagraphChildDivider, + DocumentDocumentDealChildParagraphChildImage, + DocumentDocumentDealChildParagraphChildLink, + DocumentDocumentDealChildParagraphChildLineBreak, + DocumentDocumentDealChildParagraphChildText, + DocumentDocumentDealChildParagraphChildToolCall, + DocumentDocumentDealChildParagraphChildToolResult, + DocumentDocumentDealChildParagraphChildTraceMessage, + object, +] + + +class DocumentDocumentDealChildParagraph(BaseModel): + id: Optional[str] = None + + children: Optional[List[DocumentDocumentDealChildParagraphChild]] = None + + text: Optional[str] = None + + type: Optional[Literal["paragraph"]] = None + + +class DocumentDocumentDealChildQuoteChildBlob(BaseModel): + """Represents embedded binary data using data URI scheme. + + Format: data:[][;base64], + Example: data:text/html;base64,PGh0bWw+... + """ + + data: str + + mimetype: str + + id: Optional[str] = None + + type: Optional[Literal["blob"]] = None + + +class DocumentDocumentDealChildQuoteChildCode(BaseModel): + text: str + + id: Optional[str] = None + + language: Optional[str] = None + + type: Optional[Literal["code"]] = None + + +class DocumentDocumentDealChildQuoteChildComment(BaseModel): + text: str + + id: Optional[str] = None + + created_at: Optional[datetime] = None + + type: Optional[Literal["comment"]] = None + + +class DocumentDocumentDealChildQuoteChildDivider(BaseModel): + id: Optional[str] = None + + type: Optional[Literal["divider"]] = None + + +class DocumentDocumentDealChildQuoteChildImage(BaseModel): + src: str + + text: str + + id: Optional[str] = None + + type: Optional[Literal["image"]] = None + + +class DocumentDocumentDealChildQuoteChildLink(BaseModel): + text: str + + url: str + + id: Optional[str] = None + + type: Optional[Literal["link"]] = None + + +class DocumentDocumentDealChildQuoteChildLineBreak(BaseModel): + id: Optional[str] = None + + type: Optional[Literal["line_break"]] = None + + +class DocumentDocumentDealChildQuoteChildText(BaseModel): + text: str + + id: Optional[str] = None + + marks: Optional[List[Literal["bold", "italic", "underline", "strikethrough", "code", "math"]]] = None + + type: Optional[Literal["text"]] = None + + +class DocumentDocumentDealChildQuoteChildToolCall(BaseModel): + """A tool/function call made by the assistant.""" + + tool_call_id: str + + tool_name: str + + id: Optional[str] = None + + args: Optional[Dict[str, object]] = None + + type: Optional[Literal["tool_call"]] = None + + +class DocumentDocumentDealChildQuoteChildToolResult(BaseModel): + """The result of a tool call.""" + + output: Union[str, Dict[str, object], List[object]] + + tool_call_id: str + + tool_name: str + + id: Optional[str] = None + + is_error: Optional[bool] = None + + type: Optional[Literal["tool_result"]] = None + + +class DocumentDocumentDealChildQuoteChildTraceMessage(BaseModel): + """A message in an agent trace (user message, assistant message, or thinking).""" + + text: str + + id: Optional[str] = None + + message_type: Optional[Literal["message", "thinking"]] = None + + role: Optional[Literal["user", "assistant"]] = None + + timestamp: Optional[datetime] = None + + type: Optional[Literal["trace_message"]] = None + + +DocumentDocumentDealChildQuoteChild: TypeAlias = Union[ + DocumentDocumentDealChildQuoteChildBlob, + DocumentDocumentDealChildQuoteChildCode, + DocumentDocumentDealChildQuoteChildComment, + DocumentDocumentDealChildQuoteChildDivider, + DocumentDocumentDealChildQuoteChildImage, + DocumentDocumentDealChildQuoteChildLink, + DocumentDocumentDealChildQuoteChildLineBreak, + DocumentDocumentDealChildQuoteChildText, + DocumentDocumentDealChildQuoteChildToolCall, + DocumentDocumentDealChildQuoteChildToolResult, + DocumentDocumentDealChildQuoteChildTraceMessage, + object, +] + + +class DocumentDocumentDealChildQuote(BaseModel): + id: Optional[str] = None + + children: Optional[List[DocumentDocumentDealChildQuoteChild]] = None + + text: Optional[str] = None + + type: Optional[Literal["quote"]] = None + + +class DocumentDocumentDealChildTable(BaseModel): + id: Optional[str] = None + + children: Optional[List[object]] = None + + has_header: Optional[bool] = None + """Whether the first row should be treated as a header""" + + text: Optional[str] = None + + type: Optional[Literal["table"]] = None + + +class DocumentDocumentDealChildTableCellChildBlob(BaseModel): + """Represents embedded binary data using data URI scheme. + + Format: data:[][;base64], + Example: data:text/html;base64,PGh0bWw+... + """ + + data: str + + mimetype: str + + id: Optional[str] = None + + type: Optional[Literal["blob"]] = None + + +class DocumentDocumentDealChildTableCellChildCode(BaseModel): + text: str + + id: Optional[str] = None + + language: Optional[str] = None + + type: Optional[Literal["code"]] = None + + +class DocumentDocumentDealChildTableCellChildComment(BaseModel): + text: str + + id: Optional[str] = None + + created_at: Optional[datetime] = None + + type: Optional[Literal["comment"]] = None + + +class DocumentDocumentDealChildTableCellChildDivider(BaseModel): + id: Optional[str] = None + + type: Optional[Literal["divider"]] = None + + +class DocumentDocumentDealChildTableCellChildImage(BaseModel): + src: str + + text: str + + id: Optional[str] = None + + type: Optional[Literal["image"]] = None + + +class DocumentDocumentDealChildTableCellChildLink(BaseModel): + text: str + + url: str + + id: Optional[str] = None + + type: Optional[Literal["link"]] = None + + +class DocumentDocumentDealChildTableCellChildLineBreak(BaseModel): + id: Optional[str] = None + + type: Optional[Literal["line_break"]] = None + + +class DocumentDocumentDealChildTableCellChildText(BaseModel): + text: str + + id: Optional[str] = None + + marks: Optional[List[Literal["bold", "italic", "underline", "strikethrough", "code", "math"]]] = None + + type: Optional[Literal["text"]] = None + + +class DocumentDocumentDealChildTableCellChildToolCall(BaseModel): + """A tool/function call made by the assistant.""" + + tool_call_id: str + + tool_name: str + + id: Optional[str] = None + + args: Optional[Dict[str, object]] = None + + type: Optional[Literal["tool_call"]] = None + + +class DocumentDocumentDealChildTableCellChildToolResult(BaseModel): + """The result of a tool call.""" + + output: Union[str, Dict[str, object], List[object]] + + tool_call_id: str + + tool_name: str + + id: Optional[str] = None + + is_error: Optional[bool] = None + + type: Optional[Literal["tool_result"]] = None + + +class DocumentDocumentDealChildTableCellChildTraceMessage(BaseModel): + """A message in an agent trace (user message, assistant message, or thinking).""" + + text: str + + id: Optional[str] = None + + message_type: Optional[Literal["message", "thinking"]] = None + + role: Optional[Literal["user", "assistant"]] = None + + timestamp: Optional[datetime] = None + + type: Optional[Literal["trace_message"]] = None + + +DocumentDocumentDealChildTableCellChild: TypeAlias = Union[ + DocumentDocumentDealChildTableCellChildBlob, + DocumentDocumentDealChildTableCellChildCode, + DocumentDocumentDealChildTableCellChildComment, + DocumentDocumentDealChildTableCellChildDivider, + DocumentDocumentDealChildTableCellChildImage, + DocumentDocumentDealChildTableCellChildLink, + DocumentDocumentDealChildTableCellChildLineBreak, + DocumentDocumentDealChildTableCellChildText, + DocumentDocumentDealChildTableCellChildToolCall, + DocumentDocumentDealChildTableCellChildToolResult, + DocumentDocumentDealChildTableCellChildTraceMessage, + object, +] + + +class DocumentDocumentDealChildTableCell(BaseModel): + id: Optional[str] = None + + align: Optional[Literal["left", "center", "right"]] = None + + children: Optional[List[DocumentDocumentDealChildTableCellChild]] = None + + text: Optional[str] = None + + type: Optional[Literal["table_cell"]] = None + + +class DocumentDocumentDealChildTableRow(BaseModel): + id: Optional[str] = None + + children: Optional[List[object]] = None + + text: Optional[str] = None + + type: Optional[Literal["table_row"]] = None + + +class DocumentDocumentDealChildText(BaseModel): + text: str + + id: Optional[str] = None + + marks: Optional[List[Literal["bold", "italic", "underline", "strikethrough", "code", "math"]]] = None + + type: Optional[Literal["text"]] = None + + +class DocumentDocumentDealChildToDoChildBlob(BaseModel): + """Represents embedded binary data using data URI scheme. + + Format: data:[][;base64], + Example: data:text/html;base64,PGh0bWw+... + """ + + data: str + + mimetype: str + + id: Optional[str] = None + + type: Optional[Literal["blob"]] = None + + +class DocumentDocumentDealChildToDoChildCode(BaseModel): + text: str + + id: Optional[str] = None + + language: Optional[str] = None + + type: Optional[Literal["code"]] = None + + +class DocumentDocumentDealChildToDoChildComment(BaseModel): + text: str + + id: Optional[str] = None + + created_at: Optional[datetime] = None + + type: Optional[Literal["comment"]] = None + + +class DocumentDocumentDealChildToDoChildDivider(BaseModel): + id: Optional[str] = None + + type: Optional[Literal["divider"]] = None + + +class DocumentDocumentDealChildToDoChildImage(BaseModel): + src: str + + text: str + + id: Optional[str] = None + + type: Optional[Literal["image"]] = None + + +class DocumentDocumentDealChildToDoChildLink(BaseModel): + text: str + + url: str + + id: Optional[str] = None + + type: Optional[Literal["link"]] = None + + +class DocumentDocumentDealChildToDoChildLineBreak(BaseModel): + id: Optional[str] = None + + type: Optional[Literal["line_break"]] = None + + +class DocumentDocumentDealChildToDoChildText(BaseModel): + text: str + + id: Optional[str] = None + + marks: Optional[List[Literal["bold", "italic", "underline", "strikethrough", "code", "math"]]] = None + + type: Optional[Literal["text"]] = None + + +class DocumentDocumentDealChildToDoChildToolCall(BaseModel): + """A tool/function call made by the assistant.""" + + tool_call_id: str + + tool_name: str + + id: Optional[str] = None + + args: Optional[Dict[str, object]] = None + + type: Optional[Literal["tool_call"]] = None + + +class DocumentDocumentDealChildToDoChildToolResult(BaseModel): + """The result of a tool call.""" + + output: Union[str, Dict[str, object], List[object]] + + tool_call_id: str + + tool_name: str + + id: Optional[str] = None + + is_error: Optional[bool] = None + + type: Optional[Literal["tool_result"]] = None + + +class DocumentDocumentDealChildToDoChildTraceMessage(BaseModel): + """A message in an agent trace (user message, assistant message, or thinking).""" + + text: str + + id: Optional[str] = None + + message_type: Optional[Literal["message", "thinking"]] = None + + role: Optional[Literal["user", "assistant"]] = None + + timestamp: Optional[datetime] = None + + type: Optional[Literal["trace_message"]] = None + + +DocumentDocumentDealChildToDoChild: TypeAlias = Union[ + DocumentDocumentDealChildToDoChildBlob, + DocumentDocumentDealChildToDoChildCode, + DocumentDocumentDealChildToDoChildComment, + DocumentDocumentDealChildToDoChildDivider, + DocumentDocumentDealChildToDoChildImage, + DocumentDocumentDealChildToDoChildLink, + DocumentDocumentDealChildToDoChildLineBreak, + DocumentDocumentDealChildToDoChildText, + DocumentDocumentDealChildToDoChildToolCall, + DocumentDocumentDealChildToDoChildToolResult, + DocumentDocumentDealChildToDoChildTraceMessage, + object, +] + + +class DocumentDocumentDealChildToDo(BaseModel): + id: Optional[str] = None + + checked: Optional[bool] = None + + children: Optional[List[DocumentDocumentDealChildToDoChild]] = None + + text: Optional[str] = None + + type: Optional[Literal["todo"]] = None + + +class DocumentDocumentDealChildToolCall(BaseModel): + """A tool/function call made by the assistant.""" + + tool_call_id: str + + tool_name: str + + id: Optional[str] = None + + args: Optional[Dict[str, object]] = None + + type: Optional[Literal["tool_call"]] = None + + +class DocumentDocumentDealChildToolResult(BaseModel): + """The result of a tool call.""" + + output: Union[str, Dict[str, object], List[object]] + + tool_call_id: str + + tool_name: str + + id: Optional[str] = None + + is_error: Optional[bool] = None + + type: Optional[Literal["tool_result"]] = None + + +class DocumentDocumentDealChildTraceMessage(BaseModel): + """A message in an agent trace (user message, assistant message, or thinking).""" + + text: str + + id: Optional[str] = None + + message_type: Optional[Literal["message", "thinking"]] = None + + role: Optional[Literal["user", "assistant"]] = None + + timestamp: Optional[datetime] = None + + type: Optional[Literal["trace_message"]] = None + + +class DocumentDocumentDealChildUtterance(BaseModel): + """A speaker-attributed segment of a transcript (ENG-2476/D10). + + "Utterance" is the standard name for this across transcription providers + (AssemblyAI, Deepgram, Rev). Timestamps are relative offsets in seconds — + provider-native; absolute times derive from `Transcript.started_at`. + """ + + text: str + + id: Optional[str] = None + + end: Optional[float] = None + + speaker: Optional[object] = None + + start: Optional[float] = None + + type: Optional[Literal["utterance"]] = None + + +DocumentDocumentDealChild: TypeAlias = Annotated[ + Union[ + DocumentDocumentDealChildBlob, + DocumentDocumentDealChildCallout, + DocumentDocumentDealChildChunk, + DocumentDocumentDealChildCode, + DocumentDocumentDealChildComment, + DocumentDocumentDealChildDivider, + DocumentDocumentDealChildEquation, + DocumentDocumentDealChildFootnote, + DocumentDocumentDealChildHeading, + DocumentDocumentDealChildImage, + DocumentDocumentDealChildLink, + DocumentDocumentDealChildLineBreak, + DocumentDocumentDealChildList, + DocumentDocumentDealChildListItem, + DocumentDocumentDealChildParagraph, + DocumentDocumentDealChildQuote, + DocumentDocumentDealChildTable, + DocumentDocumentDealChildTableCell, + DocumentDocumentDealChildTableRow, + DocumentDocumentDealChildText, + DocumentDocumentDealChildToDo, + DocumentDocumentDealChildToolCall, + DocumentDocumentDealChildToolResult, + DocumentDocumentDealChildTraceMessage, + DocumentDocumentDealChildUtterance, + ], + PropertyInfo(discriminator="type"), +] + + +class DocumentDocumentDeal(BaseModel): + """A CRM deal/opportunity record (ENG-2476/D10).""" + + id: Optional[str] = None + + amount: Optional[float] = None + + children: Optional[List[DocumentDocumentDealChild]] = None + + closed_at: Optional[datetime] = None + + company_ids: Optional[List[str]] = None + + contact_ids: Optional[List[str]] = None + + currency: Optional[str] = None + + deal_source: Optional[str] = None + + lost_reason: Optional[str] = None + + name: Optional[str] = None + + pipeline: Optional[str] = None + + probability: Optional[float] = None + + stage: Optional[str] = None + + tags: Optional[List[str]] = None + + text: Optional[str] = None + + type: Optional[Literal["deal"]] = None + + won_reason: Optional[str] = None + + +DocumentDocument: TypeAlias = Annotated[ + Union[ + DocumentDocumentDocument, + DocumentDocumentWebsite, + DocumentDocumentTask, + DocumentDocumentPerson, + DocumentDocumentMessage, + DocumentDocumentEvent, + DocumentDocumentFile, + DocumentDocumentConversation, + DocumentDocumentTrace, + DocumentDocumentTranscript, + DocumentDocumentCompany, + DocumentDocumentDeal, + ], + PropertyInfo(discriminator="type"), +] + + +class Document(BaseModel): + """ + A `DocumentResponse` plus the query-path fields a `ScoredDocument` carries + (ENG-2479): relevance score, matched highlights, and the concatenated + summary of those highlights. + """ + + document: DocumentDocument + """The full hyperdoc tree. + + Switch on `type` for the document frame and recurse `children` for the body — + see the `` renderer. + """ + + resource_id: str + + source: Literal[ + "reddit", + "notion", + "slack", + "google_calendar", + "google_mail", + "box", + "dropbox", + "github", + "google_drive", + "vault", + "web_crawler", + "trace", + "microsoft_teams", + "gmail_actions", + "granola", + "fathom", + "fireflies", + "linear", + "hubspot", + "salesforce", + "coda", + "lightfield", + ] + + type: str + """Hyperdoc document type discriminator (document, message, file, event, ...).""" + + collection: Optional[str] = None + """The document's collection, if any.""" + + document_date: Optional[datetime] = None + """The document's own date (e.g. email sent date, event date).""" + + highlights: Optional[List[object]] = None + """The matched chunks that made this document a hit, with per-chunk scores.""" + + ingested_at: Optional[datetime] = None + """When Hyperspell first indexed the document.""" + + last_modified_at: Optional[datetime] = None + """When the source document was last modified.""" + + metadata: Optional[Dict[str, object]] = None + """Filterable custom metadata attached to the document.""" + + score: Optional[float] = None + """Relevance of the document to the query.""" + + status: Optional[Literal["pending", "processing", "completed", "failed", "pending_review", "skipped"]] = None + """Indexing status of the document.""" + + summary: Optional[str] = None + """Concatenated text of the matched highlights.""" + + title: Optional[str] = None + """Human-readable document title.""" class ProvenanceEntity(BaseModel): @@ -88,11 +21042,15 @@ class Provenance(BaseModel): class QueryResult(BaseModel): - documents: List[Resource] - answer: Optional[str] = None """The answer to the query, if the request was set to answer.""" + documents: Optional[List[Document]] = None + """ + The matching documents, each carrying its hyperdoc tree plus query-path + score/highlights/summary (ENG-2479 Phase 4). + """ + errors: Optional[List[Dict[str, str]]] = None """Errors that occurred during the query. diff --git a/src/hyperspell/types/shared/resource.py b/src/hyperspell/types/shared/resource.py deleted file mode 100644 index b91d0142..00000000 --- a/src/hyperspell/types/shared/resource.py +++ /dev/null @@ -1,59 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - -from typing import List, Optional -from typing_extensions import Literal - -from .metadata import Metadata -from ..._models import BaseModel - -__all__ = ["Resource"] - - -class Resource(BaseModel): - resource_id: str - - source: Literal[ - "reddit", - "notion", - "slack", - "google_calendar", - "google_mail", - "box", - "dropbox", - "github", - "google_drive", - "vault", - "web_crawler", - "trace", - "microsoft_teams", - "gmail_actions", - "granola", - "fathom", - "fireflies", - "linear", - "hubspot", - "salesforce", - "coda", - "lightfield", - ] - - folder_ancestors: Optional[List[str]] = None - """ - Ordered list of provider folder IDs from immediate parent up to (but not - including) provider root. Used by resolve_sync_mode to walk the actual folder - tree without depending on intermediate policy records. Empty = resource lives at - provider root. - """ - - folder_id: Optional[str] = None - """Provider folder ID this resource belongs to""" - - metadata: Optional[Metadata] = None - - parent_folder_id: Optional[str] = None - """Parent folder ID for policy inheritance""" - - score: Optional[float] = None - """The relevance of the resource to the query""" - - title: Optional[str] = None diff --git a/tests/api_resources/test_memories.py b/tests/api_resources/test_memories.py index 1f8664e3..913474ba 100644 --- a/tests/api_resources/test_memories.py +++ b/tests/api_resources/test_memories.py @@ -10,15 +10,16 @@ from hyperspell import Hyperspell, AsyncHyperspell from tests.utils import assert_matches_type from hyperspell.types import ( - Memory, MemoryStatus, + MemoryGetResponse, + MemoryListResponse, MemoryDeleteResponse, MemoryStatusResponse, MemoryAddBulkResponse, ) from hyperspell._utils import parse_datetime from hyperspell.pagination import SyncCursorPage, AsyncCursorPage -from hyperspell.types.shared import Resource, QueryResult +from hyperspell.types.shared import QueryResult base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -84,7 +85,7 @@ def test_path_params_update(self, client: Hyperspell) -> None: @parametrize def test_method_list(self, client: Hyperspell) -> None: memory = client.memories.list() - assert_matches_type(SyncCursorPage[Resource], memory, path=["response"]) + assert_matches_type(SyncCursorPage[MemoryListResponse], memory, path=["response"]) @parametrize def test_method_list_with_all_params(self, client: Hyperspell) -> None: @@ -96,7 +97,7 @@ def test_method_list_with_all_params(self, client: Hyperspell) -> None: source="reddit", status="pending", ) - assert_matches_type(SyncCursorPage[Resource], memory, path=["response"]) + assert_matches_type(SyncCursorPage[MemoryListResponse], memory, path=["response"]) @parametrize def test_raw_response_list(self, client: Hyperspell) -> None: @@ -105,7 +106,7 @@ def test_raw_response_list(self, client: Hyperspell) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" memory = response.parse() - assert_matches_type(SyncCursorPage[Resource], memory, path=["response"]) + assert_matches_type(SyncCursorPage[MemoryListResponse], memory, path=["response"]) @parametrize def test_streaming_response_list(self, client: Hyperspell) -> None: @@ -114,7 +115,7 @@ def test_streaming_response_list(self, client: Hyperspell) -> None: assert response.http_request.headers.get("X-Stainless-Lang") == "python" memory = response.parse() - assert_matches_type(SyncCursorPage[Resource], memory, path=["response"]) + assert_matches_type(SyncCursorPage[MemoryListResponse], memory, path=["response"]) assert cast(Any, response.is_closed) is True @@ -244,7 +245,7 @@ def test_method_get(self, client: Hyperspell) -> None: resource_id="resource_id", source="reddit", ) - assert_matches_type(Memory, memory, path=["response"]) + assert_matches_type(MemoryGetResponse, memory, path=["response"]) @parametrize def test_raw_response_get(self, client: Hyperspell) -> None: @@ -256,7 +257,7 @@ def test_raw_response_get(self, client: Hyperspell) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" memory = response.parse() - assert_matches_type(Memory, memory, path=["response"]) + assert_matches_type(MemoryGetResponse, memory, path=["response"]) @parametrize def test_streaming_response_get(self, client: Hyperspell) -> None: @@ -268,7 +269,7 @@ def test_streaming_response_get(self, client: Hyperspell) -> None: assert response.http_request.headers.get("X-Stainless-Lang") == "python" memory = response.parse() - assert_matches_type(Memory, memory, path=["response"]) + assert_matches_type(MemoryGetResponse, memory, path=["response"]) assert cast(Any, response.is_closed) is True @@ -496,7 +497,7 @@ async def test_path_params_update(self, async_client: AsyncHyperspell) -> None: @parametrize async def test_method_list(self, async_client: AsyncHyperspell) -> None: memory = await async_client.memories.list() - assert_matches_type(AsyncCursorPage[Resource], memory, path=["response"]) + assert_matches_type(AsyncCursorPage[MemoryListResponse], memory, path=["response"]) @parametrize async def test_method_list_with_all_params(self, async_client: AsyncHyperspell) -> None: @@ -508,7 +509,7 @@ async def test_method_list_with_all_params(self, async_client: AsyncHyperspell) source="reddit", status="pending", ) - assert_matches_type(AsyncCursorPage[Resource], memory, path=["response"]) + assert_matches_type(AsyncCursorPage[MemoryListResponse], memory, path=["response"]) @parametrize async def test_raw_response_list(self, async_client: AsyncHyperspell) -> None: @@ -517,7 +518,7 @@ async def test_raw_response_list(self, async_client: AsyncHyperspell) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" memory = await response.parse() - assert_matches_type(AsyncCursorPage[Resource], memory, path=["response"]) + assert_matches_type(AsyncCursorPage[MemoryListResponse], memory, path=["response"]) @parametrize async def test_streaming_response_list(self, async_client: AsyncHyperspell) -> None: @@ -526,7 +527,7 @@ async def test_streaming_response_list(self, async_client: AsyncHyperspell) -> N assert response.http_request.headers.get("X-Stainless-Lang") == "python" memory = await response.parse() - assert_matches_type(AsyncCursorPage[Resource], memory, path=["response"]) + assert_matches_type(AsyncCursorPage[MemoryListResponse], memory, path=["response"]) assert cast(Any, response.is_closed) is True @@ -656,7 +657,7 @@ async def test_method_get(self, async_client: AsyncHyperspell) -> None: resource_id="resource_id", source="reddit", ) - assert_matches_type(Memory, memory, path=["response"]) + assert_matches_type(MemoryGetResponse, memory, path=["response"]) @parametrize async def test_raw_response_get(self, async_client: AsyncHyperspell) -> None: @@ -668,7 +669,7 @@ async def test_raw_response_get(self, async_client: AsyncHyperspell) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" memory = await response.parse() - assert_matches_type(Memory, memory, path=["response"]) + assert_matches_type(MemoryGetResponse, memory, path=["response"]) @parametrize async def test_streaming_response_get(self, async_client: AsyncHyperspell) -> None: @@ -680,7 +681,7 @@ async def test_streaming_response_get(self, async_client: AsyncHyperspell) -> No assert response.http_request.headers.get("X-Stainless-Lang") == "python" memory = await response.parse() - assert_matches_type(Memory, memory, path=["response"]) + assert_matches_type(MemoryGetResponse, memory, path=["response"]) assert cast(Any, response.is_closed) is True From 22cdd8677c2d30fad4ebc6fe97715fcf01628506 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Sat, 13 Jun 2026 21:31:21 +0000 Subject: [PATCH 55/56] feat(api): api update --- .stats.yml | 4 +- api.md | 2 +- src/hyperspell/types/__init__.py | 2 +- src/hyperspell/types/memory_get_response.py | 17701 +++++++++++++++++ src/hyperspell/types/memory_list_response.py | 17701 +++++++++++++++++ src/hyperspell/types/shared/__init__.py | 1 + src/hyperspell/types/shared/metadata.py | 43 + src/hyperspell/types/shared/query_result.py | 17701 +++++++++++++++++ 8 files changed, 53151 insertions(+), 4 deletions(-) create mode 100644 src/hyperspell/types/shared/metadata.py diff --git a/.stats.yml b/.stats.yml index 95cd499d..90a3f880 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 31 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/hyperspell/hyperspell-9538444341151dbbcc629fd9cd0b553097c397747b1285b9f8dfca6d81157d34.yml -openapi_spec_hash: 95f25b343410e9610f13fe645eb11a8d +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/hyperspell/hyperspell-f99fdfa6de4f48d8e2af1a0bfbb8a86c463459e092f6e479d977472a7e5d949c.yml +openapi_spec_hash: 05db69adafa2f99a63fb5287e78b5fad config_hash: e94cd277a0f8a93fc9dbadfd0a99ffcb diff --git a/api.md b/api.md index b85a5d04..22715753 100644 --- a/api.md +++ b/api.md @@ -1,7 +1,7 @@ # Shared Types ```python -from hyperspell.types import QueryResult +from hyperspell.types import Metadata, QueryResult ``` # Connections diff --git a/src/hyperspell/types/__init__.py b/src/hyperspell/types/__init__.py index e06c0ea0..462e7a3d 100644 --- a/src/hyperspell/types/__init__.py +++ b/src/hyperspell/types/__init__.py @@ -3,7 +3,7 @@ from __future__ import annotations from .token import Token as Token -from .shared import QueryResult as QueryResult +from .shared import Metadata as Metadata, QueryResult as QueryResult from .memory_status import MemoryStatus as MemoryStatus from .auth_me_response import AuthMeResponse as AuthMeResponse from .memory_add_params import MemoryAddParams as MemoryAddParams diff --git a/src/hyperspell/types/memory_get_response.py b/src/hyperspell/types/memory_get_response.py index 6b546f09..f1a79df0 100644 --- a/src/hyperspell/types/memory_get_response.py +++ b/src/hyperspell/types/memory_get_response.py @@ -6,6 +6,7 @@ from .._utils import PropertyInfo from .._models import BaseModel +from .shared.metadata import Metadata __all__ = [ "MemoryGetResponse", @@ -1621,6 +1622,18 @@ class DocumentDocumentChildBlob(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["blob"]] = None @@ -1637,6 +1650,18 @@ class DocumentDocumentChildCalloutChildBlob(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["blob"]] = None @@ -1647,6 +1672,18 @@ class DocumentDocumentChildCalloutChildCode(BaseModel): language: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["code"]] = None @@ -1657,12 +1694,36 @@ class DocumentDocumentChildCalloutChildComment(BaseModel): created_at: Optional[datetime] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["comment"]] = None class DocumentDocumentChildCalloutChildDivider(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["divider"]] = None @@ -1673,6 +1734,18 @@ class DocumentDocumentChildCalloutChildImage(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["image"]] = None @@ -1683,12 +1756,36 @@ class DocumentDocumentChildCalloutChildLink(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["link"]] = None class DocumentDocumentChildCalloutChildLineBreak(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["line_break"]] = None @@ -1699,6 +1796,18 @@ class DocumentDocumentChildCalloutChildText(BaseModel): marks: Optional[List[Literal["bold", "italic", "underline", "strikethrough", "code", "math"]]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["text"]] = None @@ -1713,6 +1822,18 @@ class DocumentDocumentChildCalloutChildToolCall(BaseModel): args: Optional[Dict[str, object]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["tool_call"]] = None @@ -1729,6 +1850,18 @@ class DocumentDocumentChildCalloutChildToolResult(BaseModel): is_error: Optional[bool] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["tool_result"]] = None @@ -1741,6 +1874,18 @@ class DocumentDocumentChildCalloutChildTraceMessage(BaseModel): message_type: Optional[Literal["message", "thinking"]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + role: Optional[Literal["user", "assistant"]] = None timestamp: Optional[datetime] = None @@ -1769,6 +1914,18 @@ class DocumentDocumentChildCallout(BaseModel): children: Optional[List[DocumentDocumentChildCalloutChild]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + text: Optional[str] = None title: Optional[str] = None @@ -1789,6 +1946,18 @@ class DocumentDocumentChildChunkChildBlob(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["blob"]] = None @@ -1799,6 +1968,18 @@ class DocumentDocumentChildChunkChildCode(BaseModel): language: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["code"]] = None @@ -1809,12 +1990,36 @@ class DocumentDocumentChildChunkChildComment(BaseModel): created_at: Optional[datetime] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["comment"]] = None class DocumentDocumentChildChunkChildDivider(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["divider"]] = None @@ -1825,6 +2030,18 @@ class DocumentDocumentChildChunkChildImage(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["image"]] = None @@ -1835,12 +2052,36 @@ class DocumentDocumentChildChunkChildLink(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["link"]] = None class DocumentDocumentChildChunkChildLineBreak(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["line_break"]] = None @@ -1851,6 +2092,18 @@ class DocumentDocumentChildChunkChildText(BaseModel): marks: Optional[List[Literal["bold", "italic", "underline", "strikethrough", "code", "math"]]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["text"]] = None @@ -1865,6 +2118,18 @@ class DocumentDocumentChildChunkChildToolCall(BaseModel): args: Optional[Dict[str, object]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["tool_call"]] = None @@ -1881,6 +2146,18 @@ class DocumentDocumentChildChunkChildToolResult(BaseModel): is_error: Optional[bool] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["tool_result"]] = None @@ -1893,6 +2170,18 @@ class DocumentDocumentChildChunkChildTraceMessage(BaseModel): message_type: Optional[Literal["message", "thinking"]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + role: Optional[Literal["user", "assistant"]] = None timestamp: Optional[datetime] = None @@ -1921,6 +2210,18 @@ class DocumentDocumentChildChunk(BaseModel): children: Optional[List[DocumentDocumentChildChunkChild]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + text: Optional[str] = None type: Optional[Literal["chunk"]] = None @@ -1933,6 +2234,18 @@ class DocumentDocumentChildCode(BaseModel): language: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["code"]] = None @@ -1943,12 +2256,36 @@ class DocumentDocumentChildComment(BaseModel): created_at: Optional[datetime] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["comment"]] = None class DocumentDocumentChildDivider(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["divider"]] = None @@ -1965,6 +2302,18 @@ class DocumentDocumentChildEquationChildBlob(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["blob"]] = None @@ -1975,6 +2324,18 @@ class DocumentDocumentChildEquationChildCode(BaseModel): language: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["code"]] = None @@ -1985,12 +2346,36 @@ class DocumentDocumentChildEquationChildComment(BaseModel): created_at: Optional[datetime] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["comment"]] = None class DocumentDocumentChildEquationChildDivider(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["divider"]] = None @@ -2001,6 +2386,18 @@ class DocumentDocumentChildEquationChildImage(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["image"]] = None @@ -2011,12 +2408,36 @@ class DocumentDocumentChildEquationChildLink(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["link"]] = None class DocumentDocumentChildEquationChildLineBreak(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["line_break"]] = None @@ -2027,6 +2448,18 @@ class DocumentDocumentChildEquationChildText(BaseModel): marks: Optional[List[Literal["bold", "italic", "underline", "strikethrough", "code", "math"]]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["text"]] = None @@ -2041,6 +2474,18 @@ class DocumentDocumentChildEquationChildToolCall(BaseModel): args: Optional[Dict[str, object]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["tool_call"]] = None @@ -2057,6 +2502,18 @@ class DocumentDocumentChildEquationChildToolResult(BaseModel): is_error: Optional[bool] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["tool_result"]] = None @@ -2069,6 +2526,18 @@ class DocumentDocumentChildEquationChildTraceMessage(BaseModel): message_type: Optional[Literal["message", "thinking"]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + role: Optional[Literal["user", "assistant"]] = None timestamp: Optional[datetime] = None @@ -2097,6 +2566,18 @@ class DocumentDocumentChildEquation(BaseModel): children: Optional[List[DocumentDocumentChildEquationChild]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + text: Optional[str] = None type: Optional[Literal["equation"]] = None @@ -2115,6 +2596,18 @@ class DocumentDocumentChildFootnoteChildBlob(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["blob"]] = None @@ -2125,6 +2618,18 @@ class DocumentDocumentChildFootnoteChildCode(BaseModel): language: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["code"]] = None @@ -2135,12 +2640,36 @@ class DocumentDocumentChildFootnoteChildComment(BaseModel): created_at: Optional[datetime] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["comment"]] = None class DocumentDocumentChildFootnoteChildDivider(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["divider"]] = None @@ -2151,6 +2680,18 @@ class DocumentDocumentChildFootnoteChildImage(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["image"]] = None @@ -2161,12 +2702,36 @@ class DocumentDocumentChildFootnoteChildLink(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["link"]] = None class DocumentDocumentChildFootnoteChildLineBreak(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["line_break"]] = None @@ -2177,6 +2742,18 @@ class DocumentDocumentChildFootnoteChildText(BaseModel): marks: Optional[List[Literal["bold", "italic", "underline", "strikethrough", "code", "math"]]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["text"]] = None @@ -2191,6 +2768,18 @@ class DocumentDocumentChildFootnoteChildToolCall(BaseModel): args: Optional[Dict[str, object]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["tool_call"]] = None @@ -2207,6 +2796,18 @@ class DocumentDocumentChildFootnoteChildToolResult(BaseModel): is_error: Optional[bool] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["tool_result"]] = None @@ -2219,6 +2820,18 @@ class DocumentDocumentChildFootnoteChildTraceMessage(BaseModel): message_type: Optional[Literal["message", "thinking"]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + role: Optional[Literal["user", "assistant"]] = None timestamp: Optional[datetime] = None @@ -2247,6 +2860,18 @@ class DocumentDocumentChildFootnote(BaseModel): children: Optional[List[DocumentDocumentChildFootnoteChild]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + text: Optional[str] = None type: Optional[Literal["footnote"]] = None @@ -2265,6 +2890,18 @@ class DocumentDocumentChildHeadingChildBlob(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["blob"]] = None @@ -2275,6 +2912,18 @@ class DocumentDocumentChildHeadingChildCode(BaseModel): language: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["code"]] = None @@ -2285,12 +2934,36 @@ class DocumentDocumentChildHeadingChildComment(BaseModel): created_at: Optional[datetime] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["comment"]] = None class DocumentDocumentChildHeadingChildDivider(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["divider"]] = None @@ -2301,6 +2974,18 @@ class DocumentDocumentChildHeadingChildImage(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["image"]] = None @@ -2311,12 +2996,36 @@ class DocumentDocumentChildHeadingChildLink(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["link"]] = None class DocumentDocumentChildHeadingChildLineBreak(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["line_break"]] = None @@ -2327,6 +3036,18 @@ class DocumentDocumentChildHeadingChildText(BaseModel): marks: Optional[List[Literal["bold", "italic", "underline", "strikethrough", "code", "math"]]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["text"]] = None @@ -2341,6 +3062,18 @@ class DocumentDocumentChildHeadingChildToolCall(BaseModel): args: Optional[Dict[str, object]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["tool_call"]] = None @@ -2357,6 +3090,18 @@ class DocumentDocumentChildHeadingChildToolResult(BaseModel): is_error: Optional[bool] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["tool_result"]] = None @@ -2369,6 +3114,18 @@ class DocumentDocumentChildHeadingChildTraceMessage(BaseModel): message_type: Optional[Literal["message", "thinking"]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + role: Optional[Literal["user", "assistant"]] = None timestamp: Optional[datetime] = None @@ -2399,6 +3156,18 @@ class DocumentDocumentChildHeading(BaseModel): children: Optional[List[DocumentDocumentChildHeadingChild]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + text: Optional[str] = None type: Optional[Literal["heading"]] = None @@ -2411,6 +3180,18 @@ class DocumentDocumentChildImage(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["image"]] = None @@ -2421,12 +3202,36 @@ class DocumentDocumentChildLink(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["link"]] = None class DocumentDocumentChildLineBreak(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["line_break"]] = None @@ -2435,6 +3240,18 @@ class DocumentDocumentChildList(BaseModel): children: Optional[List[object]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + ordered: Optional[bool] = None text: Optional[str] = None @@ -2455,6 +3272,18 @@ class DocumentDocumentChildListItemChildBlob(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["blob"]] = None @@ -2465,6 +3294,18 @@ class DocumentDocumentChildListItemChildCode(BaseModel): language: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["code"]] = None @@ -2475,12 +3316,36 @@ class DocumentDocumentChildListItemChildComment(BaseModel): created_at: Optional[datetime] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["comment"]] = None class DocumentDocumentChildListItemChildDivider(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["divider"]] = None @@ -2491,6 +3356,18 @@ class DocumentDocumentChildListItemChildImage(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["image"]] = None @@ -2501,12 +3378,36 @@ class DocumentDocumentChildListItemChildLink(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["link"]] = None class DocumentDocumentChildListItemChildLineBreak(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["line_break"]] = None @@ -2517,6 +3418,18 @@ class DocumentDocumentChildListItemChildText(BaseModel): marks: Optional[List[Literal["bold", "italic", "underline", "strikethrough", "code", "math"]]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["text"]] = None @@ -2531,6 +3444,18 @@ class DocumentDocumentChildListItemChildToolCall(BaseModel): args: Optional[Dict[str, object]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["tool_call"]] = None @@ -2547,6 +3472,18 @@ class DocumentDocumentChildListItemChildToolResult(BaseModel): is_error: Optional[bool] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["tool_result"]] = None @@ -2559,6 +3496,18 @@ class DocumentDocumentChildListItemChildTraceMessage(BaseModel): message_type: Optional[Literal["message", "thinking"]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + role: Optional[Literal["user", "assistant"]] = None timestamp: Optional[datetime] = None @@ -2587,6 +3536,18 @@ class DocumentDocumentChildListItem(BaseModel): children: Optional[List[DocumentDocumentChildListItemChild]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + text: Optional[str] = None type: Optional[Literal["list_item"]] = None @@ -2605,6 +3566,18 @@ class DocumentDocumentChildParagraphChildBlob(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["blob"]] = None @@ -2615,6 +3588,18 @@ class DocumentDocumentChildParagraphChildCode(BaseModel): language: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["code"]] = None @@ -2625,12 +3610,36 @@ class DocumentDocumentChildParagraphChildComment(BaseModel): created_at: Optional[datetime] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["comment"]] = None class DocumentDocumentChildParagraphChildDivider(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["divider"]] = None @@ -2641,6 +3650,18 @@ class DocumentDocumentChildParagraphChildImage(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["image"]] = None @@ -2651,12 +3672,36 @@ class DocumentDocumentChildParagraphChildLink(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["link"]] = None class DocumentDocumentChildParagraphChildLineBreak(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["line_break"]] = None @@ -2667,6 +3712,18 @@ class DocumentDocumentChildParagraphChildText(BaseModel): marks: Optional[List[Literal["bold", "italic", "underline", "strikethrough", "code", "math"]]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["text"]] = None @@ -2681,6 +3738,18 @@ class DocumentDocumentChildParagraphChildToolCall(BaseModel): args: Optional[Dict[str, object]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["tool_call"]] = None @@ -2697,6 +3766,18 @@ class DocumentDocumentChildParagraphChildToolResult(BaseModel): is_error: Optional[bool] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["tool_result"]] = None @@ -2709,6 +3790,18 @@ class DocumentDocumentChildParagraphChildTraceMessage(BaseModel): message_type: Optional[Literal["message", "thinking"]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + role: Optional[Literal["user", "assistant"]] = None timestamp: Optional[datetime] = None @@ -2737,6 +3830,18 @@ class DocumentDocumentChildParagraph(BaseModel): children: Optional[List[DocumentDocumentChildParagraphChild]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + text: Optional[str] = None type: Optional[Literal["paragraph"]] = None @@ -2755,6 +3860,18 @@ class DocumentDocumentChildQuoteChildBlob(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["blob"]] = None @@ -2765,6 +3882,18 @@ class DocumentDocumentChildQuoteChildCode(BaseModel): language: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["code"]] = None @@ -2775,12 +3904,36 @@ class DocumentDocumentChildQuoteChildComment(BaseModel): created_at: Optional[datetime] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["comment"]] = None class DocumentDocumentChildQuoteChildDivider(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["divider"]] = None @@ -2791,6 +3944,18 @@ class DocumentDocumentChildQuoteChildImage(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["image"]] = None @@ -2801,12 +3966,36 @@ class DocumentDocumentChildQuoteChildLink(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["link"]] = None class DocumentDocumentChildQuoteChildLineBreak(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["line_break"]] = None @@ -2817,6 +4006,18 @@ class DocumentDocumentChildQuoteChildText(BaseModel): marks: Optional[List[Literal["bold", "italic", "underline", "strikethrough", "code", "math"]]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["text"]] = None @@ -2831,6 +4032,18 @@ class DocumentDocumentChildQuoteChildToolCall(BaseModel): args: Optional[Dict[str, object]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["tool_call"]] = None @@ -2847,6 +4060,18 @@ class DocumentDocumentChildQuoteChildToolResult(BaseModel): is_error: Optional[bool] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["tool_result"]] = None @@ -2859,6 +4084,18 @@ class DocumentDocumentChildQuoteChildTraceMessage(BaseModel): message_type: Optional[Literal["message", "thinking"]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + role: Optional[Literal["user", "assistant"]] = None timestamp: Optional[datetime] = None @@ -2887,6 +4124,18 @@ class DocumentDocumentChildQuote(BaseModel): children: Optional[List[DocumentDocumentChildQuoteChild]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + text: Optional[str] = None type: Optional[Literal["quote"]] = None @@ -2900,6 +4149,18 @@ class DocumentDocumentChildTable(BaseModel): has_header: Optional[bool] = None """Whether the first row should be treated as a header""" + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + text: Optional[str] = None type: Optional[Literal["table"]] = None @@ -2918,6 +4179,18 @@ class DocumentDocumentChildTableCellChildBlob(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["blob"]] = None @@ -2928,6 +4201,18 @@ class DocumentDocumentChildTableCellChildCode(BaseModel): language: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["code"]] = None @@ -2938,12 +4223,36 @@ class DocumentDocumentChildTableCellChildComment(BaseModel): created_at: Optional[datetime] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["comment"]] = None class DocumentDocumentChildTableCellChildDivider(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["divider"]] = None @@ -2954,6 +4263,18 @@ class DocumentDocumentChildTableCellChildImage(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["image"]] = None @@ -2964,12 +4285,36 @@ class DocumentDocumentChildTableCellChildLink(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["link"]] = None class DocumentDocumentChildTableCellChildLineBreak(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["line_break"]] = None @@ -2980,6 +4325,18 @@ class DocumentDocumentChildTableCellChildText(BaseModel): marks: Optional[List[Literal["bold", "italic", "underline", "strikethrough", "code", "math"]]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["text"]] = None @@ -2994,6 +4351,18 @@ class DocumentDocumentChildTableCellChildToolCall(BaseModel): args: Optional[Dict[str, object]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["tool_call"]] = None @@ -3010,6 +4379,18 @@ class DocumentDocumentChildTableCellChildToolResult(BaseModel): is_error: Optional[bool] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["tool_result"]] = None @@ -3022,6 +4403,18 @@ class DocumentDocumentChildTableCellChildTraceMessage(BaseModel): message_type: Optional[Literal["message", "thinking"]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + role: Optional[Literal["user", "assistant"]] = None timestamp: Optional[datetime] = None @@ -3052,6 +4445,18 @@ class DocumentDocumentChildTableCell(BaseModel): children: Optional[List[DocumentDocumentChildTableCellChild]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + text: Optional[str] = None type: Optional[Literal["table_cell"]] = None @@ -3062,6 +4467,18 @@ class DocumentDocumentChildTableRow(BaseModel): children: Optional[List[object]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + text: Optional[str] = None type: Optional[Literal["table_row"]] = None @@ -3074,6 +4491,18 @@ class DocumentDocumentChildText(BaseModel): marks: Optional[List[Literal["bold", "italic", "underline", "strikethrough", "code", "math"]]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["text"]] = None @@ -3090,6 +4519,18 @@ class DocumentDocumentChildToDoChildBlob(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["blob"]] = None @@ -3100,6 +4541,18 @@ class DocumentDocumentChildToDoChildCode(BaseModel): language: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["code"]] = None @@ -3110,12 +4563,36 @@ class DocumentDocumentChildToDoChildComment(BaseModel): created_at: Optional[datetime] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["comment"]] = None class DocumentDocumentChildToDoChildDivider(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["divider"]] = None @@ -3126,6 +4603,18 @@ class DocumentDocumentChildToDoChildImage(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["image"]] = None @@ -3136,12 +4625,36 @@ class DocumentDocumentChildToDoChildLink(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["link"]] = None class DocumentDocumentChildToDoChildLineBreak(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["line_break"]] = None @@ -3152,6 +4665,18 @@ class DocumentDocumentChildToDoChildText(BaseModel): marks: Optional[List[Literal["bold", "italic", "underline", "strikethrough", "code", "math"]]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["text"]] = None @@ -3166,6 +4691,18 @@ class DocumentDocumentChildToDoChildToolCall(BaseModel): args: Optional[Dict[str, object]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["tool_call"]] = None @@ -3182,6 +4719,18 @@ class DocumentDocumentChildToDoChildToolResult(BaseModel): is_error: Optional[bool] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["tool_result"]] = None @@ -3194,6 +4743,18 @@ class DocumentDocumentChildToDoChildTraceMessage(BaseModel): message_type: Optional[Literal["message", "thinking"]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + role: Optional[Literal["user", "assistant"]] = None timestamp: Optional[datetime] = None @@ -3224,6 +4785,18 @@ class DocumentDocumentChildToDo(BaseModel): children: Optional[List[DocumentDocumentChildToDoChild]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + text: Optional[str] = None type: Optional[Literal["todo"]] = None @@ -3240,6 +4813,18 @@ class DocumentDocumentChildToolCall(BaseModel): args: Optional[Dict[str, object]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["tool_call"]] = None @@ -3256,6 +4841,18 @@ class DocumentDocumentChildToolResult(BaseModel): is_error: Optional[bool] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["tool_result"]] = None @@ -3268,6 +4865,18 @@ class DocumentDocumentChildTraceMessage(BaseModel): message_type: Optional[Literal["message", "thinking"]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + role: Optional[Literal["user", "assistant"]] = None timestamp: Optional[datetime] = None @@ -3289,6 +4898,18 @@ class DocumentDocumentChildUtterance(BaseModel): end: Optional[float] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + speaker: Optional[object] = None start: Optional[float] = None @@ -3333,6 +4954,18 @@ class DocumentDocument(BaseModel): children: Optional[List[DocumentDocumentChild]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + text: Optional[str] = None title: Optional[str] = None @@ -3353,6 +4986,18 @@ class DocumentWebsiteChildBlob(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["blob"]] = None @@ -3369,6 +5014,18 @@ class DocumentWebsiteChildCalloutChildBlob(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["blob"]] = None @@ -3379,6 +5036,18 @@ class DocumentWebsiteChildCalloutChildCode(BaseModel): language: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["code"]] = None @@ -3389,12 +5058,36 @@ class DocumentWebsiteChildCalloutChildComment(BaseModel): created_at: Optional[datetime] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["comment"]] = None class DocumentWebsiteChildCalloutChildDivider(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["divider"]] = None @@ -3405,6 +5098,18 @@ class DocumentWebsiteChildCalloutChildImage(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["image"]] = None @@ -3415,12 +5120,36 @@ class DocumentWebsiteChildCalloutChildLink(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["link"]] = None class DocumentWebsiteChildCalloutChildLineBreak(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["line_break"]] = None @@ -3431,6 +5160,18 @@ class DocumentWebsiteChildCalloutChildText(BaseModel): marks: Optional[List[Literal["bold", "italic", "underline", "strikethrough", "code", "math"]]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["text"]] = None @@ -3445,6 +5186,18 @@ class DocumentWebsiteChildCalloutChildToolCall(BaseModel): args: Optional[Dict[str, object]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["tool_call"]] = None @@ -3461,6 +5214,18 @@ class DocumentWebsiteChildCalloutChildToolResult(BaseModel): is_error: Optional[bool] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["tool_result"]] = None @@ -3473,6 +5238,18 @@ class DocumentWebsiteChildCalloutChildTraceMessage(BaseModel): message_type: Optional[Literal["message", "thinking"]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + role: Optional[Literal["user", "assistant"]] = None timestamp: Optional[datetime] = None @@ -3501,6 +5278,18 @@ class DocumentWebsiteChildCallout(BaseModel): children: Optional[List[DocumentWebsiteChildCalloutChild]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + text: Optional[str] = None title: Optional[str] = None @@ -3521,6 +5310,18 @@ class DocumentWebsiteChildChunkChildBlob(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["blob"]] = None @@ -3531,6 +5332,18 @@ class DocumentWebsiteChildChunkChildCode(BaseModel): language: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["code"]] = None @@ -3541,12 +5354,36 @@ class DocumentWebsiteChildChunkChildComment(BaseModel): created_at: Optional[datetime] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["comment"]] = None class DocumentWebsiteChildChunkChildDivider(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["divider"]] = None @@ -3557,6 +5394,18 @@ class DocumentWebsiteChildChunkChildImage(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["image"]] = None @@ -3567,12 +5416,36 @@ class DocumentWebsiteChildChunkChildLink(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["link"]] = None class DocumentWebsiteChildChunkChildLineBreak(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["line_break"]] = None @@ -3583,6 +5456,18 @@ class DocumentWebsiteChildChunkChildText(BaseModel): marks: Optional[List[Literal["bold", "italic", "underline", "strikethrough", "code", "math"]]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["text"]] = None @@ -3597,6 +5482,18 @@ class DocumentWebsiteChildChunkChildToolCall(BaseModel): args: Optional[Dict[str, object]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["tool_call"]] = None @@ -3613,6 +5510,18 @@ class DocumentWebsiteChildChunkChildToolResult(BaseModel): is_error: Optional[bool] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["tool_result"]] = None @@ -3625,6 +5534,18 @@ class DocumentWebsiteChildChunkChildTraceMessage(BaseModel): message_type: Optional[Literal["message", "thinking"]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + role: Optional[Literal["user", "assistant"]] = None timestamp: Optional[datetime] = None @@ -3653,6 +5574,18 @@ class DocumentWebsiteChildChunk(BaseModel): children: Optional[List[DocumentWebsiteChildChunkChild]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + text: Optional[str] = None type: Optional[Literal["chunk"]] = None @@ -3665,6 +5598,18 @@ class DocumentWebsiteChildCode(BaseModel): language: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["code"]] = None @@ -3675,12 +5620,36 @@ class DocumentWebsiteChildComment(BaseModel): created_at: Optional[datetime] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["comment"]] = None class DocumentWebsiteChildDivider(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["divider"]] = None @@ -3697,6 +5666,18 @@ class DocumentWebsiteChildEquationChildBlob(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["blob"]] = None @@ -3707,6 +5688,18 @@ class DocumentWebsiteChildEquationChildCode(BaseModel): language: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["code"]] = None @@ -3717,12 +5710,36 @@ class DocumentWebsiteChildEquationChildComment(BaseModel): created_at: Optional[datetime] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["comment"]] = None class DocumentWebsiteChildEquationChildDivider(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["divider"]] = None @@ -3733,6 +5750,18 @@ class DocumentWebsiteChildEquationChildImage(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["image"]] = None @@ -3743,12 +5772,36 @@ class DocumentWebsiteChildEquationChildLink(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["link"]] = None class DocumentWebsiteChildEquationChildLineBreak(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["line_break"]] = None @@ -3759,6 +5812,18 @@ class DocumentWebsiteChildEquationChildText(BaseModel): marks: Optional[List[Literal["bold", "italic", "underline", "strikethrough", "code", "math"]]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["text"]] = None @@ -3773,6 +5838,18 @@ class DocumentWebsiteChildEquationChildToolCall(BaseModel): args: Optional[Dict[str, object]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["tool_call"]] = None @@ -3789,6 +5866,18 @@ class DocumentWebsiteChildEquationChildToolResult(BaseModel): is_error: Optional[bool] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["tool_result"]] = None @@ -3801,6 +5890,18 @@ class DocumentWebsiteChildEquationChildTraceMessage(BaseModel): message_type: Optional[Literal["message", "thinking"]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + role: Optional[Literal["user", "assistant"]] = None timestamp: Optional[datetime] = None @@ -3829,6 +5930,18 @@ class DocumentWebsiteChildEquation(BaseModel): children: Optional[List[DocumentWebsiteChildEquationChild]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + text: Optional[str] = None type: Optional[Literal["equation"]] = None @@ -3847,6 +5960,18 @@ class DocumentWebsiteChildFootnoteChildBlob(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["blob"]] = None @@ -3857,6 +5982,18 @@ class DocumentWebsiteChildFootnoteChildCode(BaseModel): language: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["code"]] = None @@ -3867,12 +6004,36 @@ class DocumentWebsiteChildFootnoteChildComment(BaseModel): created_at: Optional[datetime] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["comment"]] = None class DocumentWebsiteChildFootnoteChildDivider(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["divider"]] = None @@ -3883,6 +6044,18 @@ class DocumentWebsiteChildFootnoteChildImage(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["image"]] = None @@ -3893,12 +6066,36 @@ class DocumentWebsiteChildFootnoteChildLink(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["link"]] = None class DocumentWebsiteChildFootnoteChildLineBreak(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["line_break"]] = None @@ -3909,6 +6106,18 @@ class DocumentWebsiteChildFootnoteChildText(BaseModel): marks: Optional[List[Literal["bold", "italic", "underline", "strikethrough", "code", "math"]]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["text"]] = None @@ -3923,6 +6132,18 @@ class DocumentWebsiteChildFootnoteChildToolCall(BaseModel): args: Optional[Dict[str, object]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["tool_call"]] = None @@ -3939,6 +6160,18 @@ class DocumentWebsiteChildFootnoteChildToolResult(BaseModel): is_error: Optional[bool] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["tool_result"]] = None @@ -3951,6 +6184,18 @@ class DocumentWebsiteChildFootnoteChildTraceMessage(BaseModel): message_type: Optional[Literal["message", "thinking"]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + role: Optional[Literal["user", "assistant"]] = None timestamp: Optional[datetime] = None @@ -3979,6 +6224,18 @@ class DocumentWebsiteChildFootnote(BaseModel): children: Optional[List[DocumentWebsiteChildFootnoteChild]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + text: Optional[str] = None type: Optional[Literal["footnote"]] = None @@ -3997,6 +6254,18 @@ class DocumentWebsiteChildHeadingChildBlob(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["blob"]] = None @@ -4007,6 +6276,18 @@ class DocumentWebsiteChildHeadingChildCode(BaseModel): language: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["code"]] = None @@ -4017,12 +6298,36 @@ class DocumentWebsiteChildHeadingChildComment(BaseModel): created_at: Optional[datetime] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["comment"]] = None class DocumentWebsiteChildHeadingChildDivider(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["divider"]] = None @@ -4033,6 +6338,18 @@ class DocumentWebsiteChildHeadingChildImage(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["image"]] = None @@ -4043,12 +6360,36 @@ class DocumentWebsiteChildHeadingChildLink(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["link"]] = None class DocumentWebsiteChildHeadingChildLineBreak(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["line_break"]] = None @@ -4059,6 +6400,18 @@ class DocumentWebsiteChildHeadingChildText(BaseModel): marks: Optional[List[Literal["bold", "italic", "underline", "strikethrough", "code", "math"]]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["text"]] = None @@ -4073,6 +6426,18 @@ class DocumentWebsiteChildHeadingChildToolCall(BaseModel): args: Optional[Dict[str, object]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["tool_call"]] = None @@ -4089,6 +6454,18 @@ class DocumentWebsiteChildHeadingChildToolResult(BaseModel): is_error: Optional[bool] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["tool_result"]] = None @@ -4101,6 +6478,18 @@ class DocumentWebsiteChildHeadingChildTraceMessage(BaseModel): message_type: Optional[Literal["message", "thinking"]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + role: Optional[Literal["user", "assistant"]] = None timestamp: Optional[datetime] = None @@ -4131,6 +6520,18 @@ class DocumentWebsiteChildHeading(BaseModel): children: Optional[List[DocumentWebsiteChildHeadingChild]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + text: Optional[str] = None type: Optional[Literal["heading"]] = None @@ -4143,6 +6544,18 @@ class DocumentWebsiteChildImage(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["image"]] = None @@ -4153,12 +6566,36 @@ class DocumentWebsiteChildLink(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["link"]] = None class DocumentWebsiteChildLineBreak(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["line_break"]] = None @@ -4167,6 +6604,18 @@ class DocumentWebsiteChildList(BaseModel): children: Optional[List[object]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + ordered: Optional[bool] = None text: Optional[str] = None @@ -4187,6 +6636,18 @@ class DocumentWebsiteChildListItemChildBlob(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["blob"]] = None @@ -4197,6 +6658,18 @@ class DocumentWebsiteChildListItemChildCode(BaseModel): language: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["code"]] = None @@ -4207,12 +6680,36 @@ class DocumentWebsiteChildListItemChildComment(BaseModel): created_at: Optional[datetime] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["comment"]] = None class DocumentWebsiteChildListItemChildDivider(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["divider"]] = None @@ -4223,6 +6720,18 @@ class DocumentWebsiteChildListItemChildImage(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["image"]] = None @@ -4233,12 +6742,36 @@ class DocumentWebsiteChildListItemChildLink(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["link"]] = None class DocumentWebsiteChildListItemChildLineBreak(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["line_break"]] = None @@ -4249,6 +6782,18 @@ class DocumentWebsiteChildListItemChildText(BaseModel): marks: Optional[List[Literal["bold", "italic", "underline", "strikethrough", "code", "math"]]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["text"]] = None @@ -4263,6 +6808,18 @@ class DocumentWebsiteChildListItemChildToolCall(BaseModel): args: Optional[Dict[str, object]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["tool_call"]] = None @@ -4279,6 +6836,18 @@ class DocumentWebsiteChildListItemChildToolResult(BaseModel): is_error: Optional[bool] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["tool_result"]] = None @@ -4291,6 +6860,18 @@ class DocumentWebsiteChildListItemChildTraceMessage(BaseModel): message_type: Optional[Literal["message", "thinking"]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + role: Optional[Literal["user", "assistant"]] = None timestamp: Optional[datetime] = None @@ -4319,6 +6900,18 @@ class DocumentWebsiteChildListItem(BaseModel): children: Optional[List[DocumentWebsiteChildListItemChild]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + text: Optional[str] = None type: Optional[Literal["list_item"]] = None @@ -4337,6 +6930,18 @@ class DocumentWebsiteChildParagraphChildBlob(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["blob"]] = None @@ -4347,6 +6952,18 @@ class DocumentWebsiteChildParagraphChildCode(BaseModel): language: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["code"]] = None @@ -4357,12 +6974,36 @@ class DocumentWebsiteChildParagraphChildComment(BaseModel): created_at: Optional[datetime] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["comment"]] = None class DocumentWebsiteChildParagraphChildDivider(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["divider"]] = None @@ -4373,6 +7014,18 @@ class DocumentWebsiteChildParagraphChildImage(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["image"]] = None @@ -4383,12 +7036,36 @@ class DocumentWebsiteChildParagraphChildLink(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["link"]] = None class DocumentWebsiteChildParagraphChildLineBreak(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["line_break"]] = None @@ -4399,6 +7076,18 @@ class DocumentWebsiteChildParagraphChildText(BaseModel): marks: Optional[List[Literal["bold", "italic", "underline", "strikethrough", "code", "math"]]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["text"]] = None @@ -4413,6 +7102,18 @@ class DocumentWebsiteChildParagraphChildToolCall(BaseModel): args: Optional[Dict[str, object]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["tool_call"]] = None @@ -4429,6 +7130,18 @@ class DocumentWebsiteChildParagraphChildToolResult(BaseModel): is_error: Optional[bool] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["tool_result"]] = None @@ -4441,6 +7154,18 @@ class DocumentWebsiteChildParagraphChildTraceMessage(BaseModel): message_type: Optional[Literal["message", "thinking"]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + role: Optional[Literal["user", "assistant"]] = None timestamp: Optional[datetime] = None @@ -4469,6 +7194,18 @@ class DocumentWebsiteChildParagraph(BaseModel): children: Optional[List[DocumentWebsiteChildParagraphChild]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + text: Optional[str] = None type: Optional[Literal["paragraph"]] = None @@ -4487,6 +7224,18 @@ class DocumentWebsiteChildQuoteChildBlob(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["blob"]] = None @@ -4497,6 +7246,18 @@ class DocumentWebsiteChildQuoteChildCode(BaseModel): language: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["code"]] = None @@ -4507,12 +7268,36 @@ class DocumentWebsiteChildQuoteChildComment(BaseModel): created_at: Optional[datetime] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["comment"]] = None class DocumentWebsiteChildQuoteChildDivider(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["divider"]] = None @@ -4523,6 +7308,18 @@ class DocumentWebsiteChildQuoteChildImage(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["image"]] = None @@ -4533,12 +7330,36 @@ class DocumentWebsiteChildQuoteChildLink(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["link"]] = None class DocumentWebsiteChildQuoteChildLineBreak(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["line_break"]] = None @@ -4549,6 +7370,18 @@ class DocumentWebsiteChildQuoteChildText(BaseModel): marks: Optional[List[Literal["bold", "italic", "underline", "strikethrough", "code", "math"]]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["text"]] = None @@ -4563,6 +7396,18 @@ class DocumentWebsiteChildQuoteChildToolCall(BaseModel): args: Optional[Dict[str, object]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["tool_call"]] = None @@ -4579,6 +7424,18 @@ class DocumentWebsiteChildQuoteChildToolResult(BaseModel): is_error: Optional[bool] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["tool_result"]] = None @@ -4591,6 +7448,18 @@ class DocumentWebsiteChildQuoteChildTraceMessage(BaseModel): message_type: Optional[Literal["message", "thinking"]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + role: Optional[Literal["user", "assistant"]] = None timestamp: Optional[datetime] = None @@ -4619,6 +7488,18 @@ class DocumentWebsiteChildQuote(BaseModel): children: Optional[List[DocumentWebsiteChildQuoteChild]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + text: Optional[str] = None type: Optional[Literal["quote"]] = None @@ -4632,6 +7513,18 @@ class DocumentWebsiteChildTable(BaseModel): has_header: Optional[bool] = None """Whether the first row should be treated as a header""" + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + text: Optional[str] = None type: Optional[Literal["table"]] = None @@ -4650,6 +7543,18 @@ class DocumentWebsiteChildTableCellChildBlob(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["blob"]] = None @@ -4660,6 +7565,18 @@ class DocumentWebsiteChildTableCellChildCode(BaseModel): language: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["code"]] = None @@ -4670,12 +7587,36 @@ class DocumentWebsiteChildTableCellChildComment(BaseModel): created_at: Optional[datetime] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["comment"]] = None class DocumentWebsiteChildTableCellChildDivider(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["divider"]] = None @@ -4686,6 +7627,18 @@ class DocumentWebsiteChildTableCellChildImage(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["image"]] = None @@ -4696,12 +7649,36 @@ class DocumentWebsiteChildTableCellChildLink(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["link"]] = None class DocumentWebsiteChildTableCellChildLineBreak(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["line_break"]] = None @@ -4712,6 +7689,18 @@ class DocumentWebsiteChildTableCellChildText(BaseModel): marks: Optional[List[Literal["bold", "italic", "underline", "strikethrough", "code", "math"]]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["text"]] = None @@ -4726,6 +7715,18 @@ class DocumentWebsiteChildTableCellChildToolCall(BaseModel): args: Optional[Dict[str, object]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["tool_call"]] = None @@ -4742,6 +7743,18 @@ class DocumentWebsiteChildTableCellChildToolResult(BaseModel): is_error: Optional[bool] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["tool_result"]] = None @@ -4754,6 +7767,18 @@ class DocumentWebsiteChildTableCellChildTraceMessage(BaseModel): message_type: Optional[Literal["message", "thinking"]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + role: Optional[Literal["user", "assistant"]] = None timestamp: Optional[datetime] = None @@ -4784,6 +7809,18 @@ class DocumentWebsiteChildTableCell(BaseModel): children: Optional[List[DocumentWebsiteChildTableCellChild]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + text: Optional[str] = None type: Optional[Literal["table_cell"]] = None @@ -4794,6 +7831,18 @@ class DocumentWebsiteChildTableRow(BaseModel): children: Optional[List[object]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + text: Optional[str] = None type: Optional[Literal["table_row"]] = None @@ -4806,6 +7855,18 @@ class DocumentWebsiteChildText(BaseModel): marks: Optional[List[Literal["bold", "italic", "underline", "strikethrough", "code", "math"]]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["text"]] = None @@ -4822,6 +7883,18 @@ class DocumentWebsiteChildToDoChildBlob(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["blob"]] = None @@ -4832,6 +7905,18 @@ class DocumentWebsiteChildToDoChildCode(BaseModel): language: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["code"]] = None @@ -4842,12 +7927,36 @@ class DocumentWebsiteChildToDoChildComment(BaseModel): created_at: Optional[datetime] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["comment"]] = None class DocumentWebsiteChildToDoChildDivider(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["divider"]] = None @@ -4858,6 +7967,18 @@ class DocumentWebsiteChildToDoChildImage(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["image"]] = None @@ -4868,12 +7989,36 @@ class DocumentWebsiteChildToDoChildLink(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["link"]] = None class DocumentWebsiteChildToDoChildLineBreak(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["line_break"]] = None @@ -4884,6 +8029,18 @@ class DocumentWebsiteChildToDoChildText(BaseModel): marks: Optional[List[Literal["bold", "italic", "underline", "strikethrough", "code", "math"]]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["text"]] = None @@ -4898,6 +8055,18 @@ class DocumentWebsiteChildToDoChildToolCall(BaseModel): args: Optional[Dict[str, object]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["tool_call"]] = None @@ -4914,6 +8083,18 @@ class DocumentWebsiteChildToDoChildToolResult(BaseModel): is_error: Optional[bool] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["tool_result"]] = None @@ -4926,6 +8107,18 @@ class DocumentWebsiteChildToDoChildTraceMessage(BaseModel): message_type: Optional[Literal["message", "thinking"]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + role: Optional[Literal["user", "assistant"]] = None timestamp: Optional[datetime] = None @@ -4956,6 +8149,18 @@ class DocumentWebsiteChildToDo(BaseModel): children: Optional[List[DocumentWebsiteChildToDoChild]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + text: Optional[str] = None type: Optional[Literal["todo"]] = None @@ -4972,6 +8177,18 @@ class DocumentWebsiteChildToolCall(BaseModel): args: Optional[Dict[str, object]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["tool_call"]] = None @@ -4988,6 +8205,18 @@ class DocumentWebsiteChildToolResult(BaseModel): is_error: Optional[bool] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["tool_result"]] = None @@ -5000,6 +8229,18 @@ class DocumentWebsiteChildTraceMessage(BaseModel): message_type: Optional[Literal["message", "thinking"]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + role: Optional[Literal["user", "assistant"]] = None timestamp: Optional[datetime] = None @@ -5021,6 +8262,18 @@ class DocumentWebsiteChildUtterance(BaseModel): end: Optional[float] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + speaker: Optional[object] = None start: Optional[float] = None @@ -5075,6 +8328,18 @@ class DocumentWebsite(BaseModel): language: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + text: Optional[str] = None title: Optional[str] = None @@ -5095,6 +8360,18 @@ class DocumentTaskChildBlob(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["blob"]] = None @@ -5111,6 +8388,18 @@ class DocumentTaskChildCalloutChildBlob(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["blob"]] = None @@ -5121,6 +8410,18 @@ class DocumentTaskChildCalloutChildCode(BaseModel): language: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["code"]] = None @@ -5131,12 +8432,36 @@ class DocumentTaskChildCalloutChildComment(BaseModel): created_at: Optional[datetime] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["comment"]] = None class DocumentTaskChildCalloutChildDivider(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["divider"]] = None @@ -5147,6 +8472,18 @@ class DocumentTaskChildCalloutChildImage(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["image"]] = None @@ -5157,12 +8494,36 @@ class DocumentTaskChildCalloutChildLink(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["link"]] = None class DocumentTaskChildCalloutChildLineBreak(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["line_break"]] = None @@ -5173,6 +8534,18 @@ class DocumentTaskChildCalloutChildText(BaseModel): marks: Optional[List[Literal["bold", "italic", "underline", "strikethrough", "code", "math"]]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["text"]] = None @@ -5187,6 +8560,18 @@ class DocumentTaskChildCalloutChildToolCall(BaseModel): args: Optional[Dict[str, object]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["tool_call"]] = None @@ -5203,6 +8588,18 @@ class DocumentTaskChildCalloutChildToolResult(BaseModel): is_error: Optional[bool] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["tool_result"]] = None @@ -5215,6 +8612,18 @@ class DocumentTaskChildCalloutChildTraceMessage(BaseModel): message_type: Optional[Literal["message", "thinking"]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + role: Optional[Literal["user", "assistant"]] = None timestamp: Optional[datetime] = None @@ -5243,6 +8652,18 @@ class DocumentTaskChildCallout(BaseModel): children: Optional[List[DocumentTaskChildCalloutChild]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + text: Optional[str] = None title: Optional[str] = None @@ -5263,6 +8684,18 @@ class DocumentTaskChildChunkChildBlob(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["blob"]] = None @@ -5273,6 +8706,18 @@ class DocumentTaskChildChunkChildCode(BaseModel): language: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["code"]] = None @@ -5283,12 +8728,36 @@ class DocumentTaskChildChunkChildComment(BaseModel): created_at: Optional[datetime] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["comment"]] = None class DocumentTaskChildChunkChildDivider(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["divider"]] = None @@ -5299,6 +8768,18 @@ class DocumentTaskChildChunkChildImage(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["image"]] = None @@ -5309,12 +8790,36 @@ class DocumentTaskChildChunkChildLink(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["link"]] = None class DocumentTaskChildChunkChildLineBreak(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["line_break"]] = None @@ -5325,6 +8830,18 @@ class DocumentTaskChildChunkChildText(BaseModel): marks: Optional[List[Literal["bold", "italic", "underline", "strikethrough", "code", "math"]]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["text"]] = None @@ -5339,6 +8856,18 @@ class DocumentTaskChildChunkChildToolCall(BaseModel): args: Optional[Dict[str, object]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["tool_call"]] = None @@ -5355,6 +8884,18 @@ class DocumentTaskChildChunkChildToolResult(BaseModel): is_error: Optional[bool] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["tool_result"]] = None @@ -5367,6 +8908,18 @@ class DocumentTaskChildChunkChildTraceMessage(BaseModel): message_type: Optional[Literal["message", "thinking"]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + role: Optional[Literal["user", "assistant"]] = None timestamp: Optional[datetime] = None @@ -5395,6 +8948,18 @@ class DocumentTaskChildChunk(BaseModel): children: Optional[List[DocumentTaskChildChunkChild]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + text: Optional[str] = None type: Optional[Literal["chunk"]] = None @@ -5407,6 +8972,18 @@ class DocumentTaskChildCode(BaseModel): language: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["code"]] = None @@ -5417,12 +8994,36 @@ class DocumentTaskChildComment(BaseModel): created_at: Optional[datetime] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["comment"]] = None class DocumentTaskChildDivider(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["divider"]] = None @@ -5439,6 +9040,18 @@ class DocumentTaskChildEquationChildBlob(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["blob"]] = None @@ -5449,6 +9062,18 @@ class DocumentTaskChildEquationChildCode(BaseModel): language: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["code"]] = None @@ -5459,12 +9084,36 @@ class DocumentTaskChildEquationChildComment(BaseModel): created_at: Optional[datetime] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["comment"]] = None class DocumentTaskChildEquationChildDivider(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["divider"]] = None @@ -5475,6 +9124,18 @@ class DocumentTaskChildEquationChildImage(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["image"]] = None @@ -5485,12 +9146,36 @@ class DocumentTaskChildEquationChildLink(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["link"]] = None class DocumentTaskChildEquationChildLineBreak(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["line_break"]] = None @@ -5501,6 +9186,18 @@ class DocumentTaskChildEquationChildText(BaseModel): marks: Optional[List[Literal["bold", "italic", "underline", "strikethrough", "code", "math"]]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["text"]] = None @@ -5515,6 +9212,18 @@ class DocumentTaskChildEquationChildToolCall(BaseModel): args: Optional[Dict[str, object]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["tool_call"]] = None @@ -5531,6 +9240,18 @@ class DocumentTaskChildEquationChildToolResult(BaseModel): is_error: Optional[bool] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["tool_result"]] = None @@ -5543,6 +9264,18 @@ class DocumentTaskChildEquationChildTraceMessage(BaseModel): message_type: Optional[Literal["message", "thinking"]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + role: Optional[Literal["user", "assistant"]] = None timestamp: Optional[datetime] = None @@ -5571,6 +9304,18 @@ class DocumentTaskChildEquation(BaseModel): children: Optional[List[DocumentTaskChildEquationChild]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + text: Optional[str] = None type: Optional[Literal["equation"]] = None @@ -5589,6 +9334,18 @@ class DocumentTaskChildFootnoteChildBlob(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["blob"]] = None @@ -5599,6 +9356,18 @@ class DocumentTaskChildFootnoteChildCode(BaseModel): language: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["code"]] = None @@ -5609,12 +9378,36 @@ class DocumentTaskChildFootnoteChildComment(BaseModel): created_at: Optional[datetime] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["comment"]] = None class DocumentTaskChildFootnoteChildDivider(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["divider"]] = None @@ -5625,6 +9418,18 @@ class DocumentTaskChildFootnoteChildImage(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["image"]] = None @@ -5635,12 +9440,36 @@ class DocumentTaskChildFootnoteChildLink(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["link"]] = None class DocumentTaskChildFootnoteChildLineBreak(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["line_break"]] = None @@ -5651,6 +9480,18 @@ class DocumentTaskChildFootnoteChildText(BaseModel): marks: Optional[List[Literal["bold", "italic", "underline", "strikethrough", "code", "math"]]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["text"]] = None @@ -5665,6 +9506,18 @@ class DocumentTaskChildFootnoteChildToolCall(BaseModel): args: Optional[Dict[str, object]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["tool_call"]] = None @@ -5681,6 +9534,18 @@ class DocumentTaskChildFootnoteChildToolResult(BaseModel): is_error: Optional[bool] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["tool_result"]] = None @@ -5693,6 +9558,18 @@ class DocumentTaskChildFootnoteChildTraceMessage(BaseModel): message_type: Optional[Literal["message", "thinking"]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + role: Optional[Literal["user", "assistant"]] = None timestamp: Optional[datetime] = None @@ -5721,6 +9598,18 @@ class DocumentTaskChildFootnote(BaseModel): children: Optional[List[DocumentTaskChildFootnoteChild]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + text: Optional[str] = None type: Optional[Literal["footnote"]] = None @@ -5739,6 +9628,18 @@ class DocumentTaskChildHeadingChildBlob(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["blob"]] = None @@ -5749,6 +9650,18 @@ class DocumentTaskChildHeadingChildCode(BaseModel): language: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["code"]] = None @@ -5759,12 +9672,36 @@ class DocumentTaskChildHeadingChildComment(BaseModel): created_at: Optional[datetime] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["comment"]] = None class DocumentTaskChildHeadingChildDivider(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["divider"]] = None @@ -5775,6 +9712,18 @@ class DocumentTaskChildHeadingChildImage(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["image"]] = None @@ -5785,12 +9734,36 @@ class DocumentTaskChildHeadingChildLink(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["link"]] = None class DocumentTaskChildHeadingChildLineBreak(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["line_break"]] = None @@ -5801,6 +9774,18 @@ class DocumentTaskChildHeadingChildText(BaseModel): marks: Optional[List[Literal["bold", "italic", "underline", "strikethrough", "code", "math"]]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["text"]] = None @@ -5815,6 +9800,18 @@ class DocumentTaskChildHeadingChildToolCall(BaseModel): args: Optional[Dict[str, object]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["tool_call"]] = None @@ -5831,6 +9828,18 @@ class DocumentTaskChildHeadingChildToolResult(BaseModel): is_error: Optional[bool] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["tool_result"]] = None @@ -5843,6 +9852,18 @@ class DocumentTaskChildHeadingChildTraceMessage(BaseModel): message_type: Optional[Literal["message", "thinking"]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + role: Optional[Literal["user", "assistant"]] = None timestamp: Optional[datetime] = None @@ -5873,6 +9894,18 @@ class DocumentTaskChildHeading(BaseModel): children: Optional[List[DocumentTaskChildHeadingChild]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + text: Optional[str] = None type: Optional[Literal["heading"]] = None @@ -5885,6 +9918,18 @@ class DocumentTaskChildImage(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["image"]] = None @@ -5895,12 +9940,36 @@ class DocumentTaskChildLink(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["link"]] = None class DocumentTaskChildLineBreak(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["line_break"]] = None @@ -5909,6 +9978,18 @@ class DocumentTaskChildList(BaseModel): children: Optional[List[object]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + ordered: Optional[bool] = None text: Optional[str] = None @@ -5929,6 +10010,18 @@ class DocumentTaskChildListItemChildBlob(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["blob"]] = None @@ -5939,6 +10032,18 @@ class DocumentTaskChildListItemChildCode(BaseModel): language: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["code"]] = None @@ -5949,12 +10054,36 @@ class DocumentTaskChildListItemChildComment(BaseModel): created_at: Optional[datetime] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["comment"]] = None class DocumentTaskChildListItemChildDivider(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["divider"]] = None @@ -5965,6 +10094,18 @@ class DocumentTaskChildListItemChildImage(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["image"]] = None @@ -5975,12 +10116,36 @@ class DocumentTaskChildListItemChildLink(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["link"]] = None class DocumentTaskChildListItemChildLineBreak(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["line_break"]] = None @@ -5991,6 +10156,18 @@ class DocumentTaskChildListItemChildText(BaseModel): marks: Optional[List[Literal["bold", "italic", "underline", "strikethrough", "code", "math"]]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["text"]] = None @@ -6005,6 +10182,18 @@ class DocumentTaskChildListItemChildToolCall(BaseModel): args: Optional[Dict[str, object]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["tool_call"]] = None @@ -6021,6 +10210,18 @@ class DocumentTaskChildListItemChildToolResult(BaseModel): is_error: Optional[bool] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["tool_result"]] = None @@ -6033,6 +10234,18 @@ class DocumentTaskChildListItemChildTraceMessage(BaseModel): message_type: Optional[Literal["message", "thinking"]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + role: Optional[Literal["user", "assistant"]] = None timestamp: Optional[datetime] = None @@ -6061,6 +10274,18 @@ class DocumentTaskChildListItem(BaseModel): children: Optional[List[DocumentTaskChildListItemChild]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + text: Optional[str] = None type: Optional[Literal["list_item"]] = None @@ -6079,6 +10304,18 @@ class DocumentTaskChildParagraphChildBlob(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["blob"]] = None @@ -6089,6 +10326,18 @@ class DocumentTaskChildParagraphChildCode(BaseModel): language: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["code"]] = None @@ -6099,12 +10348,36 @@ class DocumentTaskChildParagraphChildComment(BaseModel): created_at: Optional[datetime] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["comment"]] = None class DocumentTaskChildParagraphChildDivider(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["divider"]] = None @@ -6115,6 +10388,18 @@ class DocumentTaskChildParagraphChildImage(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["image"]] = None @@ -6125,12 +10410,36 @@ class DocumentTaskChildParagraphChildLink(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["link"]] = None class DocumentTaskChildParagraphChildLineBreak(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["line_break"]] = None @@ -6141,6 +10450,18 @@ class DocumentTaskChildParagraphChildText(BaseModel): marks: Optional[List[Literal["bold", "italic", "underline", "strikethrough", "code", "math"]]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["text"]] = None @@ -6155,6 +10476,18 @@ class DocumentTaskChildParagraphChildToolCall(BaseModel): args: Optional[Dict[str, object]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["tool_call"]] = None @@ -6171,6 +10504,18 @@ class DocumentTaskChildParagraphChildToolResult(BaseModel): is_error: Optional[bool] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["tool_result"]] = None @@ -6183,6 +10528,18 @@ class DocumentTaskChildParagraphChildTraceMessage(BaseModel): message_type: Optional[Literal["message", "thinking"]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + role: Optional[Literal["user", "assistant"]] = None timestamp: Optional[datetime] = None @@ -6211,6 +10568,18 @@ class DocumentTaskChildParagraph(BaseModel): children: Optional[List[DocumentTaskChildParagraphChild]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + text: Optional[str] = None type: Optional[Literal["paragraph"]] = None @@ -6229,6 +10598,18 @@ class DocumentTaskChildQuoteChildBlob(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["blob"]] = None @@ -6239,6 +10620,18 @@ class DocumentTaskChildQuoteChildCode(BaseModel): language: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["code"]] = None @@ -6249,12 +10642,36 @@ class DocumentTaskChildQuoteChildComment(BaseModel): created_at: Optional[datetime] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["comment"]] = None class DocumentTaskChildQuoteChildDivider(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["divider"]] = None @@ -6265,6 +10682,18 @@ class DocumentTaskChildQuoteChildImage(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["image"]] = None @@ -6275,12 +10704,36 @@ class DocumentTaskChildQuoteChildLink(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["link"]] = None class DocumentTaskChildQuoteChildLineBreak(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["line_break"]] = None @@ -6291,6 +10744,18 @@ class DocumentTaskChildQuoteChildText(BaseModel): marks: Optional[List[Literal["bold", "italic", "underline", "strikethrough", "code", "math"]]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["text"]] = None @@ -6305,6 +10770,18 @@ class DocumentTaskChildQuoteChildToolCall(BaseModel): args: Optional[Dict[str, object]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["tool_call"]] = None @@ -6321,6 +10798,18 @@ class DocumentTaskChildQuoteChildToolResult(BaseModel): is_error: Optional[bool] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["tool_result"]] = None @@ -6333,6 +10822,18 @@ class DocumentTaskChildQuoteChildTraceMessage(BaseModel): message_type: Optional[Literal["message", "thinking"]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + role: Optional[Literal["user", "assistant"]] = None timestamp: Optional[datetime] = None @@ -6361,6 +10862,18 @@ class DocumentTaskChildQuote(BaseModel): children: Optional[List[DocumentTaskChildQuoteChild]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + text: Optional[str] = None type: Optional[Literal["quote"]] = None @@ -6374,6 +10887,18 @@ class DocumentTaskChildTable(BaseModel): has_header: Optional[bool] = None """Whether the first row should be treated as a header""" + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + text: Optional[str] = None type: Optional[Literal["table"]] = None @@ -6392,6 +10917,18 @@ class DocumentTaskChildTableCellChildBlob(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["blob"]] = None @@ -6402,6 +10939,18 @@ class DocumentTaskChildTableCellChildCode(BaseModel): language: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["code"]] = None @@ -6412,12 +10961,36 @@ class DocumentTaskChildTableCellChildComment(BaseModel): created_at: Optional[datetime] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["comment"]] = None class DocumentTaskChildTableCellChildDivider(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["divider"]] = None @@ -6428,6 +11001,18 @@ class DocumentTaskChildTableCellChildImage(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["image"]] = None @@ -6438,12 +11023,36 @@ class DocumentTaskChildTableCellChildLink(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["link"]] = None class DocumentTaskChildTableCellChildLineBreak(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["line_break"]] = None @@ -6454,6 +11063,18 @@ class DocumentTaskChildTableCellChildText(BaseModel): marks: Optional[List[Literal["bold", "italic", "underline", "strikethrough", "code", "math"]]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["text"]] = None @@ -6468,6 +11089,18 @@ class DocumentTaskChildTableCellChildToolCall(BaseModel): args: Optional[Dict[str, object]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["tool_call"]] = None @@ -6484,6 +11117,18 @@ class DocumentTaskChildTableCellChildToolResult(BaseModel): is_error: Optional[bool] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["tool_result"]] = None @@ -6496,6 +11141,18 @@ class DocumentTaskChildTableCellChildTraceMessage(BaseModel): message_type: Optional[Literal["message", "thinking"]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + role: Optional[Literal["user", "assistant"]] = None timestamp: Optional[datetime] = None @@ -6526,6 +11183,18 @@ class DocumentTaskChildTableCell(BaseModel): children: Optional[List[DocumentTaskChildTableCellChild]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + text: Optional[str] = None type: Optional[Literal["table_cell"]] = None @@ -6536,6 +11205,18 @@ class DocumentTaskChildTableRow(BaseModel): children: Optional[List[object]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + text: Optional[str] = None type: Optional[Literal["table_row"]] = None @@ -6548,6 +11229,18 @@ class DocumentTaskChildText(BaseModel): marks: Optional[List[Literal["bold", "italic", "underline", "strikethrough", "code", "math"]]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["text"]] = None @@ -6564,6 +11257,18 @@ class DocumentTaskChildToDoChildBlob(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["blob"]] = None @@ -6574,6 +11279,18 @@ class DocumentTaskChildToDoChildCode(BaseModel): language: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["code"]] = None @@ -6584,12 +11301,36 @@ class DocumentTaskChildToDoChildComment(BaseModel): created_at: Optional[datetime] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["comment"]] = None class DocumentTaskChildToDoChildDivider(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["divider"]] = None @@ -6600,6 +11341,18 @@ class DocumentTaskChildToDoChildImage(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["image"]] = None @@ -6610,12 +11363,36 @@ class DocumentTaskChildToDoChildLink(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["link"]] = None class DocumentTaskChildToDoChildLineBreak(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["line_break"]] = None @@ -6626,6 +11403,18 @@ class DocumentTaskChildToDoChildText(BaseModel): marks: Optional[List[Literal["bold", "italic", "underline", "strikethrough", "code", "math"]]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["text"]] = None @@ -6640,6 +11429,18 @@ class DocumentTaskChildToDoChildToolCall(BaseModel): args: Optional[Dict[str, object]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["tool_call"]] = None @@ -6656,6 +11457,18 @@ class DocumentTaskChildToDoChildToolResult(BaseModel): is_error: Optional[bool] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["tool_result"]] = None @@ -6668,6 +11481,18 @@ class DocumentTaskChildToDoChildTraceMessage(BaseModel): message_type: Optional[Literal["message", "thinking"]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + role: Optional[Literal["user", "assistant"]] = None timestamp: Optional[datetime] = None @@ -6698,6 +11523,18 @@ class DocumentTaskChildToDo(BaseModel): children: Optional[List[DocumentTaskChildToDoChild]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + text: Optional[str] = None type: Optional[Literal["todo"]] = None @@ -6714,6 +11551,18 @@ class DocumentTaskChildToolCall(BaseModel): args: Optional[Dict[str, object]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["tool_call"]] = None @@ -6730,6 +11579,18 @@ class DocumentTaskChildToolResult(BaseModel): is_error: Optional[bool] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["tool_result"]] = None @@ -6742,6 +11603,18 @@ class DocumentTaskChildTraceMessage(BaseModel): message_type: Optional[Literal["message", "thinking"]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + role: Optional[Literal["user", "assistant"]] = None timestamp: Optional[datetime] = None @@ -6763,6 +11636,18 @@ class DocumentTaskChildUtterance(BaseModel): end: Optional[float] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + speaker: Optional[object] = None start: Optional[float] = None @@ -6815,6 +11700,18 @@ class DocumentTaskCommentSenderChildBlob(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["blob"]] = None @@ -6825,6 +11722,18 @@ class DocumentTaskCommentSenderChildCode(BaseModel): language: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["code"]] = None @@ -6835,12 +11744,36 @@ class DocumentTaskCommentSenderChildComment(BaseModel): created_at: Optional[datetime] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["comment"]] = None class DocumentTaskCommentSenderChildDivider(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["divider"]] = None @@ -6851,6 +11784,18 @@ class DocumentTaskCommentSenderChildImage(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["image"]] = None @@ -6861,12 +11806,36 @@ class DocumentTaskCommentSenderChildLink(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["link"]] = None class DocumentTaskCommentSenderChildLineBreak(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["line_break"]] = None @@ -6877,6 +11846,18 @@ class DocumentTaskCommentSenderChildText(BaseModel): marks: Optional[List[Literal["bold", "italic", "underline", "strikethrough", "code", "math"]]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["text"]] = None @@ -6891,6 +11872,18 @@ class DocumentTaskCommentSenderChildToolCall(BaseModel): args: Optional[Dict[str, object]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["tool_call"]] = None @@ -6907,6 +11900,18 @@ class DocumentTaskCommentSenderChildToolResult(BaseModel): is_error: Optional[bool] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["tool_result"]] = None @@ -6919,6 +11924,18 @@ class DocumentTaskCommentSenderChildTraceMessage(BaseModel): message_type: Optional[Literal["message", "thinking"]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + role: Optional[Literal["user", "assistant"]] = None timestamp: Optional[datetime] = None @@ -6970,6 +11987,18 @@ class DocumentTaskCommentSender(BaseModel): link_urls: Optional[List[str]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + name: Optional[str] = None phone_numbers: Optional[List[str]] = None @@ -6996,6 +12025,18 @@ class DocumentTaskCommentChildBlob(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["blob"]] = None @@ -7012,6 +12053,18 @@ class DocumentTaskCommentChildCalloutChildBlob(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["blob"]] = None @@ -7022,6 +12075,18 @@ class DocumentTaskCommentChildCalloutChildCode(BaseModel): language: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["code"]] = None @@ -7032,12 +12097,36 @@ class DocumentTaskCommentChildCalloutChildComment(BaseModel): created_at: Optional[datetime] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["comment"]] = None class DocumentTaskCommentChildCalloutChildDivider(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["divider"]] = None @@ -7048,6 +12137,18 @@ class DocumentTaskCommentChildCalloutChildImage(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["image"]] = None @@ -7058,12 +12159,36 @@ class DocumentTaskCommentChildCalloutChildLink(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["link"]] = None class DocumentTaskCommentChildCalloutChildLineBreak(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["line_break"]] = None @@ -7074,6 +12199,18 @@ class DocumentTaskCommentChildCalloutChildText(BaseModel): marks: Optional[List[Literal["bold", "italic", "underline", "strikethrough", "code", "math"]]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["text"]] = None @@ -7088,6 +12225,18 @@ class DocumentTaskCommentChildCalloutChildToolCall(BaseModel): args: Optional[Dict[str, object]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["tool_call"]] = None @@ -7104,6 +12253,18 @@ class DocumentTaskCommentChildCalloutChildToolResult(BaseModel): is_error: Optional[bool] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["tool_result"]] = None @@ -7116,6 +12277,18 @@ class DocumentTaskCommentChildCalloutChildTraceMessage(BaseModel): message_type: Optional[Literal["message", "thinking"]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + role: Optional[Literal["user", "assistant"]] = None timestamp: Optional[datetime] = None @@ -7144,6 +12317,18 @@ class DocumentTaskCommentChildCallout(BaseModel): children: Optional[List[DocumentTaskCommentChildCalloutChild]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + text: Optional[str] = None title: Optional[str] = None @@ -7164,6 +12349,18 @@ class DocumentTaskCommentChildChunkChildBlob(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["blob"]] = None @@ -7174,6 +12371,18 @@ class DocumentTaskCommentChildChunkChildCode(BaseModel): language: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["code"]] = None @@ -7184,12 +12393,36 @@ class DocumentTaskCommentChildChunkChildComment(BaseModel): created_at: Optional[datetime] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["comment"]] = None class DocumentTaskCommentChildChunkChildDivider(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["divider"]] = None @@ -7200,6 +12433,18 @@ class DocumentTaskCommentChildChunkChildImage(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["image"]] = None @@ -7210,12 +12455,36 @@ class DocumentTaskCommentChildChunkChildLink(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["link"]] = None class DocumentTaskCommentChildChunkChildLineBreak(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["line_break"]] = None @@ -7226,6 +12495,18 @@ class DocumentTaskCommentChildChunkChildText(BaseModel): marks: Optional[List[Literal["bold", "italic", "underline", "strikethrough", "code", "math"]]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["text"]] = None @@ -7240,6 +12521,18 @@ class DocumentTaskCommentChildChunkChildToolCall(BaseModel): args: Optional[Dict[str, object]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["tool_call"]] = None @@ -7256,6 +12549,18 @@ class DocumentTaskCommentChildChunkChildToolResult(BaseModel): is_error: Optional[bool] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["tool_result"]] = None @@ -7268,6 +12573,18 @@ class DocumentTaskCommentChildChunkChildTraceMessage(BaseModel): message_type: Optional[Literal["message", "thinking"]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + role: Optional[Literal["user", "assistant"]] = None timestamp: Optional[datetime] = None @@ -7296,6 +12613,18 @@ class DocumentTaskCommentChildChunk(BaseModel): children: Optional[List[DocumentTaskCommentChildChunkChild]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + text: Optional[str] = None type: Optional[Literal["chunk"]] = None @@ -7308,6 +12637,18 @@ class DocumentTaskCommentChildCode(BaseModel): language: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["code"]] = None @@ -7318,12 +12659,36 @@ class DocumentTaskCommentChildComment(BaseModel): created_at: Optional[datetime] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["comment"]] = None class DocumentTaskCommentChildDivider(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["divider"]] = None @@ -7340,6 +12705,18 @@ class DocumentTaskCommentChildEquationChildBlob(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["blob"]] = None @@ -7350,6 +12727,18 @@ class DocumentTaskCommentChildEquationChildCode(BaseModel): language: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["code"]] = None @@ -7360,12 +12749,36 @@ class DocumentTaskCommentChildEquationChildComment(BaseModel): created_at: Optional[datetime] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["comment"]] = None class DocumentTaskCommentChildEquationChildDivider(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["divider"]] = None @@ -7376,6 +12789,18 @@ class DocumentTaskCommentChildEquationChildImage(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["image"]] = None @@ -7386,12 +12811,36 @@ class DocumentTaskCommentChildEquationChildLink(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["link"]] = None class DocumentTaskCommentChildEquationChildLineBreak(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["line_break"]] = None @@ -7402,6 +12851,18 @@ class DocumentTaskCommentChildEquationChildText(BaseModel): marks: Optional[List[Literal["bold", "italic", "underline", "strikethrough", "code", "math"]]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["text"]] = None @@ -7416,6 +12877,18 @@ class DocumentTaskCommentChildEquationChildToolCall(BaseModel): args: Optional[Dict[str, object]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["tool_call"]] = None @@ -7432,6 +12905,18 @@ class DocumentTaskCommentChildEquationChildToolResult(BaseModel): is_error: Optional[bool] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["tool_result"]] = None @@ -7444,6 +12929,18 @@ class DocumentTaskCommentChildEquationChildTraceMessage(BaseModel): message_type: Optional[Literal["message", "thinking"]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + role: Optional[Literal["user", "assistant"]] = None timestamp: Optional[datetime] = None @@ -7472,6 +12969,18 @@ class DocumentTaskCommentChildEquation(BaseModel): children: Optional[List[DocumentTaskCommentChildEquationChild]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + text: Optional[str] = None type: Optional[Literal["equation"]] = None @@ -7490,6 +12999,18 @@ class DocumentTaskCommentChildFootnoteChildBlob(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["blob"]] = None @@ -7500,6 +13021,18 @@ class DocumentTaskCommentChildFootnoteChildCode(BaseModel): language: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["code"]] = None @@ -7510,12 +13043,36 @@ class DocumentTaskCommentChildFootnoteChildComment(BaseModel): created_at: Optional[datetime] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["comment"]] = None class DocumentTaskCommentChildFootnoteChildDivider(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["divider"]] = None @@ -7526,6 +13083,18 @@ class DocumentTaskCommentChildFootnoteChildImage(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["image"]] = None @@ -7536,12 +13105,36 @@ class DocumentTaskCommentChildFootnoteChildLink(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["link"]] = None class DocumentTaskCommentChildFootnoteChildLineBreak(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["line_break"]] = None @@ -7552,6 +13145,18 @@ class DocumentTaskCommentChildFootnoteChildText(BaseModel): marks: Optional[List[Literal["bold", "italic", "underline", "strikethrough", "code", "math"]]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["text"]] = None @@ -7566,6 +13171,18 @@ class DocumentTaskCommentChildFootnoteChildToolCall(BaseModel): args: Optional[Dict[str, object]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["tool_call"]] = None @@ -7582,6 +13199,18 @@ class DocumentTaskCommentChildFootnoteChildToolResult(BaseModel): is_error: Optional[bool] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["tool_result"]] = None @@ -7594,6 +13223,18 @@ class DocumentTaskCommentChildFootnoteChildTraceMessage(BaseModel): message_type: Optional[Literal["message", "thinking"]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + role: Optional[Literal["user", "assistant"]] = None timestamp: Optional[datetime] = None @@ -7622,6 +13263,18 @@ class DocumentTaskCommentChildFootnote(BaseModel): children: Optional[List[DocumentTaskCommentChildFootnoteChild]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + text: Optional[str] = None type: Optional[Literal["footnote"]] = None @@ -7640,6 +13293,18 @@ class DocumentTaskCommentChildHeadingChildBlob(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["blob"]] = None @@ -7650,6 +13315,18 @@ class DocumentTaskCommentChildHeadingChildCode(BaseModel): language: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["code"]] = None @@ -7660,12 +13337,36 @@ class DocumentTaskCommentChildHeadingChildComment(BaseModel): created_at: Optional[datetime] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["comment"]] = None class DocumentTaskCommentChildHeadingChildDivider(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["divider"]] = None @@ -7676,6 +13377,18 @@ class DocumentTaskCommentChildHeadingChildImage(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["image"]] = None @@ -7686,12 +13399,36 @@ class DocumentTaskCommentChildHeadingChildLink(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["link"]] = None class DocumentTaskCommentChildHeadingChildLineBreak(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["line_break"]] = None @@ -7702,6 +13439,18 @@ class DocumentTaskCommentChildHeadingChildText(BaseModel): marks: Optional[List[Literal["bold", "italic", "underline", "strikethrough", "code", "math"]]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["text"]] = None @@ -7716,6 +13465,18 @@ class DocumentTaskCommentChildHeadingChildToolCall(BaseModel): args: Optional[Dict[str, object]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["tool_call"]] = None @@ -7732,6 +13493,18 @@ class DocumentTaskCommentChildHeadingChildToolResult(BaseModel): is_error: Optional[bool] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["tool_result"]] = None @@ -7744,6 +13517,18 @@ class DocumentTaskCommentChildHeadingChildTraceMessage(BaseModel): message_type: Optional[Literal["message", "thinking"]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + role: Optional[Literal["user", "assistant"]] = None timestamp: Optional[datetime] = None @@ -7774,6 +13559,18 @@ class DocumentTaskCommentChildHeading(BaseModel): children: Optional[List[DocumentTaskCommentChildHeadingChild]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + text: Optional[str] = None type: Optional[Literal["heading"]] = None @@ -7786,6 +13583,18 @@ class DocumentTaskCommentChildImage(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["image"]] = None @@ -7796,12 +13605,36 @@ class DocumentTaskCommentChildLink(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["link"]] = None class DocumentTaskCommentChildLineBreak(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["line_break"]] = None @@ -7810,6 +13643,18 @@ class DocumentTaskCommentChildList(BaseModel): children: Optional[List[object]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + ordered: Optional[bool] = None text: Optional[str] = None @@ -7830,6 +13675,18 @@ class DocumentTaskCommentChildListItemChildBlob(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["blob"]] = None @@ -7840,6 +13697,18 @@ class DocumentTaskCommentChildListItemChildCode(BaseModel): language: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["code"]] = None @@ -7850,12 +13719,36 @@ class DocumentTaskCommentChildListItemChildComment(BaseModel): created_at: Optional[datetime] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["comment"]] = None class DocumentTaskCommentChildListItemChildDivider(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["divider"]] = None @@ -7866,6 +13759,18 @@ class DocumentTaskCommentChildListItemChildImage(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["image"]] = None @@ -7876,12 +13781,36 @@ class DocumentTaskCommentChildListItemChildLink(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["link"]] = None class DocumentTaskCommentChildListItemChildLineBreak(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["line_break"]] = None @@ -7892,6 +13821,18 @@ class DocumentTaskCommentChildListItemChildText(BaseModel): marks: Optional[List[Literal["bold", "italic", "underline", "strikethrough", "code", "math"]]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["text"]] = None @@ -7906,6 +13847,18 @@ class DocumentTaskCommentChildListItemChildToolCall(BaseModel): args: Optional[Dict[str, object]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["tool_call"]] = None @@ -7922,6 +13875,18 @@ class DocumentTaskCommentChildListItemChildToolResult(BaseModel): is_error: Optional[bool] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["tool_result"]] = None @@ -7934,6 +13899,18 @@ class DocumentTaskCommentChildListItemChildTraceMessage(BaseModel): message_type: Optional[Literal["message", "thinking"]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + role: Optional[Literal["user", "assistant"]] = None timestamp: Optional[datetime] = None @@ -7962,6 +13939,18 @@ class DocumentTaskCommentChildListItem(BaseModel): children: Optional[List[DocumentTaskCommentChildListItemChild]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + text: Optional[str] = None type: Optional[Literal["list_item"]] = None @@ -7980,6 +13969,18 @@ class DocumentTaskCommentChildParagraphChildBlob(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["blob"]] = None @@ -7990,6 +13991,18 @@ class DocumentTaskCommentChildParagraphChildCode(BaseModel): language: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["code"]] = None @@ -8000,12 +14013,36 @@ class DocumentTaskCommentChildParagraphChildComment(BaseModel): created_at: Optional[datetime] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["comment"]] = None class DocumentTaskCommentChildParagraphChildDivider(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["divider"]] = None @@ -8016,6 +14053,18 @@ class DocumentTaskCommentChildParagraphChildImage(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["image"]] = None @@ -8026,12 +14075,36 @@ class DocumentTaskCommentChildParagraphChildLink(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["link"]] = None class DocumentTaskCommentChildParagraphChildLineBreak(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["line_break"]] = None @@ -8042,6 +14115,18 @@ class DocumentTaskCommentChildParagraphChildText(BaseModel): marks: Optional[List[Literal["bold", "italic", "underline", "strikethrough", "code", "math"]]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["text"]] = None @@ -8056,6 +14141,18 @@ class DocumentTaskCommentChildParagraphChildToolCall(BaseModel): args: Optional[Dict[str, object]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["tool_call"]] = None @@ -8072,6 +14169,18 @@ class DocumentTaskCommentChildParagraphChildToolResult(BaseModel): is_error: Optional[bool] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["tool_result"]] = None @@ -8084,6 +14193,18 @@ class DocumentTaskCommentChildParagraphChildTraceMessage(BaseModel): message_type: Optional[Literal["message", "thinking"]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + role: Optional[Literal["user", "assistant"]] = None timestamp: Optional[datetime] = None @@ -8112,6 +14233,18 @@ class DocumentTaskCommentChildParagraph(BaseModel): children: Optional[List[DocumentTaskCommentChildParagraphChild]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + text: Optional[str] = None type: Optional[Literal["paragraph"]] = None @@ -8130,6 +14263,18 @@ class DocumentTaskCommentChildQuoteChildBlob(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["blob"]] = None @@ -8140,6 +14285,18 @@ class DocumentTaskCommentChildQuoteChildCode(BaseModel): language: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["code"]] = None @@ -8150,12 +14307,36 @@ class DocumentTaskCommentChildQuoteChildComment(BaseModel): created_at: Optional[datetime] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["comment"]] = None class DocumentTaskCommentChildQuoteChildDivider(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["divider"]] = None @@ -8166,6 +14347,18 @@ class DocumentTaskCommentChildQuoteChildImage(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["image"]] = None @@ -8176,12 +14369,36 @@ class DocumentTaskCommentChildQuoteChildLink(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["link"]] = None class DocumentTaskCommentChildQuoteChildLineBreak(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["line_break"]] = None @@ -8192,6 +14409,18 @@ class DocumentTaskCommentChildQuoteChildText(BaseModel): marks: Optional[List[Literal["bold", "italic", "underline", "strikethrough", "code", "math"]]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["text"]] = None @@ -8206,6 +14435,18 @@ class DocumentTaskCommentChildQuoteChildToolCall(BaseModel): args: Optional[Dict[str, object]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["tool_call"]] = None @@ -8222,6 +14463,18 @@ class DocumentTaskCommentChildQuoteChildToolResult(BaseModel): is_error: Optional[bool] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["tool_result"]] = None @@ -8234,6 +14487,18 @@ class DocumentTaskCommentChildQuoteChildTraceMessage(BaseModel): message_type: Optional[Literal["message", "thinking"]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + role: Optional[Literal["user", "assistant"]] = None timestamp: Optional[datetime] = None @@ -8262,6 +14527,18 @@ class DocumentTaskCommentChildQuote(BaseModel): children: Optional[List[DocumentTaskCommentChildQuoteChild]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + text: Optional[str] = None type: Optional[Literal["quote"]] = None @@ -8275,6 +14552,18 @@ class DocumentTaskCommentChildTable(BaseModel): has_header: Optional[bool] = None """Whether the first row should be treated as a header""" + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + text: Optional[str] = None type: Optional[Literal["table"]] = None @@ -8293,6 +14582,18 @@ class DocumentTaskCommentChildTableCellChildBlob(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["blob"]] = None @@ -8303,6 +14604,18 @@ class DocumentTaskCommentChildTableCellChildCode(BaseModel): language: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["code"]] = None @@ -8313,12 +14626,36 @@ class DocumentTaskCommentChildTableCellChildComment(BaseModel): created_at: Optional[datetime] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["comment"]] = None class DocumentTaskCommentChildTableCellChildDivider(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["divider"]] = None @@ -8329,6 +14666,18 @@ class DocumentTaskCommentChildTableCellChildImage(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["image"]] = None @@ -8339,12 +14688,36 @@ class DocumentTaskCommentChildTableCellChildLink(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["link"]] = None class DocumentTaskCommentChildTableCellChildLineBreak(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["line_break"]] = None @@ -8355,6 +14728,18 @@ class DocumentTaskCommentChildTableCellChildText(BaseModel): marks: Optional[List[Literal["bold", "italic", "underline", "strikethrough", "code", "math"]]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["text"]] = None @@ -8369,6 +14754,18 @@ class DocumentTaskCommentChildTableCellChildToolCall(BaseModel): args: Optional[Dict[str, object]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["tool_call"]] = None @@ -8385,6 +14782,18 @@ class DocumentTaskCommentChildTableCellChildToolResult(BaseModel): is_error: Optional[bool] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["tool_result"]] = None @@ -8397,6 +14806,18 @@ class DocumentTaskCommentChildTableCellChildTraceMessage(BaseModel): message_type: Optional[Literal["message", "thinking"]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + role: Optional[Literal["user", "assistant"]] = None timestamp: Optional[datetime] = None @@ -8427,6 +14848,18 @@ class DocumentTaskCommentChildTableCell(BaseModel): children: Optional[List[DocumentTaskCommentChildTableCellChild]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + text: Optional[str] = None type: Optional[Literal["table_cell"]] = None @@ -8437,6 +14870,18 @@ class DocumentTaskCommentChildTableRow(BaseModel): children: Optional[List[object]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + text: Optional[str] = None type: Optional[Literal["table_row"]] = None @@ -8449,6 +14894,18 @@ class DocumentTaskCommentChildText(BaseModel): marks: Optional[List[Literal["bold", "italic", "underline", "strikethrough", "code", "math"]]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["text"]] = None @@ -8465,6 +14922,18 @@ class DocumentTaskCommentChildToDoChildBlob(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["blob"]] = None @@ -8475,6 +14944,18 @@ class DocumentTaskCommentChildToDoChildCode(BaseModel): language: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["code"]] = None @@ -8485,12 +14966,36 @@ class DocumentTaskCommentChildToDoChildComment(BaseModel): created_at: Optional[datetime] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["comment"]] = None class DocumentTaskCommentChildToDoChildDivider(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["divider"]] = None @@ -8501,6 +15006,18 @@ class DocumentTaskCommentChildToDoChildImage(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["image"]] = None @@ -8511,12 +15028,36 @@ class DocumentTaskCommentChildToDoChildLink(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["link"]] = None class DocumentTaskCommentChildToDoChildLineBreak(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["line_break"]] = None @@ -8527,6 +15068,18 @@ class DocumentTaskCommentChildToDoChildText(BaseModel): marks: Optional[List[Literal["bold", "italic", "underline", "strikethrough", "code", "math"]]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["text"]] = None @@ -8541,6 +15094,18 @@ class DocumentTaskCommentChildToDoChildToolCall(BaseModel): args: Optional[Dict[str, object]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["tool_call"]] = None @@ -8557,6 +15122,18 @@ class DocumentTaskCommentChildToDoChildToolResult(BaseModel): is_error: Optional[bool] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["tool_result"]] = None @@ -8569,6 +15146,18 @@ class DocumentTaskCommentChildToDoChildTraceMessage(BaseModel): message_type: Optional[Literal["message", "thinking"]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + role: Optional[Literal["user", "assistant"]] = None timestamp: Optional[datetime] = None @@ -8599,6 +15188,18 @@ class DocumentTaskCommentChildToDo(BaseModel): children: Optional[List[DocumentTaskCommentChildToDoChild]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + text: Optional[str] = None type: Optional[Literal["todo"]] = None @@ -8615,6 +15216,18 @@ class DocumentTaskCommentChildToolCall(BaseModel): args: Optional[Dict[str, object]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["tool_call"]] = None @@ -8631,6 +15244,18 @@ class DocumentTaskCommentChildToolResult(BaseModel): is_error: Optional[bool] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["tool_result"]] = None @@ -8643,6 +15268,18 @@ class DocumentTaskCommentChildTraceMessage(BaseModel): message_type: Optional[Literal["message", "thinking"]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + role: Optional[Literal["user", "assistant"]] = None timestamp: Optional[datetime] = None @@ -8664,6 +15301,18 @@ class DocumentTaskCommentChildUtterance(BaseModel): end: Optional[float] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + speaker: Optional[object] = None start: Optional[float] = None @@ -8716,6 +15365,18 @@ class DocumentTaskCommentMentionedUserChildBlob(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["blob"]] = None @@ -8726,6 +15387,18 @@ class DocumentTaskCommentMentionedUserChildCode(BaseModel): language: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["code"]] = None @@ -8736,12 +15409,36 @@ class DocumentTaskCommentMentionedUserChildComment(BaseModel): created_at: Optional[datetime] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["comment"]] = None class DocumentTaskCommentMentionedUserChildDivider(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["divider"]] = None @@ -8752,6 +15449,18 @@ class DocumentTaskCommentMentionedUserChildImage(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["image"]] = None @@ -8762,12 +15471,36 @@ class DocumentTaskCommentMentionedUserChildLink(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["link"]] = None class DocumentTaskCommentMentionedUserChildLineBreak(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["line_break"]] = None @@ -8778,6 +15511,18 @@ class DocumentTaskCommentMentionedUserChildText(BaseModel): marks: Optional[List[Literal["bold", "italic", "underline", "strikethrough", "code", "math"]]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["text"]] = None @@ -8792,6 +15537,18 @@ class DocumentTaskCommentMentionedUserChildToolCall(BaseModel): args: Optional[Dict[str, object]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["tool_call"]] = None @@ -8808,6 +15565,18 @@ class DocumentTaskCommentMentionedUserChildToolResult(BaseModel): is_error: Optional[bool] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["tool_result"]] = None @@ -8820,6 +15589,18 @@ class DocumentTaskCommentMentionedUserChildTraceMessage(BaseModel): message_type: Optional[Literal["message", "thinking"]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + role: Optional[Literal["user", "assistant"]] = None timestamp: Optional[datetime] = None @@ -8871,6 +15652,18 @@ class DocumentTaskCommentMentionedUser(BaseModel): link_urls: Optional[List[str]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + name: Optional[str] = None phone_numbers: Optional[List[str]] = None @@ -8906,6 +15699,18 @@ class DocumentTaskComment(BaseModel): mentioned_users: Optional[List[DocumentTaskCommentMentionedUser]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + num_replies: Optional[int] = None replies: Optional[List[object]] = None @@ -8935,6 +15740,18 @@ class DocumentTask(BaseModel): due_at: Optional[datetime] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + priority: Optional[Literal["urgent", "high", "medium", "low"]] = None status: Optional[Literal["completed", "not_started", "in_progress", "cancelled"]] = None @@ -8957,6 +15774,18 @@ class DocumentPersonChildBlob(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["blob"]] = None @@ -8967,6 +15796,18 @@ class DocumentPersonChildCode(BaseModel): language: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["code"]] = None @@ -8977,12 +15818,36 @@ class DocumentPersonChildComment(BaseModel): created_at: Optional[datetime] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["comment"]] = None class DocumentPersonChildDivider(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["divider"]] = None @@ -8993,6 +15858,18 @@ class DocumentPersonChildImage(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["image"]] = None @@ -9003,12 +15880,36 @@ class DocumentPersonChildLink(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["link"]] = None class DocumentPersonChildLineBreak(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["line_break"]] = None @@ -9019,6 +15920,18 @@ class DocumentPersonChildText(BaseModel): marks: Optional[List[Literal["bold", "italic", "underline", "strikethrough", "code", "math"]]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["text"]] = None @@ -9033,6 +15946,18 @@ class DocumentPersonChildToolCall(BaseModel): args: Optional[Dict[str, object]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["tool_call"]] = None @@ -9049,6 +15974,18 @@ class DocumentPersonChildToolResult(BaseModel): is_error: Optional[bool] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["tool_result"]] = None @@ -9061,6 +15998,18 @@ class DocumentPersonChildTraceMessage(BaseModel): message_type: Optional[Literal["message", "thinking"]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + role: Optional[Literal["user", "assistant"]] = None timestamp: Optional[datetime] = None @@ -9112,6 +16061,18 @@ class DocumentPerson(BaseModel): link_urls: Optional[List[str]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + name: Optional[str] = None phone_numbers: Optional[List[str]] = None @@ -9138,6 +16099,18 @@ class DocumentMessageSenderChildBlob(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["blob"]] = None @@ -9148,6 +16121,18 @@ class DocumentMessageSenderChildCode(BaseModel): language: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["code"]] = None @@ -9158,12 +16143,36 @@ class DocumentMessageSenderChildComment(BaseModel): created_at: Optional[datetime] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["comment"]] = None class DocumentMessageSenderChildDivider(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["divider"]] = None @@ -9174,6 +16183,18 @@ class DocumentMessageSenderChildImage(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["image"]] = None @@ -9184,12 +16205,36 @@ class DocumentMessageSenderChildLink(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["link"]] = None class DocumentMessageSenderChildLineBreak(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["line_break"]] = None @@ -9200,6 +16245,18 @@ class DocumentMessageSenderChildText(BaseModel): marks: Optional[List[Literal["bold", "italic", "underline", "strikethrough", "code", "math"]]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["text"]] = None @@ -9214,6 +16271,18 @@ class DocumentMessageSenderChildToolCall(BaseModel): args: Optional[Dict[str, object]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["tool_call"]] = None @@ -9230,6 +16299,18 @@ class DocumentMessageSenderChildToolResult(BaseModel): is_error: Optional[bool] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["tool_result"]] = None @@ -9242,6 +16323,18 @@ class DocumentMessageSenderChildTraceMessage(BaseModel): message_type: Optional[Literal["message", "thinking"]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + role: Optional[Literal["user", "assistant"]] = None timestamp: Optional[datetime] = None @@ -9293,6 +16386,18 @@ class DocumentMessageSender(BaseModel): link_urls: Optional[List[str]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + name: Optional[str] = None phone_numbers: Optional[List[str]] = None @@ -9319,6 +16424,18 @@ class DocumentMessageChildBlob(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["blob"]] = None @@ -9335,6 +16452,18 @@ class DocumentMessageChildCalloutChildBlob(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["blob"]] = None @@ -9345,6 +16474,18 @@ class DocumentMessageChildCalloutChildCode(BaseModel): language: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["code"]] = None @@ -9355,12 +16496,36 @@ class DocumentMessageChildCalloutChildComment(BaseModel): created_at: Optional[datetime] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["comment"]] = None class DocumentMessageChildCalloutChildDivider(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["divider"]] = None @@ -9371,6 +16536,18 @@ class DocumentMessageChildCalloutChildImage(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["image"]] = None @@ -9381,12 +16558,36 @@ class DocumentMessageChildCalloutChildLink(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["link"]] = None class DocumentMessageChildCalloutChildLineBreak(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["line_break"]] = None @@ -9397,6 +16598,18 @@ class DocumentMessageChildCalloutChildText(BaseModel): marks: Optional[List[Literal["bold", "italic", "underline", "strikethrough", "code", "math"]]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["text"]] = None @@ -9411,6 +16624,18 @@ class DocumentMessageChildCalloutChildToolCall(BaseModel): args: Optional[Dict[str, object]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["tool_call"]] = None @@ -9427,6 +16652,18 @@ class DocumentMessageChildCalloutChildToolResult(BaseModel): is_error: Optional[bool] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["tool_result"]] = None @@ -9439,6 +16676,18 @@ class DocumentMessageChildCalloutChildTraceMessage(BaseModel): message_type: Optional[Literal["message", "thinking"]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + role: Optional[Literal["user", "assistant"]] = None timestamp: Optional[datetime] = None @@ -9467,6 +16716,18 @@ class DocumentMessageChildCallout(BaseModel): children: Optional[List[DocumentMessageChildCalloutChild]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + text: Optional[str] = None title: Optional[str] = None @@ -9487,6 +16748,18 @@ class DocumentMessageChildChunkChildBlob(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["blob"]] = None @@ -9497,6 +16770,18 @@ class DocumentMessageChildChunkChildCode(BaseModel): language: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["code"]] = None @@ -9507,12 +16792,36 @@ class DocumentMessageChildChunkChildComment(BaseModel): created_at: Optional[datetime] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["comment"]] = None class DocumentMessageChildChunkChildDivider(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["divider"]] = None @@ -9523,6 +16832,18 @@ class DocumentMessageChildChunkChildImage(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["image"]] = None @@ -9533,12 +16854,36 @@ class DocumentMessageChildChunkChildLink(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["link"]] = None class DocumentMessageChildChunkChildLineBreak(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["line_break"]] = None @@ -9549,6 +16894,18 @@ class DocumentMessageChildChunkChildText(BaseModel): marks: Optional[List[Literal["bold", "italic", "underline", "strikethrough", "code", "math"]]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["text"]] = None @@ -9563,6 +16920,18 @@ class DocumentMessageChildChunkChildToolCall(BaseModel): args: Optional[Dict[str, object]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["tool_call"]] = None @@ -9579,6 +16948,18 @@ class DocumentMessageChildChunkChildToolResult(BaseModel): is_error: Optional[bool] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["tool_result"]] = None @@ -9591,6 +16972,18 @@ class DocumentMessageChildChunkChildTraceMessage(BaseModel): message_type: Optional[Literal["message", "thinking"]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + role: Optional[Literal["user", "assistant"]] = None timestamp: Optional[datetime] = None @@ -9619,6 +17012,18 @@ class DocumentMessageChildChunk(BaseModel): children: Optional[List[DocumentMessageChildChunkChild]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + text: Optional[str] = None type: Optional[Literal["chunk"]] = None @@ -9631,6 +17036,18 @@ class DocumentMessageChildCode(BaseModel): language: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["code"]] = None @@ -9641,12 +17058,36 @@ class DocumentMessageChildComment(BaseModel): created_at: Optional[datetime] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["comment"]] = None class DocumentMessageChildDivider(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["divider"]] = None @@ -9663,6 +17104,18 @@ class DocumentMessageChildEquationChildBlob(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["blob"]] = None @@ -9673,6 +17126,18 @@ class DocumentMessageChildEquationChildCode(BaseModel): language: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["code"]] = None @@ -9683,12 +17148,36 @@ class DocumentMessageChildEquationChildComment(BaseModel): created_at: Optional[datetime] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["comment"]] = None class DocumentMessageChildEquationChildDivider(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["divider"]] = None @@ -9699,6 +17188,18 @@ class DocumentMessageChildEquationChildImage(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["image"]] = None @@ -9709,12 +17210,36 @@ class DocumentMessageChildEquationChildLink(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["link"]] = None class DocumentMessageChildEquationChildLineBreak(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["line_break"]] = None @@ -9725,6 +17250,18 @@ class DocumentMessageChildEquationChildText(BaseModel): marks: Optional[List[Literal["bold", "italic", "underline", "strikethrough", "code", "math"]]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["text"]] = None @@ -9739,6 +17276,18 @@ class DocumentMessageChildEquationChildToolCall(BaseModel): args: Optional[Dict[str, object]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["tool_call"]] = None @@ -9755,6 +17304,18 @@ class DocumentMessageChildEquationChildToolResult(BaseModel): is_error: Optional[bool] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["tool_result"]] = None @@ -9767,6 +17328,18 @@ class DocumentMessageChildEquationChildTraceMessage(BaseModel): message_type: Optional[Literal["message", "thinking"]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + role: Optional[Literal["user", "assistant"]] = None timestamp: Optional[datetime] = None @@ -9795,6 +17368,18 @@ class DocumentMessageChildEquation(BaseModel): children: Optional[List[DocumentMessageChildEquationChild]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + text: Optional[str] = None type: Optional[Literal["equation"]] = None @@ -9813,6 +17398,18 @@ class DocumentMessageChildFootnoteChildBlob(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["blob"]] = None @@ -9823,6 +17420,18 @@ class DocumentMessageChildFootnoteChildCode(BaseModel): language: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["code"]] = None @@ -9833,12 +17442,36 @@ class DocumentMessageChildFootnoteChildComment(BaseModel): created_at: Optional[datetime] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["comment"]] = None class DocumentMessageChildFootnoteChildDivider(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["divider"]] = None @@ -9849,6 +17482,18 @@ class DocumentMessageChildFootnoteChildImage(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["image"]] = None @@ -9859,12 +17504,36 @@ class DocumentMessageChildFootnoteChildLink(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["link"]] = None class DocumentMessageChildFootnoteChildLineBreak(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["line_break"]] = None @@ -9875,6 +17544,18 @@ class DocumentMessageChildFootnoteChildText(BaseModel): marks: Optional[List[Literal["bold", "italic", "underline", "strikethrough", "code", "math"]]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["text"]] = None @@ -9889,6 +17570,18 @@ class DocumentMessageChildFootnoteChildToolCall(BaseModel): args: Optional[Dict[str, object]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["tool_call"]] = None @@ -9905,6 +17598,18 @@ class DocumentMessageChildFootnoteChildToolResult(BaseModel): is_error: Optional[bool] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["tool_result"]] = None @@ -9917,6 +17622,18 @@ class DocumentMessageChildFootnoteChildTraceMessage(BaseModel): message_type: Optional[Literal["message", "thinking"]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + role: Optional[Literal["user", "assistant"]] = None timestamp: Optional[datetime] = None @@ -9945,6 +17662,18 @@ class DocumentMessageChildFootnote(BaseModel): children: Optional[List[DocumentMessageChildFootnoteChild]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + text: Optional[str] = None type: Optional[Literal["footnote"]] = None @@ -9963,6 +17692,18 @@ class DocumentMessageChildHeadingChildBlob(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["blob"]] = None @@ -9973,6 +17714,18 @@ class DocumentMessageChildHeadingChildCode(BaseModel): language: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["code"]] = None @@ -9983,12 +17736,36 @@ class DocumentMessageChildHeadingChildComment(BaseModel): created_at: Optional[datetime] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["comment"]] = None class DocumentMessageChildHeadingChildDivider(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["divider"]] = None @@ -9999,6 +17776,18 @@ class DocumentMessageChildHeadingChildImage(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["image"]] = None @@ -10009,12 +17798,36 @@ class DocumentMessageChildHeadingChildLink(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["link"]] = None class DocumentMessageChildHeadingChildLineBreak(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["line_break"]] = None @@ -10025,6 +17838,18 @@ class DocumentMessageChildHeadingChildText(BaseModel): marks: Optional[List[Literal["bold", "italic", "underline", "strikethrough", "code", "math"]]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["text"]] = None @@ -10039,6 +17864,18 @@ class DocumentMessageChildHeadingChildToolCall(BaseModel): args: Optional[Dict[str, object]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["tool_call"]] = None @@ -10055,6 +17892,18 @@ class DocumentMessageChildHeadingChildToolResult(BaseModel): is_error: Optional[bool] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["tool_result"]] = None @@ -10067,6 +17916,18 @@ class DocumentMessageChildHeadingChildTraceMessage(BaseModel): message_type: Optional[Literal["message", "thinking"]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + role: Optional[Literal["user", "assistant"]] = None timestamp: Optional[datetime] = None @@ -10097,6 +17958,18 @@ class DocumentMessageChildHeading(BaseModel): children: Optional[List[DocumentMessageChildHeadingChild]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + text: Optional[str] = None type: Optional[Literal["heading"]] = None @@ -10109,6 +17982,18 @@ class DocumentMessageChildImage(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["image"]] = None @@ -10119,12 +18004,36 @@ class DocumentMessageChildLink(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["link"]] = None class DocumentMessageChildLineBreak(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["line_break"]] = None @@ -10133,6 +18042,18 @@ class DocumentMessageChildList(BaseModel): children: Optional[List[object]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + ordered: Optional[bool] = None text: Optional[str] = None @@ -10153,6 +18074,18 @@ class DocumentMessageChildListItemChildBlob(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["blob"]] = None @@ -10163,6 +18096,18 @@ class DocumentMessageChildListItemChildCode(BaseModel): language: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["code"]] = None @@ -10173,12 +18118,36 @@ class DocumentMessageChildListItemChildComment(BaseModel): created_at: Optional[datetime] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["comment"]] = None class DocumentMessageChildListItemChildDivider(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["divider"]] = None @@ -10189,6 +18158,18 @@ class DocumentMessageChildListItemChildImage(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["image"]] = None @@ -10199,12 +18180,36 @@ class DocumentMessageChildListItemChildLink(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["link"]] = None class DocumentMessageChildListItemChildLineBreak(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["line_break"]] = None @@ -10215,6 +18220,18 @@ class DocumentMessageChildListItemChildText(BaseModel): marks: Optional[List[Literal["bold", "italic", "underline", "strikethrough", "code", "math"]]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["text"]] = None @@ -10229,6 +18246,18 @@ class DocumentMessageChildListItemChildToolCall(BaseModel): args: Optional[Dict[str, object]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["tool_call"]] = None @@ -10245,6 +18274,18 @@ class DocumentMessageChildListItemChildToolResult(BaseModel): is_error: Optional[bool] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["tool_result"]] = None @@ -10257,6 +18298,18 @@ class DocumentMessageChildListItemChildTraceMessage(BaseModel): message_type: Optional[Literal["message", "thinking"]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + role: Optional[Literal["user", "assistant"]] = None timestamp: Optional[datetime] = None @@ -10285,6 +18338,18 @@ class DocumentMessageChildListItem(BaseModel): children: Optional[List[DocumentMessageChildListItemChild]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + text: Optional[str] = None type: Optional[Literal["list_item"]] = None @@ -10303,6 +18368,18 @@ class DocumentMessageChildParagraphChildBlob(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["blob"]] = None @@ -10313,6 +18390,18 @@ class DocumentMessageChildParagraphChildCode(BaseModel): language: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["code"]] = None @@ -10323,12 +18412,36 @@ class DocumentMessageChildParagraphChildComment(BaseModel): created_at: Optional[datetime] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["comment"]] = None class DocumentMessageChildParagraphChildDivider(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["divider"]] = None @@ -10339,6 +18452,18 @@ class DocumentMessageChildParagraphChildImage(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["image"]] = None @@ -10349,12 +18474,36 @@ class DocumentMessageChildParagraphChildLink(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["link"]] = None class DocumentMessageChildParagraphChildLineBreak(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["line_break"]] = None @@ -10365,6 +18514,18 @@ class DocumentMessageChildParagraphChildText(BaseModel): marks: Optional[List[Literal["bold", "italic", "underline", "strikethrough", "code", "math"]]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["text"]] = None @@ -10379,6 +18540,18 @@ class DocumentMessageChildParagraphChildToolCall(BaseModel): args: Optional[Dict[str, object]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["tool_call"]] = None @@ -10395,6 +18568,18 @@ class DocumentMessageChildParagraphChildToolResult(BaseModel): is_error: Optional[bool] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["tool_result"]] = None @@ -10407,6 +18592,18 @@ class DocumentMessageChildParagraphChildTraceMessage(BaseModel): message_type: Optional[Literal["message", "thinking"]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + role: Optional[Literal["user", "assistant"]] = None timestamp: Optional[datetime] = None @@ -10435,6 +18632,18 @@ class DocumentMessageChildParagraph(BaseModel): children: Optional[List[DocumentMessageChildParagraphChild]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + text: Optional[str] = None type: Optional[Literal["paragraph"]] = None @@ -10453,6 +18662,18 @@ class DocumentMessageChildQuoteChildBlob(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["blob"]] = None @@ -10463,6 +18684,18 @@ class DocumentMessageChildQuoteChildCode(BaseModel): language: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["code"]] = None @@ -10473,12 +18706,36 @@ class DocumentMessageChildQuoteChildComment(BaseModel): created_at: Optional[datetime] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["comment"]] = None class DocumentMessageChildQuoteChildDivider(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["divider"]] = None @@ -10489,6 +18746,18 @@ class DocumentMessageChildQuoteChildImage(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["image"]] = None @@ -10499,12 +18768,36 @@ class DocumentMessageChildQuoteChildLink(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["link"]] = None class DocumentMessageChildQuoteChildLineBreak(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["line_break"]] = None @@ -10515,6 +18808,18 @@ class DocumentMessageChildQuoteChildText(BaseModel): marks: Optional[List[Literal["bold", "italic", "underline", "strikethrough", "code", "math"]]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["text"]] = None @@ -10529,6 +18834,18 @@ class DocumentMessageChildQuoteChildToolCall(BaseModel): args: Optional[Dict[str, object]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["tool_call"]] = None @@ -10545,6 +18862,18 @@ class DocumentMessageChildQuoteChildToolResult(BaseModel): is_error: Optional[bool] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["tool_result"]] = None @@ -10557,6 +18886,18 @@ class DocumentMessageChildQuoteChildTraceMessage(BaseModel): message_type: Optional[Literal["message", "thinking"]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + role: Optional[Literal["user", "assistant"]] = None timestamp: Optional[datetime] = None @@ -10585,6 +18926,18 @@ class DocumentMessageChildQuote(BaseModel): children: Optional[List[DocumentMessageChildQuoteChild]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + text: Optional[str] = None type: Optional[Literal["quote"]] = None @@ -10598,6 +18951,18 @@ class DocumentMessageChildTable(BaseModel): has_header: Optional[bool] = None """Whether the first row should be treated as a header""" + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + text: Optional[str] = None type: Optional[Literal["table"]] = None @@ -10616,6 +18981,18 @@ class DocumentMessageChildTableCellChildBlob(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["blob"]] = None @@ -10626,6 +19003,18 @@ class DocumentMessageChildTableCellChildCode(BaseModel): language: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["code"]] = None @@ -10636,12 +19025,36 @@ class DocumentMessageChildTableCellChildComment(BaseModel): created_at: Optional[datetime] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["comment"]] = None class DocumentMessageChildTableCellChildDivider(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["divider"]] = None @@ -10652,6 +19065,18 @@ class DocumentMessageChildTableCellChildImage(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["image"]] = None @@ -10662,12 +19087,36 @@ class DocumentMessageChildTableCellChildLink(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["link"]] = None class DocumentMessageChildTableCellChildLineBreak(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["line_break"]] = None @@ -10678,6 +19127,18 @@ class DocumentMessageChildTableCellChildText(BaseModel): marks: Optional[List[Literal["bold", "italic", "underline", "strikethrough", "code", "math"]]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["text"]] = None @@ -10692,6 +19153,18 @@ class DocumentMessageChildTableCellChildToolCall(BaseModel): args: Optional[Dict[str, object]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["tool_call"]] = None @@ -10708,6 +19181,18 @@ class DocumentMessageChildTableCellChildToolResult(BaseModel): is_error: Optional[bool] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["tool_result"]] = None @@ -10720,6 +19205,18 @@ class DocumentMessageChildTableCellChildTraceMessage(BaseModel): message_type: Optional[Literal["message", "thinking"]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + role: Optional[Literal["user", "assistant"]] = None timestamp: Optional[datetime] = None @@ -10750,6 +19247,18 @@ class DocumentMessageChildTableCell(BaseModel): children: Optional[List[DocumentMessageChildTableCellChild]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + text: Optional[str] = None type: Optional[Literal["table_cell"]] = None @@ -10760,6 +19269,18 @@ class DocumentMessageChildTableRow(BaseModel): children: Optional[List[object]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + text: Optional[str] = None type: Optional[Literal["table_row"]] = None @@ -10772,6 +19293,18 @@ class DocumentMessageChildText(BaseModel): marks: Optional[List[Literal["bold", "italic", "underline", "strikethrough", "code", "math"]]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["text"]] = None @@ -10788,6 +19321,18 @@ class DocumentMessageChildToDoChildBlob(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["blob"]] = None @@ -10798,6 +19343,18 @@ class DocumentMessageChildToDoChildCode(BaseModel): language: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["code"]] = None @@ -10808,12 +19365,36 @@ class DocumentMessageChildToDoChildComment(BaseModel): created_at: Optional[datetime] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["comment"]] = None class DocumentMessageChildToDoChildDivider(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["divider"]] = None @@ -10824,6 +19405,18 @@ class DocumentMessageChildToDoChildImage(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["image"]] = None @@ -10834,12 +19427,36 @@ class DocumentMessageChildToDoChildLink(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["link"]] = None class DocumentMessageChildToDoChildLineBreak(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["line_break"]] = None @@ -10850,6 +19467,18 @@ class DocumentMessageChildToDoChildText(BaseModel): marks: Optional[List[Literal["bold", "italic", "underline", "strikethrough", "code", "math"]]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["text"]] = None @@ -10864,6 +19493,18 @@ class DocumentMessageChildToDoChildToolCall(BaseModel): args: Optional[Dict[str, object]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["tool_call"]] = None @@ -10880,6 +19521,18 @@ class DocumentMessageChildToDoChildToolResult(BaseModel): is_error: Optional[bool] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["tool_result"]] = None @@ -10892,6 +19545,18 @@ class DocumentMessageChildToDoChildTraceMessage(BaseModel): message_type: Optional[Literal["message", "thinking"]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + role: Optional[Literal["user", "assistant"]] = None timestamp: Optional[datetime] = None @@ -10922,6 +19587,18 @@ class DocumentMessageChildToDo(BaseModel): children: Optional[List[DocumentMessageChildToDoChild]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + text: Optional[str] = None type: Optional[Literal["todo"]] = None @@ -10938,6 +19615,18 @@ class DocumentMessageChildToolCall(BaseModel): args: Optional[Dict[str, object]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["tool_call"]] = None @@ -10954,6 +19643,18 @@ class DocumentMessageChildToolResult(BaseModel): is_error: Optional[bool] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["tool_result"]] = None @@ -10966,6 +19667,18 @@ class DocumentMessageChildTraceMessage(BaseModel): message_type: Optional[Literal["message", "thinking"]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + role: Optional[Literal["user", "assistant"]] = None timestamp: Optional[datetime] = None @@ -10987,6 +19700,18 @@ class DocumentMessageChildUtterance(BaseModel): end: Optional[float] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + speaker: Optional[object] = None start: Optional[float] = None @@ -11039,6 +19764,18 @@ class DocumentMessageMentionedUserChildBlob(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["blob"]] = None @@ -11049,6 +19786,18 @@ class DocumentMessageMentionedUserChildCode(BaseModel): language: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["code"]] = None @@ -11059,12 +19808,36 @@ class DocumentMessageMentionedUserChildComment(BaseModel): created_at: Optional[datetime] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["comment"]] = None class DocumentMessageMentionedUserChildDivider(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["divider"]] = None @@ -11075,6 +19848,18 @@ class DocumentMessageMentionedUserChildImage(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["image"]] = None @@ -11085,12 +19870,36 @@ class DocumentMessageMentionedUserChildLink(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["link"]] = None class DocumentMessageMentionedUserChildLineBreak(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["line_break"]] = None @@ -11101,6 +19910,18 @@ class DocumentMessageMentionedUserChildText(BaseModel): marks: Optional[List[Literal["bold", "italic", "underline", "strikethrough", "code", "math"]]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["text"]] = None @@ -11115,6 +19936,18 @@ class DocumentMessageMentionedUserChildToolCall(BaseModel): args: Optional[Dict[str, object]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["tool_call"]] = None @@ -11131,6 +19964,18 @@ class DocumentMessageMentionedUserChildToolResult(BaseModel): is_error: Optional[bool] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["tool_result"]] = None @@ -11143,6 +19988,18 @@ class DocumentMessageMentionedUserChildTraceMessage(BaseModel): message_type: Optional[Literal["message", "thinking"]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + role: Optional[Literal["user", "assistant"]] = None timestamp: Optional[datetime] = None @@ -11194,6 +20051,18 @@ class DocumentMessageMentionedUser(BaseModel): link_urls: Optional[List[str]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + name: Optional[str] = None phone_numbers: Optional[List[str]] = None @@ -11229,6 +20098,18 @@ class DocumentMessage(BaseModel): mentioned_users: Optional[List[DocumentMessageMentionedUser]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + num_replies: Optional[int] = None replies: Optional[List[object]] = None @@ -11262,6 +20143,18 @@ class DocumentEventAttendeeChildBlob(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["blob"]] = None @@ -11272,6 +20165,18 @@ class DocumentEventAttendeeChildCode(BaseModel): language: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["code"]] = None @@ -11282,12 +20187,36 @@ class DocumentEventAttendeeChildComment(BaseModel): created_at: Optional[datetime] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["comment"]] = None class DocumentEventAttendeeChildDivider(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["divider"]] = None @@ -11298,6 +20227,18 @@ class DocumentEventAttendeeChildImage(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["image"]] = None @@ -11308,12 +20249,36 @@ class DocumentEventAttendeeChildLink(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["link"]] = None class DocumentEventAttendeeChildLineBreak(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["line_break"]] = None @@ -11324,6 +20289,18 @@ class DocumentEventAttendeeChildText(BaseModel): marks: Optional[List[Literal["bold", "italic", "underline", "strikethrough", "code", "math"]]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["text"]] = None @@ -11338,6 +20315,18 @@ class DocumentEventAttendeeChildToolCall(BaseModel): args: Optional[Dict[str, object]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["tool_call"]] = None @@ -11354,6 +20343,18 @@ class DocumentEventAttendeeChildToolResult(BaseModel): is_error: Optional[bool] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["tool_result"]] = None @@ -11366,6 +20367,18 @@ class DocumentEventAttendeeChildTraceMessage(BaseModel): message_type: Optional[Literal["message", "thinking"]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + role: Optional[Literal["user", "assistant"]] = None timestamp: Optional[datetime] = None @@ -11417,6 +20430,18 @@ class DocumentEventAttendee(BaseModel): link_urls: Optional[List[str]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + name: Optional[str] = None phone_numbers: Optional[List[str]] = None @@ -11443,6 +20468,18 @@ class DocumentEventChildBlob(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["blob"]] = None @@ -11459,6 +20496,18 @@ class DocumentEventChildCalloutChildBlob(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["blob"]] = None @@ -11469,6 +20518,18 @@ class DocumentEventChildCalloutChildCode(BaseModel): language: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["code"]] = None @@ -11479,12 +20540,36 @@ class DocumentEventChildCalloutChildComment(BaseModel): created_at: Optional[datetime] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["comment"]] = None class DocumentEventChildCalloutChildDivider(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["divider"]] = None @@ -11495,6 +20580,18 @@ class DocumentEventChildCalloutChildImage(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["image"]] = None @@ -11505,12 +20602,36 @@ class DocumentEventChildCalloutChildLink(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["link"]] = None class DocumentEventChildCalloutChildLineBreak(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["line_break"]] = None @@ -11521,6 +20642,18 @@ class DocumentEventChildCalloutChildText(BaseModel): marks: Optional[List[Literal["bold", "italic", "underline", "strikethrough", "code", "math"]]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["text"]] = None @@ -11535,6 +20668,18 @@ class DocumentEventChildCalloutChildToolCall(BaseModel): args: Optional[Dict[str, object]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["tool_call"]] = None @@ -11551,6 +20696,18 @@ class DocumentEventChildCalloutChildToolResult(BaseModel): is_error: Optional[bool] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["tool_result"]] = None @@ -11563,6 +20720,18 @@ class DocumentEventChildCalloutChildTraceMessage(BaseModel): message_type: Optional[Literal["message", "thinking"]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + role: Optional[Literal["user", "assistant"]] = None timestamp: Optional[datetime] = None @@ -11591,6 +20760,18 @@ class DocumentEventChildCallout(BaseModel): children: Optional[List[DocumentEventChildCalloutChild]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + text: Optional[str] = None title: Optional[str] = None @@ -11611,6 +20792,18 @@ class DocumentEventChildChunkChildBlob(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["blob"]] = None @@ -11621,6 +20814,18 @@ class DocumentEventChildChunkChildCode(BaseModel): language: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["code"]] = None @@ -11631,12 +20836,36 @@ class DocumentEventChildChunkChildComment(BaseModel): created_at: Optional[datetime] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["comment"]] = None class DocumentEventChildChunkChildDivider(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["divider"]] = None @@ -11647,6 +20876,18 @@ class DocumentEventChildChunkChildImage(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["image"]] = None @@ -11657,12 +20898,36 @@ class DocumentEventChildChunkChildLink(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["link"]] = None class DocumentEventChildChunkChildLineBreak(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["line_break"]] = None @@ -11673,6 +20938,18 @@ class DocumentEventChildChunkChildText(BaseModel): marks: Optional[List[Literal["bold", "italic", "underline", "strikethrough", "code", "math"]]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["text"]] = None @@ -11687,6 +20964,18 @@ class DocumentEventChildChunkChildToolCall(BaseModel): args: Optional[Dict[str, object]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["tool_call"]] = None @@ -11703,6 +20992,18 @@ class DocumentEventChildChunkChildToolResult(BaseModel): is_error: Optional[bool] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["tool_result"]] = None @@ -11715,6 +21016,18 @@ class DocumentEventChildChunkChildTraceMessage(BaseModel): message_type: Optional[Literal["message", "thinking"]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + role: Optional[Literal["user", "assistant"]] = None timestamp: Optional[datetime] = None @@ -11743,6 +21056,18 @@ class DocumentEventChildChunk(BaseModel): children: Optional[List[DocumentEventChildChunkChild]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + text: Optional[str] = None type: Optional[Literal["chunk"]] = None @@ -11755,6 +21080,18 @@ class DocumentEventChildCode(BaseModel): language: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["code"]] = None @@ -11765,12 +21102,36 @@ class DocumentEventChildComment(BaseModel): created_at: Optional[datetime] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["comment"]] = None class DocumentEventChildDivider(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["divider"]] = None @@ -11787,6 +21148,18 @@ class DocumentEventChildEquationChildBlob(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["blob"]] = None @@ -11797,6 +21170,18 @@ class DocumentEventChildEquationChildCode(BaseModel): language: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["code"]] = None @@ -11807,12 +21192,36 @@ class DocumentEventChildEquationChildComment(BaseModel): created_at: Optional[datetime] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["comment"]] = None class DocumentEventChildEquationChildDivider(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["divider"]] = None @@ -11823,6 +21232,18 @@ class DocumentEventChildEquationChildImage(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["image"]] = None @@ -11833,12 +21254,36 @@ class DocumentEventChildEquationChildLink(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["link"]] = None class DocumentEventChildEquationChildLineBreak(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["line_break"]] = None @@ -11849,6 +21294,18 @@ class DocumentEventChildEquationChildText(BaseModel): marks: Optional[List[Literal["bold", "italic", "underline", "strikethrough", "code", "math"]]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["text"]] = None @@ -11863,6 +21320,18 @@ class DocumentEventChildEquationChildToolCall(BaseModel): args: Optional[Dict[str, object]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["tool_call"]] = None @@ -11879,6 +21348,18 @@ class DocumentEventChildEquationChildToolResult(BaseModel): is_error: Optional[bool] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["tool_result"]] = None @@ -11891,6 +21372,18 @@ class DocumentEventChildEquationChildTraceMessage(BaseModel): message_type: Optional[Literal["message", "thinking"]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + role: Optional[Literal["user", "assistant"]] = None timestamp: Optional[datetime] = None @@ -11919,6 +21412,18 @@ class DocumentEventChildEquation(BaseModel): children: Optional[List[DocumentEventChildEquationChild]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + text: Optional[str] = None type: Optional[Literal["equation"]] = None @@ -11937,6 +21442,18 @@ class DocumentEventChildFootnoteChildBlob(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["blob"]] = None @@ -11947,6 +21464,18 @@ class DocumentEventChildFootnoteChildCode(BaseModel): language: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["code"]] = None @@ -11957,12 +21486,36 @@ class DocumentEventChildFootnoteChildComment(BaseModel): created_at: Optional[datetime] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["comment"]] = None class DocumentEventChildFootnoteChildDivider(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["divider"]] = None @@ -11973,6 +21526,18 @@ class DocumentEventChildFootnoteChildImage(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["image"]] = None @@ -11983,12 +21548,36 @@ class DocumentEventChildFootnoteChildLink(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["link"]] = None class DocumentEventChildFootnoteChildLineBreak(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["line_break"]] = None @@ -11999,6 +21588,18 @@ class DocumentEventChildFootnoteChildText(BaseModel): marks: Optional[List[Literal["bold", "italic", "underline", "strikethrough", "code", "math"]]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["text"]] = None @@ -12013,6 +21614,18 @@ class DocumentEventChildFootnoteChildToolCall(BaseModel): args: Optional[Dict[str, object]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["tool_call"]] = None @@ -12029,6 +21642,18 @@ class DocumentEventChildFootnoteChildToolResult(BaseModel): is_error: Optional[bool] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["tool_result"]] = None @@ -12041,6 +21666,18 @@ class DocumentEventChildFootnoteChildTraceMessage(BaseModel): message_type: Optional[Literal["message", "thinking"]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + role: Optional[Literal["user", "assistant"]] = None timestamp: Optional[datetime] = None @@ -12069,6 +21706,18 @@ class DocumentEventChildFootnote(BaseModel): children: Optional[List[DocumentEventChildFootnoteChild]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + text: Optional[str] = None type: Optional[Literal["footnote"]] = None @@ -12087,6 +21736,18 @@ class DocumentEventChildHeadingChildBlob(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["blob"]] = None @@ -12097,6 +21758,18 @@ class DocumentEventChildHeadingChildCode(BaseModel): language: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["code"]] = None @@ -12107,12 +21780,36 @@ class DocumentEventChildHeadingChildComment(BaseModel): created_at: Optional[datetime] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["comment"]] = None class DocumentEventChildHeadingChildDivider(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["divider"]] = None @@ -12123,6 +21820,18 @@ class DocumentEventChildHeadingChildImage(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["image"]] = None @@ -12133,12 +21842,36 @@ class DocumentEventChildHeadingChildLink(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["link"]] = None class DocumentEventChildHeadingChildLineBreak(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["line_break"]] = None @@ -12149,6 +21882,18 @@ class DocumentEventChildHeadingChildText(BaseModel): marks: Optional[List[Literal["bold", "italic", "underline", "strikethrough", "code", "math"]]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["text"]] = None @@ -12163,6 +21908,18 @@ class DocumentEventChildHeadingChildToolCall(BaseModel): args: Optional[Dict[str, object]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["tool_call"]] = None @@ -12179,6 +21936,18 @@ class DocumentEventChildHeadingChildToolResult(BaseModel): is_error: Optional[bool] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["tool_result"]] = None @@ -12191,6 +21960,18 @@ class DocumentEventChildHeadingChildTraceMessage(BaseModel): message_type: Optional[Literal["message", "thinking"]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + role: Optional[Literal["user", "assistant"]] = None timestamp: Optional[datetime] = None @@ -12221,6 +22002,18 @@ class DocumentEventChildHeading(BaseModel): children: Optional[List[DocumentEventChildHeadingChild]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + text: Optional[str] = None type: Optional[Literal["heading"]] = None @@ -12233,6 +22026,18 @@ class DocumentEventChildImage(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["image"]] = None @@ -12243,12 +22048,36 @@ class DocumentEventChildLink(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["link"]] = None class DocumentEventChildLineBreak(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["line_break"]] = None @@ -12257,6 +22086,18 @@ class DocumentEventChildList(BaseModel): children: Optional[List[object]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + ordered: Optional[bool] = None text: Optional[str] = None @@ -12277,6 +22118,18 @@ class DocumentEventChildListItemChildBlob(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["blob"]] = None @@ -12287,6 +22140,18 @@ class DocumentEventChildListItemChildCode(BaseModel): language: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["code"]] = None @@ -12297,12 +22162,36 @@ class DocumentEventChildListItemChildComment(BaseModel): created_at: Optional[datetime] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["comment"]] = None class DocumentEventChildListItemChildDivider(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["divider"]] = None @@ -12313,6 +22202,18 @@ class DocumentEventChildListItemChildImage(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["image"]] = None @@ -12323,12 +22224,36 @@ class DocumentEventChildListItemChildLink(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["link"]] = None class DocumentEventChildListItemChildLineBreak(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["line_break"]] = None @@ -12339,6 +22264,18 @@ class DocumentEventChildListItemChildText(BaseModel): marks: Optional[List[Literal["bold", "italic", "underline", "strikethrough", "code", "math"]]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["text"]] = None @@ -12353,6 +22290,18 @@ class DocumentEventChildListItemChildToolCall(BaseModel): args: Optional[Dict[str, object]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["tool_call"]] = None @@ -12369,6 +22318,18 @@ class DocumentEventChildListItemChildToolResult(BaseModel): is_error: Optional[bool] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["tool_result"]] = None @@ -12381,6 +22342,18 @@ class DocumentEventChildListItemChildTraceMessage(BaseModel): message_type: Optional[Literal["message", "thinking"]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + role: Optional[Literal["user", "assistant"]] = None timestamp: Optional[datetime] = None @@ -12409,6 +22382,18 @@ class DocumentEventChildListItem(BaseModel): children: Optional[List[DocumentEventChildListItemChild]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + text: Optional[str] = None type: Optional[Literal["list_item"]] = None @@ -12427,6 +22412,18 @@ class DocumentEventChildParagraphChildBlob(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["blob"]] = None @@ -12437,6 +22434,18 @@ class DocumentEventChildParagraphChildCode(BaseModel): language: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["code"]] = None @@ -12447,12 +22456,36 @@ class DocumentEventChildParagraphChildComment(BaseModel): created_at: Optional[datetime] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["comment"]] = None class DocumentEventChildParagraphChildDivider(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["divider"]] = None @@ -12463,6 +22496,18 @@ class DocumentEventChildParagraphChildImage(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["image"]] = None @@ -12473,12 +22518,36 @@ class DocumentEventChildParagraphChildLink(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["link"]] = None class DocumentEventChildParagraphChildLineBreak(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["line_break"]] = None @@ -12489,6 +22558,18 @@ class DocumentEventChildParagraphChildText(BaseModel): marks: Optional[List[Literal["bold", "italic", "underline", "strikethrough", "code", "math"]]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["text"]] = None @@ -12503,6 +22584,18 @@ class DocumentEventChildParagraphChildToolCall(BaseModel): args: Optional[Dict[str, object]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["tool_call"]] = None @@ -12519,6 +22612,18 @@ class DocumentEventChildParagraphChildToolResult(BaseModel): is_error: Optional[bool] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["tool_result"]] = None @@ -12531,6 +22636,18 @@ class DocumentEventChildParagraphChildTraceMessage(BaseModel): message_type: Optional[Literal["message", "thinking"]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + role: Optional[Literal["user", "assistant"]] = None timestamp: Optional[datetime] = None @@ -12559,6 +22676,18 @@ class DocumentEventChildParagraph(BaseModel): children: Optional[List[DocumentEventChildParagraphChild]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + text: Optional[str] = None type: Optional[Literal["paragraph"]] = None @@ -12577,6 +22706,18 @@ class DocumentEventChildQuoteChildBlob(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["blob"]] = None @@ -12587,6 +22728,18 @@ class DocumentEventChildQuoteChildCode(BaseModel): language: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["code"]] = None @@ -12597,12 +22750,36 @@ class DocumentEventChildQuoteChildComment(BaseModel): created_at: Optional[datetime] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["comment"]] = None class DocumentEventChildQuoteChildDivider(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["divider"]] = None @@ -12613,6 +22790,18 @@ class DocumentEventChildQuoteChildImage(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["image"]] = None @@ -12623,12 +22812,36 @@ class DocumentEventChildQuoteChildLink(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["link"]] = None class DocumentEventChildQuoteChildLineBreak(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["line_break"]] = None @@ -12639,6 +22852,18 @@ class DocumentEventChildQuoteChildText(BaseModel): marks: Optional[List[Literal["bold", "italic", "underline", "strikethrough", "code", "math"]]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["text"]] = None @@ -12653,6 +22878,18 @@ class DocumentEventChildQuoteChildToolCall(BaseModel): args: Optional[Dict[str, object]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["tool_call"]] = None @@ -12669,6 +22906,18 @@ class DocumentEventChildQuoteChildToolResult(BaseModel): is_error: Optional[bool] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["tool_result"]] = None @@ -12681,6 +22930,18 @@ class DocumentEventChildQuoteChildTraceMessage(BaseModel): message_type: Optional[Literal["message", "thinking"]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + role: Optional[Literal["user", "assistant"]] = None timestamp: Optional[datetime] = None @@ -12709,6 +22970,18 @@ class DocumentEventChildQuote(BaseModel): children: Optional[List[DocumentEventChildQuoteChild]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + text: Optional[str] = None type: Optional[Literal["quote"]] = None @@ -12722,6 +22995,18 @@ class DocumentEventChildTable(BaseModel): has_header: Optional[bool] = None """Whether the first row should be treated as a header""" + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + text: Optional[str] = None type: Optional[Literal["table"]] = None @@ -12740,6 +23025,18 @@ class DocumentEventChildTableCellChildBlob(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["blob"]] = None @@ -12750,6 +23047,18 @@ class DocumentEventChildTableCellChildCode(BaseModel): language: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["code"]] = None @@ -12760,12 +23069,36 @@ class DocumentEventChildTableCellChildComment(BaseModel): created_at: Optional[datetime] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["comment"]] = None class DocumentEventChildTableCellChildDivider(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["divider"]] = None @@ -12776,6 +23109,18 @@ class DocumentEventChildTableCellChildImage(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["image"]] = None @@ -12786,12 +23131,36 @@ class DocumentEventChildTableCellChildLink(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["link"]] = None class DocumentEventChildTableCellChildLineBreak(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["line_break"]] = None @@ -12802,6 +23171,18 @@ class DocumentEventChildTableCellChildText(BaseModel): marks: Optional[List[Literal["bold", "italic", "underline", "strikethrough", "code", "math"]]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["text"]] = None @@ -12816,6 +23197,18 @@ class DocumentEventChildTableCellChildToolCall(BaseModel): args: Optional[Dict[str, object]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["tool_call"]] = None @@ -12832,6 +23225,18 @@ class DocumentEventChildTableCellChildToolResult(BaseModel): is_error: Optional[bool] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["tool_result"]] = None @@ -12844,6 +23249,18 @@ class DocumentEventChildTableCellChildTraceMessage(BaseModel): message_type: Optional[Literal["message", "thinking"]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + role: Optional[Literal["user", "assistant"]] = None timestamp: Optional[datetime] = None @@ -12874,6 +23291,18 @@ class DocumentEventChildTableCell(BaseModel): children: Optional[List[DocumentEventChildTableCellChild]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + text: Optional[str] = None type: Optional[Literal["table_cell"]] = None @@ -12884,6 +23313,18 @@ class DocumentEventChildTableRow(BaseModel): children: Optional[List[object]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + text: Optional[str] = None type: Optional[Literal["table_row"]] = None @@ -12896,6 +23337,18 @@ class DocumentEventChildText(BaseModel): marks: Optional[List[Literal["bold", "italic", "underline", "strikethrough", "code", "math"]]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["text"]] = None @@ -12912,6 +23365,18 @@ class DocumentEventChildToDoChildBlob(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["blob"]] = None @@ -12922,6 +23387,18 @@ class DocumentEventChildToDoChildCode(BaseModel): language: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["code"]] = None @@ -12932,12 +23409,36 @@ class DocumentEventChildToDoChildComment(BaseModel): created_at: Optional[datetime] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["comment"]] = None class DocumentEventChildToDoChildDivider(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["divider"]] = None @@ -12948,6 +23449,18 @@ class DocumentEventChildToDoChildImage(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["image"]] = None @@ -12958,12 +23471,36 @@ class DocumentEventChildToDoChildLink(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["link"]] = None class DocumentEventChildToDoChildLineBreak(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["line_break"]] = None @@ -12974,6 +23511,18 @@ class DocumentEventChildToDoChildText(BaseModel): marks: Optional[List[Literal["bold", "italic", "underline", "strikethrough", "code", "math"]]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["text"]] = None @@ -12988,6 +23537,18 @@ class DocumentEventChildToDoChildToolCall(BaseModel): args: Optional[Dict[str, object]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["tool_call"]] = None @@ -13004,6 +23565,18 @@ class DocumentEventChildToDoChildToolResult(BaseModel): is_error: Optional[bool] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["tool_result"]] = None @@ -13016,6 +23589,18 @@ class DocumentEventChildToDoChildTraceMessage(BaseModel): message_type: Optional[Literal["message", "thinking"]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + role: Optional[Literal["user", "assistant"]] = None timestamp: Optional[datetime] = None @@ -13046,6 +23631,18 @@ class DocumentEventChildToDo(BaseModel): children: Optional[List[DocumentEventChildToDoChild]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + text: Optional[str] = None type: Optional[Literal["todo"]] = None @@ -13062,6 +23659,18 @@ class DocumentEventChildToolCall(BaseModel): args: Optional[Dict[str, object]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["tool_call"]] = None @@ -13078,6 +23687,18 @@ class DocumentEventChildToolResult(BaseModel): is_error: Optional[bool] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["tool_result"]] = None @@ -13090,6 +23711,18 @@ class DocumentEventChildTraceMessage(BaseModel): message_type: Optional[Literal["message", "thinking"]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + role: Optional[Literal["user", "assistant"]] = None timestamp: Optional[datetime] = None @@ -13111,6 +23744,18 @@ class DocumentEventChildUtterance(BaseModel): end: Optional[float] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + speaker: Optional[object] = None start: Optional[float] = None @@ -13163,6 +23808,18 @@ class DocumentEvent(BaseModel): meeting_url: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + start_at: Optional[datetime] = None text: Optional[str] = None @@ -13185,6 +23842,18 @@ class DocumentFileChildBlob(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["blob"]] = None @@ -13201,6 +23870,18 @@ class DocumentFileChildCalloutChildBlob(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["blob"]] = None @@ -13211,6 +23892,18 @@ class DocumentFileChildCalloutChildCode(BaseModel): language: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["code"]] = None @@ -13221,12 +23914,36 @@ class DocumentFileChildCalloutChildComment(BaseModel): created_at: Optional[datetime] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["comment"]] = None class DocumentFileChildCalloutChildDivider(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["divider"]] = None @@ -13237,6 +23954,18 @@ class DocumentFileChildCalloutChildImage(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["image"]] = None @@ -13247,12 +23976,36 @@ class DocumentFileChildCalloutChildLink(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["link"]] = None class DocumentFileChildCalloutChildLineBreak(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["line_break"]] = None @@ -13263,6 +24016,18 @@ class DocumentFileChildCalloutChildText(BaseModel): marks: Optional[List[Literal["bold", "italic", "underline", "strikethrough", "code", "math"]]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["text"]] = None @@ -13277,6 +24042,18 @@ class DocumentFileChildCalloutChildToolCall(BaseModel): args: Optional[Dict[str, object]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["tool_call"]] = None @@ -13293,6 +24070,18 @@ class DocumentFileChildCalloutChildToolResult(BaseModel): is_error: Optional[bool] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["tool_result"]] = None @@ -13305,6 +24094,18 @@ class DocumentFileChildCalloutChildTraceMessage(BaseModel): message_type: Optional[Literal["message", "thinking"]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + role: Optional[Literal["user", "assistant"]] = None timestamp: Optional[datetime] = None @@ -13333,6 +24134,18 @@ class DocumentFileChildCallout(BaseModel): children: Optional[List[DocumentFileChildCalloutChild]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + text: Optional[str] = None title: Optional[str] = None @@ -13353,6 +24166,18 @@ class DocumentFileChildChunkChildBlob(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["blob"]] = None @@ -13363,6 +24188,18 @@ class DocumentFileChildChunkChildCode(BaseModel): language: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["code"]] = None @@ -13373,12 +24210,36 @@ class DocumentFileChildChunkChildComment(BaseModel): created_at: Optional[datetime] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["comment"]] = None class DocumentFileChildChunkChildDivider(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["divider"]] = None @@ -13389,6 +24250,18 @@ class DocumentFileChildChunkChildImage(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["image"]] = None @@ -13399,12 +24272,36 @@ class DocumentFileChildChunkChildLink(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["link"]] = None class DocumentFileChildChunkChildLineBreak(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["line_break"]] = None @@ -13415,6 +24312,18 @@ class DocumentFileChildChunkChildText(BaseModel): marks: Optional[List[Literal["bold", "italic", "underline", "strikethrough", "code", "math"]]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["text"]] = None @@ -13429,6 +24338,18 @@ class DocumentFileChildChunkChildToolCall(BaseModel): args: Optional[Dict[str, object]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["tool_call"]] = None @@ -13445,6 +24366,18 @@ class DocumentFileChildChunkChildToolResult(BaseModel): is_error: Optional[bool] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["tool_result"]] = None @@ -13457,6 +24390,18 @@ class DocumentFileChildChunkChildTraceMessage(BaseModel): message_type: Optional[Literal["message", "thinking"]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + role: Optional[Literal["user", "assistant"]] = None timestamp: Optional[datetime] = None @@ -13485,6 +24430,18 @@ class DocumentFileChildChunk(BaseModel): children: Optional[List[DocumentFileChildChunkChild]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + text: Optional[str] = None type: Optional[Literal["chunk"]] = None @@ -13497,6 +24454,18 @@ class DocumentFileChildCode(BaseModel): language: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["code"]] = None @@ -13507,12 +24476,36 @@ class DocumentFileChildComment(BaseModel): created_at: Optional[datetime] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["comment"]] = None class DocumentFileChildDivider(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["divider"]] = None @@ -13529,6 +24522,18 @@ class DocumentFileChildEquationChildBlob(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["blob"]] = None @@ -13539,6 +24544,18 @@ class DocumentFileChildEquationChildCode(BaseModel): language: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["code"]] = None @@ -13549,12 +24566,36 @@ class DocumentFileChildEquationChildComment(BaseModel): created_at: Optional[datetime] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["comment"]] = None class DocumentFileChildEquationChildDivider(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["divider"]] = None @@ -13565,6 +24606,18 @@ class DocumentFileChildEquationChildImage(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["image"]] = None @@ -13575,12 +24628,36 @@ class DocumentFileChildEquationChildLink(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["link"]] = None class DocumentFileChildEquationChildLineBreak(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["line_break"]] = None @@ -13591,6 +24668,18 @@ class DocumentFileChildEquationChildText(BaseModel): marks: Optional[List[Literal["bold", "italic", "underline", "strikethrough", "code", "math"]]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["text"]] = None @@ -13605,6 +24694,18 @@ class DocumentFileChildEquationChildToolCall(BaseModel): args: Optional[Dict[str, object]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["tool_call"]] = None @@ -13621,6 +24722,18 @@ class DocumentFileChildEquationChildToolResult(BaseModel): is_error: Optional[bool] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["tool_result"]] = None @@ -13633,6 +24746,18 @@ class DocumentFileChildEquationChildTraceMessage(BaseModel): message_type: Optional[Literal["message", "thinking"]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + role: Optional[Literal["user", "assistant"]] = None timestamp: Optional[datetime] = None @@ -13661,6 +24786,18 @@ class DocumentFileChildEquation(BaseModel): children: Optional[List[DocumentFileChildEquationChild]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + text: Optional[str] = None type: Optional[Literal["equation"]] = None @@ -13679,6 +24816,18 @@ class DocumentFileChildFootnoteChildBlob(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["blob"]] = None @@ -13689,6 +24838,18 @@ class DocumentFileChildFootnoteChildCode(BaseModel): language: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["code"]] = None @@ -13699,12 +24860,36 @@ class DocumentFileChildFootnoteChildComment(BaseModel): created_at: Optional[datetime] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["comment"]] = None class DocumentFileChildFootnoteChildDivider(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["divider"]] = None @@ -13715,6 +24900,18 @@ class DocumentFileChildFootnoteChildImage(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["image"]] = None @@ -13725,12 +24922,36 @@ class DocumentFileChildFootnoteChildLink(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["link"]] = None class DocumentFileChildFootnoteChildLineBreak(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["line_break"]] = None @@ -13741,6 +24962,18 @@ class DocumentFileChildFootnoteChildText(BaseModel): marks: Optional[List[Literal["bold", "italic", "underline", "strikethrough", "code", "math"]]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["text"]] = None @@ -13755,6 +24988,18 @@ class DocumentFileChildFootnoteChildToolCall(BaseModel): args: Optional[Dict[str, object]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["tool_call"]] = None @@ -13771,6 +25016,18 @@ class DocumentFileChildFootnoteChildToolResult(BaseModel): is_error: Optional[bool] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["tool_result"]] = None @@ -13783,6 +25040,18 @@ class DocumentFileChildFootnoteChildTraceMessage(BaseModel): message_type: Optional[Literal["message", "thinking"]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + role: Optional[Literal["user", "assistant"]] = None timestamp: Optional[datetime] = None @@ -13811,6 +25080,18 @@ class DocumentFileChildFootnote(BaseModel): children: Optional[List[DocumentFileChildFootnoteChild]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + text: Optional[str] = None type: Optional[Literal["footnote"]] = None @@ -13829,6 +25110,18 @@ class DocumentFileChildHeadingChildBlob(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["blob"]] = None @@ -13839,6 +25132,18 @@ class DocumentFileChildHeadingChildCode(BaseModel): language: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["code"]] = None @@ -13849,12 +25154,36 @@ class DocumentFileChildHeadingChildComment(BaseModel): created_at: Optional[datetime] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["comment"]] = None class DocumentFileChildHeadingChildDivider(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["divider"]] = None @@ -13865,6 +25194,18 @@ class DocumentFileChildHeadingChildImage(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["image"]] = None @@ -13875,12 +25216,36 @@ class DocumentFileChildHeadingChildLink(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["link"]] = None class DocumentFileChildHeadingChildLineBreak(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["line_break"]] = None @@ -13891,6 +25256,18 @@ class DocumentFileChildHeadingChildText(BaseModel): marks: Optional[List[Literal["bold", "italic", "underline", "strikethrough", "code", "math"]]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["text"]] = None @@ -13905,6 +25282,18 @@ class DocumentFileChildHeadingChildToolCall(BaseModel): args: Optional[Dict[str, object]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["tool_call"]] = None @@ -13921,6 +25310,18 @@ class DocumentFileChildHeadingChildToolResult(BaseModel): is_error: Optional[bool] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["tool_result"]] = None @@ -13933,6 +25334,18 @@ class DocumentFileChildHeadingChildTraceMessage(BaseModel): message_type: Optional[Literal["message", "thinking"]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + role: Optional[Literal["user", "assistant"]] = None timestamp: Optional[datetime] = None @@ -13963,6 +25376,18 @@ class DocumentFileChildHeading(BaseModel): children: Optional[List[DocumentFileChildHeadingChild]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + text: Optional[str] = None type: Optional[Literal["heading"]] = None @@ -13975,6 +25400,18 @@ class DocumentFileChildImage(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["image"]] = None @@ -13985,12 +25422,36 @@ class DocumentFileChildLink(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["link"]] = None class DocumentFileChildLineBreak(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["line_break"]] = None @@ -13999,6 +25460,18 @@ class DocumentFileChildList(BaseModel): children: Optional[List[object]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + ordered: Optional[bool] = None text: Optional[str] = None @@ -14019,6 +25492,18 @@ class DocumentFileChildListItemChildBlob(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["blob"]] = None @@ -14029,6 +25514,18 @@ class DocumentFileChildListItemChildCode(BaseModel): language: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["code"]] = None @@ -14039,12 +25536,36 @@ class DocumentFileChildListItemChildComment(BaseModel): created_at: Optional[datetime] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["comment"]] = None class DocumentFileChildListItemChildDivider(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["divider"]] = None @@ -14055,6 +25576,18 @@ class DocumentFileChildListItemChildImage(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["image"]] = None @@ -14065,12 +25598,36 @@ class DocumentFileChildListItemChildLink(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["link"]] = None class DocumentFileChildListItemChildLineBreak(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["line_break"]] = None @@ -14081,6 +25638,18 @@ class DocumentFileChildListItemChildText(BaseModel): marks: Optional[List[Literal["bold", "italic", "underline", "strikethrough", "code", "math"]]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["text"]] = None @@ -14095,6 +25664,18 @@ class DocumentFileChildListItemChildToolCall(BaseModel): args: Optional[Dict[str, object]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["tool_call"]] = None @@ -14111,6 +25692,18 @@ class DocumentFileChildListItemChildToolResult(BaseModel): is_error: Optional[bool] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["tool_result"]] = None @@ -14123,6 +25716,18 @@ class DocumentFileChildListItemChildTraceMessage(BaseModel): message_type: Optional[Literal["message", "thinking"]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + role: Optional[Literal["user", "assistant"]] = None timestamp: Optional[datetime] = None @@ -14151,6 +25756,18 @@ class DocumentFileChildListItem(BaseModel): children: Optional[List[DocumentFileChildListItemChild]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + text: Optional[str] = None type: Optional[Literal["list_item"]] = None @@ -14169,6 +25786,18 @@ class DocumentFileChildParagraphChildBlob(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["blob"]] = None @@ -14179,6 +25808,18 @@ class DocumentFileChildParagraphChildCode(BaseModel): language: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["code"]] = None @@ -14189,12 +25830,36 @@ class DocumentFileChildParagraphChildComment(BaseModel): created_at: Optional[datetime] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["comment"]] = None class DocumentFileChildParagraphChildDivider(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["divider"]] = None @@ -14205,6 +25870,18 @@ class DocumentFileChildParagraphChildImage(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["image"]] = None @@ -14215,12 +25892,36 @@ class DocumentFileChildParagraphChildLink(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["link"]] = None class DocumentFileChildParagraphChildLineBreak(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["line_break"]] = None @@ -14231,6 +25932,18 @@ class DocumentFileChildParagraphChildText(BaseModel): marks: Optional[List[Literal["bold", "italic", "underline", "strikethrough", "code", "math"]]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["text"]] = None @@ -14245,6 +25958,18 @@ class DocumentFileChildParagraphChildToolCall(BaseModel): args: Optional[Dict[str, object]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["tool_call"]] = None @@ -14261,6 +25986,18 @@ class DocumentFileChildParagraphChildToolResult(BaseModel): is_error: Optional[bool] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["tool_result"]] = None @@ -14273,6 +26010,18 @@ class DocumentFileChildParagraphChildTraceMessage(BaseModel): message_type: Optional[Literal["message", "thinking"]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + role: Optional[Literal["user", "assistant"]] = None timestamp: Optional[datetime] = None @@ -14301,6 +26050,18 @@ class DocumentFileChildParagraph(BaseModel): children: Optional[List[DocumentFileChildParagraphChild]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + text: Optional[str] = None type: Optional[Literal["paragraph"]] = None @@ -14319,6 +26080,18 @@ class DocumentFileChildQuoteChildBlob(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["blob"]] = None @@ -14329,6 +26102,18 @@ class DocumentFileChildQuoteChildCode(BaseModel): language: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["code"]] = None @@ -14339,12 +26124,36 @@ class DocumentFileChildQuoteChildComment(BaseModel): created_at: Optional[datetime] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["comment"]] = None class DocumentFileChildQuoteChildDivider(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["divider"]] = None @@ -14355,6 +26164,18 @@ class DocumentFileChildQuoteChildImage(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["image"]] = None @@ -14365,12 +26186,36 @@ class DocumentFileChildQuoteChildLink(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["link"]] = None class DocumentFileChildQuoteChildLineBreak(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["line_break"]] = None @@ -14381,6 +26226,18 @@ class DocumentFileChildQuoteChildText(BaseModel): marks: Optional[List[Literal["bold", "italic", "underline", "strikethrough", "code", "math"]]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["text"]] = None @@ -14395,6 +26252,18 @@ class DocumentFileChildQuoteChildToolCall(BaseModel): args: Optional[Dict[str, object]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["tool_call"]] = None @@ -14411,6 +26280,18 @@ class DocumentFileChildQuoteChildToolResult(BaseModel): is_error: Optional[bool] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["tool_result"]] = None @@ -14423,6 +26304,18 @@ class DocumentFileChildQuoteChildTraceMessage(BaseModel): message_type: Optional[Literal["message", "thinking"]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + role: Optional[Literal["user", "assistant"]] = None timestamp: Optional[datetime] = None @@ -14451,6 +26344,18 @@ class DocumentFileChildQuote(BaseModel): children: Optional[List[DocumentFileChildQuoteChild]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + text: Optional[str] = None type: Optional[Literal["quote"]] = None @@ -14464,6 +26369,18 @@ class DocumentFileChildTable(BaseModel): has_header: Optional[bool] = None """Whether the first row should be treated as a header""" + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + text: Optional[str] = None type: Optional[Literal["table"]] = None @@ -14482,6 +26399,18 @@ class DocumentFileChildTableCellChildBlob(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["blob"]] = None @@ -14492,6 +26421,18 @@ class DocumentFileChildTableCellChildCode(BaseModel): language: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["code"]] = None @@ -14502,12 +26443,36 @@ class DocumentFileChildTableCellChildComment(BaseModel): created_at: Optional[datetime] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["comment"]] = None class DocumentFileChildTableCellChildDivider(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["divider"]] = None @@ -14518,6 +26483,18 @@ class DocumentFileChildTableCellChildImage(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["image"]] = None @@ -14528,12 +26505,36 @@ class DocumentFileChildTableCellChildLink(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["link"]] = None class DocumentFileChildTableCellChildLineBreak(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["line_break"]] = None @@ -14544,6 +26545,18 @@ class DocumentFileChildTableCellChildText(BaseModel): marks: Optional[List[Literal["bold", "italic", "underline", "strikethrough", "code", "math"]]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["text"]] = None @@ -14558,6 +26571,18 @@ class DocumentFileChildTableCellChildToolCall(BaseModel): args: Optional[Dict[str, object]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["tool_call"]] = None @@ -14574,6 +26599,18 @@ class DocumentFileChildTableCellChildToolResult(BaseModel): is_error: Optional[bool] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["tool_result"]] = None @@ -14586,6 +26623,18 @@ class DocumentFileChildTableCellChildTraceMessage(BaseModel): message_type: Optional[Literal["message", "thinking"]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + role: Optional[Literal["user", "assistant"]] = None timestamp: Optional[datetime] = None @@ -14616,6 +26665,18 @@ class DocumentFileChildTableCell(BaseModel): children: Optional[List[DocumentFileChildTableCellChild]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + text: Optional[str] = None type: Optional[Literal["table_cell"]] = None @@ -14626,6 +26687,18 @@ class DocumentFileChildTableRow(BaseModel): children: Optional[List[object]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + text: Optional[str] = None type: Optional[Literal["table_row"]] = None @@ -14638,6 +26711,18 @@ class DocumentFileChildText(BaseModel): marks: Optional[List[Literal["bold", "italic", "underline", "strikethrough", "code", "math"]]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["text"]] = None @@ -14654,6 +26739,18 @@ class DocumentFileChildToDoChildBlob(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["blob"]] = None @@ -14664,6 +26761,18 @@ class DocumentFileChildToDoChildCode(BaseModel): language: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["code"]] = None @@ -14674,12 +26783,36 @@ class DocumentFileChildToDoChildComment(BaseModel): created_at: Optional[datetime] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["comment"]] = None class DocumentFileChildToDoChildDivider(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["divider"]] = None @@ -14690,6 +26823,18 @@ class DocumentFileChildToDoChildImage(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["image"]] = None @@ -14700,12 +26845,36 @@ class DocumentFileChildToDoChildLink(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["link"]] = None class DocumentFileChildToDoChildLineBreak(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["line_break"]] = None @@ -14716,6 +26885,18 @@ class DocumentFileChildToDoChildText(BaseModel): marks: Optional[List[Literal["bold", "italic", "underline", "strikethrough", "code", "math"]]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["text"]] = None @@ -14730,6 +26911,18 @@ class DocumentFileChildToDoChildToolCall(BaseModel): args: Optional[Dict[str, object]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["tool_call"]] = None @@ -14746,6 +26939,18 @@ class DocumentFileChildToDoChildToolResult(BaseModel): is_error: Optional[bool] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["tool_result"]] = None @@ -14758,6 +26963,18 @@ class DocumentFileChildToDoChildTraceMessage(BaseModel): message_type: Optional[Literal["message", "thinking"]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + role: Optional[Literal["user", "assistant"]] = None timestamp: Optional[datetime] = None @@ -14788,6 +27005,18 @@ class DocumentFileChildToDo(BaseModel): children: Optional[List[DocumentFileChildToDoChild]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + text: Optional[str] = None type: Optional[Literal["todo"]] = None @@ -14804,6 +27033,18 @@ class DocumentFileChildToolCall(BaseModel): args: Optional[Dict[str, object]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["tool_call"]] = None @@ -14820,6 +27061,18 @@ class DocumentFileChildToolResult(BaseModel): is_error: Optional[bool] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["tool_result"]] = None @@ -14832,6 +27085,18 @@ class DocumentFileChildTraceMessage(BaseModel): message_type: Optional[Literal["message", "thinking"]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + role: Optional[Literal["user", "assistant"]] = None timestamp: Optional[datetime] = None @@ -14853,6 +27118,18 @@ class DocumentFileChildUtterance(BaseModel): end: Optional[float] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + speaker: Optional[object] = None start: Optional[float] = None @@ -14901,6 +27178,18 @@ class DocumentFile(BaseModel): children: Optional[List[DocumentFileChild]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + path: Optional[List[str]] = None text: Optional[str] = None @@ -14923,6 +27212,18 @@ class DocumentConversationChildSenderChildBlob(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["blob"]] = None @@ -14933,6 +27234,18 @@ class DocumentConversationChildSenderChildCode(BaseModel): language: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["code"]] = None @@ -14943,12 +27256,36 @@ class DocumentConversationChildSenderChildComment(BaseModel): created_at: Optional[datetime] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["comment"]] = None class DocumentConversationChildSenderChildDivider(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["divider"]] = None @@ -14959,6 +27296,18 @@ class DocumentConversationChildSenderChildImage(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["image"]] = None @@ -14969,12 +27318,36 @@ class DocumentConversationChildSenderChildLink(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["link"]] = None class DocumentConversationChildSenderChildLineBreak(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["line_break"]] = None @@ -14985,6 +27358,18 @@ class DocumentConversationChildSenderChildText(BaseModel): marks: Optional[List[Literal["bold", "italic", "underline", "strikethrough", "code", "math"]]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["text"]] = None @@ -14999,6 +27384,18 @@ class DocumentConversationChildSenderChildToolCall(BaseModel): args: Optional[Dict[str, object]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["tool_call"]] = None @@ -15015,6 +27412,18 @@ class DocumentConversationChildSenderChildToolResult(BaseModel): is_error: Optional[bool] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["tool_result"]] = None @@ -15027,6 +27436,18 @@ class DocumentConversationChildSenderChildTraceMessage(BaseModel): message_type: Optional[Literal["message", "thinking"]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + role: Optional[Literal["user", "assistant"]] = None timestamp: Optional[datetime] = None @@ -15078,6 +27499,18 @@ class DocumentConversationChildSender(BaseModel): link_urls: Optional[List[str]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + name: Optional[str] = None phone_numbers: Optional[List[str]] = None @@ -15104,6 +27537,18 @@ class DocumentConversationChildChildBlob(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["blob"]] = None @@ -15120,6 +27565,18 @@ class DocumentConversationChildChildCalloutChildBlob(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["blob"]] = None @@ -15130,6 +27587,18 @@ class DocumentConversationChildChildCalloutChildCode(BaseModel): language: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["code"]] = None @@ -15140,12 +27609,36 @@ class DocumentConversationChildChildCalloutChildComment(BaseModel): created_at: Optional[datetime] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["comment"]] = None class DocumentConversationChildChildCalloutChildDivider(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["divider"]] = None @@ -15156,6 +27649,18 @@ class DocumentConversationChildChildCalloutChildImage(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["image"]] = None @@ -15166,12 +27671,36 @@ class DocumentConversationChildChildCalloutChildLink(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["link"]] = None class DocumentConversationChildChildCalloutChildLineBreak(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["line_break"]] = None @@ -15182,6 +27711,18 @@ class DocumentConversationChildChildCalloutChildText(BaseModel): marks: Optional[List[Literal["bold", "italic", "underline", "strikethrough", "code", "math"]]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["text"]] = None @@ -15196,6 +27737,18 @@ class DocumentConversationChildChildCalloutChildToolCall(BaseModel): args: Optional[Dict[str, object]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["tool_call"]] = None @@ -15212,6 +27765,18 @@ class DocumentConversationChildChildCalloutChildToolResult(BaseModel): is_error: Optional[bool] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["tool_result"]] = None @@ -15224,6 +27789,18 @@ class DocumentConversationChildChildCalloutChildTraceMessage(BaseModel): message_type: Optional[Literal["message", "thinking"]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + role: Optional[Literal["user", "assistant"]] = None timestamp: Optional[datetime] = None @@ -15252,6 +27829,18 @@ class DocumentConversationChildChildCallout(BaseModel): children: Optional[List[DocumentConversationChildChildCalloutChild]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + text: Optional[str] = None title: Optional[str] = None @@ -15272,6 +27861,18 @@ class DocumentConversationChildChildChunkChildBlob(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["blob"]] = None @@ -15282,6 +27883,18 @@ class DocumentConversationChildChildChunkChildCode(BaseModel): language: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["code"]] = None @@ -15292,12 +27905,36 @@ class DocumentConversationChildChildChunkChildComment(BaseModel): created_at: Optional[datetime] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["comment"]] = None class DocumentConversationChildChildChunkChildDivider(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["divider"]] = None @@ -15308,6 +27945,18 @@ class DocumentConversationChildChildChunkChildImage(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["image"]] = None @@ -15318,12 +27967,36 @@ class DocumentConversationChildChildChunkChildLink(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["link"]] = None class DocumentConversationChildChildChunkChildLineBreak(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["line_break"]] = None @@ -15334,6 +28007,18 @@ class DocumentConversationChildChildChunkChildText(BaseModel): marks: Optional[List[Literal["bold", "italic", "underline", "strikethrough", "code", "math"]]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["text"]] = None @@ -15348,6 +28033,18 @@ class DocumentConversationChildChildChunkChildToolCall(BaseModel): args: Optional[Dict[str, object]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["tool_call"]] = None @@ -15364,6 +28061,18 @@ class DocumentConversationChildChildChunkChildToolResult(BaseModel): is_error: Optional[bool] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["tool_result"]] = None @@ -15376,6 +28085,18 @@ class DocumentConversationChildChildChunkChildTraceMessage(BaseModel): message_type: Optional[Literal["message", "thinking"]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + role: Optional[Literal["user", "assistant"]] = None timestamp: Optional[datetime] = None @@ -15404,6 +28125,18 @@ class DocumentConversationChildChildChunk(BaseModel): children: Optional[List[DocumentConversationChildChildChunkChild]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + text: Optional[str] = None type: Optional[Literal["chunk"]] = None @@ -15416,6 +28149,18 @@ class DocumentConversationChildChildCode(BaseModel): language: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["code"]] = None @@ -15426,12 +28171,36 @@ class DocumentConversationChildChildComment(BaseModel): created_at: Optional[datetime] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["comment"]] = None class DocumentConversationChildChildDivider(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["divider"]] = None @@ -15448,6 +28217,18 @@ class DocumentConversationChildChildEquationChildBlob(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["blob"]] = None @@ -15458,6 +28239,18 @@ class DocumentConversationChildChildEquationChildCode(BaseModel): language: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["code"]] = None @@ -15468,12 +28261,36 @@ class DocumentConversationChildChildEquationChildComment(BaseModel): created_at: Optional[datetime] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["comment"]] = None class DocumentConversationChildChildEquationChildDivider(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["divider"]] = None @@ -15484,6 +28301,18 @@ class DocumentConversationChildChildEquationChildImage(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["image"]] = None @@ -15494,12 +28323,36 @@ class DocumentConversationChildChildEquationChildLink(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["link"]] = None class DocumentConversationChildChildEquationChildLineBreak(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["line_break"]] = None @@ -15510,6 +28363,18 @@ class DocumentConversationChildChildEquationChildText(BaseModel): marks: Optional[List[Literal["bold", "italic", "underline", "strikethrough", "code", "math"]]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["text"]] = None @@ -15524,6 +28389,18 @@ class DocumentConversationChildChildEquationChildToolCall(BaseModel): args: Optional[Dict[str, object]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["tool_call"]] = None @@ -15540,6 +28417,18 @@ class DocumentConversationChildChildEquationChildToolResult(BaseModel): is_error: Optional[bool] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["tool_result"]] = None @@ -15552,6 +28441,18 @@ class DocumentConversationChildChildEquationChildTraceMessage(BaseModel): message_type: Optional[Literal["message", "thinking"]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + role: Optional[Literal["user", "assistant"]] = None timestamp: Optional[datetime] = None @@ -15580,6 +28481,18 @@ class DocumentConversationChildChildEquation(BaseModel): children: Optional[List[DocumentConversationChildChildEquationChild]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + text: Optional[str] = None type: Optional[Literal["equation"]] = None @@ -15598,6 +28511,18 @@ class DocumentConversationChildChildFootnoteChildBlob(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["blob"]] = None @@ -15608,6 +28533,18 @@ class DocumentConversationChildChildFootnoteChildCode(BaseModel): language: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["code"]] = None @@ -15618,12 +28555,36 @@ class DocumentConversationChildChildFootnoteChildComment(BaseModel): created_at: Optional[datetime] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["comment"]] = None class DocumentConversationChildChildFootnoteChildDivider(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["divider"]] = None @@ -15634,6 +28595,18 @@ class DocumentConversationChildChildFootnoteChildImage(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["image"]] = None @@ -15644,12 +28617,36 @@ class DocumentConversationChildChildFootnoteChildLink(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["link"]] = None class DocumentConversationChildChildFootnoteChildLineBreak(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["line_break"]] = None @@ -15660,6 +28657,18 @@ class DocumentConversationChildChildFootnoteChildText(BaseModel): marks: Optional[List[Literal["bold", "italic", "underline", "strikethrough", "code", "math"]]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["text"]] = None @@ -15674,6 +28683,18 @@ class DocumentConversationChildChildFootnoteChildToolCall(BaseModel): args: Optional[Dict[str, object]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["tool_call"]] = None @@ -15690,6 +28711,18 @@ class DocumentConversationChildChildFootnoteChildToolResult(BaseModel): is_error: Optional[bool] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["tool_result"]] = None @@ -15702,6 +28735,18 @@ class DocumentConversationChildChildFootnoteChildTraceMessage(BaseModel): message_type: Optional[Literal["message", "thinking"]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + role: Optional[Literal["user", "assistant"]] = None timestamp: Optional[datetime] = None @@ -15730,6 +28775,18 @@ class DocumentConversationChildChildFootnote(BaseModel): children: Optional[List[DocumentConversationChildChildFootnoteChild]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + text: Optional[str] = None type: Optional[Literal["footnote"]] = None @@ -15748,6 +28805,18 @@ class DocumentConversationChildChildHeadingChildBlob(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["blob"]] = None @@ -15758,6 +28827,18 @@ class DocumentConversationChildChildHeadingChildCode(BaseModel): language: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["code"]] = None @@ -15768,12 +28849,36 @@ class DocumentConversationChildChildHeadingChildComment(BaseModel): created_at: Optional[datetime] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["comment"]] = None class DocumentConversationChildChildHeadingChildDivider(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["divider"]] = None @@ -15784,6 +28889,18 @@ class DocumentConversationChildChildHeadingChildImage(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["image"]] = None @@ -15794,12 +28911,36 @@ class DocumentConversationChildChildHeadingChildLink(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["link"]] = None class DocumentConversationChildChildHeadingChildLineBreak(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["line_break"]] = None @@ -15810,6 +28951,18 @@ class DocumentConversationChildChildHeadingChildText(BaseModel): marks: Optional[List[Literal["bold", "italic", "underline", "strikethrough", "code", "math"]]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["text"]] = None @@ -15824,6 +28977,18 @@ class DocumentConversationChildChildHeadingChildToolCall(BaseModel): args: Optional[Dict[str, object]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["tool_call"]] = None @@ -15840,6 +29005,18 @@ class DocumentConversationChildChildHeadingChildToolResult(BaseModel): is_error: Optional[bool] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["tool_result"]] = None @@ -15852,6 +29029,18 @@ class DocumentConversationChildChildHeadingChildTraceMessage(BaseModel): message_type: Optional[Literal["message", "thinking"]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + role: Optional[Literal["user", "assistant"]] = None timestamp: Optional[datetime] = None @@ -15882,6 +29071,18 @@ class DocumentConversationChildChildHeading(BaseModel): children: Optional[List[DocumentConversationChildChildHeadingChild]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + text: Optional[str] = None type: Optional[Literal["heading"]] = None @@ -15894,6 +29095,18 @@ class DocumentConversationChildChildImage(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["image"]] = None @@ -15904,12 +29117,36 @@ class DocumentConversationChildChildLink(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["link"]] = None class DocumentConversationChildChildLineBreak(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["line_break"]] = None @@ -15918,6 +29155,18 @@ class DocumentConversationChildChildList(BaseModel): children: Optional[List[object]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + ordered: Optional[bool] = None text: Optional[str] = None @@ -15938,6 +29187,18 @@ class DocumentConversationChildChildListItemChildBlob(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["blob"]] = None @@ -15948,6 +29209,18 @@ class DocumentConversationChildChildListItemChildCode(BaseModel): language: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["code"]] = None @@ -15958,12 +29231,36 @@ class DocumentConversationChildChildListItemChildComment(BaseModel): created_at: Optional[datetime] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["comment"]] = None class DocumentConversationChildChildListItemChildDivider(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["divider"]] = None @@ -15974,6 +29271,18 @@ class DocumentConversationChildChildListItemChildImage(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["image"]] = None @@ -15984,12 +29293,36 @@ class DocumentConversationChildChildListItemChildLink(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["link"]] = None class DocumentConversationChildChildListItemChildLineBreak(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["line_break"]] = None @@ -16000,6 +29333,18 @@ class DocumentConversationChildChildListItemChildText(BaseModel): marks: Optional[List[Literal["bold", "italic", "underline", "strikethrough", "code", "math"]]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["text"]] = None @@ -16014,6 +29359,18 @@ class DocumentConversationChildChildListItemChildToolCall(BaseModel): args: Optional[Dict[str, object]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["tool_call"]] = None @@ -16030,6 +29387,18 @@ class DocumentConversationChildChildListItemChildToolResult(BaseModel): is_error: Optional[bool] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["tool_result"]] = None @@ -16042,6 +29411,18 @@ class DocumentConversationChildChildListItemChildTraceMessage(BaseModel): message_type: Optional[Literal["message", "thinking"]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + role: Optional[Literal["user", "assistant"]] = None timestamp: Optional[datetime] = None @@ -16070,6 +29451,18 @@ class DocumentConversationChildChildListItem(BaseModel): children: Optional[List[DocumentConversationChildChildListItemChild]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + text: Optional[str] = None type: Optional[Literal["list_item"]] = None @@ -16088,6 +29481,18 @@ class DocumentConversationChildChildParagraphChildBlob(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["blob"]] = None @@ -16098,6 +29503,18 @@ class DocumentConversationChildChildParagraphChildCode(BaseModel): language: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["code"]] = None @@ -16108,12 +29525,36 @@ class DocumentConversationChildChildParagraphChildComment(BaseModel): created_at: Optional[datetime] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["comment"]] = None class DocumentConversationChildChildParagraphChildDivider(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["divider"]] = None @@ -16124,6 +29565,18 @@ class DocumentConversationChildChildParagraphChildImage(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["image"]] = None @@ -16134,12 +29587,36 @@ class DocumentConversationChildChildParagraphChildLink(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["link"]] = None class DocumentConversationChildChildParagraphChildLineBreak(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["line_break"]] = None @@ -16150,6 +29627,18 @@ class DocumentConversationChildChildParagraphChildText(BaseModel): marks: Optional[List[Literal["bold", "italic", "underline", "strikethrough", "code", "math"]]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["text"]] = None @@ -16164,6 +29653,18 @@ class DocumentConversationChildChildParagraphChildToolCall(BaseModel): args: Optional[Dict[str, object]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["tool_call"]] = None @@ -16180,6 +29681,18 @@ class DocumentConversationChildChildParagraphChildToolResult(BaseModel): is_error: Optional[bool] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["tool_result"]] = None @@ -16192,6 +29705,18 @@ class DocumentConversationChildChildParagraphChildTraceMessage(BaseModel): message_type: Optional[Literal["message", "thinking"]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + role: Optional[Literal["user", "assistant"]] = None timestamp: Optional[datetime] = None @@ -16220,6 +29745,18 @@ class DocumentConversationChildChildParagraph(BaseModel): children: Optional[List[DocumentConversationChildChildParagraphChild]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + text: Optional[str] = None type: Optional[Literal["paragraph"]] = None @@ -16238,6 +29775,18 @@ class DocumentConversationChildChildQuoteChildBlob(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["blob"]] = None @@ -16248,6 +29797,18 @@ class DocumentConversationChildChildQuoteChildCode(BaseModel): language: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["code"]] = None @@ -16258,12 +29819,36 @@ class DocumentConversationChildChildQuoteChildComment(BaseModel): created_at: Optional[datetime] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["comment"]] = None class DocumentConversationChildChildQuoteChildDivider(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["divider"]] = None @@ -16274,6 +29859,18 @@ class DocumentConversationChildChildQuoteChildImage(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["image"]] = None @@ -16284,12 +29881,36 @@ class DocumentConversationChildChildQuoteChildLink(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["link"]] = None class DocumentConversationChildChildQuoteChildLineBreak(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["line_break"]] = None @@ -16300,6 +29921,18 @@ class DocumentConversationChildChildQuoteChildText(BaseModel): marks: Optional[List[Literal["bold", "italic", "underline", "strikethrough", "code", "math"]]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["text"]] = None @@ -16314,6 +29947,18 @@ class DocumentConversationChildChildQuoteChildToolCall(BaseModel): args: Optional[Dict[str, object]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["tool_call"]] = None @@ -16330,6 +29975,18 @@ class DocumentConversationChildChildQuoteChildToolResult(BaseModel): is_error: Optional[bool] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["tool_result"]] = None @@ -16342,6 +29999,18 @@ class DocumentConversationChildChildQuoteChildTraceMessage(BaseModel): message_type: Optional[Literal["message", "thinking"]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + role: Optional[Literal["user", "assistant"]] = None timestamp: Optional[datetime] = None @@ -16370,6 +30039,18 @@ class DocumentConversationChildChildQuote(BaseModel): children: Optional[List[DocumentConversationChildChildQuoteChild]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + text: Optional[str] = None type: Optional[Literal["quote"]] = None @@ -16383,6 +30064,18 @@ class DocumentConversationChildChildTable(BaseModel): has_header: Optional[bool] = None """Whether the first row should be treated as a header""" + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + text: Optional[str] = None type: Optional[Literal["table"]] = None @@ -16401,6 +30094,18 @@ class DocumentConversationChildChildTableCellChildBlob(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["blob"]] = None @@ -16411,6 +30116,18 @@ class DocumentConversationChildChildTableCellChildCode(BaseModel): language: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["code"]] = None @@ -16421,12 +30138,36 @@ class DocumentConversationChildChildTableCellChildComment(BaseModel): created_at: Optional[datetime] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["comment"]] = None class DocumentConversationChildChildTableCellChildDivider(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["divider"]] = None @@ -16437,6 +30178,18 @@ class DocumentConversationChildChildTableCellChildImage(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["image"]] = None @@ -16447,12 +30200,36 @@ class DocumentConversationChildChildTableCellChildLink(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["link"]] = None class DocumentConversationChildChildTableCellChildLineBreak(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["line_break"]] = None @@ -16463,6 +30240,18 @@ class DocumentConversationChildChildTableCellChildText(BaseModel): marks: Optional[List[Literal["bold", "italic", "underline", "strikethrough", "code", "math"]]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["text"]] = None @@ -16477,6 +30266,18 @@ class DocumentConversationChildChildTableCellChildToolCall(BaseModel): args: Optional[Dict[str, object]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["tool_call"]] = None @@ -16493,6 +30294,18 @@ class DocumentConversationChildChildTableCellChildToolResult(BaseModel): is_error: Optional[bool] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["tool_result"]] = None @@ -16505,6 +30318,18 @@ class DocumentConversationChildChildTableCellChildTraceMessage(BaseModel): message_type: Optional[Literal["message", "thinking"]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + role: Optional[Literal["user", "assistant"]] = None timestamp: Optional[datetime] = None @@ -16535,6 +30360,18 @@ class DocumentConversationChildChildTableCell(BaseModel): children: Optional[List[DocumentConversationChildChildTableCellChild]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + text: Optional[str] = None type: Optional[Literal["table_cell"]] = None @@ -16545,6 +30382,18 @@ class DocumentConversationChildChildTableRow(BaseModel): children: Optional[List[object]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + text: Optional[str] = None type: Optional[Literal["table_row"]] = None @@ -16557,6 +30406,18 @@ class DocumentConversationChildChildText(BaseModel): marks: Optional[List[Literal["bold", "italic", "underline", "strikethrough", "code", "math"]]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["text"]] = None @@ -16573,6 +30434,18 @@ class DocumentConversationChildChildToDoChildBlob(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["blob"]] = None @@ -16583,6 +30456,18 @@ class DocumentConversationChildChildToDoChildCode(BaseModel): language: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["code"]] = None @@ -16593,12 +30478,36 @@ class DocumentConversationChildChildToDoChildComment(BaseModel): created_at: Optional[datetime] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["comment"]] = None class DocumentConversationChildChildToDoChildDivider(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["divider"]] = None @@ -16609,6 +30518,18 @@ class DocumentConversationChildChildToDoChildImage(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["image"]] = None @@ -16619,12 +30540,36 @@ class DocumentConversationChildChildToDoChildLink(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["link"]] = None class DocumentConversationChildChildToDoChildLineBreak(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["line_break"]] = None @@ -16635,6 +30580,18 @@ class DocumentConversationChildChildToDoChildText(BaseModel): marks: Optional[List[Literal["bold", "italic", "underline", "strikethrough", "code", "math"]]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["text"]] = None @@ -16649,6 +30606,18 @@ class DocumentConversationChildChildToDoChildToolCall(BaseModel): args: Optional[Dict[str, object]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["tool_call"]] = None @@ -16665,6 +30634,18 @@ class DocumentConversationChildChildToDoChildToolResult(BaseModel): is_error: Optional[bool] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["tool_result"]] = None @@ -16677,6 +30658,18 @@ class DocumentConversationChildChildToDoChildTraceMessage(BaseModel): message_type: Optional[Literal["message", "thinking"]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + role: Optional[Literal["user", "assistant"]] = None timestamp: Optional[datetime] = None @@ -16707,6 +30700,18 @@ class DocumentConversationChildChildToDo(BaseModel): children: Optional[List[DocumentConversationChildChildToDoChild]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + text: Optional[str] = None type: Optional[Literal["todo"]] = None @@ -16723,6 +30728,18 @@ class DocumentConversationChildChildToolCall(BaseModel): args: Optional[Dict[str, object]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["tool_call"]] = None @@ -16739,6 +30756,18 @@ class DocumentConversationChildChildToolResult(BaseModel): is_error: Optional[bool] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["tool_result"]] = None @@ -16751,6 +30780,18 @@ class DocumentConversationChildChildTraceMessage(BaseModel): message_type: Optional[Literal["message", "thinking"]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + role: Optional[Literal["user", "assistant"]] = None timestamp: Optional[datetime] = None @@ -16772,6 +30813,18 @@ class DocumentConversationChildChildUtterance(BaseModel): end: Optional[float] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + speaker: Optional[object] = None start: Optional[float] = None @@ -16824,6 +30877,18 @@ class DocumentConversationChildMentionedUserChildBlob(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["blob"]] = None @@ -16834,6 +30899,18 @@ class DocumentConversationChildMentionedUserChildCode(BaseModel): language: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["code"]] = None @@ -16844,12 +30921,36 @@ class DocumentConversationChildMentionedUserChildComment(BaseModel): created_at: Optional[datetime] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["comment"]] = None class DocumentConversationChildMentionedUserChildDivider(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["divider"]] = None @@ -16860,6 +30961,18 @@ class DocumentConversationChildMentionedUserChildImage(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["image"]] = None @@ -16870,12 +30983,36 @@ class DocumentConversationChildMentionedUserChildLink(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["link"]] = None class DocumentConversationChildMentionedUserChildLineBreak(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["line_break"]] = None @@ -16886,6 +31023,18 @@ class DocumentConversationChildMentionedUserChildText(BaseModel): marks: Optional[List[Literal["bold", "italic", "underline", "strikethrough", "code", "math"]]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["text"]] = None @@ -16900,6 +31049,18 @@ class DocumentConversationChildMentionedUserChildToolCall(BaseModel): args: Optional[Dict[str, object]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["tool_call"]] = None @@ -16916,6 +31077,18 @@ class DocumentConversationChildMentionedUserChildToolResult(BaseModel): is_error: Optional[bool] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["tool_result"]] = None @@ -16928,6 +31101,18 @@ class DocumentConversationChildMentionedUserChildTraceMessage(BaseModel): message_type: Optional[Literal["message", "thinking"]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + role: Optional[Literal["user", "assistant"]] = None timestamp: Optional[datetime] = None @@ -16979,6 +31164,18 @@ class DocumentConversationChildMentionedUser(BaseModel): link_urls: Optional[List[str]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + name: Optional[str] = None phone_numbers: Optional[List[str]] = None @@ -17014,6 +31211,18 @@ class DocumentConversationChild(BaseModel): mentioned_users: Optional[List[DocumentConversationChildMentionedUser]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + num_replies: Optional[int] = None replies: Optional[List[object]] = None @@ -17041,6 +31250,18 @@ class DocumentConversation(BaseModel): children: Optional[List[DocumentConversationChild]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + text: Optional[str] = None type: Optional[Literal["conversation"]] = None @@ -17055,6 +31276,18 @@ class DocumentTraceChildTraceMessage(BaseModel): message_type: Optional[Literal["message", "thinking"]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + role: Optional[Literal["user", "assistant"]] = None timestamp: Optional[datetime] = None @@ -17073,6 +31306,18 @@ class DocumentTraceChildToolCall(BaseModel): args: Optional[Dict[str, object]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["tool_call"]] = None @@ -17089,6 +31334,18 @@ class DocumentTraceChildToolResult(BaseModel): is_error: Optional[bool] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["tool_result"]] = None @@ -17109,6 +31366,18 @@ class DocumentTrace(BaseModel): children: Optional[List[DocumentTraceChild]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + text: Optional[str] = None title: Optional[str] = None @@ -17130,6 +31399,18 @@ class DocumentTranscriptChild(BaseModel): end: Optional[float] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + speaker: Optional[object] = None start: Optional[float] = None @@ -17150,6 +31431,18 @@ class DocumentTranscriptParticipantChildBlob(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["blob"]] = None @@ -17160,6 +31453,18 @@ class DocumentTranscriptParticipantChildCode(BaseModel): language: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["code"]] = None @@ -17170,12 +31475,36 @@ class DocumentTranscriptParticipantChildComment(BaseModel): created_at: Optional[datetime] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["comment"]] = None class DocumentTranscriptParticipantChildDivider(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["divider"]] = None @@ -17186,6 +31515,18 @@ class DocumentTranscriptParticipantChildImage(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["image"]] = None @@ -17196,12 +31537,36 @@ class DocumentTranscriptParticipantChildLink(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["link"]] = None class DocumentTranscriptParticipantChildLineBreak(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["line_break"]] = None @@ -17212,6 +31577,18 @@ class DocumentTranscriptParticipantChildText(BaseModel): marks: Optional[List[Literal["bold", "italic", "underline", "strikethrough", "code", "math"]]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["text"]] = None @@ -17226,6 +31603,18 @@ class DocumentTranscriptParticipantChildToolCall(BaseModel): args: Optional[Dict[str, object]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["tool_call"]] = None @@ -17242,6 +31631,18 @@ class DocumentTranscriptParticipantChildToolResult(BaseModel): is_error: Optional[bool] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["tool_result"]] = None @@ -17254,6 +31655,18 @@ class DocumentTranscriptParticipantChildTraceMessage(BaseModel): message_type: Optional[Literal["message", "thinking"]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + role: Optional[Literal["user", "assistant"]] = None timestamp: Optional[datetime] = None @@ -17305,6 +31718,18 @@ class DocumentTranscriptParticipant(BaseModel): link_urls: Optional[List[str]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + name: Optional[str] = None phone_numbers: Optional[List[str]] = None @@ -17333,6 +31758,18 @@ class DocumentTranscript(BaseModel): ended_at: Optional[datetime] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + participants: Optional[List[DocumentTranscriptParticipant]] = None started_at: Optional[datetime] = None @@ -17357,6 +31794,18 @@ class DocumentCompanyChildBlob(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["blob"]] = None @@ -17373,6 +31822,18 @@ class DocumentCompanyChildCalloutChildBlob(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["blob"]] = None @@ -17383,6 +31844,18 @@ class DocumentCompanyChildCalloutChildCode(BaseModel): language: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["code"]] = None @@ -17393,12 +31866,36 @@ class DocumentCompanyChildCalloutChildComment(BaseModel): created_at: Optional[datetime] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["comment"]] = None class DocumentCompanyChildCalloutChildDivider(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["divider"]] = None @@ -17409,6 +31906,18 @@ class DocumentCompanyChildCalloutChildImage(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["image"]] = None @@ -17419,12 +31928,36 @@ class DocumentCompanyChildCalloutChildLink(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["link"]] = None class DocumentCompanyChildCalloutChildLineBreak(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["line_break"]] = None @@ -17435,6 +31968,18 @@ class DocumentCompanyChildCalloutChildText(BaseModel): marks: Optional[List[Literal["bold", "italic", "underline", "strikethrough", "code", "math"]]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["text"]] = None @@ -17449,6 +31994,18 @@ class DocumentCompanyChildCalloutChildToolCall(BaseModel): args: Optional[Dict[str, object]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["tool_call"]] = None @@ -17465,6 +32022,18 @@ class DocumentCompanyChildCalloutChildToolResult(BaseModel): is_error: Optional[bool] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["tool_result"]] = None @@ -17477,6 +32046,18 @@ class DocumentCompanyChildCalloutChildTraceMessage(BaseModel): message_type: Optional[Literal["message", "thinking"]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + role: Optional[Literal["user", "assistant"]] = None timestamp: Optional[datetime] = None @@ -17505,6 +32086,18 @@ class DocumentCompanyChildCallout(BaseModel): children: Optional[List[DocumentCompanyChildCalloutChild]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + text: Optional[str] = None title: Optional[str] = None @@ -17525,6 +32118,18 @@ class DocumentCompanyChildChunkChildBlob(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["blob"]] = None @@ -17535,6 +32140,18 @@ class DocumentCompanyChildChunkChildCode(BaseModel): language: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["code"]] = None @@ -17545,12 +32162,36 @@ class DocumentCompanyChildChunkChildComment(BaseModel): created_at: Optional[datetime] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["comment"]] = None class DocumentCompanyChildChunkChildDivider(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["divider"]] = None @@ -17561,6 +32202,18 @@ class DocumentCompanyChildChunkChildImage(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["image"]] = None @@ -17571,12 +32224,36 @@ class DocumentCompanyChildChunkChildLink(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["link"]] = None class DocumentCompanyChildChunkChildLineBreak(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["line_break"]] = None @@ -17587,6 +32264,18 @@ class DocumentCompanyChildChunkChildText(BaseModel): marks: Optional[List[Literal["bold", "italic", "underline", "strikethrough", "code", "math"]]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["text"]] = None @@ -17601,6 +32290,18 @@ class DocumentCompanyChildChunkChildToolCall(BaseModel): args: Optional[Dict[str, object]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["tool_call"]] = None @@ -17617,6 +32318,18 @@ class DocumentCompanyChildChunkChildToolResult(BaseModel): is_error: Optional[bool] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["tool_result"]] = None @@ -17629,6 +32342,18 @@ class DocumentCompanyChildChunkChildTraceMessage(BaseModel): message_type: Optional[Literal["message", "thinking"]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + role: Optional[Literal["user", "assistant"]] = None timestamp: Optional[datetime] = None @@ -17657,6 +32382,18 @@ class DocumentCompanyChildChunk(BaseModel): children: Optional[List[DocumentCompanyChildChunkChild]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + text: Optional[str] = None type: Optional[Literal["chunk"]] = None @@ -17669,6 +32406,18 @@ class DocumentCompanyChildCode(BaseModel): language: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["code"]] = None @@ -17679,12 +32428,36 @@ class DocumentCompanyChildComment(BaseModel): created_at: Optional[datetime] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["comment"]] = None class DocumentCompanyChildDivider(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["divider"]] = None @@ -17701,6 +32474,18 @@ class DocumentCompanyChildEquationChildBlob(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["blob"]] = None @@ -17711,6 +32496,18 @@ class DocumentCompanyChildEquationChildCode(BaseModel): language: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["code"]] = None @@ -17721,12 +32518,36 @@ class DocumentCompanyChildEquationChildComment(BaseModel): created_at: Optional[datetime] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["comment"]] = None class DocumentCompanyChildEquationChildDivider(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["divider"]] = None @@ -17737,6 +32558,18 @@ class DocumentCompanyChildEquationChildImage(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["image"]] = None @@ -17747,12 +32580,36 @@ class DocumentCompanyChildEquationChildLink(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["link"]] = None class DocumentCompanyChildEquationChildLineBreak(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["line_break"]] = None @@ -17763,6 +32620,18 @@ class DocumentCompanyChildEquationChildText(BaseModel): marks: Optional[List[Literal["bold", "italic", "underline", "strikethrough", "code", "math"]]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["text"]] = None @@ -17777,6 +32646,18 @@ class DocumentCompanyChildEquationChildToolCall(BaseModel): args: Optional[Dict[str, object]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["tool_call"]] = None @@ -17793,6 +32674,18 @@ class DocumentCompanyChildEquationChildToolResult(BaseModel): is_error: Optional[bool] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["tool_result"]] = None @@ -17805,6 +32698,18 @@ class DocumentCompanyChildEquationChildTraceMessage(BaseModel): message_type: Optional[Literal["message", "thinking"]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + role: Optional[Literal["user", "assistant"]] = None timestamp: Optional[datetime] = None @@ -17833,6 +32738,18 @@ class DocumentCompanyChildEquation(BaseModel): children: Optional[List[DocumentCompanyChildEquationChild]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + text: Optional[str] = None type: Optional[Literal["equation"]] = None @@ -17851,6 +32768,18 @@ class DocumentCompanyChildFootnoteChildBlob(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["blob"]] = None @@ -17861,6 +32790,18 @@ class DocumentCompanyChildFootnoteChildCode(BaseModel): language: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["code"]] = None @@ -17871,12 +32812,36 @@ class DocumentCompanyChildFootnoteChildComment(BaseModel): created_at: Optional[datetime] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["comment"]] = None class DocumentCompanyChildFootnoteChildDivider(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["divider"]] = None @@ -17887,6 +32852,18 @@ class DocumentCompanyChildFootnoteChildImage(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["image"]] = None @@ -17897,12 +32874,36 @@ class DocumentCompanyChildFootnoteChildLink(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["link"]] = None class DocumentCompanyChildFootnoteChildLineBreak(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["line_break"]] = None @@ -17913,6 +32914,18 @@ class DocumentCompanyChildFootnoteChildText(BaseModel): marks: Optional[List[Literal["bold", "italic", "underline", "strikethrough", "code", "math"]]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["text"]] = None @@ -17927,6 +32940,18 @@ class DocumentCompanyChildFootnoteChildToolCall(BaseModel): args: Optional[Dict[str, object]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["tool_call"]] = None @@ -17943,6 +32968,18 @@ class DocumentCompanyChildFootnoteChildToolResult(BaseModel): is_error: Optional[bool] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["tool_result"]] = None @@ -17955,6 +32992,18 @@ class DocumentCompanyChildFootnoteChildTraceMessage(BaseModel): message_type: Optional[Literal["message", "thinking"]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + role: Optional[Literal["user", "assistant"]] = None timestamp: Optional[datetime] = None @@ -17983,6 +33032,18 @@ class DocumentCompanyChildFootnote(BaseModel): children: Optional[List[DocumentCompanyChildFootnoteChild]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + text: Optional[str] = None type: Optional[Literal["footnote"]] = None @@ -18001,6 +33062,18 @@ class DocumentCompanyChildHeadingChildBlob(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["blob"]] = None @@ -18011,6 +33084,18 @@ class DocumentCompanyChildHeadingChildCode(BaseModel): language: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["code"]] = None @@ -18021,12 +33106,36 @@ class DocumentCompanyChildHeadingChildComment(BaseModel): created_at: Optional[datetime] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["comment"]] = None class DocumentCompanyChildHeadingChildDivider(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["divider"]] = None @@ -18037,6 +33146,18 @@ class DocumentCompanyChildHeadingChildImage(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["image"]] = None @@ -18047,12 +33168,36 @@ class DocumentCompanyChildHeadingChildLink(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["link"]] = None class DocumentCompanyChildHeadingChildLineBreak(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["line_break"]] = None @@ -18063,6 +33208,18 @@ class DocumentCompanyChildHeadingChildText(BaseModel): marks: Optional[List[Literal["bold", "italic", "underline", "strikethrough", "code", "math"]]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["text"]] = None @@ -18077,6 +33234,18 @@ class DocumentCompanyChildHeadingChildToolCall(BaseModel): args: Optional[Dict[str, object]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["tool_call"]] = None @@ -18093,6 +33262,18 @@ class DocumentCompanyChildHeadingChildToolResult(BaseModel): is_error: Optional[bool] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["tool_result"]] = None @@ -18105,6 +33286,18 @@ class DocumentCompanyChildHeadingChildTraceMessage(BaseModel): message_type: Optional[Literal["message", "thinking"]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + role: Optional[Literal["user", "assistant"]] = None timestamp: Optional[datetime] = None @@ -18135,6 +33328,18 @@ class DocumentCompanyChildHeading(BaseModel): children: Optional[List[DocumentCompanyChildHeadingChild]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + text: Optional[str] = None type: Optional[Literal["heading"]] = None @@ -18147,6 +33352,18 @@ class DocumentCompanyChildImage(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["image"]] = None @@ -18157,12 +33374,36 @@ class DocumentCompanyChildLink(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["link"]] = None class DocumentCompanyChildLineBreak(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["line_break"]] = None @@ -18171,6 +33412,18 @@ class DocumentCompanyChildList(BaseModel): children: Optional[List[object]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + ordered: Optional[bool] = None text: Optional[str] = None @@ -18191,6 +33444,18 @@ class DocumentCompanyChildListItemChildBlob(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["blob"]] = None @@ -18201,6 +33466,18 @@ class DocumentCompanyChildListItemChildCode(BaseModel): language: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["code"]] = None @@ -18211,12 +33488,36 @@ class DocumentCompanyChildListItemChildComment(BaseModel): created_at: Optional[datetime] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["comment"]] = None class DocumentCompanyChildListItemChildDivider(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["divider"]] = None @@ -18227,6 +33528,18 @@ class DocumentCompanyChildListItemChildImage(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["image"]] = None @@ -18237,12 +33550,36 @@ class DocumentCompanyChildListItemChildLink(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["link"]] = None class DocumentCompanyChildListItemChildLineBreak(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["line_break"]] = None @@ -18253,6 +33590,18 @@ class DocumentCompanyChildListItemChildText(BaseModel): marks: Optional[List[Literal["bold", "italic", "underline", "strikethrough", "code", "math"]]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["text"]] = None @@ -18267,6 +33616,18 @@ class DocumentCompanyChildListItemChildToolCall(BaseModel): args: Optional[Dict[str, object]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["tool_call"]] = None @@ -18283,6 +33644,18 @@ class DocumentCompanyChildListItemChildToolResult(BaseModel): is_error: Optional[bool] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["tool_result"]] = None @@ -18295,6 +33668,18 @@ class DocumentCompanyChildListItemChildTraceMessage(BaseModel): message_type: Optional[Literal["message", "thinking"]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + role: Optional[Literal["user", "assistant"]] = None timestamp: Optional[datetime] = None @@ -18323,6 +33708,18 @@ class DocumentCompanyChildListItem(BaseModel): children: Optional[List[DocumentCompanyChildListItemChild]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + text: Optional[str] = None type: Optional[Literal["list_item"]] = None @@ -18341,6 +33738,18 @@ class DocumentCompanyChildParagraphChildBlob(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["blob"]] = None @@ -18351,6 +33760,18 @@ class DocumentCompanyChildParagraphChildCode(BaseModel): language: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["code"]] = None @@ -18361,12 +33782,36 @@ class DocumentCompanyChildParagraphChildComment(BaseModel): created_at: Optional[datetime] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["comment"]] = None class DocumentCompanyChildParagraphChildDivider(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["divider"]] = None @@ -18377,6 +33822,18 @@ class DocumentCompanyChildParagraphChildImage(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["image"]] = None @@ -18387,12 +33844,36 @@ class DocumentCompanyChildParagraphChildLink(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["link"]] = None class DocumentCompanyChildParagraphChildLineBreak(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["line_break"]] = None @@ -18403,6 +33884,18 @@ class DocumentCompanyChildParagraphChildText(BaseModel): marks: Optional[List[Literal["bold", "italic", "underline", "strikethrough", "code", "math"]]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["text"]] = None @@ -18417,6 +33910,18 @@ class DocumentCompanyChildParagraphChildToolCall(BaseModel): args: Optional[Dict[str, object]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["tool_call"]] = None @@ -18433,6 +33938,18 @@ class DocumentCompanyChildParagraphChildToolResult(BaseModel): is_error: Optional[bool] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["tool_result"]] = None @@ -18445,6 +33962,18 @@ class DocumentCompanyChildParagraphChildTraceMessage(BaseModel): message_type: Optional[Literal["message", "thinking"]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + role: Optional[Literal["user", "assistant"]] = None timestamp: Optional[datetime] = None @@ -18473,6 +34002,18 @@ class DocumentCompanyChildParagraph(BaseModel): children: Optional[List[DocumentCompanyChildParagraphChild]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + text: Optional[str] = None type: Optional[Literal["paragraph"]] = None @@ -18491,6 +34032,18 @@ class DocumentCompanyChildQuoteChildBlob(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["blob"]] = None @@ -18501,6 +34054,18 @@ class DocumentCompanyChildQuoteChildCode(BaseModel): language: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["code"]] = None @@ -18511,12 +34076,36 @@ class DocumentCompanyChildQuoteChildComment(BaseModel): created_at: Optional[datetime] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["comment"]] = None class DocumentCompanyChildQuoteChildDivider(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["divider"]] = None @@ -18527,6 +34116,18 @@ class DocumentCompanyChildQuoteChildImage(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["image"]] = None @@ -18537,12 +34138,36 @@ class DocumentCompanyChildQuoteChildLink(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["link"]] = None class DocumentCompanyChildQuoteChildLineBreak(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["line_break"]] = None @@ -18553,6 +34178,18 @@ class DocumentCompanyChildQuoteChildText(BaseModel): marks: Optional[List[Literal["bold", "italic", "underline", "strikethrough", "code", "math"]]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["text"]] = None @@ -18567,6 +34204,18 @@ class DocumentCompanyChildQuoteChildToolCall(BaseModel): args: Optional[Dict[str, object]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["tool_call"]] = None @@ -18583,6 +34232,18 @@ class DocumentCompanyChildQuoteChildToolResult(BaseModel): is_error: Optional[bool] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["tool_result"]] = None @@ -18595,6 +34256,18 @@ class DocumentCompanyChildQuoteChildTraceMessage(BaseModel): message_type: Optional[Literal["message", "thinking"]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + role: Optional[Literal["user", "assistant"]] = None timestamp: Optional[datetime] = None @@ -18623,6 +34296,18 @@ class DocumentCompanyChildQuote(BaseModel): children: Optional[List[DocumentCompanyChildQuoteChild]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + text: Optional[str] = None type: Optional[Literal["quote"]] = None @@ -18636,6 +34321,18 @@ class DocumentCompanyChildTable(BaseModel): has_header: Optional[bool] = None """Whether the first row should be treated as a header""" + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + text: Optional[str] = None type: Optional[Literal["table"]] = None @@ -18654,6 +34351,18 @@ class DocumentCompanyChildTableCellChildBlob(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["blob"]] = None @@ -18664,6 +34373,18 @@ class DocumentCompanyChildTableCellChildCode(BaseModel): language: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["code"]] = None @@ -18674,12 +34395,36 @@ class DocumentCompanyChildTableCellChildComment(BaseModel): created_at: Optional[datetime] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["comment"]] = None class DocumentCompanyChildTableCellChildDivider(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["divider"]] = None @@ -18690,6 +34435,18 @@ class DocumentCompanyChildTableCellChildImage(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["image"]] = None @@ -18700,12 +34457,36 @@ class DocumentCompanyChildTableCellChildLink(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["link"]] = None class DocumentCompanyChildTableCellChildLineBreak(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["line_break"]] = None @@ -18716,6 +34497,18 @@ class DocumentCompanyChildTableCellChildText(BaseModel): marks: Optional[List[Literal["bold", "italic", "underline", "strikethrough", "code", "math"]]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["text"]] = None @@ -18730,6 +34523,18 @@ class DocumentCompanyChildTableCellChildToolCall(BaseModel): args: Optional[Dict[str, object]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["tool_call"]] = None @@ -18746,6 +34551,18 @@ class DocumentCompanyChildTableCellChildToolResult(BaseModel): is_error: Optional[bool] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["tool_result"]] = None @@ -18758,6 +34575,18 @@ class DocumentCompanyChildTableCellChildTraceMessage(BaseModel): message_type: Optional[Literal["message", "thinking"]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + role: Optional[Literal["user", "assistant"]] = None timestamp: Optional[datetime] = None @@ -18788,6 +34617,18 @@ class DocumentCompanyChildTableCell(BaseModel): children: Optional[List[DocumentCompanyChildTableCellChild]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + text: Optional[str] = None type: Optional[Literal["table_cell"]] = None @@ -18798,6 +34639,18 @@ class DocumentCompanyChildTableRow(BaseModel): children: Optional[List[object]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + text: Optional[str] = None type: Optional[Literal["table_row"]] = None @@ -18810,6 +34663,18 @@ class DocumentCompanyChildText(BaseModel): marks: Optional[List[Literal["bold", "italic", "underline", "strikethrough", "code", "math"]]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["text"]] = None @@ -18826,6 +34691,18 @@ class DocumentCompanyChildToDoChildBlob(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["blob"]] = None @@ -18836,6 +34713,18 @@ class DocumentCompanyChildToDoChildCode(BaseModel): language: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["code"]] = None @@ -18846,12 +34735,36 @@ class DocumentCompanyChildToDoChildComment(BaseModel): created_at: Optional[datetime] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["comment"]] = None class DocumentCompanyChildToDoChildDivider(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["divider"]] = None @@ -18862,6 +34775,18 @@ class DocumentCompanyChildToDoChildImage(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["image"]] = None @@ -18872,12 +34797,36 @@ class DocumentCompanyChildToDoChildLink(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["link"]] = None class DocumentCompanyChildToDoChildLineBreak(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["line_break"]] = None @@ -18888,6 +34837,18 @@ class DocumentCompanyChildToDoChildText(BaseModel): marks: Optional[List[Literal["bold", "italic", "underline", "strikethrough", "code", "math"]]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["text"]] = None @@ -18902,6 +34863,18 @@ class DocumentCompanyChildToDoChildToolCall(BaseModel): args: Optional[Dict[str, object]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["tool_call"]] = None @@ -18918,6 +34891,18 @@ class DocumentCompanyChildToDoChildToolResult(BaseModel): is_error: Optional[bool] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["tool_result"]] = None @@ -18930,6 +34915,18 @@ class DocumentCompanyChildToDoChildTraceMessage(BaseModel): message_type: Optional[Literal["message", "thinking"]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + role: Optional[Literal["user", "assistant"]] = None timestamp: Optional[datetime] = None @@ -18960,6 +34957,18 @@ class DocumentCompanyChildToDo(BaseModel): children: Optional[List[DocumentCompanyChildToDoChild]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + text: Optional[str] = None type: Optional[Literal["todo"]] = None @@ -18976,6 +34985,18 @@ class DocumentCompanyChildToolCall(BaseModel): args: Optional[Dict[str, object]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["tool_call"]] = None @@ -18992,6 +35013,18 @@ class DocumentCompanyChildToolResult(BaseModel): is_error: Optional[bool] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["tool_result"]] = None @@ -19004,6 +35037,18 @@ class DocumentCompanyChildTraceMessage(BaseModel): message_type: Optional[Literal["message", "thinking"]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + role: Optional[Literal["user", "assistant"]] = None timestamp: Optional[datetime] = None @@ -19025,6 +35070,18 @@ class DocumentCompanyChildUtterance(BaseModel): end: Optional[float] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + speaker: Optional[object] = None start: Optional[float] = None @@ -19089,6 +35146,18 @@ class DocumentCompany(BaseModel): is_active: Optional[bool] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + name: Optional[str] = None phone_numbers: Optional[List[str]] = None @@ -19117,6 +35186,18 @@ class DocumentDealChildBlob(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["blob"]] = None @@ -19133,6 +35214,18 @@ class DocumentDealChildCalloutChildBlob(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["blob"]] = None @@ -19143,6 +35236,18 @@ class DocumentDealChildCalloutChildCode(BaseModel): language: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["code"]] = None @@ -19153,12 +35258,36 @@ class DocumentDealChildCalloutChildComment(BaseModel): created_at: Optional[datetime] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["comment"]] = None class DocumentDealChildCalloutChildDivider(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["divider"]] = None @@ -19169,6 +35298,18 @@ class DocumentDealChildCalloutChildImage(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["image"]] = None @@ -19179,12 +35320,36 @@ class DocumentDealChildCalloutChildLink(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["link"]] = None class DocumentDealChildCalloutChildLineBreak(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["line_break"]] = None @@ -19195,6 +35360,18 @@ class DocumentDealChildCalloutChildText(BaseModel): marks: Optional[List[Literal["bold", "italic", "underline", "strikethrough", "code", "math"]]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["text"]] = None @@ -19209,6 +35386,18 @@ class DocumentDealChildCalloutChildToolCall(BaseModel): args: Optional[Dict[str, object]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["tool_call"]] = None @@ -19225,6 +35414,18 @@ class DocumentDealChildCalloutChildToolResult(BaseModel): is_error: Optional[bool] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["tool_result"]] = None @@ -19237,6 +35438,18 @@ class DocumentDealChildCalloutChildTraceMessage(BaseModel): message_type: Optional[Literal["message", "thinking"]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + role: Optional[Literal["user", "assistant"]] = None timestamp: Optional[datetime] = None @@ -19265,6 +35478,18 @@ class DocumentDealChildCallout(BaseModel): children: Optional[List[DocumentDealChildCalloutChild]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + text: Optional[str] = None title: Optional[str] = None @@ -19285,6 +35510,18 @@ class DocumentDealChildChunkChildBlob(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["blob"]] = None @@ -19295,6 +35532,18 @@ class DocumentDealChildChunkChildCode(BaseModel): language: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["code"]] = None @@ -19305,12 +35554,36 @@ class DocumentDealChildChunkChildComment(BaseModel): created_at: Optional[datetime] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["comment"]] = None class DocumentDealChildChunkChildDivider(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["divider"]] = None @@ -19321,6 +35594,18 @@ class DocumentDealChildChunkChildImage(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["image"]] = None @@ -19331,12 +35616,36 @@ class DocumentDealChildChunkChildLink(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["link"]] = None class DocumentDealChildChunkChildLineBreak(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["line_break"]] = None @@ -19347,6 +35656,18 @@ class DocumentDealChildChunkChildText(BaseModel): marks: Optional[List[Literal["bold", "italic", "underline", "strikethrough", "code", "math"]]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["text"]] = None @@ -19361,6 +35682,18 @@ class DocumentDealChildChunkChildToolCall(BaseModel): args: Optional[Dict[str, object]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["tool_call"]] = None @@ -19377,6 +35710,18 @@ class DocumentDealChildChunkChildToolResult(BaseModel): is_error: Optional[bool] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["tool_result"]] = None @@ -19389,6 +35734,18 @@ class DocumentDealChildChunkChildTraceMessage(BaseModel): message_type: Optional[Literal["message", "thinking"]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + role: Optional[Literal["user", "assistant"]] = None timestamp: Optional[datetime] = None @@ -19417,6 +35774,18 @@ class DocumentDealChildChunk(BaseModel): children: Optional[List[DocumentDealChildChunkChild]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + text: Optional[str] = None type: Optional[Literal["chunk"]] = None @@ -19429,6 +35798,18 @@ class DocumentDealChildCode(BaseModel): language: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["code"]] = None @@ -19439,12 +35820,36 @@ class DocumentDealChildComment(BaseModel): created_at: Optional[datetime] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["comment"]] = None class DocumentDealChildDivider(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["divider"]] = None @@ -19461,6 +35866,18 @@ class DocumentDealChildEquationChildBlob(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["blob"]] = None @@ -19471,6 +35888,18 @@ class DocumentDealChildEquationChildCode(BaseModel): language: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["code"]] = None @@ -19481,12 +35910,36 @@ class DocumentDealChildEquationChildComment(BaseModel): created_at: Optional[datetime] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["comment"]] = None class DocumentDealChildEquationChildDivider(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["divider"]] = None @@ -19497,6 +35950,18 @@ class DocumentDealChildEquationChildImage(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["image"]] = None @@ -19507,12 +35972,36 @@ class DocumentDealChildEquationChildLink(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["link"]] = None class DocumentDealChildEquationChildLineBreak(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["line_break"]] = None @@ -19523,6 +36012,18 @@ class DocumentDealChildEquationChildText(BaseModel): marks: Optional[List[Literal["bold", "italic", "underline", "strikethrough", "code", "math"]]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["text"]] = None @@ -19537,6 +36038,18 @@ class DocumentDealChildEquationChildToolCall(BaseModel): args: Optional[Dict[str, object]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["tool_call"]] = None @@ -19553,6 +36066,18 @@ class DocumentDealChildEquationChildToolResult(BaseModel): is_error: Optional[bool] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["tool_result"]] = None @@ -19565,6 +36090,18 @@ class DocumentDealChildEquationChildTraceMessage(BaseModel): message_type: Optional[Literal["message", "thinking"]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + role: Optional[Literal["user", "assistant"]] = None timestamp: Optional[datetime] = None @@ -19593,6 +36130,18 @@ class DocumentDealChildEquation(BaseModel): children: Optional[List[DocumentDealChildEquationChild]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + text: Optional[str] = None type: Optional[Literal["equation"]] = None @@ -19611,6 +36160,18 @@ class DocumentDealChildFootnoteChildBlob(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["blob"]] = None @@ -19621,6 +36182,18 @@ class DocumentDealChildFootnoteChildCode(BaseModel): language: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["code"]] = None @@ -19631,12 +36204,36 @@ class DocumentDealChildFootnoteChildComment(BaseModel): created_at: Optional[datetime] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["comment"]] = None class DocumentDealChildFootnoteChildDivider(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["divider"]] = None @@ -19647,6 +36244,18 @@ class DocumentDealChildFootnoteChildImage(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["image"]] = None @@ -19657,12 +36266,36 @@ class DocumentDealChildFootnoteChildLink(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["link"]] = None class DocumentDealChildFootnoteChildLineBreak(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["line_break"]] = None @@ -19673,6 +36306,18 @@ class DocumentDealChildFootnoteChildText(BaseModel): marks: Optional[List[Literal["bold", "italic", "underline", "strikethrough", "code", "math"]]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["text"]] = None @@ -19687,6 +36332,18 @@ class DocumentDealChildFootnoteChildToolCall(BaseModel): args: Optional[Dict[str, object]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["tool_call"]] = None @@ -19703,6 +36360,18 @@ class DocumentDealChildFootnoteChildToolResult(BaseModel): is_error: Optional[bool] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["tool_result"]] = None @@ -19715,6 +36384,18 @@ class DocumentDealChildFootnoteChildTraceMessage(BaseModel): message_type: Optional[Literal["message", "thinking"]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + role: Optional[Literal["user", "assistant"]] = None timestamp: Optional[datetime] = None @@ -19743,6 +36424,18 @@ class DocumentDealChildFootnote(BaseModel): children: Optional[List[DocumentDealChildFootnoteChild]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + text: Optional[str] = None type: Optional[Literal["footnote"]] = None @@ -19761,6 +36454,18 @@ class DocumentDealChildHeadingChildBlob(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["blob"]] = None @@ -19771,6 +36476,18 @@ class DocumentDealChildHeadingChildCode(BaseModel): language: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["code"]] = None @@ -19781,12 +36498,36 @@ class DocumentDealChildHeadingChildComment(BaseModel): created_at: Optional[datetime] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["comment"]] = None class DocumentDealChildHeadingChildDivider(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["divider"]] = None @@ -19797,6 +36538,18 @@ class DocumentDealChildHeadingChildImage(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["image"]] = None @@ -19807,12 +36560,36 @@ class DocumentDealChildHeadingChildLink(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["link"]] = None class DocumentDealChildHeadingChildLineBreak(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["line_break"]] = None @@ -19823,6 +36600,18 @@ class DocumentDealChildHeadingChildText(BaseModel): marks: Optional[List[Literal["bold", "italic", "underline", "strikethrough", "code", "math"]]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["text"]] = None @@ -19837,6 +36626,18 @@ class DocumentDealChildHeadingChildToolCall(BaseModel): args: Optional[Dict[str, object]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["tool_call"]] = None @@ -19853,6 +36654,18 @@ class DocumentDealChildHeadingChildToolResult(BaseModel): is_error: Optional[bool] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["tool_result"]] = None @@ -19865,6 +36678,18 @@ class DocumentDealChildHeadingChildTraceMessage(BaseModel): message_type: Optional[Literal["message", "thinking"]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + role: Optional[Literal["user", "assistant"]] = None timestamp: Optional[datetime] = None @@ -19895,6 +36720,18 @@ class DocumentDealChildHeading(BaseModel): children: Optional[List[DocumentDealChildHeadingChild]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + text: Optional[str] = None type: Optional[Literal["heading"]] = None @@ -19907,6 +36744,18 @@ class DocumentDealChildImage(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["image"]] = None @@ -19917,12 +36766,36 @@ class DocumentDealChildLink(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["link"]] = None class DocumentDealChildLineBreak(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["line_break"]] = None @@ -19931,6 +36804,18 @@ class DocumentDealChildList(BaseModel): children: Optional[List[object]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + ordered: Optional[bool] = None text: Optional[str] = None @@ -19951,6 +36836,18 @@ class DocumentDealChildListItemChildBlob(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["blob"]] = None @@ -19961,6 +36858,18 @@ class DocumentDealChildListItemChildCode(BaseModel): language: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["code"]] = None @@ -19971,12 +36880,36 @@ class DocumentDealChildListItemChildComment(BaseModel): created_at: Optional[datetime] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["comment"]] = None class DocumentDealChildListItemChildDivider(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["divider"]] = None @@ -19987,6 +36920,18 @@ class DocumentDealChildListItemChildImage(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["image"]] = None @@ -19997,12 +36942,36 @@ class DocumentDealChildListItemChildLink(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["link"]] = None class DocumentDealChildListItemChildLineBreak(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["line_break"]] = None @@ -20013,6 +36982,18 @@ class DocumentDealChildListItemChildText(BaseModel): marks: Optional[List[Literal["bold", "italic", "underline", "strikethrough", "code", "math"]]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["text"]] = None @@ -20027,6 +37008,18 @@ class DocumentDealChildListItemChildToolCall(BaseModel): args: Optional[Dict[str, object]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["tool_call"]] = None @@ -20043,6 +37036,18 @@ class DocumentDealChildListItemChildToolResult(BaseModel): is_error: Optional[bool] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["tool_result"]] = None @@ -20055,6 +37060,18 @@ class DocumentDealChildListItemChildTraceMessage(BaseModel): message_type: Optional[Literal["message", "thinking"]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + role: Optional[Literal["user", "assistant"]] = None timestamp: Optional[datetime] = None @@ -20083,6 +37100,18 @@ class DocumentDealChildListItem(BaseModel): children: Optional[List[DocumentDealChildListItemChild]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + text: Optional[str] = None type: Optional[Literal["list_item"]] = None @@ -20101,6 +37130,18 @@ class DocumentDealChildParagraphChildBlob(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["blob"]] = None @@ -20111,6 +37152,18 @@ class DocumentDealChildParagraphChildCode(BaseModel): language: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["code"]] = None @@ -20121,12 +37174,36 @@ class DocumentDealChildParagraphChildComment(BaseModel): created_at: Optional[datetime] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["comment"]] = None class DocumentDealChildParagraphChildDivider(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["divider"]] = None @@ -20137,6 +37214,18 @@ class DocumentDealChildParagraphChildImage(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["image"]] = None @@ -20147,12 +37236,36 @@ class DocumentDealChildParagraphChildLink(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["link"]] = None class DocumentDealChildParagraphChildLineBreak(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["line_break"]] = None @@ -20163,6 +37276,18 @@ class DocumentDealChildParagraphChildText(BaseModel): marks: Optional[List[Literal["bold", "italic", "underline", "strikethrough", "code", "math"]]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["text"]] = None @@ -20177,6 +37302,18 @@ class DocumentDealChildParagraphChildToolCall(BaseModel): args: Optional[Dict[str, object]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["tool_call"]] = None @@ -20193,6 +37330,18 @@ class DocumentDealChildParagraphChildToolResult(BaseModel): is_error: Optional[bool] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["tool_result"]] = None @@ -20205,6 +37354,18 @@ class DocumentDealChildParagraphChildTraceMessage(BaseModel): message_type: Optional[Literal["message", "thinking"]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + role: Optional[Literal["user", "assistant"]] = None timestamp: Optional[datetime] = None @@ -20233,6 +37394,18 @@ class DocumentDealChildParagraph(BaseModel): children: Optional[List[DocumentDealChildParagraphChild]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + text: Optional[str] = None type: Optional[Literal["paragraph"]] = None @@ -20251,6 +37424,18 @@ class DocumentDealChildQuoteChildBlob(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["blob"]] = None @@ -20261,6 +37446,18 @@ class DocumentDealChildQuoteChildCode(BaseModel): language: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["code"]] = None @@ -20271,12 +37468,36 @@ class DocumentDealChildQuoteChildComment(BaseModel): created_at: Optional[datetime] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["comment"]] = None class DocumentDealChildQuoteChildDivider(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["divider"]] = None @@ -20287,6 +37508,18 @@ class DocumentDealChildQuoteChildImage(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["image"]] = None @@ -20297,12 +37530,36 @@ class DocumentDealChildQuoteChildLink(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["link"]] = None class DocumentDealChildQuoteChildLineBreak(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["line_break"]] = None @@ -20313,6 +37570,18 @@ class DocumentDealChildQuoteChildText(BaseModel): marks: Optional[List[Literal["bold", "italic", "underline", "strikethrough", "code", "math"]]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["text"]] = None @@ -20327,6 +37596,18 @@ class DocumentDealChildQuoteChildToolCall(BaseModel): args: Optional[Dict[str, object]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["tool_call"]] = None @@ -20343,6 +37624,18 @@ class DocumentDealChildQuoteChildToolResult(BaseModel): is_error: Optional[bool] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["tool_result"]] = None @@ -20355,6 +37648,18 @@ class DocumentDealChildQuoteChildTraceMessage(BaseModel): message_type: Optional[Literal["message", "thinking"]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + role: Optional[Literal["user", "assistant"]] = None timestamp: Optional[datetime] = None @@ -20383,6 +37688,18 @@ class DocumentDealChildQuote(BaseModel): children: Optional[List[DocumentDealChildQuoteChild]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + text: Optional[str] = None type: Optional[Literal["quote"]] = None @@ -20396,6 +37713,18 @@ class DocumentDealChildTable(BaseModel): has_header: Optional[bool] = None """Whether the first row should be treated as a header""" + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + text: Optional[str] = None type: Optional[Literal["table"]] = None @@ -20414,6 +37743,18 @@ class DocumentDealChildTableCellChildBlob(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["blob"]] = None @@ -20424,6 +37765,18 @@ class DocumentDealChildTableCellChildCode(BaseModel): language: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["code"]] = None @@ -20434,12 +37787,36 @@ class DocumentDealChildTableCellChildComment(BaseModel): created_at: Optional[datetime] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["comment"]] = None class DocumentDealChildTableCellChildDivider(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["divider"]] = None @@ -20450,6 +37827,18 @@ class DocumentDealChildTableCellChildImage(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["image"]] = None @@ -20460,12 +37849,36 @@ class DocumentDealChildTableCellChildLink(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["link"]] = None class DocumentDealChildTableCellChildLineBreak(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["line_break"]] = None @@ -20476,6 +37889,18 @@ class DocumentDealChildTableCellChildText(BaseModel): marks: Optional[List[Literal["bold", "italic", "underline", "strikethrough", "code", "math"]]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["text"]] = None @@ -20490,6 +37915,18 @@ class DocumentDealChildTableCellChildToolCall(BaseModel): args: Optional[Dict[str, object]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["tool_call"]] = None @@ -20506,6 +37943,18 @@ class DocumentDealChildTableCellChildToolResult(BaseModel): is_error: Optional[bool] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["tool_result"]] = None @@ -20518,6 +37967,18 @@ class DocumentDealChildTableCellChildTraceMessage(BaseModel): message_type: Optional[Literal["message", "thinking"]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + role: Optional[Literal["user", "assistant"]] = None timestamp: Optional[datetime] = None @@ -20548,6 +38009,18 @@ class DocumentDealChildTableCell(BaseModel): children: Optional[List[DocumentDealChildTableCellChild]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + text: Optional[str] = None type: Optional[Literal["table_cell"]] = None @@ -20558,6 +38031,18 @@ class DocumentDealChildTableRow(BaseModel): children: Optional[List[object]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + text: Optional[str] = None type: Optional[Literal["table_row"]] = None @@ -20570,6 +38055,18 @@ class DocumentDealChildText(BaseModel): marks: Optional[List[Literal["bold", "italic", "underline", "strikethrough", "code", "math"]]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["text"]] = None @@ -20586,6 +38083,18 @@ class DocumentDealChildToDoChildBlob(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["blob"]] = None @@ -20596,6 +38105,18 @@ class DocumentDealChildToDoChildCode(BaseModel): language: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["code"]] = None @@ -20606,12 +38127,36 @@ class DocumentDealChildToDoChildComment(BaseModel): created_at: Optional[datetime] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["comment"]] = None class DocumentDealChildToDoChildDivider(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["divider"]] = None @@ -20622,6 +38167,18 @@ class DocumentDealChildToDoChildImage(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["image"]] = None @@ -20632,12 +38189,36 @@ class DocumentDealChildToDoChildLink(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["link"]] = None class DocumentDealChildToDoChildLineBreak(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["line_break"]] = None @@ -20648,6 +38229,18 @@ class DocumentDealChildToDoChildText(BaseModel): marks: Optional[List[Literal["bold", "italic", "underline", "strikethrough", "code", "math"]]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["text"]] = None @@ -20662,6 +38255,18 @@ class DocumentDealChildToDoChildToolCall(BaseModel): args: Optional[Dict[str, object]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["tool_call"]] = None @@ -20678,6 +38283,18 @@ class DocumentDealChildToDoChildToolResult(BaseModel): is_error: Optional[bool] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["tool_result"]] = None @@ -20690,6 +38307,18 @@ class DocumentDealChildToDoChildTraceMessage(BaseModel): message_type: Optional[Literal["message", "thinking"]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + role: Optional[Literal["user", "assistant"]] = None timestamp: Optional[datetime] = None @@ -20720,6 +38349,18 @@ class DocumentDealChildToDo(BaseModel): children: Optional[List[DocumentDealChildToDoChild]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + text: Optional[str] = None type: Optional[Literal["todo"]] = None @@ -20736,6 +38377,18 @@ class DocumentDealChildToolCall(BaseModel): args: Optional[Dict[str, object]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["tool_call"]] = None @@ -20752,6 +38405,18 @@ class DocumentDealChildToolResult(BaseModel): is_error: Optional[bool] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["tool_result"]] = None @@ -20764,6 +38429,18 @@ class DocumentDealChildTraceMessage(BaseModel): message_type: Optional[Literal["message", "thinking"]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + role: Optional[Literal["user", "assistant"]] = None timestamp: Optional[datetime] = None @@ -20785,6 +38462,18 @@ class DocumentDealChildUtterance(BaseModel): end: Optional[float] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + speaker: Optional[object] = None start: Optional[float] = None @@ -20845,6 +38534,18 @@ class DocumentDeal(BaseModel): lost_reason: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + name: Optional[str] = None pipeline: Optional[str] = None diff --git a/src/hyperspell/types/memory_list_response.py b/src/hyperspell/types/memory_list_response.py index ca998425..3b85e70b 100644 --- a/src/hyperspell/types/memory_list_response.py +++ b/src/hyperspell/types/memory_list_response.py @@ -6,6 +6,7 @@ from .._utils import PropertyInfo from .._models import BaseModel +from .shared.metadata import Metadata __all__ = [ "MemoryListResponse", @@ -1621,6 +1622,18 @@ class DocumentDocumentChildBlob(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["blob"]] = None @@ -1637,6 +1650,18 @@ class DocumentDocumentChildCalloutChildBlob(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["blob"]] = None @@ -1647,6 +1672,18 @@ class DocumentDocumentChildCalloutChildCode(BaseModel): language: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["code"]] = None @@ -1657,12 +1694,36 @@ class DocumentDocumentChildCalloutChildComment(BaseModel): created_at: Optional[datetime] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["comment"]] = None class DocumentDocumentChildCalloutChildDivider(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["divider"]] = None @@ -1673,6 +1734,18 @@ class DocumentDocumentChildCalloutChildImage(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["image"]] = None @@ -1683,12 +1756,36 @@ class DocumentDocumentChildCalloutChildLink(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["link"]] = None class DocumentDocumentChildCalloutChildLineBreak(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["line_break"]] = None @@ -1699,6 +1796,18 @@ class DocumentDocumentChildCalloutChildText(BaseModel): marks: Optional[List[Literal["bold", "italic", "underline", "strikethrough", "code", "math"]]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["text"]] = None @@ -1713,6 +1822,18 @@ class DocumentDocumentChildCalloutChildToolCall(BaseModel): args: Optional[Dict[str, object]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["tool_call"]] = None @@ -1729,6 +1850,18 @@ class DocumentDocumentChildCalloutChildToolResult(BaseModel): is_error: Optional[bool] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["tool_result"]] = None @@ -1741,6 +1874,18 @@ class DocumentDocumentChildCalloutChildTraceMessage(BaseModel): message_type: Optional[Literal["message", "thinking"]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + role: Optional[Literal["user", "assistant"]] = None timestamp: Optional[datetime] = None @@ -1769,6 +1914,18 @@ class DocumentDocumentChildCallout(BaseModel): children: Optional[List[DocumentDocumentChildCalloutChild]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + text: Optional[str] = None title: Optional[str] = None @@ -1789,6 +1946,18 @@ class DocumentDocumentChildChunkChildBlob(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["blob"]] = None @@ -1799,6 +1968,18 @@ class DocumentDocumentChildChunkChildCode(BaseModel): language: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["code"]] = None @@ -1809,12 +1990,36 @@ class DocumentDocumentChildChunkChildComment(BaseModel): created_at: Optional[datetime] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["comment"]] = None class DocumentDocumentChildChunkChildDivider(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["divider"]] = None @@ -1825,6 +2030,18 @@ class DocumentDocumentChildChunkChildImage(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["image"]] = None @@ -1835,12 +2052,36 @@ class DocumentDocumentChildChunkChildLink(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["link"]] = None class DocumentDocumentChildChunkChildLineBreak(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["line_break"]] = None @@ -1851,6 +2092,18 @@ class DocumentDocumentChildChunkChildText(BaseModel): marks: Optional[List[Literal["bold", "italic", "underline", "strikethrough", "code", "math"]]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["text"]] = None @@ -1865,6 +2118,18 @@ class DocumentDocumentChildChunkChildToolCall(BaseModel): args: Optional[Dict[str, object]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["tool_call"]] = None @@ -1881,6 +2146,18 @@ class DocumentDocumentChildChunkChildToolResult(BaseModel): is_error: Optional[bool] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["tool_result"]] = None @@ -1893,6 +2170,18 @@ class DocumentDocumentChildChunkChildTraceMessage(BaseModel): message_type: Optional[Literal["message", "thinking"]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + role: Optional[Literal["user", "assistant"]] = None timestamp: Optional[datetime] = None @@ -1921,6 +2210,18 @@ class DocumentDocumentChildChunk(BaseModel): children: Optional[List[DocumentDocumentChildChunkChild]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + text: Optional[str] = None type: Optional[Literal["chunk"]] = None @@ -1933,6 +2234,18 @@ class DocumentDocumentChildCode(BaseModel): language: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["code"]] = None @@ -1943,12 +2256,36 @@ class DocumentDocumentChildComment(BaseModel): created_at: Optional[datetime] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["comment"]] = None class DocumentDocumentChildDivider(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["divider"]] = None @@ -1965,6 +2302,18 @@ class DocumentDocumentChildEquationChildBlob(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["blob"]] = None @@ -1975,6 +2324,18 @@ class DocumentDocumentChildEquationChildCode(BaseModel): language: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["code"]] = None @@ -1985,12 +2346,36 @@ class DocumentDocumentChildEquationChildComment(BaseModel): created_at: Optional[datetime] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["comment"]] = None class DocumentDocumentChildEquationChildDivider(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["divider"]] = None @@ -2001,6 +2386,18 @@ class DocumentDocumentChildEquationChildImage(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["image"]] = None @@ -2011,12 +2408,36 @@ class DocumentDocumentChildEquationChildLink(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["link"]] = None class DocumentDocumentChildEquationChildLineBreak(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["line_break"]] = None @@ -2027,6 +2448,18 @@ class DocumentDocumentChildEquationChildText(BaseModel): marks: Optional[List[Literal["bold", "italic", "underline", "strikethrough", "code", "math"]]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["text"]] = None @@ -2041,6 +2474,18 @@ class DocumentDocumentChildEquationChildToolCall(BaseModel): args: Optional[Dict[str, object]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["tool_call"]] = None @@ -2057,6 +2502,18 @@ class DocumentDocumentChildEquationChildToolResult(BaseModel): is_error: Optional[bool] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["tool_result"]] = None @@ -2069,6 +2526,18 @@ class DocumentDocumentChildEquationChildTraceMessage(BaseModel): message_type: Optional[Literal["message", "thinking"]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + role: Optional[Literal["user", "assistant"]] = None timestamp: Optional[datetime] = None @@ -2097,6 +2566,18 @@ class DocumentDocumentChildEquation(BaseModel): children: Optional[List[DocumentDocumentChildEquationChild]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + text: Optional[str] = None type: Optional[Literal["equation"]] = None @@ -2115,6 +2596,18 @@ class DocumentDocumentChildFootnoteChildBlob(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["blob"]] = None @@ -2125,6 +2618,18 @@ class DocumentDocumentChildFootnoteChildCode(BaseModel): language: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["code"]] = None @@ -2135,12 +2640,36 @@ class DocumentDocumentChildFootnoteChildComment(BaseModel): created_at: Optional[datetime] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["comment"]] = None class DocumentDocumentChildFootnoteChildDivider(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["divider"]] = None @@ -2151,6 +2680,18 @@ class DocumentDocumentChildFootnoteChildImage(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["image"]] = None @@ -2161,12 +2702,36 @@ class DocumentDocumentChildFootnoteChildLink(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["link"]] = None class DocumentDocumentChildFootnoteChildLineBreak(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["line_break"]] = None @@ -2177,6 +2742,18 @@ class DocumentDocumentChildFootnoteChildText(BaseModel): marks: Optional[List[Literal["bold", "italic", "underline", "strikethrough", "code", "math"]]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["text"]] = None @@ -2191,6 +2768,18 @@ class DocumentDocumentChildFootnoteChildToolCall(BaseModel): args: Optional[Dict[str, object]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["tool_call"]] = None @@ -2207,6 +2796,18 @@ class DocumentDocumentChildFootnoteChildToolResult(BaseModel): is_error: Optional[bool] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["tool_result"]] = None @@ -2219,6 +2820,18 @@ class DocumentDocumentChildFootnoteChildTraceMessage(BaseModel): message_type: Optional[Literal["message", "thinking"]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + role: Optional[Literal["user", "assistant"]] = None timestamp: Optional[datetime] = None @@ -2247,6 +2860,18 @@ class DocumentDocumentChildFootnote(BaseModel): children: Optional[List[DocumentDocumentChildFootnoteChild]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + text: Optional[str] = None type: Optional[Literal["footnote"]] = None @@ -2265,6 +2890,18 @@ class DocumentDocumentChildHeadingChildBlob(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["blob"]] = None @@ -2275,6 +2912,18 @@ class DocumentDocumentChildHeadingChildCode(BaseModel): language: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["code"]] = None @@ -2285,12 +2934,36 @@ class DocumentDocumentChildHeadingChildComment(BaseModel): created_at: Optional[datetime] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["comment"]] = None class DocumentDocumentChildHeadingChildDivider(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["divider"]] = None @@ -2301,6 +2974,18 @@ class DocumentDocumentChildHeadingChildImage(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["image"]] = None @@ -2311,12 +2996,36 @@ class DocumentDocumentChildHeadingChildLink(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["link"]] = None class DocumentDocumentChildHeadingChildLineBreak(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["line_break"]] = None @@ -2327,6 +3036,18 @@ class DocumentDocumentChildHeadingChildText(BaseModel): marks: Optional[List[Literal["bold", "italic", "underline", "strikethrough", "code", "math"]]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["text"]] = None @@ -2341,6 +3062,18 @@ class DocumentDocumentChildHeadingChildToolCall(BaseModel): args: Optional[Dict[str, object]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["tool_call"]] = None @@ -2357,6 +3090,18 @@ class DocumentDocumentChildHeadingChildToolResult(BaseModel): is_error: Optional[bool] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["tool_result"]] = None @@ -2369,6 +3114,18 @@ class DocumentDocumentChildHeadingChildTraceMessage(BaseModel): message_type: Optional[Literal["message", "thinking"]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + role: Optional[Literal["user", "assistant"]] = None timestamp: Optional[datetime] = None @@ -2399,6 +3156,18 @@ class DocumentDocumentChildHeading(BaseModel): children: Optional[List[DocumentDocumentChildHeadingChild]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + text: Optional[str] = None type: Optional[Literal["heading"]] = None @@ -2411,6 +3180,18 @@ class DocumentDocumentChildImage(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["image"]] = None @@ -2421,12 +3202,36 @@ class DocumentDocumentChildLink(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["link"]] = None class DocumentDocumentChildLineBreak(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["line_break"]] = None @@ -2435,6 +3240,18 @@ class DocumentDocumentChildList(BaseModel): children: Optional[List[object]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + ordered: Optional[bool] = None text: Optional[str] = None @@ -2455,6 +3272,18 @@ class DocumentDocumentChildListItemChildBlob(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["blob"]] = None @@ -2465,6 +3294,18 @@ class DocumentDocumentChildListItemChildCode(BaseModel): language: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["code"]] = None @@ -2475,12 +3316,36 @@ class DocumentDocumentChildListItemChildComment(BaseModel): created_at: Optional[datetime] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["comment"]] = None class DocumentDocumentChildListItemChildDivider(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["divider"]] = None @@ -2491,6 +3356,18 @@ class DocumentDocumentChildListItemChildImage(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["image"]] = None @@ -2501,12 +3378,36 @@ class DocumentDocumentChildListItemChildLink(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["link"]] = None class DocumentDocumentChildListItemChildLineBreak(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["line_break"]] = None @@ -2517,6 +3418,18 @@ class DocumentDocumentChildListItemChildText(BaseModel): marks: Optional[List[Literal["bold", "italic", "underline", "strikethrough", "code", "math"]]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["text"]] = None @@ -2531,6 +3444,18 @@ class DocumentDocumentChildListItemChildToolCall(BaseModel): args: Optional[Dict[str, object]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["tool_call"]] = None @@ -2547,6 +3472,18 @@ class DocumentDocumentChildListItemChildToolResult(BaseModel): is_error: Optional[bool] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["tool_result"]] = None @@ -2559,6 +3496,18 @@ class DocumentDocumentChildListItemChildTraceMessage(BaseModel): message_type: Optional[Literal["message", "thinking"]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + role: Optional[Literal["user", "assistant"]] = None timestamp: Optional[datetime] = None @@ -2587,6 +3536,18 @@ class DocumentDocumentChildListItem(BaseModel): children: Optional[List[DocumentDocumentChildListItemChild]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + text: Optional[str] = None type: Optional[Literal["list_item"]] = None @@ -2605,6 +3566,18 @@ class DocumentDocumentChildParagraphChildBlob(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["blob"]] = None @@ -2615,6 +3588,18 @@ class DocumentDocumentChildParagraphChildCode(BaseModel): language: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["code"]] = None @@ -2625,12 +3610,36 @@ class DocumentDocumentChildParagraphChildComment(BaseModel): created_at: Optional[datetime] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["comment"]] = None class DocumentDocumentChildParagraphChildDivider(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["divider"]] = None @@ -2641,6 +3650,18 @@ class DocumentDocumentChildParagraphChildImage(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["image"]] = None @@ -2651,12 +3672,36 @@ class DocumentDocumentChildParagraphChildLink(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["link"]] = None class DocumentDocumentChildParagraphChildLineBreak(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["line_break"]] = None @@ -2667,6 +3712,18 @@ class DocumentDocumentChildParagraphChildText(BaseModel): marks: Optional[List[Literal["bold", "italic", "underline", "strikethrough", "code", "math"]]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["text"]] = None @@ -2681,6 +3738,18 @@ class DocumentDocumentChildParagraphChildToolCall(BaseModel): args: Optional[Dict[str, object]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["tool_call"]] = None @@ -2697,6 +3766,18 @@ class DocumentDocumentChildParagraphChildToolResult(BaseModel): is_error: Optional[bool] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["tool_result"]] = None @@ -2709,6 +3790,18 @@ class DocumentDocumentChildParagraphChildTraceMessage(BaseModel): message_type: Optional[Literal["message", "thinking"]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + role: Optional[Literal["user", "assistant"]] = None timestamp: Optional[datetime] = None @@ -2737,6 +3830,18 @@ class DocumentDocumentChildParagraph(BaseModel): children: Optional[List[DocumentDocumentChildParagraphChild]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + text: Optional[str] = None type: Optional[Literal["paragraph"]] = None @@ -2755,6 +3860,18 @@ class DocumentDocumentChildQuoteChildBlob(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["blob"]] = None @@ -2765,6 +3882,18 @@ class DocumentDocumentChildQuoteChildCode(BaseModel): language: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["code"]] = None @@ -2775,12 +3904,36 @@ class DocumentDocumentChildQuoteChildComment(BaseModel): created_at: Optional[datetime] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["comment"]] = None class DocumentDocumentChildQuoteChildDivider(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["divider"]] = None @@ -2791,6 +3944,18 @@ class DocumentDocumentChildQuoteChildImage(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["image"]] = None @@ -2801,12 +3966,36 @@ class DocumentDocumentChildQuoteChildLink(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["link"]] = None class DocumentDocumentChildQuoteChildLineBreak(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["line_break"]] = None @@ -2817,6 +4006,18 @@ class DocumentDocumentChildQuoteChildText(BaseModel): marks: Optional[List[Literal["bold", "italic", "underline", "strikethrough", "code", "math"]]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["text"]] = None @@ -2831,6 +4032,18 @@ class DocumentDocumentChildQuoteChildToolCall(BaseModel): args: Optional[Dict[str, object]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["tool_call"]] = None @@ -2847,6 +4060,18 @@ class DocumentDocumentChildQuoteChildToolResult(BaseModel): is_error: Optional[bool] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["tool_result"]] = None @@ -2859,6 +4084,18 @@ class DocumentDocumentChildQuoteChildTraceMessage(BaseModel): message_type: Optional[Literal["message", "thinking"]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + role: Optional[Literal["user", "assistant"]] = None timestamp: Optional[datetime] = None @@ -2887,6 +4124,18 @@ class DocumentDocumentChildQuote(BaseModel): children: Optional[List[DocumentDocumentChildQuoteChild]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + text: Optional[str] = None type: Optional[Literal["quote"]] = None @@ -2900,6 +4149,18 @@ class DocumentDocumentChildTable(BaseModel): has_header: Optional[bool] = None """Whether the first row should be treated as a header""" + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + text: Optional[str] = None type: Optional[Literal["table"]] = None @@ -2918,6 +4179,18 @@ class DocumentDocumentChildTableCellChildBlob(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["blob"]] = None @@ -2928,6 +4201,18 @@ class DocumentDocumentChildTableCellChildCode(BaseModel): language: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["code"]] = None @@ -2938,12 +4223,36 @@ class DocumentDocumentChildTableCellChildComment(BaseModel): created_at: Optional[datetime] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["comment"]] = None class DocumentDocumentChildTableCellChildDivider(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["divider"]] = None @@ -2954,6 +4263,18 @@ class DocumentDocumentChildTableCellChildImage(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["image"]] = None @@ -2964,12 +4285,36 @@ class DocumentDocumentChildTableCellChildLink(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["link"]] = None class DocumentDocumentChildTableCellChildLineBreak(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["line_break"]] = None @@ -2980,6 +4325,18 @@ class DocumentDocumentChildTableCellChildText(BaseModel): marks: Optional[List[Literal["bold", "italic", "underline", "strikethrough", "code", "math"]]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["text"]] = None @@ -2994,6 +4351,18 @@ class DocumentDocumentChildTableCellChildToolCall(BaseModel): args: Optional[Dict[str, object]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["tool_call"]] = None @@ -3010,6 +4379,18 @@ class DocumentDocumentChildTableCellChildToolResult(BaseModel): is_error: Optional[bool] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["tool_result"]] = None @@ -3022,6 +4403,18 @@ class DocumentDocumentChildTableCellChildTraceMessage(BaseModel): message_type: Optional[Literal["message", "thinking"]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + role: Optional[Literal["user", "assistant"]] = None timestamp: Optional[datetime] = None @@ -3052,6 +4445,18 @@ class DocumentDocumentChildTableCell(BaseModel): children: Optional[List[DocumentDocumentChildTableCellChild]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + text: Optional[str] = None type: Optional[Literal["table_cell"]] = None @@ -3062,6 +4467,18 @@ class DocumentDocumentChildTableRow(BaseModel): children: Optional[List[object]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + text: Optional[str] = None type: Optional[Literal["table_row"]] = None @@ -3074,6 +4491,18 @@ class DocumentDocumentChildText(BaseModel): marks: Optional[List[Literal["bold", "italic", "underline", "strikethrough", "code", "math"]]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["text"]] = None @@ -3090,6 +4519,18 @@ class DocumentDocumentChildToDoChildBlob(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["blob"]] = None @@ -3100,6 +4541,18 @@ class DocumentDocumentChildToDoChildCode(BaseModel): language: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["code"]] = None @@ -3110,12 +4563,36 @@ class DocumentDocumentChildToDoChildComment(BaseModel): created_at: Optional[datetime] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["comment"]] = None class DocumentDocumentChildToDoChildDivider(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["divider"]] = None @@ -3126,6 +4603,18 @@ class DocumentDocumentChildToDoChildImage(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["image"]] = None @@ -3136,12 +4625,36 @@ class DocumentDocumentChildToDoChildLink(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["link"]] = None class DocumentDocumentChildToDoChildLineBreak(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["line_break"]] = None @@ -3152,6 +4665,18 @@ class DocumentDocumentChildToDoChildText(BaseModel): marks: Optional[List[Literal["bold", "italic", "underline", "strikethrough", "code", "math"]]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["text"]] = None @@ -3166,6 +4691,18 @@ class DocumentDocumentChildToDoChildToolCall(BaseModel): args: Optional[Dict[str, object]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["tool_call"]] = None @@ -3182,6 +4719,18 @@ class DocumentDocumentChildToDoChildToolResult(BaseModel): is_error: Optional[bool] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["tool_result"]] = None @@ -3194,6 +4743,18 @@ class DocumentDocumentChildToDoChildTraceMessage(BaseModel): message_type: Optional[Literal["message", "thinking"]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + role: Optional[Literal["user", "assistant"]] = None timestamp: Optional[datetime] = None @@ -3224,6 +4785,18 @@ class DocumentDocumentChildToDo(BaseModel): children: Optional[List[DocumentDocumentChildToDoChild]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + text: Optional[str] = None type: Optional[Literal["todo"]] = None @@ -3240,6 +4813,18 @@ class DocumentDocumentChildToolCall(BaseModel): args: Optional[Dict[str, object]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["tool_call"]] = None @@ -3256,6 +4841,18 @@ class DocumentDocumentChildToolResult(BaseModel): is_error: Optional[bool] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["tool_result"]] = None @@ -3268,6 +4865,18 @@ class DocumentDocumentChildTraceMessage(BaseModel): message_type: Optional[Literal["message", "thinking"]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + role: Optional[Literal["user", "assistant"]] = None timestamp: Optional[datetime] = None @@ -3289,6 +4898,18 @@ class DocumentDocumentChildUtterance(BaseModel): end: Optional[float] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + speaker: Optional[object] = None start: Optional[float] = None @@ -3333,6 +4954,18 @@ class DocumentDocument(BaseModel): children: Optional[List[DocumentDocumentChild]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + text: Optional[str] = None title: Optional[str] = None @@ -3353,6 +4986,18 @@ class DocumentWebsiteChildBlob(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["blob"]] = None @@ -3369,6 +5014,18 @@ class DocumentWebsiteChildCalloutChildBlob(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["blob"]] = None @@ -3379,6 +5036,18 @@ class DocumentWebsiteChildCalloutChildCode(BaseModel): language: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["code"]] = None @@ -3389,12 +5058,36 @@ class DocumentWebsiteChildCalloutChildComment(BaseModel): created_at: Optional[datetime] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["comment"]] = None class DocumentWebsiteChildCalloutChildDivider(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["divider"]] = None @@ -3405,6 +5098,18 @@ class DocumentWebsiteChildCalloutChildImage(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["image"]] = None @@ -3415,12 +5120,36 @@ class DocumentWebsiteChildCalloutChildLink(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["link"]] = None class DocumentWebsiteChildCalloutChildLineBreak(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["line_break"]] = None @@ -3431,6 +5160,18 @@ class DocumentWebsiteChildCalloutChildText(BaseModel): marks: Optional[List[Literal["bold", "italic", "underline", "strikethrough", "code", "math"]]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["text"]] = None @@ -3445,6 +5186,18 @@ class DocumentWebsiteChildCalloutChildToolCall(BaseModel): args: Optional[Dict[str, object]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["tool_call"]] = None @@ -3461,6 +5214,18 @@ class DocumentWebsiteChildCalloutChildToolResult(BaseModel): is_error: Optional[bool] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["tool_result"]] = None @@ -3473,6 +5238,18 @@ class DocumentWebsiteChildCalloutChildTraceMessage(BaseModel): message_type: Optional[Literal["message", "thinking"]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + role: Optional[Literal["user", "assistant"]] = None timestamp: Optional[datetime] = None @@ -3501,6 +5278,18 @@ class DocumentWebsiteChildCallout(BaseModel): children: Optional[List[DocumentWebsiteChildCalloutChild]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + text: Optional[str] = None title: Optional[str] = None @@ -3521,6 +5310,18 @@ class DocumentWebsiteChildChunkChildBlob(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["blob"]] = None @@ -3531,6 +5332,18 @@ class DocumentWebsiteChildChunkChildCode(BaseModel): language: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["code"]] = None @@ -3541,12 +5354,36 @@ class DocumentWebsiteChildChunkChildComment(BaseModel): created_at: Optional[datetime] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["comment"]] = None class DocumentWebsiteChildChunkChildDivider(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["divider"]] = None @@ -3557,6 +5394,18 @@ class DocumentWebsiteChildChunkChildImage(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["image"]] = None @@ -3567,12 +5416,36 @@ class DocumentWebsiteChildChunkChildLink(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["link"]] = None class DocumentWebsiteChildChunkChildLineBreak(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["line_break"]] = None @@ -3583,6 +5456,18 @@ class DocumentWebsiteChildChunkChildText(BaseModel): marks: Optional[List[Literal["bold", "italic", "underline", "strikethrough", "code", "math"]]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["text"]] = None @@ -3597,6 +5482,18 @@ class DocumentWebsiteChildChunkChildToolCall(BaseModel): args: Optional[Dict[str, object]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["tool_call"]] = None @@ -3613,6 +5510,18 @@ class DocumentWebsiteChildChunkChildToolResult(BaseModel): is_error: Optional[bool] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["tool_result"]] = None @@ -3625,6 +5534,18 @@ class DocumentWebsiteChildChunkChildTraceMessage(BaseModel): message_type: Optional[Literal["message", "thinking"]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + role: Optional[Literal["user", "assistant"]] = None timestamp: Optional[datetime] = None @@ -3653,6 +5574,18 @@ class DocumentWebsiteChildChunk(BaseModel): children: Optional[List[DocumentWebsiteChildChunkChild]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + text: Optional[str] = None type: Optional[Literal["chunk"]] = None @@ -3665,6 +5598,18 @@ class DocumentWebsiteChildCode(BaseModel): language: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["code"]] = None @@ -3675,12 +5620,36 @@ class DocumentWebsiteChildComment(BaseModel): created_at: Optional[datetime] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["comment"]] = None class DocumentWebsiteChildDivider(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["divider"]] = None @@ -3697,6 +5666,18 @@ class DocumentWebsiteChildEquationChildBlob(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["blob"]] = None @@ -3707,6 +5688,18 @@ class DocumentWebsiteChildEquationChildCode(BaseModel): language: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["code"]] = None @@ -3717,12 +5710,36 @@ class DocumentWebsiteChildEquationChildComment(BaseModel): created_at: Optional[datetime] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["comment"]] = None class DocumentWebsiteChildEquationChildDivider(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["divider"]] = None @@ -3733,6 +5750,18 @@ class DocumentWebsiteChildEquationChildImage(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["image"]] = None @@ -3743,12 +5772,36 @@ class DocumentWebsiteChildEquationChildLink(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["link"]] = None class DocumentWebsiteChildEquationChildLineBreak(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["line_break"]] = None @@ -3759,6 +5812,18 @@ class DocumentWebsiteChildEquationChildText(BaseModel): marks: Optional[List[Literal["bold", "italic", "underline", "strikethrough", "code", "math"]]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["text"]] = None @@ -3773,6 +5838,18 @@ class DocumentWebsiteChildEquationChildToolCall(BaseModel): args: Optional[Dict[str, object]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["tool_call"]] = None @@ -3789,6 +5866,18 @@ class DocumentWebsiteChildEquationChildToolResult(BaseModel): is_error: Optional[bool] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["tool_result"]] = None @@ -3801,6 +5890,18 @@ class DocumentWebsiteChildEquationChildTraceMessage(BaseModel): message_type: Optional[Literal["message", "thinking"]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + role: Optional[Literal["user", "assistant"]] = None timestamp: Optional[datetime] = None @@ -3829,6 +5930,18 @@ class DocumentWebsiteChildEquation(BaseModel): children: Optional[List[DocumentWebsiteChildEquationChild]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + text: Optional[str] = None type: Optional[Literal["equation"]] = None @@ -3847,6 +5960,18 @@ class DocumentWebsiteChildFootnoteChildBlob(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["blob"]] = None @@ -3857,6 +5982,18 @@ class DocumentWebsiteChildFootnoteChildCode(BaseModel): language: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["code"]] = None @@ -3867,12 +6004,36 @@ class DocumentWebsiteChildFootnoteChildComment(BaseModel): created_at: Optional[datetime] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["comment"]] = None class DocumentWebsiteChildFootnoteChildDivider(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["divider"]] = None @@ -3883,6 +6044,18 @@ class DocumentWebsiteChildFootnoteChildImage(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["image"]] = None @@ -3893,12 +6066,36 @@ class DocumentWebsiteChildFootnoteChildLink(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["link"]] = None class DocumentWebsiteChildFootnoteChildLineBreak(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["line_break"]] = None @@ -3909,6 +6106,18 @@ class DocumentWebsiteChildFootnoteChildText(BaseModel): marks: Optional[List[Literal["bold", "italic", "underline", "strikethrough", "code", "math"]]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["text"]] = None @@ -3923,6 +6132,18 @@ class DocumentWebsiteChildFootnoteChildToolCall(BaseModel): args: Optional[Dict[str, object]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["tool_call"]] = None @@ -3939,6 +6160,18 @@ class DocumentWebsiteChildFootnoteChildToolResult(BaseModel): is_error: Optional[bool] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["tool_result"]] = None @@ -3951,6 +6184,18 @@ class DocumentWebsiteChildFootnoteChildTraceMessage(BaseModel): message_type: Optional[Literal["message", "thinking"]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + role: Optional[Literal["user", "assistant"]] = None timestamp: Optional[datetime] = None @@ -3979,6 +6224,18 @@ class DocumentWebsiteChildFootnote(BaseModel): children: Optional[List[DocumentWebsiteChildFootnoteChild]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + text: Optional[str] = None type: Optional[Literal["footnote"]] = None @@ -3997,6 +6254,18 @@ class DocumentWebsiteChildHeadingChildBlob(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["blob"]] = None @@ -4007,6 +6276,18 @@ class DocumentWebsiteChildHeadingChildCode(BaseModel): language: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["code"]] = None @@ -4017,12 +6298,36 @@ class DocumentWebsiteChildHeadingChildComment(BaseModel): created_at: Optional[datetime] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["comment"]] = None class DocumentWebsiteChildHeadingChildDivider(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["divider"]] = None @@ -4033,6 +6338,18 @@ class DocumentWebsiteChildHeadingChildImage(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["image"]] = None @@ -4043,12 +6360,36 @@ class DocumentWebsiteChildHeadingChildLink(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["link"]] = None class DocumentWebsiteChildHeadingChildLineBreak(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["line_break"]] = None @@ -4059,6 +6400,18 @@ class DocumentWebsiteChildHeadingChildText(BaseModel): marks: Optional[List[Literal["bold", "italic", "underline", "strikethrough", "code", "math"]]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["text"]] = None @@ -4073,6 +6426,18 @@ class DocumentWebsiteChildHeadingChildToolCall(BaseModel): args: Optional[Dict[str, object]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["tool_call"]] = None @@ -4089,6 +6454,18 @@ class DocumentWebsiteChildHeadingChildToolResult(BaseModel): is_error: Optional[bool] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["tool_result"]] = None @@ -4101,6 +6478,18 @@ class DocumentWebsiteChildHeadingChildTraceMessage(BaseModel): message_type: Optional[Literal["message", "thinking"]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + role: Optional[Literal["user", "assistant"]] = None timestamp: Optional[datetime] = None @@ -4131,6 +6520,18 @@ class DocumentWebsiteChildHeading(BaseModel): children: Optional[List[DocumentWebsiteChildHeadingChild]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + text: Optional[str] = None type: Optional[Literal["heading"]] = None @@ -4143,6 +6544,18 @@ class DocumentWebsiteChildImage(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["image"]] = None @@ -4153,12 +6566,36 @@ class DocumentWebsiteChildLink(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["link"]] = None class DocumentWebsiteChildLineBreak(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["line_break"]] = None @@ -4167,6 +6604,18 @@ class DocumentWebsiteChildList(BaseModel): children: Optional[List[object]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + ordered: Optional[bool] = None text: Optional[str] = None @@ -4187,6 +6636,18 @@ class DocumentWebsiteChildListItemChildBlob(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["blob"]] = None @@ -4197,6 +6658,18 @@ class DocumentWebsiteChildListItemChildCode(BaseModel): language: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["code"]] = None @@ -4207,12 +6680,36 @@ class DocumentWebsiteChildListItemChildComment(BaseModel): created_at: Optional[datetime] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["comment"]] = None class DocumentWebsiteChildListItemChildDivider(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["divider"]] = None @@ -4223,6 +6720,18 @@ class DocumentWebsiteChildListItemChildImage(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["image"]] = None @@ -4233,12 +6742,36 @@ class DocumentWebsiteChildListItemChildLink(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["link"]] = None class DocumentWebsiteChildListItemChildLineBreak(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["line_break"]] = None @@ -4249,6 +6782,18 @@ class DocumentWebsiteChildListItemChildText(BaseModel): marks: Optional[List[Literal["bold", "italic", "underline", "strikethrough", "code", "math"]]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["text"]] = None @@ -4263,6 +6808,18 @@ class DocumentWebsiteChildListItemChildToolCall(BaseModel): args: Optional[Dict[str, object]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["tool_call"]] = None @@ -4279,6 +6836,18 @@ class DocumentWebsiteChildListItemChildToolResult(BaseModel): is_error: Optional[bool] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["tool_result"]] = None @@ -4291,6 +6860,18 @@ class DocumentWebsiteChildListItemChildTraceMessage(BaseModel): message_type: Optional[Literal["message", "thinking"]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + role: Optional[Literal["user", "assistant"]] = None timestamp: Optional[datetime] = None @@ -4319,6 +6900,18 @@ class DocumentWebsiteChildListItem(BaseModel): children: Optional[List[DocumentWebsiteChildListItemChild]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + text: Optional[str] = None type: Optional[Literal["list_item"]] = None @@ -4337,6 +6930,18 @@ class DocumentWebsiteChildParagraphChildBlob(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["blob"]] = None @@ -4347,6 +6952,18 @@ class DocumentWebsiteChildParagraphChildCode(BaseModel): language: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["code"]] = None @@ -4357,12 +6974,36 @@ class DocumentWebsiteChildParagraphChildComment(BaseModel): created_at: Optional[datetime] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["comment"]] = None class DocumentWebsiteChildParagraphChildDivider(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["divider"]] = None @@ -4373,6 +7014,18 @@ class DocumentWebsiteChildParagraphChildImage(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["image"]] = None @@ -4383,12 +7036,36 @@ class DocumentWebsiteChildParagraphChildLink(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["link"]] = None class DocumentWebsiteChildParagraphChildLineBreak(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["line_break"]] = None @@ -4399,6 +7076,18 @@ class DocumentWebsiteChildParagraphChildText(BaseModel): marks: Optional[List[Literal["bold", "italic", "underline", "strikethrough", "code", "math"]]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["text"]] = None @@ -4413,6 +7102,18 @@ class DocumentWebsiteChildParagraphChildToolCall(BaseModel): args: Optional[Dict[str, object]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["tool_call"]] = None @@ -4429,6 +7130,18 @@ class DocumentWebsiteChildParagraphChildToolResult(BaseModel): is_error: Optional[bool] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["tool_result"]] = None @@ -4441,6 +7154,18 @@ class DocumentWebsiteChildParagraphChildTraceMessage(BaseModel): message_type: Optional[Literal["message", "thinking"]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + role: Optional[Literal["user", "assistant"]] = None timestamp: Optional[datetime] = None @@ -4469,6 +7194,18 @@ class DocumentWebsiteChildParagraph(BaseModel): children: Optional[List[DocumentWebsiteChildParagraphChild]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + text: Optional[str] = None type: Optional[Literal["paragraph"]] = None @@ -4487,6 +7224,18 @@ class DocumentWebsiteChildQuoteChildBlob(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["blob"]] = None @@ -4497,6 +7246,18 @@ class DocumentWebsiteChildQuoteChildCode(BaseModel): language: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["code"]] = None @@ -4507,12 +7268,36 @@ class DocumentWebsiteChildQuoteChildComment(BaseModel): created_at: Optional[datetime] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["comment"]] = None class DocumentWebsiteChildQuoteChildDivider(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["divider"]] = None @@ -4523,6 +7308,18 @@ class DocumentWebsiteChildQuoteChildImage(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["image"]] = None @@ -4533,12 +7330,36 @@ class DocumentWebsiteChildQuoteChildLink(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["link"]] = None class DocumentWebsiteChildQuoteChildLineBreak(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["line_break"]] = None @@ -4549,6 +7370,18 @@ class DocumentWebsiteChildQuoteChildText(BaseModel): marks: Optional[List[Literal["bold", "italic", "underline", "strikethrough", "code", "math"]]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["text"]] = None @@ -4563,6 +7396,18 @@ class DocumentWebsiteChildQuoteChildToolCall(BaseModel): args: Optional[Dict[str, object]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["tool_call"]] = None @@ -4579,6 +7424,18 @@ class DocumentWebsiteChildQuoteChildToolResult(BaseModel): is_error: Optional[bool] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["tool_result"]] = None @@ -4591,6 +7448,18 @@ class DocumentWebsiteChildQuoteChildTraceMessage(BaseModel): message_type: Optional[Literal["message", "thinking"]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + role: Optional[Literal["user", "assistant"]] = None timestamp: Optional[datetime] = None @@ -4619,6 +7488,18 @@ class DocumentWebsiteChildQuote(BaseModel): children: Optional[List[DocumentWebsiteChildQuoteChild]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + text: Optional[str] = None type: Optional[Literal["quote"]] = None @@ -4632,6 +7513,18 @@ class DocumentWebsiteChildTable(BaseModel): has_header: Optional[bool] = None """Whether the first row should be treated as a header""" + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + text: Optional[str] = None type: Optional[Literal["table"]] = None @@ -4650,6 +7543,18 @@ class DocumentWebsiteChildTableCellChildBlob(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["blob"]] = None @@ -4660,6 +7565,18 @@ class DocumentWebsiteChildTableCellChildCode(BaseModel): language: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["code"]] = None @@ -4670,12 +7587,36 @@ class DocumentWebsiteChildTableCellChildComment(BaseModel): created_at: Optional[datetime] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["comment"]] = None class DocumentWebsiteChildTableCellChildDivider(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["divider"]] = None @@ -4686,6 +7627,18 @@ class DocumentWebsiteChildTableCellChildImage(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["image"]] = None @@ -4696,12 +7649,36 @@ class DocumentWebsiteChildTableCellChildLink(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["link"]] = None class DocumentWebsiteChildTableCellChildLineBreak(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["line_break"]] = None @@ -4712,6 +7689,18 @@ class DocumentWebsiteChildTableCellChildText(BaseModel): marks: Optional[List[Literal["bold", "italic", "underline", "strikethrough", "code", "math"]]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["text"]] = None @@ -4726,6 +7715,18 @@ class DocumentWebsiteChildTableCellChildToolCall(BaseModel): args: Optional[Dict[str, object]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["tool_call"]] = None @@ -4742,6 +7743,18 @@ class DocumentWebsiteChildTableCellChildToolResult(BaseModel): is_error: Optional[bool] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["tool_result"]] = None @@ -4754,6 +7767,18 @@ class DocumentWebsiteChildTableCellChildTraceMessage(BaseModel): message_type: Optional[Literal["message", "thinking"]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + role: Optional[Literal["user", "assistant"]] = None timestamp: Optional[datetime] = None @@ -4784,6 +7809,18 @@ class DocumentWebsiteChildTableCell(BaseModel): children: Optional[List[DocumentWebsiteChildTableCellChild]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + text: Optional[str] = None type: Optional[Literal["table_cell"]] = None @@ -4794,6 +7831,18 @@ class DocumentWebsiteChildTableRow(BaseModel): children: Optional[List[object]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + text: Optional[str] = None type: Optional[Literal["table_row"]] = None @@ -4806,6 +7855,18 @@ class DocumentWebsiteChildText(BaseModel): marks: Optional[List[Literal["bold", "italic", "underline", "strikethrough", "code", "math"]]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["text"]] = None @@ -4822,6 +7883,18 @@ class DocumentWebsiteChildToDoChildBlob(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["blob"]] = None @@ -4832,6 +7905,18 @@ class DocumentWebsiteChildToDoChildCode(BaseModel): language: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["code"]] = None @@ -4842,12 +7927,36 @@ class DocumentWebsiteChildToDoChildComment(BaseModel): created_at: Optional[datetime] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["comment"]] = None class DocumentWebsiteChildToDoChildDivider(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["divider"]] = None @@ -4858,6 +7967,18 @@ class DocumentWebsiteChildToDoChildImage(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["image"]] = None @@ -4868,12 +7989,36 @@ class DocumentWebsiteChildToDoChildLink(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["link"]] = None class DocumentWebsiteChildToDoChildLineBreak(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["line_break"]] = None @@ -4884,6 +8029,18 @@ class DocumentWebsiteChildToDoChildText(BaseModel): marks: Optional[List[Literal["bold", "italic", "underline", "strikethrough", "code", "math"]]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["text"]] = None @@ -4898,6 +8055,18 @@ class DocumentWebsiteChildToDoChildToolCall(BaseModel): args: Optional[Dict[str, object]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["tool_call"]] = None @@ -4914,6 +8083,18 @@ class DocumentWebsiteChildToDoChildToolResult(BaseModel): is_error: Optional[bool] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["tool_result"]] = None @@ -4926,6 +8107,18 @@ class DocumentWebsiteChildToDoChildTraceMessage(BaseModel): message_type: Optional[Literal["message", "thinking"]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + role: Optional[Literal["user", "assistant"]] = None timestamp: Optional[datetime] = None @@ -4956,6 +8149,18 @@ class DocumentWebsiteChildToDo(BaseModel): children: Optional[List[DocumentWebsiteChildToDoChild]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + text: Optional[str] = None type: Optional[Literal["todo"]] = None @@ -4972,6 +8177,18 @@ class DocumentWebsiteChildToolCall(BaseModel): args: Optional[Dict[str, object]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["tool_call"]] = None @@ -4988,6 +8205,18 @@ class DocumentWebsiteChildToolResult(BaseModel): is_error: Optional[bool] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["tool_result"]] = None @@ -5000,6 +8229,18 @@ class DocumentWebsiteChildTraceMessage(BaseModel): message_type: Optional[Literal["message", "thinking"]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + role: Optional[Literal["user", "assistant"]] = None timestamp: Optional[datetime] = None @@ -5021,6 +8262,18 @@ class DocumentWebsiteChildUtterance(BaseModel): end: Optional[float] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + speaker: Optional[object] = None start: Optional[float] = None @@ -5075,6 +8328,18 @@ class DocumentWebsite(BaseModel): language: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + text: Optional[str] = None title: Optional[str] = None @@ -5095,6 +8360,18 @@ class DocumentTaskChildBlob(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["blob"]] = None @@ -5111,6 +8388,18 @@ class DocumentTaskChildCalloutChildBlob(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["blob"]] = None @@ -5121,6 +8410,18 @@ class DocumentTaskChildCalloutChildCode(BaseModel): language: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["code"]] = None @@ -5131,12 +8432,36 @@ class DocumentTaskChildCalloutChildComment(BaseModel): created_at: Optional[datetime] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["comment"]] = None class DocumentTaskChildCalloutChildDivider(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["divider"]] = None @@ -5147,6 +8472,18 @@ class DocumentTaskChildCalloutChildImage(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["image"]] = None @@ -5157,12 +8494,36 @@ class DocumentTaskChildCalloutChildLink(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["link"]] = None class DocumentTaskChildCalloutChildLineBreak(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["line_break"]] = None @@ -5173,6 +8534,18 @@ class DocumentTaskChildCalloutChildText(BaseModel): marks: Optional[List[Literal["bold", "italic", "underline", "strikethrough", "code", "math"]]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["text"]] = None @@ -5187,6 +8560,18 @@ class DocumentTaskChildCalloutChildToolCall(BaseModel): args: Optional[Dict[str, object]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["tool_call"]] = None @@ -5203,6 +8588,18 @@ class DocumentTaskChildCalloutChildToolResult(BaseModel): is_error: Optional[bool] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["tool_result"]] = None @@ -5215,6 +8612,18 @@ class DocumentTaskChildCalloutChildTraceMessage(BaseModel): message_type: Optional[Literal["message", "thinking"]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + role: Optional[Literal["user", "assistant"]] = None timestamp: Optional[datetime] = None @@ -5243,6 +8652,18 @@ class DocumentTaskChildCallout(BaseModel): children: Optional[List[DocumentTaskChildCalloutChild]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + text: Optional[str] = None title: Optional[str] = None @@ -5263,6 +8684,18 @@ class DocumentTaskChildChunkChildBlob(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["blob"]] = None @@ -5273,6 +8706,18 @@ class DocumentTaskChildChunkChildCode(BaseModel): language: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["code"]] = None @@ -5283,12 +8728,36 @@ class DocumentTaskChildChunkChildComment(BaseModel): created_at: Optional[datetime] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["comment"]] = None class DocumentTaskChildChunkChildDivider(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["divider"]] = None @@ -5299,6 +8768,18 @@ class DocumentTaskChildChunkChildImage(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["image"]] = None @@ -5309,12 +8790,36 @@ class DocumentTaskChildChunkChildLink(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["link"]] = None class DocumentTaskChildChunkChildLineBreak(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["line_break"]] = None @@ -5325,6 +8830,18 @@ class DocumentTaskChildChunkChildText(BaseModel): marks: Optional[List[Literal["bold", "italic", "underline", "strikethrough", "code", "math"]]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["text"]] = None @@ -5339,6 +8856,18 @@ class DocumentTaskChildChunkChildToolCall(BaseModel): args: Optional[Dict[str, object]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["tool_call"]] = None @@ -5355,6 +8884,18 @@ class DocumentTaskChildChunkChildToolResult(BaseModel): is_error: Optional[bool] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["tool_result"]] = None @@ -5367,6 +8908,18 @@ class DocumentTaskChildChunkChildTraceMessage(BaseModel): message_type: Optional[Literal["message", "thinking"]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + role: Optional[Literal["user", "assistant"]] = None timestamp: Optional[datetime] = None @@ -5395,6 +8948,18 @@ class DocumentTaskChildChunk(BaseModel): children: Optional[List[DocumentTaskChildChunkChild]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + text: Optional[str] = None type: Optional[Literal["chunk"]] = None @@ -5407,6 +8972,18 @@ class DocumentTaskChildCode(BaseModel): language: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["code"]] = None @@ -5417,12 +8994,36 @@ class DocumentTaskChildComment(BaseModel): created_at: Optional[datetime] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["comment"]] = None class DocumentTaskChildDivider(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["divider"]] = None @@ -5439,6 +9040,18 @@ class DocumentTaskChildEquationChildBlob(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["blob"]] = None @@ -5449,6 +9062,18 @@ class DocumentTaskChildEquationChildCode(BaseModel): language: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["code"]] = None @@ -5459,12 +9084,36 @@ class DocumentTaskChildEquationChildComment(BaseModel): created_at: Optional[datetime] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["comment"]] = None class DocumentTaskChildEquationChildDivider(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["divider"]] = None @@ -5475,6 +9124,18 @@ class DocumentTaskChildEquationChildImage(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["image"]] = None @@ -5485,12 +9146,36 @@ class DocumentTaskChildEquationChildLink(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["link"]] = None class DocumentTaskChildEquationChildLineBreak(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["line_break"]] = None @@ -5501,6 +9186,18 @@ class DocumentTaskChildEquationChildText(BaseModel): marks: Optional[List[Literal["bold", "italic", "underline", "strikethrough", "code", "math"]]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["text"]] = None @@ -5515,6 +9212,18 @@ class DocumentTaskChildEquationChildToolCall(BaseModel): args: Optional[Dict[str, object]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["tool_call"]] = None @@ -5531,6 +9240,18 @@ class DocumentTaskChildEquationChildToolResult(BaseModel): is_error: Optional[bool] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["tool_result"]] = None @@ -5543,6 +9264,18 @@ class DocumentTaskChildEquationChildTraceMessage(BaseModel): message_type: Optional[Literal["message", "thinking"]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + role: Optional[Literal["user", "assistant"]] = None timestamp: Optional[datetime] = None @@ -5571,6 +9304,18 @@ class DocumentTaskChildEquation(BaseModel): children: Optional[List[DocumentTaskChildEquationChild]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + text: Optional[str] = None type: Optional[Literal["equation"]] = None @@ -5589,6 +9334,18 @@ class DocumentTaskChildFootnoteChildBlob(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["blob"]] = None @@ -5599,6 +9356,18 @@ class DocumentTaskChildFootnoteChildCode(BaseModel): language: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["code"]] = None @@ -5609,12 +9378,36 @@ class DocumentTaskChildFootnoteChildComment(BaseModel): created_at: Optional[datetime] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["comment"]] = None class DocumentTaskChildFootnoteChildDivider(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["divider"]] = None @@ -5625,6 +9418,18 @@ class DocumentTaskChildFootnoteChildImage(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["image"]] = None @@ -5635,12 +9440,36 @@ class DocumentTaskChildFootnoteChildLink(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["link"]] = None class DocumentTaskChildFootnoteChildLineBreak(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["line_break"]] = None @@ -5651,6 +9480,18 @@ class DocumentTaskChildFootnoteChildText(BaseModel): marks: Optional[List[Literal["bold", "italic", "underline", "strikethrough", "code", "math"]]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["text"]] = None @@ -5665,6 +9506,18 @@ class DocumentTaskChildFootnoteChildToolCall(BaseModel): args: Optional[Dict[str, object]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["tool_call"]] = None @@ -5681,6 +9534,18 @@ class DocumentTaskChildFootnoteChildToolResult(BaseModel): is_error: Optional[bool] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["tool_result"]] = None @@ -5693,6 +9558,18 @@ class DocumentTaskChildFootnoteChildTraceMessage(BaseModel): message_type: Optional[Literal["message", "thinking"]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + role: Optional[Literal["user", "assistant"]] = None timestamp: Optional[datetime] = None @@ -5721,6 +9598,18 @@ class DocumentTaskChildFootnote(BaseModel): children: Optional[List[DocumentTaskChildFootnoteChild]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + text: Optional[str] = None type: Optional[Literal["footnote"]] = None @@ -5739,6 +9628,18 @@ class DocumentTaskChildHeadingChildBlob(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["blob"]] = None @@ -5749,6 +9650,18 @@ class DocumentTaskChildHeadingChildCode(BaseModel): language: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["code"]] = None @@ -5759,12 +9672,36 @@ class DocumentTaskChildHeadingChildComment(BaseModel): created_at: Optional[datetime] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["comment"]] = None class DocumentTaskChildHeadingChildDivider(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["divider"]] = None @@ -5775,6 +9712,18 @@ class DocumentTaskChildHeadingChildImage(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["image"]] = None @@ -5785,12 +9734,36 @@ class DocumentTaskChildHeadingChildLink(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["link"]] = None class DocumentTaskChildHeadingChildLineBreak(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["line_break"]] = None @@ -5801,6 +9774,18 @@ class DocumentTaskChildHeadingChildText(BaseModel): marks: Optional[List[Literal["bold", "italic", "underline", "strikethrough", "code", "math"]]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["text"]] = None @@ -5815,6 +9800,18 @@ class DocumentTaskChildHeadingChildToolCall(BaseModel): args: Optional[Dict[str, object]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["tool_call"]] = None @@ -5831,6 +9828,18 @@ class DocumentTaskChildHeadingChildToolResult(BaseModel): is_error: Optional[bool] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["tool_result"]] = None @@ -5843,6 +9852,18 @@ class DocumentTaskChildHeadingChildTraceMessage(BaseModel): message_type: Optional[Literal["message", "thinking"]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + role: Optional[Literal["user", "assistant"]] = None timestamp: Optional[datetime] = None @@ -5873,6 +9894,18 @@ class DocumentTaskChildHeading(BaseModel): children: Optional[List[DocumentTaskChildHeadingChild]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + text: Optional[str] = None type: Optional[Literal["heading"]] = None @@ -5885,6 +9918,18 @@ class DocumentTaskChildImage(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["image"]] = None @@ -5895,12 +9940,36 @@ class DocumentTaskChildLink(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["link"]] = None class DocumentTaskChildLineBreak(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["line_break"]] = None @@ -5909,6 +9978,18 @@ class DocumentTaskChildList(BaseModel): children: Optional[List[object]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + ordered: Optional[bool] = None text: Optional[str] = None @@ -5929,6 +10010,18 @@ class DocumentTaskChildListItemChildBlob(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["blob"]] = None @@ -5939,6 +10032,18 @@ class DocumentTaskChildListItemChildCode(BaseModel): language: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["code"]] = None @@ -5949,12 +10054,36 @@ class DocumentTaskChildListItemChildComment(BaseModel): created_at: Optional[datetime] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["comment"]] = None class DocumentTaskChildListItemChildDivider(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["divider"]] = None @@ -5965,6 +10094,18 @@ class DocumentTaskChildListItemChildImage(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["image"]] = None @@ -5975,12 +10116,36 @@ class DocumentTaskChildListItemChildLink(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["link"]] = None class DocumentTaskChildListItemChildLineBreak(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["line_break"]] = None @@ -5991,6 +10156,18 @@ class DocumentTaskChildListItemChildText(BaseModel): marks: Optional[List[Literal["bold", "italic", "underline", "strikethrough", "code", "math"]]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["text"]] = None @@ -6005,6 +10182,18 @@ class DocumentTaskChildListItemChildToolCall(BaseModel): args: Optional[Dict[str, object]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["tool_call"]] = None @@ -6021,6 +10210,18 @@ class DocumentTaskChildListItemChildToolResult(BaseModel): is_error: Optional[bool] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["tool_result"]] = None @@ -6033,6 +10234,18 @@ class DocumentTaskChildListItemChildTraceMessage(BaseModel): message_type: Optional[Literal["message", "thinking"]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + role: Optional[Literal["user", "assistant"]] = None timestamp: Optional[datetime] = None @@ -6061,6 +10274,18 @@ class DocumentTaskChildListItem(BaseModel): children: Optional[List[DocumentTaskChildListItemChild]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + text: Optional[str] = None type: Optional[Literal["list_item"]] = None @@ -6079,6 +10304,18 @@ class DocumentTaskChildParagraphChildBlob(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["blob"]] = None @@ -6089,6 +10326,18 @@ class DocumentTaskChildParagraphChildCode(BaseModel): language: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["code"]] = None @@ -6099,12 +10348,36 @@ class DocumentTaskChildParagraphChildComment(BaseModel): created_at: Optional[datetime] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["comment"]] = None class DocumentTaskChildParagraphChildDivider(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["divider"]] = None @@ -6115,6 +10388,18 @@ class DocumentTaskChildParagraphChildImage(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["image"]] = None @@ -6125,12 +10410,36 @@ class DocumentTaskChildParagraphChildLink(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["link"]] = None class DocumentTaskChildParagraphChildLineBreak(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["line_break"]] = None @@ -6141,6 +10450,18 @@ class DocumentTaskChildParagraphChildText(BaseModel): marks: Optional[List[Literal["bold", "italic", "underline", "strikethrough", "code", "math"]]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["text"]] = None @@ -6155,6 +10476,18 @@ class DocumentTaskChildParagraphChildToolCall(BaseModel): args: Optional[Dict[str, object]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["tool_call"]] = None @@ -6171,6 +10504,18 @@ class DocumentTaskChildParagraphChildToolResult(BaseModel): is_error: Optional[bool] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["tool_result"]] = None @@ -6183,6 +10528,18 @@ class DocumentTaskChildParagraphChildTraceMessage(BaseModel): message_type: Optional[Literal["message", "thinking"]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + role: Optional[Literal["user", "assistant"]] = None timestamp: Optional[datetime] = None @@ -6211,6 +10568,18 @@ class DocumentTaskChildParagraph(BaseModel): children: Optional[List[DocumentTaskChildParagraphChild]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + text: Optional[str] = None type: Optional[Literal["paragraph"]] = None @@ -6229,6 +10598,18 @@ class DocumentTaskChildQuoteChildBlob(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["blob"]] = None @@ -6239,6 +10620,18 @@ class DocumentTaskChildQuoteChildCode(BaseModel): language: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["code"]] = None @@ -6249,12 +10642,36 @@ class DocumentTaskChildQuoteChildComment(BaseModel): created_at: Optional[datetime] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["comment"]] = None class DocumentTaskChildQuoteChildDivider(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["divider"]] = None @@ -6265,6 +10682,18 @@ class DocumentTaskChildQuoteChildImage(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["image"]] = None @@ -6275,12 +10704,36 @@ class DocumentTaskChildQuoteChildLink(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["link"]] = None class DocumentTaskChildQuoteChildLineBreak(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["line_break"]] = None @@ -6291,6 +10744,18 @@ class DocumentTaskChildQuoteChildText(BaseModel): marks: Optional[List[Literal["bold", "italic", "underline", "strikethrough", "code", "math"]]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["text"]] = None @@ -6305,6 +10770,18 @@ class DocumentTaskChildQuoteChildToolCall(BaseModel): args: Optional[Dict[str, object]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["tool_call"]] = None @@ -6321,6 +10798,18 @@ class DocumentTaskChildQuoteChildToolResult(BaseModel): is_error: Optional[bool] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["tool_result"]] = None @@ -6333,6 +10822,18 @@ class DocumentTaskChildQuoteChildTraceMessage(BaseModel): message_type: Optional[Literal["message", "thinking"]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + role: Optional[Literal["user", "assistant"]] = None timestamp: Optional[datetime] = None @@ -6361,6 +10862,18 @@ class DocumentTaskChildQuote(BaseModel): children: Optional[List[DocumentTaskChildQuoteChild]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + text: Optional[str] = None type: Optional[Literal["quote"]] = None @@ -6374,6 +10887,18 @@ class DocumentTaskChildTable(BaseModel): has_header: Optional[bool] = None """Whether the first row should be treated as a header""" + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + text: Optional[str] = None type: Optional[Literal["table"]] = None @@ -6392,6 +10917,18 @@ class DocumentTaskChildTableCellChildBlob(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["blob"]] = None @@ -6402,6 +10939,18 @@ class DocumentTaskChildTableCellChildCode(BaseModel): language: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["code"]] = None @@ -6412,12 +10961,36 @@ class DocumentTaskChildTableCellChildComment(BaseModel): created_at: Optional[datetime] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["comment"]] = None class DocumentTaskChildTableCellChildDivider(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["divider"]] = None @@ -6428,6 +11001,18 @@ class DocumentTaskChildTableCellChildImage(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["image"]] = None @@ -6438,12 +11023,36 @@ class DocumentTaskChildTableCellChildLink(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["link"]] = None class DocumentTaskChildTableCellChildLineBreak(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["line_break"]] = None @@ -6454,6 +11063,18 @@ class DocumentTaskChildTableCellChildText(BaseModel): marks: Optional[List[Literal["bold", "italic", "underline", "strikethrough", "code", "math"]]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["text"]] = None @@ -6468,6 +11089,18 @@ class DocumentTaskChildTableCellChildToolCall(BaseModel): args: Optional[Dict[str, object]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["tool_call"]] = None @@ -6484,6 +11117,18 @@ class DocumentTaskChildTableCellChildToolResult(BaseModel): is_error: Optional[bool] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["tool_result"]] = None @@ -6496,6 +11141,18 @@ class DocumentTaskChildTableCellChildTraceMessage(BaseModel): message_type: Optional[Literal["message", "thinking"]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + role: Optional[Literal["user", "assistant"]] = None timestamp: Optional[datetime] = None @@ -6526,6 +11183,18 @@ class DocumentTaskChildTableCell(BaseModel): children: Optional[List[DocumentTaskChildTableCellChild]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + text: Optional[str] = None type: Optional[Literal["table_cell"]] = None @@ -6536,6 +11205,18 @@ class DocumentTaskChildTableRow(BaseModel): children: Optional[List[object]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + text: Optional[str] = None type: Optional[Literal["table_row"]] = None @@ -6548,6 +11229,18 @@ class DocumentTaskChildText(BaseModel): marks: Optional[List[Literal["bold", "italic", "underline", "strikethrough", "code", "math"]]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["text"]] = None @@ -6564,6 +11257,18 @@ class DocumentTaskChildToDoChildBlob(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["blob"]] = None @@ -6574,6 +11279,18 @@ class DocumentTaskChildToDoChildCode(BaseModel): language: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["code"]] = None @@ -6584,12 +11301,36 @@ class DocumentTaskChildToDoChildComment(BaseModel): created_at: Optional[datetime] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["comment"]] = None class DocumentTaskChildToDoChildDivider(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["divider"]] = None @@ -6600,6 +11341,18 @@ class DocumentTaskChildToDoChildImage(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["image"]] = None @@ -6610,12 +11363,36 @@ class DocumentTaskChildToDoChildLink(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["link"]] = None class DocumentTaskChildToDoChildLineBreak(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["line_break"]] = None @@ -6626,6 +11403,18 @@ class DocumentTaskChildToDoChildText(BaseModel): marks: Optional[List[Literal["bold", "italic", "underline", "strikethrough", "code", "math"]]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["text"]] = None @@ -6640,6 +11429,18 @@ class DocumentTaskChildToDoChildToolCall(BaseModel): args: Optional[Dict[str, object]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["tool_call"]] = None @@ -6656,6 +11457,18 @@ class DocumentTaskChildToDoChildToolResult(BaseModel): is_error: Optional[bool] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["tool_result"]] = None @@ -6668,6 +11481,18 @@ class DocumentTaskChildToDoChildTraceMessage(BaseModel): message_type: Optional[Literal["message", "thinking"]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + role: Optional[Literal["user", "assistant"]] = None timestamp: Optional[datetime] = None @@ -6698,6 +11523,18 @@ class DocumentTaskChildToDo(BaseModel): children: Optional[List[DocumentTaskChildToDoChild]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + text: Optional[str] = None type: Optional[Literal["todo"]] = None @@ -6714,6 +11551,18 @@ class DocumentTaskChildToolCall(BaseModel): args: Optional[Dict[str, object]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["tool_call"]] = None @@ -6730,6 +11579,18 @@ class DocumentTaskChildToolResult(BaseModel): is_error: Optional[bool] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["tool_result"]] = None @@ -6742,6 +11603,18 @@ class DocumentTaskChildTraceMessage(BaseModel): message_type: Optional[Literal["message", "thinking"]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + role: Optional[Literal["user", "assistant"]] = None timestamp: Optional[datetime] = None @@ -6763,6 +11636,18 @@ class DocumentTaskChildUtterance(BaseModel): end: Optional[float] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + speaker: Optional[object] = None start: Optional[float] = None @@ -6815,6 +11700,18 @@ class DocumentTaskCommentSenderChildBlob(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["blob"]] = None @@ -6825,6 +11722,18 @@ class DocumentTaskCommentSenderChildCode(BaseModel): language: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["code"]] = None @@ -6835,12 +11744,36 @@ class DocumentTaskCommentSenderChildComment(BaseModel): created_at: Optional[datetime] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["comment"]] = None class DocumentTaskCommentSenderChildDivider(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["divider"]] = None @@ -6851,6 +11784,18 @@ class DocumentTaskCommentSenderChildImage(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["image"]] = None @@ -6861,12 +11806,36 @@ class DocumentTaskCommentSenderChildLink(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["link"]] = None class DocumentTaskCommentSenderChildLineBreak(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["line_break"]] = None @@ -6877,6 +11846,18 @@ class DocumentTaskCommentSenderChildText(BaseModel): marks: Optional[List[Literal["bold", "italic", "underline", "strikethrough", "code", "math"]]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["text"]] = None @@ -6891,6 +11872,18 @@ class DocumentTaskCommentSenderChildToolCall(BaseModel): args: Optional[Dict[str, object]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["tool_call"]] = None @@ -6907,6 +11900,18 @@ class DocumentTaskCommentSenderChildToolResult(BaseModel): is_error: Optional[bool] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["tool_result"]] = None @@ -6919,6 +11924,18 @@ class DocumentTaskCommentSenderChildTraceMessage(BaseModel): message_type: Optional[Literal["message", "thinking"]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + role: Optional[Literal["user", "assistant"]] = None timestamp: Optional[datetime] = None @@ -6970,6 +11987,18 @@ class DocumentTaskCommentSender(BaseModel): link_urls: Optional[List[str]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + name: Optional[str] = None phone_numbers: Optional[List[str]] = None @@ -6996,6 +12025,18 @@ class DocumentTaskCommentChildBlob(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["blob"]] = None @@ -7012,6 +12053,18 @@ class DocumentTaskCommentChildCalloutChildBlob(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["blob"]] = None @@ -7022,6 +12075,18 @@ class DocumentTaskCommentChildCalloutChildCode(BaseModel): language: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["code"]] = None @@ -7032,12 +12097,36 @@ class DocumentTaskCommentChildCalloutChildComment(BaseModel): created_at: Optional[datetime] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["comment"]] = None class DocumentTaskCommentChildCalloutChildDivider(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["divider"]] = None @@ -7048,6 +12137,18 @@ class DocumentTaskCommentChildCalloutChildImage(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["image"]] = None @@ -7058,12 +12159,36 @@ class DocumentTaskCommentChildCalloutChildLink(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["link"]] = None class DocumentTaskCommentChildCalloutChildLineBreak(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["line_break"]] = None @@ -7074,6 +12199,18 @@ class DocumentTaskCommentChildCalloutChildText(BaseModel): marks: Optional[List[Literal["bold", "italic", "underline", "strikethrough", "code", "math"]]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["text"]] = None @@ -7088,6 +12225,18 @@ class DocumentTaskCommentChildCalloutChildToolCall(BaseModel): args: Optional[Dict[str, object]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["tool_call"]] = None @@ -7104,6 +12253,18 @@ class DocumentTaskCommentChildCalloutChildToolResult(BaseModel): is_error: Optional[bool] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["tool_result"]] = None @@ -7116,6 +12277,18 @@ class DocumentTaskCommentChildCalloutChildTraceMessage(BaseModel): message_type: Optional[Literal["message", "thinking"]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + role: Optional[Literal["user", "assistant"]] = None timestamp: Optional[datetime] = None @@ -7144,6 +12317,18 @@ class DocumentTaskCommentChildCallout(BaseModel): children: Optional[List[DocumentTaskCommentChildCalloutChild]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + text: Optional[str] = None title: Optional[str] = None @@ -7164,6 +12349,18 @@ class DocumentTaskCommentChildChunkChildBlob(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["blob"]] = None @@ -7174,6 +12371,18 @@ class DocumentTaskCommentChildChunkChildCode(BaseModel): language: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["code"]] = None @@ -7184,12 +12393,36 @@ class DocumentTaskCommentChildChunkChildComment(BaseModel): created_at: Optional[datetime] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["comment"]] = None class DocumentTaskCommentChildChunkChildDivider(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["divider"]] = None @@ -7200,6 +12433,18 @@ class DocumentTaskCommentChildChunkChildImage(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["image"]] = None @@ -7210,12 +12455,36 @@ class DocumentTaskCommentChildChunkChildLink(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["link"]] = None class DocumentTaskCommentChildChunkChildLineBreak(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["line_break"]] = None @@ -7226,6 +12495,18 @@ class DocumentTaskCommentChildChunkChildText(BaseModel): marks: Optional[List[Literal["bold", "italic", "underline", "strikethrough", "code", "math"]]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["text"]] = None @@ -7240,6 +12521,18 @@ class DocumentTaskCommentChildChunkChildToolCall(BaseModel): args: Optional[Dict[str, object]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["tool_call"]] = None @@ -7256,6 +12549,18 @@ class DocumentTaskCommentChildChunkChildToolResult(BaseModel): is_error: Optional[bool] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["tool_result"]] = None @@ -7268,6 +12573,18 @@ class DocumentTaskCommentChildChunkChildTraceMessage(BaseModel): message_type: Optional[Literal["message", "thinking"]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + role: Optional[Literal["user", "assistant"]] = None timestamp: Optional[datetime] = None @@ -7296,6 +12613,18 @@ class DocumentTaskCommentChildChunk(BaseModel): children: Optional[List[DocumentTaskCommentChildChunkChild]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + text: Optional[str] = None type: Optional[Literal["chunk"]] = None @@ -7308,6 +12637,18 @@ class DocumentTaskCommentChildCode(BaseModel): language: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["code"]] = None @@ -7318,12 +12659,36 @@ class DocumentTaskCommentChildComment(BaseModel): created_at: Optional[datetime] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["comment"]] = None class DocumentTaskCommentChildDivider(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["divider"]] = None @@ -7340,6 +12705,18 @@ class DocumentTaskCommentChildEquationChildBlob(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["blob"]] = None @@ -7350,6 +12727,18 @@ class DocumentTaskCommentChildEquationChildCode(BaseModel): language: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["code"]] = None @@ -7360,12 +12749,36 @@ class DocumentTaskCommentChildEquationChildComment(BaseModel): created_at: Optional[datetime] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["comment"]] = None class DocumentTaskCommentChildEquationChildDivider(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["divider"]] = None @@ -7376,6 +12789,18 @@ class DocumentTaskCommentChildEquationChildImage(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["image"]] = None @@ -7386,12 +12811,36 @@ class DocumentTaskCommentChildEquationChildLink(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["link"]] = None class DocumentTaskCommentChildEquationChildLineBreak(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["line_break"]] = None @@ -7402,6 +12851,18 @@ class DocumentTaskCommentChildEquationChildText(BaseModel): marks: Optional[List[Literal["bold", "italic", "underline", "strikethrough", "code", "math"]]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["text"]] = None @@ -7416,6 +12877,18 @@ class DocumentTaskCommentChildEquationChildToolCall(BaseModel): args: Optional[Dict[str, object]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["tool_call"]] = None @@ -7432,6 +12905,18 @@ class DocumentTaskCommentChildEquationChildToolResult(BaseModel): is_error: Optional[bool] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["tool_result"]] = None @@ -7444,6 +12929,18 @@ class DocumentTaskCommentChildEquationChildTraceMessage(BaseModel): message_type: Optional[Literal["message", "thinking"]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + role: Optional[Literal["user", "assistant"]] = None timestamp: Optional[datetime] = None @@ -7472,6 +12969,18 @@ class DocumentTaskCommentChildEquation(BaseModel): children: Optional[List[DocumentTaskCommentChildEquationChild]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + text: Optional[str] = None type: Optional[Literal["equation"]] = None @@ -7490,6 +12999,18 @@ class DocumentTaskCommentChildFootnoteChildBlob(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["blob"]] = None @@ -7500,6 +13021,18 @@ class DocumentTaskCommentChildFootnoteChildCode(BaseModel): language: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["code"]] = None @@ -7510,12 +13043,36 @@ class DocumentTaskCommentChildFootnoteChildComment(BaseModel): created_at: Optional[datetime] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["comment"]] = None class DocumentTaskCommentChildFootnoteChildDivider(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["divider"]] = None @@ -7526,6 +13083,18 @@ class DocumentTaskCommentChildFootnoteChildImage(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["image"]] = None @@ -7536,12 +13105,36 @@ class DocumentTaskCommentChildFootnoteChildLink(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["link"]] = None class DocumentTaskCommentChildFootnoteChildLineBreak(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["line_break"]] = None @@ -7552,6 +13145,18 @@ class DocumentTaskCommentChildFootnoteChildText(BaseModel): marks: Optional[List[Literal["bold", "italic", "underline", "strikethrough", "code", "math"]]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["text"]] = None @@ -7566,6 +13171,18 @@ class DocumentTaskCommentChildFootnoteChildToolCall(BaseModel): args: Optional[Dict[str, object]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["tool_call"]] = None @@ -7582,6 +13199,18 @@ class DocumentTaskCommentChildFootnoteChildToolResult(BaseModel): is_error: Optional[bool] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["tool_result"]] = None @@ -7594,6 +13223,18 @@ class DocumentTaskCommentChildFootnoteChildTraceMessage(BaseModel): message_type: Optional[Literal["message", "thinking"]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + role: Optional[Literal["user", "assistant"]] = None timestamp: Optional[datetime] = None @@ -7622,6 +13263,18 @@ class DocumentTaskCommentChildFootnote(BaseModel): children: Optional[List[DocumentTaskCommentChildFootnoteChild]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + text: Optional[str] = None type: Optional[Literal["footnote"]] = None @@ -7640,6 +13293,18 @@ class DocumentTaskCommentChildHeadingChildBlob(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["blob"]] = None @@ -7650,6 +13315,18 @@ class DocumentTaskCommentChildHeadingChildCode(BaseModel): language: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["code"]] = None @@ -7660,12 +13337,36 @@ class DocumentTaskCommentChildHeadingChildComment(BaseModel): created_at: Optional[datetime] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["comment"]] = None class DocumentTaskCommentChildHeadingChildDivider(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["divider"]] = None @@ -7676,6 +13377,18 @@ class DocumentTaskCommentChildHeadingChildImage(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["image"]] = None @@ -7686,12 +13399,36 @@ class DocumentTaskCommentChildHeadingChildLink(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["link"]] = None class DocumentTaskCommentChildHeadingChildLineBreak(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["line_break"]] = None @@ -7702,6 +13439,18 @@ class DocumentTaskCommentChildHeadingChildText(BaseModel): marks: Optional[List[Literal["bold", "italic", "underline", "strikethrough", "code", "math"]]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["text"]] = None @@ -7716,6 +13465,18 @@ class DocumentTaskCommentChildHeadingChildToolCall(BaseModel): args: Optional[Dict[str, object]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["tool_call"]] = None @@ -7732,6 +13493,18 @@ class DocumentTaskCommentChildHeadingChildToolResult(BaseModel): is_error: Optional[bool] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["tool_result"]] = None @@ -7744,6 +13517,18 @@ class DocumentTaskCommentChildHeadingChildTraceMessage(BaseModel): message_type: Optional[Literal["message", "thinking"]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + role: Optional[Literal["user", "assistant"]] = None timestamp: Optional[datetime] = None @@ -7774,6 +13559,18 @@ class DocumentTaskCommentChildHeading(BaseModel): children: Optional[List[DocumentTaskCommentChildHeadingChild]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + text: Optional[str] = None type: Optional[Literal["heading"]] = None @@ -7786,6 +13583,18 @@ class DocumentTaskCommentChildImage(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["image"]] = None @@ -7796,12 +13605,36 @@ class DocumentTaskCommentChildLink(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["link"]] = None class DocumentTaskCommentChildLineBreak(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["line_break"]] = None @@ -7810,6 +13643,18 @@ class DocumentTaskCommentChildList(BaseModel): children: Optional[List[object]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + ordered: Optional[bool] = None text: Optional[str] = None @@ -7830,6 +13675,18 @@ class DocumentTaskCommentChildListItemChildBlob(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["blob"]] = None @@ -7840,6 +13697,18 @@ class DocumentTaskCommentChildListItemChildCode(BaseModel): language: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["code"]] = None @@ -7850,12 +13719,36 @@ class DocumentTaskCommentChildListItemChildComment(BaseModel): created_at: Optional[datetime] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["comment"]] = None class DocumentTaskCommentChildListItemChildDivider(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["divider"]] = None @@ -7866,6 +13759,18 @@ class DocumentTaskCommentChildListItemChildImage(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["image"]] = None @@ -7876,12 +13781,36 @@ class DocumentTaskCommentChildListItemChildLink(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["link"]] = None class DocumentTaskCommentChildListItemChildLineBreak(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["line_break"]] = None @@ -7892,6 +13821,18 @@ class DocumentTaskCommentChildListItemChildText(BaseModel): marks: Optional[List[Literal["bold", "italic", "underline", "strikethrough", "code", "math"]]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["text"]] = None @@ -7906,6 +13847,18 @@ class DocumentTaskCommentChildListItemChildToolCall(BaseModel): args: Optional[Dict[str, object]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["tool_call"]] = None @@ -7922,6 +13875,18 @@ class DocumentTaskCommentChildListItemChildToolResult(BaseModel): is_error: Optional[bool] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["tool_result"]] = None @@ -7934,6 +13899,18 @@ class DocumentTaskCommentChildListItemChildTraceMessage(BaseModel): message_type: Optional[Literal["message", "thinking"]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + role: Optional[Literal["user", "assistant"]] = None timestamp: Optional[datetime] = None @@ -7962,6 +13939,18 @@ class DocumentTaskCommentChildListItem(BaseModel): children: Optional[List[DocumentTaskCommentChildListItemChild]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + text: Optional[str] = None type: Optional[Literal["list_item"]] = None @@ -7980,6 +13969,18 @@ class DocumentTaskCommentChildParagraphChildBlob(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["blob"]] = None @@ -7990,6 +13991,18 @@ class DocumentTaskCommentChildParagraphChildCode(BaseModel): language: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["code"]] = None @@ -8000,12 +14013,36 @@ class DocumentTaskCommentChildParagraphChildComment(BaseModel): created_at: Optional[datetime] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["comment"]] = None class DocumentTaskCommentChildParagraphChildDivider(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["divider"]] = None @@ -8016,6 +14053,18 @@ class DocumentTaskCommentChildParagraphChildImage(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["image"]] = None @@ -8026,12 +14075,36 @@ class DocumentTaskCommentChildParagraphChildLink(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["link"]] = None class DocumentTaskCommentChildParagraphChildLineBreak(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["line_break"]] = None @@ -8042,6 +14115,18 @@ class DocumentTaskCommentChildParagraphChildText(BaseModel): marks: Optional[List[Literal["bold", "italic", "underline", "strikethrough", "code", "math"]]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["text"]] = None @@ -8056,6 +14141,18 @@ class DocumentTaskCommentChildParagraphChildToolCall(BaseModel): args: Optional[Dict[str, object]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["tool_call"]] = None @@ -8072,6 +14169,18 @@ class DocumentTaskCommentChildParagraphChildToolResult(BaseModel): is_error: Optional[bool] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["tool_result"]] = None @@ -8084,6 +14193,18 @@ class DocumentTaskCommentChildParagraphChildTraceMessage(BaseModel): message_type: Optional[Literal["message", "thinking"]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + role: Optional[Literal["user", "assistant"]] = None timestamp: Optional[datetime] = None @@ -8112,6 +14233,18 @@ class DocumentTaskCommentChildParagraph(BaseModel): children: Optional[List[DocumentTaskCommentChildParagraphChild]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + text: Optional[str] = None type: Optional[Literal["paragraph"]] = None @@ -8130,6 +14263,18 @@ class DocumentTaskCommentChildQuoteChildBlob(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["blob"]] = None @@ -8140,6 +14285,18 @@ class DocumentTaskCommentChildQuoteChildCode(BaseModel): language: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["code"]] = None @@ -8150,12 +14307,36 @@ class DocumentTaskCommentChildQuoteChildComment(BaseModel): created_at: Optional[datetime] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["comment"]] = None class DocumentTaskCommentChildQuoteChildDivider(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["divider"]] = None @@ -8166,6 +14347,18 @@ class DocumentTaskCommentChildQuoteChildImage(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["image"]] = None @@ -8176,12 +14369,36 @@ class DocumentTaskCommentChildQuoteChildLink(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["link"]] = None class DocumentTaskCommentChildQuoteChildLineBreak(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["line_break"]] = None @@ -8192,6 +14409,18 @@ class DocumentTaskCommentChildQuoteChildText(BaseModel): marks: Optional[List[Literal["bold", "italic", "underline", "strikethrough", "code", "math"]]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["text"]] = None @@ -8206,6 +14435,18 @@ class DocumentTaskCommentChildQuoteChildToolCall(BaseModel): args: Optional[Dict[str, object]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["tool_call"]] = None @@ -8222,6 +14463,18 @@ class DocumentTaskCommentChildQuoteChildToolResult(BaseModel): is_error: Optional[bool] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["tool_result"]] = None @@ -8234,6 +14487,18 @@ class DocumentTaskCommentChildQuoteChildTraceMessage(BaseModel): message_type: Optional[Literal["message", "thinking"]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + role: Optional[Literal["user", "assistant"]] = None timestamp: Optional[datetime] = None @@ -8262,6 +14527,18 @@ class DocumentTaskCommentChildQuote(BaseModel): children: Optional[List[DocumentTaskCommentChildQuoteChild]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + text: Optional[str] = None type: Optional[Literal["quote"]] = None @@ -8275,6 +14552,18 @@ class DocumentTaskCommentChildTable(BaseModel): has_header: Optional[bool] = None """Whether the first row should be treated as a header""" + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + text: Optional[str] = None type: Optional[Literal["table"]] = None @@ -8293,6 +14582,18 @@ class DocumentTaskCommentChildTableCellChildBlob(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["blob"]] = None @@ -8303,6 +14604,18 @@ class DocumentTaskCommentChildTableCellChildCode(BaseModel): language: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["code"]] = None @@ -8313,12 +14626,36 @@ class DocumentTaskCommentChildTableCellChildComment(BaseModel): created_at: Optional[datetime] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["comment"]] = None class DocumentTaskCommentChildTableCellChildDivider(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["divider"]] = None @@ -8329,6 +14666,18 @@ class DocumentTaskCommentChildTableCellChildImage(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["image"]] = None @@ -8339,12 +14688,36 @@ class DocumentTaskCommentChildTableCellChildLink(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["link"]] = None class DocumentTaskCommentChildTableCellChildLineBreak(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["line_break"]] = None @@ -8355,6 +14728,18 @@ class DocumentTaskCommentChildTableCellChildText(BaseModel): marks: Optional[List[Literal["bold", "italic", "underline", "strikethrough", "code", "math"]]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["text"]] = None @@ -8369,6 +14754,18 @@ class DocumentTaskCommentChildTableCellChildToolCall(BaseModel): args: Optional[Dict[str, object]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["tool_call"]] = None @@ -8385,6 +14782,18 @@ class DocumentTaskCommentChildTableCellChildToolResult(BaseModel): is_error: Optional[bool] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["tool_result"]] = None @@ -8397,6 +14806,18 @@ class DocumentTaskCommentChildTableCellChildTraceMessage(BaseModel): message_type: Optional[Literal["message", "thinking"]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + role: Optional[Literal["user", "assistant"]] = None timestamp: Optional[datetime] = None @@ -8427,6 +14848,18 @@ class DocumentTaskCommentChildTableCell(BaseModel): children: Optional[List[DocumentTaskCommentChildTableCellChild]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + text: Optional[str] = None type: Optional[Literal["table_cell"]] = None @@ -8437,6 +14870,18 @@ class DocumentTaskCommentChildTableRow(BaseModel): children: Optional[List[object]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + text: Optional[str] = None type: Optional[Literal["table_row"]] = None @@ -8449,6 +14894,18 @@ class DocumentTaskCommentChildText(BaseModel): marks: Optional[List[Literal["bold", "italic", "underline", "strikethrough", "code", "math"]]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["text"]] = None @@ -8465,6 +14922,18 @@ class DocumentTaskCommentChildToDoChildBlob(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["blob"]] = None @@ -8475,6 +14944,18 @@ class DocumentTaskCommentChildToDoChildCode(BaseModel): language: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["code"]] = None @@ -8485,12 +14966,36 @@ class DocumentTaskCommentChildToDoChildComment(BaseModel): created_at: Optional[datetime] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["comment"]] = None class DocumentTaskCommentChildToDoChildDivider(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["divider"]] = None @@ -8501,6 +15006,18 @@ class DocumentTaskCommentChildToDoChildImage(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["image"]] = None @@ -8511,12 +15028,36 @@ class DocumentTaskCommentChildToDoChildLink(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["link"]] = None class DocumentTaskCommentChildToDoChildLineBreak(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["line_break"]] = None @@ -8527,6 +15068,18 @@ class DocumentTaskCommentChildToDoChildText(BaseModel): marks: Optional[List[Literal["bold", "italic", "underline", "strikethrough", "code", "math"]]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["text"]] = None @@ -8541,6 +15094,18 @@ class DocumentTaskCommentChildToDoChildToolCall(BaseModel): args: Optional[Dict[str, object]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["tool_call"]] = None @@ -8557,6 +15122,18 @@ class DocumentTaskCommentChildToDoChildToolResult(BaseModel): is_error: Optional[bool] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["tool_result"]] = None @@ -8569,6 +15146,18 @@ class DocumentTaskCommentChildToDoChildTraceMessage(BaseModel): message_type: Optional[Literal["message", "thinking"]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + role: Optional[Literal["user", "assistant"]] = None timestamp: Optional[datetime] = None @@ -8599,6 +15188,18 @@ class DocumentTaskCommentChildToDo(BaseModel): children: Optional[List[DocumentTaskCommentChildToDoChild]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + text: Optional[str] = None type: Optional[Literal["todo"]] = None @@ -8615,6 +15216,18 @@ class DocumentTaskCommentChildToolCall(BaseModel): args: Optional[Dict[str, object]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["tool_call"]] = None @@ -8631,6 +15244,18 @@ class DocumentTaskCommentChildToolResult(BaseModel): is_error: Optional[bool] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["tool_result"]] = None @@ -8643,6 +15268,18 @@ class DocumentTaskCommentChildTraceMessage(BaseModel): message_type: Optional[Literal["message", "thinking"]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + role: Optional[Literal["user", "assistant"]] = None timestamp: Optional[datetime] = None @@ -8664,6 +15301,18 @@ class DocumentTaskCommentChildUtterance(BaseModel): end: Optional[float] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + speaker: Optional[object] = None start: Optional[float] = None @@ -8716,6 +15365,18 @@ class DocumentTaskCommentMentionedUserChildBlob(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["blob"]] = None @@ -8726,6 +15387,18 @@ class DocumentTaskCommentMentionedUserChildCode(BaseModel): language: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["code"]] = None @@ -8736,12 +15409,36 @@ class DocumentTaskCommentMentionedUserChildComment(BaseModel): created_at: Optional[datetime] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["comment"]] = None class DocumentTaskCommentMentionedUserChildDivider(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["divider"]] = None @@ -8752,6 +15449,18 @@ class DocumentTaskCommentMentionedUserChildImage(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["image"]] = None @@ -8762,12 +15471,36 @@ class DocumentTaskCommentMentionedUserChildLink(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["link"]] = None class DocumentTaskCommentMentionedUserChildLineBreak(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["line_break"]] = None @@ -8778,6 +15511,18 @@ class DocumentTaskCommentMentionedUserChildText(BaseModel): marks: Optional[List[Literal["bold", "italic", "underline", "strikethrough", "code", "math"]]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["text"]] = None @@ -8792,6 +15537,18 @@ class DocumentTaskCommentMentionedUserChildToolCall(BaseModel): args: Optional[Dict[str, object]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["tool_call"]] = None @@ -8808,6 +15565,18 @@ class DocumentTaskCommentMentionedUserChildToolResult(BaseModel): is_error: Optional[bool] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["tool_result"]] = None @@ -8820,6 +15589,18 @@ class DocumentTaskCommentMentionedUserChildTraceMessage(BaseModel): message_type: Optional[Literal["message", "thinking"]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + role: Optional[Literal["user", "assistant"]] = None timestamp: Optional[datetime] = None @@ -8871,6 +15652,18 @@ class DocumentTaskCommentMentionedUser(BaseModel): link_urls: Optional[List[str]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + name: Optional[str] = None phone_numbers: Optional[List[str]] = None @@ -8906,6 +15699,18 @@ class DocumentTaskComment(BaseModel): mentioned_users: Optional[List[DocumentTaskCommentMentionedUser]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + num_replies: Optional[int] = None replies: Optional[List[object]] = None @@ -8935,6 +15740,18 @@ class DocumentTask(BaseModel): due_at: Optional[datetime] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + priority: Optional[Literal["urgent", "high", "medium", "low"]] = None status: Optional[Literal["completed", "not_started", "in_progress", "cancelled"]] = None @@ -8957,6 +15774,18 @@ class DocumentPersonChildBlob(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["blob"]] = None @@ -8967,6 +15796,18 @@ class DocumentPersonChildCode(BaseModel): language: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["code"]] = None @@ -8977,12 +15818,36 @@ class DocumentPersonChildComment(BaseModel): created_at: Optional[datetime] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["comment"]] = None class DocumentPersonChildDivider(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["divider"]] = None @@ -8993,6 +15858,18 @@ class DocumentPersonChildImage(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["image"]] = None @@ -9003,12 +15880,36 @@ class DocumentPersonChildLink(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["link"]] = None class DocumentPersonChildLineBreak(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["line_break"]] = None @@ -9019,6 +15920,18 @@ class DocumentPersonChildText(BaseModel): marks: Optional[List[Literal["bold", "italic", "underline", "strikethrough", "code", "math"]]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["text"]] = None @@ -9033,6 +15946,18 @@ class DocumentPersonChildToolCall(BaseModel): args: Optional[Dict[str, object]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["tool_call"]] = None @@ -9049,6 +15974,18 @@ class DocumentPersonChildToolResult(BaseModel): is_error: Optional[bool] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["tool_result"]] = None @@ -9061,6 +15998,18 @@ class DocumentPersonChildTraceMessage(BaseModel): message_type: Optional[Literal["message", "thinking"]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + role: Optional[Literal["user", "assistant"]] = None timestamp: Optional[datetime] = None @@ -9112,6 +16061,18 @@ class DocumentPerson(BaseModel): link_urls: Optional[List[str]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + name: Optional[str] = None phone_numbers: Optional[List[str]] = None @@ -9138,6 +16099,18 @@ class DocumentMessageSenderChildBlob(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["blob"]] = None @@ -9148,6 +16121,18 @@ class DocumentMessageSenderChildCode(BaseModel): language: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["code"]] = None @@ -9158,12 +16143,36 @@ class DocumentMessageSenderChildComment(BaseModel): created_at: Optional[datetime] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["comment"]] = None class DocumentMessageSenderChildDivider(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["divider"]] = None @@ -9174,6 +16183,18 @@ class DocumentMessageSenderChildImage(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["image"]] = None @@ -9184,12 +16205,36 @@ class DocumentMessageSenderChildLink(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["link"]] = None class DocumentMessageSenderChildLineBreak(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["line_break"]] = None @@ -9200,6 +16245,18 @@ class DocumentMessageSenderChildText(BaseModel): marks: Optional[List[Literal["bold", "italic", "underline", "strikethrough", "code", "math"]]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["text"]] = None @@ -9214,6 +16271,18 @@ class DocumentMessageSenderChildToolCall(BaseModel): args: Optional[Dict[str, object]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["tool_call"]] = None @@ -9230,6 +16299,18 @@ class DocumentMessageSenderChildToolResult(BaseModel): is_error: Optional[bool] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["tool_result"]] = None @@ -9242,6 +16323,18 @@ class DocumentMessageSenderChildTraceMessage(BaseModel): message_type: Optional[Literal["message", "thinking"]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + role: Optional[Literal["user", "assistant"]] = None timestamp: Optional[datetime] = None @@ -9293,6 +16386,18 @@ class DocumentMessageSender(BaseModel): link_urls: Optional[List[str]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + name: Optional[str] = None phone_numbers: Optional[List[str]] = None @@ -9319,6 +16424,18 @@ class DocumentMessageChildBlob(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["blob"]] = None @@ -9335,6 +16452,18 @@ class DocumentMessageChildCalloutChildBlob(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["blob"]] = None @@ -9345,6 +16474,18 @@ class DocumentMessageChildCalloutChildCode(BaseModel): language: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["code"]] = None @@ -9355,12 +16496,36 @@ class DocumentMessageChildCalloutChildComment(BaseModel): created_at: Optional[datetime] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["comment"]] = None class DocumentMessageChildCalloutChildDivider(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["divider"]] = None @@ -9371,6 +16536,18 @@ class DocumentMessageChildCalloutChildImage(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["image"]] = None @@ -9381,12 +16558,36 @@ class DocumentMessageChildCalloutChildLink(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["link"]] = None class DocumentMessageChildCalloutChildLineBreak(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["line_break"]] = None @@ -9397,6 +16598,18 @@ class DocumentMessageChildCalloutChildText(BaseModel): marks: Optional[List[Literal["bold", "italic", "underline", "strikethrough", "code", "math"]]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["text"]] = None @@ -9411,6 +16624,18 @@ class DocumentMessageChildCalloutChildToolCall(BaseModel): args: Optional[Dict[str, object]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["tool_call"]] = None @@ -9427,6 +16652,18 @@ class DocumentMessageChildCalloutChildToolResult(BaseModel): is_error: Optional[bool] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["tool_result"]] = None @@ -9439,6 +16676,18 @@ class DocumentMessageChildCalloutChildTraceMessage(BaseModel): message_type: Optional[Literal["message", "thinking"]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + role: Optional[Literal["user", "assistant"]] = None timestamp: Optional[datetime] = None @@ -9467,6 +16716,18 @@ class DocumentMessageChildCallout(BaseModel): children: Optional[List[DocumentMessageChildCalloutChild]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + text: Optional[str] = None title: Optional[str] = None @@ -9487,6 +16748,18 @@ class DocumentMessageChildChunkChildBlob(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["blob"]] = None @@ -9497,6 +16770,18 @@ class DocumentMessageChildChunkChildCode(BaseModel): language: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["code"]] = None @@ -9507,12 +16792,36 @@ class DocumentMessageChildChunkChildComment(BaseModel): created_at: Optional[datetime] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["comment"]] = None class DocumentMessageChildChunkChildDivider(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["divider"]] = None @@ -9523,6 +16832,18 @@ class DocumentMessageChildChunkChildImage(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["image"]] = None @@ -9533,12 +16854,36 @@ class DocumentMessageChildChunkChildLink(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["link"]] = None class DocumentMessageChildChunkChildLineBreak(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["line_break"]] = None @@ -9549,6 +16894,18 @@ class DocumentMessageChildChunkChildText(BaseModel): marks: Optional[List[Literal["bold", "italic", "underline", "strikethrough", "code", "math"]]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["text"]] = None @@ -9563,6 +16920,18 @@ class DocumentMessageChildChunkChildToolCall(BaseModel): args: Optional[Dict[str, object]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["tool_call"]] = None @@ -9579,6 +16948,18 @@ class DocumentMessageChildChunkChildToolResult(BaseModel): is_error: Optional[bool] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["tool_result"]] = None @@ -9591,6 +16972,18 @@ class DocumentMessageChildChunkChildTraceMessage(BaseModel): message_type: Optional[Literal["message", "thinking"]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + role: Optional[Literal["user", "assistant"]] = None timestamp: Optional[datetime] = None @@ -9619,6 +17012,18 @@ class DocumentMessageChildChunk(BaseModel): children: Optional[List[DocumentMessageChildChunkChild]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + text: Optional[str] = None type: Optional[Literal["chunk"]] = None @@ -9631,6 +17036,18 @@ class DocumentMessageChildCode(BaseModel): language: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["code"]] = None @@ -9641,12 +17058,36 @@ class DocumentMessageChildComment(BaseModel): created_at: Optional[datetime] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["comment"]] = None class DocumentMessageChildDivider(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["divider"]] = None @@ -9663,6 +17104,18 @@ class DocumentMessageChildEquationChildBlob(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["blob"]] = None @@ -9673,6 +17126,18 @@ class DocumentMessageChildEquationChildCode(BaseModel): language: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["code"]] = None @@ -9683,12 +17148,36 @@ class DocumentMessageChildEquationChildComment(BaseModel): created_at: Optional[datetime] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["comment"]] = None class DocumentMessageChildEquationChildDivider(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["divider"]] = None @@ -9699,6 +17188,18 @@ class DocumentMessageChildEquationChildImage(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["image"]] = None @@ -9709,12 +17210,36 @@ class DocumentMessageChildEquationChildLink(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["link"]] = None class DocumentMessageChildEquationChildLineBreak(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["line_break"]] = None @@ -9725,6 +17250,18 @@ class DocumentMessageChildEquationChildText(BaseModel): marks: Optional[List[Literal["bold", "italic", "underline", "strikethrough", "code", "math"]]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["text"]] = None @@ -9739,6 +17276,18 @@ class DocumentMessageChildEquationChildToolCall(BaseModel): args: Optional[Dict[str, object]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["tool_call"]] = None @@ -9755,6 +17304,18 @@ class DocumentMessageChildEquationChildToolResult(BaseModel): is_error: Optional[bool] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["tool_result"]] = None @@ -9767,6 +17328,18 @@ class DocumentMessageChildEquationChildTraceMessage(BaseModel): message_type: Optional[Literal["message", "thinking"]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + role: Optional[Literal["user", "assistant"]] = None timestamp: Optional[datetime] = None @@ -9795,6 +17368,18 @@ class DocumentMessageChildEquation(BaseModel): children: Optional[List[DocumentMessageChildEquationChild]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + text: Optional[str] = None type: Optional[Literal["equation"]] = None @@ -9813,6 +17398,18 @@ class DocumentMessageChildFootnoteChildBlob(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["blob"]] = None @@ -9823,6 +17420,18 @@ class DocumentMessageChildFootnoteChildCode(BaseModel): language: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["code"]] = None @@ -9833,12 +17442,36 @@ class DocumentMessageChildFootnoteChildComment(BaseModel): created_at: Optional[datetime] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["comment"]] = None class DocumentMessageChildFootnoteChildDivider(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["divider"]] = None @@ -9849,6 +17482,18 @@ class DocumentMessageChildFootnoteChildImage(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["image"]] = None @@ -9859,12 +17504,36 @@ class DocumentMessageChildFootnoteChildLink(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["link"]] = None class DocumentMessageChildFootnoteChildLineBreak(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["line_break"]] = None @@ -9875,6 +17544,18 @@ class DocumentMessageChildFootnoteChildText(BaseModel): marks: Optional[List[Literal["bold", "italic", "underline", "strikethrough", "code", "math"]]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["text"]] = None @@ -9889,6 +17570,18 @@ class DocumentMessageChildFootnoteChildToolCall(BaseModel): args: Optional[Dict[str, object]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["tool_call"]] = None @@ -9905,6 +17598,18 @@ class DocumentMessageChildFootnoteChildToolResult(BaseModel): is_error: Optional[bool] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["tool_result"]] = None @@ -9917,6 +17622,18 @@ class DocumentMessageChildFootnoteChildTraceMessage(BaseModel): message_type: Optional[Literal["message", "thinking"]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + role: Optional[Literal["user", "assistant"]] = None timestamp: Optional[datetime] = None @@ -9945,6 +17662,18 @@ class DocumentMessageChildFootnote(BaseModel): children: Optional[List[DocumentMessageChildFootnoteChild]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + text: Optional[str] = None type: Optional[Literal["footnote"]] = None @@ -9963,6 +17692,18 @@ class DocumentMessageChildHeadingChildBlob(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["blob"]] = None @@ -9973,6 +17714,18 @@ class DocumentMessageChildHeadingChildCode(BaseModel): language: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["code"]] = None @@ -9983,12 +17736,36 @@ class DocumentMessageChildHeadingChildComment(BaseModel): created_at: Optional[datetime] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["comment"]] = None class DocumentMessageChildHeadingChildDivider(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["divider"]] = None @@ -9999,6 +17776,18 @@ class DocumentMessageChildHeadingChildImage(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["image"]] = None @@ -10009,12 +17798,36 @@ class DocumentMessageChildHeadingChildLink(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["link"]] = None class DocumentMessageChildHeadingChildLineBreak(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["line_break"]] = None @@ -10025,6 +17838,18 @@ class DocumentMessageChildHeadingChildText(BaseModel): marks: Optional[List[Literal["bold", "italic", "underline", "strikethrough", "code", "math"]]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["text"]] = None @@ -10039,6 +17864,18 @@ class DocumentMessageChildHeadingChildToolCall(BaseModel): args: Optional[Dict[str, object]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["tool_call"]] = None @@ -10055,6 +17892,18 @@ class DocumentMessageChildHeadingChildToolResult(BaseModel): is_error: Optional[bool] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["tool_result"]] = None @@ -10067,6 +17916,18 @@ class DocumentMessageChildHeadingChildTraceMessage(BaseModel): message_type: Optional[Literal["message", "thinking"]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + role: Optional[Literal["user", "assistant"]] = None timestamp: Optional[datetime] = None @@ -10097,6 +17958,18 @@ class DocumentMessageChildHeading(BaseModel): children: Optional[List[DocumentMessageChildHeadingChild]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + text: Optional[str] = None type: Optional[Literal["heading"]] = None @@ -10109,6 +17982,18 @@ class DocumentMessageChildImage(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["image"]] = None @@ -10119,12 +18004,36 @@ class DocumentMessageChildLink(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["link"]] = None class DocumentMessageChildLineBreak(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["line_break"]] = None @@ -10133,6 +18042,18 @@ class DocumentMessageChildList(BaseModel): children: Optional[List[object]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + ordered: Optional[bool] = None text: Optional[str] = None @@ -10153,6 +18074,18 @@ class DocumentMessageChildListItemChildBlob(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["blob"]] = None @@ -10163,6 +18096,18 @@ class DocumentMessageChildListItemChildCode(BaseModel): language: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["code"]] = None @@ -10173,12 +18118,36 @@ class DocumentMessageChildListItemChildComment(BaseModel): created_at: Optional[datetime] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["comment"]] = None class DocumentMessageChildListItemChildDivider(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["divider"]] = None @@ -10189,6 +18158,18 @@ class DocumentMessageChildListItemChildImage(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["image"]] = None @@ -10199,12 +18180,36 @@ class DocumentMessageChildListItemChildLink(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["link"]] = None class DocumentMessageChildListItemChildLineBreak(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["line_break"]] = None @@ -10215,6 +18220,18 @@ class DocumentMessageChildListItemChildText(BaseModel): marks: Optional[List[Literal["bold", "italic", "underline", "strikethrough", "code", "math"]]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["text"]] = None @@ -10229,6 +18246,18 @@ class DocumentMessageChildListItemChildToolCall(BaseModel): args: Optional[Dict[str, object]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["tool_call"]] = None @@ -10245,6 +18274,18 @@ class DocumentMessageChildListItemChildToolResult(BaseModel): is_error: Optional[bool] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["tool_result"]] = None @@ -10257,6 +18298,18 @@ class DocumentMessageChildListItemChildTraceMessage(BaseModel): message_type: Optional[Literal["message", "thinking"]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + role: Optional[Literal["user", "assistant"]] = None timestamp: Optional[datetime] = None @@ -10285,6 +18338,18 @@ class DocumentMessageChildListItem(BaseModel): children: Optional[List[DocumentMessageChildListItemChild]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + text: Optional[str] = None type: Optional[Literal["list_item"]] = None @@ -10303,6 +18368,18 @@ class DocumentMessageChildParagraphChildBlob(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["blob"]] = None @@ -10313,6 +18390,18 @@ class DocumentMessageChildParagraphChildCode(BaseModel): language: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["code"]] = None @@ -10323,12 +18412,36 @@ class DocumentMessageChildParagraphChildComment(BaseModel): created_at: Optional[datetime] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["comment"]] = None class DocumentMessageChildParagraphChildDivider(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["divider"]] = None @@ -10339,6 +18452,18 @@ class DocumentMessageChildParagraphChildImage(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["image"]] = None @@ -10349,12 +18474,36 @@ class DocumentMessageChildParagraphChildLink(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["link"]] = None class DocumentMessageChildParagraphChildLineBreak(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["line_break"]] = None @@ -10365,6 +18514,18 @@ class DocumentMessageChildParagraphChildText(BaseModel): marks: Optional[List[Literal["bold", "italic", "underline", "strikethrough", "code", "math"]]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["text"]] = None @@ -10379,6 +18540,18 @@ class DocumentMessageChildParagraphChildToolCall(BaseModel): args: Optional[Dict[str, object]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["tool_call"]] = None @@ -10395,6 +18568,18 @@ class DocumentMessageChildParagraphChildToolResult(BaseModel): is_error: Optional[bool] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["tool_result"]] = None @@ -10407,6 +18592,18 @@ class DocumentMessageChildParagraphChildTraceMessage(BaseModel): message_type: Optional[Literal["message", "thinking"]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + role: Optional[Literal["user", "assistant"]] = None timestamp: Optional[datetime] = None @@ -10435,6 +18632,18 @@ class DocumentMessageChildParagraph(BaseModel): children: Optional[List[DocumentMessageChildParagraphChild]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + text: Optional[str] = None type: Optional[Literal["paragraph"]] = None @@ -10453,6 +18662,18 @@ class DocumentMessageChildQuoteChildBlob(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["blob"]] = None @@ -10463,6 +18684,18 @@ class DocumentMessageChildQuoteChildCode(BaseModel): language: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["code"]] = None @@ -10473,12 +18706,36 @@ class DocumentMessageChildQuoteChildComment(BaseModel): created_at: Optional[datetime] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["comment"]] = None class DocumentMessageChildQuoteChildDivider(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["divider"]] = None @@ -10489,6 +18746,18 @@ class DocumentMessageChildQuoteChildImage(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["image"]] = None @@ -10499,12 +18768,36 @@ class DocumentMessageChildQuoteChildLink(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["link"]] = None class DocumentMessageChildQuoteChildLineBreak(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["line_break"]] = None @@ -10515,6 +18808,18 @@ class DocumentMessageChildQuoteChildText(BaseModel): marks: Optional[List[Literal["bold", "italic", "underline", "strikethrough", "code", "math"]]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["text"]] = None @@ -10529,6 +18834,18 @@ class DocumentMessageChildQuoteChildToolCall(BaseModel): args: Optional[Dict[str, object]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["tool_call"]] = None @@ -10545,6 +18862,18 @@ class DocumentMessageChildQuoteChildToolResult(BaseModel): is_error: Optional[bool] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["tool_result"]] = None @@ -10557,6 +18886,18 @@ class DocumentMessageChildQuoteChildTraceMessage(BaseModel): message_type: Optional[Literal["message", "thinking"]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + role: Optional[Literal["user", "assistant"]] = None timestamp: Optional[datetime] = None @@ -10585,6 +18926,18 @@ class DocumentMessageChildQuote(BaseModel): children: Optional[List[DocumentMessageChildQuoteChild]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + text: Optional[str] = None type: Optional[Literal["quote"]] = None @@ -10598,6 +18951,18 @@ class DocumentMessageChildTable(BaseModel): has_header: Optional[bool] = None """Whether the first row should be treated as a header""" + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + text: Optional[str] = None type: Optional[Literal["table"]] = None @@ -10616,6 +18981,18 @@ class DocumentMessageChildTableCellChildBlob(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["blob"]] = None @@ -10626,6 +19003,18 @@ class DocumentMessageChildTableCellChildCode(BaseModel): language: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["code"]] = None @@ -10636,12 +19025,36 @@ class DocumentMessageChildTableCellChildComment(BaseModel): created_at: Optional[datetime] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["comment"]] = None class DocumentMessageChildTableCellChildDivider(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["divider"]] = None @@ -10652,6 +19065,18 @@ class DocumentMessageChildTableCellChildImage(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["image"]] = None @@ -10662,12 +19087,36 @@ class DocumentMessageChildTableCellChildLink(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["link"]] = None class DocumentMessageChildTableCellChildLineBreak(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["line_break"]] = None @@ -10678,6 +19127,18 @@ class DocumentMessageChildTableCellChildText(BaseModel): marks: Optional[List[Literal["bold", "italic", "underline", "strikethrough", "code", "math"]]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["text"]] = None @@ -10692,6 +19153,18 @@ class DocumentMessageChildTableCellChildToolCall(BaseModel): args: Optional[Dict[str, object]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["tool_call"]] = None @@ -10708,6 +19181,18 @@ class DocumentMessageChildTableCellChildToolResult(BaseModel): is_error: Optional[bool] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["tool_result"]] = None @@ -10720,6 +19205,18 @@ class DocumentMessageChildTableCellChildTraceMessage(BaseModel): message_type: Optional[Literal["message", "thinking"]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + role: Optional[Literal["user", "assistant"]] = None timestamp: Optional[datetime] = None @@ -10750,6 +19247,18 @@ class DocumentMessageChildTableCell(BaseModel): children: Optional[List[DocumentMessageChildTableCellChild]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + text: Optional[str] = None type: Optional[Literal["table_cell"]] = None @@ -10760,6 +19269,18 @@ class DocumentMessageChildTableRow(BaseModel): children: Optional[List[object]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + text: Optional[str] = None type: Optional[Literal["table_row"]] = None @@ -10772,6 +19293,18 @@ class DocumentMessageChildText(BaseModel): marks: Optional[List[Literal["bold", "italic", "underline", "strikethrough", "code", "math"]]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["text"]] = None @@ -10788,6 +19321,18 @@ class DocumentMessageChildToDoChildBlob(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["blob"]] = None @@ -10798,6 +19343,18 @@ class DocumentMessageChildToDoChildCode(BaseModel): language: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["code"]] = None @@ -10808,12 +19365,36 @@ class DocumentMessageChildToDoChildComment(BaseModel): created_at: Optional[datetime] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["comment"]] = None class DocumentMessageChildToDoChildDivider(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["divider"]] = None @@ -10824,6 +19405,18 @@ class DocumentMessageChildToDoChildImage(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["image"]] = None @@ -10834,12 +19427,36 @@ class DocumentMessageChildToDoChildLink(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["link"]] = None class DocumentMessageChildToDoChildLineBreak(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["line_break"]] = None @@ -10850,6 +19467,18 @@ class DocumentMessageChildToDoChildText(BaseModel): marks: Optional[List[Literal["bold", "italic", "underline", "strikethrough", "code", "math"]]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["text"]] = None @@ -10864,6 +19493,18 @@ class DocumentMessageChildToDoChildToolCall(BaseModel): args: Optional[Dict[str, object]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["tool_call"]] = None @@ -10880,6 +19521,18 @@ class DocumentMessageChildToDoChildToolResult(BaseModel): is_error: Optional[bool] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["tool_result"]] = None @@ -10892,6 +19545,18 @@ class DocumentMessageChildToDoChildTraceMessage(BaseModel): message_type: Optional[Literal["message", "thinking"]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + role: Optional[Literal["user", "assistant"]] = None timestamp: Optional[datetime] = None @@ -10922,6 +19587,18 @@ class DocumentMessageChildToDo(BaseModel): children: Optional[List[DocumentMessageChildToDoChild]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + text: Optional[str] = None type: Optional[Literal["todo"]] = None @@ -10938,6 +19615,18 @@ class DocumentMessageChildToolCall(BaseModel): args: Optional[Dict[str, object]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["tool_call"]] = None @@ -10954,6 +19643,18 @@ class DocumentMessageChildToolResult(BaseModel): is_error: Optional[bool] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["tool_result"]] = None @@ -10966,6 +19667,18 @@ class DocumentMessageChildTraceMessage(BaseModel): message_type: Optional[Literal["message", "thinking"]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + role: Optional[Literal["user", "assistant"]] = None timestamp: Optional[datetime] = None @@ -10987,6 +19700,18 @@ class DocumentMessageChildUtterance(BaseModel): end: Optional[float] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + speaker: Optional[object] = None start: Optional[float] = None @@ -11039,6 +19764,18 @@ class DocumentMessageMentionedUserChildBlob(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["blob"]] = None @@ -11049,6 +19786,18 @@ class DocumentMessageMentionedUserChildCode(BaseModel): language: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["code"]] = None @@ -11059,12 +19808,36 @@ class DocumentMessageMentionedUserChildComment(BaseModel): created_at: Optional[datetime] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["comment"]] = None class DocumentMessageMentionedUserChildDivider(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["divider"]] = None @@ -11075,6 +19848,18 @@ class DocumentMessageMentionedUserChildImage(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["image"]] = None @@ -11085,12 +19870,36 @@ class DocumentMessageMentionedUserChildLink(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["link"]] = None class DocumentMessageMentionedUserChildLineBreak(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["line_break"]] = None @@ -11101,6 +19910,18 @@ class DocumentMessageMentionedUserChildText(BaseModel): marks: Optional[List[Literal["bold", "italic", "underline", "strikethrough", "code", "math"]]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["text"]] = None @@ -11115,6 +19936,18 @@ class DocumentMessageMentionedUserChildToolCall(BaseModel): args: Optional[Dict[str, object]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["tool_call"]] = None @@ -11131,6 +19964,18 @@ class DocumentMessageMentionedUserChildToolResult(BaseModel): is_error: Optional[bool] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["tool_result"]] = None @@ -11143,6 +19988,18 @@ class DocumentMessageMentionedUserChildTraceMessage(BaseModel): message_type: Optional[Literal["message", "thinking"]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + role: Optional[Literal["user", "assistant"]] = None timestamp: Optional[datetime] = None @@ -11194,6 +20051,18 @@ class DocumentMessageMentionedUser(BaseModel): link_urls: Optional[List[str]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + name: Optional[str] = None phone_numbers: Optional[List[str]] = None @@ -11229,6 +20098,18 @@ class DocumentMessage(BaseModel): mentioned_users: Optional[List[DocumentMessageMentionedUser]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + num_replies: Optional[int] = None replies: Optional[List[object]] = None @@ -11262,6 +20143,18 @@ class DocumentEventAttendeeChildBlob(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["blob"]] = None @@ -11272,6 +20165,18 @@ class DocumentEventAttendeeChildCode(BaseModel): language: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["code"]] = None @@ -11282,12 +20187,36 @@ class DocumentEventAttendeeChildComment(BaseModel): created_at: Optional[datetime] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["comment"]] = None class DocumentEventAttendeeChildDivider(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["divider"]] = None @@ -11298,6 +20227,18 @@ class DocumentEventAttendeeChildImage(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["image"]] = None @@ -11308,12 +20249,36 @@ class DocumentEventAttendeeChildLink(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["link"]] = None class DocumentEventAttendeeChildLineBreak(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["line_break"]] = None @@ -11324,6 +20289,18 @@ class DocumentEventAttendeeChildText(BaseModel): marks: Optional[List[Literal["bold", "italic", "underline", "strikethrough", "code", "math"]]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["text"]] = None @@ -11338,6 +20315,18 @@ class DocumentEventAttendeeChildToolCall(BaseModel): args: Optional[Dict[str, object]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["tool_call"]] = None @@ -11354,6 +20343,18 @@ class DocumentEventAttendeeChildToolResult(BaseModel): is_error: Optional[bool] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["tool_result"]] = None @@ -11366,6 +20367,18 @@ class DocumentEventAttendeeChildTraceMessage(BaseModel): message_type: Optional[Literal["message", "thinking"]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + role: Optional[Literal["user", "assistant"]] = None timestamp: Optional[datetime] = None @@ -11417,6 +20430,18 @@ class DocumentEventAttendee(BaseModel): link_urls: Optional[List[str]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + name: Optional[str] = None phone_numbers: Optional[List[str]] = None @@ -11443,6 +20468,18 @@ class DocumentEventChildBlob(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["blob"]] = None @@ -11459,6 +20496,18 @@ class DocumentEventChildCalloutChildBlob(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["blob"]] = None @@ -11469,6 +20518,18 @@ class DocumentEventChildCalloutChildCode(BaseModel): language: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["code"]] = None @@ -11479,12 +20540,36 @@ class DocumentEventChildCalloutChildComment(BaseModel): created_at: Optional[datetime] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["comment"]] = None class DocumentEventChildCalloutChildDivider(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["divider"]] = None @@ -11495,6 +20580,18 @@ class DocumentEventChildCalloutChildImage(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["image"]] = None @@ -11505,12 +20602,36 @@ class DocumentEventChildCalloutChildLink(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["link"]] = None class DocumentEventChildCalloutChildLineBreak(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["line_break"]] = None @@ -11521,6 +20642,18 @@ class DocumentEventChildCalloutChildText(BaseModel): marks: Optional[List[Literal["bold", "italic", "underline", "strikethrough", "code", "math"]]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["text"]] = None @@ -11535,6 +20668,18 @@ class DocumentEventChildCalloutChildToolCall(BaseModel): args: Optional[Dict[str, object]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["tool_call"]] = None @@ -11551,6 +20696,18 @@ class DocumentEventChildCalloutChildToolResult(BaseModel): is_error: Optional[bool] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["tool_result"]] = None @@ -11563,6 +20720,18 @@ class DocumentEventChildCalloutChildTraceMessage(BaseModel): message_type: Optional[Literal["message", "thinking"]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + role: Optional[Literal["user", "assistant"]] = None timestamp: Optional[datetime] = None @@ -11591,6 +20760,18 @@ class DocumentEventChildCallout(BaseModel): children: Optional[List[DocumentEventChildCalloutChild]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + text: Optional[str] = None title: Optional[str] = None @@ -11611,6 +20792,18 @@ class DocumentEventChildChunkChildBlob(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["blob"]] = None @@ -11621,6 +20814,18 @@ class DocumentEventChildChunkChildCode(BaseModel): language: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["code"]] = None @@ -11631,12 +20836,36 @@ class DocumentEventChildChunkChildComment(BaseModel): created_at: Optional[datetime] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["comment"]] = None class DocumentEventChildChunkChildDivider(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["divider"]] = None @@ -11647,6 +20876,18 @@ class DocumentEventChildChunkChildImage(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["image"]] = None @@ -11657,12 +20898,36 @@ class DocumentEventChildChunkChildLink(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["link"]] = None class DocumentEventChildChunkChildLineBreak(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["line_break"]] = None @@ -11673,6 +20938,18 @@ class DocumentEventChildChunkChildText(BaseModel): marks: Optional[List[Literal["bold", "italic", "underline", "strikethrough", "code", "math"]]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["text"]] = None @@ -11687,6 +20964,18 @@ class DocumentEventChildChunkChildToolCall(BaseModel): args: Optional[Dict[str, object]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["tool_call"]] = None @@ -11703,6 +20992,18 @@ class DocumentEventChildChunkChildToolResult(BaseModel): is_error: Optional[bool] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["tool_result"]] = None @@ -11715,6 +21016,18 @@ class DocumentEventChildChunkChildTraceMessage(BaseModel): message_type: Optional[Literal["message", "thinking"]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + role: Optional[Literal["user", "assistant"]] = None timestamp: Optional[datetime] = None @@ -11743,6 +21056,18 @@ class DocumentEventChildChunk(BaseModel): children: Optional[List[DocumentEventChildChunkChild]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + text: Optional[str] = None type: Optional[Literal["chunk"]] = None @@ -11755,6 +21080,18 @@ class DocumentEventChildCode(BaseModel): language: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["code"]] = None @@ -11765,12 +21102,36 @@ class DocumentEventChildComment(BaseModel): created_at: Optional[datetime] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["comment"]] = None class DocumentEventChildDivider(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["divider"]] = None @@ -11787,6 +21148,18 @@ class DocumentEventChildEquationChildBlob(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["blob"]] = None @@ -11797,6 +21170,18 @@ class DocumentEventChildEquationChildCode(BaseModel): language: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["code"]] = None @@ -11807,12 +21192,36 @@ class DocumentEventChildEquationChildComment(BaseModel): created_at: Optional[datetime] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["comment"]] = None class DocumentEventChildEquationChildDivider(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["divider"]] = None @@ -11823,6 +21232,18 @@ class DocumentEventChildEquationChildImage(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["image"]] = None @@ -11833,12 +21254,36 @@ class DocumentEventChildEquationChildLink(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["link"]] = None class DocumentEventChildEquationChildLineBreak(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["line_break"]] = None @@ -11849,6 +21294,18 @@ class DocumentEventChildEquationChildText(BaseModel): marks: Optional[List[Literal["bold", "italic", "underline", "strikethrough", "code", "math"]]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["text"]] = None @@ -11863,6 +21320,18 @@ class DocumentEventChildEquationChildToolCall(BaseModel): args: Optional[Dict[str, object]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["tool_call"]] = None @@ -11879,6 +21348,18 @@ class DocumentEventChildEquationChildToolResult(BaseModel): is_error: Optional[bool] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["tool_result"]] = None @@ -11891,6 +21372,18 @@ class DocumentEventChildEquationChildTraceMessage(BaseModel): message_type: Optional[Literal["message", "thinking"]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + role: Optional[Literal["user", "assistant"]] = None timestamp: Optional[datetime] = None @@ -11919,6 +21412,18 @@ class DocumentEventChildEquation(BaseModel): children: Optional[List[DocumentEventChildEquationChild]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + text: Optional[str] = None type: Optional[Literal["equation"]] = None @@ -11937,6 +21442,18 @@ class DocumentEventChildFootnoteChildBlob(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["blob"]] = None @@ -11947,6 +21464,18 @@ class DocumentEventChildFootnoteChildCode(BaseModel): language: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["code"]] = None @@ -11957,12 +21486,36 @@ class DocumentEventChildFootnoteChildComment(BaseModel): created_at: Optional[datetime] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["comment"]] = None class DocumentEventChildFootnoteChildDivider(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["divider"]] = None @@ -11973,6 +21526,18 @@ class DocumentEventChildFootnoteChildImage(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["image"]] = None @@ -11983,12 +21548,36 @@ class DocumentEventChildFootnoteChildLink(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["link"]] = None class DocumentEventChildFootnoteChildLineBreak(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["line_break"]] = None @@ -11999,6 +21588,18 @@ class DocumentEventChildFootnoteChildText(BaseModel): marks: Optional[List[Literal["bold", "italic", "underline", "strikethrough", "code", "math"]]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["text"]] = None @@ -12013,6 +21614,18 @@ class DocumentEventChildFootnoteChildToolCall(BaseModel): args: Optional[Dict[str, object]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["tool_call"]] = None @@ -12029,6 +21642,18 @@ class DocumentEventChildFootnoteChildToolResult(BaseModel): is_error: Optional[bool] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["tool_result"]] = None @@ -12041,6 +21666,18 @@ class DocumentEventChildFootnoteChildTraceMessage(BaseModel): message_type: Optional[Literal["message", "thinking"]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + role: Optional[Literal["user", "assistant"]] = None timestamp: Optional[datetime] = None @@ -12069,6 +21706,18 @@ class DocumentEventChildFootnote(BaseModel): children: Optional[List[DocumentEventChildFootnoteChild]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + text: Optional[str] = None type: Optional[Literal["footnote"]] = None @@ -12087,6 +21736,18 @@ class DocumentEventChildHeadingChildBlob(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["blob"]] = None @@ -12097,6 +21758,18 @@ class DocumentEventChildHeadingChildCode(BaseModel): language: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["code"]] = None @@ -12107,12 +21780,36 @@ class DocumentEventChildHeadingChildComment(BaseModel): created_at: Optional[datetime] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["comment"]] = None class DocumentEventChildHeadingChildDivider(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["divider"]] = None @@ -12123,6 +21820,18 @@ class DocumentEventChildHeadingChildImage(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["image"]] = None @@ -12133,12 +21842,36 @@ class DocumentEventChildHeadingChildLink(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["link"]] = None class DocumentEventChildHeadingChildLineBreak(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["line_break"]] = None @@ -12149,6 +21882,18 @@ class DocumentEventChildHeadingChildText(BaseModel): marks: Optional[List[Literal["bold", "italic", "underline", "strikethrough", "code", "math"]]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["text"]] = None @@ -12163,6 +21908,18 @@ class DocumentEventChildHeadingChildToolCall(BaseModel): args: Optional[Dict[str, object]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["tool_call"]] = None @@ -12179,6 +21936,18 @@ class DocumentEventChildHeadingChildToolResult(BaseModel): is_error: Optional[bool] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["tool_result"]] = None @@ -12191,6 +21960,18 @@ class DocumentEventChildHeadingChildTraceMessage(BaseModel): message_type: Optional[Literal["message", "thinking"]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + role: Optional[Literal["user", "assistant"]] = None timestamp: Optional[datetime] = None @@ -12221,6 +22002,18 @@ class DocumentEventChildHeading(BaseModel): children: Optional[List[DocumentEventChildHeadingChild]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + text: Optional[str] = None type: Optional[Literal["heading"]] = None @@ -12233,6 +22026,18 @@ class DocumentEventChildImage(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["image"]] = None @@ -12243,12 +22048,36 @@ class DocumentEventChildLink(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["link"]] = None class DocumentEventChildLineBreak(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["line_break"]] = None @@ -12257,6 +22086,18 @@ class DocumentEventChildList(BaseModel): children: Optional[List[object]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + ordered: Optional[bool] = None text: Optional[str] = None @@ -12277,6 +22118,18 @@ class DocumentEventChildListItemChildBlob(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["blob"]] = None @@ -12287,6 +22140,18 @@ class DocumentEventChildListItemChildCode(BaseModel): language: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["code"]] = None @@ -12297,12 +22162,36 @@ class DocumentEventChildListItemChildComment(BaseModel): created_at: Optional[datetime] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["comment"]] = None class DocumentEventChildListItemChildDivider(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["divider"]] = None @@ -12313,6 +22202,18 @@ class DocumentEventChildListItemChildImage(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["image"]] = None @@ -12323,12 +22224,36 @@ class DocumentEventChildListItemChildLink(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["link"]] = None class DocumentEventChildListItemChildLineBreak(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["line_break"]] = None @@ -12339,6 +22264,18 @@ class DocumentEventChildListItemChildText(BaseModel): marks: Optional[List[Literal["bold", "italic", "underline", "strikethrough", "code", "math"]]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["text"]] = None @@ -12353,6 +22290,18 @@ class DocumentEventChildListItemChildToolCall(BaseModel): args: Optional[Dict[str, object]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["tool_call"]] = None @@ -12369,6 +22318,18 @@ class DocumentEventChildListItemChildToolResult(BaseModel): is_error: Optional[bool] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["tool_result"]] = None @@ -12381,6 +22342,18 @@ class DocumentEventChildListItemChildTraceMessage(BaseModel): message_type: Optional[Literal["message", "thinking"]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + role: Optional[Literal["user", "assistant"]] = None timestamp: Optional[datetime] = None @@ -12409,6 +22382,18 @@ class DocumentEventChildListItem(BaseModel): children: Optional[List[DocumentEventChildListItemChild]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + text: Optional[str] = None type: Optional[Literal["list_item"]] = None @@ -12427,6 +22412,18 @@ class DocumentEventChildParagraphChildBlob(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["blob"]] = None @@ -12437,6 +22434,18 @@ class DocumentEventChildParagraphChildCode(BaseModel): language: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["code"]] = None @@ -12447,12 +22456,36 @@ class DocumentEventChildParagraphChildComment(BaseModel): created_at: Optional[datetime] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["comment"]] = None class DocumentEventChildParagraphChildDivider(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["divider"]] = None @@ -12463,6 +22496,18 @@ class DocumentEventChildParagraphChildImage(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["image"]] = None @@ -12473,12 +22518,36 @@ class DocumentEventChildParagraphChildLink(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["link"]] = None class DocumentEventChildParagraphChildLineBreak(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["line_break"]] = None @@ -12489,6 +22558,18 @@ class DocumentEventChildParagraphChildText(BaseModel): marks: Optional[List[Literal["bold", "italic", "underline", "strikethrough", "code", "math"]]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["text"]] = None @@ -12503,6 +22584,18 @@ class DocumentEventChildParagraphChildToolCall(BaseModel): args: Optional[Dict[str, object]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["tool_call"]] = None @@ -12519,6 +22612,18 @@ class DocumentEventChildParagraphChildToolResult(BaseModel): is_error: Optional[bool] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["tool_result"]] = None @@ -12531,6 +22636,18 @@ class DocumentEventChildParagraphChildTraceMessage(BaseModel): message_type: Optional[Literal["message", "thinking"]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + role: Optional[Literal["user", "assistant"]] = None timestamp: Optional[datetime] = None @@ -12559,6 +22676,18 @@ class DocumentEventChildParagraph(BaseModel): children: Optional[List[DocumentEventChildParagraphChild]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + text: Optional[str] = None type: Optional[Literal["paragraph"]] = None @@ -12577,6 +22706,18 @@ class DocumentEventChildQuoteChildBlob(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["blob"]] = None @@ -12587,6 +22728,18 @@ class DocumentEventChildQuoteChildCode(BaseModel): language: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["code"]] = None @@ -12597,12 +22750,36 @@ class DocumentEventChildQuoteChildComment(BaseModel): created_at: Optional[datetime] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["comment"]] = None class DocumentEventChildQuoteChildDivider(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["divider"]] = None @@ -12613,6 +22790,18 @@ class DocumentEventChildQuoteChildImage(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["image"]] = None @@ -12623,12 +22812,36 @@ class DocumentEventChildQuoteChildLink(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["link"]] = None class DocumentEventChildQuoteChildLineBreak(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["line_break"]] = None @@ -12639,6 +22852,18 @@ class DocumentEventChildQuoteChildText(BaseModel): marks: Optional[List[Literal["bold", "italic", "underline", "strikethrough", "code", "math"]]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["text"]] = None @@ -12653,6 +22878,18 @@ class DocumentEventChildQuoteChildToolCall(BaseModel): args: Optional[Dict[str, object]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["tool_call"]] = None @@ -12669,6 +22906,18 @@ class DocumentEventChildQuoteChildToolResult(BaseModel): is_error: Optional[bool] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["tool_result"]] = None @@ -12681,6 +22930,18 @@ class DocumentEventChildQuoteChildTraceMessage(BaseModel): message_type: Optional[Literal["message", "thinking"]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + role: Optional[Literal["user", "assistant"]] = None timestamp: Optional[datetime] = None @@ -12709,6 +22970,18 @@ class DocumentEventChildQuote(BaseModel): children: Optional[List[DocumentEventChildQuoteChild]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + text: Optional[str] = None type: Optional[Literal["quote"]] = None @@ -12722,6 +22995,18 @@ class DocumentEventChildTable(BaseModel): has_header: Optional[bool] = None """Whether the first row should be treated as a header""" + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + text: Optional[str] = None type: Optional[Literal["table"]] = None @@ -12740,6 +23025,18 @@ class DocumentEventChildTableCellChildBlob(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["blob"]] = None @@ -12750,6 +23047,18 @@ class DocumentEventChildTableCellChildCode(BaseModel): language: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["code"]] = None @@ -12760,12 +23069,36 @@ class DocumentEventChildTableCellChildComment(BaseModel): created_at: Optional[datetime] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["comment"]] = None class DocumentEventChildTableCellChildDivider(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["divider"]] = None @@ -12776,6 +23109,18 @@ class DocumentEventChildTableCellChildImage(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["image"]] = None @@ -12786,12 +23131,36 @@ class DocumentEventChildTableCellChildLink(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["link"]] = None class DocumentEventChildTableCellChildLineBreak(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["line_break"]] = None @@ -12802,6 +23171,18 @@ class DocumentEventChildTableCellChildText(BaseModel): marks: Optional[List[Literal["bold", "italic", "underline", "strikethrough", "code", "math"]]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["text"]] = None @@ -12816,6 +23197,18 @@ class DocumentEventChildTableCellChildToolCall(BaseModel): args: Optional[Dict[str, object]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["tool_call"]] = None @@ -12832,6 +23225,18 @@ class DocumentEventChildTableCellChildToolResult(BaseModel): is_error: Optional[bool] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["tool_result"]] = None @@ -12844,6 +23249,18 @@ class DocumentEventChildTableCellChildTraceMessage(BaseModel): message_type: Optional[Literal["message", "thinking"]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + role: Optional[Literal["user", "assistant"]] = None timestamp: Optional[datetime] = None @@ -12874,6 +23291,18 @@ class DocumentEventChildTableCell(BaseModel): children: Optional[List[DocumentEventChildTableCellChild]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + text: Optional[str] = None type: Optional[Literal["table_cell"]] = None @@ -12884,6 +23313,18 @@ class DocumentEventChildTableRow(BaseModel): children: Optional[List[object]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + text: Optional[str] = None type: Optional[Literal["table_row"]] = None @@ -12896,6 +23337,18 @@ class DocumentEventChildText(BaseModel): marks: Optional[List[Literal["bold", "italic", "underline", "strikethrough", "code", "math"]]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["text"]] = None @@ -12912,6 +23365,18 @@ class DocumentEventChildToDoChildBlob(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["blob"]] = None @@ -12922,6 +23387,18 @@ class DocumentEventChildToDoChildCode(BaseModel): language: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["code"]] = None @@ -12932,12 +23409,36 @@ class DocumentEventChildToDoChildComment(BaseModel): created_at: Optional[datetime] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["comment"]] = None class DocumentEventChildToDoChildDivider(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["divider"]] = None @@ -12948,6 +23449,18 @@ class DocumentEventChildToDoChildImage(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["image"]] = None @@ -12958,12 +23471,36 @@ class DocumentEventChildToDoChildLink(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["link"]] = None class DocumentEventChildToDoChildLineBreak(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["line_break"]] = None @@ -12974,6 +23511,18 @@ class DocumentEventChildToDoChildText(BaseModel): marks: Optional[List[Literal["bold", "italic", "underline", "strikethrough", "code", "math"]]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["text"]] = None @@ -12988,6 +23537,18 @@ class DocumentEventChildToDoChildToolCall(BaseModel): args: Optional[Dict[str, object]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["tool_call"]] = None @@ -13004,6 +23565,18 @@ class DocumentEventChildToDoChildToolResult(BaseModel): is_error: Optional[bool] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["tool_result"]] = None @@ -13016,6 +23589,18 @@ class DocumentEventChildToDoChildTraceMessage(BaseModel): message_type: Optional[Literal["message", "thinking"]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + role: Optional[Literal["user", "assistant"]] = None timestamp: Optional[datetime] = None @@ -13046,6 +23631,18 @@ class DocumentEventChildToDo(BaseModel): children: Optional[List[DocumentEventChildToDoChild]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + text: Optional[str] = None type: Optional[Literal["todo"]] = None @@ -13062,6 +23659,18 @@ class DocumentEventChildToolCall(BaseModel): args: Optional[Dict[str, object]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["tool_call"]] = None @@ -13078,6 +23687,18 @@ class DocumentEventChildToolResult(BaseModel): is_error: Optional[bool] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["tool_result"]] = None @@ -13090,6 +23711,18 @@ class DocumentEventChildTraceMessage(BaseModel): message_type: Optional[Literal["message", "thinking"]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + role: Optional[Literal["user", "assistant"]] = None timestamp: Optional[datetime] = None @@ -13111,6 +23744,18 @@ class DocumentEventChildUtterance(BaseModel): end: Optional[float] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + speaker: Optional[object] = None start: Optional[float] = None @@ -13163,6 +23808,18 @@ class DocumentEvent(BaseModel): meeting_url: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + start_at: Optional[datetime] = None text: Optional[str] = None @@ -13185,6 +23842,18 @@ class DocumentFileChildBlob(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["blob"]] = None @@ -13201,6 +23870,18 @@ class DocumentFileChildCalloutChildBlob(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["blob"]] = None @@ -13211,6 +23892,18 @@ class DocumentFileChildCalloutChildCode(BaseModel): language: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["code"]] = None @@ -13221,12 +23914,36 @@ class DocumentFileChildCalloutChildComment(BaseModel): created_at: Optional[datetime] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["comment"]] = None class DocumentFileChildCalloutChildDivider(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["divider"]] = None @@ -13237,6 +23954,18 @@ class DocumentFileChildCalloutChildImage(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["image"]] = None @@ -13247,12 +23976,36 @@ class DocumentFileChildCalloutChildLink(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["link"]] = None class DocumentFileChildCalloutChildLineBreak(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["line_break"]] = None @@ -13263,6 +24016,18 @@ class DocumentFileChildCalloutChildText(BaseModel): marks: Optional[List[Literal["bold", "italic", "underline", "strikethrough", "code", "math"]]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["text"]] = None @@ -13277,6 +24042,18 @@ class DocumentFileChildCalloutChildToolCall(BaseModel): args: Optional[Dict[str, object]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["tool_call"]] = None @@ -13293,6 +24070,18 @@ class DocumentFileChildCalloutChildToolResult(BaseModel): is_error: Optional[bool] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["tool_result"]] = None @@ -13305,6 +24094,18 @@ class DocumentFileChildCalloutChildTraceMessage(BaseModel): message_type: Optional[Literal["message", "thinking"]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + role: Optional[Literal["user", "assistant"]] = None timestamp: Optional[datetime] = None @@ -13333,6 +24134,18 @@ class DocumentFileChildCallout(BaseModel): children: Optional[List[DocumentFileChildCalloutChild]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + text: Optional[str] = None title: Optional[str] = None @@ -13353,6 +24166,18 @@ class DocumentFileChildChunkChildBlob(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["blob"]] = None @@ -13363,6 +24188,18 @@ class DocumentFileChildChunkChildCode(BaseModel): language: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["code"]] = None @@ -13373,12 +24210,36 @@ class DocumentFileChildChunkChildComment(BaseModel): created_at: Optional[datetime] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["comment"]] = None class DocumentFileChildChunkChildDivider(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["divider"]] = None @@ -13389,6 +24250,18 @@ class DocumentFileChildChunkChildImage(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["image"]] = None @@ -13399,12 +24272,36 @@ class DocumentFileChildChunkChildLink(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["link"]] = None class DocumentFileChildChunkChildLineBreak(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["line_break"]] = None @@ -13415,6 +24312,18 @@ class DocumentFileChildChunkChildText(BaseModel): marks: Optional[List[Literal["bold", "italic", "underline", "strikethrough", "code", "math"]]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["text"]] = None @@ -13429,6 +24338,18 @@ class DocumentFileChildChunkChildToolCall(BaseModel): args: Optional[Dict[str, object]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["tool_call"]] = None @@ -13445,6 +24366,18 @@ class DocumentFileChildChunkChildToolResult(BaseModel): is_error: Optional[bool] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["tool_result"]] = None @@ -13457,6 +24390,18 @@ class DocumentFileChildChunkChildTraceMessage(BaseModel): message_type: Optional[Literal["message", "thinking"]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + role: Optional[Literal["user", "assistant"]] = None timestamp: Optional[datetime] = None @@ -13485,6 +24430,18 @@ class DocumentFileChildChunk(BaseModel): children: Optional[List[DocumentFileChildChunkChild]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + text: Optional[str] = None type: Optional[Literal["chunk"]] = None @@ -13497,6 +24454,18 @@ class DocumentFileChildCode(BaseModel): language: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["code"]] = None @@ -13507,12 +24476,36 @@ class DocumentFileChildComment(BaseModel): created_at: Optional[datetime] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["comment"]] = None class DocumentFileChildDivider(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["divider"]] = None @@ -13529,6 +24522,18 @@ class DocumentFileChildEquationChildBlob(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["blob"]] = None @@ -13539,6 +24544,18 @@ class DocumentFileChildEquationChildCode(BaseModel): language: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["code"]] = None @@ -13549,12 +24566,36 @@ class DocumentFileChildEquationChildComment(BaseModel): created_at: Optional[datetime] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["comment"]] = None class DocumentFileChildEquationChildDivider(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["divider"]] = None @@ -13565,6 +24606,18 @@ class DocumentFileChildEquationChildImage(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["image"]] = None @@ -13575,12 +24628,36 @@ class DocumentFileChildEquationChildLink(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["link"]] = None class DocumentFileChildEquationChildLineBreak(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["line_break"]] = None @@ -13591,6 +24668,18 @@ class DocumentFileChildEquationChildText(BaseModel): marks: Optional[List[Literal["bold", "italic", "underline", "strikethrough", "code", "math"]]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["text"]] = None @@ -13605,6 +24694,18 @@ class DocumentFileChildEquationChildToolCall(BaseModel): args: Optional[Dict[str, object]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["tool_call"]] = None @@ -13621,6 +24722,18 @@ class DocumentFileChildEquationChildToolResult(BaseModel): is_error: Optional[bool] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["tool_result"]] = None @@ -13633,6 +24746,18 @@ class DocumentFileChildEquationChildTraceMessage(BaseModel): message_type: Optional[Literal["message", "thinking"]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + role: Optional[Literal["user", "assistant"]] = None timestamp: Optional[datetime] = None @@ -13661,6 +24786,18 @@ class DocumentFileChildEquation(BaseModel): children: Optional[List[DocumentFileChildEquationChild]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + text: Optional[str] = None type: Optional[Literal["equation"]] = None @@ -13679,6 +24816,18 @@ class DocumentFileChildFootnoteChildBlob(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["blob"]] = None @@ -13689,6 +24838,18 @@ class DocumentFileChildFootnoteChildCode(BaseModel): language: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["code"]] = None @@ -13699,12 +24860,36 @@ class DocumentFileChildFootnoteChildComment(BaseModel): created_at: Optional[datetime] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["comment"]] = None class DocumentFileChildFootnoteChildDivider(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["divider"]] = None @@ -13715,6 +24900,18 @@ class DocumentFileChildFootnoteChildImage(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["image"]] = None @@ -13725,12 +24922,36 @@ class DocumentFileChildFootnoteChildLink(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["link"]] = None class DocumentFileChildFootnoteChildLineBreak(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["line_break"]] = None @@ -13741,6 +24962,18 @@ class DocumentFileChildFootnoteChildText(BaseModel): marks: Optional[List[Literal["bold", "italic", "underline", "strikethrough", "code", "math"]]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["text"]] = None @@ -13755,6 +24988,18 @@ class DocumentFileChildFootnoteChildToolCall(BaseModel): args: Optional[Dict[str, object]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["tool_call"]] = None @@ -13771,6 +25016,18 @@ class DocumentFileChildFootnoteChildToolResult(BaseModel): is_error: Optional[bool] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["tool_result"]] = None @@ -13783,6 +25040,18 @@ class DocumentFileChildFootnoteChildTraceMessage(BaseModel): message_type: Optional[Literal["message", "thinking"]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + role: Optional[Literal["user", "assistant"]] = None timestamp: Optional[datetime] = None @@ -13811,6 +25080,18 @@ class DocumentFileChildFootnote(BaseModel): children: Optional[List[DocumentFileChildFootnoteChild]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + text: Optional[str] = None type: Optional[Literal["footnote"]] = None @@ -13829,6 +25110,18 @@ class DocumentFileChildHeadingChildBlob(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["blob"]] = None @@ -13839,6 +25132,18 @@ class DocumentFileChildHeadingChildCode(BaseModel): language: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["code"]] = None @@ -13849,12 +25154,36 @@ class DocumentFileChildHeadingChildComment(BaseModel): created_at: Optional[datetime] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["comment"]] = None class DocumentFileChildHeadingChildDivider(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["divider"]] = None @@ -13865,6 +25194,18 @@ class DocumentFileChildHeadingChildImage(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["image"]] = None @@ -13875,12 +25216,36 @@ class DocumentFileChildHeadingChildLink(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["link"]] = None class DocumentFileChildHeadingChildLineBreak(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["line_break"]] = None @@ -13891,6 +25256,18 @@ class DocumentFileChildHeadingChildText(BaseModel): marks: Optional[List[Literal["bold", "italic", "underline", "strikethrough", "code", "math"]]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["text"]] = None @@ -13905,6 +25282,18 @@ class DocumentFileChildHeadingChildToolCall(BaseModel): args: Optional[Dict[str, object]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["tool_call"]] = None @@ -13921,6 +25310,18 @@ class DocumentFileChildHeadingChildToolResult(BaseModel): is_error: Optional[bool] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["tool_result"]] = None @@ -13933,6 +25334,18 @@ class DocumentFileChildHeadingChildTraceMessage(BaseModel): message_type: Optional[Literal["message", "thinking"]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + role: Optional[Literal["user", "assistant"]] = None timestamp: Optional[datetime] = None @@ -13963,6 +25376,18 @@ class DocumentFileChildHeading(BaseModel): children: Optional[List[DocumentFileChildHeadingChild]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + text: Optional[str] = None type: Optional[Literal["heading"]] = None @@ -13975,6 +25400,18 @@ class DocumentFileChildImage(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["image"]] = None @@ -13985,12 +25422,36 @@ class DocumentFileChildLink(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["link"]] = None class DocumentFileChildLineBreak(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["line_break"]] = None @@ -13999,6 +25460,18 @@ class DocumentFileChildList(BaseModel): children: Optional[List[object]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + ordered: Optional[bool] = None text: Optional[str] = None @@ -14019,6 +25492,18 @@ class DocumentFileChildListItemChildBlob(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["blob"]] = None @@ -14029,6 +25514,18 @@ class DocumentFileChildListItemChildCode(BaseModel): language: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["code"]] = None @@ -14039,12 +25536,36 @@ class DocumentFileChildListItemChildComment(BaseModel): created_at: Optional[datetime] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["comment"]] = None class DocumentFileChildListItemChildDivider(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["divider"]] = None @@ -14055,6 +25576,18 @@ class DocumentFileChildListItemChildImage(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["image"]] = None @@ -14065,12 +25598,36 @@ class DocumentFileChildListItemChildLink(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["link"]] = None class DocumentFileChildListItemChildLineBreak(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["line_break"]] = None @@ -14081,6 +25638,18 @@ class DocumentFileChildListItemChildText(BaseModel): marks: Optional[List[Literal["bold", "italic", "underline", "strikethrough", "code", "math"]]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["text"]] = None @@ -14095,6 +25664,18 @@ class DocumentFileChildListItemChildToolCall(BaseModel): args: Optional[Dict[str, object]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["tool_call"]] = None @@ -14111,6 +25692,18 @@ class DocumentFileChildListItemChildToolResult(BaseModel): is_error: Optional[bool] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["tool_result"]] = None @@ -14123,6 +25716,18 @@ class DocumentFileChildListItemChildTraceMessage(BaseModel): message_type: Optional[Literal["message", "thinking"]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + role: Optional[Literal["user", "assistant"]] = None timestamp: Optional[datetime] = None @@ -14151,6 +25756,18 @@ class DocumentFileChildListItem(BaseModel): children: Optional[List[DocumentFileChildListItemChild]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + text: Optional[str] = None type: Optional[Literal["list_item"]] = None @@ -14169,6 +25786,18 @@ class DocumentFileChildParagraphChildBlob(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["blob"]] = None @@ -14179,6 +25808,18 @@ class DocumentFileChildParagraphChildCode(BaseModel): language: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["code"]] = None @@ -14189,12 +25830,36 @@ class DocumentFileChildParagraphChildComment(BaseModel): created_at: Optional[datetime] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["comment"]] = None class DocumentFileChildParagraphChildDivider(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["divider"]] = None @@ -14205,6 +25870,18 @@ class DocumentFileChildParagraphChildImage(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["image"]] = None @@ -14215,12 +25892,36 @@ class DocumentFileChildParagraphChildLink(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["link"]] = None class DocumentFileChildParagraphChildLineBreak(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["line_break"]] = None @@ -14231,6 +25932,18 @@ class DocumentFileChildParagraphChildText(BaseModel): marks: Optional[List[Literal["bold", "italic", "underline", "strikethrough", "code", "math"]]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["text"]] = None @@ -14245,6 +25958,18 @@ class DocumentFileChildParagraphChildToolCall(BaseModel): args: Optional[Dict[str, object]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["tool_call"]] = None @@ -14261,6 +25986,18 @@ class DocumentFileChildParagraphChildToolResult(BaseModel): is_error: Optional[bool] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["tool_result"]] = None @@ -14273,6 +26010,18 @@ class DocumentFileChildParagraphChildTraceMessage(BaseModel): message_type: Optional[Literal["message", "thinking"]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + role: Optional[Literal["user", "assistant"]] = None timestamp: Optional[datetime] = None @@ -14301,6 +26050,18 @@ class DocumentFileChildParagraph(BaseModel): children: Optional[List[DocumentFileChildParagraphChild]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + text: Optional[str] = None type: Optional[Literal["paragraph"]] = None @@ -14319,6 +26080,18 @@ class DocumentFileChildQuoteChildBlob(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["blob"]] = None @@ -14329,6 +26102,18 @@ class DocumentFileChildQuoteChildCode(BaseModel): language: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["code"]] = None @@ -14339,12 +26124,36 @@ class DocumentFileChildQuoteChildComment(BaseModel): created_at: Optional[datetime] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["comment"]] = None class DocumentFileChildQuoteChildDivider(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["divider"]] = None @@ -14355,6 +26164,18 @@ class DocumentFileChildQuoteChildImage(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["image"]] = None @@ -14365,12 +26186,36 @@ class DocumentFileChildQuoteChildLink(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["link"]] = None class DocumentFileChildQuoteChildLineBreak(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["line_break"]] = None @@ -14381,6 +26226,18 @@ class DocumentFileChildQuoteChildText(BaseModel): marks: Optional[List[Literal["bold", "italic", "underline", "strikethrough", "code", "math"]]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["text"]] = None @@ -14395,6 +26252,18 @@ class DocumentFileChildQuoteChildToolCall(BaseModel): args: Optional[Dict[str, object]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["tool_call"]] = None @@ -14411,6 +26280,18 @@ class DocumentFileChildQuoteChildToolResult(BaseModel): is_error: Optional[bool] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["tool_result"]] = None @@ -14423,6 +26304,18 @@ class DocumentFileChildQuoteChildTraceMessage(BaseModel): message_type: Optional[Literal["message", "thinking"]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + role: Optional[Literal["user", "assistant"]] = None timestamp: Optional[datetime] = None @@ -14451,6 +26344,18 @@ class DocumentFileChildQuote(BaseModel): children: Optional[List[DocumentFileChildQuoteChild]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + text: Optional[str] = None type: Optional[Literal["quote"]] = None @@ -14464,6 +26369,18 @@ class DocumentFileChildTable(BaseModel): has_header: Optional[bool] = None """Whether the first row should be treated as a header""" + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + text: Optional[str] = None type: Optional[Literal["table"]] = None @@ -14482,6 +26399,18 @@ class DocumentFileChildTableCellChildBlob(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["blob"]] = None @@ -14492,6 +26421,18 @@ class DocumentFileChildTableCellChildCode(BaseModel): language: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["code"]] = None @@ -14502,12 +26443,36 @@ class DocumentFileChildTableCellChildComment(BaseModel): created_at: Optional[datetime] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["comment"]] = None class DocumentFileChildTableCellChildDivider(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["divider"]] = None @@ -14518,6 +26483,18 @@ class DocumentFileChildTableCellChildImage(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["image"]] = None @@ -14528,12 +26505,36 @@ class DocumentFileChildTableCellChildLink(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["link"]] = None class DocumentFileChildTableCellChildLineBreak(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["line_break"]] = None @@ -14544,6 +26545,18 @@ class DocumentFileChildTableCellChildText(BaseModel): marks: Optional[List[Literal["bold", "italic", "underline", "strikethrough", "code", "math"]]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["text"]] = None @@ -14558,6 +26571,18 @@ class DocumentFileChildTableCellChildToolCall(BaseModel): args: Optional[Dict[str, object]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["tool_call"]] = None @@ -14574,6 +26599,18 @@ class DocumentFileChildTableCellChildToolResult(BaseModel): is_error: Optional[bool] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["tool_result"]] = None @@ -14586,6 +26623,18 @@ class DocumentFileChildTableCellChildTraceMessage(BaseModel): message_type: Optional[Literal["message", "thinking"]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + role: Optional[Literal["user", "assistant"]] = None timestamp: Optional[datetime] = None @@ -14616,6 +26665,18 @@ class DocumentFileChildTableCell(BaseModel): children: Optional[List[DocumentFileChildTableCellChild]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + text: Optional[str] = None type: Optional[Literal["table_cell"]] = None @@ -14626,6 +26687,18 @@ class DocumentFileChildTableRow(BaseModel): children: Optional[List[object]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + text: Optional[str] = None type: Optional[Literal["table_row"]] = None @@ -14638,6 +26711,18 @@ class DocumentFileChildText(BaseModel): marks: Optional[List[Literal["bold", "italic", "underline", "strikethrough", "code", "math"]]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["text"]] = None @@ -14654,6 +26739,18 @@ class DocumentFileChildToDoChildBlob(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["blob"]] = None @@ -14664,6 +26761,18 @@ class DocumentFileChildToDoChildCode(BaseModel): language: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["code"]] = None @@ -14674,12 +26783,36 @@ class DocumentFileChildToDoChildComment(BaseModel): created_at: Optional[datetime] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["comment"]] = None class DocumentFileChildToDoChildDivider(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["divider"]] = None @@ -14690,6 +26823,18 @@ class DocumentFileChildToDoChildImage(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["image"]] = None @@ -14700,12 +26845,36 @@ class DocumentFileChildToDoChildLink(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["link"]] = None class DocumentFileChildToDoChildLineBreak(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["line_break"]] = None @@ -14716,6 +26885,18 @@ class DocumentFileChildToDoChildText(BaseModel): marks: Optional[List[Literal["bold", "italic", "underline", "strikethrough", "code", "math"]]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["text"]] = None @@ -14730,6 +26911,18 @@ class DocumentFileChildToDoChildToolCall(BaseModel): args: Optional[Dict[str, object]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["tool_call"]] = None @@ -14746,6 +26939,18 @@ class DocumentFileChildToDoChildToolResult(BaseModel): is_error: Optional[bool] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["tool_result"]] = None @@ -14758,6 +26963,18 @@ class DocumentFileChildToDoChildTraceMessage(BaseModel): message_type: Optional[Literal["message", "thinking"]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + role: Optional[Literal["user", "assistant"]] = None timestamp: Optional[datetime] = None @@ -14788,6 +27005,18 @@ class DocumentFileChildToDo(BaseModel): children: Optional[List[DocumentFileChildToDoChild]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + text: Optional[str] = None type: Optional[Literal["todo"]] = None @@ -14804,6 +27033,18 @@ class DocumentFileChildToolCall(BaseModel): args: Optional[Dict[str, object]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["tool_call"]] = None @@ -14820,6 +27061,18 @@ class DocumentFileChildToolResult(BaseModel): is_error: Optional[bool] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["tool_result"]] = None @@ -14832,6 +27085,18 @@ class DocumentFileChildTraceMessage(BaseModel): message_type: Optional[Literal["message", "thinking"]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + role: Optional[Literal["user", "assistant"]] = None timestamp: Optional[datetime] = None @@ -14853,6 +27118,18 @@ class DocumentFileChildUtterance(BaseModel): end: Optional[float] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + speaker: Optional[object] = None start: Optional[float] = None @@ -14901,6 +27178,18 @@ class DocumentFile(BaseModel): children: Optional[List[DocumentFileChild]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + path: Optional[List[str]] = None text: Optional[str] = None @@ -14923,6 +27212,18 @@ class DocumentConversationChildSenderChildBlob(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["blob"]] = None @@ -14933,6 +27234,18 @@ class DocumentConversationChildSenderChildCode(BaseModel): language: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["code"]] = None @@ -14943,12 +27256,36 @@ class DocumentConversationChildSenderChildComment(BaseModel): created_at: Optional[datetime] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["comment"]] = None class DocumentConversationChildSenderChildDivider(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["divider"]] = None @@ -14959,6 +27296,18 @@ class DocumentConversationChildSenderChildImage(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["image"]] = None @@ -14969,12 +27318,36 @@ class DocumentConversationChildSenderChildLink(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["link"]] = None class DocumentConversationChildSenderChildLineBreak(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["line_break"]] = None @@ -14985,6 +27358,18 @@ class DocumentConversationChildSenderChildText(BaseModel): marks: Optional[List[Literal["bold", "italic", "underline", "strikethrough", "code", "math"]]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["text"]] = None @@ -14999,6 +27384,18 @@ class DocumentConversationChildSenderChildToolCall(BaseModel): args: Optional[Dict[str, object]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["tool_call"]] = None @@ -15015,6 +27412,18 @@ class DocumentConversationChildSenderChildToolResult(BaseModel): is_error: Optional[bool] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["tool_result"]] = None @@ -15027,6 +27436,18 @@ class DocumentConversationChildSenderChildTraceMessage(BaseModel): message_type: Optional[Literal["message", "thinking"]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + role: Optional[Literal["user", "assistant"]] = None timestamp: Optional[datetime] = None @@ -15078,6 +27499,18 @@ class DocumentConversationChildSender(BaseModel): link_urls: Optional[List[str]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + name: Optional[str] = None phone_numbers: Optional[List[str]] = None @@ -15104,6 +27537,18 @@ class DocumentConversationChildChildBlob(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["blob"]] = None @@ -15120,6 +27565,18 @@ class DocumentConversationChildChildCalloutChildBlob(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["blob"]] = None @@ -15130,6 +27587,18 @@ class DocumentConversationChildChildCalloutChildCode(BaseModel): language: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["code"]] = None @@ -15140,12 +27609,36 @@ class DocumentConversationChildChildCalloutChildComment(BaseModel): created_at: Optional[datetime] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["comment"]] = None class DocumentConversationChildChildCalloutChildDivider(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["divider"]] = None @@ -15156,6 +27649,18 @@ class DocumentConversationChildChildCalloutChildImage(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["image"]] = None @@ -15166,12 +27671,36 @@ class DocumentConversationChildChildCalloutChildLink(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["link"]] = None class DocumentConversationChildChildCalloutChildLineBreak(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["line_break"]] = None @@ -15182,6 +27711,18 @@ class DocumentConversationChildChildCalloutChildText(BaseModel): marks: Optional[List[Literal["bold", "italic", "underline", "strikethrough", "code", "math"]]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["text"]] = None @@ -15196,6 +27737,18 @@ class DocumentConversationChildChildCalloutChildToolCall(BaseModel): args: Optional[Dict[str, object]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["tool_call"]] = None @@ -15212,6 +27765,18 @@ class DocumentConversationChildChildCalloutChildToolResult(BaseModel): is_error: Optional[bool] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["tool_result"]] = None @@ -15224,6 +27789,18 @@ class DocumentConversationChildChildCalloutChildTraceMessage(BaseModel): message_type: Optional[Literal["message", "thinking"]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + role: Optional[Literal["user", "assistant"]] = None timestamp: Optional[datetime] = None @@ -15252,6 +27829,18 @@ class DocumentConversationChildChildCallout(BaseModel): children: Optional[List[DocumentConversationChildChildCalloutChild]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + text: Optional[str] = None title: Optional[str] = None @@ -15272,6 +27861,18 @@ class DocumentConversationChildChildChunkChildBlob(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["blob"]] = None @@ -15282,6 +27883,18 @@ class DocumentConversationChildChildChunkChildCode(BaseModel): language: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["code"]] = None @@ -15292,12 +27905,36 @@ class DocumentConversationChildChildChunkChildComment(BaseModel): created_at: Optional[datetime] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["comment"]] = None class DocumentConversationChildChildChunkChildDivider(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["divider"]] = None @@ -15308,6 +27945,18 @@ class DocumentConversationChildChildChunkChildImage(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["image"]] = None @@ -15318,12 +27967,36 @@ class DocumentConversationChildChildChunkChildLink(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["link"]] = None class DocumentConversationChildChildChunkChildLineBreak(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["line_break"]] = None @@ -15334,6 +28007,18 @@ class DocumentConversationChildChildChunkChildText(BaseModel): marks: Optional[List[Literal["bold", "italic", "underline", "strikethrough", "code", "math"]]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["text"]] = None @@ -15348,6 +28033,18 @@ class DocumentConversationChildChildChunkChildToolCall(BaseModel): args: Optional[Dict[str, object]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["tool_call"]] = None @@ -15364,6 +28061,18 @@ class DocumentConversationChildChildChunkChildToolResult(BaseModel): is_error: Optional[bool] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["tool_result"]] = None @@ -15376,6 +28085,18 @@ class DocumentConversationChildChildChunkChildTraceMessage(BaseModel): message_type: Optional[Literal["message", "thinking"]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + role: Optional[Literal["user", "assistant"]] = None timestamp: Optional[datetime] = None @@ -15404,6 +28125,18 @@ class DocumentConversationChildChildChunk(BaseModel): children: Optional[List[DocumentConversationChildChildChunkChild]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + text: Optional[str] = None type: Optional[Literal["chunk"]] = None @@ -15416,6 +28149,18 @@ class DocumentConversationChildChildCode(BaseModel): language: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["code"]] = None @@ -15426,12 +28171,36 @@ class DocumentConversationChildChildComment(BaseModel): created_at: Optional[datetime] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["comment"]] = None class DocumentConversationChildChildDivider(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["divider"]] = None @@ -15448,6 +28217,18 @@ class DocumentConversationChildChildEquationChildBlob(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["blob"]] = None @@ -15458,6 +28239,18 @@ class DocumentConversationChildChildEquationChildCode(BaseModel): language: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["code"]] = None @@ -15468,12 +28261,36 @@ class DocumentConversationChildChildEquationChildComment(BaseModel): created_at: Optional[datetime] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["comment"]] = None class DocumentConversationChildChildEquationChildDivider(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["divider"]] = None @@ -15484,6 +28301,18 @@ class DocumentConversationChildChildEquationChildImage(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["image"]] = None @@ -15494,12 +28323,36 @@ class DocumentConversationChildChildEquationChildLink(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["link"]] = None class DocumentConversationChildChildEquationChildLineBreak(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["line_break"]] = None @@ -15510,6 +28363,18 @@ class DocumentConversationChildChildEquationChildText(BaseModel): marks: Optional[List[Literal["bold", "italic", "underline", "strikethrough", "code", "math"]]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["text"]] = None @@ -15524,6 +28389,18 @@ class DocumentConversationChildChildEquationChildToolCall(BaseModel): args: Optional[Dict[str, object]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["tool_call"]] = None @@ -15540,6 +28417,18 @@ class DocumentConversationChildChildEquationChildToolResult(BaseModel): is_error: Optional[bool] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["tool_result"]] = None @@ -15552,6 +28441,18 @@ class DocumentConversationChildChildEquationChildTraceMessage(BaseModel): message_type: Optional[Literal["message", "thinking"]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + role: Optional[Literal["user", "assistant"]] = None timestamp: Optional[datetime] = None @@ -15580,6 +28481,18 @@ class DocumentConversationChildChildEquation(BaseModel): children: Optional[List[DocumentConversationChildChildEquationChild]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + text: Optional[str] = None type: Optional[Literal["equation"]] = None @@ -15598,6 +28511,18 @@ class DocumentConversationChildChildFootnoteChildBlob(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["blob"]] = None @@ -15608,6 +28533,18 @@ class DocumentConversationChildChildFootnoteChildCode(BaseModel): language: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["code"]] = None @@ -15618,12 +28555,36 @@ class DocumentConversationChildChildFootnoteChildComment(BaseModel): created_at: Optional[datetime] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["comment"]] = None class DocumentConversationChildChildFootnoteChildDivider(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["divider"]] = None @@ -15634,6 +28595,18 @@ class DocumentConversationChildChildFootnoteChildImage(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["image"]] = None @@ -15644,12 +28617,36 @@ class DocumentConversationChildChildFootnoteChildLink(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["link"]] = None class DocumentConversationChildChildFootnoteChildLineBreak(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["line_break"]] = None @@ -15660,6 +28657,18 @@ class DocumentConversationChildChildFootnoteChildText(BaseModel): marks: Optional[List[Literal["bold", "italic", "underline", "strikethrough", "code", "math"]]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["text"]] = None @@ -15674,6 +28683,18 @@ class DocumentConversationChildChildFootnoteChildToolCall(BaseModel): args: Optional[Dict[str, object]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["tool_call"]] = None @@ -15690,6 +28711,18 @@ class DocumentConversationChildChildFootnoteChildToolResult(BaseModel): is_error: Optional[bool] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["tool_result"]] = None @@ -15702,6 +28735,18 @@ class DocumentConversationChildChildFootnoteChildTraceMessage(BaseModel): message_type: Optional[Literal["message", "thinking"]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + role: Optional[Literal["user", "assistant"]] = None timestamp: Optional[datetime] = None @@ -15730,6 +28775,18 @@ class DocumentConversationChildChildFootnote(BaseModel): children: Optional[List[DocumentConversationChildChildFootnoteChild]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + text: Optional[str] = None type: Optional[Literal["footnote"]] = None @@ -15748,6 +28805,18 @@ class DocumentConversationChildChildHeadingChildBlob(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["blob"]] = None @@ -15758,6 +28827,18 @@ class DocumentConversationChildChildHeadingChildCode(BaseModel): language: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["code"]] = None @@ -15768,12 +28849,36 @@ class DocumentConversationChildChildHeadingChildComment(BaseModel): created_at: Optional[datetime] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["comment"]] = None class DocumentConversationChildChildHeadingChildDivider(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["divider"]] = None @@ -15784,6 +28889,18 @@ class DocumentConversationChildChildHeadingChildImage(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["image"]] = None @@ -15794,12 +28911,36 @@ class DocumentConversationChildChildHeadingChildLink(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["link"]] = None class DocumentConversationChildChildHeadingChildLineBreak(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["line_break"]] = None @@ -15810,6 +28951,18 @@ class DocumentConversationChildChildHeadingChildText(BaseModel): marks: Optional[List[Literal["bold", "italic", "underline", "strikethrough", "code", "math"]]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["text"]] = None @@ -15824,6 +28977,18 @@ class DocumentConversationChildChildHeadingChildToolCall(BaseModel): args: Optional[Dict[str, object]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["tool_call"]] = None @@ -15840,6 +29005,18 @@ class DocumentConversationChildChildHeadingChildToolResult(BaseModel): is_error: Optional[bool] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["tool_result"]] = None @@ -15852,6 +29029,18 @@ class DocumentConversationChildChildHeadingChildTraceMessage(BaseModel): message_type: Optional[Literal["message", "thinking"]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + role: Optional[Literal["user", "assistant"]] = None timestamp: Optional[datetime] = None @@ -15882,6 +29071,18 @@ class DocumentConversationChildChildHeading(BaseModel): children: Optional[List[DocumentConversationChildChildHeadingChild]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + text: Optional[str] = None type: Optional[Literal["heading"]] = None @@ -15894,6 +29095,18 @@ class DocumentConversationChildChildImage(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["image"]] = None @@ -15904,12 +29117,36 @@ class DocumentConversationChildChildLink(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["link"]] = None class DocumentConversationChildChildLineBreak(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["line_break"]] = None @@ -15918,6 +29155,18 @@ class DocumentConversationChildChildList(BaseModel): children: Optional[List[object]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + ordered: Optional[bool] = None text: Optional[str] = None @@ -15938,6 +29187,18 @@ class DocumentConversationChildChildListItemChildBlob(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["blob"]] = None @@ -15948,6 +29209,18 @@ class DocumentConversationChildChildListItemChildCode(BaseModel): language: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["code"]] = None @@ -15958,12 +29231,36 @@ class DocumentConversationChildChildListItemChildComment(BaseModel): created_at: Optional[datetime] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["comment"]] = None class DocumentConversationChildChildListItemChildDivider(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["divider"]] = None @@ -15974,6 +29271,18 @@ class DocumentConversationChildChildListItemChildImage(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["image"]] = None @@ -15984,12 +29293,36 @@ class DocumentConversationChildChildListItemChildLink(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["link"]] = None class DocumentConversationChildChildListItemChildLineBreak(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["line_break"]] = None @@ -16000,6 +29333,18 @@ class DocumentConversationChildChildListItemChildText(BaseModel): marks: Optional[List[Literal["bold", "italic", "underline", "strikethrough", "code", "math"]]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["text"]] = None @@ -16014,6 +29359,18 @@ class DocumentConversationChildChildListItemChildToolCall(BaseModel): args: Optional[Dict[str, object]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["tool_call"]] = None @@ -16030,6 +29387,18 @@ class DocumentConversationChildChildListItemChildToolResult(BaseModel): is_error: Optional[bool] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["tool_result"]] = None @@ -16042,6 +29411,18 @@ class DocumentConversationChildChildListItemChildTraceMessage(BaseModel): message_type: Optional[Literal["message", "thinking"]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + role: Optional[Literal["user", "assistant"]] = None timestamp: Optional[datetime] = None @@ -16070,6 +29451,18 @@ class DocumentConversationChildChildListItem(BaseModel): children: Optional[List[DocumentConversationChildChildListItemChild]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + text: Optional[str] = None type: Optional[Literal["list_item"]] = None @@ -16088,6 +29481,18 @@ class DocumentConversationChildChildParagraphChildBlob(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["blob"]] = None @@ -16098,6 +29503,18 @@ class DocumentConversationChildChildParagraphChildCode(BaseModel): language: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["code"]] = None @@ -16108,12 +29525,36 @@ class DocumentConversationChildChildParagraphChildComment(BaseModel): created_at: Optional[datetime] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["comment"]] = None class DocumentConversationChildChildParagraphChildDivider(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["divider"]] = None @@ -16124,6 +29565,18 @@ class DocumentConversationChildChildParagraphChildImage(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["image"]] = None @@ -16134,12 +29587,36 @@ class DocumentConversationChildChildParagraphChildLink(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["link"]] = None class DocumentConversationChildChildParagraphChildLineBreak(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["line_break"]] = None @@ -16150,6 +29627,18 @@ class DocumentConversationChildChildParagraphChildText(BaseModel): marks: Optional[List[Literal["bold", "italic", "underline", "strikethrough", "code", "math"]]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["text"]] = None @@ -16164,6 +29653,18 @@ class DocumentConversationChildChildParagraphChildToolCall(BaseModel): args: Optional[Dict[str, object]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["tool_call"]] = None @@ -16180,6 +29681,18 @@ class DocumentConversationChildChildParagraphChildToolResult(BaseModel): is_error: Optional[bool] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["tool_result"]] = None @@ -16192,6 +29705,18 @@ class DocumentConversationChildChildParagraphChildTraceMessage(BaseModel): message_type: Optional[Literal["message", "thinking"]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + role: Optional[Literal["user", "assistant"]] = None timestamp: Optional[datetime] = None @@ -16220,6 +29745,18 @@ class DocumentConversationChildChildParagraph(BaseModel): children: Optional[List[DocumentConversationChildChildParagraphChild]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + text: Optional[str] = None type: Optional[Literal["paragraph"]] = None @@ -16238,6 +29775,18 @@ class DocumentConversationChildChildQuoteChildBlob(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["blob"]] = None @@ -16248,6 +29797,18 @@ class DocumentConversationChildChildQuoteChildCode(BaseModel): language: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["code"]] = None @@ -16258,12 +29819,36 @@ class DocumentConversationChildChildQuoteChildComment(BaseModel): created_at: Optional[datetime] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["comment"]] = None class DocumentConversationChildChildQuoteChildDivider(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["divider"]] = None @@ -16274,6 +29859,18 @@ class DocumentConversationChildChildQuoteChildImage(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["image"]] = None @@ -16284,12 +29881,36 @@ class DocumentConversationChildChildQuoteChildLink(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["link"]] = None class DocumentConversationChildChildQuoteChildLineBreak(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["line_break"]] = None @@ -16300,6 +29921,18 @@ class DocumentConversationChildChildQuoteChildText(BaseModel): marks: Optional[List[Literal["bold", "italic", "underline", "strikethrough", "code", "math"]]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["text"]] = None @@ -16314,6 +29947,18 @@ class DocumentConversationChildChildQuoteChildToolCall(BaseModel): args: Optional[Dict[str, object]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["tool_call"]] = None @@ -16330,6 +29975,18 @@ class DocumentConversationChildChildQuoteChildToolResult(BaseModel): is_error: Optional[bool] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["tool_result"]] = None @@ -16342,6 +29999,18 @@ class DocumentConversationChildChildQuoteChildTraceMessage(BaseModel): message_type: Optional[Literal["message", "thinking"]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + role: Optional[Literal["user", "assistant"]] = None timestamp: Optional[datetime] = None @@ -16370,6 +30039,18 @@ class DocumentConversationChildChildQuote(BaseModel): children: Optional[List[DocumentConversationChildChildQuoteChild]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + text: Optional[str] = None type: Optional[Literal["quote"]] = None @@ -16383,6 +30064,18 @@ class DocumentConversationChildChildTable(BaseModel): has_header: Optional[bool] = None """Whether the first row should be treated as a header""" + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + text: Optional[str] = None type: Optional[Literal["table"]] = None @@ -16401,6 +30094,18 @@ class DocumentConversationChildChildTableCellChildBlob(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["blob"]] = None @@ -16411,6 +30116,18 @@ class DocumentConversationChildChildTableCellChildCode(BaseModel): language: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["code"]] = None @@ -16421,12 +30138,36 @@ class DocumentConversationChildChildTableCellChildComment(BaseModel): created_at: Optional[datetime] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["comment"]] = None class DocumentConversationChildChildTableCellChildDivider(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["divider"]] = None @@ -16437,6 +30178,18 @@ class DocumentConversationChildChildTableCellChildImage(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["image"]] = None @@ -16447,12 +30200,36 @@ class DocumentConversationChildChildTableCellChildLink(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["link"]] = None class DocumentConversationChildChildTableCellChildLineBreak(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["line_break"]] = None @@ -16463,6 +30240,18 @@ class DocumentConversationChildChildTableCellChildText(BaseModel): marks: Optional[List[Literal["bold", "italic", "underline", "strikethrough", "code", "math"]]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["text"]] = None @@ -16477,6 +30266,18 @@ class DocumentConversationChildChildTableCellChildToolCall(BaseModel): args: Optional[Dict[str, object]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["tool_call"]] = None @@ -16493,6 +30294,18 @@ class DocumentConversationChildChildTableCellChildToolResult(BaseModel): is_error: Optional[bool] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["tool_result"]] = None @@ -16505,6 +30318,18 @@ class DocumentConversationChildChildTableCellChildTraceMessage(BaseModel): message_type: Optional[Literal["message", "thinking"]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + role: Optional[Literal["user", "assistant"]] = None timestamp: Optional[datetime] = None @@ -16535,6 +30360,18 @@ class DocumentConversationChildChildTableCell(BaseModel): children: Optional[List[DocumentConversationChildChildTableCellChild]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + text: Optional[str] = None type: Optional[Literal["table_cell"]] = None @@ -16545,6 +30382,18 @@ class DocumentConversationChildChildTableRow(BaseModel): children: Optional[List[object]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + text: Optional[str] = None type: Optional[Literal["table_row"]] = None @@ -16557,6 +30406,18 @@ class DocumentConversationChildChildText(BaseModel): marks: Optional[List[Literal["bold", "italic", "underline", "strikethrough", "code", "math"]]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["text"]] = None @@ -16573,6 +30434,18 @@ class DocumentConversationChildChildToDoChildBlob(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["blob"]] = None @@ -16583,6 +30456,18 @@ class DocumentConversationChildChildToDoChildCode(BaseModel): language: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["code"]] = None @@ -16593,12 +30478,36 @@ class DocumentConversationChildChildToDoChildComment(BaseModel): created_at: Optional[datetime] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["comment"]] = None class DocumentConversationChildChildToDoChildDivider(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["divider"]] = None @@ -16609,6 +30518,18 @@ class DocumentConversationChildChildToDoChildImage(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["image"]] = None @@ -16619,12 +30540,36 @@ class DocumentConversationChildChildToDoChildLink(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["link"]] = None class DocumentConversationChildChildToDoChildLineBreak(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["line_break"]] = None @@ -16635,6 +30580,18 @@ class DocumentConversationChildChildToDoChildText(BaseModel): marks: Optional[List[Literal["bold", "italic", "underline", "strikethrough", "code", "math"]]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["text"]] = None @@ -16649,6 +30606,18 @@ class DocumentConversationChildChildToDoChildToolCall(BaseModel): args: Optional[Dict[str, object]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["tool_call"]] = None @@ -16665,6 +30634,18 @@ class DocumentConversationChildChildToDoChildToolResult(BaseModel): is_error: Optional[bool] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["tool_result"]] = None @@ -16677,6 +30658,18 @@ class DocumentConversationChildChildToDoChildTraceMessage(BaseModel): message_type: Optional[Literal["message", "thinking"]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + role: Optional[Literal["user", "assistant"]] = None timestamp: Optional[datetime] = None @@ -16707,6 +30700,18 @@ class DocumentConversationChildChildToDo(BaseModel): children: Optional[List[DocumentConversationChildChildToDoChild]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + text: Optional[str] = None type: Optional[Literal["todo"]] = None @@ -16723,6 +30728,18 @@ class DocumentConversationChildChildToolCall(BaseModel): args: Optional[Dict[str, object]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["tool_call"]] = None @@ -16739,6 +30756,18 @@ class DocumentConversationChildChildToolResult(BaseModel): is_error: Optional[bool] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["tool_result"]] = None @@ -16751,6 +30780,18 @@ class DocumentConversationChildChildTraceMessage(BaseModel): message_type: Optional[Literal["message", "thinking"]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + role: Optional[Literal["user", "assistant"]] = None timestamp: Optional[datetime] = None @@ -16772,6 +30813,18 @@ class DocumentConversationChildChildUtterance(BaseModel): end: Optional[float] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + speaker: Optional[object] = None start: Optional[float] = None @@ -16824,6 +30877,18 @@ class DocumentConversationChildMentionedUserChildBlob(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["blob"]] = None @@ -16834,6 +30899,18 @@ class DocumentConversationChildMentionedUserChildCode(BaseModel): language: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["code"]] = None @@ -16844,12 +30921,36 @@ class DocumentConversationChildMentionedUserChildComment(BaseModel): created_at: Optional[datetime] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["comment"]] = None class DocumentConversationChildMentionedUserChildDivider(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["divider"]] = None @@ -16860,6 +30961,18 @@ class DocumentConversationChildMentionedUserChildImage(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["image"]] = None @@ -16870,12 +30983,36 @@ class DocumentConversationChildMentionedUserChildLink(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["link"]] = None class DocumentConversationChildMentionedUserChildLineBreak(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["line_break"]] = None @@ -16886,6 +31023,18 @@ class DocumentConversationChildMentionedUserChildText(BaseModel): marks: Optional[List[Literal["bold", "italic", "underline", "strikethrough", "code", "math"]]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["text"]] = None @@ -16900,6 +31049,18 @@ class DocumentConversationChildMentionedUserChildToolCall(BaseModel): args: Optional[Dict[str, object]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["tool_call"]] = None @@ -16916,6 +31077,18 @@ class DocumentConversationChildMentionedUserChildToolResult(BaseModel): is_error: Optional[bool] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["tool_result"]] = None @@ -16928,6 +31101,18 @@ class DocumentConversationChildMentionedUserChildTraceMessage(BaseModel): message_type: Optional[Literal["message", "thinking"]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + role: Optional[Literal["user", "assistant"]] = None timestamp: Optional[datetime] = None @@ -16979,6 +31164,18 @@ class DocumentConversationChildMentionedUser(BaseModel): link_urls: Optional[List[str]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + name: Optional[str] = None phone_numbers: Optional[List[str]] = None @@ -17014,6 +31211,18 @@ class DocumentConversationChild(BaseModel): mentioned_users: Optional[List[DocumentConversationChildMentionedUser]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + num_replies: Optional[int] = None replies: Optional[List[object]] = None @@ -17041,6 +31250,18 @@ class DocumentConversation(BaseModel): children: Optional[List[DocumentConversationChild]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + text: Optional[str] = None type: Optional[Literal["conversation"]] = None @@ -17055,6 +31276,18 @@ class DocumentTraceChildTraceMessage(BaseModel): message_type: Optional[Literal["message", "thinking"]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + role: Optional[Literal["user", "assistant"]] = None timestamp: Optional[datetime] = None @@ -17073,6 +31306,18 @@ class DocumentTraceChildToolCall(BaseModel): args: Optional[Dict[str, object]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["tool_call"]] = None @@ -17089,6 +31334,18 @@ class DocumentTraceChildToolResult(BaseModel): is_error: Optional[bool] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["tool_result"]] = None @@ -17109,6 +31366,18 @@ class DocumentTrace(BaseModel): children: Optional[List[DocumentTraceChild]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + text: Optional[str] = None title: Optional[str] = None @@ -17130,6 +31399,18 @@ class DocumentTranscriptChild(BaseModel): end: Optional[float] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + speaker: Optional[object] = None start: Optional[float] = None @@ -17150,6 +31431,18 @@ class DocumentTranscriptParticipantChildBlob(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["blob"]] = None @@ -17160,6 +31453,18 @@ class DocumentTranscriptParticipantChildCode(BaseModel): language: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["code"]] = None @@ -17170,12 +31475,36 @@ class DocumentTranscriptParticipantChildComment(BaseModel): created_at: Optional[datetime] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["comment"]] = None class DocumentTranscriptParticipantChildDivider(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["divider"]] = None @@ -17186,6 +31515,18 @@ class DocumentTranscriptParticipantChildImage(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["image"]] = None @@ -17196,12 +31537,36 @@ class DocumentTranscriptParticipantChildLink(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["link"]] = None class DocumentTranscriptParticipantChildLineBreak(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["line_break"]] = None @@ -17212,6 +31577,18 @@ class DocumentTranscriptParticipantChildText(BaseModel): marks: Optional[List[Literal["bold", "italic", "underline", "strikethrough", "code", "math"]]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["text"]] = None @@ -17226,6 +31603,18 @@ class DocumentTranscriptParticipantChildToolCall(BaseModel): args: Optional[Dict[str, object]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["tool_call"]] = None @@ -17242,6 +31631,18 @@ class DocumentTranscriptParticipantChildToolResult(BaseModel): is_error: Optional[bool] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["tool_result"]] = None @@ -17254,6 +31655,18 @@ class DocumentTranscriptParticipantChildTraceMessage(BaseModel): message_type: Optional[Literal["message", "thinking"]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + role: Optional[Literal["user", "assistant"]] = None timestamp: Optional[datetime] = None @@ -17305,6 +31718,18 @@ class DocumentTranscriptParticipant(BaseModel): link_urls: Optional[List[str]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + name: Optional[str] = None phone_numbers: Optional[List[str]] = None @@ -17333,6 +31758,18 @@ class DocumentTranscript(BaseModel): ended_at: Optional[datetime] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + participants: Optional[List[DocumentTranscriptParticipant]] = None started_at: Optional[datetime] = None @@ -17357,6 +31794,18 @@ class DocumentCompanyChildBlob(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["blob"]] = None @@ -17373,6 +31822,18 @@ class DocumentCompanyChildCalloutChildBlob(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["blob"]] = None @@ -17383,6 +31844,18 @@ class DocumentCompanyChildCalloutChildCode(BaseModel): language: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["code"]] = None @@ -17393,12 +31866,36 @@ class DocumentCompanyChildCalloutChildComment(BaseModel): created_at: Optional[datetime] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["comment"]] = None class DocumentCompanyChildCalloutChildDivider(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["divider"]] = None @@ -17409,6 +31906,18 @@ class DocumentCompanyChildCalloutChildImage(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["image"]] = None @@ -17419,12 +31928,36 @@ class DocumentCompanyChildCalloutChildLink(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["link"]] = None class DocumentCompanyChildCalloutChildLineBreak(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["line_break"]] = None @@ -17435,6 +31968,18 @@ class DocumentCompanyChildCalloutChildText(BaseModel): marks: Optional[List[Literal["bold", "italic", "underline", "strikethrough", "code", "math"]]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["text"]] = None @@ -17449,6 +31994,18 @@ class DocumentCompanyChildCalloutChildToolCall(BaseModel): args: Optional[Dict[str, object]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["tool_call"]] = None @@ -17465,6 +32022,18 @@ class DocumentCompanyChildCalloutChildToolResult(BaseModel): is_error: Optional[bool] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["tool_result"]] = None @@ -17477,6 +32046,18 @@ class DocumentCompanyChildCalloutChildTraceMessage(BaseModel): message_type: Optional[Literal["message", "thinking"]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + role: Optional[Literal["user", "assistant"]] = None timestamp: Optional[datetime] = None @@ -17505,6 +32086,18 @@ class DocumentCompanyChildCallout(BaseModel): children: Optional[List[DocumentCompanyChildCalloutChild]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + text: Optional[str] = None title: Optional[str] = None @@ -17525,6 +32118,18 @@ class DocumentCompanyChildChunkChildBlob(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["blob"]] = None @@ -17535,6 +32140,18 @@ class DocumentCompanyChildChunkChildCode(BaseModel): language: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["code"]] = None @@ -17545,12 +32162,36 @@ class DocumentCompanyChildChunkChildComment(BaseModel): created_at: Optional[datetime] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["comment"]] = None class DocumentCompanyChildChunkChildDivider(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["divider"]] = None @@ -17561,6 +32202,18 @@ class DocumentCompanyChildChunkChildImage(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["image"]] = None @@ -17571,12 +32224,36 @@ class DocumentCompanyChildChunkChildLink(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["link"]] = None class DocumentCompanyChildChunkChildLineBreak(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["line_break"]] = None @@ -17587,6 +32264,18 @@ class DocumentCompanyChildChunkChildText(BaseModel): marks: Optional[List[Literal["bold", "italic", "underline", "strikethrough", "code", "math"]]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["text"]] = None @@ -17601,6 +32290,18 @@ class DocumentCompanyChildChunkChildToolCall(BaseModel): args: Optional[Dict[str, object]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["tool_call"]] = None @@ -17617,6 +32318,18 @@ class DocumentCompanyChildChunkChildToolResult(BaseModel): is_error: Optional[bool] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["tool_result"]] = None @@ -17629,6 +32342,18 @@ class DocumentCompanyChildChunkChildTraceMessage(BaseModel): message_type: Optional[Literal["message", "thinking"]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + role: Optional[Literal["user", "assistant"]] = None timestamp: Optional[datetime] = None @@ -17657,6 +32382,18 @@ class DocumentCompanyChildChunk(BaseModel): children: Optional[List[DocumentCompanyChildChunkChild]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + text: Optional[str] = None type: Optional[Literal["chunk"]] = None @@ -17669,6 +32406,18 @@ class DocumentCompanyChildCode(BaseModel): language: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["code"]] = None @@ -17679,12 +32428,36 @@ class DocumentCompanyChildComment(BaseModel): created_at: Optional[datetime] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["comment"]] = None class DocumentCompanyChildDivider(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["divider"]] = None @@ -17701,6 +32474,18 @@ class DocumentCompanyChildEquationChildBlob(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["blob"]] = None @@ -17711,6 +32496,18 @@ class DocumentCompanyChildEquationChildCode(BaseModel): language: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["code"]] = None @@ -17721,12 +32518,36 @@ class DocumentCompanyChildEquationChildComment(BaseModel): created_at: Optional[datetime] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["comment"]] = None class DocumentCompanyChildEquationChildDivider(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["divider"]] = None @@ -17737,6 +32558,18 @@ class DocumentCompanyChildEquationChildImage(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["image"]] = None @@ -17747,12 +32580,36 @@ class DocumentCompanyChildEquationChildLink(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["link"]] = None class DocumentCompanyChildEquationChildLineBreak(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["line_break"]] = None @@ -17763,6 +32620,18 @@ class DocumentCompanyChildEquationChildText(BaseModel): marks: Optional[List[Literal["bold", "italic", "underline", "strikethrough", "code", "math"]]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["text"]] = None @@ -17777,6 +32646,18 @@ class DocumentCompanyChildEquationChildToolCall(BaseModel): args: Optional[Dict[str, object]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["tool_call"]] = None @@ -17793,6 +32674,18 @@ class DocumentCompanyChildEquationChildToolResult(BaseModel): is_error: Optional[bool] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["tool_result"]] = None @@ -17805,6 +32698,18 @@ class DocumentCompanyChildEquationChildTraceMessage(BaseModel): message_type: Optional[Literal["message", "thinking"]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + role: Optional[Literal["user", "assistant"]] = None timestamp: Optional[datetime] = None @@ -17833,6 +32738,18 @@ class DocumentCompanyChildEquation(BaseModel): children: Optional[List[DocumentCompanyChildEquationChild]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + text: Optional[str] = None type: Optional[Literal["equation"]] = None @@ -17851,6 +32768,18 @@ class DocumentCompanyChildFootnoteChildBlob(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["blob"]] = None @@ -17861,6 +32790,18 @@ class DocumentCompanyChildFootnoteChildCode(BaseModel): language: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["code"]] = None @@ -17871,12 +32812,36 @@ class DocumentCompanyChildFootnoteChildComment(BaseModel): created_at: Optional[datetime] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["comment"]] = None class DocumentCompanyChildFootnoteChildDivider(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["divider"]] = None @@ -17887,6 +32852,18 @@ class DocumentCompanyChildFootnoteChildImage(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["image"]] = None @@ -17897,12 +32874,36 @@ class DocumentCompanyChildFootnoteChildLink(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["link"]] = None class DocumentCompanyChildFootnoteChildLineBreak(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["line_break"]] = None @@ -17913,6 +32914,18 @@ class DocumentCompanyChildFootnoteChildText(BaseModel): marks: Optional[List[Literal["bold", "italic", "underline", "strikethrough", "code", "math"]]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["text"]] = None @@ -17927,6 +32940,18 @@ class DocumentCompanyChildFootnoteChildToolCall(BaseModel): args: Optional[Dict[str, object]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["tool_call"]] = None @@ -17943,6 +32968,18 @@ class DocumentCompanyChildFootnoteChildToolResult(BaseModel): is_error: Optional[bool] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["tool_result"]] = None @@ -17955,6 +32992,18 @@ class DocumentCompanyChildFootnoteChildTraceMessage(BaseModel): message_type: Optional[Literal["message", "thinking"]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + role: Optional[Literal["user", "assistant"]] = None timestamp: Optional[datetime] = None @@ -17983,6 +33032,18 @@ class DocumentCompanyChildFootnote(BaseModel): children: Optional[List[DocumentCompanyChildFootnoteChild]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + text: Optional[str] = None type: Optional[Literal["footnote"]] = None @@ -18001,6 +33062,18 @@ class DocumentCompanyChildHeadingChildBlob(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["blob"]] = None @@ -18011,6 +33084,18 @@ class DocumentCompanyChildHeadingChildCode(BaseModel): language: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["code"]] = None @@ -18021,12 +33106,36 @@ class DocumentCompanyChildHeadingChildComment(BaseModel): created_at: Optional[datetime] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["comment"]] = None class DocumentCompanyChildHeadingChildDivider(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["divider"]] = None @@ -18037,6 +33146,18 @@ class DocumentCompanyChildHeadingChildImage(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["image"]] = None @@ -18047,12 +33168,36 @@ class DocumentCompanyChildHeadingChildLink(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["link"]] = None class DocumentCompanyChildHeadingChildLineBreak(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["line_break"]] = None @@ -18063,6 +33208,18 @@ class DocumentCompanyChildHeadingChildText(BaseModel): marks: Optional[List[Literal["bold", "italic", "underline", "strikethrough", "code", "math"]]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["text"]] = None @@ -18077,6 +33234,18 @@ class DocumentCompanyChildHeadingChildToolCall(BaseModel): args: Optional[Dict[str, object]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["tool_call"]] = None @@ -18093,6 +33262,18 @@ class DocumentCompanyChildHeadingChildToolResult(BaseModel): is_error: Optional[bool] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["tool_result"]] = None @@ -18105,6 +33286,18 @@ class DocumentCompanyChildHeadingChildTraceMessage(BaseModel): message_type: Optional[Literal["message", "thinking"]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + role: Optional[Literal["user", "assistant"]] = None timestamp: Optional[datetime] = None @@ -18135,6 +33328,18 @@ class DocumentCompanyChildHeading(BaseModel): children: Optional[List[DocumentCompanyChildHeadingChild]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + text: Optional[str] = None type: Optional[Literal["heading"]] = None @@ -18147,6 +33352,18 @@ class DocumentCompanyChildImage(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["image"]] = None @@ -18157,12 +33374,36 @@ class DocumentCompanyChildLink(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["link"]] = None class DocumentCompanyChildLineBreak(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["line_break"]] = None @@ -18171,6 +33412,18 @@ class DocumentCompanyChildList(BaseModel): children: Optional[List[object]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + ordered: Optional[bool] = None text: Optional[str] = None @@ -18191,6 +33444,18 @@ class DocumentCompanyChildListItemChildBlob(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["blob"]] = None @@ -18201,6 +33466,18 @@ class DocumentCompanyChildListItemChildCode(BaseModel): language: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["code"]] = None @@ -18211,12 +33488,36 @@ class DocumentCompanyChildListItemChildComment(BaseModel): created_at: Optional[datetime] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["comment"]] = None class DocumentCompanyChildListItemChildDivider(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["divider"]] = None @@ -18227,6 +33528,18 @@ class DocumentCompanyChildListItemChildImage(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["image"]] = None @@ -18237,12 +33550,36 @@ class DocumentCompanyChildListItemChildLink(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["link"]] = None class DocumentCompanyChildListItemChildLineBreak(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["line_break"]] = None @@ -18253,6 +33590,18 @@ class DocumentCompanyChildListItemChildText(BaseModel): marks: Optional[List[Literal["bold", "italic", "underline", "strikethrough", "code", "math"]]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["text"]] = None @@ -18267,6 +33616,18 @@ class DocumentCompanyChildListItemChildToolCall(BaseModel): args: Optional[Dict[str, object]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["tool_call"]] = None @@ -18283,6 +33644,18 @@ class DocumentCompanyChildListItemChildToolResult(BaseModel): is_error: Optional[bool] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["tool_result"]] = None @@ -18295,6 +33668,18 @@ class DocumentCompanyChildListItemChildTraceMessage(BaseModel): message_type: Optional[Literal["message", "thinking"]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + role: Optional[Literal["user", "assistant"]] = None timestamp: Optional[datetime] = None @@ -18323,6 +33708,18 @@ class DocumentCompanyChildListItem(BaseModel): children: Optional[List[DocumentCompanyChildListItemChild]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + text: Optional[str] = None type: Optional[Literal["list_item"]] = None @@ -18341,6 +33738,18 @@ class DocumentCompanyChildParagraphChildBlob(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["blob"]] = None @@ -18351,6 +33760,18 @@ class DocumentCompanyChildParagraphChildCode(BaseModel): language: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["code"]] = None @@ -18361,12 +33782,36 @@ class DocumentCompanyChildParagraphChildComment(BaseModel): created_at: Optional[datetime] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["comment"]] = None class DocumentCompanyChildParagraphChildDivider(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["divider"]] = None @@ -18377,6 +33822,18 @@ class DocumentCompanyChildParagraphChildImage(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["image"]] = None @@ -18387,12 +33844,36 @@ class DocumentCompanyChildParagraphChildLink(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["link"]] = None class DocumentCompanyChildParagraphChildLineBreak(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["line_break"]] = None @@ -18403,6 +33884,18 @@ class DocumentCompanyChildParagraphChildText(BaseModel): marks: Optional[List[Literal["bold", "italic", "underline", "strikethrough", "code", "math"]]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["text"]] = None @@ -18417,6 +33910,18 @@ class DocumentCompanyChildParagraphChildToolCall(BaseModel): args: Optional[Dict[str, object]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["tool_call"]] = None @@ -18433,6 +33938,18 @@ class DocumentCompanyChildParagraphChildToolResult(BaseModel): is_error: Optional[bool] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["tool_result"]] = None @@ -18445,6 +33962,18 @@ class DocumentCompanyChildParagraphChildTraceMessage(BaseModel): message_type: Optional[Literal["message", "thinking"]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + role: Optional[Literal["user", "assistant"]] = None timestamp: Optional[datetime] = None @@ -18473,6 +34002,18 @@ class DocumentCompanyChildParagraph(BaseModel): children: Optional[List[DocumentCompanyChildParagraphChild]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + text: Optional[str] = None type: Optional[Literal["paragraph"]] = None @@ -18491,6 +34032,18 @@ class DocumentCompanyChildQuoteChildBlob(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["blob"]] = None @@ -18501,6 +34054,18 @@ class DocumentCompanyChildQuoteChildCode(BaseModel): language: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["code"]] = None @@ -18511,12 +34076,36 @@ class DocumentCompanyChildQuoteChildComment(BaseModel): created_at: Optional[datetime] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["comment"]] = None class DocumentCompanyChildQuoteChildDivider(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["divider"]] = None @@ -18527,6 +34116,18 @@ class DocumentCompanyChildQuoteChildImage(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["image"]] = None @@ -18537,12 +34138,36 @@ class DocumentCompanyChildQuoteChildLink(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["link"]] = None class DocumentCompanyChildQuoteChildLineBreak(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["line_break"]] = None @@ -18553,6 +34178,18 @@ class DocumentCompanyChildQuoteChildText(BaseModel): marks: Optional[List[Literal["bold", "italic", "underline", "strikethrough", "code", "math"]]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["text"]] = None @@ -18567,6 +34204,18 @@ class DocumentCompanyChildQuoteChildToolCall(BaseModel): args: Optional[Dict[str, object]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["tool_call"]] = None @@ -18583,6 +34232,18 @@ class DocumentCompanyChildQuoteChildToolResult(BaseModel): is_error: Optional[bool] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["tool_result"]] = None @@ -18595,6 +34256,18 @@ class DocumentCompanyChildQuoteChildTraceMessage(BaseModel): message_type: Optional[Literal["message", "thinking"]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + role: Optional[Literal["user", "assistant"]] = None timestamp: Optional[datetime] = None @@ -18623,6 +34296,18 @@ class DocumentCompanyChildQuote(BaseModel): children: Optional[List[DocumentCompanyChildQuoteChild]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + text: Optional[str] = None type: Optional[Literal["quote"]] = None @@ -18636,6 +34321,18 @@ class DocumentCompanyChildTable(BaseModel): has_header: Optional[bool] = None """Whether the first row should be treated as a header""" + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + text: Optional[str] = None type: Optional[Literal["table"]] = None @@ -18654,6 +34351,18 @@ class DocumentCompanyChildTableCellChildBlob(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["blob"]] = None @@ -18664,6 +34373,18 @@ class DocumentCompanyChildTableCellChildCode(BaseModel): language: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["code"]] = None @@ -18674,12 +34395,36 @@ class DocumentCompanyChildTableCellChildComment(BaseModel): created_at: Optional[datetime] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["comment"]] = None class DocumentCompanyChildTableCellChildDivider(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["divider"]] = None @@ -18690,6 +34435,18 @@ class DocumentCompanyChildTableCellChildImage(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["image"]] = None @@ -18700,12 +34457,36 @@ class DocumentCompanyChildTableCellChildLink(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["link"]] = None class DocumentCompanyChildTableCellChildLineBreak(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["line_break"]] = None @@ -18716,6 +34497,18 @@ class DocumentCompanyChildTableCellChildText(BaseModel): marks: Optional[List[Literal["bold", "italic", "underline", "strikethrough", "code", "math"]]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["text"]] = None @@ -18730,6 +34523,18 @@ class DocumentCompanyChildTableCellChildToolCall(BaseModel): args: Optional[Dict[str, object]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["tool_call"]] = None @@ -18746,6 +34551,18 @@ class DocumentCompanyChildTableCellChildToolResult(BaseModel): is_error: Optional[bool] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["tool_result"]] = None @@ -18758,6 +34575,18 @@ class DocumentCompanyChildTableCellChildTraceMessage(BaseModel): message_type: Optional[Literal["message", "thinking"]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + role: Optional[Literal["user", "assistant"]] = None timestamp: Optional[datetime] = None @@ -18788,6 +34617,18 @@ class DocumentCompanyChildTableCell(BaseModel): children: Optional[List[DocumentCompanyChildTableCellChild]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + text: Optional[str] = None type: Optional[Literal["table_cell"]] = None @@ -18798,6 +34639,18 @@ class DocumentCompanyChildTableRow(BaseModel): children: Optional[List[object]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + text: Optional[str] = None type: Optional[Literal["table_row"]] = None @@ -18810,6 +34663,18 @@ class DocumentCompanyChildText(BaseModel): marks: Optional[List[Literal["bold", "italic", "underline", "strikethrough", "code", "math"]]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["text"]] = None @@ -18826,6 +34691,18 @@ class DocumentCompanyChildToDoChildBlob(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["blob"]] = None @@ -18836,6 +34713,18 @@ class DocumentCompanyChildToDoChildCode(BaseModel): language: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["code"]] = None @@ -18846,12 +34735,36 @@ class DocumentCompanyChildToDoChildComment(BaseModel): created_at: Optional[datetime] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["comment"]] = None class DocumentCompanyChildToDoChildDivider(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["divider"]] = None @@ -18862,6 +34775,18 @@ class DocumentCompanyChildToDoChildImage(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["image"]] = None @@ -18872,12 +34797,36 @@ class DocumentCompanyChildToDoChildLink(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["link"]] = None class DocumentCompanyChildToDoChildLineBreak(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["line_break"]] = None @@ -18888,6 +34837,18 @@ class DocumentCompanyChildToDoChildText(BaseModel): marks: Optional[List[Literal["bold", "italic", "underline", "strikethrough", "code", "math"]]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["text"]] = None @@ -18902,6 +34863,18 @@ class DocumentCompanyChildToDoChildToolCall(BaseModel): args: Optional[Dict[str, object]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["tool_call"]] = None @@ -18918,6 +34891,18 @@ class DocumentCompanyChildToDoChildToolResult(BaseModel): is_error: Optional[bool] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["tool_result"]] = None @@ -18930,6 +34915,18 @@ class DocumentCompanyChildToDoChildTraceMessage(BaseModel): message_type: Optional[Literal["message", "thinking"]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + role: Optional[Literal["user", "assistant"]] = None timestamp: Optional[datetime] = None @@ -18960,6 +34957,18 @@ class DocumentCompanyChildToDo(BaseModel): children: Optional[List[DocumentCompanyChildToDoChild]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + text: Optional[str] = None type: Optional[Literal["todo"]] = None @@ -18976,6 +34985,18 @@ class DocumentCompanyChildToolCall(BaseModel): args: Optional[Dict[str, object]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["tool_call"]] = None @@ -18992,6 +35013,18 @@ class DocumentCompanyChildToolResult(BaseModel): is_error: Optional[bool] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["tool_result"]] = None @@ -19004,6 +35037,18 @@ class DocumentCompanyChildTraceMessage(BaseModel): message_type: Optional[Literal["message", "thinking"]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + role: Optional[Literal["user", "assistant"]] = None timestamp: Optional[datetime] = None @@ -19025,6 +35070,18 @@ class DocumentCompanyChildUtterance(BaseModel): end: Optional[float] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + speaker: Optional[object] = None start: Optional[float] = None @@ -19089,6 +35146,18 @@ class DocumentCompany(BaseModel): is_active: Optional[bool] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + name: Optional[str] = None phone_numbers: Optional[List[str]] = None @@ -19117,6 +35186,18 @@ class DocumentDealChildBlob(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["blob"]] = None @@ -19133,6 +35214,18 @@ class DocumentDealChildCalloutChildBlob(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["blob"]] = None @@ -19143,6 +35236,18 @@ class DocumentDealChildCalloutChildCode(BaseModel): language: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["code"]] = None @@ -19153,12 +35258,36 @@ class DocumentDealChildCalloutChildComment(BaseModel): created_at: Optional[datetime] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["comment"]] = None class DocumentDealChildCalloutChildDivider(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["divider"]] = None @@ -19169,6 +35298,18 @@ class DocumentDealChildCalloutChildImage(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["image"]] = None @@ -19179,12 +35320,36 @@ class DocumentDealChildCalloutChildLink(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["link"]] = None class DocumentDealChildCalloutChildLineBreak(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["line_break"]] = None @@ -19195,6 +35360,18 @@ class DocumentDealChildCalloutChildText(BaseModel): marks: Optional[List[Literal["bold", "italic", "underline", "strikethrough", "code", "math"]]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["text"]] = None @@ -19209,6 +35386,18 @@ class DocumentDealChildCalloutChildToolCall(BaseModel): args: Optional[Dict[str, object]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["tool_call"]] = None @@ -19225,6 +35414,18 @@ class DocumentDealChildCalloutChildToolResult(BaseModel): is_error: Optional[bool] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["tool_result"]] = None @@ -19237,6 +35438,18 @@ class DocumentDealChildCalloutChildTraceMessage(BaseModel): message_type: Optional[Literal["message", "thinking"]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + role: Optional[Literal["user", "assistant"]] = None timestamp: Optional[datetime] = None @@ -19265,6 +35478,18 @@ class DocumentDealChildCallout(BaseModel): children: Optional[List[DocumentDealChildCalloutChild]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + text: Optional[str] = None title: Optional[str] = None @@ -19285,6 +35510,18 @@ class DocumentDealChildChunkChildBlob(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["blob"]] = None @@ -19295,6 +35532,18 @@ class DocumentDealChildChunkChildCode(BaseModel): language: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["code"]] = None @@ -19305,12 +35554,36 @@ class DocumentDealChildChunkChildComment(BaseModel): created_at: Optional[datetime] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["comment"]] = None class DocumentDealChildChunkChildDivider(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["divider"]] = None @@ -19321,6 +35594,18 @@ class DocumentDealChildChunkChildImage(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["image"]] = None @@ -19331,12 +35616,36 @@ class DocumentDealChildChunkChildLink(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["link"]] = None class DocumentDealChildChunkChildLineBreak(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["line_break"]] = None @@ -19347,6 +35656,18 @@ class DocumentDealChildChunkChildText(BaseModel): marks: Optional[List[Literal["bold", "italic", "underline", "strikethrough", "code", "math"]]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["text"]] = None @@ -19361,6 +35682,18 @@ class DocumentDealChildChunkChildToolCall(BaseModel): args: Optional[Dict[str, object]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["tool_call"]] = None @@ -19377,6 +35710,18 @@ class DocumentDealChildChunkChildToolResult(BaseModel): is_error: Optional[bool] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["tool_result"]] = None @@ -19389,6 +35734,18 @@ class DocumentDealChildChunkChildTraceMessage(BaseModel): message_type: Optional[Literal["message", "thinking"]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + role: Optional[Literal["user", "assistant"]] = None timestamp: Optional[datetime] = None @@ -19417,6 +35774,18 @@ class DocumentDealChildChunk(BaseModel): children: Optional[List[DocumentDealChildChunkChild]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + text: Optional[str] = None type: Optional[Literal["chunk"]] = None @@ -19429,6 +35798,18 @@ class DocumentDealChildCode(BaseModel): language: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["code"]] = None @@ -19439,12 +35820,36 @@ class DocumentDealChildComment(BaseModel): created_at: Optional[datetime] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["comment"]] = None class DocumentDealChildDivider(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["divider"]] = None @@ -19461,6 +35866,18 @@ class DocumentDealChildEquationChildBlob(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["blob"]] = None @@ -19471,6 +35888,18 @@ class DocumentDealChildEquationChildCode(BaseModel): language: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["code"]] = None @@ -19481,12 +35910,36 @@ class DocumentDealChildEquationChildComment(BaseModel): created_at: Optional[datetime] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["comment"]] = None class DocumentDealChildEquationChildDivider(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["divider"]] = None @@ -19497,6 +35950,18 @@ class DocumentDealChildEquationChildImage(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["image"]] = None @@ -19507,12 +35972,36 @@ class DocumentDealChildEquationChildLink(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["link"]] = None class DocumentDealChildEquationChildLineBreak(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["line_break"]] = None @@ -19523,6 +36012,18 @@ class DocumentDealChildEquationChildText(BaseModel): marks: Optional[List[Literal["bold", "italic", "underline", "strikethrough", "code", "math"]]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["text"]] = None @@ -19537,6 +36038,18 @@ class DocumentDealChildEquationChildToolCall(BaseModel): args: Optional[Dict[str, object]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["tool_call"]] = None @@ -19553,6 +36066,18 @@ class DocumentDealChildEquationChildToolResult(BaseModel): is_error: Optional[bool] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["tool_result"]] = None @@ -19565,6 +36090,18 @@ class DocumentDealChildEquationChildTraceMessage(BaseModel): message_type: Optional[Literal["message", "thinking"]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + role: Optional[Literal["user", "assistant"]] = None timestamp: Optional[datetime] = None @@ -19593,6 +36130,18 @@ class DocumentDealChildEquation(BaseModel): children: Optional[List[DocumentDealChildEquationChild]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + text: Optional[str] = None type: Optional[Literal["equation"]] = None @@ -19611,6 +36160,18 @@ class DocumentDealChildFootnoteChildBlob(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["blob"]] = None @@ -19621,6 +36182,18 @@ class DocumentDealChildFootnoteChildCode(BaseModel): language: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["code"]] = None @@ -19631,12 +36204,36 @@ class DocumentDealChildFootnoteChildComment(BaseModel): created_at: Optional[datetime] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["comment"]] = None class DocumentDealChildFootnoteChildDivider(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["divider"]] = None @@ -19647,6 +36244,18 @@ class DocumentDealChildFootnoteChildImage(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["image"]] = None @@ -19657,12 +36266,36 @@ class DocumentDealChildFootnoteChildLink(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["link"]] = None class DocumentDealChildFootnoteChildLineBreak(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["line_break"]] = None @@ -19673,6 +36306,18 @@ class DocumentDealChildFootnoteChildText(BaseModel): marks: Optional[List[Literal["bold", "italic", "underline", "strikethrough", "code", "math"]]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["text"]] = None @@ -19687,6 +36332,18 @@ class DocumentDealChildFootnoteChildToolCall(BaseModel): args: Optional[Dict[str, object]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["tool_call"]] = None @@ -19703,6 +36360,18 @@ class DocumentDealChildFootnoteChildToolResult(BaseModel): is_error: Optional[bool] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["tool_result"]] = None @@ -19715,6 +36384,18 @@ class DocumentDealChildFootnoteChildTraceMessage(BaseModel): message_type: Optional[Literal["message", "thinking"]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + role: Optional[Literal["user", "assistant"]] = None timestamp: Optional[datetime] = None @@ -19743,6 +36424,18 @@ class DocumentDealChildFootnote(BaseModel): children: Optional[List[DocumentDealChildFootnoteChild]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + text: Optional[str] = None type: Optional[Literal["footnote"]] = None @@ -19761,6 +36454,18 @@ class DocumentDealChildHeadingChildBlob(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["blob"]] = None @@ -19771,6 +36476,18 @@ class DocumentDealChildHeadingChildCode(BaseModel): language: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["code"]] = None @@ -19781,12 +36498,36 @@ class DocumentDealChildHeadingChildComment(BaseModel): created_at: Optional[datetime] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["comment"]] = None class DocumentDealChildHeadingChildDivider(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["divider"]] = None @@ -19797,6 +36538,18 @@ class DocumentDealChildHeadingChildImage(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["image"]] = None @@ -19807,12 +36560,36 @@ class DocumentDealChildHeadingChildLink(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["link"]] = None class DocumentDealChildHeadingChildLineBreak(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["line_break"]] = None @@ -19823,6 +36600,18 @@ class DocumentDealChildHeadingChildText(BaseModel): marks: Optional[List[Literal["bold", "italic", "underline", "strikethrough", "code", "math"]]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["text"]] = None @@ -19837,6 +36626,18 @@ class DocumentDealChildHeadingChildToolCall(BaseModel): args: Optional[Dict[str, object]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["tool_call"]] = None @@ -19853,6 +36654,18 @@ class DocumentDealChildHeadingChildToolResult(BaseModel): is_error: Optional[bool] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["tool_result"]] = None @@ -19865,6 +36678,18 @@ class DocumentDealChildHeadingChildTraceMessage(BaseModel): message_type: Optional[Literal["message", "thinking"]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + role: Optional[Literal["user", "assistant"]] = None timestamp: Optional[datetime] = None @@ -19895,6 +36720,18 @@ class DocumentDealChildHeading(BaseModel): children: Optional[List[DocumentDealChildHeadingChild]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + text: Optional[str] = None type: Optional[Literal["heading"]] = None @@ -19907,6 +36744,18 @@ class DocumentDealChildImage(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["image"]] = None @@ -19917,12 +36766,36 @@ class DocumentDealChildLink(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["link"]] = None class DocumentDealChildLineBreak(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["line_break"]] = None @@ -19931,6 +36804,18 @@ class DocumentDealChildList(BaseModel): children: Optional[List[object]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + ordered: Optional[bool] = None text: Optional[str] = None @@ -19951,6 +36836,18 @@ class DocumentDealChildListItemChildBlob(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["blob"]] = None @@ -19961,6 +36858,18 @@ class DocumentDealChildListItemChildCode(BaseModel): language: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["code"]] = None @@ -19971,12 +36880,36 @@ class DocumentDealChildListItemChildComment(BaseModel): created_at: Optional[datetime] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["comment"]] = None class DocumentDealChildListItemChildDivider(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["divider"]] = None @@ -19987,6 +36920,18 @@ class DocumentDealChildListItemChildImage(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["image"]] = None @@ -19997,12 +36942,36 @@ class DocumentDealChildListItemChildLink(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["link"]] = None class DocumentDealChildListItemChildLineBreak(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["line_break"]] = None @@ -20013,6 +36982,18 @@ class DocumentDealChildListItemChildText(BaseModel): marks: Optional[List[Literal["bold", "italic", "underline", "strikethrough", "code", "math"]]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["text"]] = None @@ -20027,6 +37008,18 @@ class DocumentDealChildListItemChildToolCall(BaseModel): args: Optional[Dict[str, object]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["tool_call"]] = None @@ -20043,6 +37036,18 @@ class DocumentDealChildListItemChildToolResult(BaseModel): is_error: Optional[bool] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["tool_result"]] = None @@ -20055,6 +37060,18 @@ class DocumentDealChildListItemChildTraceMessage(BaseModel): message_type: Optional[Literal["message", "thinking"]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + role: Optional[Literal["user", "assistant"]] = None timestamp: Optional[datetime] = None @@ -20083,6 +37100,18 @@ class DocumentDealChildListItem(BaseModel): children: Optional[List[DocumentDealChildListItemChild]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + text: Optional[str] = None type: Optional[Literal["list_item"]] = None @@ -20101,6 +37130,18 @@ class DocumentDealChildParagraphChildBlob(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["blob"]] = None @@ -20111,6 +37152,18 @@ class DocumentDealChildParagraphChildCode(BaseModel): language: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["code"]] = None @@ -20121,12 +37174,36 @@ class DocumentDealChildParagraphChildComment(BaseModel): created_at: Optional[datetime] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["comment"]] = None class DocumentDealChildParagraphChildDivider(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["divider"]] = None @@ -20137,6 +37214,18 @@ class DocumentDealChildParagraphChildImage(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["image"]] = None @@ -20147,12 +37236,36 @@ class DocumentDealChildParagraphChildLink(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["link"]] = None class DocumentDealChildParagraphChildLineBreak(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["line_break"]] = None @@ -20163,6 +37276,18 @@ class DocumentDealChildParagraphChildText(BaseModel): marks: Optional[List[Literal["bold", "italic", "underline", "strikethrough", "code", "math"]]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["text"]] = None @@ -20177,6 +37302,18 @@ class DocumentDealChildParagraphChildToolCall(BaseModel): args: Optional[Dict[str, object]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["tool_call"]] = None @@ -20193,6 +37330,18 @@ class DocumentDealChildParagraphChildToolResult(BaseModel): is_error: Optional[bool] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["tool_result"]] = None @@ -20205,6 +37354,18 @@ class DocumentDealChildParagraphChildTraceMessage(BaseModel): message_type: Optional[Literal["message", "thinking"]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + role: Optional[Literal["user", "assistant"]] = None timestamp: Optional[datetime] = None @@ -20233,6 +37394,18 @@ class DocumentDealChildParagraph(BaseModel): children: Optional[List[DocumentDealChildParagraphChild]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + text: Optional[str] = None type: Optional[Literal["paragraph"]] = None @@ -20251,6 +37424,18 @@ class DocumentDealChildQuoteChildBlob(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["blob"]] = None @@ -20261,6 +37446,18 @@ class DocumentDealChildQuoteChildCode(BaseModel): language: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["code"]] = None @@ -20271,12 +37468,36 @@ class DocumentDealChildQuoteChildComment(BaseModel): created_at: Optional[datetime] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["comment"]] = None class DocumentDealChildQuoteChildDivider(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["divider"]] = None @@ -20287,6 +37508,18 @@ class DocumentDealChildQuoteChildImage(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["image"]] = None @@ -20297,12 +37530,36 @@ class DocumentDealChildQuoteChildLink(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["link"]] = None class DocumentDealChildQuoteChildLineBreak(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["line_break"]] = None @@ -20313,6 +37570,18 @@ class DocumentDealChildQuoteChildText(BaseModel): marks: Optional[List[Literal["bold", "italic", "underline", "strikethrough", "code", "math"]]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["text"]] = None @@ -20327,6 +37596,18 @@ class DocumentDealChildQuoteChildToolCall(BaseModel): args: Optional[Dict[str, object]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["tool_call"]] = None @@ -20343,6 +37624,18 @@ class DocumentDealChildQuoteChildToolResult(BaseModel): is_error: Optional[bool] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["tool_result"]] = None @@ -20355,6 +37648,18 @@ class DocumentDealChildQuoteChildTraceMessage(BaseModel): message_type: Optional[Literal["message", "thinking"]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + role: Optional[Literal["user", "assistant"]] = None timestamp: Optional[datetime] = None @@ -20383,6 +37688,18 @@ class DocumentDealChildQuote(BaseModel): children: Optional[List[DocumentDealChildQuoteChild]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + text: Optional[str] = None type: Optional[Literal["quote"]] = None @@ -20396,6 +37713,18 @@ class DocumentDealChildTable(BaseModel): has_header: Optional[bool] = None """Whether the first row should be treated as a header""" + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + text: Optional[str] = None type: Optional[Literal["table"]] = None @@ -20414,6 +37743,18 @@ class DocumentDealChildTableCellChildBlob(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["blob"]] = None @@ -20424,6 +37765,18 @@ class DocumentDealChildTableCellChildCode(BaseModel): language: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["code"]] = None @@ -20434,12 +37787,36 @@ class DocumentDealChildTableCellChildComment(BaseModel): created_at: Optional[datetime] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["comment"]] = None class DocumentDealChildTableCellChildDivider(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["divider"]] = None @@ -20450,6 +37827,18 @@ class DocumentDealChildTableCellChildImage(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["image"]] = None @@ -20460,12 +37849,36 @@ class DocumentDealChildTableCellChildLink(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["link"]] = None class DocumentDealChildTableCellChildLineBreak(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["line_break"]] = None @@ -20476,6 +37889,18 @@ class DocumentDealChildTableCellChildText(BaseModel): marks: Optional[List[Literal["bold", "italic", "underline", "strikethrough", "code", "math"]]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["text"]] = None @@ -20490,6 +37915,18 @@ class DocumentDealChildTableCellChildToolCall(BaseModel): args: Optional[Dict[str, object]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["tool_call"]] = None @@ -20506,6 +37943,18 @@ class DocumentDealChildTableCellChildToolResult(BaseModel): is_error: Optional[bool] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["tool_result"]] = None @@ -20518,6 +37967,18 @@ class DocumentDealChildTableCellChildTraceMessage(BaseModel): message_type: Optional[Literal["message", "thinking"]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + role: Optional[Literal["user", "assistant"]] = None timestamp: Optional[datetime] = None @@ -20548,6 +38009,18 @@ class DocumentDealChildTableCell(BaseModel): children: Optional[List[DocumentDealChildTableCellChild]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + text: Optional[str] = None type: Optional[Literal["table_cell"]] = None @@ -20558,6 +38031,18 @@ class DocumentDealChildTableRow(BaseModel): children: Optional[List[object]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + text: Optional[str] = None type: Optional[Literal["table_row"]] = None @@ -20570,6 +38055,18 @@ class DocumentDealChildText(BaseModel): marks: Optional[List[Literal["bold", "italic", "underline", "strikethrough", "code", "math"]]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["text"]] = None @@ -20586,6 +38083,18 @@ class DocumentDealChildToDoChildBlob(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["blob"]] = None @@ -20596,6 +38105,18 @@ class DocumentDealChildToDoChildCode(BaseModel): language: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["code"]] = None @@ -20606,12 +38127,36 @@ class DocumentDealChildToDoChildComment(BaseModel): created_at: Optional[datetime] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["comment"]] = None class DocumentDealChildToDoChildDivider(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["divider"]] = None @@ -20622,6 +38167,18 @@ class DocumentDealChildToDoChildImage(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["image"]] = None @@ -20632,12 +38189,36 @@ class DocumentDealChildToDoChildLink(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["link"]] = None class DocumentDealChildToDoChildLineBreak(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["line_break"]] = None @@ -20648,6 +38229,18 @@ class DocumentDealChildToDoChildText(BaseModel): marks: Optional[List[Literal["bold", "italic", "underline", "strikethrough", "code", "math"]]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["text"]] = None @@ -20662,6 +38255,18 @@ class DocumentDealChildToDoChildToolCall(BaseModel): args: Optional[Dict[str, object]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["tool_call"]] = None @@ -20678,6 +38283,18 @@ class DocumentDealChildToDoChildToolResult(BaseModel): is_error: Optional[bool] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["tool_result"]] = None @@ -20690,6 +38307,18 @@ class DocumentDealChildToDoChildTraceMessage(BaseModel): message_type: Optional[Literal["message", "thinking"]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + role: Optional[Literal["user", "assistant"]] = None timestamp: Optional[datetime] = None @@ -20720,6 +38349,18 @@ class DocumentDealChildToDo(BaseModel): children: Optional[List[DocumentDealChildToDoChild]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + text: Optional[str] = None type: Optional[Literal["todo"]] = None @@ -20736,6 +38377,18 @@ class DocumentDealChildToolCall(BaseModel): args: Optional[Dict[str, object]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["tool_call"]] = None @@ -20752,6 +38405,18 @@ class DocumentDealChildToolResult(BaseModel): is_error: Optional[bool] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["tool_result"]] = None @@ -20764,6 +38429,18 @@ class DocumentDealChildTraceMessage(BaseModel): message_type: Optional[Literal["message", "thinking"]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + role: Optional[Literal["user", "assistant"]] = None timestamp: Optional[datetime] = None @@ -20785,6 +38462,18 @@ class DocumentDealChildUtterance(BaseModel): end: Optional[float] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + speaker: Optional[object] = None start: Optional[float] = None @@ -20845,6 +38534,18 @@ class DocumentDeal(BaseModel): lost_reason: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + name: Optional[str] = None pipeline: Optional[str] = None diff --git a/src/hyperspell/types/shared/__init__.py b/src/hyperspell/types/shared/__init__.py index 029f085f..df0cf4bf 100644 --- a/src/hyperspell/types/shared/__init__.py +++ b/src/hyperspell/types/shared/__init__.py @@ -1,3 +1,4 @@ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. +from .metadata import Metadata as Metadata from .query_result import QueryResult as QueryResult diff --git a/src/hyperspell/types/shared/metadata.py b/src/hyperspell/types/shared/metadata.py new file mode 100644 index 00000000..42aea64c --- /dev/null +++ b/src/hyperspell/types/shared/metadata.py @@ -0,0 +1,43 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +from typing import List, Optional + +from ..._models import BaseModel + +__all__ = ["Metadata", "Source"] + + +class Source(BaseModel): + """A reference to a memory/chunk that a block's content is grounded in (ENG-1390). + + Chunks are the unit persisted to the DB — extracted memories become chunks when + indexed — so `chunk_id` is the stable pointer back to the source. `resource_id` + and `source` locate the originating document; `score` carries optional retrieval + relevance. Kept deliberately self-contained (plain `str` for `source` rather than + the `DocumentProviders` enum) so the hyperdoc format stays free of app-layer imports. + """ + + chunk_id: str + + resource_id: Optional[str] = None + + score: Optional[float] = None + + source: Optional[str] = None + + +class Metadata(BaseModel): + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + + edited_by: Optional[str] = None + + sources: Optional[List[Source]] = None diff --git a/src/hyperspell/types/shared/query_result.py b/src/hyperspell/types/shared/query_result.py index e26dd6aa..a955df82 100644 --- a/src/hyperspell/types/shared/query_result.py +++ b/src/hyperspell/types/shared/query_result.py @@ -5,6 +5,7 @@ from typing_extensions import Literal, Annotated, TypeAlias from ..._utils import PropertyInfo +from .metadata import Metadata from ..._models import BaseModel __all__ = [ @@ -1626,6 +1627,18 @@ class DocumentDocumentDocumentChildBlob(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["blob"]] = None @@ -1642,6 +1655,18 @@ class DocumentDocumentDocumentChildCalloutChildBlob(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["blob"]] = None @@ -1652,6 +1677,18 @@ class DocumentDocumentDocumentChildCalloutChildCode(BaseModel): language: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["code"]] = None @@ -1662,12 +1699,36 @@ class DocumentDocumentDocumentChildCalloutChildComment(BaseModel): created_at: Optional[datetime] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["comment"]] = None class DocumentDocumentDocumentChildCalloutChildDivider(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["divider"]] = None @@ -1678,6 +1739,18 @@ class DocumentDocumentDocumentChildCalloutChildImage(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["image"]] = None @@ -1688,12 +1761,36 @@ class DocumentDocumentDocumentChildCalloutChildLink(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["link"]] = None class DocumentDocumentDocumentChildCalloutChildLineBreak(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["line_break"]] = None @@ -1704,6 +1801,18 @@ class DocumentDocumentDocumentChildCalloutChildText(BaseModel): marks: Optional[List[Literal["bold", "italic", "underline", "strikethrough", "code", "math"]]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["text"]] = None @@ -1718,6 +1827,18 @@ class DocumentDocumentDocumentChildCalloutChildToolCall(BaseModel): args: Optional[Dict[str, object]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["tool_call"]] = None @@ -1734,6 +1855,18 @@ class DocumentDocumentDocumentChildCalloutChildToolResult(BaseModel): is_error: Optional[bool] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["tool_result"]] = None @@ -1746,6 +1879,18 @@ class DocumentDocumentDocumentChildCalloutChildTraceMessage(BaseModel): message_type: Optional[Literal["message", "thinking"]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + role: Optional[Literal["user", "assistant"]] = None timestamp: Optional[datetime] = None @@ -1774,6 +1919,18 @@ class DocumentDocumentDocumentChildCallout(BaseModel): children: Optional[List[DocumentDocumentDocumentChildCalloutChild]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + text: Optional[str] = None title: Optional[str] = None @@ -1794,6 +1951,18 @@ class DocumentDocumentDocumentChildChunkChildBlob(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["blob"]] = None @@ -1804,6 +1973,18 @@ class DocumentDocumentDocumentChildChunkChildCode(BaseModel): language: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["code"]] = None @@ -1814,12 +1995,36 @@ class DocumentDocumentDocumentChildChunkChildComment(BaseModel): created_at: Optional[datetime] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["comment"]] = None class DocumentDocumentDocumentChildChunkChildDivider(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["divider"]] = None @@ -1830,6 +2035,18 @@ class DocumentDocumentDocumentChildChunkChildImage(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["image"]] = None @@ -1840,12 +2057,36 @@ class DocumentDocumentDocumentChildChunkChildLink(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["link"]] = None class DocumentDocumentDocumentChildChunkChildLineBreak(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["line_break"]] = None @@ -1856,6 +2097,18 @@ class DocumentDocumentDocumentChildChunkChildText(BaseModel): marks: Optional[List[Literal["bold", "italic", "underline", "strikethrough", "code", "math"]]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["text"]] = None @@ -1870,6 +2123,18 @@ class DocumentDocumentDocumentChildChunkChildToolCall(BaseModel): args: Optional[Dict[str, object]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["tool_call"]] = None @@ -1886,6 +2151,18 @@ class DocumentDocumentDocumentChildChunkChildToolResult(BaseModel): is_error: Optional[bool] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["tool_result"]] = None @@ -1898,6 +2175,18 @@ class DocumentDocumentDocumentChildChunkChildTraceMessage(BaseModel): message_type: Optional[Literal["message", "thinking"]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + role: Optional[Literal["user", "assistant"]] = None timestamp: Optional[datetime] = None @@ -1926,6 +2215,18 @@ class DocumentDocumentDocumentChildChunk(BaseModel): children: Optional[List[DocumentDocumentDocumentChildChunkChild]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + text: Optional[str] = None type: Optional[Literal["chunk"]] = None @@ -1938,6 +2239,18 @@ class DocumentDocumentDocumentChildCode(BaseModel): language: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["code"]] = None @@ -1948,12 +2261,36 @@ class DocumentDocumentDocumentChildComment(BaseModel): created_at: Optional[datetime] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["comment"]] = None class DocumentDocumentDocumentChildDivider(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["divider"]] = None @@ -1970,6 +2307,18 @@ class DocumentDocumentDocumentChildEquationChildBlob(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["blob"]] = None @@ -1980,6 +2329,18 @@ class DocumentDocumentDocumentChildEquationChildCode(BaseModel): language: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["code"]] = None @@ -1990,12 +2351,36 @@ class DocumentDocumentDocumentChildEquationChildComment(BaseModel): created_at: Optional[datetime] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["comment"]] = None class DocumentDocumentDocumentChildEquationChildDivider(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["divider"]] = None @@ -2006,6 +2391,18 @@ class DocumentDocumentDocumentChildEquationChildImage(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["image"]] = None @@ -2016,12 +2413,36 @@ class DocumentDocumentDocumentChildEquationChildLink(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["link"]] = None class DocumentDocumentDocumentChildEquationChildLineBreak(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["line_break"]] = None @@ -2032,6 +2453,18 @@ class DocumentDocumentDocumentChildEquationChildText(BaseModel): marks: Optional[List[Literal["bold", "italic", "underline", "strikethrough", "code", "math"]]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["text"]] = None @@ -2046,6 +2479,18 @@ class DocumentDocumentDocumentChildEquationChildToolCall(BaseModel): args: Optional[Dict[str, object]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["tool_call"]] = None @@ -2062,6 +2507,18 @@ class DocumentDocumentDocumentChildEquationChildToolResult(BaseModel): is_error: Optional[bool] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["tool_result"]] = None @@ -2074,6 +2531,18 @@ class DocumentDocumentDocumentChildEquationChildTraceMessage(BaseModel): message_type: Optional[Literal["message", "thinking"]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + role: Optional[Literal["user", "assistant"]] = None timestamp: Optional[datetime] = None @@ -2102,6 +2571,18 @@ class DocumentDocumentDocumentChildEquation(BaseModel): children: Optional[List[DocumentDocumentDocumentChildEquationChild]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + text: Optional[str] = None type: Optional[Literal["equation"]] = None @@ -2120,6 +2601,18 @@ class DocumentDocumentDocumentChildFootnoteChildBlob(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["blob"]] = None @@ -2130,6 +2623,18 @@ class DocumentDocumentDocumentChildFootnoteChildCode(BaseModel): language: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["code"]] = None @@ -2140,12 +2645,36 @@ class DocumentDocumentDocumentChildFootnoteChildComment(BaseModel): created_at: Optional[datetime] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["comment"]] = None class DocumentDocumentDocumentChildFootnoteChildDivider(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["divider"]] = None @@ -2156,6 +2685,18 @@ class DocumentDocumentDocumentChildFootnoteChildImage(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["image"]] = None @@ -2166,12 +2707,36 @@ class DocumentDocumentDocumentChildFootnoteChildLink(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["link"]] = None class DocumentDocumentDocumentChildFootnoteChildLineBreak(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["line_break"]] = None @@ -2182,6 +2747,18 @@ class DocumentDocumentDocumentChildFootnoteChildText(BaseModel): marks: Optional[List[Literal["bold", "italic", "underline", "strikethrough", "code", "math"]]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["text"]] = None @@ -2196,6 +2773,18 @@ class DocumentDocumentDocumentChildFootnoteChildToolCall(BaseModel): args: Optional[Dict[str, object]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["tool_call"]] = None @@ -2212,6 +2801,18 @@ class DocumentDocumentDocumentChildFootnoteChildToolResult(BaseModel): is_error: Optional[bool] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["tool_result"]] = None @@ -2224,6 +2825,18 @@ class DocumentDocumentDocumentChildFootnoteChildTraceMessage(BaseModel): message_type: Optional[Literal["message", "thinking"]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + role: Optional[Literal["user", "assistant"]] = None timestamp: Optional[datetime] = None @@ -2252,6 +2865,18 @@ class DocumentDocumentDocumentChildFootnote(BaseModel): children: Optional[List[DocumentDocumentDocumentChildFootnoteChild]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + text: Optional[str] = None type: Optional[Literal["footnote"]] = None @@ -2270,6 +2895,18 @@ class DocumentDocumentDocumentChildHeadingChildBlob(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["blob"]] = None @@ -2280,6 +2917,18 @@ class DocumentDocumentDocumentChildHeadingChildCode(BaseModel): language: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["code"]] = None @@ -2290,12 +2939,36 @@ class DocumentDocumentDocumentChildHeadingChildComment(BaseModel): created_at: Optional[datetime] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["comment"]] = None class DocumentDocumentDocumentChildHeadingChildDivider(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["divider"]] = None @@ -2306,6 +2979,18 @@ class DocumentDocumentDocumentChildHeadingChildImage(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["image"]] = None @@ -2316,12 +3001,36 @@ class DocumentDocumentDocumentChildHeadingChildLink(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["link"]] = None class DocumentDocumentDocumentChildHeadingChildLineBreak(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["line_break"]] = None @@ -2332,6 +3041,18 @@ class DocumentDocumentDocumentChildHeadingChildText(BaseModel): marks: Optional[List[Literal["bold", "italic", "underline", "strikethrough", "code", "math"]]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["text"]] = None @@ -2346,6 +3067,18 @@ class DocumentDocumentDocumentChildHeadingChildToolCall(BaseModel): args: Optional[Dict[str, object]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["tool_call"]] = None @@ -2362,6 +3095,18 @@ class DocumentDocumentDocumentChildHeadingChildToolResult(BaseModel): is_error: Optional[bool] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["tool_result"]] = None @@ -2374,6 +3119,18 @@ class DocumentDocumentDocumentChildHeadingChildTraceMessage(BaseModel): message_type: Optional[Literal["message", "thinking"]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + role: Optional[Literal["user", "assistant"]] = None timestamp: Optional[datetime] = None @@ -2404,6 +3161,18 @@ class DocumentDocumentDocumentChildHeading(BaseModel): children: Optional[List[DocumentDocumentDocumentChildHeadingChild]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + text: Optional[str] = None type: Optional[Literal["heading"]] = None @@ -2416,6 +3185,18 @@ class DocumentDocumentDocumentChildImage(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["image"]] = None @@ -2426,12 +3207,36 @@ class DocumentDocumentDocumentChildLink(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["link"]] = None class DocumentDocumentDocumentChildLineBreak(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["line_break"]] = None @@ -2440,6 +3245,18 @@ class DocumentDocumentDocumentChildList(BaseModel): children: Optional[List[object]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + ordered: Optional[bool] = None text: Optional[str] = None @@ -2460,6 +3277,18 @@ class DocumentDocumentDocumentChildListItemChildBlob(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["blob"]] = None @@ -2470,6 +3299,18 @@ class DocumentDocumentDocumentChildListItemChildCode(BaseModel): language: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["code"]] = None @@ -2480,12 +3321,36 @@ class DocumentDocumentDocumentChildListItemChildComment(BaseModel): created_at: Optional[datetime] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["comment"]] = None class DocumentDocumentDocumentChildListItemChildDivider(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["divider"]] = None @@ -2496,6 +3361,18 @@ class DocumentDocumentDocumentChildListItemChildImage(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["image"]] = None @@ -2506,12 +3383,36 @@ class DocumentDocumentDocumentChildListItemChildLink(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["link"]] = None class DocumentDocumentDocumentChildListItemChildLineBreak(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["line_break"]] = None @@ -2522,6 +3423,18 @@ class DocumentDocumentDocumentChildListItemChildText(BaseModel): marks: Optional[List[Literal["bold", "italic", "underline", "strikethrough", "code", "math"]]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["text"]] = None @@ -2536,6 +3449,18 @@ class DocumentDocumentDocumentChildListItemChildToolCall(BaseModel): args: Optional[Dict[str, object]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["tool_call"]] = None @@ -2552,6 +3477,18 @@ class DocumentDocumentDocumentChildListItemChildToolResult(BaseModel): is_error: Optional[bool] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["tool_result"]] = None @@ -2564,6 +3501,18 @@ class DocumentDocumentDocumentChildListItemChildTraceMessage(BaseModel): message_type: Optional[Literal["message", "thinking"]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + role: Optional[Literal["user", "assistant"]] = None timestamp: Optional[datetime] = None @@ -2592,6 +3541,18 @@ class DocumentDocumentDocumentChildListItem(BaseModel): children: Optional[List[DocumentDocumentDocumentChildListItemChild]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + text: Optional[str] = None type: Optional[Literal["list_item"]] = None @@ -2610,6 +3571,18 @@ class DocumentDocumentDocumentChildParagraphChildBlob(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["blob"]] = None @@ -2620,6 +3593,18 @@ class DocumentDocumentDocumentChildParagraphChildCode(BaseModel): language: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["code"]] = None @@ -2630,12 +3615,36 @@ class DocumentDocumentDocumentChildParagraphChildComment(BaseModel): created_at: Optional[datetime] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["comment"]] = None class DocumentDocumentDocumentChildParagraphChildDivider(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["divider"]] = None @@ -2646,6 +3655,18 @@ class DocumentDocumentDocumentChildParagraphChildImage(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["image"]] = None @@ -2656,12 +3677,36 @@ class DocumentDocumentDocumentChildParagraphChildLink(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["link"]] = None class DocumentDocumentDocumentChildParagraphChildLineBreak(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["line_break"]] = None @@ -2672,6 +3717,18 @@ class DocumentDocumentDocumentChildParagraphChildText(BaseModel): marks: Optional[List[Literal["bold", "italic", "underline", "strikethrough", "code", "math"]]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["text"]] = None @@ -2686,6 +3743,18 @@ class DocumentDocumentDocumentChildParagraphChildToolCall(BaseModel): args: Optional[Dict[str, object]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["tool_call"]] = None @@ -2702,6 +3771,18 @@ class DocumentDocumentDocumentChildParagraphChildToolResult(BaseModel): is_error: Optional[bool] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["tool_result"]] = None @@ -2714,6 +3795,18 @@ class DocumentDocumentDocumentChildParagraphChildTraceMessage(BaseModel): message_type: Optional[Literal["message", "thinking"]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + role: Optional[Literal["user", "assistant"]] = None timestamp: Optional[datetime] = None @@ -2742,6 +3835,18 @@ class DocumentDocumentDocumentChildParagraph(BaseModel): children: Optional[List[DocumentDocumentDocumentChildParagraphChild]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + text: Optional[str] = None type: Optional[Literal["paragraph"]] = None @@ -2760,6 +3865,18 @@ class DocumentDocumentDocumentChildQuoteChildBlob(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["blob"]] = None @@ -2770,6 +3887,18 @@ class DocumentDocumentDocumentChildQuoteChildCode(BaseModel): language: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["code"]] = None @@ -2780,12 +3909,36 @@ class DocumentDocumentDocumentChildQuoteChildComment(BaseModel): created_at: Optional[datetime] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["comment"]] = None class DocumentDocumentDocumentChildQuoteChildDivider(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["divider"]] = None @@ -2796,6 +3949,18 @@ class DocumentDocumentDocumentChildQuoteChildImage(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["image"]] = None @@ -2806,12 +3971,36 @@ class DocumentDocumentDocumentChildQuoteChildLink(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["link"]] = None class DocumentDocumentDocumentChildQuoteChildLineBreak(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["line_break"]] = None @@ -2822,6 +4011,18 @@ class DocumentDocumentDocumentChildQuoteChildText(BaseModel): marks: Optional[List[Literal["bold", "italic", "underline", "strikethrough", "code", "math"]]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["text"]] = None @@ -2836,6 +4037,18 @@ class DocumentDocumentDocumentChildQuoteChildToolCall(BaseModel): args: Optional[Dict[str, object]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["tool_call"]] = None @@ -2852,6 +4065,18 @@ class DocumentDocumentDocumentChildQuoteChildToolResult(BaseModel): is_error: Optional[bool] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["tool_result"]] = None @@ -2864,6 +4089,18 @@ class DocumentDocumentDocumentChildQuoteChildTraceMessage(BaseModel): message_type: Optional[Literal["message", "thinking"]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + role: Optional[Literal["user", "assistant"]] = None timestamp: Optional[datetime] = None @@ -2892,6 +4129,18 @@ class DocumentDocumentDocumentChildQuote(BaseModel): children: Optional[List[DocumentDocumentDocumentChildQuoteChild]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + text: Optional[str] = None type: Optional[Literal["quote"]] = None @@ -2905,6 +4154,18 @@ class DocumentDocumentDocumentChildTable(BaseModel): has_header: Optional[bool] = None """Whether the first row should be treated as a header""" + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + text: Optional[str] = None type: Optional[Literal["table"]] = None @@ -2923,6 +4184,18 @@ class DocumentDocumentDocumentChildTableCellChildBlob(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["blob"]] = None @@ -2933,6 +4206,18 @@ class DocumentDocumentDocumentChildTableCellChildCode(BaseModel): language: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["code"]] = None @@ -2943,12 +4228,36 @@ class DocumentDocumentDocumentChildTableCellChildComment(BaseModel): created_at: Optional[datetime] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["comment"]] = None class DocumentDocumentDocumentChildTableCellChildDivider(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["divider"]] = None @@ -2959,6 +4268,18 @@ class DocumentDocumentDocumentChildTableCellChildImage(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["image"]] = None @@ -2969,12 +4290,36 @@ class DocumentDocumentDocumentChildTableCellChildLink(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["link"]] = None class DocumentDocumentDocumentChildTableCellChildLineBreak(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["line_break"]] = None @@ -2985,6 +4330,18 @@ class DocumentDocumentDocumentChildTableCellChildText(BaseModel): marks: Optional[List[Literal["bold", "italic", "underline", "strikethrough", "code", "math"]]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["text"]] = None @@ -2999,6 +4356,18 @@ class DocumentDocumentDocumentChildTableCellChildToolCall(BaseModel): args: Optional[Dict[str, object]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["tool_call"]] = None @@ -3015,6 +4384,18 @@ class DocumentDocumentDocumentChildTableCellChildToolResult(BaseModel): is_error: Optional[bool] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["tool_result"]] = None @@ -3027,6 +4408,18 @@ class DocumentDocumentDocumentChildTableCellChildTraceMessage(BaseModel): message_type: Optional[Literal["message", "thinking"]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + role: Optional[Literal["user", "assistant"]] = None timestamp: Optional[datetime] = None @@ -3057,6 +4450,18 @@ class DocumentDocumentDocumentChildTableCell(BaseModel): children: Optional[List[DocumentDocumentDocumentChildTableCellChild]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + text: Optional[str] = None type: Optional[Literal["table_cell"]] = None @@ -3067,6 +4472,18 @@ class DocumentDocumentDocumentChildTableRow(BaseModel): children: Optional[List[object]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + text: Optional[str] = None type: Optional[Literal["table_row"]] = None @@ -3079,6 +4496,18 @@ class DocumentDocumentDocumentChildText(BaseModel): marks: Optional[List[Literal["bold", "italic", "underline", "strikethrough", "code", "math"]]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["text"]] = None @@ -3095,6 +4524,18 @@ class DocumentDocumentDocumentChildToDoChildBlob(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["blob"]] = None @@ -3105,6 +4546,18 @@ class DocumentDocumentDocumentChildToDoChildCode(BaseModel): language: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["code"]] = None @@ -3115,12 +4568,36 @@ class DocumentDocumentDocumentChildToDoChildComment(BaseModel): created_at: Optional[datetime] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["comment"]] = None class DocumentDocumentDocumentChildToDoChildDivider(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["divider"]] = None @@ -3131,6 +4608,18 @@ class DocumentDocumentDocumentChildToDoChildImage(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["image"]] = None @@ -3141,12 +4630,36 @@ class DocumentDocumentDocumentChildToDoChildLink(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["link"]] = None class DocumentDocumentDocumentChildToDoChildLineBreak(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["line_break"]] = None @@ -3157,6 +4670,18 @@ class DocumentDocumentDocumentChildToDoChildText(BaseModel): marks: Optional[List[Literal["bold", "italic", "underline", "strikethrough", "code", "math"]]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["text"]] = None @@ -3171,6 +4696,18 @@ class DocumentDocumentDocumentChildToDoChildToolCall(BaseModel): args: Optional[Dict[str, object]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["tool_call"]] = None @@ -3187,6 +4724,18 @@ class DocumentDocumentDocumentChildToDoChildToolResult(BaseModel): is_error: Optional[bool] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["tool_result"]] = None @@ -3199,6 +4748,18 @@ class DocumentDocumentDocumentChildToDoChildTraceMessage(BaseModel): message_type: Optional[Literal["message", "thinking"]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + role: Optional[Literal["user", "assistant"]] = None timestamp: Optional[datetime] = None @@ -3229,6 +4790,18 @@ class DocumentDocumentDocumentChildToDo(BaseModel): children: Optional[List[DocumentDocumentDocumentChildToDoChild]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + text: Optional[str] = None type: Optional[Literal["todo"]] = None @@ -3245,6 +4818,18 @@ class DocumentDocumentDocumentChildToolCall(BaseModel): args: Optional[Dict[str, object]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["tool_call"]] = None @@ -3261,6 +4846,18 @@ class DocumentDocumentDocumentChildToolResult(BaseModel): is_error: Optional[bool] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["tool_result"]] = None @@ -3273,6 +4870,18 @@ class DocumentDocumentDocumentChildTraceMessage(BaseModel): message_type: Optional[Literal["message", "thinking"]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + role: Optional[Literal["user", "assistant"]] = None timestamp: Optional[datetime] = None @@ -3294,6 +4903,18 @@ class DocumentDocumentDocumentChildUtterance(BaseModel): end: Optional[float] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + speaker: Optional[object] = None start: Optional[float] = None @@ -3338,6 +4959,18 @@ class DocumentDocumentDocument(BaseModel): children: Optional[List[DocumentDocumentDocumentChild]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + text: Optional[str] = None title: Optional[str] = None @@ -3358,6 +4991,18 @@ class DocumentDocumentWebsiteChildBlob(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["blob"]] = None @@ -3374,6 +5019,18 @@ class DocumentDocumentWebsiteChildCalloutChildBlob(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["blob"]] = None @@ -3384,6 +5041,18 @@ class DocumentDocumentWebsiteChildCalloutChildCode(BaseModel): language: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["code"]] = None @@ -3394,12 +5063,36 @@ class DocumentDocumentWebsiteChildCalloutChildComment(BaseModel): created_at: Optional[datetime] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["comment"]] = None class DocumentDocumentWebsiteChildCalloutChildDivider(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["divider"]] = None @@ -3410,6 +5103,18 @@ class DocumentDocumentWebsiteChildCalloutChildImage(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["image"]] = None @@ -3420,12 +5125,36 @@ class DocumentDocumentWebsiteChildCalloutChildLink(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["link"]] = None class DocumentDocumentWebsiteChildCalloutChildLineBreak(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["line_break"]] = None @@ -3436,6 +5165,18 @@ class DocumentDocumentWebsiteChildCalloutChildText(BaseModel): marks: Optional[List[Literal["bold", "italic", "underline", "strikethrough", "code", "math"]]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["text"]] = None @@ -3450,6 +5191,18 @@ class DocumentDocumentWebsiteChildCalloutChildToolCall(BaseModel): args: Optional[Dict[str, object]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["tool_call"]] = None @@ -3466,6 +5219,18 @@ class DocumentDocumentWebsiteChildCalloutChildToolResult(BaseModel): is_error: Optional[bool] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["tool_result"]] = None @@ -3478,6 +5243,18 @@ class DocumentDocumentWebsiteChildCalloutChildTraceMessage(BaseModel): message_type: Optional[Literal["message", "thinking"]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + role: Optional[Literal["user", "assistant"]] = None timestamp: Optional[datetime] = None @@ -3506,6 +5283,18 @@ class DocumentDocumentWebsiteChildCallout(BaseModel): children: Optional[List[DocumentDocumentWebsiteChildCalloutChild]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + text: Optional[str] = None title: Optional[str] = None @@ -3526,6 +5315,18 @@ class DocumentDocumentWebsiteChildChunkChildBlob(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["blob"]] = None @@ -3536,6 +5337,18 @@ class DocumentDocumentWebsiteChildChunkChildCode(BaseModel): language: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["code"]] = None @@ -3546,12 +5359,36 @@ class DocumentDocumentWebsiteChildChunkChildComment(BaseModel): created_at: Optional[datetime] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["comment"]] = None class DocumentDocumentWebsiteChildChunkChildDivider(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["divider"]] = None @@ -3562,6 +5399,18 @@ class DocumentDocumentWebsiteChildChunkChildImage(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["image"]] = None @@ -3572,12 +5421,36 @@ class DocumentDocumentWebsiteChildChunkChildLink(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["link"]] = None class DocumentDocumentWebsiteChildChunkChildLineBreak(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["line_break"]] = None @@ -3588,6 +5461,18 @@ class DocumentDocumentWebsiteChildChunkChildText(BaseModel): marks: Optional[List[Literal["bold", "italic", "underline", "strikethrough", "code", "math"]]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["text"]] = None @@ -3602,6 +5487,18 @@ class DocumentDocumentWebsiteChildChunkChildToolCall(BaseModel): args: Optional[Dict[str, object]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["tool_call"]] = None @@ -3618,6 +5515,18 @@ class DocumentDocumentWebsiteChildChunkChildToolResult(BaseModel): is_error: Optional[bool] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["tool_result"]] = None @@ -3630,6 +5539,18 @@ class DocumentDocumentWebsiteChildChunkChildTraceMessage(BaseModel): message_type: Optional[Literal["message", "thinking"]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + role: Optional[Literal["user", "assistant"]] = None timestamp: Optional[datetime] = None @@ -3658,6 +5579,18 @@ class DocumentDocumentWebsiteChildChunk(BaseModel): children: Optional[List[DocumentDocumentWebsiteChildChunkChild]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + text: Optional[str] = None type: Optional[Literal["chunk"]] = None @@ -3670,6 +5603,18 @@ class DocumentDocumentWebsiteChildCode(BaseModel): language: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["code"]] = None @@ -3680,12 +5625,36 @@ class DocumentDocumentWebsiteChildComment(BaseModel): created_at: Optional[datetime] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["comment"]] = None class DocumentDocumentWebsiteChildDivider(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["divider"]] = None @@ -3702,6 +5671,18 @@ class DocumentDocumentWebsiteChildEquationChildBlob(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["blob"]] = None @@ -3712,6 +5693,18 @@ class DocumentDocumentWebsiteChildEquationChildCode(BaseModel): language: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["code"]] = None @@ -3722,12 +5715,36 @@ class DocumentDocumentWebsiteChildEquationChildComment(BaseModel): created_at: Optional[datetime] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["comment"]] = None class DocumentDocumentWebsiteChildEquationChildDivider(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["divider"]] = None @@ -3738,6 +5755,18 @@ class DocumentDocumentWebsiteChildEquationChildImage(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["image"]] = None @@ -3748,12 +5777,36 @@ class DocumentDocumentWebsiteChildEquationChildLink(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["link"]] = None class DocumentDocumentWebsiteChildEquationChildLineBreak(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["line_break"]] = None @@ -3764,6 +5817,18 @@ class DocumentDocumentWebsiteChildEquationChildText(BaseModel): marks: Optional[List[Literal["bold", "italic", "underline", "strikethrough", "code", "math"]]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["text"]] = None @@ -3778,6 +5843,18 @@ class DocumentDocumentWebsiteChildEquationChildToolCall(BaseModel): args: Optional[Dict[str, object]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["tool_call"]] = None @@ -3794,6 +5871,18 @@ class DocumentDocumentWebsiteChildEquationChildToolResult(BaseModel): is_error: Optional[bool] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["tool_result"]] = None @@ -3806,6 +5895,18 @@ class DocumentDocumentWebsiteChildEquationChildTraceMessage(BaseModel): message_type: Optional[Literal["message", "thinking"]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + role: Optional[Literal["user", "assistant"]] = None timestamp: Optional[datetime] = None @@ -3834,6 +5935,18 @@ class DocumentDocumentWebsiteChildEquation(BaseModel): children: Optional[List[DocumentDocumentWebsiteChildEquationChild]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + text: Optional[str] = None type: Optional[Literal["equation"]] = None @@ -3852,6 +5965,18 @@ class DocumentDocumentWebsiteChildFootnoteChildBlob(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["blob"]] = None @@ -3862,6 +5987,18 @@ class DocumentDocumentWebsiteChildFootnoteChildCode(BaseModel): language: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["code"]] = None @@ -3872,12 +6009,36 @@ class DocumentDocumentWebsiteChildFootnoteChildComment(BaseModel): created_at: Optional[datetime] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["comment"]] = None class DocumentDocumentWebsiteChildFootnoteChildDivider(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["divider"]] = None @@ -3888,6 +6049,18 @@ class DocumentDocumentWebsiteChildFootnoteChildImage(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["image"]] = None @@ -3898,12 +6071,36 @@ class DocumentDocumentWebsiteChildFootnoteChildLink(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["link"]] = None class DocumentDocumentWebsiteChildFootnoteChildLineBreak(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["line_break"]] = None @@ -3914,6 +6111,18 @@ class DocumentDocumentWebsiteChildFootnoteChildText(BaseModel): marks: Optional[List[Literal["bold", "italic", "underline", "strikethrough", "code", "math"]]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["text"]] = None @@ -3928,6 +6137,18 @@ class DocumentDocumentWebsiteChildFootnoteChildToolCall(BaseModel): args: Optional[Dict[str, object]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["tool_call"]] = None @@ -3944,6 +6165,18 @@ class DocumentDocumentWebsiteChildFootnoteChildToolResult(BaseModel): is_error: Optional[bool] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["tool_result"]] = None @@ -3956,6 +6189,18 @@ class DocumentDocumentWebsiteChildFootnoteChildTraceMessage(BaseModel): message_type: Optional[Literal["message", "thinking"]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + role: Optional[Literal["user", "assistant"]] = None timestamp: Optional[datetime] = None @@ -3984,6 +6229,18 @@ class DocumentDocumentWebsiteChildFootnote(BaseModel): children: Optional[List[DocumentDocumentWebsiteChildFootnoteChild]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + text: Optional[str] = None type: Optional[Literal["footnote"]] = None @@ -4002,6 +6259,18 @@ class DocumentDocumentWebsiteChildHeadingChildBlob(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["blob"]] = None @@ -4012,6 +6281,18 @@ class DocumentDocumentWebsiteChildHeadingChildCode(BaseModel): language: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["code"]] = None @@ -4022,12 +6303,36 @@ class DocumentDocumentWebsiteChildHeadingChildComment(BaseModel): created_at: Optional[datetime] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["comment"]] = None class DocumentDocumentWebsiteChildHeadingChildDivider(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["divider"]] = None @@ -4038,6 +6343,18 @@ class DocumentDocumentWebsiteChildHeadingChildImage(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["image"]] = None @@ -4048,12 +6365,36 @@ class DocumentDocumentWebsiteChildHeadingChildLink(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["link"]] = None class DocumentDocumentWebsiteChildHeadingChildLineBreak(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["line_break"]] = None @@ -4064,6 +6405,18 @@ class DocumentDocumentWebsiteChildHeadingChildText(BaseModel): marks: Optional[List[Literal["bold", "italic", "underline", "strikethrough", "code", "math"]]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["text"]] = None @@ -4078,6 +6431,18 @@ class DocumentDocumentWebsiteChildHeadingChildToolCall(BaseModel): args: Optional[Dict[str, object]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["tool_call"]] = None @@ -4094,6 +6459,18 @@ class DocumentDocumentWebsiteChildHeadingChildToolResult(BaseModel): is_error: Optional[bool] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["tool_result"]] = None @@ -4106,6 +6483,18 @@ class DocumentDocumentWebsiteChildHeadingChildTraceMessage(BaseModel): message_type: Optional[Literal["message", "thinking"]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + role: Optional[Literal["user", "assistant"]] = None timestamp: Optional[datetime] = None @@ -4136,6 +6525,18 @@ class DocumentDocumentWebsiteChildHeading(BaseModel): children: Optional[List[DocumentDocumentWebsiteChildHeadingChild]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + text: Optional[str] = None type: Optional[Literal["heading"]] = None @@ -4148,6 +6549,18 @@ class DocumentDocumentWebsiteChildImage(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["image"]] = None @@ -4158,12 +6571,36 @@ class DocumentDocumentWebsiteChildLink(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["link"]] = None class DocumentDocumentWebsiteChildLineBreak(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["line_break"]] = None @@ -4172,6 +6609,18 @@ class DocumentDocumentWebsiteChildList(BaseModel): children: Optional[List[object]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + ordered: Optional[bool] = None text: Optional[str] = None @@ -4192,6 +6641,18 @@ class DocumentDocumentWebsiteChildListItemChildBlob(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["blob"]] = None @@ -4202,6 +6663,18 @@ class DocumentDocumentWebsiteChildListItemChildCode(BaseModel): language: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["code"]] = None @@ -4212,12 +6685,36 @@ class DocumentDocumentWebsiteChildListItemChildComment(BaseModel): created_at: Optional[datetime] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["comment"]] = None class DocumentDocumentWebsiteChildListItemChildDivider(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["divider"]] = None @@ -4228,6 +6725,18 @@ class DocumentDocumentWebsiteChildListItemChildImage(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["image"]] = None @@ -4238,12 +6747,36 @@ class DocumentDocumentWebsiteChildListItemChildLink(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["link"]] = None class DocumentDocumentWebsiteChildListItemChildLineBreak(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["line_break"]] = None @@ -4254,6 +6787,18 @@ class DocumentDocumentWebsiteChildListItemChildText(BaseModel): marks: Optional[List[Literal["bold", "italic", "underline", "strikethrough", "code", "math"]]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["text"]] = None @@ -4268,6 +6813,18 @@ class DocumentDocumentWebsiteChildListItemChildToolCall(BaseModel): args: Optional[Dict[str, object]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["tool_call"]] = None @@ -4284,6 +6841,18 @@ class DocumentDocumentWebsiteChildListItemChildToolResult(BaseModel): is_error: Optional[bool] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["tool_result"]] = None @@ -4296,6 +6865,18 @@ class DocumentDocumentWebsiteChildListItemChildTraceMessage(BaseModel): message_type: Optional[Literal["message", "thinking"]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + role: Optional[Literal["user", "assistant"]] = None timestamp: Optional[datetime] = None @@ -4324,6 +6905,18 @@ class DocumentDocumentWebsiteChildListItem(BaseModel): children: Optional[List[DocumentDocumentWebsiteChildListItemChild]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + text: Optional[str] = None type: Optional[Literal["list_item"]] = None @@ -4342,6 +6935,18 @@ class DocumentDocumentWebsiteChildParagraphChildBlob(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["blob"]] = None @@ -4352,6 +6957,18 @@ class DocumentDocumentWebsiteChildParagraphChildCode(BaseModel): language: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["code"]] = None @@ -4362,12 +6979,36 @@ class DocumentDocumentWebsiteChildParagraphChildComment(BaseModel): created_at: Optional[datetime] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["comment"]] = None class DocumentDocumentWebsiteChildParagraphChildDivider(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["divider"]] = None @@ -4378,6 +7019,18 @@ class DocumentDocumentWebsiteChildParagraphChildImage(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["image"]] = None @@ -4388,12 +7041,36 @@ class DocumentDocumentWebsiteChildParagraphChildLink(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["link"]] = None class DocumentDocumentWebsiteChildParagraphChildLineBreak(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["line_break"]] = None @@ -4404,6 +7081,18 @@ class DocumentDocumentWebsiteChildParagraphChildText(BaseModel): marks: Optional[List[Literal["bold", "italic", "underline", "strikethrough", "code", "math"]]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["text"]] = None @@ -4418,6 +7107,18 @@ class DocumentDocumentWebsiteChildParagraphChildToolCall(BaseModel): args: Optional[Dict[str, object]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["tool_call"]] = None @@ -4434,6 +7135,18 @@ class DocumentDocumentWebsiteChildParagraphChildToolResult(BaseModel): is_error: Optional[bool] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["tool_result"]] = None @@ -4446,6 +7159,18 @@ class DocumentDocumentWebsiteChildParagraphChildTraceMessage(BaseModel): message_type: Optional[Literal["message", "thinking"]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + role: Optional[Literal["user", "assistant"]] = None timestamp: Optional[datetime] = None @@ -4474,6 +7199,18 @@ class DocumentDocumentWebsiteChildParagraph(BaseModel): children: Optional[List[DocumentDocumentWebsiteChildParagraphChild]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + text: Optional[str] = None type: Optional[Literal["paragraph"]] = None @@ -4492,6 +7229,18 @@ class DocumentDocumentWebsiteChildQuoteChildBlob(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["blob"]] = None @@ -4502,6 +7251,18 @@ class DocumentDocumentWebsiteChildQuoteChildCode(BaseModel): language: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["code"]] = None @@ -4512,12 +7273,36 @@ class DocumentDocumentWebsiteChildQuoteChildComment(BaseModel): created_at: Optional[datetime] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["comment"]] = None class DocumentDocumentWebsiteChildQuoteChildDivider(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["divider"]] = None @@ -4528,6 +7313,18 @@ class DocumentDocumentWebsiteChildQuoteChildImage(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["image"]] = None @@ -4538,12 +7335,36 @@ class DocumentDocumentWebsiteChildQuoteChildLink(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["link"]] = None class DocumentDocumentWebsiteChildQuoteChildLineBreak(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["line_break"]] = None @@ -4554,6 +7375,18 @@ class DocumentDocumentWebsiteChildQuoteChildText(BaseModel): marks: Optional[List[Literal["bold", "italic", "underline", "strikethrough", "code", "math"]]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["text"]] = None @@ -4568,6 +7401,18 @@ class DocumentDocumentWebsiteChildQuoteChildToolCall(BaseModel): args: Optional[Dict[str, object]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["tool_call"]] = None @@ -4584,6 +7429,18 @@ class DocumentDocumentWebsiteChildQuoteChildToolResult(BaseModel): is_error: Optional[bool] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["tool_result"]] = None @@ -4596,6 +7453,18 @@ class DocumentDocumentWebsiteChildQuoteChildTraceMessage(BaseModel): message_type: Optional[Literal["message", "thinking"]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + role: Optional[Literal["user", "assistant"]] = None timestamp: Optional[datetime] = None @@ -4624,6 +7493,18 @@ class DocumentDocumentWebsiteChildQuote(BaseModel): children: Optional[List[DocumentDocumentWebsiteChildQuoteChild]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + text: Optional[str] = None type: Optional[Literal["quote"]] = None @@ -4637,6 +7518,18 @@ class DocumentDocumentWebsiteChildTable(BaseModel): has_header: Optional[bool] = None """Whether the first row should be treated as a header""" + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + text: Optional[str] = None type: Optional[Literal["table"]] = None @@ -4655,6 +7548,18 @@ class DocumentDocumentWebsiteChildTableCellChildBlob(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["blob"]] = None @@ -4665,6 +7570,18 @@ class DocumentDocumentWebsiteChildTableCellChildCode(BaseModel): language: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["code"]] = None @@ -4675,12 +7592,36 @@ class DocumentDocumentWebsiteChildTableCellChildComment(BaseModel): created_at: Optional[datetime] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["comment"]] = None class DocumentDocumentWebsiteChildTableCellChildDivider(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["divider"]] = None @@ -4691,6 +7632,18 @@ class DocumentDocumentWebsiteChildTableCellChildImage(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["image"]] = None @@ -4701,12 +7654,36 @@ class DocumentDocumentWebsiteChildTableCellChildLink(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["link"]] = None class DocumentDocumentWebsiteChildTableCellChildLineBreak(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["line_break"]] = None @@ -4717,6 +7694,18 @@ class DocumentDocumentWebsiteChildTableCellChildText(BaseModel): marks: Optional[List[Literal["bold", "italic", "underline", "strikethrough", "code", "math"]]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["text"]] = None @@ -4731,6 +7720,18 @@ class DocumentDocumentWebsiteChildTableCellChildToolCall(BaseModel): args: Optional[Dict[str, object]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["tool_call"]] = None @@ -4747,6 +7748,18 @@ class DocumentDocumentWebsiteChildTableCellChildToolResult(BaseModel): is_error: Optional[bool] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["tool_result"]] = None @@ -4759,6 +7772,18 @@ class DocumentDocumentWebsiteChildTableCellChildTraceMessage(BaseModel): message_type: Optional[Literal["message", "thinking"]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + role: Optional[Literal["user", "assistant"]] = None timestamp: Optional[datetime] = None @@ -4789,6 +7814,18 @@ class DocumentDocumentWebsiteChildTableCell(BaseModel): children: Optional[List[DocumentDocumentWebsiteChildTableCellChild]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + text: Optional[str] = None type: Optional[Literal["table_cell"]] = None @@ -4799,6 +7836,18 @@ class DocumentDocumentWebsiteChildTableRow(BaseModel): children: Optional[List[object]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + text: Optional[str] = None type: Optional[Literal["table_row"]] = None @@ -4811,6 +7860,18 @@ class DocumentDocumentWebsiteChildText(BaseModel): marks: Optional[List[Literal["bold", "italic", "underline", "strikethrough", "code", "math"]]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["text"]] = None @@ -4827,6 +7888,18 @@ class DocumentDocumentWebsiteChildToDoChildBlob(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["blob"]] = None @@ -4837,6 +7910,18 @@ class DocumentDocumentWebsiteChildToDoChildCode(BaseModel): language: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["code"]] = None @@ -4847,12 +7932,36 @@ class DocumentDocumentWebsiteChildToDoChildComment(BaseModel): created_at: Optional[datetime] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["comment"]] = None class DocumentDocumentWebsiteChildToDoChildDivider(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["divider"]] = None @@ -4863,6 +7972,18 @@ class DocumentDocumentWebsiteChildToDoChildImage(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["image"]] = None @@ -4873,12 +7994,36 @@ class DocumentDocumentWebsiteChildToDoChildLink(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["link"]] = None class DocumentDocumentWebsiteChildToDoChildLineBreak(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["line_break"]] = None @@ -4889,6 +8034,18 @@ class DocumentDocumentWebsiteChildToDoChildText(BaseModel): marks: Optional[List[Literal["bold", "italic", "underline", "strikethrough", "code", "math"]]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["text"]] = None @@ -4903,6 +8060,18 @@ class DocumentDocumentWebsiteChildToDoChildToolCall(BaseModel): args: Optional[Dict[str, object]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["tool_call"]] = None @@ -4919,6 +8088,18 @@ class DocumentDocumentWebsiteChildToDoChildToolResult(BaseModel): is_error: Optional[bool] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["tool_result"]] = None @@ -4931,6 +8112,18 @@ class DocumentDocumentWebsiteChildToDoChildTraceMessage(BaseModel): message_type: Optional[Literal["message", "thinking"]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + role: Optional[Literal["user", "assistant"]] = None timestamp: Optional[datetime] = None @@ -4961,6 +8154,18 @@ class DocumentDocumentWebsiteChildToDo(BaseModel): children: Optional[List[DocumentDocumentWebsiteChildToDoChild]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + text: Optional[str] = None type: Optional[Literal["todo"]] = None @@ -4977,6 +8182,18 @@ class DocumentDocumentWebsiteChildToolCall(BaseModel): args: Optional[Dict[str, object]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["tool_call"]] = None @@ -4993,6 +8210,18 @@ class DocumentDocumentWebsiteChildToolResult(BaseModel): is_error: Optional[bool] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["tool_result"]] = None @@ -5005,6 +8234,18 @@ class DocumentDocumentWebsiteChildTraceMessage(BaseModel): message_type: Optional[Literal["message", "thinking"]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + role: Optional[Literal["user", "assistant"]] = None timestamp: Optional[datetime] = None @@ -5026,6 +8267,18 @@ class DocumentDocumentWebsiteChildUtterance(BaseModel): end: Optional[float] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + speaker: Optional[object] = None start: Optional[float] = None @@ -5080,6 +8333,18 @@ class DocumentDocumentWebsite(BaseModel): language: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + text: Optional[str] = None title: Optional[str] = None @@ -5100,6 +8365,18 @@ class DocumentDocumentTaskChildBlob(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["blob"]] = None @@ -5116,6 +8393,18 @@ class DocumentDocumentTaskChildCalloutChildBlob(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["blob"]] = None @@ -5126,6 +8415,18 @@ class DocumentDocumentTaskChildCalloutChildCode(BaseModel): language: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["code"]] = None @@ -5136,12 +8437,36 @@ class DocumentDocumentTaskChildCalloutChildComment(BaseModel): created_at: Optional[datetime] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["comment"]] = None class DocumentDocumentTaskChildCalloutChildDivider(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["divider"]] = None @@ -5152,6 +8477,18 @@ class DocumentDocumentTaskChildCalloutChildImage(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["image"]] = None @@ -5162,12 +8499,36 @@ class DocumentDocumentTaskChildCalloutChildLink(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["link"]] = None class DocumentDocumentTaskChildCalloutChildLineBreak(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["line_break"]] = None @@ -5178,6 +8539,18 @@ class DocumentDocumentTaskChildCalloutChildText(BaseModel): marks: Optional[List[Literal["bold", "italic", "underline", "strikethrough", "code", "math"]]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["text"]] = None @@ -5192,6 +8565,18 @@ class DocumentDocumentTaskChildCalloutChildToolCall(BaseModel): args: Optional[Dict[str, object]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["tool_call"]] = None @@ -5208,6 +8593,18 @@ class DocumentDocumentTaskChildCalloutChildToolResult(BaseModel): is_error: Optional[bool] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["tool_result"]] = None @@ -5220,6 +8617,18 @@ class DocumentDocumentTaskChildCalloutChildTraceMessage(BaseModel): message_type: Optional[Literal["message", "thinking"]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + role: Optional[Literal["user", "assistant"]] = None timestamp: Optional[datetime] = None @@ -5248,6 +8657,18 @@ class DocumentDocumentTaskChildCallout(BaseModel): children: Optional[List[DocumentDocumentTaskChildCalloutChild]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + text: Optional[str] = None title: Optional[str] = None @@ -5268,6 +8689,18 @@ class DocumentDocumentTaskChildChunkChildBlob(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["blob"]] = None @@ -5278,6 +8711,18 @@ class DocumentDocumentTaskChildChunkChildCode(BaseModel): language: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["code"]] = None @@ -5288,12 +8733,36 @@ class DocumentDocumentTaskChildChunkChildComment(BaseModel): created_at: Optional[datetime] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["comment"]] = None class DocumentDocumentTaskChildChunkChildDivider(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["divider"]] = None @@ -5304,6 +8773,18 @@ class DocumentDocumentTaskChildChunkChildImage(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["image"]] = None @@ -5314,12 +8795,36 @@ class DocumentDocumentTaskChildChunkChildLink(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["link"]] = None class DocumentDocumentTaskChildChunkChildLineBreak(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["line_break"]] = None @@ -5330,6 +8835,18 @@ class DocumentDocumentTaskChildChunkChildText(BaseModel): marks: Optional[List[Literal["bold", "italic", "underline", "strikethrough", "code", "math"]]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["text"]] = None @@ -5344,6 +8861,18 @@ class DocumentDocumentTaskChildChunkChildToolCall(BaseModel): args: Optional[Dict[str, object]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["tool_call"]] = None @@ -5360,6 +8889,18 @@ class DocumentDocumentTaskChildChunkChildToolResult(BaseModel): is_error: Optional[bool] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["tool_result"]] = None @@ -5372,6 +8913,18 @@ class DocumentDocumentTaskChildChunkChildTraceMessage(BaseModel): message_type: Optional[Literal["message", "thinking"]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + role: Optional[Literal["user", "assistant"]] = None timestamp: Optional[datetime] = None @@ -5400,6 +8953,18 @@ class DocumentDocumentTaskChildChunk(BaseModel): children: Optional[List[DocumentDocumentTaskChildChunkChild]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + text: Optional[str] = None type: Optional[Literal["chunk"]] = None @@ -5412,6 +8977,18 @@ class DocumentDocumentTaskChildCode(BaseModel): language: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["code"]] = None @@ -5422,12 +8999,36 @@ class DocumentDocumentTaskChildComment(BaseModel): created_at: Optional[datetime] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["comment"]] = None class DocumentDocumentTaskChildDivider(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["divider"]] = None @@ -5444,6 +9045,18 @@ class DocumentDocumentTaskChildEquationChildBlob(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["blob"]] = None @@ -5454,6 +9067,18 @@ class DocumentDocumentTaskChildEquationChildCode(BaseModel): language: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["code"]] = None @@ -5464,12 +9089,36 @@ class DocumentDocumentTaskChildEquationChildComment(BaseModel): created_at: Optional[datetime] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["comment"]] = None class DocumentDocumentTaskChildEquationChildDivider(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["divider"]] = None @@ -5480,6 +9129,18 @@ class DocumentDocumentTaskChildEquationChildImage(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["image"]] = None @@ -5490,12 +9151,36 @@ class DocumentDocumentTaskChildEquationChildLink(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["link"]] = None class DocumentDocumentTaskChildEquationChildLineBreak(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["line_break"]] = None @@ -5506,6 +9191,18 @@ class DocumentDocumentTaskChildEquationChildText(BaseModel): marks: Optional[List[Literal["bold", "italic", "underline", "strikethrough", "code", "math"]]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["text"]] = None @@ -5520,6 +9217,18 @@ class DocumentDocumentTaskChildEquationChildToolCall(BaseModel): args: Optional[Dict[str, object]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["tool_call"]] = None @@ -5536,6 +9245,18 @@ class DocumentDocumentTaskChildEquationChildToolResult(BaseModel): is_error: Optional[bool] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["tool_result"]] = None @@ -5548,6 +9269,18 @@ class DocumentDocumentTaskChildEquationChildTraceMessage(BaseModel): message_type: Optional[Literal["message", "thinking"]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + role: Optional[Literal["user", "assistant"]] = None timestamp: Optional[datetime] = None @@ -5576,6 +9309,18 @@ class DocumentDocumentTaskChildEquation(BaseModel): children: Optional[List[DocumentDocumentTaskChildEquationChild]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + text: Optional[str] = None type: Optional[Literal["equation"]] = None @@ -5594,6 +9339,18 @@ class DocumentDocumentTaskChildFootnoteChildBlob(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["blob"]] = None @@ -5604,6 +9361,18 @@ class DocumentDocumentTaskChildFootnoteChildCode(BaseModel): language: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["code"]] = None @@ -5614,12 +9383,36 @@ class DocumentDocumentTaskChildFootnoteChildComment(BaseModel): created_at: Optional[datetime] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["comment"]] = None class DocumentDocumentTaskChildFootnoteChildDivider(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["divider"]] = None @@ -5630,6 +9423,18 @@ class DocumentDocumentTaskChildFootnoteChildImage(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["image"]] = None @@ -5640,12 +9445,36 @@ class DocumentDocumentTaskChildFootnoteChildLink(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["link"]] = None class DocumentDocumentTaskChildFootnoteChildLineBreak(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["line_break"]] = None @@ -5656,6 +9485,18 @@ class DocumentDocumentTaskChildFootnoteChildText(BaseModel): marks: Optional[List[Literal["bold", "italic", "underline", "strikethrough", "code", "math"]]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["text"]] = None @@ -5670,6 +9511,18 @@ class DocumentDocumentTaskChildFootnoteChildToolCall(BaseModel): args: Optional[Dict[str, object]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["tool_call"]] = None @@ -5686,6 +9539,18 @@ class DocumentDocumentTaskChildFootnoteChildToolResult(BaseModel): is_error: Optional[bool] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["tool_result"]] = None @@ -5698,6 +9563,18 @@ class DocumentDocumentTaskChildFootnoteChildTraceMessage(BaseModel): message_type: Optional[Literal["message", "thinking"]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + role: Optional[Literal["user", "assistant"]] = None timestamp: Optional[datetime] = None @@ -5726,6 +9603,18 @@ class DocumentDocumentTaskChildFootnote(BaseModel): children: Optional[List[DocumentDocumentTaskChildFootnoteChild]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + text: Optional[str] = None type: Optional[Literal["footnote"]] = None @@ -5744,6 +9633,18 @@ class DocumentDocumentTaskChildHeadingChildBlob(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["blob"]] = None @@ -5754,6 +9655,18 @@ class DocumentDocumentTaskChildHeadingChildCode(BaseModel): language: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["code"]] = None @@ -5764,12 +9677,36 @@ class DocumentDocumentTaskChildHeadingChildComment(BaseModel): created_at: Optional[datetime] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["comment"]] = None class DocumentDocumentTaskChildHeadingChildDivider(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["divider"]] = None @@ -5780,6 +9717,18 @@ class DocumentDocumentTaskChildHeadingChildImage(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["image"]] = None @@ -5790,12 +9739,36 @@ class DocumentDocumentTaskChildHeadingChildLink(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["link"]] = None class DocumentDocumentTaskChildHeadingChildLineBreak(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["line_break"]] = None @@ -5806,6 +9779,18 @@ class DocumentDocumentTaskChildHeadingChildText(BaseModel): marks: Optional[List[Literal["bold", "italic", "underline", "strikethrough", "code", "math"]]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["text"]] = None @@ -5820,6 +9805,18 @@ class DocumentDocumentTaskChildHeadingChildToolCall(BaseModel): args: Optional[Dict[str, object]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["tool_call"]] = None @@ -5836,6 +9833,18 @@ class DocumentDocumentTaskChildHeadingChildToolResult(BaseModel): is_error: Optional[bool] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["tool_result"]] = None @@ -5848,6 +9857,18 @@ class DocumentDocumentTaskChildHeadingChildTraceMessage(BaseModel): message_type: Optional[Literal["message", "thinking"]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + role: Optional[Literal["user", "assistant"]] = None timestamp: Optional[datetime] = None @@ -5878,6 +9899,18 @@ class DocumentDocumentTaskChildHeading(BaseModel): children: Optional[List[DocumentDocumentTaskChildHeadingChild]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + text: Optional[str] = None type: Optional[Literal["heading"]] = None @@ -5890,6 +9923,18 @@ class DocumentDocumentTaskChildImage(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["image"]] = None @@ -5900,12 +9945,36 @@ class DocumentDocumentTaskChildLink(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["link"]] = None class DocumentDocumentTaskChildLineBreak(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["line_break"]] = None @@ -5914,6 +9983,18 @@ class DocumentDocumentTaskChildList(BaseModel): children: Optional[List[object]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + ordered: Optional[bool] = None text: Optional[str] = None @@ -5934,6 +10015,18 @@ class DocumentDocumentTaskChildListItemChildBlob(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["blob"]] = None @@ -5944,6 +10037,18 @@ class DocumentDocumentTaskChildListItemChildCode(BaseModel): language: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["code"]] = None @@ -5954,12 +10059,36 @@ class DocumentDocumentTaskChildListItemChildComment(BaseModel): created_at: Optional[datetime] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["comment"]] = None class DocumentDocumentTaskChildListItemChildDivider(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["divider"]] = None @@ -5970,6 +10099,18 @@ class DocumentDocumentTaskChildListItemChildImage(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["image"]] = None @@ -5980,12 +10121,36 @@ class DocumentDocumentTaskChildListItemChildLink(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["link"]] = None class DocumentDocumentTaskChildListItemChildLineBreak(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["line_break"]] = None @@ -5996,6 +10161,18 @@ class DocumentDocumentTaskChildListItemChildText(BaseModel): marks: Optional[List[Literal["bold", "italic", "underline", "strikethrough", "code", "math"]]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["text"]] = None @@ -6010,6 +10187,18 @@ class DocumentDocumentTaskChildListItemChildToolCall(BaseModel): args: Optional[Dict[str, object]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["tool_call"]] = None @@ -6026,6 +10215,18 @@ class DocumentDocumentTaskChildListItemChildToolResult(BaseModel): is_error: Optional[bool] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["tool_result"]] = None @@ -6038,6 +10239,18 @@ class DocumentDocumentTaskChildListItemChildTraceMessage(BaseModel): message_type: Optional[Literal["message", "thinking"]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + role: Optional[Literal["user", "assistant"]] = None timestamp: Optional[datetime] = None @@ -6066,6 +10279,18 @@ class DocumentDocumentTaskChildListItem(BaseModel): children: Optional[List[DocumentDocumentTaskChildListItemChild]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + text: Optional[str] = None type: Optional[Literal["list_item"]] = None @@ -6084,6 +10309,18 @@ class DocumentDocumentTaskChildParagraphChildBlob(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["blob"]] = None @@ -6094,6 +10331,18 @@ class DocumentDocumentTaskChildParagraphChildCode(BaseModel): language: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["code"]] = None @@ -6104,12 +10353,36 @@ class DocumentDocumentTaskChildParagraphChildComment(BaseModel): created_at: Optional[datetime] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["comment"]] = None class DocumentDocumentTaskChildParagraphChildDivider(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["divider"]] = None @@ -6120,6 +10393,18 @@ class DocumentDocumentTaskChildParagraphChildImage(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["image"]] = None @@ -6130,12 +10415,36 @@ class DocumentDocumentTaskChildParagraphChildLink(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["link"]] = None class DocumentDocumentTaskChildParagraphChildLineBreak(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["line_break"]] = None @@ -6146,6 +10455,18 @@ class DocumentDocumentTaskChildParagraphChildText(BaseModel): marks: Optional[List[Literal["bold", "italic", "underline", "strikethrough", "code", "math"]]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["text"]] = None @@ -6160,6 +10481,18 @@ class DocumentDocumentTaskChildParagraphChildToolCall(BaseModel): args: Optional[Dict[str, object]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["tool_call"]] = None @@ -6176,6 +10509,18 @@ class DocumentDocumentTaskChildParagraphChildToolResult(BaseModel): is_error: Optional[bool] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["tool_result"]] = None @@ -6188,6 +10533,18 @@ class DocumentDocumentTaskChildParagraphChildTraceMessage(BaseModel): message_type: Optional[Literal["message", "thinking"]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + role: Optional[Literal["user", "assistant"]] = None timestamp: Optional[datetime] = None @@ -6216,6 +10573,18 @@ class DocumentDocumentTaskChildParagraph(BaseModel): children: Optional[List[DocumentDocumentTaskChildParagraphChild]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + text: Optional[str] = None type: Optional[Literal["paragraph"]] = None @@ -6234,6 +10603,18 @@ class DocumentDocumentTaskChildQuoteChildBlob(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["blob"]] = None @@ -6244,6 +10625,18 @@ class DocumentDocumentTaskChildQuoteChildCode(BaseModel): language: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["code"]] = None @@ -6254,12 +10647,36 @@ class DocumentDocumentTaskChildQuoteChildComment(BaseModel): created_at: Optional[datetime] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["comment"]] = None class DocumentDocumentTaskChildQuoteChildDivider(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["divider"]] = None @@ -6270,6 +10687,18 @@ class DocumentDocumentTaskChildQuoteChildImage(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["image"]] = None @@ -6280,12 +10709,36 @@ class DocumentDocumentTaskChildQuoteChildLink(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["link"]] = None class DocumentDocumentTaskChildQuoteChildLineBreak(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["line_break"]] = None @@ -6296,6 +10749,18 @@ class DocumentDocumentTaskChildQuoteChildText(BaseModel): marks: Optional[List[Literal["bold", "italic", "underline", "strikethrough", "code", "math"]]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["text"]] = None @@ -6310,6 +10775,18 @@ class DocumentDocumentTaskChildQuoteChildToolCall(BaseModel): args: Optional[Dict[str, object]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["tool_call"]] = None @@ -6326,6 +10803,18 @@ class DocumentDocumentTaskChildQuoteChildToolResult(BaseModel): is_error: Optional[bool] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["tool_result"]] = None @@ -6338,6 +10827,18 @@ class DocumentDocumentTaskChildQuoteChildTraceMessage(BaseModel): message_type: Optional[Literal["message", "thinking"]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + role: Optional[Literal["user", "assistant"]] = None timestamp: Optional[datetime] = None @@ -6366,6 +10867,18 @@ class DocumentDocumentTaskChildQuote(BaseModel): children: Optional[List[DocumentDocumentTaskChildQuoteChild]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + text: Optional[str] = None type: Optional[Literal["quote"]] = None @@ -6379,6 +10892,18 @@ class DocumentDocumentTaskChildTable(BaseModel): has_header: Optional[bool] = None """Whether the first row should be treated as a header""" + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + text: Optional[str] = None type: Optional[Literal["table"]] = None @@ -6397,6 +10922,18 @@ class DocumentDocumentTaskChildTableCellChildBlob(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["blob"]] = None @@ -6407,6 +10944,18 @@ class DocumentDocumentTaskChildTableCellChildCode(BaseModel): language: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["code"]] = None @@ -6417,12 +10966,36 @@ class DocumentDocumentTaskChildTableCellChildComment(BaseModel): created_at: Optional[datetime] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["comment"]] = None class DocumentDocumentTaskChildTableCellChildDivider(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["divider"]] = None @@ -6433,6 +11006,18 @@ class DocumentDocumentTaskChildTableCellChildImage(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["image"]] = None @@ -6443,12 +11028,36 @@ class DocumentDocumentTaskChildTableCellChildLink(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["link"]] = None class DocumentDocumentTaskChildTableCellChildLineBreak(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["line_break"]] = None @@ -6459,6 +11068,18 @@ class DocumentDocumentTaskChildTableCellChildText(BaseModel): marks: Optional[List[Literal["bold", "italic", "underline", "strikethrough", "code", "math"]]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["text"]] = None @@ -6473,6 +11094,18 @@ class DocumentDocumentTaskChildTableCellChildToolCall(BaseModel): args: Optional[Dict[str, object]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["tool_call"]] = None @@ -6489,6 +11122,18 @@ class DocumentDocumentTaskChildTableCellChildToolResult(BaseModel): is_error: Optional[bool] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["tool_result"]] = None @@ -6501,6 +11146,18 @@ class DocumentDocumentTaskChildTableCellChildTraceMessage(BaseModel): message_type: Optional[Literal["message", "thinking"]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + role: Optional[Literal["user", "assistant"]] = None timestamp: Optional[datetime] = None @@ -6531,6 +11188,18 @@ class DocumentDocumentTaskChildTableCell(BaseModel): children: Optional[List[DocumentDocumentTaskChildTableCellChild]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + text: Optional[str] = None type: Optional[Literal["table_cell"]] = None @@ -6541,6 +11210,18 @@ class DocumentDocumentTaskChildTableRow(BaseModel): children: Optional[List[object]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + text: Optional[str] = None type: Optional[Literal["table_row"]] = None @@ -6553,6 +11234,18 @@ class DocumentDocumentTaskChildText(BaseModel): marks: Optional[List[Literal["bold", "italic", "underline", "strikethrough", "code", "math"]]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["text"]] = None @@ -6569,6 +11262,18 @@ class DocumentDocumentTaskChildToDoChildBlob(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["blob"]] = None @@ -6579,6 +11284,18 @@ class DocumentDocumentTaskChildToDoChildCode(BaseModel): language: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["code"]] = None @@ -6589,12 +11306,36 @@ class DocumentDocumentTaskChildToDoChildComment(BaseModel): created_at: Optional[datetime] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["comment"]] = None class DocumentDocumentTaskChildToDoChildDivider(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["divider"]] = None @@ -6605,6 +11346,18 @@ class DocumentDocumentTaskChildToDoChildImage(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["image"]] = None @@ -6615,12 +11368,36 @@ class DocumentDocumentTaskChildToDoChildLink(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["link"]] = None class DocumentDocumentTaskChildToDoChildLineBreak(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["line_break"]] = None @@ -6631,6 +11408,18 @@ class DocumentDocumentTaskChildToDoChildText(BaseModel): marks: Optional[List[Literal["bold", "italic", "underline", "strikethrough", "code", "math"]]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["text"]] = None @@ -6645,6 +11434,18 @@ class DocumentDocumentTaskChildToDoChildToolCall(BaseModel): args: Optional[Dict[str, object]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["tool_call"]] = None @@ -6661,6 +11462,18 @@ class DocumentDocumentTaskChildToDoChildToolResult(BaseModel): is_error: Optional[bool] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["tool_result"]] = None @@ -6673,6 +11486,18 @@ class DocumentDocumentTaskChildToDoChildTraceMessage(BaseModel): message_type: Optional[Literal["message", "thinking"]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + role: Optional[Literal["user", "assistant"]] = None timestamp: Optional[datetime] = None @@ -6703,6 +11528,18 @@ class DocumentDocumentTaskChildToDo(BaseModel): children: Optional[List[DocumentDocumentTaskChildToDoChild]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + text: Optional[str] = None type: Optional[Literal["todo"]] = None @@ -6719,6 +11556,18 @@ class DocumentDocumentTaskChildToolCall(BaseModel): args: Optional[Dict[str, object]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["tool_call"]] = None @@ -6735,6 +11584,18 @@ class DocumentDocumentTaskChildToolResult(BaseModel): is_error: Optional[bool] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["tool_result"]] = None @@ -6747,6 +11608,18 @@ class DocumentDocumentTaskChildTraceMessage(BaseModel): message_type: Optional[Literal["message", "thinking"]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + role: Optional[Literal["user", "assistant"]] = None timestamp: Optional[datetime] = None @@ -6768,6 +11641,18 @@ class DocumentDocumentTaskChildUtterance(BaseModel): end: Optional[float] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + speaker: Optional[object] = None start: Optional[float] = None @@ -6820,6 +11705,18 @@ class DocumentDocumentTaskCommentSenderChildBlob(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["blob"]] = None @@ -6830,6 +11727,18 @@ class DocumentDocumentTaskCommentSenderChildCode(BaseModel): language: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["code"]] = None @@ -6840,12 +11749,36 @@ class DocumentDocumentTaskCommentSenderChildComment(BaseModel): created_at: Optional[datetime] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["comment"]] = None class DocumentDocumentTaskCommentSenderChildDivider(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["divider"]] = None @@ -6856,6 +11789,18 @@ class DocumentDocumentTaskCommentSenderChildImage(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["image"]] = None @@ -6866,12 +11811,36 @@ class DocumentDocumentTaskCommentSenderChildLink(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["link"]] = None class DocumentDocumentTaskCommentSenderChildLineBreak(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["line_break"]] = None @@ -6882,6 +11851,18 @@ class DocumentDocumentTaskCommentSenderChildText(BaseModel): marks: Optional[List[Literal["bold", "italic", "underline", "strikethrough", "code", "math"]]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["text"]] = None @@ -6896,6 +11877,18 @@ class DocumentDocumentTaskCommentSenderChildToolCall(BaseModel): args: Optional[Dict[str, object]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["tool_call"]] = None @@ -6912,6 +11905,18 @@ class DocumentDocumentTaskCommentSenderChildToolResult(BaseModel): is_error: Optional[bool] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["tool_result"]] = None @@ -6924,6 +11929,18 @@ class DocumentDocumentTaskCommentSenderChildTraceMessage(BaseModel): message_type: Optional[Literal["message", "thinking"]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + role: Optional[Literal["user", "assistant"]] = None timestamp: Optional[datetime] = None @@ -6975,6 +11992,18 @@ class DocumentDocumentTaskCommentSender(BaseModel): link_urls: Optional[List[str]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + name: Optional[str] = None phone_numbers: Optional[List[str]] = None @@ -7001,6 +12030,18 @@ class DocumentDocumentTaskCommentChildBlob(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["blob"]] = None @@ -7017,6 +12058,18 @@ class DocumentDocumentTaskCommentChildCalloutChildBlob(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["blob"]] = None @@ -7027,6 +12080,18 @@ class DocumentDocumentTaskCommentChildCalloutChildCode(BaseModel): language: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["code"]] = None @@ -7037,12 +12102,36 @@ class DocumentDocumentTaskCommentChildCalloutChildComment(BaseModel): created_at: Optional[datetime] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["comment"]] = None class DocumentDocumentTaskCommentChildCalloutChildDivider(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["divider"]] = None @@ -7053,6 +12142,18 @@ class DocumentDocumentTaskCommentChildCalloutChildImage(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["image"]] = None @@ -7063,12 +12164,36 @@ class DocumentDocumentTaskCommentChildCalloutChildLink(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["link"]] = None class DocumentDocumentTaskCommentChildCalloutChildLineBreak(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["line_break"]] = None @@ -7079,6 +12204,18 @@ class DocumentDocumentTaskCommentChildCalloutChildText(BaseModel): marks: Optional[List[Literal["bold", "italic", "underline", "strikethrough", "code", "math"]]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["text"]] = None @@ -7093,6 +12230,18 @@ class DocumentDocumentTaskCommentChildCalloutChildToolCall(BaseModel): args: Optional[Dict[str, object]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["tool_call"]] = None @@ -7109,6 +12258,18 @@ class DocumentDocumentTaskCommentChildCalloutChildToolResult(BaseModel): is_error: Optional[bool] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["tool_result"]] = None @@ -7121,6 +12282,18 @@ class DocumentDocumentTaskCommentChildCalloutChildTraceMessage(BaseModel): message_type: Optional[Literal["message", "thinking"]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + role: Optional[Literal["user", "assistant"]] = None timestamp: Optional[datetime] = None @@ -7149,6 +12322,18 @@ class DocumentDocumentTaskCommentChildCallout(BaseModel): children: Optional[List[DocumentDocumentTaskCommentChildCalloutChild]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + text: Optional[str] = None title: Optional[str] = None @@ -7169,6 +12354,18 @@ class DocumentDocumentTaskCommentChildChunkChildBlob(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["blob"]] = None @@ -7179,6 +12376,18 @@ class DocumentDocumentTaskCommentChildChunkChildCode(BaseModel): language: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["code"]] = None @@ -7189,12 +12398,36 @@ class DocumentDocumentTaskCommentChildChunkChildComment(BaseModel): created_at: Optional[datetime] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["comment"]] = None class DocumentDocumentTaskCommentChildChunkChildDivider(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["divider"]] = None @@ -7205,6 +12438,18 @@ class DocumentDocumentTaskCommentChildChunkChildImage(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["image"]] = None @@ -7215,12 +12460,36 @@ class DocumentDocumentTaskCommentChildChunkChildLink(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["link"]] = None class DocumentDocumentTaskCommentChildChunkChildLineBreak(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["line_break"]] = None @@ -7231,6 +12500,18 @@ class DocumentDocumentTaskCommentChildChunkChildText(BaseModel): marks: Optional[List[Literal["bold", "italic", "underline", "strikethrough", "code", "math"]]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["text"]] = None @@ -7245,6 +12526,18 @@ class DocumentDocumentTaskCommentChildChunkChildToolCall(BaseModel): args: Optional[Dict[str, object]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["tool_call"]] = None @@ -7261,6 +12554,18 @@ class DocumentDocumentTaskCommentChildChunkChildToolResult(BaseModel): is_error: Optional[bool] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["tool_result"]] = None @@ -7273,6 +12578,18 @@ class DocumentDocumentTaskCommentChildChunkChildTraceMessage(BaseModel): message_type: Optional[Literal["message", "thinking"]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + role: Optional[Literal["user", "assistant"]] = None timestamp: Optional[datetime] = None @@ -7301,6 +12618,18 @@ class DocumentDocumentTaskCommentChildChunk(BaseModel): children: Optional[List[DocumentDocumentTaskCommentChildChunkChild]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + text: Optional[str] = None type: Optional[Literal["chunk"]] = None @@ -7313,6 +12642,18 @@ class DocumentDocumentTaskCommentChildCode(BaseModel): language: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["code"]] = None @@ -7323,12 +12664,36 @@ class DocumentDocumentTaskCommentChildComment(BaseModel): created_at: Optional[datetime] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["comment"]] = None class DocumentDocumentTaskCommentChildDivider(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["divider"]] = None @@ -7345,6 +12710,18 @@ class DocumentDocumentTaskCommentChildEquationChildBlob(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["blob"]] = None @@ -7355,6 +12732,18 @@ class DocumentDocumentTaskCommentChildEquationChildCode(BaseModel): language: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["code"]] = None @@ -7365,12 +12754,36 @@ class DocumentDocumentTaskCommentChildEquationChildComment(BaseModel): created_at: Optional[datetime] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["comment"]] = None class DocumentDocumentTaskCommentChildEquationChildDivider(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["divider"]] = None @@ -7381,6 +12794,18 @@ class DocumentDocumentTaskCommentChildEquationChildImage(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["image"]] = None @@ -7391,12 +12816,36 @@ class DocumentDocumentTaskCommentChildEquationChildLink(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["link"]] = None class DocumentDocumentTaskCommentChildEquationChildLineBreak(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["line_break"]] = None @@ -7407,6 +12856,18 @@ class DocumentDocumentTaskCommentChildEquationChildText(BaseModel): marks: Optional[List[Literal["bold", "italic", "underline", "strikethrough", "code", "math"]]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["text"]] = None @@ -7421,6 +12882,18 @@ class DocumentDocumentTaskCommentChildEquationChildToolCall(BaseModel): args: Optional[Dict[str, object]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["tool_call"]] = None @@ -7437,6 +12910,18 @@ class DocumentDocumentTaskCommentChildEquationChildToolResult(BaseModel): is_error: Optional[bool] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["tool_result"]] = None @@ -7449,6 +12934,18 @@ class DocumentDocumentTaskCommentChildEquationChildTraceMessage(BaseModel): message_type: Optional[Literal["message", "thinking"]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + role: Optional[Literal["user", "assistant"]] = None timestamp: Optional[datetime] = None @@ -7477,6 +12974,18 @@ class DocumentDocumentTaskCommentChildEquation(BaseModel): children: Optional[List[DocumentDocumentTaskCommentChildEquationChild]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + text: Optional[str] = None type: Optional[Literal["equation"]] = None @@ -7495,6 +13004,18 @@ class DocumentDocumentTaskCommentChildFootnoteChildBlob(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["blob"]] = None @@ -7505,6 +13026,18 @@ class DocumentDocumentTaskCommentChildFootnoteChildCode(BaseModel): language: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["code"]] = None @@ -7515,12 +13048,36 @@ class DocumentDocumentTaskCommentChildFootnoteChildComment(BaseModel): created_at: Optional[datetime] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["comment"]] = None class DocumentDocumentTaskCommentChildFootnoteChildDivider(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["divider"]] = None @@ -7531,6 +13088,18 @@ class DocumentDocumentTaskCommentChildFootnoteChildImage(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["image"]] = None @@ -7541,12 +13110,36 @@ class DocumentDocumentTaskCommentChildFootnoteChildLink(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["link"]] = None class DocumentDocumentTaskCommentChildFootnoteChildLineBreak(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["line_break"]] = None @@ -7557,6 +13150,18 @@ class DocumentDocumentTaskCommentChildFootnoteChildText(BaseModel): marks: Optional[List[Literal["bold", "italic", "underline", "strikethrough", "code", "math"]]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["text"]] = None @@ -7571,6 +13176,18 @@ class DocumentDocumentTaskCommentChildFootnoteChildToolCall(BaseModel): args: Optional[Dict[str, object]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["tool_call"]] = None @@ -7587,6 +13204,18 @@ class DocumentDocumentTaskCommentChildFootnoteChildToolResult(BaseModel): is_error: Optional[bool] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["tool_result"]] = None @@ -7599,6 +13228,18 @@ class DocumentDocumentTaskCommentChildFootnoteChildTraceMessage(BaseModel): message_type: Optional[Literal["message", "thinking"]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + role: Optional[Literal["user", "assistant"]] = None timestamp: Optional[datetime] = None @@ -7627,6 +13268,18 @@ class DocumentDocumentTaskCommentChildFootnote(BaseModel): children: Optional[List[DocumentDocumentTaskCommentChildFootnoteChild]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + text: Optional[str] = None type: Optional[Literal["footnote"]] = None @@ -7645,6 +13298,18 @@ class DocumentDocumentTaskCommentChildHeadingChildBlob(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["blob"]] = None @@ -7655,6 +13320,18 @@ class DocumentDocumentTaskCommentChildHeadingChildCode(BaseModel): language: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["code"]] = None @@ -7665,12 +13342,36 @@ class DocumentDocumentTaskCommentChildHeadingChildComment(BaseModel): created_at: Optional[datetime] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["comment"]] = None class DocumentDocumentTaskCommentChildHeadingChildDivider(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["divider"]] = None @@ -7681,6 +13382,18 @@ class DocumentDocumentTaskCommentChildHeadingChildImage(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["image"]] = None @@ -7691,12 +13404,36 @@ class DocumentDocumentTaskCommentChildHeadingChildLink(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["link"]] = None class DocumentDocumentTaskCommentChildHeadingChildLineBreak(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["line_break"]] = None @@ -7707,6 +13444,18 @@ class DocumentDocumentTaskCommentChildHeadingChildText(BaseModel): marks: Optional[List[Literal["bold", "italic", "underline", "strikethrough", "code", "math"]]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["text"]] = None @@ -7721,6 +13470,18 @@ class DocumentDocumentTaskCommentChildHeadingChildToolCall(BaseModel): args: Optional[Dict[str, object]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["tool_call"]] = None @@ -7737,6 +13498,18 @@ class DocumentDocumentTaskCommentChildHeadingChildToolResult(BaseModel): is_error: Optional[bool] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["tool_result"]] = None @@ -7749,6 +13522,18 @@ class DocumentDocumentTaskCommentChildHeadingChildTraceMessage(BaseModel): message_type: Optional[Literal["message", "thinking"]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + role: Optional[Literal["user", "assistant"]] = None timestamp: Optional[datetime] = None @@ -7779,6 +13564,18 @@ class DocumentDocumentTaskCommentChildHeading(BaseModel): children: Optional[List[DocumentDocumentTaskCommentChildHeadingChild]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + text: Optional[str] = None type: Optional[Literal["heading"]] = None @@ -7791,6 +13588,18 @@ class DocumentDocumentTaskCommentChildImage(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["image"]] = None @@ -7801,12 +13610,36 @@ class DocumentDocumentTaskCommentChildLink(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["link"]] = None class DocumentDocumentTaskCommentChildLineBreak(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["line_break"]] = None @@ -7815,6 +13648,18 @@ class DocumentDocumentTaskCommentChildList(BaseModel): children: Optional[List[object]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + ordered: Optional[bool] = None text: Optional[str] = None @@ -7835,6 +13680,18 @@ class DocumentDocumentTaskCommentChildListItemChildBlob(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["blob"]] = None @@ -7845,6 +13702,18 @@ class DocumentDocumentTaskCommentChildListItemChildCode(BaseModel): language: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["code"]] = None @@ -7855,12 +13724,36 @@ class DocumentDocumentTaskCommentChildListItemChildComment(BaseModel): created_at: Optional[datetime] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["comment"]] = None class DocumentDocumentTaskCommentChildListItemChildDivider(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["divider"]] = None @@ -7871,6 +13764,18 @@ class DocumentDocumentTaskCommentChildListItemChildImage(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["image"]] = None @@ -7881,12 +13786,36 @@ class DocumentDocumentTaskCommentChildListItemChildLink(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["link"]] = None class DocumentDocumentTaskCommentChildListItemChildLineBreak(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["line_break"]] = None @@ -7897,6 +13826,18 @@ class DocumentDocumentTaskCommentChildListItemChildText(BaseModel): marks: Optional[List[Literal["bold", "italic", "underline", "strikethrough", "code", "math"]]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["text"]] = None @@ -7911,6 +13852,18 @@ class DocumentDocumentTaskCommentChildListItemChildToolCall(BaseModel): args: Optional[Dict[str, object]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["tool_call"]] = None @@ -7927,6 +13880,18 @@ class DocumentDocumentTaskCommentChildListItemChildToolResult(BaseModel): is_error: Optional[bool] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["tool_result"]] = None @@ -7939,6 +13904,18 @@ class DocumentDocumentTaskCommentChildListItemChildTraceMessage(BaseModel): message_type: Optional[Literal["message", "thinking"]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + role: Optional[Literal["user", "assistant"]] = None timestamp: Optional[datetime] = None @@ -7967,6 +13944,18 @@ class DocumentDocumentTaskCommentChildListItem(BaseModel): children: Optional[List[DocumentDocumentTaskCommentChildListItemChild]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + text: Optional[str] = None type: Optional[Literal["list_item"]] = None @@ -7985,6 +13974,18 @@ class DocumentDocumentTaskCommentChildParagraphChildBlob(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["blob"]] = None @@ -7995,6 +13996,18 @@ class DocumentDocumentTaskCommentChildParagraphChildCode(BaseModel): language: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["code"]] = None @@ -8005,12 +14018,36 @@ class DocumentDocumentTaskCommentChildParagraphChildComment(BaseModel): created_at: Optional[datetime] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["comment"]] = None class DocumentDocumentTaskCommentChildParagraphChildDivider(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["divider"]] = None @@ -8021,6 +14058,18 @@ class DocumentDocumentTaskCommentChildParagraphChildImage(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["image"]] = None @@ -8031,12 +14080,36 @@ class DocumentDocumentTaskCommentChildParagraphChildLink(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["link"]] = None class DocumentDocumentTaskCommentChildParagraphChildLineBreak(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["line_break"]] = None @@ -8047,6 +14120,18 @@ class DocumentDocumentTaskCommentChildParagraphChildText(BaseModel): marks: Optional[List[Literal["bold", "italic", "underline", "strikethrough", "code", "math"]]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["text"]] = None @@ -8061,6 +14146,18 @@ class DocumentDocumentTaskCommentChildParagraphChildToolCall(BaseModel): args: Optional[Dict[str, object]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["tool_call"]] = None @@ -8077,6 +14174,18 @@ class DocumentDocumentTaskCommentChildParagraphChildToolResult(BaseModel): is_error: Optional[bool] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["tool_result"]] = None @@ -8089,6 +14198,18 @@ class DocumentDocumentTaskCommentChildParagraphChildTraceMessage(BaseModel): message_type: Optional[Literal["message", "thinking"]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + role: Optional[Literal["user", "assistant"]] = None timestamp: Optional[datetime] = None @@ -8117,6 +14238,18 @@ class DocumentDocumentTaskCommentChildParagraph(BaseModel): children: Optional[List[DocumentDocumentTaskCommentChildParagraphChild]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + text: Optional[str] = None type: Optional[Literal["paragraph"]] = None @@ -8135,6 +14268,18 @@ class DocumentDocumentTaskCommentChildQuoteChildBlob(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["blob"]] = None @@ -8145,6 +14290,18 @@ class DocumentDocumentTaskCommentChildQuoteChildCode(BaseModel): language: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["code"]] = None @@ -8155,12 +14312,36 @@ class DocumentDocumentTaskCommentChildQuoteChildComment(BaseModel): created_at: Optional[datetime] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["comment"]] = None class DocumentDocumentTaskCommentChildQuoteChildDivider(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["divider"]] = None @@ -8171,6 +14352,18 @@ class DocumentDocumentTaskCommentChildQuoteChildImage(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["image"]] = None @@ -8181,12 +14374,36 @@ class DocumentDocumentTaskCommentChildQuoteChildLink(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["link"]] = None class DocumentDocumentTaskCommentChildQuoteChildLineBreak(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["line_break"]] = None @@ -8197,6 +14414,18 @@ class DocumentDocumentTaskCommentChildQuoteChildText(BaseModel): marks: Optional[List[Literal["bold", "italic", "underline", "strikethrough", "code", "math"]]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["text"]] = None @@ -8211,6 +14440,18 @@ class DocumentDocumentTaskCommentChildQuoteChildToolCall(BaseModel): args: Optional[Dict[str, object]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["tool_call"]] = None @@ -8227,6 +14468,18 @@ class DocumentDocumentTaskCommentChildQuoteChildToolResult(BaseModel): is_error: Optional[bool] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["tool_result"]] = None @@ -8239,6 +14492,18 @@ class DocumentDocumentTaskCommentChildQuoteChildTraceMessage(BaseModel): message_type: Optional[Literal["message", "thinking"]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + role: Optional[Literal["user", "assistant"]] = None timestamp: Optional[datetime] = None @@ -8267,6 +14532,18 @@ class DocumentDocumentTaskCommentChildQuote(BaseModel): children: Optional[List[DocumentDocumentTaskCommentChildQuoteChild]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + text: Optional[str] = None type: Optional[Literal["quote"]] = None @@ -8280,6 +14557,18 @@ class DocumentDocumentTaskCommentChildTable(BaseModel): has_header: Optional[bool] = None """Whether the first row should be treated as a header""" + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + text: Optional[str] = None type: Optional[Literal["table"]] = None @@ -8298,6 +14587,18 @@ class DocumentDocumentTaskCommentChildTableCellChildBlob(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["blob"]] = None @@ -8308,6 +14609,18 @@ class DocumentDocumentTaskCommentChildTableCellChildCode(BaseModel): language: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["code"]] = None @@ -8318,12 +14631,36 @@ class DocumentDocumentTaskCommentChildTableCellChildComment(BaseModel): created_at: Optional[datetime] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["comment"]] = None class DocumentDocumentTaskCommentChildTableCellChildDivider(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["divider"]] = None @@ -8334,6 +14671,18 @@ class DocumentDocumentTaskCommentChildTableCellChildImage(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["image"]] = None @@ -8344,12 +14693,36 @@ class DocumentDocumentTaskCommentChildTableCellChildLink(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["link"]] = None class DocumentDocumentTaskCommentChildTableCellChildLineBreak(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["line_break"]] = None @@ -8360,6 +14733,18 @@ class DocumentDocumentTaskCommentChildTableCellChildText(BaseModel): marks: Optional[List[Literal["bold", "italic", "underline", "strikethrough", "code", "math"]]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["text"]] = None @@ -8374,6 +14759,18 @@ class DocumentDocumentTaskCommentChildTableCellChildToolCall(BaseModel): args: Optional[Dict[str, object]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["tool_call"]] = None @@ -8390,6 +14787,18 @@ class DocumentDocumentTaskCommentChildTableCellChildToolResult(BaseModel): is_error: Optional[bool] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["tool_result"]] = None @@ -8402,6 +14811,18 @@ class DocumentDocumentTaskCommentChildTableCellChildTraceMessage(BaseModel): message_type: Optional[Literal["message", "thinking"]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + role: Optional[Literal["user", "assistant"]] = None timestamp: Optional[datetime] = None @@ -8432,6 +14853,18 @@ class DocumentDocumentTaskCommentChildTableCell(BaseModel): children: Optional[List[DocumentDocumentTaskCommentChildTableCellChild]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + text: Optional[str] = None type: Optional[Literal["table_cell"]] = None @@ -8442,6 +14875,18 @@ class DocumentDocumentTaskCommentChildTableRow(BaseModel): children: Optional[List[object]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + text: Optional[str] = None type: Optional[Literal["table_row"]] = None @@ -8454,6 +14899,18 @@ class DocumentDocumentTaskCommentChildText(BaseModel): marks: Optional[List[Literal["bold", "italic", "underline", "strikethrough", "code", "math"]]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["text"]] = None @@ -8470,6 +14927,18 @@ class DocumentDocumentTaskCommentChildToDoChildBlob(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["blob"]] = None @@ -8480,6 +14949,18 @@ class DocumentDocumentTaskCommentChildToDoChildCode(BaseModel): language: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["code"]] = None @@ -8490,12 +14971,36 @@ class DocumentDocumentTaskCommentChildToDoChildComment(BaseModel): created_at: Optional[datetime] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["comment"]] = None class DocumentDocumentTaskCommentChildToDoChildDivider(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["divider"]] = None @@ -8506,6 +15011,18 @@ class DocumentDocumentTaskCommentChildToDoChildImage(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["image"]] = None @@ -8516,12 +15033,36 @@ class DocumentDocumentTaskCommentChildToDoChildLink(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["link"]] = None class DocumentDocumentTaskCommentChildToDoChildLineBreak(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["line_break"]] = None @@ -8532,6 +15073,18 @@ class DocumentDocumentTaskCommentChildToDoChildText(BaseModel): marks: Optional[List[Literal["bold", "italic", "underline", "strikethrough", "code", "math"]]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["text"]] = None @@ -8546,6 +15099,18 @@ class DocumentDocumentTaskCommentChildToDoChildToolCall(BaseModel): args: Optional[Dict[str, object]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["tool_call"]] = None @@ -8562,6 +15127,18 @@ class DocumentDocumentTaskCommentChildToDoChildToolResult(BaseModel): is_error: Optional[bool] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["tool_result"]] = None @@ -8574,6 +15151,18 @@ class DocumentDocumentTaskCommentChildToDoChildTraceMessage(BaseModel): message_type: Optional[Literal["message", "thinking"]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + role: Optional[Literal["user", "assistant"]] = None timestamp: Optional[datetime] = None @@ -8604,6 +15193,18 @@ class DocumentDocumentTaskCommentChildToDo(BaseModel): children: Optional[List[DocumentDocumentTaskCommentChildToDoChild]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + text: Optional[str] = None type: Optional[Literal["todo"]] = None @@ -8620,6 +15221,18 @@ class DocumentDocumentTaskCommentChildToolCall(BaseModel): args: Optional[Dict[str, object]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["tool_call"]] = None @@ -8636,6 +15249,18 @@ class DocumentDocumentTaskCommentChildToolResult(BaseModel): is_error: Optional[bool] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["tool_result"]] = None @@ -8648,6 +15273,18 @@ class DocumentDocumentTaskCommentChildTraceMessage(BaseModel): message_type: Optional[Literal["message", "thinking"]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + role: Optional[Literal["user", "assistant"]] = None timestamp: Optional[datetime] = None @@ -8669,6 +15306,18 @@ class DocumentDocumentTaskCommentChildUtterance(BaseModel): end: Optional[float] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + speaker: Optional[object] = None start: Optional[float] = None @@ -8721,6 +15370,18 @@ class DocumentDocumentTaskCommentMentionedUserChildBlob(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["blob"]] = None @@ -8731,6 +15392,18 @@ class DocumentDocumentTaskCommentMentionedUserChildCode(BaseModel): language: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["code"]] = None @@ -8741,12 +15414,36 @@ class DocumentDocumentTaskCommentMentionedUserChildComment(BaseModel): created_at: Optional[datetime] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["comment"]] = None class DocumentDocumentTaskCommentMentionedUserChildDivider(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["divider"]] = None @@ -8757,6 +15454,18 @@ class DocumentDocumentTaskCommentMentionedUserChildImage(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["image"]] = None @@ -8767,12 +15476,36 @@ class DocumentDocumentTaskCommentMentionedUserChildLink(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["link"]] = None class DocumentDocumentTaskCommentMentionedUserChildLineBreak(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["line_break"]] = None @@ -8783,6 +15516,18 @@ class DocumentDocumentTaskCommentMentionedUserChildText(BaseModel): marks: Optional[List[Literal["bold", "italic", "underline", "strikethrough", "code", "math"]]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["text"]] = None @@ -8797,6 +15542,18 @@ class DocumentDocumentTaskCommentMentionedUserChildToolCall(BaseModel): args: Optional[Dict[str, object]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["tool_call"]] = None @@ -8813,6 +15570,18 @@ class DocumentDocumentTaskCommentMentionedUserChildToolResult(BaseModel): is_error: Optional[bool] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["tool_result"]] = None @@ -8825,6 +15594,18 @@ class DocumentDocumentTaskCommentMentionedUserChildTraceMessage(BaseModel): message_type: Optional[Literal["message", "thinking"]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + role: Optional[Literal["user", "assistant"]] = None timestamp: Optional[datetime] = None @@ -8876,6 +15657,18 @@ class DocumentDocumentTaskCommentMentionedUser(BaseModel): link_urls: Optional[List[str]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + name: Optional[str] = None phone_numbers: Optional[List[str]] = None @@ -8911,6 +15704,18 @@ class DocumentDocumentTaskComment(BaseModel): mentioned_users: Optional[List[DocumentDocumentTaskCommentMentionedUser]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + num_replies: Optional[int] = None replies: Optional[List[object]] = None @@ -8940,6 +15745,18 @@ class DocumentDocumentTask(BaseModel): due_at: Optional[datetime] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + priority: Optional[Literal["urgent", "high", "medium", "low"]] = None status: Optional[Literal["completed", "not_started", "in_progress", "cancelled"]] = None @@ -8962,6 +15779,18 @@ class DocumentDocumentPersonChildBlob(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["blob"]] = None @@ -8972,6 +15801,18 @@ class DocumentDocumentPersonChildCode(BaseModel): language: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["code"]] = None @@ -8982,12 +15823,36 @@ class DocumentDocumentPersonChildComment(BaseModel): created_at: Optional[datetime] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["comment"]] = None class DocumentDocumentPersonChildDivider(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["divider"]] = None @@ -8998,6 +15863,18 @@ class DocumentDocumentPersonChildImage(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["image"]] = None @@ -9008,12 +15885,36 @@ class DocumentDocumentPersonChildLink(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["link"]] = None class DocumentDocumentPersonChildLineBreak(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["line_break"]] = None @@ -9024,6 +15925,18 @@ class DocumentDocumentPersonChildText(BaseModel): marks: Optional[List[Literal["bold", "italic", "underline", "strikethrough", "code", "math"]]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["text"]] = None @@ -9038,6 +15951,18 @@ class DocumentDocumentPersonChildToolCall(BaseModel): args: Optional[Dict[str, object]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["tool_call"]] = None @@ -9054,6 +15979,18 @@ class DocumentDocumentPersonChildToolResult(BaseModel): is_error: Optional[bool] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["tool_result"]] = None @@ -9066,6 +16003,18 @@ class DocumentDocumentPersonChildTraceMessage(BaseModel): message_type: Optional[Literal["message", "thinking"]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + role: Optional[Literal["user", "assistant"]] = None timestamp: Optional[datetime] = None @@ -9117,6 +16066,18 @@ class DocumentDocumentPerson(BaseModel): link_urls: Optional[List[str]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + name: Optional[str] = None phone_numbers: Optional[List[str]] = None @@ -9143,6 +16104,18 @@ class DocumentDocumentMessageSenderChildBlob(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["blob"]] = None @@ -9153,6 +16126,18 @@ class DocumentDocumentMessageSenderChildCode(BaseModel): language: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["code"]] = None @@ -9163,12 +16148,36 @@ class DocumentDocumentMessageSenderChildComment(BaseModel): created_at: Optional[datetime] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["comment"]] = None class DocumentDocumentMessageSenderChildDivider(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["divider"]] = None @@ -9179,6 +16188,18 @@ class DocumentDocumentMessageSenderChildImage(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["image"]] = None @@ -9189,12 +16210,36 @@ class DocumentDocumentMessageSenderChildLink(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["link"]] = None class DocumentDocumentMessageSenderChildLineBreak(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["line_break"]] = None @@ -9205,6 +16250,18 @@ class DocumentDocumentMessageSenderChildText(BaseModel): marks: Optional[List[Literal["bold", "italic", "underline", "strikethrough", "code", "math"]]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["text"]] = None @@ -9219,6 +16276,18 @@ class DocumentDocumentMessageSenderChildToolCall(BaseModel): args: Optional[Dict[str, object]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["tool_call"]] = None @@ -9235,6 +16304,18 @@ class DocumentDocumentMessageSenderChildToolResult(BaseModel): is_error: Optional[bool] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["tool_result"]] = None @@ -9247,6 +16328,18 @@ class DocumentDocumentMessageSenderChildTraceMessage(BaseModel): message_type: Optional[Literal["message", "thinking"]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + role: Optional[Literal["user", "assistant"]] = None timestamp: Optional[datetime] = None @@ -9298,6 +16391,18 @@ class DocumentDocumentMessageSender(BaseModel): link_urls: Optional[List[str]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + name: Optional[str] = None phone_numbers: Optional[List[str]] = None @@ -9324,6 +16429,18 @@ class DocumentDocumentMessageChildBlob(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["blob"]] = None @@ -9340,6 +16457,18 @@ class DocumentDocumentMessageChildCalloutChildBlob(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["blob"]] = None @@ -9350,6 +16479,18 @@ class DocumentDocumentMessageChildCalloutChildCode(BaseModel): language: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["code"]] = None @@ -9360,12 +16501,36 @@ class DocumentDocumentMessageChildCalloutChildComment(BaseModel): created_at: Optional[datetime] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["comment"]] = None class DocumentDocumentMessageChildCalloutChildDivider(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["divider"]] = None @@ -9376,6 +16541,18 @@ class DocumentDocumentMessageChildCalloutChildImage(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["image"]] = None @@ -9386,12 +16563,36 @@ class DocumentDocumentMessageChildCalloutChildLink(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["link"]] = None class DocumentDocumentMessageChildCalloutChildLineBreak(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["line_break"]] = None @@ -9402,6 +16603,18 @@ class DocumentDocumentMessageChildCalloutChildText(BaseModel): marks: Optional[List[Literal["bold", "italic", "underline", "strikethrough", "code", "math"]]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["text"]] = None @@ -9416,6 +16629,18 @@ class DocumentDocumentMessageChildCalloutChildToolCall(BaseModel): args: Optional[Dict[str, object]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["tool_call"]] = None @@ -9432,6 +16657,18 @@ class DocumentDocumentMessageChildCalloutChildToolResult(BaseModel): is_error: Optional[bool] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["tool_result"]] = None @@ -9444,6 +16681,18 @@ class DocumentDocumentMessageChildCalloutChildTraceMessage(BaseModel): message_type: Optional[Literal["message", "thinking"]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + role: Optional[Literal["user", "assistant"]] = None timestamp: Optional[datetime] = None @@ -9472,6 +16721,18 @@ class DocumentDocumentMessageChildCallout(BaseModel): children: Optional[List[DocumentDocumentMessageChildCalloutChild]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + text: Optional[str] = None title: Optional[str] = None @@ -9492,6 +16753,18 @@ class DocumentDocumentMessageChildChunkChildBlob(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["blob"]] = None @@ -9502,6 +16775,18 @@ class DocumentDocumentMessageChildChunkChildCode(BaseModel): language: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["code"]] = None @@ -9512,12 +16797,36 @@ class DocumentDocumentMessageChildChunkChildComment(BaseModel): created_at: Optional[datetime] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["comment"]] = None class DocumentDocumentMessageChildChunkChildDivider(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["divider"]] = None @@ -9528,6 +16837,18 @@ class DocumentDocumentMessageChildChunkChildImage(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["image"]] = None @@ -9538,12 +16859,36 @@ class DocumentDocumentMessageChildChunkChildLink(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["link"]] = None class DocumentDocumentMessageChildChunkChildLineBreak(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["line_break"]] = None @@ -9554,6 +16899,18 @@ class DocumentDocumentMessageChildChunkChildText(BaseModel): marks: Optional[List[Literal["bold", "italic", "underline", "strikethrough", "code", "math"]]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["text"]] = None @@ -9568,6 +16925,18 @@ class DocumentDocumentMessageChildChunkChildToolCall(BaseModel): args: Optional[Dict[str, object]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["tool_call"]] = None @@ -9584,6 +16953,18 @@ class DocumentDocumentMessageChildChunkChildToolResult(BaseModel): is_error: Optional[bool] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["tool_result"]] = None @@ -9596,6 +16977,18 @@ class DocumentDocumentMessageChildChunkChildTraceMessage(BaseModel): message_type: Optional[Literal["message", "thinking"]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + role: Optional[Literal["user", "assistant"]] = None timestamp: Optional[datetime] = None @@ -9624,6 +17017,18 @@ class DocumentDocumentMessageChildChunk(BaseModel): children: Optional[List[DocumentDocumentMessageChildChunkChild]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + text: Optional[str] = None type: Optional[Literal["chunk"]] = None @@ -9636,6 +17041,18 @@ class DocumentDocumentMessageChildCode(BaseModel): language: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["code"]] = None @@ -9646,12 +17063,36 @@ class DocumentDocumentMessageChildComment(BaseModel): created_at: Optional[datetime] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["comment"]] = None class DocumentDocumentMessageChildDivider(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["divider"]] = None @@ -9668,6 +17109,18 @@ class DocumentDocumentMessageChildEquationChildBlob(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["blob"]] = None @@ -9678,6 +17131,18 @@ class DocumentDocumentMessageChildEquationChildCode(BaseModel): language: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["code"]] = None @@ -9688,12 +17153,36 @@ class DocumentDocumentMessageChildEquationChildComment(BaseModel): created_at: Optional[datetime] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["comment"]] = None class DocumentDocumentMessageChildEquationChildDivider(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["divider"]] = None @@ -9704,6 +17193,18 @@ class DocumentDocumentMessageChildEquationChildImage(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["image"]] = None @@ -9714,12 +17215,36 @@ class DocumentDocumentMessageChildEquationChildLink(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["link"]] = None class DocumentDocumentMessageChildEquationChildLineBreak(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["line_break"]] = None @@ -9730,6 +17255,18 @@ class DocumentDocumentMessageChildEquationChildText(BaseModel): marks: Optional[List[Literal["bold", "italic", "underline", "strikethrough", "code", "math"]]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["text"]] = None @@ -9744,6 +17281,18 @@ class DocumentDocumentMessageChildEquationChildToolCall(BaseModel): args: Optional[Dict[str, object]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["tool_call"]] = None @@ -9760,6 +17309,18 @@ class DocumentDocumentMessageChildEquationChildToolResult(BaseModel): is_error: Optional[bool] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["tool_result"]] = None @@ -9772,6 +17333,18 @@ class DocumentDocumentMessageChildEquationChildTraceMessage(BaseModel): message_type: Optional[Literal["message", "thinking"]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + role: Optional[Literal["user", "assistant"]] = None timestamp: Optional[datetime] = None @@ -9800,6 +17373,18 @@ class DocumentDocumentMessageChildEquation(BaseModel): children: Optional[List[DocumentDocumentMessageChildEquationChild]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + text: Optional[str] = None type: Optional[Literal["equation"]] = None @@ -9818,6 +17403,18 @@ class DocumentDocumentMessageChildFootnoteChildBlob(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["blob"]] = None @@ -9828,6 +17425,18 @@ class DocumentDocumentMessageChildFootnoteChildCode(BaseModel): language: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["code"]] = None @@ -9838,12 +17447,36 @@ class DocumentDocumentMessageChildFootnoteChildComment(BaseModel): created_at: Optional[datetime] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["comment"]] = None class DocumentDocumentMessageChildFootnoteChildDivider(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["divider"]] = None @@ -9854,6 +17487,18 @@ class DocumentDocumentMessageChildFootnoteChildImage(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["image"]] = None @@ -9864,12 +17509,36 @@ class DocumentDocumentMessageChildFootnoteChildLink(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["link"]] = None class DocumentDocumentMessageChildFootnoteChildLineBreak(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["line_break"]] = None @@ -9880,6 +17549,18 @@ class DocumentDocumentMessageChildFootnoteChildText(BaseModel): marks: Optional[List[Literal["bold", "italic", "underline", "strikethrough", "code", "math"]]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["text"]] = None @@ -9894,6 +17575,18 @@ class DocumentDocumentMessageChildFootnoteChildToolCall(BaseModel): args: Optional[Dict[str, object]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["tool_call"]] = None @@ -9910,6 +17603,18 @@ class DocumentDocumentMessageChildFootnoteChildToolResult(BaseModel): is_error: Optional[bool] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["tool_result"]] = None @@ -9922,6 +17627,18 @@ class DocumentDocumentMessageChildFootnoteChildTraceMessage(BaseModel): message_type: Optional[Literal["message", "thinking"]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + role: Optional[Literal["user", "assistant"]] = None timestamp: Optional[datetime] = None @@ -9950,6 +17667,18 @@ class DocumentDocumentMessageChildFootnote(BaseModel): children: Optional[List[DocumentDocumentMessageChildFootnoteChild]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + text: Optional[str] = None type: Optional[Literal["footnote"]] = None @@ -9968,6 +17697,18 @@ class DocumentDocumentMessageChildHeadingChildBlob(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["blob"]] = None @@ -9978,6 +17719,18 @@ class DocumentDocumentMessageChildHeadingChildCode(BaseModel): language: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["code"]] = None @@ -9988,12 +17741,36 @@ class DocumentDocumentMessageChildHeadingChildComment(BaseModel): created_at: Optional[datetime] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["comment"]] = None class DocumentDocumentMessageChildHeadingChildDivider(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["divider"]] = None @@ -10004,6 +17781,18 @@ class DocumentDocumentMessageChildHeadingChildImage(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["image"]] = None @@ -10014,12 +17803,36 @@ class DocumentDocumentMessageChildHeadingChildLink(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["link"]] = None class DocumentDocumentMessageChildHeadingChildLineBreak(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["line_break"]] = None @@ -10030,6 +17843,18 @@ class DocumentDocumentMessageChildHeadingChildText(BaseModel): marks: Optional[List[Literal["bold", "italic", "underline", "strikethrough", "code", "math"]]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["text"]] = None @@ -10044,6 +17869,18 @@ class DocumentDocumentMessageChildHeadingChildToolCall(BaseModel): args: Optional[Dict[str, object]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["tool_call"]] = None @@ -10060,6 +17897,18 @@ class DocumentDocumentMessageChildHeadingChildToolResult(BaseModel): is_error: Optional[bool] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["tool_result"]] = None @@ -10072,6 +17921,18 @@ class DocumentDocumentMessageChildHeadingChildTraceMessage(BaseModel): message_type: Optional[Literal["message", "thinking"]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + role: Optional[Literal["user", "assistant"]] = None timestamp: Optional[datetime] = None @@ -10102,6 +17963,18 @@ class DocumentDocumentMessageChildHeading(BaseModel): children: Optional[List[DocumentDocumentMessageChildHeadingChild]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + text: Optional[str] = None type: Optional[Literal["heading"]] = None @@ -10114,6 +17987,18 @@ class DocumentDocumentMessageChildImage(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["image"]] = None @@ -10124,12 +18009,36 @@ class DocumentDocumentMessageChildLink(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["link"]] = None class DocumentDocumentMessageChildLineBreak(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["line_break"]] = None @@ -10138,6 +18047,18 @@ class DocumentDocumentMessageChildList(BaseModel): children: Optional[List[object]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + ordered: Optional[bool] = None text: Optional[str] = None @@ -10158,6 +18079,18 @@ class DocumentDocumentMessageChildListItemChildBlob(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["blob"]] = None @@ -10168,6 +18101,18 @@ class DocumentDocumentMessageChildListItemChildCode(BaseModel): language: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["code"]] = None @@ -10178,12 +18123,36 @@ class DocumentDocumentMessageChildListItemChildComment(BaseModel): created_at: Optional[datetime] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["comment"]] = None class DocumentDocumentMessageChildListItemChildDivider(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["divider"]] = None @@ -10194,6 +18163,18 @@ class DocumentDocumentMessageChildListItemChildImage(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["image"]] = None @@ -10204,12 +18185,36 @@ class DocumentDocumentMessageChildListItemChildLink(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["link"]] = None class DocumentDocumentMessageChildListItemChildLineBreak(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["line_break"]] = None @@ -10220,6 +18225,18 @@ class DocumentDocumentMessageChildListItemChildText(BaseModel): marks: Optional[List[Literal["bold", "italic", "underline", "strikethrough", "code", "math"]]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["text"]] = None @@ -10234,6 +18251,18 @@ class DocumentDocumentMessageChildListItemChildToolCall(BaseModel): args: Optional[Dict[str, object]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["tool_call"]] = None @@ -10250,6 +18279,18 @@ class DocumentDocumentMessageChildListItemChildToolResult(BaseModel): is_error: Optional[bool] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["tool_result"]] = None @@ -10262,6 +18303,18 @@ class DocumentDocumentMessageChildListItemChildTraceMessage(BaseModel): message_type: Optional[Literal["message", "thinking"]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + role: Optional[Literal["user", "assistant"]] = None timestamp: Optional[datetime] = None @@ -10290,6 +18343,18 @@ class DocumentDocumentMessageChildListItem(BaseModel): children: Optional[List[DocumentDocumentMessageChildListItemChild]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + text: Optional[str] = None type: Optional[Literal["list_item"]] = None @@ -10308,6 +18373,18 @@ class DocumentDocumentMessageChildParagraphChildBlob(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["blob"]] = None @@ -10318,6 +18395,18 @@ class DocumentDocumentMessageChildParagraphChildCode(BaseModel): language: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["code"]] = None @@ -10328,12 +18417,36 @@ class DocumentDocumentMessageChildParagraphChildComment(BaseModel): created_at: Optional[datetime] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["comment"]] = None class DocumentDocumentMessageChildParagraphChildDivider(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["divider"]] = None @@ -10344,6 +18457,18 @@ class DocumentDocumentMessageChildParagraphChildImage(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["image"]] = None @@ -10354,12 +18479,36 @@ class DocumentDocumentMessageChildParagraphChildLink(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["link"]] = None class DocumentDocumentMessageChildParagraphChildLineBreak(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["line_break"]] = None @@ -10370,6 +18519,18 @@ class DocumentDocumentMessageChildParagraphChildText(BaseModel): marks: Optional[List[Literal["bold", "italic", "underline", "strikethrough", "code", "math"]]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["text"]] = None @@ -10384,6 +18545,18 @@ class DocumentDocumentMessageChildParagraphChildToolCall(BaseModel): args: Optional[Dict[str, object]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["tool_call"]] = None @@ -10400,6 +18573,18 @@ class DocumentDocumentMessageChildParagraphChildToolResult(BaseModel): is_error: Optional[bool] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["tool_result"]] = None @@ -10412,6 +18597,18 @@ class DocumentDocumentMessageChildParagraphChildTraceMessage(BaseModel): message_type: Optional[Literal["message", "thinking"]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + role: Optional[Literal["user", "assistant"]] = None timestamp: Optional[datetime] = None @@ -10440,6 +18637,18 @@ class DocumentDocumentMessageChildParagraph(BaseModel): children: Optional[List[DocumentDocumentMessageChildParagraphChild]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + text: Optional[str] = None type: Optional[Literal["paragraph"]] = None @@ -10458,6 +18667,18 @@ class DocumentDocumentMessageChildQuoteChildBlob(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["blob"]] = None @@ -10468,6 +18689,18 @@ class DocumentDocumentMessageChildQuoteChildCode(BaseModel): language: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["code"]] = None @@ -10478,12 +18711,36 @@ class DocumentDocumentMessageChildQuoteChildComment(BaseModel): created_at: Optional[datetime] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["comment"]] = None class DocumentDocumentMessageChildQuoteChildDivider(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["divider"]] = None @@ -10494,6 +18751,18 @@ class DocumentDocumentMessageChildQuoteChildImage(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["image"]] = None @@ -10504,12 +18773,36 @@ class DocumentDocumentMessageChildQuoteChildLink(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["link"]] = None class DocumentDocumentMessageChildQuoteChildLineBreak(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["line_break"]] = None @@ -10520,6 +18813,18 @@ class DocumentDocumentMessageChildQuoteChildText(BaseModel): marks: Optional[List[Literal["bold", "italic", "underline", "strikethrough", "code", "math"]]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["text"]] = None @@ -10534,6 +18839,18 @@ class DocumentDocumentMessageChildQuoteChildToolCall(BaseModel): args: Optional[Dict[str, object]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["tool_call"]] = None @@ -10550,6 +18867,18 @@ class DocumentDocumentMessageChildQuoteChildToolResult(BaseModel): is_error: Optional[bool] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["tool_result"]] = None @@ -10562,6 +18891,18 @@ class DocumentDocumentMessageChildQuoteChildTraceMessage(BaseModel): message_type: Optional[Literal["message", "thinking"]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + role: Optional[Literal["user", "assistant"]] = None timestamp: Optional[datetime] = None @@ -10590,6 +18931,18 @@ class DocumentDocumentMessageChildQuote(BaseModel): children: Optional[List[DocumentDocumentMessageChildQuoteChild]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + text: Optional[str] = None type: Optional[Literal["quote"]] = None @@ -10603,6 +18956,18 @@ class DocumentDocumentMessageChildTable(BaseModel): has_header: Optional[bool] = None """Whether the first row should be treated as a header""" + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + text: Optional[str] = None type: Optional[Literal["table"]] = None @@ -10621,6 +18986,18 @@ class DocumentDocumentMessageChildTableCellChildBlob(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["blob"]] = None @@ -10631,6 +19008,18 @@ class DocumentDocumentMessageChildTableCellChildCode(BaseModel): language: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["code"]] = None @@ -10641,12 +19030,36 @@ class DocumentDocumentMessageChildTableCellChildComment(BaseModel): created_at: Optional[datetime] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["comment"]] = None class DocumentDocumentMessageChildTableCellChildDivider(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["divider"]] = None @@ -10657,6 +19070,18 @@ class DocumentDocumentMessageChildTableCellChildImage(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["image"]] = None @@ -10667,12 +19092,36 @@ class DocumentDocumentMessageChildTableCellChildLink(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["link"]] = None class DocumentDocumentMessageChildTableCellChildLineBreak(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["line_break"]] = None @@ -10683,6 +19132,18 @@ class DocumentDocumentMessageChildTableCellChildText(BaseModel): marks: Optional[List[Literal["bold", "italic", "underline", "strikethrough", "code", "math"]]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["text"]] = None @@ -10697,6 +19158,18 @@ class DocumentDocumentMessageChildTableCellChildToolCall(BaseModel): args: Optional[Dict[str, object]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["tool_call"]] = None @@ -10713,6 +19186,18 @@ class DocumentDocumentMessageChildTableCellChildToolResult(BaseModel): is_error: Optional[bool] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["tool_result"]] = None @@ -10725,6 +19210,18 @@ class DocumentDocumentMessageChildTableCellChildTraceMessage(BaseModel): message_type: Optional[Literal["message", "thinking"]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + role: Optional[Literal["user", "assistant"]] = None timestamp: Optional[datetime] = None @@ -10755,6 +19252,18 @@ class DocumentDocumentMessageChildTableCell(BaseModel): children: Optional[List[DocumentDocumentMessageChildTableCellChild]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + text: Optional[str] = None type: Optional[Literal["table_cell"]] = None @@ -10765,6 +19274,18 @@ class DocumentDocumentMessageChildTableRow(BaseModel): children: Optional[List[object]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + text: Optional[str] = None type: Optional[Literal["table_row"]] = None @@ -10777,6 +19298,18 @@ class DocumentDocumentMessageChildText(BaseModel): marks: Optional[List[Literal["bold", "italic", "underline", "strikethrough", "code", "math"]]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["text"]] = None @@ -10793,6 +19326,18 @@ class DocumentDocumentMessageChildToDoChildBlob(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["blob"]] = None @@ -10803,6 +19348,18 @@ class DocumentDocumentMessageChildToDoChildCode(BaseModel): language: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["code"]] = None @@ -10813,12 +19370,36 @@ class DocumentDocumentMessageChildToDoChildComment(BaseModel): created_at: Optional[datetime] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["comment"]] = None class DocumentDocumentMessageChildToDoChildDivider(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["divider"]] = None @@ -10829,6 +19410,18 @@ class DocumentDocumentMessageChildToDoChildImage(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["image"]] = None @@ -10839,12 +19432,36 @@ class DocumentDocumentMessageChildToDoChildLink(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["link"]] = None class DocumentDocumentMessageChildToDoChildLineBreak(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["line_break"]] = None @@ -10855,6 +19472,18 @@ class DocumentDocumentMessageChildToDoChildText(BaseModel): marks: Optional[List[Literal["bold", "italic", "underline", "strikethrough", "code", "math"]]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["text"]] = None @@ -10869,6 +19498,18 @@ class DocumentDocumentMessageChildToDoChildToolCall(BaseModel): args: Optional[Dict[str, object]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["tool_call"]] = None @@ -10885,6 +19526,18 @@ class DocumentDocumentMessageChildToDoChildToolResult(BaseModel): is_error: Optional[bool] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["tool_result"]] = None @@ -10897,6 +19550,18 @@ class DocumentDocumentMessageChildToDoChildTraceMessage(BaseModel): message_type: Optional[Literal["message", "thinking"]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + role: Optional[Literal["user", "assistant"]] = None timestamp: Optional[datetime] = None @@ -10927,6 +19592,18 @@ class DocumentDocumentMessageChildToDo(BaseModel): children: Optional[List[DocumentDocumentMessageChildToDoChild]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + text: Optional[str] = None type: Optional[Literal["todo"]] = None @@ -10943,6 +19620,18 @@ class DocumentDocumentMessageChildToolCall(BaseModel): args: Optional[Dict[str, object]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["tool_call"]] = None @@ -10959,6 +19648,18 @@ class DocumentDocumentMessageChildToolResult(BaseModel): is_error: Optional[bool] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["tool_result"]] = None @@ -10971,6 +19672,18 @@ class DocumentDocumentMessageChildTraceMessage(BaseModel): message_type: Optional[Literal["message", "thinking"]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + role: Optional[Literal["user", "assistant"]] = None timestamp: Optional[datetime] = None @@ -10992,6 +19705,18 @@ class DocumentDocumentMessageChildUtterance(BaseModel): end: Optional[float] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + speaker: Optional[object] = None start: Optional[float] = None @@ -11044,6 +19769,18 @@ class DocumentDocumentMessageMentionedUserChildBlob(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["blob"]] = None @@ -11054,6 +19791,18 @@ class DocumentDocumentMessageMentionedUserChildCode(BaseModel): language: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["code"]] = None @@ -11064,12 +19813,36 @@ class DocumentDocumentMessageMentionedUserChildComment(BaseModel): created_at: Optional[datetime] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["comment"]] = None class DocumentDocumentMessageMentionedUserChildDivider(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["divider"]] = None @@ -11080,6 +19853,18 @@ class DocumentDocumentMessageMentionedUserChildImage(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["image"]] = None @@ -11090,12 +19875,36 @@ class DocumentDocumentMessageMentionedUserChildLink(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["link"]] = None class DocumentDocumentMessageMentionedUserChildLineBreak(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["line_break"]] = None @@ -11106,6 +19915,18 @@ class DocumentDocumentMessageMentionedUserChildText(BaseModel): marks: Optional[List[Literal["bold", "italic", "underline", "strikethrough", "code", "math"]]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["text"]] = None @@ -11120,6 +19941,18 @@ class DocumentDocumentMessageMentionedUserChildToolCall(BaseModel): args: Optional[Dict[str, object]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["tool_call"]] = None @@ -11136,6 +19969,18 @@ class DocumentDocumentMessageMentionedUserChildToolResult(BaseModel): is_error: Optional[bool] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["tool_result"]] = None @@ -11148,6 +19993,18 @@ class DocumentDocumentMessageMentionedUserChildTraceMessage(BaseModel): message_type: Optional[Literal["message", "thinking"]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + role: Optional[Literal["user", "assistant"]] = None timestamp: Optional[datetime] = None @@ -11199,6 +20056,18 @@ class DocumentDocumentMessageMentionedUser(BaseModel): link_urls: Optional[List[str]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + name: Optional[str] = None phone_numbers: Optional[List[str]] = None @@ -11234,6 +20103,18 @@ class DocumentDocumentMessage(BaseModel): mentioned_users: Optional[List[DocumentDocumentMessageMentionedUser]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + num_replies: Optional[int] = None replies: Optional[List[object]] = None @@ -11267,6 +20148,18 @@ class DocumentDocumentEventAttendeeChildBlob(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["blob"]] = None @@ -11277,6 +20170,18 @@ class DocumentDocumentEventAttendeeChildCode(BaseModel): language: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["code"]] = None @@ -11287,12 +20192,36 @@ class DocumentDocumentEventAttendeeChildComment(BaseModel): created_at: Optional[datetime] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["comment"]] = None class DocumentDocumentEventAttendeeChildDivider(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["divider"]] = None @@ -11303,6 +20232,18 @@ class DocumentDocumentEventAttendeeChildImage(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["image"]] = None @@ -11313,12 +20254,36 @@ class DocumentDocumentEventAttendeeChildLink(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["link"]] = None class DocumentDocumentEventAttendeeChildLineBreak(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["line_break"]] = None @@ -11329,6 +20294,18 @@ class DocumentDocumentEventAttendeeChildText(BaseModel): marks: Optional[List[Literal["bold", "italic", "underline", "strikethrough", "code", "math"]]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["text"]] = None @@ -11343,6 +20320,18 @@ class DocumentDocumentEventAttendeeChildToolCall(BaseModel): args: Optional[Dict[str, object]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["tool_call"]] = None @@ -11359,6 +20348,18 @@ class DocumentDocumentEventAttendeeChildToolResult(BaseModel): is_error: Optional[bool] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["tool_result"]] = None @@ -11371,6 +20372,18 @@ class DocumentDocumentEventAttendeeChildTraceMessage(BaseModel): message_type: Optional[Literal["message", "thinking"]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + role: Optional[Literal["user", "assistant"]] = None timestamp: Optional[datetime] = None @@ -11422,6 +20435,18 @@ class DocumentDocumentEventAttendee(BaseModel): link_urls: Optional[List[str]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + name: Optional[str] = None phone_numbers: Optional[List[str]] = None @@ -11448,6 +20473,18 @@ class DocumentDocumentEventChildBlob(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["blob"]] = None @@ -11464,6 +20501,18 @@ class DocumentDocumentEventChildCalloutChildBlob(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["blob"]] = None @@ -11474,6 +20523,18 @@ class DocumentDocumentEventChildCalloutChildCode(BaseModel): language: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["code"]] = None @@ -11484,12 +20545,36 @@ class DocumentDocumentEventChildCalloutChildComment(BaseModel): created_at: Optional[datetime] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["comment"]] = None class DocumentDocumentEventChildCalloutChildDivider(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["divider"]] = None @@ -11500,6 +20585,18 @@ class DocumentDocumentEventChildCalloutChildImage(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["image"]] = None @@ -11510,12 +20607,36 @@ class DocumentDocumentEventChildCalloutChildLink(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["link"]] = None class DocumentDocumentEventChildCalloutChildLineBreak(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["line_break"]] = None @@ -11526,6 +20647,18 @@ class DocumentDocumentEventChildCalloutChildText(BaseModel): marks: Optional[List[Literal["bold", "italic", "underline", "strikethrough", "code", "math"]]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["text"]] = None @@ -11540,6 +20673,18 @@ class DocumentDocumentEventChildCalloutChildToolCall(BaseModel): args: Optional[Dict[str, object]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["tool_call"]] = None @@ -11556,6 +20701,18 @@ class DocumentDocumentEventChildCalloutChildToolResult(BaseModel): is_error: Optional[bool] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["tool_result"]] = None @@ -11568,6 +20725,18 @@ class DocumentDocumentEventChildCalloutChildTraceMessage(BaseModel): message_type: Optional[Literal["message", "thinking"]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + role: Optional[Literal["user", "assistant"]] = None timestamp: Optional[datetime] = None @@ -11596,6 +20765,18 @@ class DocumentDocumentEventChildCallout(BaseModel): children: Optional[List[DocumentDocumentEventChildCalloutChild]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + text: Optional[str] = None title: Optional[str] = None @@ -11616,6 +20797,18 @@ class DocumentDocumentEventChildChunkChildBlob(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["blob"]] = None @@ -11626,6 +20819,18 @@ class DocumentDocumentEventChildChunkChildCode(BaseModel): language: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["code"]] = None @@ -11636,12 +20841,36 @@ class DocumentDocumentEventChildChunkChildComment(BaseModel): created_at: Optional[datetime] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["comment"]] = None class DocumentDocumentEventChildChunkChildDivider(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["divider"]] = None @@ -11652,6 +20881,18 @@ class DocumentDocumentEventChildChunkChildImage(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["image"]] = None @@ -11662,12 +20903,36 @@ class DocumentDocumentEventChildChunkChildLink(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["link"]] = None class DocumentDocumentEventChildChunkChildLineBreak(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["line_break"]] = None @@ -11678,6 +20943,18 @@ class DocumentDocumentEventChildChunkChildText(BaseModel): marks: Optional[List[Literal["bold", "italic", "underline", "strikethrough", "code", "math"]]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["text"]] = None @@ -11692,6 +20969,18 @@ class DocumentDocumentEventChildChunkChildToolCall(BaseModel): args: Optional[Dict[str, object]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["tool_call"]] = None @@ -11708,6 +20997,18 @@ class DocumentDocumentEventChildChunkChildToolResult(BaseModel): is_error: Optional[bool] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["tool_result"]] = None @@ -11720,6 +21021,18 @@ class DocumentDocumentEventChildChunkChildTraceMessage(BaseModel): message_type: Optional[Literal["message", "thinking"]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + role: Optional[Literal["user", "assistant"]] = None timestamp: Optional[datetime] = None @@ -11748,6 +21061,18 @@ class DocumentDocumentEventChildChunk(BaseModel): children: Optional[List[DocumentDocumentEventChildChunkChild]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + text: Optional[str] = None type: Optional[Literal["chunk"]] = None @@ -11760,6 +21085,18 @@ class DocumentDocumentEventChildCode(BaseModel): language: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["code"]] = None @@ -11770,12 +21107,36 @@ class DocumentDocumentEventChildComment(BaseModel): created_at: Optional[datetime] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["comment"]] = None class DocumentDocumentEventChildDivider(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["divider"]] = None @@ -11792,6 +21153,18 @@ class DocumentDocumentEventChildEquationChildBlob(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["blob"]] = None @@ -11802,6 +21175,18 @@ class DocumentDocumentEventChildEquationChildCode(BaseModel): language: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["code"]] = None @@ -11812,12 +21197,36 @@ class DocumentDocumentEventChildEquationChildComment(BaseModel): created_at: Optional[datetime] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["comment"]] = None class DocumentDocumentEventChildEquationChildDivider(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["divider"]] = None @@ -11828,6 +21237,18 @@ class DocumentDocumentEventChildEquationChildImage(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["image"]] = None @@ -11838,12 +21259,36 @@ class DocumentDocumentEventChildEquationChildLink(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["link"]] = None class DocumentDocumentEventChildEquationChildLineBreak(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["line_break"]] = None @@ -11854,6 +21299,18 @@ class DocumentDocumentEventChildEquationChildText(BaseModel): marks: Optional[List[Literal["bold", "italic", "underline", "strikethrough", "code", "math"]]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["text"]] = None @@ -11868,6 +21325,18 @@ class DocumentDocumentEventChildEquationChildToolCall(BaseModel): args: Optional[Dict[str, object]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["tool_call"]] = None @@ -11884,6 +21353,18 @@ class DocumentDocumentEventChildEquationChildToolResult(BaseModel): is_error: Optional[bool] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["tool_result"]] = None @@ -11896,6 +21377,18 @@ class DocumentDocumentEventChildEquationChildTraceMessage(BaseModel): message_type: Optional[Literal["message", "thinking"]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + role: Optional[Literal["user", "assistant"]] = None timestamp: Optional[datetime] = None @@ -11924,6 +21417,18 @@ class DocumentDocumentEventChildEquation(BaseModel): children: Optional[List[DocumentDocumentEventChildEquationChild]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + text: Optional[str] = None type: Optional[Literal["equation"]] = None @@ -11942,6 +21447,18 @@ class DocumentDocumentEventChildFootnoteChildBlob(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["blob"]] = None @@ -11952,6 +21469,18 @@ class DocumentDocumentEventChildFootnoteChildCode(BaseModel): language: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["code"]] = None @@ -11962,12 +21491,36 @@ class DocumentDocumentEventChildFootnoteChildComment(BaseModel): created_at: Optional[datetime] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["comment"]] = None class DocumentDocumentEventChildFootnoteChildDivider(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["divider"]] = None @@ -11978,6 +21531,18 @@ class DocumentDocumentEventChildFootnoteChildImage(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["image"]] = None @@ -11988,12 +21553,36 @@ class DocumentDocumentEventChildFootnoteChildLink(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["link"]] = None class DocumentDocumentEventChildFootnoteChildLineBreak(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["line_break"]] = None @@ -12004,6 +21593,18 @@ class DocumentDocumentEventChildFootnoteChildText(BaseModel): marks: Optional[List[Literal["bold", "italic", "underline", "strikethrough", "code", "math"]]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["text"]] = None @@ -12018,6 +21619,18 @@ class DocumentDocumentEventChildFootnoteChildToolCall(BaseModel): args: Optional[Dict[str, object]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["tool_call"]] = None @@ -12034,6 +21647,18 @@ class DocumentDocumentEventChildFootnoteChildToolResult(BaseModel): is_error: Optional[bool] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["tool_result"]] = None @@ -12046,6 +21671,18 @@ class DocumentDocumentEventChildFootnoteChildTraceMessage(BaseModel): message_type: Optional[Literal["message", "thinking"]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + role: Optional[Literal["user", "assistant"]] = None timestamp: Optional[datetime] = None @@ -12074,6 +21711,18 @@ class DocumentDocumentEventChildFootnote(BaseModel): children: Optional[List[DocumentDocumentEventChildFootnoteChild]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + text: Optional[str] = None type: Optional[Literal["footnote"]] = None @@ -12092,6 +21741,18 @@ class DocumentDocumentEventChildHeadingChildBlob(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["blob"]] = None @@ -12102,6 +21763,18 @@ class DocumentDocumentEventChildHeadingChildCode(BaseModel): language: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["code"]] = None @@ -12112,12 +21785,36 @@ class DocumentDocumentEventChildHeadingChildComment(BaseModel): created_at: Optional[datetime] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["comment"]] = None class DocumentDocumentEventChildHeadingChildDivider(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["divider"]] = None @@ -12128,6 +21825,18 @@ class DocumentDocumentEventChildHeadingChildImage(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["image"]] = None @@ -12138,12 +21847,36 @@ class DocumentDocumentEventChildHeadingChildLink(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["link"]] = None class DocumentDocumentEventChildHeadingChildLineBreak(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["line_break"]] = None @@ -12154,6 +21887,18 @@ class DocumentDocumentEventChildHeadingChildText(BaseModel): marks: Optional[List[Literal["bold", "italic", "underline", "strikethrough", "code", "math"]]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["text"]] = None @@ -12168,6 +21913,18 @@ class DocumentDocumentEventChildHeadingChildToolCall(BaseModel): args: Optional[Dict[str, object]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["tool_call"]] = None @@ -12184,6 +21941,18 @@ class DocumentDocumentEventChildHeadingChildToolResult(BaseModel): is_error: Optional[bool] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["tool_result"]] = None @@ -12196,6 +21965,18 @@ class DocumentDocumentEventChildHeadingChildTraceMessage(BaseModel): message_type: Optional[Literal["message", "thinking"]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + role: Optional[Literal["user", "assistant"]] = None timestamp: Optional[datetime] = None @@ -12226,6 +22007,18 @@ class DocumentDocumentEventChildHeading(BaseModel): children: Optional[List[DocumentDocumentEventChildHeadingChild]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + text: Optional[str] = None type: Optional[Literal["heading"]] = None @@ -12238,6 +22031,18 @@ class DocumentDocumentEventChildImage(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["image"]] = None @@ -12248,12 +22053,36 @@ class DocumentDocumentEventChildLink(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["link"]] = None class DocumentDocumentEventChildLineBreak(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["line_break"]] = None @@ -12262,6 +22091,18 @@ class DocumentDocumentEventChildList(BaseModel): children: Optional[List[object]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + ordered: Optional[bool] = None text: Optional[str] = None @@ -12282,6 +22123,18 @@ class DocumentDocumentEventChildListItemChildBlob(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["blob"]] = None @@ -12292,6 +22145,18 @@ class DocumentDocumentEventChildListItemChildCode(BaseModel): language: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["code"]] = None @@ -12302,12 +22167,36 @@ class DocumentDocumentEventChildListItemChildComment(BaseModel): created_at: Optional[datetime] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["comment"]] = None class DocumentDocumentEventChildListItemChildDivider(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["divider"]] = None @@ -12318,6 +22207,18 @@ class DocumentDocumentEventChildListItemChildImage(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["image"]] = None @@ -12328,12 +22229,36 @@ class DocumentDocumentEventChildListItemChildLink(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["link"]] = None class DocumentDocumentEventChildListItemChildLineBreak(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["line_break"]] = None @@ -12344,6 +22269,18 @@ class DocumentDocumentEventChildListItemChildText(BaseModel): marks: Optional[List[Literal["bold", "italic", "underline", "strikethrough", "code", "math"]]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["text"]] = None @@ -12358,6 +22295,18 @@ class DocumentDocumentEventChildListItemChildToolCall(BaseModel): args: Optional[Dict[str, object]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["tool_call"]] = None @@ -12374,6 +22323,18 @@ class DocumentDocumentEventChildListItemChildToolResult(BaseModel): is_error: Optional[bool] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["tool_result"]] = None @@ -12386,6 +22347,18 @@ class DocumentDocumentEventChildListItemChildTraceMessage(BaseModel): message_type: Optional[Literal["message", "thinking"]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + role: Optional[Literal["user", "assistant"]] = None timestamp: Optional[datetime] = None @@ -12414,6 +22387,18 @@ class DocumentDocumentEventChildListItem(BaseModel): children: Optional[List[DocumentDocumentEventChildListItemChild]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + text: Optional[str] = None type: Optional[Literal["list_item"]] = None @@ -12432,6 +22417,18 @@ class DocumentDocumentEventChildParagraphChildBlob(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["blob"]] = None @@ -12442,6 +22439,18 @@ class DocumentDocumentEventChildParagraphChildCode(BaseModel): language: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["code"]] = None @@ -12452,12 +22461,36 @@ class DocumentDocumentEventChildParagraphChildComment(BaseModel): created_at: Optional[datetime] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["comment"]] = None class DocumentDocumentEventChildParagraphChildDivider(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["divider"]] = None @@ -12468,6 +22501,18 @@ class DocumentDocumentEventChildParagraphChildImage(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["image"]] = None @@ -12478,12 +22523,36 @@ class DocumentDocumentEventChildParagraphChildLink(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["link"]] = None class DocumentDocumentEventChildParagraphChildLineBreak(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["line_break"]] = None @@ -12494,6 +22563,18 @@ class DocumentDocumentEventChildParagraphChildText(BaseModel): marks: Optional[List[Literal["bold", "italic", "underline", "strikethrough", "code", "math"]]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["text"]] = None @@ -12508,6 +22589,18 @@ class DocumentDocumentEventChildParagraphChildToolCall(BaseModel): args: Optional[Dict[str, object]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["tool_call"]] = None @@ -12524,6 +22617,18 @@ class DocumentDocumentEventChildParagraphChildToolResult(BaseModel): is_error: Optional[bool] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["tool_result"]] = None @@ -12536,6 +22641,18 @@ class DocumentDocumentEventChildParagraphChildTraceMessage(BaseModel): message_type: Optional[Literal["message", "thinking"]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + role: Optional[Literal["user", "assistant"]] = None timestamp: Optional[datetime] = None @@ -12564,6 +22681,18 @@ class DocumentDocumentEventChildParagraph(BaseModel): children: Optional[List[DocumentDocumentEventChildParagraphChild]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + text: Optional[str] = None type: Optional[Literal["paragraph"]] = None @@ -12582,6 +22711,18 @@ class DocumentDocumentEventChildQuoteChildBlob(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["blob"]] = None @@ -12592,6 +22733,18 @@ class DocumentDocumentEventChildQuoteChildCode(BaseModel): language: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["code"]] = None @@ -12602,12 +22755,36 @@ class DocumentDocumentEventChildQuoteChildComment(BaseModel): created_at: Optional[datetime] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["comment"]] = None class DocumentDocumentEventChildQuoteChildDivider(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["divider"]] = None @@ -12618,6 +22795,18 @@ class DocumentDocumentEventChildQuoteChildImage(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["image"]] = None @@ -12628,12 +22817,36 @@ class DocumentDocumentEventChildQuoteChildLink(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["link"]] = None class DocumentDocumentEventChildQuoteChildLineBreak(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["line_break"]] = None @@ -12644,6 +22857,18 @@ class DocumentDocumentEventChildQuoteChildText(BaseModel): marks: Optional[List[Literal["bold", "italic", "underline", "strikethrough", "code", "math"]]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["text"]] = None @@ -12658,6 +22883,18 @@ class DocumentDocumentEventChildQuoteChildToolCall(BaseModel): args: Optional[Dict[str, object]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["tool_call"]] = None @@ -12674,6 +22911,18 @@ class DocumentDocumentEventChildQuoteChildToolResult(BaseModel): is_error: Optional[bool] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["tool_result"]] = None @@ -12686,6 +22935,18 @@ class DocumentDocumentEventChildQuoteChildTraceMessage(BaseModel): message_type: Optional[Literal["message", "thinking"]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + role: Optional[Literal["user", "assistant"]] = None timestamp: Optional[datetime] = None @@ -12714,6 +22975,18 @@ class DocumentDocumentEventChildQuote(BaseModel): children: Optional[List[DocumentDocumentEventChildQuoteChild]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + text: Optional[str] = None type: Optional[Literal["quote"]] = None @@ -12727,6 +23000,18 @@ class DocumentDocumentEventChildTable(BaseModel): has_header: Optional[bool] = None """Whether the first row should be treated as a header""" + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + text: Optional[str] = None type: Optional[Literal["table"]] = None @@ -12745,6 +23030,18 @@ class DocumentDocumentEventChildTableCellChildBlob(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["blob"]] = None @@ -12755,6 +23052,18 @@ class DocumentDocumentEventChildTableCellChildCode(BaseModel): language: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["code"]] = None @@ -12765,12 +23074,36 @@ class DocumentDocumentEventChildTableCellChildComment(BaseModel): created_at: Optional[datetime] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["comment"]] = None class DocumentDocumentEventChildTableCellChildDivider(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["divider"]] = None @@ -12781,6 +23114,18 @@ class DocumentDocumentEventChildTableCellChildImage(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["image"]] = None @@ -12791,12 +23136,36 @@ class DocumentDocumentEventChildTableCellChildLink(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["link"]] = None class DocumentDocumentEventChildTableCellChildLineBreak(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["line_break"]] = None @@ -12807,6 +23176,18 @@ class DocumentDocumentEventChildTableCellChildText(BaseModel): marks: Optional[List[Literal["bold", "italic", "underline", "strikethrough", "code", "math"]]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["text"]] = None @@ -12821,6 +23202,18 @@ class DocumentDocumentEventChildTableCellChildToolCall(BaseModel): args: Optional[Dict[str, object]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["tool_call"]] = None @@ -12837,6 +23230,18 @@ class DocumentDocumentEventChildTableCellChildToolResult(BaseModel): is_error: Optional[bool] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["tool_result"]] = None @@ -12849,6 +23254,18 @@ class DocumentDocumentEventChildTableCellChildTraceMessage(BaseModel): message_type: Optional[Literal["message", "thinking"]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + role: Optional[Literal["user", "assistant"]] = None timestamp: Optional[datetime] = None @@ -12879,6 +23296,18 @@ class DocumentDocumentEventChildTableCell(BaseModel): children: Optional[List[DocumentDocumentEventChildTableCellChild]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + text: Optional[str] = None type: Optional[Literal["table_cell"]] = None @@ -12889,6 +23318,18 @@ class DocumentDocumentEventChildTableRow(BaseModel): children: Optional[List[object]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + text: Optional[str] = None type: Optional[Literal["table_row"]] = None @@ -12901,6 +23342,18 @@ class DocumentDocumentEventChildText(BaseModel): marks: Optional[List[Literal["bold", "italic", "underline", "strikethrough", "code", "math"]]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["text"]] = None @@ -12917,6 +23370,18 @@ class DocumentDocumentEventChildToDoChildBlob(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["blob"]] = None @@ -12927,6 +23392,18 @@ class DocumentDocumentEventChildToDoChildCode(BaseModel): language: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["code"]] = None @@ -12937,12 +23414,36 @@ class DocumentDocumentEventChildToDoChildComment(BaseModel): created_at: Optional[datetime] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["comment"]] = None class DocumentDocumentEventChildToDoChildDivider(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["divider"]] = None @@ -12953,6 +23454,18 @@ class DocumentDocumentEventChildToDoChildImage(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["image"]] = None @@ -12963,12 +23476,36 @@ class DocumentDocumentEventChildToDoChildLink(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["link"]] = None class DocumentDocumentEventChildToDoChildLineBreak(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["line_break"]] = None @@ -12979,6 +23516,18 @@ class DocumentDocumentEventChildToDoChildText(BaseModel): marks: Optional[List[Literal["bold", "italic", "underline", "strikethrough", "code", "math"]]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["text"]] = None @@ -12993,6 +23542,18 @@ class DocumentDocumentEventChildToDoChildToolCall(BaseModel): args: Optional[Dict[str, object]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["tool_call"]] = None @@ -13009,6 +23570,18 @@ class DocumentDocumentEventChildToDoChildToolResult(BaseModel): is_error: Optional[bool] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["tool_result"]] = None @@ -13021,6 +23594,18 @@ class DocumentDocumentEventChildToDoChildTraceMessage(BaseModel): message_type: Optional[Literal["message", "thinking"]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + role: Optional[Literal["user", "assistant"]] = None timestamp: Optional[datetime] = None @@ -13051,6 +23636,18 @@ class DocumentDocumentEventChildToDo(BaseModel): children: Optional[List[DocumentDocumentEventChildToDoChild]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + text: Optional[str] = None type: Optional[Literal["todo"]] = None @@ -13067,6 +23664,18 @@ class DocumentDocumentEventChildToolCall(BaseModel): args: Optional[Dict[str, object]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["tool_call"]] = None @@ -13083,6 +23692,18 @@ class DocumentDocumentEventChildToolResult(BaseModel): is_error: Optional[bool] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["tool_result"]] = None @@ -13095,6 +23716,18 @@ class DocumentDocumentEventChildTraceMessage(BaseModel): message_type: Optional[Literal["message", "thinking"]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + role: Optional[Literal["user", "assistant"]] = None timestamp: Optional[datetime] = None @@ -13116,6 +23749,18 @@ class DocumentDocumentEventChildUtterance(BaseModel): end: Optional[float] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + speaker: Optional[object] = None start: Optional[float] = None @@ -13168,6 +23813,18 @@ class DocumentDocumentEvent(BaseModel): meeting_url: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + start_at: Optional[datetime] = None text: Optional[str] = None @@ -13190,6 +23847,18 @@ class DocumentDocumentFileChildBlob(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["blob"]] = None @@ -13206,6 +23875,18 @@ class DocumentDocumentFileChildCalloutChildBlob(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["blob"]] = None @@ -13216,6 +23897,18 @@ class DocumentDocumentFileChildCalloutChildCode(BaseModel): language: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["code"]] = None @@ -13226,12 +23919,36 @@ class DocumentDocumentFileChildCalloutChildComment(BaseModel): created_at: Optional[datetime] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["comment"]] = None class DocumentDocumentFileChildCalloutChildDivider(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["divider"]] = None @@ -13242,6 +23959,18 @@ class DocumentDocumentFileChildCalloutChildImage(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["image"]] = None @@ -13252,12 +23981,36 @@ class DocumentDocumentFileChildCalloutChildLink(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["link"]] = None class DocumentDocumentFileChildCalloutChildLineBreak(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["line_break"]] = None @@ -13268,6 +24021,18 @@ class DocumentDocumentFileChildCalloutChildText(BaseModel): marks: Optional[List[Literal["bold", "italic", "underline", "strikethrough", "code", "math"]]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["text"]] = None @@ -13282,6 +24047,18 @@ class DocumentDocumentFileChildCalloutChildToolCall(BaseModel): args: Optional[Dict[str, object]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["tool_call"]] = None @@ -13298,6 +24075,18 @@ class DocumentDocumentFileChildCalloutChildToolResult(BaseModel): is_error: Optional[bool] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["tool_result"]] = None @@ -13310,6 +24099,18 @@ class DocumentDocumentFileChildCalloutChildTraceMessage(BaseModel): message_type: Optional[Literal["message", "thinking"]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + role: Optional[Literal["user", "assistant"]] = None timestamp: Optional[datetime] = None @@ -13338,6 +24139,18 @@ class DocumentDocumentFileChildCallout(BaseModel): children: Optional[List[DocumentDocumentFileChildCalloutChild]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + text: Optional[str] = None title: Optional[str] = None @@ -13358,6 +24171,18 @@ class DocumentDocumentFileChildChunkChildBlob(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["blob"]] = None @@ -13368,6 +24193,18 @@ class DocumentDocumentFileChildChunkChildCode(BaseModel): language: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["code"]] = None @@ -13378,12 +24215,36 @@ class DocumentDocumentFileChildChunkChildComment(BaseModel): created_at: Optional[datetime] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["comment"]] = None class DocumentDocumentFileChildChunkChildDivider(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["divider"]] = None @@ -13394,6 +24255,18 @@ class DocumentDocumentFileChildChunkChildImage(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["image"]] = None @@ -13404,12 +24277,36 @@ class DocumentDocumentFileChildChunkChildLink(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["link"]] = None class DocumentDocumentFileChildChunkChildLineBreak(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["line_break"]] = None @@ -13420,6 +24317,18 @@ class DocumentDocumentFileChildChunkChildText(BaseModel): marks: Optional[List[Literal["bold", "italic", "underline", "strikethrough", "code", "math"]]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["text"]] = None @@ -13434,6 +24343,18 @@ class DocumentDocumentFileChildChunkChildToolCall(BaseModel): args: Optional[Dict[str, object]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["tool_call"]] = None @@ -13450,6 +24371,18 @@ class DocumentDocumentFileChildChunkChildToolResult(BaseModel): is_error: Optional[bool] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["tool_result"]] = None @@ -13462,6 +24395,18 @@ class DocumentDocumentFileChildChunkChildTraceMessage(BaseModel): message_type: Optional[Literal["message", "thinking"]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + role: Optional[Literal["user", "assistant"]] = None timestamp: Optional[datetime] = None @@ -13490,6 +24435,18 @@ class DocumentDocumentFileChildChunk(BaseModel): children: Optional[List[DocumentDocumentFileChildChunkChild]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + text: Optional[str] = None type: Optional[Literal["chunk"]] = None @@ -13502,6 +24459,18 @@ class DocumentDocumentFileChildCode(BaseModel): language: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["code"]] = None @@ -13512,12 +24481,36 @@ class DocumentDocumentFileChildComment(BaseModel): created_at: Optional[datetime] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["comment"]] = None class DocumentDocumentFileChildDivider(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["divider"]] = None @@ -13534,6 +24527,18 @@ class DocumentDocumentFileChildEquationChildBlob(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["blob"]] = None @@ -13544,6 +24549,18 @@ class DocumentDocumentFileChildEquationChildCode(BaseModel): language: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["code"]] = None @@ -13554,12 +24571,36 @@ class DocumentDocumentFileChildEquationChildComment(BaseModel): created_at: Optional[datetime] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["comment"]] = None class DocumentDocumentFileChildEquationChildDivider(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["divider"]] = None @@ -13570,6 +24611,18 @@ class DocumentDocumentFileChildEquationChildImage(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["image"]] = None @@ -13580,12 +24633,36 @@ class DocumentDocumentFileChildEquationChildLink(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["link"]] = None class DocumentDocumentFileChildEquationChildLineBreak(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["line_break"]] = None @@ -13596,6 +24673,18 @@ class DocumentDocumentFileChildEquationChildText(BaseModel): marks: Optional[List[Literal["bold", "italic", "underline", "strikethrough", "code", "math"]]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["text"]] = None @@ -13610,6 +24699,18 @@ class DocumentDocumentFileChildEquationChildToolCall(BaseModel): args: Optional[Dict[str, object]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["tool_call"]] = None @@ -13626,6 +24727,18 @@ class DocumentDocumentFileChildEquationChildToolResult(BaseModel): is_error: Optional[bool] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["tool_result"]] = None @@ -13638,6 +24751,18 @@ class DocumentDocumentFileChildEquationChildTraceMessage(BaseModel): message_type: Optional[Literal["message", "thinking"]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + role: Optional[Literal["user", "assistant"]] = None timestamp: Optional[datetime] = None @@ -13666,6 +24791,18 @@ class DocumentDocumentFileChildEquation(BaseModel): children: Optional[List[DocumentDocumentFileChildEquationChild]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + text: Optional[str] = None type: Optional[Literal["equation"]] = None @@ -13684,6 +24821,18 @@ class DocumentDocumentFileChildFootnoteChildBlob(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["blob"]] = None @@ -13694,6 +24843,18 @@ class DocumentDocumentFileChildFootnoteChildCode(BaseModel): language: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["code"]] = None @@ -13704,12 +24865,36 @@ class DocumentDocumentFileChildFootnoteChildComment(BaseModel): created_at: Optional[datetime] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["comment"]] = None class DocumentDocumentFileChildFootnoteChildDivider(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["divider"]] = None @@ -13720,6 +24905,18 @@ class DocumentDocumentFileChildFootnoteChildImage(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["image"]] = None @@ -13730,12 +24927,36 @@ class DocumentDocumentFileChildFootnoteChildLink(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["link"]] = None class DocumentDocumentFileChildFootnoteChildLineBreak(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["line_break"]] = None @@ -13746,6 +24967,18 @@ class DocumentDocumentFileChildFootnoteChildText(BaseModel): marks: Optional[List[Literal["bold", "italic", "underline", "strikethrough", "code", "math"]]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["text"]] = None @@ -13760,6 +24993,18 @@ class DocumentDocumentFileChildFootnoteChildToolCall(BaseModel): args: Optional[Dict[str, object]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["tool_call"]] = None @@ -13776,6 +25021,18 @@ class DocumentDocumentFileChildFootnoteChildToolResult(BaseModel): is_error: Optional[bool] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["tool_result"]] = None @@ -13788,6 +25045,18 @@ class DocumentDocumentFileChildFootnoteChildTraceMessage(BaseModel): message_type: Optional[Literal["message", "thinking"]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + role: Optional[Literal["user", "assistant"]] = None timestamp: Optional[datetime] = None @@ -13816,6 +25085,18 @@ class DocumentDocumentFileChildFootnote(BaseModel): children: Optional[List[DocumentDocumentFileChildFootnoteChild]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + text: Optional[str] = None type: Optional[Literal["footnote"]] = None @@ -13834,6 +25115,18 @@ class DocumentDocumentFileChildHeadingChildBlob(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["blob"]] = None @@ -13844,6 +25137,18 @@ class DocumentDocumentFileChildHeadingChildCode(BaseModel): language: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["code"]] = None @@ -13854,12 +25159,36 @@ class DocumentDocumentFileChildHeadingChildComment(BaseModel): created_at: Optional[datetime] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["comment"]] = None class DocumentDocumentFileChildHeadingChildDivider(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["divider"]] = None @@ -13870,6 +25199,18 @@ class DocumentDocumentFileChildHeadingChildImage(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["image"]] = None @@ -13880,12 +25221,36 @@ class DocumentDocumentFileChildHeadingChildLink(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["link"]] = None class DocumentDocumentFileChildHeadingChildLineBreak(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["line_break"]] = None @@ -13896,6 +25261,18 @@ class DocumentDocumentFileChildHeadingChildText(BaseModel): marks: Optional[List[Literal["bold", "italic", "underline", "strikethrough", "code", "math"]]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["text"]] = None @@ -13910,6 +25287,18 @@ class DocumentDocumentFileChildHeadingChildToolCall(BaseModel): args: Optional[Dict[str, object]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["tool_call"]] = None @@ -13926,6 +25315,18 @@ class DocumentDocumentFileChildHeadingChildToolResult(BaseModel): is_error: Optional[bool] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["tool_result"]] = None @@ -13938,6 +25339,18 @@ class DocumentDocumentFileChildHeadingChildTraceMessage(BaseModel): message_type: Optional[Literal["message", "thinking"]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + role: Optional[Literal["user", "assistant"]] = None timestamp: Optional[datetime] = None @@ -13968,6 +25381,18 @@ class DocumentDocumentFileChildHeading(BaseModel): children: Optional[List[DocumentDocumentFileChildHeadingChild]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + text: Optional[str] = None type: Optional[Literal["heading"]] = None @@ -13980,6 +25405,18 @@ class DocumentDocumentFileChildImage(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["image"]] = None @@ -13990,12 +25427,36 @@ class DocumentDocumentFileChildLink(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["link"]] = None class DocumentDocumentFileChildLineBreak(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["line_break"]] = None @@ -14004,6 +25465,18 @@ class DocumentDocumentFileChildList(BaseModel): children: Optional[List[object]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + ordered: Optional[bool] = None text: Optional[str] = None @@ -14024,6 +25497,18 @@ class DocumentDocumentFileChildListItemChildBlob(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["blob"]] = None @@ -14034,6 +25519,18 @@ class DocumentDocumentFileChildListItemChildCode(BaseModel): language: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["code"]] = None @@ -14044,12 +25541,36 @@ class DocumentDocumentFileChildListItemChildComment(BaseModel): created_at: Optional[datetime] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["comment"]] = None class DocumentDocumentFileChildListItemChildDivider(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["divider"]] = None @@ -14060,6 +25581,18 @@ class DocumentDocumentFileChildListItemChildImage(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["image"]] = None @@ -14070,12 +25603,36 @@ class DocumentDocumentFileChildListItemChildLink(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["link"]] = None class DocumentDocumentFileChildListItemChildLineBreak(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["line_break"]] = None @@ -14086,6 +25643,18 @@ class DocumentDocumentFileChildListItemChildText(BaseModel): marks: Optional[List[Literal["bold", "italic", "underline", "strikethrough", "code", "math"]]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["text"]] = None @@ -14100,6 +25669,18 @@ class DocumentDocumentFileChildListItemChildToolCall(BaseModel): args: Optional[Dict[str, object]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["tool_call"]] = None @@ -14116,6 +25697,18 @@ class DocumentDocumentFileChildListItemChildToolResult(BaseModel): is_error: Optional[bool] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["tool_result"]] = None @@ -14128,6 +25721,18 @@ class DocumentDocumentFileChildListItemChildTraceMessage(BaseModel): message_type: Optional[Literal["message", "thinking"]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + role: Optional[Literal["user", "assistant"]] = None timestamp: Optional[datetime] = None @@ -14156,6 +25761,18 @@ class DocumentDocumentFileChildListItem(BaseModel): children: Optional[List[DocumentDocumentFileChildListItemChild]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + text: Optional[str] = None type: Optional[Literal["list_item"]] = None @@ -14174,6 +25791,18 @@ class DocumentDocumentFileChildParagraphChildBlob(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["blob"]] = None @@ -14184,6 +25813,18 @@ class DocumentDocumentFileChildParagraphChildCode(BaseModel): language: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["code"]] = None @@ -14194,12 +25835,36 @@ class DocumentDocumentFileChildParagraphChildComment(BaseModel): created_at: Optional[datetime] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["comment"]] = None class DocumentDocumentFileChildParagraphChildDivider(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["divider"]] = None @@ -14210,6 +25875,18 @@ class DocumentDocumentFileChildParagraphChildImage(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["image"]] = None @@ -14220,12 +25897,36 @@ class DocumentDocumentFileChildParagraphChildLink(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["link"]] = None class DocumentDocumentFileChildParagraphChildLineBreak(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["line_break"]] = None @@ -14236,6 +25937,18 @@ class DocumentDocumentFileChildParagraphChildText(BaseModel): marks: Optional[List[Literal["bold", "italic", "underline", "strikethrough", "code", "math"]]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["text"]] = None @@ -14250,6 +25963,18 @@ class DocumentDocumentFileChildParagraphChildToolCall(BaseModel): args: Optional[Dict[str, object]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["tool_call"]] = None @@ -14266,6 +25991,18 @@ class DocumentDocumentFileChildParagraphChildToolResult(BaseModel): is_error: Optional[bool] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["tool_result"]] = None @@ -14278,6 +26015,18 @@ class DocumentDocumentFileChildParagraphChildTraceMessage(BaseModel): message_type: Optional[Literal["message", "thinking"]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + role: Optional[Literal["user", "assistant"]] = None timestamp: Optional[datetime] = None @@ -14306,6 +26055,18 @@ class DocumentDocumentFileChildParagraph(BaseModel): children: Optional[List[DocumentDocumentFileChildParagraphChild]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + text: Optional[str] = None type: Optional[Literal["paragraph"]] = None @@ -14324,6 +26085,18 @@ class DocumentDocumentFileChildQuoteChildBlob(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["blob"]] = None @@ -14334,6 +26107,18 @@ class DocumentDocumentFileChildQuoteChildCode(BaseModel): language: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["code"]] = None @@ -14344,12 +26129,36 @@ class DocumentDocumentFileChildQuoteChildComment(BaseModel): created_at: Optional[datetime] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["comment"]] = None class DocumentDocumentFileChildQuoteChildDivider(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["divider"]] = None @@ -14360,6 +26169,18 @@ class DocumentDocumentFileChildQuoteChildImage(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["image"]] = None @@ -14370,12 +26191,36 @@ class DocumentDocumentFileChildQuoteChildLink(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["link"]] = None class DocumentDocumentFileChildQuoteChildLineBreak(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["line_break"]] = None @@ -14386,6 +26231,18 @@ class DocumentDocumentFileChildQuoteChildText(BaseModel): marks: Optional[List[Literal["bold", "italic", "underline", "strikethrough", "code", "math"]]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["text"]] = None @@ -14400,6 +26257,18 @@ class DocumentDocumentFileChildQuoteChildToolCall(BaseModel): args: Optional[Dict[str, object]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["tool_call"]] = None @@ -14416,6 +26285,18 @@ class DocumentDocumentFileChildQuoteChildToolResult(BaseModel): is_error: Optional[bool] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["tool_result"]] = None @@ -14428,6 +26309,18 @@ class DocumentDocumentFileChildQuoteChildTraceMessage(BaseModel): message_type: Optional[Literal["message", "thinking"]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + role: Optional[Literal["user", "assistant"]] = None timestamp: Optional[datetime] = None @@ -14456,6 +26349,18 @@ class DocumentDocumentFileChildQuote(BaseModel): children: Optional[List[DocumentDocumentFileChildQuoteChild]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + text: Optional[str] = None type: Optional[Literal["quote"]] = None @@ -14469,6 +26374,18 @@ class DocumentDocumentFileChildTable(BaseModel): has_header: Optional[bool] = None """Whether the first row should be treated as a header""" + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + text: Optional[str] = None type: Optional[Literal["table"]] = None @@ -14487,6 +26404,18 @@ class DocumentDocumentFileChildTableCellChildBlob(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["blob"]] = None @@ -14497,6 +26426,18 @@ class DocumentDocumentFileChildTableCellChildCode(BaseModel): language: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["code"]] = None @@ -14507,12 +26448,36 @@ class DocumentDocumentFileChildTableCellChildComment(BaseModel): created_at: Optional[datetime] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["comment"]] = None class DocumentDocumentFileChildTableCellChildDivider(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["divider"]] = None @@ -14523,6 +26488,18 @@ class DocumentDocumentFileChildTableCellChildImage(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["image"]] = None @@ -14533,12 +26510,36 @@ class DocumentDocumentFileChildTableCellChildLink(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["link"]] = None class DocumentDocumentFileChildTableCellChildLineBreak(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["line_break"]] = None @@ -14549,6 +26550,18 @@ class DocumentDocumentFileChildTableCellChildText(BaseModel): marks: Optional[List[Literal["bold", "italic", "underline", "strikethrough", "code", "math"]]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["text"]] = None @@ -14563,6 +26576,18 @@ class DocumentDocumentFileChildTableCellChildToolCall(BaseModel): args: Optional[Dict[str, object]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["tool_call"]] = None @@ -14579,6 +26604,18 @@ class DocumentDocumentFileChildTableCellChildToolResult(BaseModel): is_error: Optional[bool] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["tool_result"]] = None @@ -14591,6 +26628,18 @@ class DocumentDocumentFileChildTableCellChildTraceMessage(BaseModel): message_type: Optional[Literal["message", "thinking"]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + role: Optional[Literal["user", "assistant"]] = None timestamp: Optional[datetime] = None @@ -14621,6 +26670,18 @@ class DocumentDocumentFileChildTableCell(BaseModel): children: Optional[List[DocumentDocumentFileChildTableCellChild]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + text: Optional[str] = None type: Optional[Literal["table_cell"]] = None @@ -14631,6 +26692,18 @@ class DocumentDocumentFileChildTableRow(BaseModel): children: Optional[List[object]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + text: Optional[str] = None type: Optional[Literal["table_row"]] = None @@ -14643,6 +26716,18 @@ class DocumentDocumentFileChildText(BaseModel): marks: Optional[List[Literal["bold", "italic", "underline", "strikethrough", "code", "math"]]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["text"]] = None @@ -14659,6 +26744,18 @@ class DocumentDocumentFileChildToDoChildBlob(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["blob"]] = None @@ -14669,6 +26766,18 @@ class DocumentDocumentFileChildToDoChildCode(BaseModel): language: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["code"]] = None @@ -14679,12 +26788,36 @@ class DocumentDocumentFileChildToDoChildComment(BaseModel): created_at: Optional[datetime] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["comment"]] = None class DocumentDocumentFileChildToDoChildDivider(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["divider"]] = None @@ -14695,6 +26828,18 @@ class DocumentDocumentFileChildToDoChildImage(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["image"]] = None @@ -14705,12 +26850,36 @@ class DocumentDocumentFileChildToDoChildLink(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["link"]] = None class DocumentDocumentFileChildToDoChildLineBreak(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["line_break"]] = None @@ -14721,6 +26890,18 @@ class DocumentDocumentFileChildToDoChildText(BaseModel): marks: Optional[List[Literal["bold", "italic", "underline", "strikethrough", "code", "math"]]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["text"]] = None @@ -14735,6 +26916,18 @@ class DocumentDocumentFileChildToDoChildToolCall(BaseModel): args: Optional[Dict[str, object]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["tool_call"]] = None @@ -14751,6 +26944,18 @@ class DocumentDocumentFileChildToDoChildToolResult(BaseModel): is_error: Optional[bool] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["tool_result"]] = None @@ -14763,6 +26968,18 @@ class DocumentDocumentFileChildToDoChildTraceMessage(BaseModel): message_type: Optional[Literal["message", "thinking"]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + role: Optional[Literal["user", "assistant"]] = None timestamp: Optional[datetime] = None @@ -14793,6 +27010,18 @@ class DocumentDocumentFileChildToDo(BaseModel): children: Optional[List[DocumentDocumentFileChildToDoChild]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + text: Optional[str] = None type: Optional[Literal["todo"]] = None @@ -14809,6 +27038,18 @@ class DocumentDocumentFileChildToolCall(BaseModel): args: Optional[Dict[str, object]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["tool_call"]] = None @@ -14825,6 +27066,18 @@ class DocumentDocumentFileChildToolResult(BaseModel): is_error: Optional[bool] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["tool_result"]] = None @@ -14837,6 +27090,18 @@ class DocumentDocumentFileChildTraceMessage(BaseModel): message_type: Optional[Literal["message", "thinking"]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + role: Optional[Literal["user", "assistant"]] = None timestamp: Optional[datetime] = None @@ -14858,6 +27123,18 @@ class DocumentDocumentFileChildUtterance(BaseModel): end: Optional[float] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + speaker: Optional[object] = None start: Optional[float] = None @@ -14906,6 +27183,18 @@ class DocumentDocumentFile(BaseModel): children: Optional[List[DocumentDocumentFileChild]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + path: Optional[List[str]] = None text: Optional[str] = None @@ -14928,6 +27217,18 @@ class DocumentDocumentConversationChildSenderChildBlob(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["blob"]] = None @@ -14938,6 +27239,18 @@ class DocumentDocumentConversationChildSenderChildCode(BaseModel): language: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["code"]] = None @@ -14948,12 +27261,36 @@ class DocumentDocumentConversationChildSenderChildComment(BaseModel): created_at: Optional[datetime] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["comment"]] = None class DocumentDocumentConversationChildSenderChildDivider(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["divider"]] = None @@ -14964,6 +27301,18 @@ class DocumentDocumentConversationChildSenderChildImage(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["image"]] = None @@ -14974,12 +27323,36 @@ class DocumentDocumentConversationChildSenderChildLink(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["link"]] = None class DocumentDocumentConversationChildSenderChildLineBreak(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["line_break"]] = None @@ -14990,6 +27363,18 @@ class DocumentDocumentConversationChildSenderChildText(BaseModel): marks: Optional[List[Literal["bold", "italic", "underline", "strikethrough", "code", "math"]]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["text"]] = None @@ -15004,6 +27389,18 @@ class DocumentDocumentConversationChildSenderChildToolCall(BaseModel): args: Optional[Dict[str, object]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["tool_call"]] = None @@ -15020,6 +27417,18 @@ class DocumentDocumentConversationChildSenderChildToolResult(BaseModel): is_error: Optional[bool] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["tool_result"]] = None @@ -15032,6 +27441,18 @@ class DocumentDocumentConversationChildSenderChildTraceMessage(BaseModel): message_type: Optional[Literal["message", "thinking"]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + role: Optional[Literal["user", "assistant"]] = None timestamp: Optional[datetime] = None @@ -15083,6 +27504,18 @@ class DocumentDocumentConversationChildSender(BaseModel): link_urls: Optional[List[str]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + name: Optional[str] = None phone_numbers: Optional[List[str]] = None @@ -15109,6 +27542,18 @@ class DocumentDocumentConversationChildChildBlob(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["blob"]] = None @@ -15125,6 +27570,18 @@ class DocumentDocumentConversationChildChildCalloutChildBlob(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["blob"]] = None @@ -15135,6 +27592,18 @@ class DocumentDocumentConversationChildChildCalloutChildCode(BaseModel): language: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["code"]] = None @@ -15145,12 +27614,36 @@ class DocumentDocumentConversationChildChildCalloutChildComment(BaseModel): created_at: Optional[datetime] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["comment"]] = None class DocumentDocumentConversationChildChildCalloutChildDivider(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["divider"]] = None @@ -15161,6 +27654,18 @@ class DocumentDocumentConversationChildChildCalloutChildImage(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["image"]] = None @@ -15171,12 +27676,36 @@ class DocumentDocumentConversationChildChildCalloutChildLink(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["link"]] = None class DocumentDocumentConversationChildChildCalloutChildLineBreak(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["line_break"]] = None @@ -15187,6 +27716,18 @@ class DocumentDocumentConversationChildChildCalloutChildText(BaseModel): marks: Optional[List[Literal["bold", "italic", "underline", "strikethrough", "code", "math"]]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["text"]] = None @@ -15201,6 +27742,18 @@ class DocumentDocumentConversationChildChildCalloutChildToolCall(BaseModel): args: Optional[Dict[str, object]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["tool_call"]] = None @@ -15217,6 +27770,18 @@ class DocumentDocumentConversationChildChildCalloutChildToolResult(BaseModel): is_error: Optional[bool] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["tool_result"]] = None @@ -15229,6 +27794,18 @@ class DocumentDocumentConversationChildChildCalloutChildTraceMessage(BaseModel): message_type: Optional[Literal["message", "thinking"]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + role: Optional[Literal["user", "assistant"]] = None timestamp: Optional[datetime] = None @@ -15257,6 +27834,18 @@ class DocumentDocumentConversationChildChildCallout(BaseModel): children: Optional[List[DocumentDocumentConversationChildChildCalloutChild]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + text: Optional[str] = None title: Optional[str] = None @@ -15277,6 +27866,18 @@ class DocumentDocumentConversationChildChildChunkChildBlob(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["blob"]] = None @@ -15287,6 +27888,18 @@ class DocumentDocumentConversationChildChildChunkChildCode(BaseModel): language: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["code"]] = None @@ -15297,12 +27910,36 @@ class DocumentDocumentConversationChildChildChunkChildComment(BaseModel): created_at: Optional[datetime] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["comment"]] = None class DocumentDocumentConversationChildChildChunkChildDivider(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["divider"]] = None @@ -15313,6 +27950,18 @@ class DocumentDocumentConversationChildChildChunkChildImage(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["image"]] = None @@ -15323,12 +27972,36 @@ class DocumentDocumentConversationChildChildChunkChildLink(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["link"]] = None class DocumentDocumentConversationChildChildChunkChildLineBreak(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["line_break"]] = None @@ -15339,6 +28012,18 @@ class DocumentDocumentConversationChildChildChunkChildText(BaseModel): marks: Optional[List[Literal["bold", "italic", "underline", "strikethrough", "code", "math"]]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["text"]] = None @@ -15353,6 +28038,18 @@ class DocumentDocumentConversationChildChildChunkChildToolCall(BaseModel): args: Optional[Dict[str, object]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["tool_call"]] = None @@ -15369,6 +28066,18 @@ class DocumentDocumentConversationChildChildChunkChildToolResult(BaseModel): is_error: Optional[bool] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["tool_result"]] = None @@ -15381,6 +28090,18 @@ class DocumentDocumentConversationChildChildChunkChildTraceMessage(BaseModel): message_type: Optional[Literal["message", "thinking"]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + role: Optional[Literal["user", "assistant"]] = None timestamp: Optional[datetime] = None @@ -15409,6 +28130,18 @@ class DocumentDocumentConversationChildChildChunk(BaseModel): children: Optional[List[DocumentDocumentConversationChildChildChunkChild]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + text: Optional[str] = None type: Optional[Literal["chunk"]] = None @@ -15421,6 +28154,18 @@ class DocumentDocumentConversationChildChildCode(BaseModel): language: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["code"]] = None @@ -15431,12 +28176,36 @@ class DocumentDocumentConversationChildChildComment(BaseModel): created_at: Optional[datetime] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["comment"]] = None class DocumentDocumentConversationChildChildDivider(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["divider"]] = None @@ -15453,6 +28222,18 @@ class DocumentDocumentConversationChildChildEquationChildBlob(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["blob"]] = None @@ -15463,6 +28244,18 @@ class DocumentDocumentConversationChildChildEquationChildCode(BaseModel): language: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["code"]] = None @@ -15473,12 +28266,36 @@ class DocumentDocumentConversationChildChildEquationChildComment(BaseModel): created_at: Optional[datetime] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["comment"]] = None class DocumentDocumentConversationChildChildEquationChildDivider(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["divider"]] = None @@ -15489,6 +28306,18 @@ class DocumentDocumentConversationChildChildEquationChildImage(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["image"]] = None @@ -15499,12 +28328,36 @@ class DocumentDocumentConversationChildChildEquationChildLink(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["link"]] = None class DocumentDocumentConversationChildChildEquationChildLineBreak(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["line_break"]] = None @@ -15515,6 +28368,18 @@ class DocumentDocumentConversationChildChildEquationChildText(BaseModel): marks: Optional[List[Literal["bold", "italic", "underline", "strikethrough", "code", "math"]]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["text"]] = None @@ -15529,6 +28394,18 @@ class DocumentDocumentConversationChildChildEquationChildToolCall(BaseModel): args: Optional[Dict[str, object]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["tool_call"]] = None @@ -15545,6 +28422,18 @@ class DocumentDocumentConversationChildChildEquationChildToolResult(BaseModel): is_error: Optional[bool] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["tool_result"]] = None @@ -15557,6 +28446,18 @@ class DocumentDocumentConversationChildChildEquationChildTraceMessage(BaseModel) message_type: Optional[Literal["message", "thinking"]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + role: Optional[Literal["user", "assistant"]] = None timestamp: Optional[datetime] = None @@ -15585,6 +28486,18 @@ class DocumentDocumentConversationChildChildEquation(BaseModel): children: Optional[List[DocumentDocumentConversationChildChildEquationChild]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + text: Optional[str] = None type: Optional[Literal["equation"]] = None @@ -15603,6 +28516,18 @@ class DocumentDocumentConversationChildChildFootnoteChildBlob(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["blob"]] = None @@ -15613,6 +28538,18 @@ class DocumentDocumentConversationChildChildFootnoteChildCode(BaseModel): language: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["code"]] = None @@ -15623,12 +28560,36 @@ class DocumentDocumentConversationChildChildFootnoteChildComment(BaseModel): created_at: Optional[datetime] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["comment"]] = None class DocumentDocumentConversationChildChildFootnoteChildDivider(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["divider"]] = None @@ -15639,6 +28600,18 @@ class DocumentDocumentConversationChildChildFootnoteChildImage(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["image"]] = None @@ -15649,12 +28622,36 @@ class DocumentDocumentConversationChildChildFootnoteChildLink(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["link"]] = None class DocumentDocumentConversationChildChildFootnoteChildLineBreak(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["line_break"]] = None @@ -15665,6 +28662,18 @@ class DocumentDocumentConversationChildChildFootnoteChildText(BaseModel): marks: Optional[List[Literal["bold", "italic", "underline", "strikethrough", "code", "math"]]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["text"]] = None @@ -15679,6 +28688,18 @@ class DocumentDocumentConversationChildChildFootnoteChildToolCall(BaseModel): args: Optional[Dict[str, object]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["tool_call"]] = None @@ -15695,6 +28716,18 @@ class DocumentDocumentConversationChildChildFootnoteChildToolResult(BaseModel): is_error: Optional[bool] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["tool_result"]] = None @@ -15707,6 +28740,18 @@ class DocumentDocumentConversationChildChildFootnoteChildTraceMessage(BaseModel) message_type: Optional[Literal["message", "thinking"]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + role: Optional[Literal["user", "assistant"]] = None timestamp: Optional[datetime] = None @@ -15735,6 +28780,18 @@ class DocumentDocumentConversationChildChildFootnote(BaseModel): children: Optional[List[DocumentDocumentConversationChildChildFootnoteChild]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + text: Optional[str] = None type: Optional[Literal["footnote"]] = None @@ -15753,6 +28810,18 @@ class DocumentDocumentConversationChildChildHeadingChildBlob(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["blob"]] = None @@ -15763,6 +28832,18 @@ class DocumentDocumentConversationChildChildHeadingChildCode(BaseModel): language: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["code"]] = None @@ -15773,12 +28854,36 @@ class DocumentDocumentConversationChildChildHeadingChildComment(BaseModel): created_at: Optional[datetime] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["comment"]] = None class DocumentDocumentConversationChildChildHeadingChildDivider(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["divider"]] = None @@ -15789,6 +28894,18 @@ class DocumentDocumentConversationChildChildHeadingChildImage(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["image"]] = None @@ -15799,12 +28916,36 @@ class DocumentDocumentConversationChildChildHeadingChildLink(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["link"]] = None class DocumentDocumentConversationChildChildHeadingChildLineBreak(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["line_break"]] = None @@ -15815,6 +28956,18 @@ class DocumentDocumentConversationChildChildHeadingChildText(BaseModel): marks: Optional[List[Literal["bold", "italic", "underline", "strikethrough", "code", "math"]]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["text"]] = None @@ -15829,6 +28982,18 @@ class DocumentDocumentConversationChildChildHeadingChildToolCall(BaseModel): args: Optional[Dict[str, object]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["tool_call"]] = None @@ -15845,6 +29010,18 @@ class DocumentDocumentConversationChildChildHeadingChildToolResult(BaseModel): is_error: Optional[bool] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["tool_result"]] = None @@ -15857,6 +29034,18 @@ class DocumentDocumentConversationChildChildHeadingChildTraceMessage(BaseModel): message_type: Optional[Literal["message", "thinking"]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + role: Optional[Literal["user", "assistant"]] = None timestamp: Optional[datetime] = None @@ -15887,6 +29076,18 @@ class DocumentDocumentConversationChildChildHeading(BaseModel): children: Optional[List[DocumentDocumentConversationChildChildHeadingChild]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + text: Optional[str] = None type: Optional[Literal["heading"]] = None @@ -15899,6 +29100,18 @@ class DocumentDocumentConversationChildChildImage(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["image"]] = None @@ -15909,12 +29122,36 @@ class DocumentDocumentConversationChildChildLink(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["link"]] = None class DocumentDocumentConversationChildChildLineBreak(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["line_break"]] = None @@ -15923,6 +29160,18 @@ class DocumentDocumentConversationChildChildList(BaseModel): children: Optional[List[object]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + ordered: Optional[bool] = None text: Optional[str] = None @@ -15943,6 +29192,18 @@ class DocumentDocumentConversationChildChildListItemChildBlob(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["blob"]] = None @@ -15953,6 +29214,18 @@ class DocumentDocumentConversationChildChildListItemChildCode(BaseModel): language: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["code"]] = None @@ -15963,12 +29236,36 @@ class DocumentDocumentConversationChildChildListItemChildComment(BaseModel): created_at: Optional[datetime] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["comment"]] = None class DocumentDocumentConversationChildChildListItemChildDivider(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["divider"]] = None @@ -15979,6 +29276,18 @@ class DocumentDocumentConversationChildChildListItemChildImage(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["image"]] = None @@ -15989,12 +29298,36 @@ class DocumentDocumentConversationChildChildListItemChildLink(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["link"]] = None class DocumentDocumentConversationChildChildListItemChildLineBreak(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["line_break"]] = None @@ -16005,6 +29338,18 @@ class DocumentDocumentConversationChildChildListItemChildText(BaseModel): marks: Optional[List[Literal["bold", "italic", "underline", "strikethrough", "code", "math"]]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["text"]] = None @@ -16019,6 +29364,18 @@ class DocumentDocumentConversationChildChildListItemChildToolCall(BaseModel): args: Optional[Dict[str, object]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["tool_call"]] = None @@ -16035,6 +29392,18 @@ class DocumentDocumentConversationChildChildListItemChildToolResult(BaseModel): is_error: Optional[bool] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["tool_result"]] = None @@ -16047,6 +29416,18 @@ class DocumentDocumentConversationChildChildListItemChildTraceMessage(BaseModel) message_type: Optional[Literal["message", "thinking"]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + role: Optional[Literal["user", "assistant"]] = None timestamp: Optional[datetime] = None @@ -16075,6 +29456,18 @@ class DocumentDocumentConversationChildChildListItem(BaseModel): children: Optional[List[DocumentDocumentConversationChildChildListItemChild]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + text: Optional[str] = None type: Optional[Literal["list_item"]] = None @@ -16093,6 +29486,18 @@ class DocumentDocumentConversationChildChildParagraphChildBlob(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["blob"]] = None @@ -16103,6 +29508,18 @@ class DocumentDocumentConversationChildChildParagraphChildCode(BaseModel): language: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["code"]] = None @@ -16113,12 +29530,36 @@ class DocumentDocumentConversationChildChildParagraphChildComment(BaseModel): created_at: Optional[datetime] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["comment"]] = None class DocumentDocumentConversationChildChildParagraphChildDivider(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["divider"]] = None @@ -16129,6 +29570,18 @@ class DocumentDocumentConversationChildChildParagraphChildImage(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["image"]] = None @@ -16139,12 +29592,36 @@ class DocumentDocumentConversationChildChildParagraphChildLink(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["link"]] = None class DocumentDocumentConversationChildChildParagraphChildLineBreak(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["line_break"]] = None @@ -16155,6 +29632,18 @@ class DocumentDocumentConversationChildChildParagraphChildText(BaseModel): marks: Optional[List[Literal["bold", "italic", "underline", "strikethrough", "code", "math"]]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["text"]] = None @@ -16169,6 +29658,18 @@ class DocumentDocumentConversationChildChildParagraphChildToolCall(BaseModel): args: Optional[Dict[str, object]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["tool_call"]] = None @@ -16185,6 +29686,18 @@ class DocumentDocumentConversationChildChildParagraphChildToolResult(BaseModel): is_error: Optional[bool] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["tool_result"]] = None @@ -16197,6 +29710,18 @@ class DocumentDocumentConversationChildChildParagraphChildTraceMessage(BaseModel message_type: Optional[Literal["message", "thinking"]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + role: Optional[Literal["user", "assistant"]] = None timestamp: Optional[datetime] = None @@ -16225,6 +29750,18 @@ class DocumentDocumentConversationChildChildParagraph(BaseModel): children: Optional[List[DocumentDocumentConversationChildChildParagraphChild]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + text: Optional[str] = None type: Optional[Literal["paragraph"]] = None @@ -16243,6 +29780,18 @@ class DocumentDocumentConversationChildChildQuoteChildBlob(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["blob"]] = None @@ -16253,6 +29802,18 @@ class DocumentDocumentConversationChildChildQuoteChildCode(BaseModel): language: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["code"]] = None @@ -16263,12 +29824,36 @@ class DocumentDocumentConversationChildChildQuoteChildComment(BaseModel): created_at: Optional[datetime] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["comment"]] = None class DocumentDocumentConversationChildChildQuoteChildDivider(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["divider"]] = None @@ -16279,6 +29864,18 @@ class DocumentDocumentConversationChildChildQuoteChildImage(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["image"]] = None @@ -16289,12 +29886,36 @@ class DocumentDocumentConversationChildChildQuoteChildLink(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["link"]] = None class DocumentDocumentConversationChildChildQuoteChildLineBreak(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["line_break"]] = None @@ -16305,6 +29926,18 @@ class DocumentDocumentConversationChildChildQuoteChildText(BaseModel): marks: Optional[List[Literal["bold", "italic", "underline", "strikethrough", "code", "math"]]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["text"]] = None @@ -16319,6 +29952,18 @@ class DocumentDocumentConversationChildChildQuoteChildToolCall(BaseModel): args: Optional[Dict[str, object]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["tool_call"]] = None @@ -16335,6 +29980,18 @@ class DocumentDocumentConversationChildChildQuoteChildToolResult(BaseModel): is_error: Optional[bool] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["tool_result"]] = None @@ -16347,6 +30004,18 @@ class DocumentDocumentConversationChildChildQuoteChildTraceMessage(BaseModel): message_type: Optional[Literal["message", "thinking"]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + role: Optional[Literal["user", "assistant"]] = None timestamp: Optional[datetime] = None @@ -16375,6 +30044,18 @@ class DocumentDocumentConversationChildChildQuote(BaseModel): children: Optional[List[DocumentDocumentConversationChildChildQuoteChild]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + text: Optional[str] = None type: Optional[Literal["quote"]] = None @@ -16388,6 +30069,18 @@ class DocumentDocumentConversationChildChildTable(BaseModel): has_header: Optional[bool] = None """Whether the first row should be treated as a header""" + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + text: Optional[str] = None type: Optional[Literal["table"]] = None @@ -16406,6 +30099,18 @@ class DocumentDocumentConversationChildChildTableCellChildBlob(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["blob"]] = None @@ -16416,6 +30121,18 @@ class DocumentDocumentConversationChildChildTableCellChildCode(BaseModel): language: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["code"]] = None @@ -16426,12 +30143,36 @@ class DocumentDocumentConversationChildChildTableCellChildComment(BaseModel): created_at: Optional[datetime] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["comment"]] = None class DocumentDocumentConversationChildChildTableCellChildDivider(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["divider"]] = None @@ -16442,6 +30183,18 @@ class DocumentDocumentConversationChildChildTableCellChildImage(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["image"]] = None @@ -16452,12 +30205,36 @@ class DocumentDocumentConversationChildChildTableCellChildLink(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["link"]] = None class DocumentDocumentConversationChildChildTableCellChildLineBreak(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["line_break"]] = None @@ -16468,6 +30245,18 @@ class DocumentDocumentConversationChildChildTableCellChildText(BaseModel): marks: Optional[List[Literal["bold", "italic", "underline", "strikethrough", "code", "math"]]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["text"]] = None @@ -16482,6 +30271,18 @@ class DocumentDocumentConversationChildChildTableCellChildToolCall(BaseModel): args: Optional[Dict[str, object]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["tool_call"]] = None @@ -16498,6 +30299,18 @@ class DocumentDocumentConversationChildChildTableCellChildToolResult(BaseModel): is_error: Optional[bool] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["tool_result"]] = None @@ -16510,6 +30323,18 @@ class DocumentDocumentConversationChildChildTableCellChildTraceMessage(BaseModel message_type: Optional[Literal["message", "thinking"]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + role: Optional[Literal["user", "assistant"]] = None timestamp: Optional[datetime] = None @@ -16540,6 +30365,18 @@ class DocumentDocumentConversationChildChildTableCell(BaseModel): children: Optional[List[DocumentDocumentConversationChildChildTableCellChild]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + text: Optional[str] = None type: Optional[Literal["table_cell"]] = None @@ -16550,6 +30387,18 @@ class DocumentDocumentConversationChildChildTableRow(BaseModel): children: Optional[List[object]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + text: Optional[str] = None type: Optional[Literal["table_row"]] = None @@ -16562,6 +30411,18 @@ class DocumentDocumentConversationChildChildText(BaseModel): marks: Optional[List[Literal["bold", "italic", "underline", "strikethrough", "code", "math"]]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["text"]] = None @@ -16578,6 +30439,18 @@ class DocumentDocumentConversationChildChildToDoChildBlob(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["blob"]] = None @@ -16588,6 +30461,18 @@ class DocumentDocumentConversationChildChildToDoChildCode(BaseModel): language: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["code"]] = None @@ -16598,12 +30483,36 @@ class DocumentDocumentConversationChildChildToDoChildComment(BaseModel): created_at: Optional[datetime] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["comment"]] = None class DocumentDocumentConversationChildChildToDoChildDivider(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["divider"]] = None @@ -16614,6 +30523,18 @@ class DocumentDocumentConversationChildChildToDoChildImage(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["image"]] = None @@ -16624,12 +30545,36 @@ class DocumentDocumentConversationChildChildToDoChildLink(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["link"]] = None class DocumentDocumentConversationChildChildToDoChildLineBreak(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["line_break"]] = None @@ -16640,6 +30585,18 @@ class DocumentDocumentConversationChildChildToDoChildText(BaseModel): marks: Optional[List[Literal["bold", "italic", "underline", "strikethrough", "code", "math"]]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["text"]] = None @@ -16654,6 +30611,18 @@ class DocumentDocumentConversationChildChildToDoChildToolCall(BaseModel): args: Optional[Dict[str, object]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["tool_call"]] = None @@ -16670,6 +30639,18 @@ class DocumentDocumentConversationChildChildToDoChildToolResult(BaseModel): is_error: Optional[bool] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["tool_result"]] = None @@ -16682,6 +30663,18 @@ class DocumentDocumentConversationChildChildToDoChildTraceMessage(BaseModel): message_type: Optional[Literal["message", "thinking"]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + role: Optional[Literal["user", "assistant"]] = None timestamp: Optional[datetime] = None @@ -16712,6 +30705,18 @@ class DocumentDocumentConversationChildChildToDo(BaseModel): children: Optional[List[DocumentDocumentConversationChildChildToDoChild]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + text: Optional[str] = None type: Optional[Literal["todo"]] = None @@ -16728,6 +30733,18 @@ class DocumentDocumentConversationChildChildToolCall(BaseModel): args: Optional[Dict[str, object]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["tool_call"]] = None @@ -16744,6 +30761,18 @@ class DocumentDocumentConversationChildChildToolResult(BaseModel): is_error: Optional[bool] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["tool_result"]] = None @@ -16756,6 +30785,18 @@ class DocumentDocumentConversationChildChildTraceMessage(BaseModel): message_type: Optional[Literal["message", "thinking"]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + role: Optional[Literal["user", "assistant"]] = None timestamp: Optional[datetime] = None @@ -16777,6 +30818,18 @@ class DocumentDocumentConversationChildChildUtterance(BaseModel): end: Optional[float] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + speaker: Optional[object] = None start: Optional[float] = None @@ -16829,6 +30882,18 @@ class DocumentDocumentConversationChildMentionedUserChildBlob(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["blob"]] = None @@ -16839,6 +30904,18 @@ class DocumentDocumentConversationChildMentionedUserChildCode(BaseModel): language: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["code"]] = None @@ -16849,12 +30926,36 @@ class DocumentDocumentConversationChildMentionedUserChildComment(BaseModel): created_at: Optional[datetime] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["comment"]] = None class DocumentDocumentConversationChildMentionedUserChildDivider(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["divider"]] = None @@ -16865,6 +30966,18 @@ class DocumentDocumentConversationChildMentionedUserChildImage(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["image"]] = None @@ -16875,12 +30988,36 @@ class DocumentDocumentConversationChildMentionedUserChildLink(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["link"]] = None class DocumentDocumentConversationChildMentionedUserChildLineBreak(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["line_break"]] = None @@ -16891,6 +31028,18 @@ class DocumentDocumentConversationChildMentionedUserChildText(BaseModel): marks: Optional[List[Literal["bold", "italic", "underline", "strikethrough", "code", "math"]]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["text"]] = None @@ -16905,6 +31054,18 @@ class DocumentDocumentConversationChildMentionedUserChildToolCall(BaseModel): args: Optional[Dict[str, object]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["tool_call"]] = None @@ -16921,6 +31082,18 @@ class DocumentDocumentConversationChildMentionedUserChildToolResult(BaseModel): is_error: Optional[bool] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["tool_result"]] = None @@ -16933,6 +31106,18 @@ class DocumentDocumentConversationChildMentionedUserChildTraceMessage(BaseModel) message_type: Optional[Literal["message", "thinking"]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + role: Optional[Literal["user", "assistant"]] = None timestamp: Optional[datetime] = None @@ -16984,6 +31169,18 @@ class DocumentDocumentConversationChildMentionedUser(BaseModel): link_urls: Optional[List[str]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + name: Optional[str] = None phone_numbers: Optional[List[str]] = None @@ -17019,6 +31216,18 @@ class DocumentDocumentConversationChild(BaseModel): mentioned_users: Optional[List[DocumentDocumentConversationChildMentionedUser]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + num_replies: Optional[int] = None replies: Optional[List[object]] = None @@ -17046,6 +31255,18 @@ class DocumentDocumentConversation(BaseModel): children: Optional[List[DocumentDocumentConversationChild]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + text: Optional[str] = None type: Optional[Literal["conversation"]] = None @@ -17060,6 +31281,18 @@ class DocumentDocumentTraceChildTraceMessage(BaseModel): message_type: Optional[Literal["message", "thinking"]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + role: Optional[Literal["user", "assistant"]] = None timestamp: Optional[datetime] = None @@ -17078,6 +31311,18 @@ class DocumentDocumentTraceChildToolCall(BaseModel): args: Optional[Dict[str, object]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["tool_call"]] = None @@ -17094,6 +31339,18 @@ class DocumentDocumentTraceChildToolResult(BaseModel): is_error: Optional[bool] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["tool_result"]] = None @@ -17116,6 +31373,18 @@ class DocumentDocumentTrace(BaseModel): children: Optional[List[DocumentDocumentTraceChild]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + text: Optional[str] = None title: Optional[str] = None @@ -17137,6 +31406,18 @@ class DocumentDocumentTranscriptChild(BaseModel): end: Optional[float] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + speaker: Optional[object] = None start: Optional[float] = None @@ -17157,6 +31438,18 @@ class DocumentDocumentTranscriptParticipantChildBlob(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["blob"]] = None @@ -17167,6 +31460,18 @@ class DocumentDocumentTranscriptParticipantChildCode(BaseModel): language: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["code"]] = None @@ -17177,12 +31482,36 @@ class DocumentDocumentTranscriptParticipantChildComment(BaseModel): created_at: Optional[datetime] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["comment"]] = None class DocumentDocumentTranscriptParticipantChildDivider(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["divider"]] = None @@ -17193,6 +31522,18 @@ class DocumentDocumentTranscriptParticipantChildImage(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["image"]] = None @@ -17203,12 +31544,36 @@ class DocumentDocumentTranscriptParticipantChildLink(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["link"]] = None class DocumentDocumentTranscriptParticipantChildLineBreak(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["line_break"]] = None @@ -17219,6 +31584,18 @@ class DocumentDocumentTranscriptParticipantChildText(BaseModel): marks: Optional[List[Literal["bold", "italic", "underline", "strikethrough", "code", "math"]]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["text"]] = None @@ -17233,6 +31610,18 @@ class DocumentDocumentTranscriptParticipantChildToolCall(BaseModel): args: Optional[Dict[str, object]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["tool_call"]] = None @@ -17249,6 +31638,18 @@ class DocumentDocumentTranscriptParticipantChildToolResult(BaseModel): is_error: Optional[bool] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["tool_result"]] = None @@ -17261,6 +31662,18 @@ class DocumentDocumentTranscriptParticipantChildTraceMessage(BaseModel): message_type: Optional[Literal["message", "thinking"]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + role: Optional[Literal["user", "assistant"]] = None timestamp: Optional[datetime] = None @@ -17312,6 +31725,18 @@ class DocumentDocumentTranscriptParticipant(BaseModel): link_urls: Optional[List[str]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + name: Optional[str] = None phone_numbers: Optional[List[str]] = None @@ -17340,6 +31765,18 @@ class DocumentDocumentTranscript(BaseModel): ended_at: Optional[datetime] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + participants: Optional[List[DocumentDocumentTranscriptParticipant]] = None started_at: Optional[datetime] = None @@ -17364,6 +31801,18 @@ class DocumentDocumentCompanyChildBlob(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["blob"]] = None @@ -17380,6 +31829,18 @@ class DocumentDocumentCompanyChildCalloutChildBlob(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["blob"]] = None @@ -17390,6 +31851,18 @@ class DocumentDocumentCompanyChildCalloutChildCode(BaseModel): language: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["code"]] = None @@ -17400,12 +31873,36 @@ class DocumentDocumentCompanyChildCalloutChildComment(BaseModel): created_at: Optional[datetime] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["comment"]] = None class DocumentDocumentCompanyChildCalloutChildDivider(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["divider"]] = None @@ -17416,6 +31913,18 @@ class DocumentDocumentCompanyChildCalloutChildImage(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["image"]] = None @@ -17426,12 +31935,36 @@ class DocumentDocumentCompanyChildCalloutChildLink(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["link"]] = None class DocumentDocumentCompanyChildCalloutChildLineBreak(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["line_break"]] = None @@ -17442,6 +31975,18 @@ class DocumentDocumentCompanyChildCalloutChildText(BaseModel): marks: Optional[List[Literal["bold", "italic", "underline", "strikethrough", "code", "math"]]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["text"]] = None @@ -17456,6 +32001,18 @@ class DocumentDocumentCompanyChildCalloutChildToolCall(BaseModel): args: Optional[Dict[str, object]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["tool_call"]] = None @@ -17472,6 +32029,18 @@ class DocumentDocumentCompanyChildCalloutChildToolResult(BaseModel): is_error: Optional[bool] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["tool_result"]] = None @@ -17484,6 +32053,18 @@ class DocumentDocumentCompanyChildCalloutChildTraceMessage(BaseModel): message_type: Optional[Literal["message", "thinking"]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + role: Optional[Literal["user", "assistant"]] = None timestamp: Optional[datetime] = None @@ -17512,6 +32093,18 @@ class DocumentDocumentCompanyChildCallout(BaseModel): children: Optional[List[DocumentDocumentCompanyChildCalloutChild]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + text: Optional[str] = None title: Optional[str] = None @@ -17532,6 +32125,18 @@ class DocumentDocumentCompanyChildChunkChildBlob(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["blob"]] = None @@ -17542,6 +32147,18 @@ class DocumentDocumentCompanyChildChunkChildCode(BaseModel): language: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["code"]] = None @@ -17552,12 +32169,36 @@ class DocumentDocumentCompanyChildChunkChildComment(BaseModel): created_at: Optional[datetime] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["comment"]] = None class DocumentDocumentCompanyChildChunkChildDivider(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["divider"]] = None @@ -17568,6 +32209,18 @@ class DocumentDocumentCompanyChildChunkChildImage(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["image"]] = None @@ -17578,12 +32231,36 @@ class DocumentDocumentCompanyChildChunkChildLink(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["link"]] = None class DocumentDocumentCompanyChildChunkChildLineBreak(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["line_break"]] = None @@ -17594,6 +32271,18 @@ class DocumentDocumentCompanyChildChunkChildText(BaseModel): marks: Optional[List[Literal["bold", "italic", "underline", "strikethrough", "code", "math"]]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["text"]] = None @@ -17608,6 +32297,18 @@ class DocumentDocumentCompanyChildChunkChildToolCall(BaseModel): args: Optional[Dict[str, object]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["tool_call"]] = None @@ -17624,6 +32325,18 @@ class DocumentDocumentCompanyChildChunkChildToolResult(BaseModel): is_error: Optional[bool] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["tool_result"]] = None @@ -17636,6 +32349,18 @@ class DocumentDocumentCompanyChildChunkChildTraceMessage(BaseModel): message_type: Optional[Literal["message", "thinking"]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + role: Optional[Literal["user", "assistant"]] = None timestamp: Optional[datetime] = None @@ -17664,6 +32389,18 @@ class DocumentDocumentCompanyChildChunk(BaseModel): children: Optional[List[DocumentDocumentCompanyChildChunkChild]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + text: Optional[str] = None type: Optional[Literal["chunk"]] = None @@ -17676,6 +32413,18 @@ class DocumentDocumentCompanyChildCode(BaseModel): language: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["code"]] = None @@ -17686,12 +32435,36 @@ class DocumentDocumentCompanyChildComment(BaseModel): created_at: Optional[datetime] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["comment"]] = None class DocumentDocumentCompanyChildDivider(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["divider"]] = None @@ -17708,6 +32481,18 @@ class DocumentDocumentCompanyChildEquationChildBlob(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["blob"]] = None @@ -17718,6 +32503,18 @@ class DocumentDocumentCompanyChildEquationChildCode(BaseModel): language: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["code"]] = None @@ -17728,12 +32525,36 @@ class DocumentDocumentCompanyChildEquationChildComment(BaseModel): created_at: Optional[datetime] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["comment"]] = None class DocumentDocumentCompanyChildEquationChildDivider(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["divider"]] = None @@ -17744,6 +32565,18 @@ class DocumentDocumentCompanyChildEquationChildImage(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["image"]] = None @@ -17754,12 +32587,36 @@ class DocumentDocumentCompanyChildEquationChildLink(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["link"]] = None class DocumentDocumentCompanyChildEquationChildLineBreak(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["line_break"]] = None @@ -17770,6 +32627,18 @@ class DocumentDocumentCompanyChildEquationChildText(BaseModel): marks: Optional[List[Literal["bold", "italic", "underline", "strikethrough", "code", "math"]]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["text"]] = None @@ -17784,6 +32653,18 @@ class DocumentDocumentCompanyChildEquationChildToolCall(BaseModel): args: Optional[Dict[str, object]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["tool_call"]] = None @@ -17800,6 +32681,18 @@ class DocumentDocumentCompanyChildEquationChildToolResult(BaseModel): is_error: Optional[bool] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["tool_result"]] = None @@ -17812,6 +32705,18 @@ class DocumentDocumentCompanyChildEquationChildTraceMessage(BaseModel): message_type: Optional[Literal["message", "thinking"]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + role: Optional[Literal["user", "assistant"]] = None timestamp: Optional[datetime] = None @@ -17840,6 +32745,18 @@ class DocumentDocumentCompanyChildEquation(BaseModel): children: Optional[List[DocumentDocumentCompanyChildEquationChild]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + text: Optional[str] = None type: Optional[Literal["equation"]] = None @@ -17858,6 +32775,18 @@ class DocumentDocumentCompanyChildFootnoteChildBlob(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["blob"]] = None @@ -17868,6 +32797,18 @@ class DocumentDocumentCompanyChildFootnoteChildCode(BaseModel): language: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["code"]] = None @@ -17878,12 +32819,36 @@ class DocumentDocumentCompanyChildFootnoteChildComment(BaseModel): created_at: Optional[datetime] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["comment"]] = None class DocumentDocumentCompanyChildFootnoteChildDivider(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["divider"]] = None @@ -17894,6 +32859,18 @@ class DocumentDocumentCompanyChildFootnoteChildImage(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["image"]] = None @@ -17904,12 +32881,36 @@ class DocumentDocumentCompanyChildFootnoteChildLink(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["link"]] = None class DocumentDocumentCompanyChildFootnoteChildLineBreak(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["line_break"]] = None @@ -17920,6 +32921,18 @@ class DocumentDocumentCompanyChildFootnoteChildText(BaseModel): marks: Optional[List[Literal["bold", "italic", "underline", "strikethrough", "code", "math"]]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["text"]] = None @@ -17934,6 +32947,18 @@ class DocumentDocumentCompanyChildFootnoteChildToolCall(BaseModel): args: Optional[Dict[str, object]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["tool_call"]] = None @@ -17950,6 +32975,18 @@ class DocumentDocumentCompanyChildFootnoteChildToolResult(BaseModel): is_error: Optional[bool] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["tool_result"]] = None @@ -17962,6 +32999,18 @@ class DocumentDocumentCompanyChildFootnoteChildTraceMessage(BaseModel): message_type: Optional[Literal["message", "thinking"]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + role: Optional[Literal["user", "assistant"]] = None timestamp: Optional[datetime] = None @@ -17990,6 +33039,18 @@ class DocumentDocumentCompanyChildFootnote(BaseModel): children: Optional[List[DocumentDocumentCompanyChildFootnoteChild]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + text: Optional[str] = None type: Optional[Literal["footnote"]] = None @@ -18008,6 +33069,18 @@ class DocumentDocumentCompanyChildHeadingChildBlob(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["blob"]] = None @@ -18018,6 +33091,18 @@ class DocumentDocumentCompanyChildHeadingChildCode(BaseModel): language: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["code"]] = None @@ -18028,12 +33113,36 @@ class DocumentDocumentCompanyChildHeadingChildComment(BaseModel): created_at: Optional[datetime] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["comment"]] = None class DocumentDocumentCompanyChildHeadingChildDivider(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["divider"]] = None @@ -18044,6 +33153,18 @@ class DocumentDocumentCompanyChildHeadingChildImage(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["image"]] = None @@ -18054,12 +33175,36 @@ class DocumentDocumentCompanyChildHeadingChildLink(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["link"]] = None class DocumentDocumentCompanyChildHeadingChildLineBreak(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["line_break"]] = None @@ -18070,6 +33215,18 @@ class DocumentDocumentCompanyChildHeadingChildText(BaseModel): marks: Optional[List[Literal["bold", "italic", "underline", "strikethrough", "code", "math"]]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["text"]] = None @@ -18084,6 +33241,18 @@ class DocumentDocumentCompanyChildHeadingChildToolCall(BaseModel): args: Optional[Dict[str, object]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["tool_call"]] = None @@ -18100,6 +33269,18 @@ class DocumentDocumentCompanyChildHeadingChildToolResult(BaseModel): is_error: Optional[bool] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["tool_result"]] = None @@ -18112,6 +33293,18 @@ class DocumentDocumentCompanyChildHeadingChildTraceMessage(BaseModel): message_type: Optional[Literal["message", "thinking"]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + role: Optional[Literal["user", "assistant"]] = None timestamp: Optional[datetime] = None @@ -18142,6 +33335,18 @@ class DocumentDocumentCompanyChildHeading(BaseModel): children: Optional[List[DocumentDocumentCompanyChildHeadingChild]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + text: Optional[str] = None type: Optional[Literal["heading"]] = None @@ -18154,6 +33359,18 @@ class DocumentDocumentCompanyChildImage(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["image"]] = None @@ -18164,12 +33381,36 @@ class DocumentDocumentCompanyChildLink(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["link"]] = None class DocumentDocumentCompanyChildLineBreak(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["line_break"]] = None @@ -18178,6 +33419,18 @@ class DocumentDocumentCompanyChildList(BaseModel): children: Optional[List[object]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + ordered: Optional[bool] = None text: Optional[str] = None @@ -18198,6 +33451,18 @@ class DocumentDocumentCompanyChildListItemChildBlob(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["blob"]] = None @@ -18208,6 +33473,18 @@ class DocumentDocumentCompanyChildListItemChildCode(BaseModel): language: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["code"]] = None @@ -18218,12 +33495,36 @@ class DocumentDocumentCompanyChildListItemChildComment(BaseModel): created_at: Optional[datetime] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["comment"]] = None class DocumentDocumentCompanyChildListItemChildDivider(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["divider"]] = None @@ -18234,6 +33535,18 @@ class DocumentDocumentCompanyChildListItemChildImage(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["image"]] = None @@ -18244,12 +33557,36 @@ class DocumentDocumentCompanyChildListItemChildLink(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["link"]] = None class DocumentDocumentCompanyChildListItemChildLineBreak(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["line_break"]] = None @@ -18260,6 +33597,18 @@ class DocumentDocumentCompanyChildListItemChildText(BaseModel): marks: Optional[List[Literal["bold", "italic", "underline", "strikethrough", "code", "math"]]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["text"]] = None @@ -18274,6 +33623,18 @@ class DocumentDocumentCompanyChildListItemChildToolCall(BaseModel): args: Optional[Dict[str, object]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["tool_call"]] = None @@ -18290,6 +33651,18 @@ class DocumentDocumentCompanyChildListItemChildToolResult(BaseModel): is_error: Optional[bool] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["tool_result"]] = None @@ -18302,6 +33675,18 @@ class DocumentDocumentCompanyChildListItemChildTraceMessage(BaseModel): message_type: Optional[Literal["message", "thinking"]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + role: Optional[Literal["user", "assistant"]] = None timestamp: Optional[datetime] = None @@ -18330,6 +33715,18 @@ class DocumentDocumentCompanyChildListItem(BaseModel): children: Optional[List[DocumentDocumentCompanyChildListItemChild]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + text: Optional[str] = None type: Optional[Literal["list_item"]] = None @@ -18348,6 +33745,18 @@ class DocumentDocumentCompanyChildParagraphChildBlob(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["blob"]] = None @@ -18358,6 +33767,18 @@ class DocumentDocumentCompanyChildParagraphChildCode(BaseModel): language: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["code"]] = None @@ -18368,12 +33789,36 @@ class DocumentDocumentCompanyChildParagraphChildComment(BaseModel): created_at: Optional[datetime] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["comment"]] = None class DocumentDocumentCompanyChildParagraphChildDivider(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["divider"]] = None @@ -18384,6 +33829,18 @@ class DocumentDocumentCompanyChildParagraphChildImage(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["image"]] = None @@ -18394,12 +33851,36 @@ class DocumentDocumentCompanyChildParagraphChildLink(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["link"]] = None class DocumentDocumentCompanyChildParagraphChildLineBreak(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["line_break"]] = None @@ -18410,6 +33891,18 @@ class DocumentDocumentCompanyChildParagraphChildText(BaseModel): marks: Optional[List[Literal["bold", "italic", "underline", "strikethrough", "code", "math"]]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["text"]] = None @@ -18424,6 +33917,18 @@ class DocumentDocumentCompanyChildParagraphChildToolCall(BaseModel): args: Optional[Dict[str, object]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["tool_call"]] = None @@ -18440,6 +33945,18 @@ class DocumentDocumentCompanyChildParagraphChildToolResult(BaseModel): is_error: Optional[bool] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["tool_result"]] = None @@ -18452,6 +33969,18 @@ class DocumentDocumentCompanyChildParagraphChildTraceMessage(BaseModel): message_type: Optional[Literal["message", "thinking"]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + role: Optional[Literal["user", "assistant"]] = None timestamp: Optional[datetime] = None @@ -18480,6 +34009,18 @@ class DocumentDocumentCompanyChildParagraph(BaseModel): children: Optional[List[DocumentDocumentCompanyChildParagraphChild]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + text: Optional[str] = None type: Optional[Literal["paragraph"]] = None @@ -18498,6 +34039,18 @@ class DocumentDocumentCompanyChildQuoteChildBlob(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["blob"]] = None @@ -18508,6 +34061,18 @@ class DocumentDocumentCompanyChildQuoteChildCode(BaseModel): language: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["code"]] = None @@ -18518,12 +34083,36 @@ class DocumentDocumentCompanyChildQuoteChildComment(BaseModel): created_at: Optional[datetime] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["comment"]] = None class DocumentDocumentCompanyChildQuoteChildDivider(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["divider"]] = None @@ -18534,6 +34123,18 @@ class DocumentDocumentCompanyChildQuoteChildImage(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["image"]] = None @@ -18544,12 +34145,36 @@ class DocumentDocumentCompanyChildQuoteChildLink(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["link"]] = None class DocumentDocumentCompanyChildQuoteChildLineBreak(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["line_break"]] = None @@ -18560,6 +34185,18 @@ class DocumentDocumentCompanyChildQuoteChildText(BaseModel): marks: Optional[List[Literal["bold", "italic", "underline", "strikethrough", "code", "math"]]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["text"]] = None @@ -18574,6 +34211,18 @@ class DocumentDocumentCompanyChildQuoteChildToolCall(BaseModel): args: Optional[Dict[str, object]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["tool_call"]] = None @@ -18590,6 +34239,18 @@ class DocumentDocumentCompanyChildQuoteChildToolResult(BaseModel): is_error: Optional[bool] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["tool_result"]] = None @@ -18602,6 +34263,18 @@ class DocumentDocumentCompanyChildQuoteChildTraceMessage(BaseModel): message_type: Optional[Literal["message", "thinking"]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + role: Optional[Literal["user", "assistant"]] = None timestamp: Optional[datetime] = None @@ -18630,6 +34303,18 @@ class DocumentDocumentCompanyChildQuote(BaseModel): children: Optional[List[DocumentDocumentCompanyChildQuoteChild]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + text: Optional[str] = None type: Optional[Literal["quote"]] = None @@ -18643,6 +34328,18 @@ class DocumentDocumentCompanyChildTable(BaseModel): has_header: Optional[bool] = None """Whether the first row should be treated as a header""" + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + text: Optional[str] = None type: Optional[Literal["table"]] = None @@ -18661,6 +34358,18 @@ class DocumentDocumentCompanyChildTableCellChildBlob(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["blob"]] = None @@ -18671,6 +34380,18 @@ class DocumentDocumentCompanyChildTableCellChildCode(BaseModel): language: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["code"]] = None @@ -18681,12 +34402,36 @@ class DocumentDocumentCompanyChildTableCellChildComment(BaseModel): created_at: Optional[datetime] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["comment"]] = None class DocumentDocumentCompanyChildTableCellChildDivider(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["divider"]] = None @@ -18697,6 +34442,18 @@ class DocumentDocumentCompanyChildTableCellChildImage(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["image"]] = None @@ -18707,12 +34464,36 @@ class DocumentDocumentCompanyChildTableCellChildLink(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["link"]] = None class DocumentDocumentCompanyChildTableCellChildLineBreak(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["line_break"]] = None @@ -18723,6 +34504,18 @@ class DocumentDocumentCompanyChildTableCellChildText(BaseModel): marks: Optional[List[Literal["bold", "italic", "underline", "strikethrough", "code", "math"]]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["text"]] = None @@ -18737,6 +34530,18 @@ class DocumentDocumentCompanyChildTableCellChildToolCall(BaseModel): args: Optional[Dict[str, object]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["tool_call"]] = None @@ -18753,6 +34558,18 @@ class DocumentDocumentCompanyChildTableCellChildToolResult(BaseModel): is_error: Optional[bool] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["tool_result"]] = None @@ -18765,6 +34582,18 @@ class DocumentDocumentCompanyChildTableCellChildTraceMessage(BaseModel): message_type: Optional[Literal["message", "thinking"]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + role: Optional[Literal["user", "assistant"]] = None timestamp: Optional[datetime] = None @@ -18795,6 +34624,18 @@ class DocumentDocumentCompanyChildTableCell(BaseModel): children: Optional[List[DocumentDocumentCompanyChildTableCellChild]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + text: Optional[str] = None type: Optional[Literal["table_cell"]] = None @@ -18805,6 +34646,18 @@ class DocumentDocumentCompanyChildTableRow(BaseModel): children: Optional[List[object]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + text: Optional[str] = None type: Optional[Literal["table_row"]] = None @@ -18817,6 +34670,18 @@ class DocumentDocumentCompanyChildText(BaseModel): marks: Optional[List[Literal["bold", "italic", "underline", "strikethrough", "code", "math"]]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["text"]] = None @@ -18833,6 +34698,18 @@ class DocumentDocumentCompanyChildToDoChildBlob(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["blob"]] = None @@ -18843,6 +34720,18 @@ class DocumentDocumentCompanyChildToDoChildCode(BaseModel): language: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["code"]] = None @@ -18853,12 +34742,36 @@ class DocumentDocumentCompanyChildToDoChildComment(BaseModel): created_at: Optional[datetime] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["comment"]] = None class DocumentDocumentCompanyChildToDoChildDivider(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["divider"]] = None @@ -18869,6 +34782,18 @@ class DocumentDocumentCompanyChildToDoChildImage(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["image"]] = None @@ -18879,12 +34804,36 @@ class DocumentDocumentCompanyChildToDoChildLink(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["link"]] = None class DocumentDocumentCompanyChildToDoChildLineBreak(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["line_break"]] = None @@ -18895,6 +34844,18 @@ class DocumentDocumentCompanyChildToDoChildText(BaseModel): marks: Optional[List[Literal["bold", "italic", "underline", "strikethrough", "code", "math"]]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["text"]] = None @@ -18909,6 +34870,18 @@ class DocumentDocumentCompanyChildToDoChildToolCall(BaseModel): args: Optional[Dict[str, object]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["tool_call"]] = None @@ -18925,6 +34898,18 @@ class DocumentDocumentCompanyChildToDoChildToolResult(BaseModel): is_error: Optional[bool] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["tool_result"]] = None @@ -18937,6 +34922,18 @@ class DocumentDocumentCompanyChildToDoChildTraceMessage(BaseModel): message_type: Optional[Literal["message", "thinking"]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + role: Optional[Literal["user", "assistant"]] = None timestamp: Optional[datetime] = None @@ -18967,6 +34964,18 @@ class DocumentDocumentCompanyChildToDo(BaseModel): children: Optional[List[DocumentDocumentCompanyChildToDoChild]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + text: Optional[str] = None type: Optional[Literal["todo"]] = None @@ -18983,6 +34992,18 @@ class DocumentDocumentCompanyChildToolCall(BaseModel): args: Optional[Dict[str, object]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["tool_call"]] = None @@ -18999,6 +35020,18 @@ class DocumentDocumentCompanyChildToolResult(BaseModel): is_error: Optional[bool] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["tool_result"]] = None @@ -19011,6 +35044,18 @@ class DocumentDocumentCompanyChildTraceMessage(BaseModel): message_type: Optional[Literal["message", "thinking"]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + role: Optional[Literal["user", "assistant"]] = None timestamp: Optional[datetime] = None @@ -19032,6 +35077,18 @@ class DocumentDocumentCompanyChildUtterance(BaseModel): end: Optional[float] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + speaker: Optional[object] = None start: Optional[float] = None @@ -19096,6 +35153,18 @@ class DocumentDocumentCompany(BaseModel): is_active: Optional[bool] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + name: Optional[str] = None phone_numbers: Optional[List[str]] = None @@ -19124,6 +35193,18 @@ class DocumentDocumentDealChildBlob(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["blob"]] = None @@ -19140,6 +35221,18 @@ class DocumentDocumentDealChildCalloutChildBlob(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["blob"]] = None @@ -19150,6 +35243,18 @@ class DocumentDocumentDealChildCalloutChildCode(BaseModel): language: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["code"]] = None @@ -19160,12 +35265,36 @@ class DocumentDocumentDealChildCalloutChildComment(BaseModel): created_at: Optional[datetime] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["comment"]] = None class DocumentDocumentDealChildCalloutChildDivider(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["divider"]] = None @@ -19176,6 +35305,18 @@ class DocumentDocumentDealChildCalloutChildImage(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["image"]] = None @@ -19186,12 +35327,36 @@ class DocumentDocumentDealChildCalloutChildLink(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["link"]] = None class DocumentDocumentDealChildCalloutChildLineBreak(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["line_break"]] = None @@ -19202,6 +35367,18 @@ class DocumentDocumentDealChildCalloutChildText(BaseModel): marks: Optional[List[Literal["bold", "italic", "underline", "strikethrough", "code", "math"]]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["text"]] = None @@ -19216,6 +35393,18 @@ class DocumentDocumentDealChildCalloutChildToolCall(BaseModel): args: Optional[Dict[str, object]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["tool_call"]] = None @@ -19232,6 +35421,18 @@ class DocumentDocumentDealChildCalloutChildToolResult(BaseModel): is_error: Optional[bool] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["tool_result"]] = None @@ -19244,6 +35445,18 @@ class DocumentDocumentDealChildCalloutChildTraceMessage(BaseModel): message_type: Optional[Literal["message", "thinking"]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + role: Optional[Literal["user", "assistant"]] = None timestamp: Optional[datetime] = None @@ -19272,6 +35485,18 @@ class DocumentDocumentDealChildCallout(BaseModel): children: Optional[List[DocumentDocumentDealChildCalloutChild]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + text: Optional[str] = None title: Optional[str] = None @@ -19292,6 +35517,18 @@ class DocumentDocumentDealChildChunkChildBlob(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["blob"]] = None @@ -19302,6 +35539,18 @@ class DocumentDocumentDealChildChunkChildCode(BaseModel): language: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["code"]] = None @@ -19312,12 +35561,36 @@ class DocumentDocumentDealChildChunkChildComment(BaseModel): created_at: Optional[datetime] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["comment"]] = None class DocumentDocumentDealChildChunkChildDivider(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["divider"]] = None @@ -19328,6 +35601,18 @@ class DocumentDocumentDealChildChunkChildImage(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["image"]] = None @@ -19338,12 +35623,36 @@ class DocumentDocumentDealChildChunkChildLink(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["link"]] = None class DocumentDocumentDealChildChunkChildLineBreak(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["line_break"]] = None @@ -19354,6 +35663,18 @@ class DocumentDocumentDealChildChunkChildText(BaseModel): marks: Optional[List[Literal["bold", "italic", "underline", "strikethrough", "code", "math"]]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["text"]] = None @@ -19368,6 +35689,18 @@ class DocumentDocumentDealChildChunkChildToolCall(BaseModel): args: Optional[Dict[str, object]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["tool_call"]] = None @@ -19384,6 +35717,18 @@ class DocumentDocumentDealChildChunkChildToolResult(BaseModel): is_error: Optional[bool] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["tool_result"]] = None @@ -19396,6 +35741,18 @@ class DocumentDocumentDealChildChunkChildTraceMessage(BaseModel): message_type: Optional[Literal["message", "thinking"]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + role: Optional[Literal["user", "assistant"]] = None timestamp: Optional[datetime] = None @@ -19424,6 +35781,18 @@ class DocumentDocumentDealChildChunk(BaseModel): children: Optional[List[DocumentDocumentDealChildChunkChild]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + text: Optional[str] = None type: Optional[Literal["chunk"]] = None @@ -19436,6 +35805,18 @@ class DocumentDocumentDealChildCode(BaseModel): language: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["code"]] = None @@ -19446,12 +35827,36 @@ class DocumentDocumentDealChildComment(BaseModel): created_at: Optional[datetime] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["comment"]] = None class DocumentDocumentDealChildDivider(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["divider"]] = None @@ -19468,6 +35873,18 @@ class DocumentDocumentDealChildEquationChildBlob(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["blob"]] = None @@ -19478,6 +35895,18 @@ class DocumentDocumentDealChildEquationChildCode(BaseModel): language: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["code"]] = None @@ -19488,12 +35917,36 @@ class DocumentDocumentDealChildEquationChildComment(BaseModel): created_at: Optional[datetime] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["comment"]] = None class DocumentDocumentDealChildEquationChildDivider(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["divider"]] = None @@ -19504,6 +35957,18 @@ class DocumentDocumentDealChildEquationChildImage(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["image"]] = None @@ -19514,12 +35979,36 @@ class DocumentDocumentDealChildEquationChildLink(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["link"]] = None class DocumentDocumentDealChildEquationChildLineBreak(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["line_break"]] = None @@ -19530,6 +36019,18 @@ class DocumentDocumentDealChildEquationChildText(BaseModel): marks: Optional[List[Literal["bold", "italic", "underline", "strikethrough", "code", "math"]]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["text"]] = None @@ -19544,6 +36045,18 @@ class DocumentDocumentDealChildEquationChildToolCall(BaseModel): args: Optional[Dict[str, object]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["tool_call"]] = None @@ -19560,6 +36073,18 @@ class DocumentDocumentDealChildEquationChildToolResult(BaseModel): is_error: Optional[bool] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["tool_result"]] = None @@ -19572,6 +36097,18 @@ class DocumentDocumentDealChildEquationChildTraceMessage(BaseModel): message_type: Optional[Literal["message", "thinking"]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + role: Optional[Literal["user", "assistant"]] = None timestamp: Optional[datetime] = None @@ -19600,6 +36137,18 @@ class DocumentDocumentDealChildEquation(BaseModel): children: Optional[List[DocumentDocumentDealChildEquationChild]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + text: Optional[str] = None type: Optional[Literal["equation"]] = None @@ -19618,6 +36167,18 @@ class DocumentDocumentDealChildFootnoteChildBlob(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["blob"]] = None @@ -19628,6 +36189,18 @@ class DocumentDocumentDealChildFootnoteChildCode(BaseModel): language: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["code"]] = None @@ -19638,12 +36211,36 @@ class DocumentDocumentDealChildFootnoteChildComment(BaseModel): created_at: Optional[datetime] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["comment"]] = None class DocumentDocumentDealChildFootnoteChildDivider(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["divider"]] = None @@ -19654,6 +36251,18 @@ class DocumentDocumentDealChildFootnoteChildImage(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["image"]] = None @@ -19664,12 +36273,36 @@ class DocumentDocumentDealChildFootnoteChildLink(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["link"]] = None class DocumentDocumentDealChildFootnoteChildLineBreak(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["line_break"]] = None @@ -19680,6 +36313,18 @@ class DocumentDocumentDealChildFootnoteChildText(BaseModel): marks: Optional[List[Literal["bold", "italic", "underline", "strikethrough", "code", "math"]]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["text"]] = None @@ -19694,6 +36339,18 @@ class DocumentDocumentDealChildFootnoteChildToolCall(BaseModel): args: Optional[Dict[str, object]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["tool_call"]] = None @@ -19710,6 +36367,18 @@ class DocumentDocumentDealChildFootnoteChildToolResult(BaseModel): is_error: Optional[bool] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["tool_result"]] = None @@ -19722,6 +36391,18 @@ class DocumentDocumentDealChildFootnoteChildTraceMessage(BaseModel): message_type: Optional[Literal["message", "thinking"]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + role: Optional[Literal["user", "assistant"]] = None timestamp: Optional[datetime] = None @@ -19750,6 +36431,18 @@ class DocumentDocumentDealChildFootnote(BaseModel): children: Optional[List[DocumentDocumentDealChildFootnoteChild]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + text: Optional[str] = None type: Optional[Literal["footnote"]] = None @@ -19768,6 +36461,18 @@ class DocumentDocumentDealChildHeadingChildBlob(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["blob"]] = None @@ -19778,6 +36483,18 @@ class DocumentDocumentDealChildHeadingChildCode(BaseModel): language: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["code"]] = None @@ -19788,12 +36505,36 @@ class DocumentDocumentDealChildHeadingChildComment(BaseModel): created_at: Optional[datetime] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["comment"]] = None class DocumentDocumentDealChildHeadingChildDivider(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["divider"]] = None @@ -19804,6 +36545,18 @@ class DocumentDocumentDealChildHeadingChildImage(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["image"]] = None @@ -19814,12 +36567,36 @@ class DocumentDocumentDealChildHeadingChildLink(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["link"]] = None class DocumentDocumentDealChildHeadingChildLineBreak(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["line_break"]] = None @@ -19830,6 +36607,18 @@ class DocumentDocumentDealChildHeadingChildText(BaseModel): marks: Optional[List[Literal["bold", "italic", "underline", "strikethrough", "code", "math"]]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["text"]] = None @@ -19844,6 +36633,18 @@ class DocumentDocumentDealChildHeadingChildToolCall(BaseModel): args: Optional[Dict[str, object]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["tool_call"]] = None @@ -19860,6 +36661,18 @@ class DocumentDocumentDealChildHeadingChildToolResult(BaseModel): is_error: Optional[bool] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["tool_result"]] = None @@ -19872,6 +36685,18 @@ class DocumentDocumentDealChildHeadingChildTraceMessage(BaseModel): message_type: Optional[Literal["message", "thinking"]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + role: Optional[Literal["user", "assistant"]] = None timestamp: Optional[datetime] = None @@ -19902,6 +36727,18 @@ class DocumentDocumentDealChildHeading(BaseModel): children: Optional[List[DocumentDocumentDealChildHeadingChild]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + text: Optional[str] = None type: Optional[Literal["heading"]] = None @@ -19914,6 +36751,18 @@ class DocumentDocumentDealChildImage(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["image"]] = None @@ -19924,12 +36773,36 @@ class DocumentDocumentDealChildLink(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["link"]] = None class DocumentDocumentDealChildLineBreak(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["line_break"]] = None @@ -19938,6 +36811,18 @@ class DocumentDocumentDealChildList(BaseModel): children: Optional[List[object]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + ordered: Optional[bool] = None text: Optional[str] = None @@ -19958,6 +36843,18 @@ class DocumentDocumentDealChildListItemChildBlob(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["blob"]] = None @@ -19968,6 +36865,18 @@ class DocumentDocumentDealChildListItemChildCode(BaseModel): language: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["code"]] = None @@ -19978,12 +36887,36 @@ class DocumentDocumentDealChildListItemChildComment(BaseModel): created_at: Optional[datetime] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["comment"]] = None class DocumentDocumentDealChildListItemChildDivider(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["divider"]] = None @@ -19994,6 +36927,18 @@ class DocumentDocumentDealChildListItemChildImage(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["image"]] = None @@ -20004,12 +36949,36 @@ class DocumentDocumentDealChildListItemChildLink(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["link"]] = None class DocumentDocumentDealChildListItemChildLineBreak(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["line_break"]] = None @@ -20020,6 +36989,18 @@ class DocumentDocumentDealChildListItemChildText(BaseModel): marks: Optional[List[Literal["bold", "italic", "underline", "strikethrough", "code", "math"]]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["text"]] = None @@ -20034,6 +37015,18 @@ class DocumentDocumentDealChildListItemChildToolCall(BaseModel): args: Optional[Dict[str, object]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["tool_call"]] = None @@ -20050,6 +37043,18 @@ class DocumentDocumentDealChildListItemChildToolResult(BaseModel): is_error: Optional[bool] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["tool_result"]] = None @@ -20062,6 +37067,18 @@ class DocumentDocumentDealChildListItemChildTraceMessage(BaseModel): message_type: Optional[Literal["message", "thinking"]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + role: Optional[Literal["user", "assistant"]] = None timestamp: Optional[datetime] = None @@ -20090,6 +37107,18 @@ class DocumentDocumentDealChildListItem(BaseModel): children: Optional[List[DocumentDocumentDealChildListItemChild]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + text: Optional[str] = None type: Optional[Literal["list_item"]] = None @@ -20108,6 +37137,18 @@ class DocumentDocumentDealChildParagraphChildBlob(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["blob"]] = None @@ -20118,6 +37159,18 @@ class DocumentDocumentDealChildParagraphChildCode(BaseModel): language: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["code"]] = None @@ -20128,12 +37181,36 @@ class DocumentDocumentDealChildParagraphChildComment(BaseModel): created_at: Optional[datetime] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["comment"]] = None class DocumentDocumentDealChildParagraphChildDivider(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["divider"]] = None @@ -20144,6 +37221,18 @@ class DocumentDocumentDealChildParagraphChildImage(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["image"]] = None @@ -20154,12 +37243,36 @@ class DocumentDocumentDealChildParagraphChildLink(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["link"]] = None class DocumentDocumentDealChildParagraphChildLineBreak(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["line_break"]] = None @@ -20170,6 +37283,18 @@ class DocumentDocumentDealChildParagraphChildText(BaseModel): marks: Optional[List[Literal["bold", "italic", "underline", "strikethrough", "code", "math"]]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["text"]] = None @@ -20184,6 +37309,18 @@ class DocumentDocumentDealChildParagraphChildToolCall(BaseModel): args: Optional[Dict[str, object]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["tool_call"]] = None @@ -20200,6 +37337,18 @@ class DocumentDocumentDealChildParagraphChildToolResult(BaseModel): is_error: Optional[bool] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["tool_result"]] = None @@ -20212,6 +37361,18 @@ class DocumentDocumentDealChildParagraphChildTraceMessage(BaseModel): message_type: Optional[Literal["message", "thinking"]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + role: Optional[Literal["user", "assistant"]] = None timestamp: Optional[datetime] = None @@ -20240,6 +37401,18 @@ class DocumentDocumentDealChildParagraph(BaseModel): children: Optional[List[DocumentDocumentDealChildParagraphChild]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + text: Optional[str] = None type: Optional[Literal["paragraph"]] = None @@ -20258,6 +37431,18 @@ class DocumentDocumentDealChildQuoteChildBlob(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["blob"]] = None @@ -20268,6 +37453,18 @@ class DocumentDocumentDealChildQuoteChildCode(BaseModel): language: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["code"]] = None @@ -20278,12 +37475,36 @@ class DocumentDocumentDealChildQuoteChildComment(BaseModel): created_at: Optional[datetime] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["comment"]] = None class DocumentDocumentDealChildQuoteChildDivider(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["divider"]] = None @@ -20294,6 +37515,18 @@ class DocumentDocumentDealChildQuoteChildImage(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["image"]] = None @@ -20304,12 +37537,36 @@ class DocumentDocumentDealChildQuoteChildLink(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["link"]] = None class DocumentDocumentDealChildQuoteChildLineBreak(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["line_break"]] = None @@ -20320,6 +37577,18 @@ class DocumentDocumentDealChildQuoteChildText(BaseModel): marks: Optional[List[Literal["bold", "italic", "underline", "strikethrough", "code", "math"]]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["text"]] = None @@ -20334,6 +37603,18 @@ class DocumentDocumentDealChildQuoteChildToolCall(BaseModel): args: Optional[Dict[str, object]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["tool_call"]] = None @@ -20350,6 +37631,18 @@ class DocumentDocumentDealChildQuoteChildToolResult(BaseModel): is_error: Optional[bool] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["tool_result"]] = None @@ -20362,6 +37655,18 @@ class DocumentDocumentDealChildQuoteChildTraceMessage(BaseModel): message_type: Optional[Literal["message", "thinking"]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + role: Optional[Literal["user", "assistant"]] = None timestamp: Optional[datetime] = None @@ -20390,6 +37695,18 @@ class DocumentDocumentDealChildQuote(BaseModel): children: Optional[List[DocumentDocumentDealChildQuoteChild]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + text: Optional[str] = None type: Optional[Literal["quote"]] = None @@ -20403,6 +37720,18 @@ class DocumentDocumentDealChildTable(BaseModel): has_header: Optional[bool] = None """Whether the first row should be treated as a header""" + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + text: Optional[str] = None type: Optional[Literal["table"]] = None @@ -20421,6 +37750,18 @@ class DocumentDocumentDealChildTableCellChildBlob(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["blob"]] = None @@ -20431,6 +37772,18 @@ class DocumentDocumentDealChildTableCellChildCode(BaseModel): language: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["code"]] = None @@ -20441,12 +37794,36 @@ class DocumentDocumentDealChildTableCellChildComment(BaseModel): created_at: Optional[datetime] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["comment"]] = None class DocumentDocumentDealChildTableCellChildDivider(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["divider"]] = None @@ -20457,6 +37834,18 @@ class DocumentDocumentDealChildTableCellChildImage(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["image"]] = None @@ -20467,12 +37856,36 @@ class DocumentDocumentDealChildTableCellChildLink(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["link"]] = None class DocumentDocumentDealChildTableCellChildLineBreak(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["line_break"]] = None @@ -20483,6 +37896,18 @@ class DocumentDocumentDealChildTableCellChildText(BaseModel): marks: Optional[List[Literal["bold", "italic", "underline", "strikethrough", "code", "math"]]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["text"]] = None @@ -20497,6 +37922,18 @@ class DocumentDocumentDealChildTableCellChildToolCall(BaseModel): args: Optional[Dict[str, object]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["tool_call"]] = None @@ -20513,6 +37950,18 @@ class DocumentDocumentDealChildTableCellChildToolResult(BaseModel): is_error: Optional[bool] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["tool_result"]] = None @@ -20525,6 +37974,18 @@ class DocumentDocumentDealChildTableCellChildTraceMessage(BaseModel): message_type: Optional[Literal["message", "thinking"]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + role: Optional[Literal["user", "assistant"]] = None timestamp: Optional[datetime] = None @@ -20555,6 +38016,18 @@ class DocumentDocumentDealChildTableCell(BaseModel): children: Optional[List[DocumentDocumentDealChildTableCellChild]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + text: Optional[str] = None type: Optional[Literal["table_cell"]] = None @@ -20565,6 +38038,18 @@ class DocumentDocumentDealChildTableRow(BaseModel): children: Optional[List[object]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + text: Optional[str] = None type: Optional[Literal["table_row"]] = None @@ -20577,6 +38062,18 @@ class DocumentDocumentDealChildText(BaseModel): marks: Optional[List[Literal["bold", "italic", "underline", "strikethrough", "code", "math"]]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["text"]] = None @@ -20593,6 +38090,18 @@ class DocumentDocumentDealChildToDoChildBlob(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["blob"]] = None @@ -20603,6 +38112,18 @@ class DocumentDocumentDealChildToDoChildCode(BaseModel): language: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["code"]] = None @@ -20613,12 +38134,36 @@ class DocumentDocumentDealChildToDoChildComment(BaseModel): created_at: Optional[datetime] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["comment"]] = None class DocumentDocumentDealChildToDoChildDivider(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["divider"]] = None @@ -20629,6 +38174,18 @@ class DocumentDocumentDealChildToDoChildImage(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["image"]] = None @@ -20639,12 +38196,36 @@ class DocumentDocumentDealChildToDoChildLink(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["link"]] = None class DocumentDocumentDealChildToDoChildLineBreak(BaseModel): id: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["line_break"]] = None @@ -20655,6 +38236,18 @@ class DocumentDocumentDealChildToDoChildText(BaseModel): marks: Optional[List[Literal["bold", "italic", "underline", "strikethrough", "code", "math"]]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["text"]] = None @@ -20669,6 +38262,18 @@ class DocumentDocumentDealChildToDoChildToolCall(BaseModel): args: Optional[Dict[str, object]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["tool_call"]] = None @@ -20685,6 +38290,18 @@ class DocumentDocumentDealChildToDoChildToolResult(BaseModel): is_error: Optional[bool] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["tool_result"]] = None @@ -20697,6 +38314,18 @@ class DocumentDocumentDealChildToDoChildTraceMessage(BaseModel): message_type: Optional[Literal["message", "thinking"]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + role: Optional[Literal["user", "assistant"]] = None timestamp: Optional[datetime] = None @@ -20727,6 +38356,18 @@ class DocumentDocumentDealChildToDo(BaseModel): children: Optional[List[DocumentDocumentDealChildToDoChild]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + text: Optional[str] = None type: Optional[Literal["todo"]] = None @@ -20743,6 +38384,18 @@ class DocumentDocumentDealChildToolCall(BaseModel): args: Optional[Dict[str, object]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["tool_call"]] = None @@ -20759,6 +38412,18 @@ class DocumentDocumentDealChildToolResult(BaseModel): is_error: Optional[bool] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + type: Optional[Literal["tool_result"]] = None @@ -20771,6 +38436,18 @@ class DocumentDocumentDealChildTraceMessage(BaseModel): message_type: Optional[Literal["message", "thinking"]] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + role: Optional[Literal["user", "assistant"]] = None timestamp: Optional[datetime] = None @@ -20792,6 +38469,18 @@ class DocumentDocumentDealChildUtterance(BaseModel): end: Optional[float] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + speaker: Optional[object] = None start: Optional[float] = None @@ -20852,6 +38541,18 @@ class DocumentDocumentDeal(BaseModel): lost_reason: Optional[str] = None + metadata: Optional[Metadata] = None + """Per-block annotations carried by any Hyperdoc node (ENG-1390). + + Out-of-band annotations that travel with a block but aren't part of its content: + provenance (`sources`) and human edit attribution (`edited_by`). New annotation + types get added here as typed fields as the need arises. + + Empty by default. Because `Node.model_dump` forces `exclude_none=True`, an unset + `metadata` (None) is dropped from serialization entirely, and within a populated + `Metadata` only the set keys survive. + """ + name: Optional[str] = None pipeline: Optional[str] = None From 167dfa7444677fcc4ccfb02dfa73bf5243226db6 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Sat, 13 Jun 2026 21:32:04 +0000 Subject: [PATCH 56/56] release: 0.38.0 --- .release-please-manifest.json | 2 +- CHANGELOG.md | 45 +++++++++++++++++++++++++++++++++++ pyproject.toml | 2 +- src/hyperspell/_version.py | 2 +- 4 files changed, 48 insertions(+), 3 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 51acdaa4..8ea07c9a 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "0.37.0" + ".": "0.38.0" } \ No newline at end of file diff --git a/CHANGELOG.md b/CHANGELOG.md index 86d769ac..f9890d31 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,50 @@ # Changelog +## 0.38.0 (2026-06-13) + +Full Changelog: [v0.37.0...v0.38.0](https://github.com/hyperspell/python-sdk/compare/v0.37.0...v0.38.0) + +### Features + +* **api:** api update ([22cdd86](https://github.com/hyperspell/python-sdk/commit/22cdd8677c2d30fad4ebc6fe97715fcf01628506)) +* **api:** api update ([eeb82b7](https://github.com/hyperspell/python-sdk/commit/eeb82b767927c783df8233b637e63f7c4c14640c)) +* **api:** api update ([02ef637](https://github.com/hyperspell/python-sdk/commit/02ef6374b47293a4b3cd5c5f1bd179a80973aac2)) +* **api:** api update ([e991d68](https://github.com/hyperspell/python-sdk/commit/e991d68d0bd84df2fc52804c431a03127374d1bb)) +* **api:** api update ([a95dee2](https://github.com/hyperspell/python-sdk/commit/a95dee2cb72e8c64be1a4523d7325848c6d9e227)) +* **api:** api update ([e160f73](https://github.com/hyperspell/python-sdk/commit/e160f73c629eff27681b2d13d8cdd9c645cad17e)) +* **api:** api update ([58c8d7c](https://github.com/hyperspell/python-sdk/commit/58c8d7cd0aeb73b2a28dcc30dadac3b5d63bdcb8)) +* **api:** api update ([42d3c82](https://github.com/hyperspell/python-sdk/commit/42d3c825a891a655d999e55ab02572c8cf7d283b)) +* **api:** api update ([edd9b41](https://github.com/hyperspell/python-sdk/commit/edd9b41ea428964bb74381e415df2e3616c6a46e)) +* **api:** api update ([cc26c43](https://github.com/hyperspell/python-sdk/commit/cc26c43e007a42b9ac4de6554d0280ef56b2b713)) +* **api:** api update ([aa0cc75](https://github.com/hyperspell/python-sdk/commit/aa0cc7576de289e8e8dd152c773339e9ac27aafe)) +* **api:** api update ([335d028](https://github.com/hyperspell/python-sdk/commit/335d0288f43e7f681a783f887ce1415ee57cad22)) +* **api:** api update ([3b25c10](https://github.com/hyperspell/python-sdk/commit/3b25c10a9f2be985dcfbfaf059f5595ea316d5f5)) +* **api:** api update ([92fd43a](https://github.com/hyperspell/python-sdk/commit/92fd43a735c10a678fb2e9b3f052c43607b6fb8a)) +* **api:** api update ([7a8e495](https://github.com/hyperspell/python-sdk/commit/7a8e495ee6b8f162dce5c3124b007d2d60f6cdd6)) +* **api:** manual updates ([5e31b8a](https://github.com/hyperspell/python-sdk/commit/5e31b8a01c916a8e9afaf744f7bb8e670c8692c4)) +* **api:** manual updates ([cb78a3e](https://github.com/hyperspell/python-sdk/commit/cb78a3e76e04a5ead28e3ea0d5433d05cc6a64d1)) +* **api:** manual updates ([23c9221](https://github.com/hyperspell/python-sdk/commit/23c9221674f7d4d4d563b3e8d80d55c0b884114a)) +* **internal/types:** support eagerly validating pydantic iterators ([e47301a](https://github.com/hyperspell/python-sdk/commit/e47301a63173dd90013f6a2f127baf4cfd9e1553)) +* support setting headers via env ([eba0398](https://github.com/hyperspell/python-sdk/commit/eba039883cd57a0b9df0c4779d1370af59cd36ce)) + + +### Bug Fixes + +* **client:** add missing f-string prefix in file type error message ([6dbd3ec](https://github.com/hyperspell/python-sdk/commit/6dbd3ecf89c76051dde508e759d15db97acc4141)) +* use correct field name format for multipart file arrays ([0f569cc](https://github.com/hyperspell/python-sdk/commit/0f569cccc70ea96a2da668846b62bf65af449561)) + + +### Performance Improvements + +* **client:** optimize file structure copying in multipart requests ([c28640c](https://github.com/hyperspell/python-sdk/commit/c28640c64d25fd5dde07836e60e970069b0b65fe)) + + +### Chores + +* **internal:** more robust bootstrap script ([d4a39dc](https://github.com/hyperspell/python-sdk/commit/d4a39dc3c6f710bf9b9c481197043eeb4a9f8ac9)) +* **internal:** reformat pyproject.toml ([19a83c3](https://github.com/hyperspell/python-sdk/commit/19a83c32f936735d997727bda0bb0ba523f8086c)) +* **tests:** bump steady to v0.22.1 ([7d67d91](https://github.com/hyperspell/python-sdk/commit/7d67d91802b13e3110af4e1ab313cc36ed66ca74)) + ## 0.37.0 (2026-04-16) Full Changelog: [v0.36.0...v0.37.0](https://github.com/hyperspell/python-sdk/compare/v0.36.0...v0.37.0) diff --git a/pyproject.toml b/pyproject.toml index 9dec6210..8ac832e5 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "hyperspell" -version = "0.37.0" +version = "0.38.0" description = "The official Python library for the hyperspell API" dynamic = ["readme"] license = "MIT" diff --git a/src/hyperspell/_version.py b/src/hyperspell/_version.py index ea4e056d..db685eed 100644 --- a/src/hyperspell/_version.py +++ b/src/hyperspell/_version.py @@ -1,4 +1,4 @@ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. __title__ = "hyperspell" -__version__ = "0.37.0" # x-release-please-version +__version__ = "0.38.0" # x-release-please-version