Plugins declare their settings in config_schema and requires_env, and the Desktop renders them as a form, but the CLI had no way to see or change them short of hand-typing plugins.entries.<id>.settings.<key>. `hermes plugins config <name>` lists every declared setting with its current value and edits one at a time (choices and bool as pickers, numbers and JSON type-checked, secrets masked), saving through the same writers as the Desktop form: save_plugin_settings for config.yaml and the PUT /api/env credential route for .env. Without a TTY it prints the settings instead. plugins show and install point at it. plugins_settings.py becomes a package (fields.py unchanged, facade re-exports).
13 lines
597 B
Python
13 lines
597 B
Python
"""Plugin-declared settings (#46600, #87934): a manifest ``config_schema`` turned into fields and edits.
|
|
|
|
Modules:
|
|
|
|
- ``fields`` — the schema as renderable fields (type, current value, choices) and the validated
|
|
writer; the Desktop/TUI Plugins hub and the CLI editor both read and write through it.
|
|
- ``cli`` — ``hermes plugins config <name>``: the interactive terminal editor over those fields.
|
|
"""
|
|
|
|
from hermes_cli.plugins_settings.fields import plugin_settings_fields, save_plugin_settings, secret_env_name
|
|
|
|
__all__ = ["plugin_settings_fields", "save_plugin_settings", "secret_env_name"]
|