Skip to content

CursorUpdate

Base classes

Name Children Inherits
AnnotatedObject
aclientp.schema.v2.base
A v2 object with the ``_meta`` extension point.

⋔ Inheritance diagram

graph TD
  95970870604448["cursors.CursorUpdate"]
  95970868359040["base.AnnotatedObject"]
  95970855946400["base.Schema"]
  95970851503232["main.BaseModel"]
  125067848591872["builtins.object"]
  95970868359040 --> 95970870604448
  95970855946400 --> 95970868359040
  95970851503232 --> 95970855946400
  125067848591872 --> 95970851503232

🛈 DocStrings

Bases: AnnotatedObject

UNSTABLE: A session cursor upsert, keyed by cursor_id.

The first update for a cursor MUST include anchor, which is fixed afterwards. capabilities and _meta are patches: omitted leaves them unchanged, None clears them.

Source code in src/aclientp/schema/v2/cursors.py
class CursorUpdate(AnnotatedObject):
    """**UNSTABLE**: A session cursor upsert, keyed by ``cursor_id``.

    The first update for a cursor MUST include ``anchor``, which is fixed afterwards.
    ``capabilities`` and ``_meta`` are patches: omitted leaves them unchanged, ``None``
    clears them.
    """

    session_update: Literal["cursor_update"] = Field(default="cursor_update", init=False)

    cursor_id: CursorId
    """The agent-owned ID of the cursor, unique within the session."""

    capabilities: CursorCapabilities | MISSING | None = MISSING
    """The methods that currently accept the cursor; a new cursor starts with none."""

    anchor: CursorAnchor | MISSING | None = MISSING
    """Where the cursor is; required on the first update for a cursor."""

anchor class-attribute instance-attribute

anchor: CursorAnchor | MISSING | None = MISSING

Where the cursor is; required on the first update for a cursor.

capabilities class-attribute instance-attribute

capabilities: CursorCapabilities | MISSING | None = MISSING

The methods that currently accept the cursor; a new cursor starts with none.

cursor_id instance-attribute

cursor_id: CursorId

The agent-owned ID of the cursor, unique within the session.

:fa-brands-github: Show source on GitHub