AudionAudion

GIT_WIKI_HUB_MANAGER - карта Audion Hub Manager

GIT_WIKI_HUB_MANAGER_RU.md

GIT_WIKI_HUB_MANAGER - карта Audion Hub Manager

Содержание

Статус: 2026-06-03.

Этот документ - рабочая wiki-карта Audion Hub Manager. Здесь описаны окна, логические группы, команды, поля ввода, обслуживание конфигов/локальной базы, работа с GitHub/GitLab/Git remotes, политика аутентификации и текущие белые пятна программы.

1. Главная модель

Audion Hub Manager связывает три слоя:

Full Project / Source  ->  Hub Data / Mirror  ->  Git remotes
                         ->  Docs view

иметь собственный .git и может быть пересобрана из Source.

Приложение не является хранилищем паролей. Оно запускает настоящий git и полагается на внешнюю аутентификацию: SSH agent, Git Credential Manager, GitHub CLI, GitLab CLI, VS Code, GitKraken или уже настроенный Git.

2. Локальная база и основные конфиги

На текущем этапе у Hub Manager нет большой SQL-базы. Его состояние хранится в JSON/YAML-файлах:

Code.exe.

Отчеты и диагностические payload пишутся в logs/<project_id>/ как датированные JSON. Workspace helpers пишутся в workspace/.

3. Реестр проектов

Один объект projects.json описывает один реальный проект:

Manager.

если поле заполнено.

Кнопки выбора папки в Structure могут записывать Project/GIT COPY/Docs пути обратно в projects.json. Пути внутри дерева менеджера сохраняются относительно, внешние пути остаются абсолютными.

4. Профили MIRROR

projection_profiles.json управляет и MIRROR, и проверкой путей перед Hub Manager stage/commit:

исключения.

папок.

если фаза copy/touch дала ошибки или конфликты.

5. Общая раскладка окна

Главное окно состоит из четырех поверхностей:

Left Control panel | Structure tree | Inspector tabs
Bottom Terminal / command dock

Splitter меняет ширину левой панели, дерева, Inspector и высоту терминала. Inspector содержит вкладки:

Quick  | Branch | Editor | Diff    | Storage
Remote | Basket | Reader | History | Details

Каждый заголовок вкладки начинается с Material-иконки. Tabs и command buttons имеют tooltips с задержкой появления 1200 ms и hide/fade 80 ms.

Safety находится внутри зоны Storage. Текущий выбранный путь показывается в правом верхнем углу Inspector.

6. Header

Header показывает:

Счетчики обновляются после Git status операций.

7. Левая панель Control

Project

Dropdown Project выбирает активную запись из projects.json. Это переключает сразу весь комплект:

source_path
projection_path
docs_path
profile
default_branch

Open

git status --short.

git status --short.

MIRROR

Опции:

Команды:

SOURCE ACTIONS

Операции по реестру проектов или общему Source-контейнеру:

добавить недостающие записи в projects.json.

тяжелые файлы.

проектов.

badge.

PROJECT ACTIONS

Операции над текущим выбранным объектом дерева:

.rst во встроенном Editor.

Support

удаляются.

8. Structure tree

Переключатели слоя:

Иконки папок выбирают новое расположение слоя. Clear locations удаляет сохраненные overrides из project config.

Фильтры:

Поведение дерева:

9. Inspector: Quick

Quick - частые локальные и selected-path команды. Часть кнопок выполняет Python handler, часть кладет точный текст в manual command area.

GIT LOCAL

GIT DIFF

Поля по возможности получают selected path:

GIT SELECTED PATH

GIT BACKUP / MAINTENANCE

GIT ADVANCED - DANGER

runner блокируется danger filter.

CI/CD status

Показывается только если найдены CLI:

Command cache

Danger filter блокирует команды, содержащие:

reset --hard
clean -fd
push --force
rm -rf
rmdir /s
del /s

