@chipschat/hermes 1.0.5 → 1.0.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -5,11 +5,14 @@ on Hermes's own API server.
5
5
  - Each Hermes profile you name is a Chips agent. The first is the harness's Main agent.
6
6
  - Each Chips room an agent is in is a Hermes session of its profile, made the first time somebody
7
7
  there speaks to it.
8
- - A new agent a person asks for in a room (Add, then a new one) runs on the first profile, in a
9
- session of its own.
8
+ - A new agent a person asks for in a room (Add, then a new one) is a Hermes profile of its own,
9
+ cloned from the Main agent's, so it remembers only its own conversations (below). So is the agent
10
+ of a space a person asks Hermes for from the +. An agent made before 1.0.8 runs on the first
11
+ profile, in a session of its own, as it did.
10
12
  - A copy of an agent a person asks for in another room (Fork) is a fork of its session there in
11
13
  Hermes, so it remembers everything the agent did; from then on the two go on apart. It runs on
12
- its original's profile, in its original's folder.
14
+ its original's profile, in its original's folder: Hermes forks a session only within its
15
+ profile, so a copy has no profile of its own.
13
16
 
14
17
  Apache-2.0. Not published: a local repository until Chips's SDK is.
15
18
 
@@ -23,19 +26,22 @@ Apache-2.0. Not published: a local repository until Chips's SDK is.
23
26
  | The reply | `run.completed`'s `output`, else the `message.delta`s |
24
27
  | Files in the reply | each `MEDIA:<path>` line of its own in the reply, taken out of the words and sent from the agent's folder; a file outside it is refused, and the reply says so. Each run is told how in its `instructions`, which Hermes adds to the system prompt, over its own hint that its API server sends only pictures |
25
28
  | Cost | the run's tokens; a sub-agent's `cost_usd` as its step's share |
26
- | An approval card | `approval.request` → `POST …/approval`: once, session or always where Hermes offers it, else once; deny for a no. One answered in Hermes's own tools is settled in Chips (ADR 0079) |
29
+ | An approval card | `approval.request` → `POST …/approval`: once, session or always where Hermes offers it, else once, and once for a command, which Chips remembers by how each part starts (Chips ADR 0239); deny for a no. One answered in Hermes's own tools is settled in Chips (ADR 0079) |
27
30
  | "Not right?" on a reply (ADR 0200) | a run of the agent that said it, in its session in the room, after the room's other turns: told its reply and the person's note (or, for a bare 👎, that there was none), it answers again in its place |
31
+ | A space from the + (ADR 0241) | claimed under a key made from the space and named from its first words, which a new agent of the harness answers on a profile of its own (below); what is said there next goes to the same session |
28
32
  | Fork (ADR 0087) | `POST /api/sessions/{id}/fork` of the agent's session in the room it is in (else the last it had), from its latest id when Hermes has compressed it, under an id made from the ask, so an ask heard twice forks once. Hermes ends the original as `branched`, and the original's runs go on in it. A turn still going isn't in the copy. An agent that never spoke is copied with nothing to remember |
29
33
  | Stop | `POST …/stop` |
30
34
  | A steer, a follow-up, an interrupt | `POST …/steer`; the next run of the turn; stop, then the next run with the words |
31
35
  | Trouble on the harness | `GET /health` every 30 s, per profile |
