@chipschat/hermes 1.0.7 → 1.0.10

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,13 +5,16 @@ 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
- Apache-2.0. Not published: a local repository until Chips's SDK is.
17
+ Apache-2.0, published on npm as `@chipschat/hermes`.
15
18
 
16
19
  ## What Chips shows
17
20
 
@@ -25,18 +28,20 @@ Apache-2.0. Not published: a local repository until Chips's SDK is.
25
28
  | Cost | the run's tokens; a sub-agent's `cost_usd` as its step's share |
26
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
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) |
33
- | 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 |
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 |
34
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 |
35
40
 
36
41
  Not yet:
37
42
  - Hermes's clarify questions (their event isn't documented).
38
43
  - Its cron jobs as Chips schedules (ADR 0157).
39
- - Its model list as the agent's Model group.
44
+ - A model's levels of effort (Hermes lists none per model).
40
45
 
41
46
  **How full each context is: Hermes's webhook.** Hermes's API server reports no window during a
42
47
  run, so the bridge adds an outbound webhook to each profile's `config.yaml` when it starts (and
@@ -53,7 +58,8 @@ hooks:
53
58
  ```
54
59
 
55
60
  It only ever adds: with no `hooks:` it appends this block, and under a `hooks:` with no
56
- `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
57
63
  lines to add. The secret goes in the profile's `.env`, which Hermes loads into its gateway; a
58
64
  profile with no `.env` gets the secret in the entry instead. Hermes reads its hooks when its
59
65
  gateway starts, so after the bridge adds one, start `hermes gateway` again once (the setup step
@@ -77,11 +83,11 @@ hasn't been tried through Chips yet.
77
83
 
78
84
  ## From Chips's gallery
79
85
 
80
- The card's line is `chips connect hermes '<link>'` (Chips ADR 0218). It downloads this bridge as the npm package
86
+ The card's line is `CHIPS_JOIN_LINK='<link>' chips connect hermes` (Chips ADR 0218). It downloads this bridge as the npm package
81
87
  `@chipschat/hermes`, the newest 1.x, checks it against the registry's checksum, and runs it on the Node
82
88
  that Chips carries, so the machine needs no Node or npm of its own. The bridge checks Hermes,
83
89
  joins, and keeps itself running from login. `chips disconnect hermes` stops it. On another computer,
84
- `curl -fsSL https://chipschat.ai/install | sh -s -- connect hermes '<link>'` installs Chips there
90
+ `curl -fsSL https://chipschat.ai/install | CHIPS_JOIN_LINK='<link>' sh -s -- connect hermes` installs Chips there
85
91
  first. The steps below run the bridge from this checkout instead, to work on it.
86
92
 
87
93
  ## Run it
@@ -97,11 +103,11 @@ first. The steps below run the bridge from this checkout instead, to work on it.
97
103
 
98
104
  2. Once, in this repository: `npm install`.
99
105
 
100
- 3. Join Chips once, with a link from Chips's gallery (Add an agent → Hermes), whose card gives
106
+ 3. Join Chips once, with a link from Chips's gallery (Agents → Connect a harness → Hermes), whose card gives
101
107
  this line with the link in it:
102
108
 
103
109
  ```
104
- cd ~/Work/Chips/chips-hermes && CHIPS_JOIN_LINK='<link>' npm run keep
110
+ cd chips-hermes && CHIPS_JOIN_LINK='<link>' npm run keep
105
111
  ```
106
112
 
107
113
  `npm run keep` joins, then keeps the bridge running from login (below); `npm start` is the
@@ -151,6 +157,32 @@ first time it is spoken to and kept by its Chips agent after a rename. Each run
151
157
  is its folder, in the run's `instructions`. The files an answer sends go to the room from there and
152
158
  from nowhere else.
153
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
+
154
186
  **More than one agent.** Name them in `~/.chips-hermes/config.json` (see `config.example.json`).
155
187
  Each agent is one of three:
156
188
  - the default profile;
@@ -1,6 +1,6 @@
1
1
  # Third-party notices
2
2
 
3
- `dist/main.js` in @chipschat/hermes 1.0.7 carries these packages, bundled in. Each one's
3
+ `dist/main.js` in @chipschat/hermes 1.0.10 carries these packages, bundled in. Each one's
4
4
  licence follows.
5
5
 
6
6
  ## @chipschat/harness 0.0.0 (Apache-2.0)