← Về thư mục
openai4s/storage/checkpoint_state.py
- _canonical_json · function · L57-L63 — def _canonical_json(value: Any) -> bytes
- _sha256 · function · L66-L67 — def _sha256(data: bytes) -> str
- _json_value · function · L70-L78 — def _json_value(raw: Any, fallback: Any) -> Any
- CheckpointStateRepository · class · L81-L1262 — class CheckpointStateRepository
- init · method · L84-L97 — def init( self, connection: sqlite3.Connection, lock: Any, *, clock_ms: Callable[[], int], ) -> None
- _migrate_schema · method · L99-L114 — def _migrate_schema(self) -> None
- capture_checkpoint · method · L116-L203 — def capture_checkpoint( self, *, checkpoint_id: str, root_frame_id: str, branch_id: str, source_checkpoint_id: str | None = None, commit: bool = True, ) -> dict[str, Any] | None
- get · method · L205-L219 — def get( self, checkpoint_id: str, *, include_state: bool = False, ) -> dict[str, Any] | None
- list · method · L221-L244 — def list( self, root_frame_id: str, *, branch_id: str | None = None, limit: int = 100, ) -> list[dict[str, Any]]
- validate_checkpoint_state_import · method · L246-L324 — def validate_checkpoint_state_import( self, source: Mapping[str, Any], *, include_state: bool = False, ) -> dict[str, Any]
- import_quarantined_snapshot · method · L326-L475 — def import_quarantined_snapshot( self, source: Mapping[str, Any], *, checkpoint_id: str, root_frame_id: str, branch_id: str, project_id: str, artifact_id_map: Mapping[str, str] | None = None, source_checkpoint_id: str | None = None, commit: bool = True, ) -> dict[str, Any]
- restore_checkpoint · method · L477-L535 — def restore_checkpoint( self, *, checkpoint_id: str, root_frame_id: str, project_id: str, commit: bool = True, ) -> dict[str, Any]
- unavailable_projection · method · L538-L548 — def unavailable_projection(checkpoint_id: str) -> dict[str, Any]
- _source_state · method · L550-L573 — def _source_state(self, source: Mapping[str, Any]) -> dict[str, Any]
- _remap_import_state · method · L575-L703 — def _remap_import_state( self, source: Mapping[str, Any], *, root_frame_id: str, project_id: str, identity_seed: str, artifact_id_map: Mapping[str, str], identity_replacements: Mapping[str, str], ) -> tuple[dict[str, Any], set[str]]
- _derived_identity_map · method · L706-L723 — def _derived_identity_map( rows: Sequence[Mapping[str, Any]], *, key: str, prefix: str, kind: str, seed: str, ) -> dict[str, str]
- _remap_refs · method · L726-L738 — def _remap_refs(cls, value: Any, replacements: Mapping[str, str]) -> Any
- _identity_residuals · method · L741-L759 — def _identity_residuals( cls, value: Any, *, key: str | None = None, ) -> set[str]
- _validate_import_artifacts · method · L761-L780 — def _validate_import_artifacts( self, state: Mapping[str, Any], root_frame_id: str ) -> None
- _capture_state · method · L782-L850 — def _capture_state(self, root_frame_id: str, project_id: str) -> dict[str, Any]
- _bounded_rows · method · L852-L863 — def _bounded_rows( self, sql: str, params: Sequence[Any], *, limit: int, label: str, ) -> list[sqlite3.Row]
- _plan_row · method · L866-L874 — def _plan_row(row: sqlite3.Row) -> dict[str, Any]
- _review_step_row · method · L877-L881 — def _review_step_row(row: sqlite3.Row) -> dict[str, Any]
- _validated_state · method · L883-L923 — def _validated_state(self, row: Mapping[str, Any]) -> dict[str, Any]
- _validate_scope · method · L926-L982 — def _validate_scope( state: Mapping[str, Any], root_frame_id: str, project_id: str ) -> None
- unique · function · L936-L941 — def unique(bucket: str, value: Any) -> str
- _restore_plans · method · L984-L1007 — def _restore_plans(self, plans: list[dict[str, Any]], root_frame_id: str) -> None
- _restore_review_steps · method · L1009-L1037 — def _restore_review_steps( self, steps: list[dict[str, Any]], root_frame_id: str ) -> None
- _restore_annotations · method · L1039-L1150 — def _restore_annotations( self, annotations: list[dict[str, Any]], root_frame_id: str ) -> None
- _restore_review_settings · method · L1152-L1167 — def _restore_review_settings( self, settings: Mapping[str, Any], root_frame_id: str ) -> None
- _restore_memories · method · L1169-L1193 — def _restore_memories( self, memories: list[dict[str, Any]], project_id: str ) -> None
- _reject_foreign_ids · method · L1195-L1213 — def _reject_foreign_ids( self, table: str, id_column: str, scope_column: str, scope_id: str, rows: Sequence[Mapping[str, Any]], ) -> None
- _optional_json · method · L1216-L1219 — def _optional_json(value: Any) -> str | None
- _row · method · L1221-L1225 — def _row(self, checkpoint_id: str) -> sqlite3.Row | None
- _decode · method · L1227-L1256 — def _decode(self, row: sqlite3.Row, *, include_state: bool) -> dict[str, Any]
- _text · method · L1259-L1262 — def _text(name: str, value: str) -> str