Metadata-Version: 2.4
Name: hugpy-settings
Version: 0.1.3
Summary: Shared HTTP-backed settings editor and reports for Hugpy Wrapper and Harness
Requires-Python: >=3.9
Description-Content-Type: text/markdown

# Hugpy settings

The shared settings layer extracted from Hugpy Wrapper's terminal harness.
Wrapper and Hugpy Harness use this package directly instead of maintaining
duplicate implementations. It uses only the Python standard library and has
no dependency on either application, model engines, or a database driver.

The layer owns settings snapshots and redaction, field schemas, inheritance
reports, editing controls, terminal navigation, and the remote folder picker.
The running Wrapper remains responsible for validation, persistence, resource
admission, and applying changes through its existing HTTP API.

```python
from hugpy_settings.settings_view import show_settings, run_settings, snapshot

# gateway exposes api_key and models(); the host supplies endpoint discovery.
show_settings(gateway, base, model=model_key, as_json=True)
# A curses host can embed the same editor:
run_settings(screen, gateway, base, model=model_key, drain=drain, wait=wait)
```

`drain` is an optional event-draining callback. `wait(title, operation)` is an
optional host callback for displaying progress around blocking work. Hosts own
the terminal lifecycle. JSON and text reports remain available without curses.

Implementation modules:

- `settings_view`: snapshots, reports, and terminal entry points.
- `settings_schema`: model and box field descriptions.
- `settings_controls`: parsing, HTTP updates, and editing workflows.
- `settings_widgets`: dropdowns, mouse handling, and remote directory browsing.

Wrapper's `fitevict.cli.settings_*` and Harness's
`hugpy_harness.tui.views.settings_*` paths alias these same modules, preserving
existing callers and shared module state. New callers should import
`hugpy_settings` modules directly. Wrapper's schema was used as the source of
record; Harness's stale `video_allow_cpu` UI entry was not carried forward.

For source development, install this package into each host's development
environment before installing that host:

```sh
python3 -m pip install -e /path/to/staging/hugpy-settings/package
```

Both Debian builders build and bundle the shared wheel alongside their own
wheel. `HUGPY_SETTINGS_SOURCE` can override the sibling source directory.
The package must be published to the chosen Python index before distributing
Wrapper or Harness wheels that depend on `hugpy-settings==0.1.2` through it.


## Fleet terminal compatibility release — 2026-10-22

Composites dropdowns and sliders into the native input window so the background terminal cannot repaint over dense menus.