10. Inspector: Basket

Basket готовит читаемые commits и checkpoint tags.

Поля:

Правило сообщения:

<type>(<scope>): <series> <version> - <subject>

Если Subject пустой, используется вручную введенный Commit message.

Команды:

Basket привязан к текущему Git root. При смене root он очищается, чтобы не смешивать репозитории. Stage/commit проверяют активный projection profile и блокируют paths вне Hub allowlist.

11. Inspector: Branch

Branch содержит branch switching, compare, integration и stash.

branch status

git branch / tag

merge

git stash

branch danger

Это visible templates: оператор видит точную команду и может ее отредактировать.

12. Inspector: Remote

Remote отвечает за remotes, push/pull/fetch и auth setup.

Поля remote form:

hidden_<platform>.

Generated SSH URL:

git@github.com:<owner>/<repo>.git
git@gitlab.com:<owner>/<repo>.git
git@codeberg.org:<owner>/<repo>.git

Remote commands:

--follow-tags в каждый remote последовательно.

config/remotes.json.

enabled remotes.

обновляет remote_field_cache.json.

Auth tools:

Auth Doctor проверяет Git, global Git identity, gh, glab, SSH hosts, repo remotes, URL types/providers и optional git ls-remote по enabled remotes.

13. Inspector: Editor

Поддержанные расширения:

.md
.markdown
.txt
.rst

Toolbar:

Save пишет UTF-8 только по явному действию пользователя и обновляет tree.

14. Inspector: Reader

Reader - общая зона summary. Сюда попадают MIRROR summaries, Git status, Auth Doctor summary, Storage summary и batch command summaries.

15. Inspector: Diff

Команды:

Diff рисуется как RedLine view: line numbers, hunks, additions, removals, metadata lines.

16. Inspector: History

Команды:

17. Inspector: Details

Details показывает:

Команды:

18. Inspector: Storage и Safety

Storage commands:

project entries.

External tools:

Safety commands:

heavy extensions и large files.

Safety пропускает generated/runtime dirs: .git, .venv, runtime, wheelhouse, node_modules, logs, output, backup, release, report, temp, tmp и похожие.

19. Terminal / command dock

Нижний dock содержит:

Manual commands запускаются в current Git root, если он есть, иначе в manager root. Output стримится в terminal dock. Команда добавляется в history, если не заблокирована danger filter.

20. GitHub/GitLab remote workflow

Рекомендуемый SSH-flow:

  1. Настроить SSH keys вне Hub Manager.
  2. Проверить ssh -T GitHub и ssh -T GitLab.
  3. Заполнить Platform, Remote name, Login / group, Repository.
  4. Нажать build URL.
  5. Нажать save remote.
  6. Нажать git apply remotes.json.
  7. Проверить git remote -v.
  8. Использовать git fetch --all --prune для безопасного remote tracking

update.

  1. После commit/tag использовать git push origin или git push all remotes.

Для HTTPS использовать Git Credential Manager, GitHub CLI или GitLab CLI. Remote URL должен быть чистым:

Good: https://gitlab.com/user/repo.git
Bad:  https://username:TOKEN@gitlab.com/user/repo.git

origin push URLs полезен, когда fetch/pull должен идти из одного canonical remote, а push должен публиковать в несколько mirrors.

21. MIRROR и обслуживание конфигов

Повседневное обслуживание:

Правила registry maintenance:

22. Подробная карта Git-work функций

Этот раздел фиксирует именно Git-work слой: какие команды выполняются сразу, какие только ставятся в очередь, какие функции кода их обслуживают и какие guards включены.

22.1. Где выполняются Git-команды

Текущий Git root определяется функцией current_git_root() и равен текущему root дерева:

PROJECT  -> source_path
GIT COPY -> projection_path
DOCS     -> docs_path

Поэтому перед запуском Quick/Branch/Remote важно проверить активный слой Structure. add active project является исключением: он всегда берет mirror_root() и stages активную Hub projection.

