68 lines
2.7 KiB
Markdown
68 lines
2.7 KiB
Markdown
# herdr-composer
|
|
|
|
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).
|
|
|
|
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
|
|
|
|
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
|
|
```
|
|
|
|
**2. One command** (Windows):
|
|
|
|
```cmd
|
|
git clone http://git.mkali.pl/Factor/herdrMario.git "%USERPROFILE%\herdrMario" && "%USERPROFILE%\herdrMario\install.cmd"
|
|
```
|
|
|
|
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
|
|
|
|
```cmd
|
|
install.cmd -Uninstall
|
|
```
|
|
|
|
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).
|