32
- | Context (ADRs 0134, 0238) | the files Hermes builds the agent from: `SOUL.md` (who it is), `memories/USER.md` and `memories/MEMORY.md` in the profile's home, and the first project file with words in it in the folder Hermes's gateway works in (`.hermes.md`, `HERMES.md`, `AGENTS.md` and the rest Hermes looks for). The first profile's files and the project file are the harness's own set, since every new agent reads them; another profile's files are the agent's own until a fork reads them too. An edit is saved where Hermes reads it, only if the file is still the one the person changed. A memory file is saved as Hermes saves it, under its lock, entries apart by a line with only `§`, and an edit over Hermes's limit (2,200 and 1,375 characters unless `config.yaml` says others) is refused with how much to take out. The page says Hermes reads them when a conversation starts: a space already talking picks up a change after it next compacts |
36
+ | Restart on its page (ADR 0094) | Hermes's gateway restarted on this machine, and Hermes shown as restarting until its API server answers again (below) |
37
+ | Context (ADRs 0134, 0238) | the files Hermes builds the agent from: `SOUL.md` (who it is), `memories/USER.md` and `memories/MEMORY.md` in the profile's home, and the first project file with words in it in the folder Hermes's gateway works in (`.hermes.md`, `HERMES.md`, `AGENTS.md` and the rest Hermes looks for). The first profile's SOUL.md and the project file are the harness's own set, since every new agent starts from them; the first profile's memory files are the Main agent's own. Another profile's files are its agent's own until a fork reads them too. An edit is saved where Hermes reads it, only if the file is still the one the person changed. A memory file is saved as Hermes saves it, under its lock, entries apart by a line with only `§`, and an edit over Hermes's limit (2,200 and 1,375 characters unless `config.yaml` says others) is refused with how much to take out. The page says Hermes reads them when a conversation starts: a space already talking picks up a change after it next compacts |
38
+ | Model (ADR 0141) | the models Hermes's own picker lists for the agent's profile (`GET /api/model/options`), of the providers the profile is signed in to, each as `provider/model`. A pick is asked for by each of that agent's runs (`provider` and `model` on `/v1/runs`) and changes nothing in Hermes, so it is that agent's alone, on a profile of its own or one it shares. Hermes's default, the Same as switch, is the profile's own model, set in Hermes (`hermes -p <profile> model`). Hermes says no levels of effort, so none is offered. A `model` the config names for an agent is its own until a person picks another |
33
39
  | Context window (ADR 0146) | how full the agent's session is, from the webhook below: the last model call's prompt tokens, of its model's window. A sharp drop in a session is a compaction, and a turn past half the window says its peak. Read only: the limit is the profile's `compression.threshold` (75% under 512K tokens unless set higher), and Hermes can't be asked to compact from Chips. Nothing is shown until Hermes's first reading |
34
40
 
35
41
  Not yet:
36
42
  - Hermes's clarify questions (their event isn't documented).
37
43
  - Its cron jobs as Chips schedules (ADR 0157).
38
- - Its model list as the agent's Model group.
44
+ - A model's levels of effort (Hermes lists none per model).
39
45
 
40
46
  **How full each context is: Hermes's webhook.** Hermes's API server reports no window during a
41
47
  run, so the bridge adds an outbound webhook to each profile's `config.yaml` when it starts (and
