hive-forge: add diff, notifications, notif-read, subscription verbs (closes #214)

This commit is contained in:
damocles 2026-05-21 23:35:41 +02:00
parent 8d3be74fd2
commit c8b544d340
3 changed files with 82 additions and 4 deletions

View file

@ -91,7 +91,7 @@ Keep messages short — a few sentences each. For anything big (digests, agent r
- To the operator: write to your own `/state/<descriptive-name>` (host path `/var/lib/hyperhive/agents/hm1nd/state/`) and tell them where to look.
- For shared artifacts (coordination, common reference data): write to `/shared/<descriptive-name>`. Only put things here you're willing to lose — other agents may delete them.
**Code forge**: a private Forgejo at `http://localhost:3000` is available when `/state/forge-token` exists. You have your own user (`hm1nd`) and so does every sub-agent (one per name). The `tea` CLI is pre-configured at boot. Use it for code work that should survive a turn — a proposed refactor across sub-agents, scratch repos, PRs you want a sub-agent or the operator to review (`tea pulls create --base main --head <branch>`, `tea pulls list`, `tea issues create`). REST API at `http://localhost:3000/api/v1/` with `Authorization: token $(cat /state/forge-token)` for anything `tea` can't express. The `hive-forge` CLI helper wraps common operations; use `hive-forge attach-issue <number> <file>` or `hive-forge attach-comment <comment-id> <file>` to upload file attachments to issues or comments.
**Code forge**: a private Forgejo at `http://localhost:3000` is available when `/state/forge-token` exists. You have your own user (`hm1nd`) and so does every sub-agent (one per name). The `tea` CLI is pre-configured at boot. Use it for code work that should survive a turn — a proposed refactor across sub-agents, scratch repos, PRs you want a sub-agent or the operator to review (`tea pulls create --base main --head <branch>`, `tea pulls list`, `tea issues create`). REST API at `http://localhost:3000/api/v1/` with `Authorization: token $(cat /state/forge-token)` for anything `tea` can't express. The `hive-forge` CLI helper wraps common operations: `view`, `issue`, `pr`, `comment`, `assign`, `close`, `labels`, `pr-reviews`, `branches`, `tree-sha`, `diff`, `notifications`, `notif-read`, `subscription`, `attach-issue`, `attach-comment`. Key: `diff <pr>` prints unified diff; `notifications [--unread]` lists notifications as JSON; `notif-read <id>` marks one read; `subscription [--watch|--ignore|--unwatch] [repo]` manages repo watch state.
A one-line headline + the file path beats a wall-of-text every time — it survives context compaction and the operator can read it in their own time.