Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 6 additions & 3 deletions robosystems_client/models/instance_usage.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,13 @@ class InstanceUsage:
status (str): Instance status: 'healthy' (<80%), 'approaching' (80-100%), 'over_limit' (>100%)
node_count (int | None | Unset): Current node count (informational, no limit enforced)
total_storage_gb (float | None | Unset): Total storage used across all databases in GB
usage_percentage (float | None | Unset): Storage usage as percentage of limit (e.g. 105.2)
usage_percentage (float | None | Unset): Storage usage as percentage of limit (e.g. 105.2). Derived from the
enforced figure — durable bytes only, excluding `transient` build artifacts — so it can read lower than
total_storage_gb/limit_gb while a blue-green rebuild is in flight.
databases (list[DatabaseStorageEntry] | Unset): Per-database storage breakdown
items (list[StorageItem] | Unset): Itemized storage by type — graph, memory, subgraph, vectors, staging. Sums to
total_storage_gb.
items (list[StorageItem] | Unset): Itemized storage by type — graph, memory, subgraph, vectors, staging,
transient, orphan. Sums to total_storage_gb. Only `subgraph` items correspond to live subgraphs, so this is the
type to sum when reconciling against the subgraph list.
"""

limit_gb: float
Expand Down
20 changes: 20 additions & 0 deletions robosystems_client/models/list_subgraphs_response.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ class ListSubgraphsResponse:
subgraph_count (int): Total number of subgraphs
subgraphs (list[SubgraphSummary]): List of subgraphs
max_subgraphs (int | None | Unset): Maximum allowed subgraphs for this tier (None = unlimited)
total_size_bytes (int | None | Unset): Combined on-disk footprint of all subgraphs in bytes
total_size_mb (float | None | Unset): Combined size of all subgraphs in megabytes
"""

Expand All @@ -37,6 +38,7 @@ class ListSubgraphsResponse:
subgraph_count: int
subgraphs: list[SubgraphSummary]
max_subgraphs: int | None | Unset = UNSET
total_size_bytes: int | None | Unset = UNSET
total_size_mb: float | None | Unset = UNSET
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)

Expand All @@ -62,6 +64,12 @@ def to_dict(self) -> dict[str, Any]:
else:
max_subgraphs = self.max_subgraphs

total_size_bytes: int | None | Unset
if isinstance(self.total_size_bytes, Unset):
total_size_bytes = UNSET
else:
total_size_bytes = self.total_size_bytes

total_size_mb: float | None | Unset
if isinstance(self.total_size_mb, Unset):
total_size_mb = UNSET
Expand All @@ -82,6 +90,8 @@ def to_dict(self) -> dict[str, Any]:
)
if max_subgraphs is not UNSET:
field_dict["max_subgraphs"] = max_subgraphs
if total_size_bytes is not UNSET:
field_dict["total_size_bytes"] = total_size_bytes
if total_size_mb is not UNSET:
field_dict["total_size_mb"] = total_size_mb

Expand Down Expand Up @@ -118,6 +128,15 @@ def _parse_max_subgraphs(data: object) -> int | None | Unset:

max_subgraphs = _parse_max_subgraphs(d.pop("max_subgraphs", UNSET))

def _parse_total_size_bytes(data: object) -> int | None | Unset:
if data is None:
return data
if isinstance(data, Unset):
return data
return cast(int | None | Unset, data)

total_size_bytes = _parse_total_size_bytes(d.pop("total_size_bytes", UNSET))

def _parse_total_size_mb(data: object) -> float | None | Unset:
if data is None:
return data
Expand All @@ -135,6 +154,7 @@ def _parse_total_size_mb(data: object) -> float | None | Unset:
subgraph_count=subgraph_count,
subgraphs=subgraphs,
max_subgraphs=max_subgraphs,
total_size_bytes=total_size_bytes,
total_size_mb=total_size_mb,
)

Expand Down
4 changes: 3 additions & 1 deletion robosystems_client/models/storage_item.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,9 @@ class StorageItem:
"""One itemized piece of a graph's on-disk footprint.

Attributes:
type_ (str): One of: graph, memory, subgraph, vectors, staging
type_ (str): One of: graph, memory, subgraph, vectors, staging, transient (blue-green build artifact), orphan (a
`{parent}_*` database, vector index, or staging file with no row in the graph registry — reclaimable leftover of
a deleted subgraph)
id (str): Database or index identifier
bytes_ (int): Size in bytes
"""
Expand Down
21 changes: 21 additions & 0 deletions robosystems_client/models/subgraph_response.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,8 @@ class SubgraphResponse:
created_at (datetime.datetime): When the subgraph was created
updated_at (datetime.datetime): When the subgraph was last updated
description (None | str | Unset): Description of the subgraph's purpose
size_bytes (int | None | Unset): On-disk footprint in bytes — the database, its write-ahead log, and its vector
index. Prefer this over size_mb at subgraph scale.
size_mb (float | None | Unset): Size of the subgraph database in megabytes
node_count (int | None | Unset): Number of nodes in the subgraph
edge_count (int | None | Unset): Number of edges in the subgraph
Expand All @@ -49,6 +51,7 @@ class SubgraphResponse:
created_at: datetime.datetime
updated_at: datetime.datetime
description: None | str | Unset = UNSET
size_bytes: int | None | Unset = UNSET
size_mb: float | None | Unset = UNSET
node_count: int | None | Unset = UNSET
edge_count: int | None | Unset = UNSET
Expand Down Expand Up @@ -83,6 +86,12 @@ def to_dict(self) -> dict[str, Any]:
else:
description = self.description