@@ -52,7 +58,8 @@ hooks:
52
58
  ```
53
59
 
54
60
  It only ever adds: with no `hooks:` it appends this block, and under a `hooks:` with no
55
- `outbound:` yet it puts `outbound:` first. Anything else it leaves as it is, and its log says the
61
+ `outbound:` yet it puts `outbound:` first. (In a profile it has just had Hermes make, it moves the
62
+ copied entry to the profile's address.) Anything else it leaves as it is, and its log says the
56
63
  lines to add. The secret goes in the profile's `.env`, which Hermes loads into its gateway; a
57
64
  profile with no `.env` gets the secret in the entry instead. Hermes reads its hooks when its
58
65
  gateway starts, so after the bridge adds one, start `hermes gateway` again once (the setup step
@@ -121,14 +128,61 @@ writes a launch agent (`~/Library/LaunchAgents/chat.chips.hermes.plist`; a syste
121
128
  Linux) that runs the bridge from login and again whenever it stops, and ends: closing the terminal
122
129
  or restarting the machine no longer takes it offline in Chips. Its log is
123
130
  `~/Library/Logs/chips-hermes.log`. `npm run keep -- --stop` stops it and removes the file. Stop a
124
- copy started by hand first: two answer twice. Hermes's own `hermes gateway` is kept running its own
125
- way.
131
+ copy started by hand first: two answer twice. When the bridge starts and nothing answers at a local
132
+ address, it starts Hermes's gateway (below), so Hermes comes back after a reboot too.
133
+
134
+ **Restart.** Restart on Hermes's page in Chips restarts Hermes's gateway, the process serving its
135
+ API server at the agents' address, when that is on this machine:
136
+ - Installed as Hermes's own service (`hermes gateway install`, so
137
+ `~/Library/LaunchAgents/ai.hermes.gateway.plist` or a systemd unit), `hermes gateway restart`.
138
+ - Run by hand, the process listening on the API's port is stopped (SIGTERM, then SIGKILL if it is
139
+ still there 15 s later), only if it is this user's `hermes gateway run`. Anything else there is
140
+ left alone, and Chips says so. Then `hermes gateway run` is started again with the same words, in
141
+ the folder it worked in, in a session of its own, its output added to
142
+ `~/Library/Logs/chips-hermes-gateway.log`.
143
+
144
+ Chips shows Hermes as restarting until its API server answers again, then fine, or in a line what
145
+ went wrong. Started with the bridge, it is the same, with `hermes gateway start` for a service. The
146
+ bridge asks for `restarts` when it joins with a code; a harness joined without it gets Restart
147
+ once Chips is told it takes it (`chips declare`, ADR 0046).
148
+
149
+ On a Mac whose Homebrew python@3.14 can't load macOS's expat, Hermes dies as it starts with
150
+ `Symbol not found: _XML_SetAllocTrackerActivationThreshold`. Then the bridge starts Hermes's entry
151
+ point (the one the `hermes` wrapper runs) directly, with the wrapper's variables and
152
+ `DYLD_LIBRARY_PATH=/opt/homebrew/opt/expat/lib`, which macOS would drop at the wrapper, and its log
153
+ says so.
126
154
 
127
155
  **Folders.** Each agent gets a folder of its own, `~/chips-hermes/agents/<its name>`, made the
128
156
  first time it is spoken to and kept by its Chips agent after a rename. Each run tells the agent it
129
157
  is its folder, in the run's `instructions`. The files an answer sends go to the room from there and
130
158
  from nowhere else.
131
159
 
160
+ **Each new agent, a profile of its own.** An agent made in Chips (Add, then a new one, or a
161
+ space from the +) gets a Hermes profile, made by Hermes with
162
+ `hermes profile create <name> --clone-from <the Main agent's> --no-alias`:
163
+ - It starts with the Main agent's `config.yaml` (its model and tools), the keys in its `.env`,
164
+ its skills and plugins, and its `SOUL.md` to start from. Hermes leaves out messaging channels.
165
+ No `<name>` shortcut is made: `hermes -p <name>` reaches it.
166
+ - Its memory starts empty: the bridge takes out the copies of `memories/MEMORY.md` and `USER.md`.
167
+ - Hermes counts its API server as a messaging channel, so the clone has no `API_SERVER_KEY`, and
168
+ Hermes answers `/p/<name>` only with that profile's own. The bridge adds one, a new random key,
169
+ to the profile's `.env`, and reads it from there.
170
+ - Chips's webhook (above) is moved to the profile's own address, `/chips-hermes/<name>`.
171
+
172
+ The profile is named after the agent when it is made, in lowercase letters, digits and `-`
173
+ (`nova`, `nova-2` when Hermes has a `nova` already), and keeps that name after a rename, as the
174
+ agent's folder does. Deleting the agent in Chips leaves its profile in Hermes: what it learned is
175
+ yours to delete, with `hermes profile delete <name>`. `~/.chips-hermes/sessions.json` remembers
176
+ which profile is whose.
177
+
178
+ The one gateway serves every profile under `/p/<name>`, and takes a new one at once when the bridge
179
+ asks over its control socket (`rescan-profiles`, as `hermes profile create` does). But a gateway
180
+ that started when Hermes had only its default profile serves that one alone until it starts
181
+ again. Then the bridge restarts it once, as Restart does (above), and its log says so; from then
182
+ on it serves every profile. Hermes's gateway also keeps sending a new profile's readings to the
183
+ Main agent's address until it starts again, which the bridge drops. Where Hermes doesn't make a
184
+ profile, the agent runs on the first profile, in a session of its own, and the log says why.
185
+
132
186
  **More than one agent.** Name them in `~/.chips-hermes/config.json` (see `config.example.json`).
133
187
  Each agent is one of three:
134
188
  - the default profile;
@@ -1,6 +1,6 @@
1
1
  # Third-party notices
2
2
 
3
- `dist/main.js` in @chipschat/hermes 1.0.5 carries these packages, bundled in. Each one's
3
+ `dist/main.js` in @chipschat/hermes 1.0.8 carries these packages, bundled in. Each one's
4
4
  licence follows.
5
5
 
6
6
  ## @chipschat/harness 0.0.0 (Apache-2.0)