Skip to content

CompactionUpdate

Base classes

Name Children Inherits
AnnotatedObject
aclientp.schema.base
Base class for generated models.

⋔ Inheritance diagram

graph TD
  95970858326864["session_updates.CompactionUpdate"]
  95970862258240["base.AnnotatedObject"]
  95970862254416["base.Schema"]
  95970851503232["main.BaseModel"]
  125067848591872["builtins.object"]
  95970862258240 --> 95970858326864
  95970862254416 --> 95970862258240
  95970851503232 --> 95970862254416
  125067848591872 --> 95970851503232

🛈 DocStrings

Bases: AnnotatedObject

A context compaction upsert.

The first notification fixes the compaction's timeline position. Later updates with the same ID patch that entity in place. Only sent if the client advertised session.compaction.

Source code in src/aclientp/schema/session_updates.py
class CompactionUpdate(AnnotatedObject):
    """A context compaction upsert.

    The first notification fixes the compaction's timeline position.
    Later updates with the same ID patch that entity in place.
    Only sent if the client advertised ``session.compaction``.
    """

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

    compaction_id: CompactionId
    """The Agent-owned ID of this compaction."""

    status: CompactionStatus
    """Current lifecycle status."""

    summary: Sequence[ContentBlock] | None = None
    """Complete replacement user-displayable summary content for the compaction."""

    error: str | None = None
    """Human-readable error details for the compaction."""

compaction_id instance-attribute

compaction_id: CompactionId

The Agent-owned ID of this compaction.

error class-attribute instance-attribute

error: str | None = None

Human-readable error details for the compaction.

status instance-attribute

Current lifecycle status.

summary class-attribute instance-attribute

summary: Sequence[ContentBlock] | None = None

Complete replacement user-displayable summary content for the compaction.

:fa-brands-github: Show source on GitHub