luplo.core.import_pipeline.results

Pydantic models for the ImportResults contract.

The results envelope is what the agent submits to finalize. It is strictly validated server-side; protocol violations (missing evidence, wrong item_type, etc.) abort the entire commit so partial buggy state is never written to luplo.

Attributes

Classes

ResultItem

One item produced by the agent during the import flow.

ImportResults

Envelope submitted by the agent to finalize.

Module Contents

luplo.core.import_pipeline.results.ItemTypeLiteral
luplo.core.import_pipeline.results.StatusLiteral
class luplo.core.import_pipeline.results.ResultItem

Bases: pydantic.BaseModel

One item produced by the agent during the import flow.

model_config
item_type: ItemTypeLiteral
title: str
body: str
status: StatusLiteral
evidence_paths: list[str]
rationale: str | None = None
tags: list[str]
system_ids: list[str]
source_url: str | None = None
evidence_required_when_done_or_partial() ResultItem

Reject done or partial items with no evidence paths.

class luplo.core.import_pipeline.results.ImportResults

Bases: pydantic.BaseModel

Envelope submitted by the agent to finalize.

bundle_id: str
items: list[ResultItem]
close_work_unit: bool = False