Skip to content

CompactionUpdate

Base classes

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

⋔ Inheritance diagram

graph TD
  95970869831120["session_updates.CompactionUpdate"]
  95970868359040["base.AnnotatedObject"]
  95970855946400["base.Schema"]
  95970851503232["main.BaseModel"]
  125067848591872["builtins.object"]
  95970868359040 --> 95970869831120
  95970855946400 --> 95970868359040
  95970851503232 --> 95970855946400
  125067848591872 --> 95970851503232

🛈 DocStrings

Bases: AnnotatedObject

A context compaction upsert, keyed by compaction_id.

The first update fixes the compaction's position in the timeline; summary and error are patches.

Source code in src/aclientp/schema/v2/session_updates.py
class CompactionUpdate(AnnotatedObject):
    """A context compaction upsert, keyed by ``compaction_id``.

    The first update fixes the compaction's position in the timeline; ``summary`` and
    ``error`` are patches.
    """

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

    compaction_id: CompactionId
    """The agent-owned ID of the compaction, unique within the session."""

    status: CompactionStatus | MISSING | None = MISSING
    """Current lifecycle status; omitted leaves it unchanged, ``None`` resets it to
    ``in_progress``. A new compaction starts as ``in_progress``."""

    summary: Sequence[ContentBlock] | MISSING | None = MISSING
    """Complete replacement summary content to show the user."""

    error: str | MISSING | None = MISSING
    """Human-readable error details."""

compaction_id instance-attribute

compaction_id: CompactionId

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

error class-attribute instance-attribute

error: str | MISSING | None = MISSING

Human-readable error details.

status class-attribute instance-attribute

status: CompactionStatus | MISSING | None = MISSING

Current lifecycle status; omitted leaves it unchanged, None resets it to in_progress. A new compaction starts as in_progress.

summary class-attribute instance-attribute

summary: Sequence[ContentBlock] | MISSING | None = MISSING

Complete replacement summary content to show the user.

:fa-brands-github: Show source on GitHub