oc_chat
Loading...
Searching...
No Matches
oc_chat.registry.cli.checkpoint Namespace Reference

Functions

None add_checkpoint_subcommands (argparse.ArgumentParser parser)
int _cmd_checkpoint_group (argparse.Namespace args)
int _cmd_export (argparse.Namespace args)
int _cmd_import (argparse.Namespace args)

Detailed Description

Operator CLI for registry JSON checkpoints.

Purpose
-------
Expose `python -m oc_chat.registry checkpoint export|import` for portable
registry state transfer.

Responsibilities
----------------
- Resolve registry paths through standard discovery.
- Wire export/import arguments to the checkpoint library.
- Format checkpoint results as human text or JSON.

Diagnostics
-----------
Domain: OC_CHAT.MAIN
Levels:
    L2 - checkpoint command lifecycle events
    L3 - checkpoint result summaries
    L4 - argparse/dispatch tracing

Contracts
---------
- Import delegates signature verification and restore to `checkpoint.py`.
- Export does not mutate registry state.

Dependencies
------------
- oc_diagnostics (structured debug logging via _dbg)
- oc_chat.registry.checkpoint (checkpoint implementation)
- oc_chat.registry.discovery (path resolution)
- oc_chat.registry (Registry facade passed to the checkpoint export)
- oc_chat.registry.backends.sqlite (SQLiteBackend opened for export and restored on import)

Function Documentation

◆ _cmd_checkpoint_group()

int oc_chat.registry.cli.checkpoint._cmd_checkpoint_group ( argparse.Namespace args)
protected

Definition at line 99 of file checkpoint.py.

◆ _cmd_export()

int oc_chat.registry.cli.checkpoint._cmd_export ( argparse.Namespace args)
protected

Definition at line 105 of file checkpoint.py.

◆ _cmd_import()

int oc_chat.registry.cli.checkpoint._cmd_import ( argparse.Namespace args)
protected

Definition at line 122 of file checkpoint.py.

◆ add_checkpoint_subcommands()

None oc_chat.registry.cli.checkpoint.add_checkpoint_subcommands ( argparse.ArgumentParser parser)
Attach ``checkpoint export|import`` subcommands.

Definition at line 61 of file checkpoint.py.