feat: install.cmd and a copy-based installer, README for the package

Co-Authored-By: Ovis Fast (Claude) <[email protected]>
This commit is contained in:
FactorandOvis Fast committed 2026-11-19 12:53:43 +01:00
1 parent 74c1dfaeb8
commit 7ec0c20989
3 files changed
+288 -139

No files matched your search

+52 -28
View File
@@ -1,43 +1,67 @@
# herdrMario
# herdr-composer
Source of the `ovis-composer` Herdr mod (Unified Prompt Experience).
A message bar for [Herdr](https://herdr.dev) agents: one field under the terminal
that writes to the focused agent, with per-agent drafts that survive a restart, a
queue that waits for the agent's turn, history and favourites, `/` and `@`
suggestions, and one pipeline for attachments (drop, `+`, Ctrl+V).
- `mod/ovis-composer/` - the mod (ES modules; Herdr does not see changes behind the junction - see Reload)
- `layouts/ovis-composer.json` - its layout
- `tests/` - Node tests for the pure modules (`npm test`)
- `docs/superpowers/` - spec and plan
The package lives in [`herdr/herdr-composer/`](herdr/herdr-composer/) and has the
layout Herdr expects for shared mods and layouts:
- `layouts/herdr-composer.json` - the layout (a clone of `main` with the composer block)
- `mods/herdr-composer/` - the mod (ES modules)
- `keys.json` - the key it expects (`ctrl-shift-space` focuses the composer)
- `RECIPE.md` - the brief to build it from scratch, and what it runs and reads
Other folders: `tests/` (Node tests for the pure modules, `npm test`), `scripts/`
(the installer), `docs/` (spec, plan, verification).
## Install
```powershell
.\scripts\install.ps1
Two ways, the same result.
**1. Through an agent** (the way herdr.dev layouts are added):
```text
Read ~/.config/herdr-app/AGENTS.md, then add this layout: clone http://git.mkali.pl/Factor/herdrMario.git and use the folder herdr/herdr-composer
```
Idempotent. An existing real `mods\ovis-composer` directory is renamed to
`ovis-composer.bak-20261119` (never deleted), a junction to `mod\ovis-composer`
takes its place, and the layout is copied to `~\.config\herdr-app\layouts\`
(existing file backed up once as `.bak-20261119`).
**2. One command** (Windows):
The script ends with `herdr-app do layout.switch '{"name":"ovis-composer"}'`.
Check with `herdr-app check <mods>\ovis-composer` and `herdr-app status`.
## Reload
Herdr does **not** see changes to the mod files behind the junction: a running
copy keeps the code it loaded. After every edit of `mod\ovis-composer`:
```powershell
.\scripts\install.ps1 -Reload
```cmd
git clone http://git.mkali.pl/Factor/herdrMario.git "%USERPROFILE%\herdrMario" && "%USERPROFILE%\herdrMario\install.cmd"
```
It removes the junction and makes it again (the repo files stay), and Herdr
loads the mod from scratch.
The installer:
- pulls the repo (`git pull --ff-only`, only when it is a clean clone; a failure is a warning);
- **copies** the mod to `~\.config\herdr-app\mods\herdr-composer` (a mirror) and the
layout to `layouts\herdr-composer.json`, so Herdr loads the new files by itself;
- merges `keys.json` of the package into yours (a backup is kept once as
`keys.json.bak-herdr-composer`; a key you bind to something else is left alone, with a warning);
- clears away the earlier version, `ovis-composer` (a junction is unlinked, a directory or
layout is moved to a `.bak-<date>` copy, its key is removed) - your history, favourites,
drafts and queue are kept: the mod reads what the earlier version stored;
- runs `herdr-app check` on the mod and switches to the `herdr-composer` layout
(without `herdr-app` on the PATH these two are warnings, not errors).
Files of this repo are never deleted.
## Update
Run `install.cmd` again (or ask the agent again). It is the same command: pull, copy, check.
There is no junction and no reload step - the copy is what Herdr sees.
## Uninstall
```powershell
.\scripts\install.ps1 -Uninstall
```cmd
install.cmd -Uninstall
```
Removes the junction (the repo files stay), restores the `.bak-20261119` mod
directory, layout and `keys.json` backups, and switches to the `main` layout.
Removes `mods\herdr-composer`, `layouts\herdr-composer.json` and its key from `keys.json`, and
switches to the `main` layout. Only `.bak` copies stay.
## Develop
Edit the files in `herdr/herdr-composer/`, run `npm test`, then `install.cmd` to copy the
change into Herdr (`herdr-app check <mods>\herdr-composer` and `herdr-app status` show problems).