size_bytes: int | None | Unset
if isinstance(self.size_bytes, Unset):
size_bytes = UNSET
else:
size_bytes = self.size_bytes

size_mb: float | None | Unset
if isinstance(self.size_mb, Unset):
size_mb = UNSET
Expand Down Expand Up @@ -134,6 +143,8 @@ def to_dict(self) -> dict[str, Any]:
)
if description is not UNSET:
field_dict["description"] = description
if size_bytes is not UNSET:
field_dict["size_bytes"] = size_bytes
if size_mb is not UNSET:
field_dict["size_mb"] = size_mb
if node_count is not UNSET:
Expand Down Expand Up @@ -179,6 +190,15 @@ def _parse_description(data: object) -> None | str | Unset:

description = _parse_description(d.pop("description", UNSET))

def _parse_size_bytes(data: object) -> int | None | Unset:
if data is None:
return data
if isinstance(data, Unset):
return data
return cast(int | None | Unset, data)

size_bytes = _parse_size_bytes(d.pop("size_bytes", UNSET))

def _parse_size_mb(data: object) -> float | None | Unset:
if data is None:
return data
Expand Down Expand Up @@ -251,6 +271,7 @@ def _parse_metadata(data: object) -> None | SubgraphResponseMetadataType0 | Unse
created_at=created_at,
updated_at=updated_at,
description=description,
size_bytes=size_bytes,
size_mb=size_mb,
node_count=node_count,
edge_count=edge_count,
Expand Down
24 changes: 23 additions & 1 deletion robosystems_client/models/subgraph_summary.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,10 @@ class SubgraphSummary:
subgraph_type (SubgraphType): Types of subgraphs.
status (str): Current status
created_at (datetime.datetime): Creation timestamp
size_mb (float | None | Unset): Size in megabytes
size_bytes (int | None | Unset): On-disk footprint in bytes — the database, its write-ahead log, and its vector
index. Prefer this over size_mb at subgraph scale.
size_mb (float | None | Unset): Same footprint in megabytes. Derived from size_bytes; kept for callers that
render MB directly.
last_accessed (datetime.datetime | None | Unset): Last access timestamp
"""

Expand All @@ -34,6 +37,7 @@ class SubgraphSummary:
subgraph_type: SubgraphType
status: str
created_at: datetime.datetime
size_bytes: int | None | Unset = UNSET
size_mb: float | None | Unset = UNSET
last_accessed: datetime.datetime | None | Unset = UNSET
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
Expand All @@ -51,6 +55,12 @@ def to_dict(self) -> dict[str, Any]:

created_at = self.created_at.isoformat()

size_bytes: int | None | Unset
if isinstance(self.size_bytes, Unset):
size_bytes = UNSET
else:
size_bytes = self.size_bytes

size_mb: float | None | Unset
if isinstance(self.size_mb, Unset):
size_mb = UNSET
Expand All @@ -77,6 +87,8 @@ def to_dict(self) -> dict[str, Any]:
"created_at": created_at,
}
)
if size_bytes is not UNSET:
field_dict["size_bytes"] = size_bytes
if size_mb is not UNSET:
field_dict["size_mb"] = size_mb
if last_accessed is not UNSET:
Expand All @@ -99,6 +111,15 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:

created_at = datetime.datetime.fromisoformat(d.pop("created_at"))

def _parse_size_bytes(data: object) -> int | None | Unset:
if data is None:
return data
if isinstance(data, Unset):
return data
return cast(int | None | Unset, data)

size_bytes = _parse_size_bytes(d.pop("size_bytes", UNSET))

def _parse_size_mb(data: object) -> float | None | Unset:
if data is None:
return data
Expand Down Expand Up @@ -132,6 +153,7 @@ def _parse_last_accessed(data: object) -> datetime.datetime | None | Unset:
subgraph_type=subgraph_type,
status=status,
created_at=created_at,
size_bytes=size_bytes,
size_mb=size_mb,
last_accessed=last_accessed,
)
Expand Down