|
AQIT 0.1.0
|
Functions | |
| str | _now_iso () |
| None | _ensure_dir () |
| list[dict[str, Any]] | _load_index () |
| None | _save_index (list[dict[str, Any]] rows) |
| str | category_for_tool (str tool_name) |
| str | cli_name_for_tool (str tool_name) |
| str | _build_summary (*, str command, str tool_name, str|None model_id, Any result, dict[str, Any]|None card) |
| str | append_record (*, str tool_name, str|None command=None, dict[str, Any]|None args=None, Any result=None, dict[str, Any]|None card=None, str|None model_id=None, int|None duration_ms=None, bool exit_ok=True) |
| dict[str, Any]|None | load_record (str record_id) |
| datetime|None | _parse_since (str value) |
| list[dict[str, Any]] | list_records (*, int|None last=None, str|None since=None, str|None category=None, str|None model_id=None, str|None command=None) |
| int | clear_records (*, str|None before=None) |
Variables | |
| str | _COMMANDS_DIR = Path.home() / ".aquin" / "commands" |
| str | _INDEX_PATH = _COMMANDS_DIR / "index.json" |
| dict | _CATEGORY_BY_TOOL |
| dict | _TOOL_TO_CLI |
|
protected |
Definition at line 100 of file command_log.py.
Referenced by append_record().
|
protected |
Definition at line 72 of file command_log.py.
Referenced by _load_index(), _save_index(), and append_record().
|
protected |
Definition at line 76 of file command_log.py.
References _ensure_dir().
Referenced by append_record(), clear_records(), and list_records().
|
protected |
Definition at line 68 of file command_log.py.
Referenced by append_record().
|
protected |
Definition at line 203 of file command_log.py.
Referenced by clear_records(), and list_records().
|
protected |
Definition at line 87 of file command_log.py.
References _ensure_dir().
Referenced by append_record(), and clear_records().
| str append_record | ( | * | , |
| str | tool_name, | ||
| str | None | command = None, | ||
| dict[str, Any] | None | args = None, | ||
| Any | result = None, | ||
| dict[str, Any] | None | card = None, | ||
| str | None | model_id = None, | ||
| int | None | duration_ms = None, | ||
| bool | exit_ok = True ) |
Persist a command run locally. Returns record id.
Definition at line 130 of file command_log.py.
References _build_summary(), _ensure_dir(), _load_index(), _now_iso(), _save_index(), category_for_tool(), and cli_name_for_tool().
| str category_for_tool | ( | str | tool_name | ) |
Definition at line 92 of file command_log.py.
Referenced by append_record().
| int clear_records | ( | * | , |
| str | None | before = None ) |
Definition at line 249 of file command_log.py.
References _load_index(), _parse_since(), and _save_index().
| str cli_name_for_tool | ( | str | tool_name | ) |
Definition at line 96 of file command_log.py.
Referenced by append_record().
| list[dict[str, Any]] list_records | ( | * | , |
| int | None | last = None, | ||
| str | None | since = None, | ||
| str | None | category = None, | ||
| str | None | model_id = None, | ||
| str | None | command = None ) |
Definition at line 218 of file command_log.py.
References _load_index(), and _parse_since().
| dict[str, Any] | None load_record | ( | str | record_id | ) |
Definition at line 193 of file command_log.py.
|
protected |
Definition at line 19 of file command_log.py.
|
protected |
Definition at line 16 of file command_log.py.
|
protected |
Definition at line 17 of file command_log.py.
|
protected |
Definition at line 45 of file command_log.py.