22.2. Прямые handlers

Прямые handlers сразу вызывают Python-обертки над Git:

config/remotes.json.

enabled remotes.

git push --follow-tags <remote> <default_branch>.

git diff HEAD.

22.3. Шаблоны в очереди

Шаблоны в очереди вызывают queue_git_command(). Они заполняют command area в Inspector и нижний terminal command input, добавляют команду в history и ждут ручного Run.

В очередь ставятся:

22.4. Command runner and danger filter

run_shell_command() runs manual commands with shell=True, streams stdout and stderr into terminal dock, writes exit code and updates status.

Before execution it calls is_dangerous_command(). Blocked tokens:

reset --hard
clean -fd
push --force
rm -rf
rmdir /s
del /s

Важный нюанс: опасные команды могут быть поставлены в очередь как видимые templates, чтобы оператор увидел и отредактировал точную команду. Но запуск неизмененной опасной команды через Run блокируется danger filter.

22.5. Commit profile guard

Hub Manager does not blindly commit everything. Before selected/basket/Mirror stage/commit flows it checks paths through the active projection profile:

The check expands directories, ignores marker files like .gitkeep, applies include_file() from the active profile, and blocks files outside Hub allowlist. This protects Source and Mirror Git workflows from runtime payload, logs, binaries, PDFs, secrets and local config.

22.6. Basket state machine

Basket is in-memory state:

When Git root changes, ensure_commit_basket_root() clears the basket and locks it to the new root. This prevents cross-repository commits.

Basket message generation:

type + optional scope + version_series + version_value + subject

Tag generation:

<slugified version_series>-<normalized semver>

next version scans existing tags with the same series prefix and bumps patch, minor or major.

22.7. Remote config functions

Remote form flow:

config/remotes.json, and updates recent cache.

Remote application flow:

git remote add or git remote set-url.

adds push URLs through git remote set-url --add --push origin <url>.

branch/tags sequentially.

Remote names are limited to [A-Za-z0-9._-]+. Secrets in remote URLs are not stored by policy.

22.8. Auth and external tools

Auth Doctor uses system_core/core/auth_doctor.py:

credentials.

External setup buttons:

Background probes set non-interactive behavior to avoid freezing the GUI on password prompts.

22.9. Diff and History functions

Diff:

History:

Selecting a tree node also triggers Details refresh and lightweight diff preview for changed files.

22.10. Git-work reports and logs

Git command output is streamed to the terminal dock. Structured diagnostics are written as JSON reports:

Reports use write_report(kind, payload, project_id=...) and live under logs/<project_id>/.

23. Провисающие места и пропущенные частые команды

Программа уже закрывает большую часть everyday Git/MIRROR workflow, но видны следующие белые пятна.

Remote status and sync

Branch workflow

git branch --set-upstream-to.

Staging and commit

уже есть.

History and recovery

git checkout <sha> -- <path>.

Auth

каждым configured remote.

Auth Doctor.

Safety and release

Storage and Docs

отсутствующий/небезопасный workflow.

picker и scanner.

UI and ergonomics

benign операций.

правки.

24. Рекомендуемый следующий backlog

Небольшие low-risk улучшения:

  1. Branch dropdown из git branch --all.
  2. Шаблоны git switch - и git push -u origin <branch>.
  3. Selected-path stage/unstage кнопки во вкладке Diff.
  4. basket remove selected или кликабельные строки Basket.
  5. remote show <name> и fetch selected remote.
  6. Таблица Auth/Remote badges: name, provider, URL type, enabled,

configured in repo, ls-remote ok.

  1. Видимое stale Safety warning перед push.
  2. git commit --amend как queued command, не direct action.
  3. git show <commit>:<path> viewer в History/Diff.
  4. Docs-only projection action, если Docs станет активным workflow.
Alle Projekte