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

Functions

int main (list[str]|None argv=None)
argparse.ArgumentParser _build_parser ()
int _cmd_init (argparse.Namespace args)
int _cmd_doctor (argparse.Namespace args)
None add_auth_subcommands (argparse.ArgumentParser parser)
int _cmd_rotate_secrets (argparse.Namespace args)
int _cmd_handover (argparse.Namespace args)
int _cmd_auth_show (argparse.Namespace args)
int _cmd_auth_verify (argparse.Namespace args)
int _cmd_auth_export (argparse.Namespace args)
int _cmd_auth_bootstrap (argparse.Namespace args)
str _default_operator_slot ()
Path _secrets_path (object location)
list[str] _credential_slots (SQLiteBackend backend)
list[object] _credential_rows (SQLiteBackend backend, *, str|None slot=None)
list[object] _operation_auth_rows (SQLiteBackend backend, *, str|None slot=None)
str _current_orchestrator_or_operator (SQLiteBackend backend)
str _actor_type_for_slot (SQLiteBackend backend, str slot)

Detailed Description

Argparse command surface for the registry operator tools.

Purpose
-------
Expose registry operator commands through
``python -m oc_chat.registry`` before the future ``oct agent`` rename.

Responsibilities
----------------
- Parse registry bootstrap command arguments.
- Resolve the target registry and workspace metadata.
- Generate seed identifiers and the initial operator credential fingerprint.
- Call :class:`SQLiteBackend` to apply schema and seed singleton rows.
- Dispatch doctor and db integrity-check commands.

Diagnostics
-----------
Domain: OC_CHAT.MAIN
Levels:
    L2 - lifecycle events
    L3 - semantic details
    L4 - deep tracing

Contracts
---------
- `init` creates the SQLite registry only; doctor/db commands inspect or
  repair existing registries.
- Raw secret bytes are used only to derive the stored fingerprint.

Dependencies
------------
- oc_diagnostics (structured debug logging via _dbg)
- oc_chat.registry.backends.sqlite (registry initialization backend)
- oc_chat.registry.cli.db (database maintenance command wiring)
- oc_chat.registry.cli.inspect (read-only inspect command wiring)
- oc_chat.registry.cli.migrate (legacy migration command wiring)
- oc_chat.registry.cli.plan (plan domain command wiring)
- oc_chat.registry.cli.queue (queue domain command wiring)
- oc_chat.registry.discovery (registry path discovery)
- oc_chat.core._version (resolve_version stamps the app version into the init seed)
- oc_chat.registry (Registry facade for the doctor, rotation, handover and auth commands)
- oc_chat.registry.auth.bootstrap (bootstrap-machine install and export-secrets bundle)
- oc_chat.registry.auth.handover (initiate and accept orchestrator handover)
- oc_chat.registry.auth.rotation (start and finalise credential rotation)
- oc_chat.registry.auth.secrets_store (writes the operator's initial secret block at init)
- oc_chat.registry.cli.checkpoint (checkpoint export and import command wiring)
- oc_chat.registry.cli.regenerate (top-level regenerate command wiring)
- oc_chat.registry.cli.roadmap (roadmap command group wiring)
- oc_chat.registry.cli.round (round-close command wiring)
- oc_chat.registry.cli.sync (sync command wiring for registry-backed artefacts)
- oc_chat.registry.doctor (doctor checks and report formatting)

Function Documentation

◆ _actor_type_for_slot()

str oc_chat.registry.cli.agent._actor_type_for_slot ( SQLiteBackend backend,
str slot )
protected

Definition at line 593 of file agent.py.

Here is the caller graph for this function:

◆ _build_parser()

argparse.ArgumentParser oc_chat.registry.cli.agent._build_parser ( )
protected

Definition at line 109 of file agent.py.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ _cmd_auth_bootstrap()

int oc_chat.registry.cli.agent._cmd_auth_bootstrap ( argparse.Namespace args)
protected

Definition at line 502 of file agent.py.

Here is the call graph for this function:

◆ _cmd_auth_export()

int oc_chat.registry.cli.agent._cmd_auth_export ( argparse.Namespace args)
protected

Definition at line 487 of file agent.py.

Here is the call graph for this function:

◆ _cmd_auth_show()

int oc_chat.registry.cli.agent._cmd_auth_show ( argparse.Namespace args)
protected

Definition at line 460 of file agent.py.

Here is the call graph for this function:

◆ _cmd_auth_verify()

int oc_chat.registry.cli.agent._cmd_auth_verify ( argparse.Namespace args)
protected

Definition at line 475 of file agent.py.

Here is the call graph for this function:

◆ _cmd_doctor()

int oc_chat.registry.cli.agent._cmd_doctor ( argparse.Namespace args)
protected

Definition at line 331 of file agent.py.

◆ _cmd_handover()

int oc_chat.registry.cli.agent._cmd_handover ( argparse.Namespace args)
protected

Definition at line 433 of file agent.py.

Here is the call graph for this function:

◆ _cmd_init()

int oc_chat.registry.cli.agent._cmd_init ( argparse.Namespace args)
protected

Definition at line 295 of file agent.py.

Here is the call graph for this function:

◆ _cmd_rotate_secrets()

int oc_chat.registry.cli.agent._cmd_rotate_secrets ( argparse.Namespace args)
protected

Definition at line 390 of file agent.py.

Here is the call graph for this function:

◆ _credential_rows()

list[object] oc_chat.registry.cli.agent._credential_rows ( SQLiteBackend backend,
* ,
str | None slot = None )
protected

Definition at line 539 of file agent.py.

Here is the caller graph for this function:

◆ _credential_slots()

list[str] oc_chat.registry.cli.agent._credential_slots ( SQLiteBackend backend)
protected

Definition at line 527 of file agent.py.

Here is the caller graph for this function:

◆ _current_orchestrator_or_operator()

str oc_chat.registry.cli.agent._current_orchestrator_or_operator ( SQLiteBackend backend)
protected

Definition at line 580 of file agent.py.

Here is the caller graph for this function:

◆ _default_operator_slot()

str oc_chat.registry.cli.agent._default_operator_slot ( )
protected

Definition at line 516 of file agent.py.

Here is the caller graph for this function:

◆ _operation_auth_rows()

list[object] oc_chat.registry.cli.agent._operation_auth_rows ( SQLiteBackend backend,
* ,
str | None slot = None )
protected

Definition at line 561 of file agent.py.

Here is the caller graph for this function:

◆ _secrets_path()

Path oc_chat.registry.cli.agent._secrets_path ( object location)
protected

Definition at line 523 of file agent.py.

Here is the caller graph for this function:

◆ add_auth_subcommands()

None oc_chat.registry.cli.agent.add_auth_subcommands ( argparse.ArgumentParser parser)
Register actor-auth subcommands.

Definition at line 357 of file agent.py.

Here is the caller graph for this function:

◆ main()

int oc_chat.registry.cli.agent.main ( list[str] | None argv = None)

Definition at line 99 of file agent.py.

Here is the call graph for this function: