Metadata-Version: 2.4
Name: hugpy-terminal
Version: 0.1.30
Summary: Shared Hugpy terminal chat, resources, settings and session runtime
Requires-Python: >=3.11
Description-Content-Type: text/markdown
Requires-Dist: hugpy-resources<0.2,>=0.1.5
Requires-Dist: hugpy-settings<0.2,>=0.1.8
Requires-Dist: hugpy-tools>=0.2.19
Requires-Dist: abstract-toolserver[server]>=0.0.107

# Hugpy Terminal

Shared terminal, sessions and headless client primitives for the Hugpy arms.
`hugpy-harness` binds the runtime to Wrapper; `hugpy-fleet` binds it to Core.
Wrapper and Core can bundle the appropriate arm without depending on one another.
Agent's existing Harness compatibility imports keep using this runtime.

`hugpy_terminal.control.roles` fixes host identity and endpoint discovery.
`hugpy_terminal.control.controls` supplies headless Wrapper/Core adapters without loading
curses, an engine or a web server. `hugpy_terminal.control.arms` is the common JSON/CLI
host. Settings are validated and confirmed using `hugpy-settings`.
`hugpy_terminal.models.db` is the models-db-v1 contract (HTTP only, no database
driver): Wrapper and Core clients, the table sections, and pure helpers that merge
per-worker models rows into fleet records and resolve catalog keys.

This package is built from staged source and bundled in offline Debian
installers; PyPI publication is a separate operation.

## Source organization

The package source is `src/hugpy_terminal` inside this package directory.
All standard-library and external package imports go through
`imports/init_imports.py`. Internal imports and lazy export maps use relative
paths. Ordinary imports live at module scope; deferred imports document their
optional backend, protocol selection, or circular dependency requirement.

`imports/constants.py` owns reusable defaults, policy and protocol vocabularies,
limits, UI metadata, media tasks, input markers, and text-format patterns.
`imports/classes/` groups base errors, screen geometry, input decoding,
selection classes, and immutable task records. `imports/functions/` groups parsing, paths,
loading, hashing, text, columns, layout, URLs, address validation, timestamps,
markup, token estimates, clipboard output, Markdown, private file writing,
formatting, durations, clipping and meters. Both shared layers export their
public names lazily, so unrelated backends remain optional.

Hugpy workflows stay in their feature modules. Import helpers and classes from
`imports/functions` and `imports/classes` directly. The former TUI input,
layout, selection, and text forwarding modules, settings aliases, and old Claude
client alias have been removed. Settings consumers import `hugpy_settings`
directly. The SQLite journal is organized
as `journal/journal.py` beside `journal/journal.sql`, with package exports
in `journal/__init__.py`; the SQL is included in built wheels.

Generic path confinement for portable tools is imported directly from
`hugpy_resources.imports.functions.paths`; Resources is an explicit dependency.

## Shared local settings

Use `/settings local` in the terminal to edit this machine's shared settings
profile without requiring a Wrapper endpoint. The panel is `hugpy-settings`'
`local_panel`: one section per settings domain (shared, discovery, database),
with the same widgets, directory picker and provenance display as the Wrapper
settings editor. Discovery opens the same panel for its own domains with
`hugpy-discovery settings` and on unconfigured first launch; it can also run
directly with `python -m hugpy_settings.local_panel`.

Definitions come from Resources `settings.domains`; `hugpy-settings` owns
validation, provenance and private persistence. Secrets are hidden during
input and masked in the panel.
