Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
21 commits
Select commit Hold shift + click to select a range
5894029
ensemble: let the code carry hives and kad
adiled Oct 19, 2026
0d0fa35
ensemble: let the code carry uri, onchain, headroom, tls, tcp
adiled Oct 19, 2026
aaa4539
humd: let the code carry thrumd, registry, drone, drift, peers
adiled Oct 19, 2026
8b81b7e
hum-identity: split ids into two modules, name the bit arithmetic
adiled Oct 19, 2026
82b8178
hum-paths: let the code carry the path table
adiled Oct 19, 2026
6743240
thrum-core: let the code carry envelope, prims, wane, views
adiled Oct 19, 2026
385a8ab
codegen, thehum: let the code carry the generator and the log
adiled Oct 19, 2026
4a839ee
sim, humctl: let the code carry the test harness
adiled Oct 19, 2026
1b28e09
ensemble: let the code carry the integration tests
adiled Oct 19, 2026
22af011
hum-mcp, hum-nest: let the code carry the bridge and the kernel
adiled Oct 19, 2026
7aa4204
hum, hum-thrum: let the code carry the CLI
adiled Oct 19, 2026
7050b62
sweep the remaining item docs across the workspace
adiled Oct 19, 2026
e0c868f
wire: move the chi contract to WIRE.md, zero out the comment debt
adiled Oct 19, 2026
28c3368
codegen: collapse the nested if in simplify
adiled Oct 19, 2026
787495a
hum: keep the short help rendering for doctor and update
adiled Oct 19, 2026
b70c891
install: ship the man page
adiled Oct 19, 2026
fd9a757
release: adopt the canonical release.sh, drop the VERSION file
adiled Oct 19, 2026
c30bc93
hum: stamp the version with the commit it was built from
adiled Oct 19, 2026
1f0a3a7
man: leave the version entry as it was
adiled Oct 19, 2026
7444112
drop the compatibility-index generator
adiled Oct 19, 2026
d9c519e
fix the clippy findings across the workspace
adiled Oct 19, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
41 changes: 12 additions & 29 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@ name: Release

on:
push:
tags: ["v*"]
tags:
- "v*"

permissions:
contents: write
Expand All @@ -13,36 +14,18 @@ jobs:
# whole release. Reintroduce when there's a reliable cross-platform
# path; for now consumers build from source via `cargo install` or
# the installer at hum.sh.
publish:
#
# hum is not published to crates.io, so there is no publish step.
# The version bump, the lockfiles and the tag are done locally by
# ./release.sh; this workflow only publishes the release.
release:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
fetch-tags: true

- name: Compose release notes
id: notes
run: |
TAG="${GITHUB_REF#refs/tags/}"
# Prefer an annotated-tag message; else fall back to changelog
# since the previous tag.
BODY=$(git for-each-ref "refs/tags/$TAG" --format='%(contents)' 2>/dev/null)
if [ -z "$(echo "$BODY" | tr -d '[:space:]')" ]; then
PREV=$(git tag --sort=-v:refname | grep -v "^${TAG}$" | head -1)
BODY=$(git log --pretty=format:"- %s" ${PREV}..${TAG} 2>/dev/null || echo "Release $TAG")
fi
{
echo "tag=$TAG"
echo 'body<<EOF'
echo "$BODY"
echo "EOF"
} >> "$GITHUB_OUTPUT"

- name: Create GitHub release
run: |
gh release create "${{ steps.notes.outputs.tag }}" \
--title "${{ steps.notes.outputs.tag }}" \
--notes "${{ steps.notes.outputs.body }}"
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
gh release create "$GITHUB_REF_NAME" \
--title "$GITHUB_REF_NAME" \
--generate-notes
1 change: 0 additions & 1 deletion VERSION

This file was deleted.

101 changes: 64 additions & 37 deletions WIRE.md
Original file line number Diff line number Diff line change
Expand Up @@ -171,62 +171,89 @@ prompts your way. The wire stays exactly the same.

## Chi registry (THRUM_VERSION 0.7.0)

Generated by `cargo run -p codegen` — Rust enums in
[`thrum-core/src/chi.rs`](../thrum-core/src/chi.rs) are the source of
truth. The list below is informational and may lag the canonical
registry by one bump.

### Nestler → daemon
This section is the wire contract. `thrum-core/src/chi.rs` mirrors it as
the Rust enum, and `codegen` emits the TypeScript, Python, and Go
mirrors from it — so the four copies cannot drift.

`body fields` below are the chi-specific fields only. `sid` is not
among them — it is an [envelope](#envelope) field, and a tone carries it
alongside any of these.

| chi | body fields | meaning |
Each row carries two prose columns: `meaning` is for a human reading
this spec, `description` is the canonical one-liner the generated
clients carry as their doc comment. They are the same contract stated
at two lengths — `description` is the one the clients quote, so a chi
with no description here has none in the clients either.

### Nestler → daemon

| chi | body fields | meaning | description |
|---|---|---|
| `hello` | `bee`, `protoVersion`, optional `version`/`propensity`/`chi`/`source` | first frame after connect |
| `prompt` | `sid`, `text`/`content`, optional `modelId`/`cwd`/`systemPrompt`/`tools` | start a turn |
| `cancel` | `sid` | interrupt the current turn for this sid |
| `cleanup` | `sid` | drop daemon state for this session |
| `curate` | `sid` | manual compaction request |
| `release-permit` | `callId`, `ok`, optional `error` | answer a `permission-ask` |
| `tendril-result` | `sid`, `callId`, `result` | task subagent answered |
| `tool-result` | `callId`, `result`/`output`, `isError`, `title`, `metadata` | nestler-declared tool answered |
| `petal-cell` | `sid`, `cell` | OC message-graph update (graft hint) |
| `hello` | `bee`, `protoVersion`, optional `version`/`propensity`/`chi`/`source` | first frame after connect — announce self | announce self — protoVersion, bee, version |
| `prompt` | `sid`, `text`/`content`, optional `modelId`/`cwd`/`systemPrompt`/`tools` | start a turn | start a turn — content, system, tools |
| `cancel` | `sid` | interrupt the current turn for this sid | interrupt mid-turn |
| `cleanup` | `sid` | drop daemon state for this session | session deleted, drop daemon state |
| `curate` | `sid` | manual compaction request | manual compaction request |
| `release-permit` | `callId`, `ok`, optional `error` | answer a `permission-ask` | resolve an earlier permission-ask |
| `tendril-result` | `sid`, `callId`, `result` | task subagent answered | task subagent answered |
| `tool-result` | `callId`, `result`/`output`, `isError`, `title`, `metadata` | nestler-declared tool answered | nestler-declared tool answered |
| `petal-cell` | `sid`, `cell` | OC message-graph update (graft hint) | OC message-graph update (graft hint) |

### Daemon → nestler

| chi | body fields | meaning |
| chi | body fields | meaning | description |
|---|---|---|
| `breath` | (state snapshot, usually `{}`) | reply to hello |
| `chunk` | `chunkType`, `blockIdx`, `delta`, `partialJson` | streamed model output |
| `finish` | `finishReason`, `usage`, optional `exitCode`, `subtype` | turn complete |
| `error` | `message`, `code`, optional `subtype`, `usage` | turn aborted / hard error |
| `session-ready` | `nestId`, `model`, `tools` | nest spawned, ready for prompts |
| `pulse` | `kind` (CellSpawned/CellReady/CellIdle/CellDied/CellEvicted), `pid` | process lifecycle event |
| `permission-ask` | `callId`, `toolName`, `message`, `arg` | mid-stream permission needed |
| `tendril-reach` | `task`, `tools` | task subagent dispatch |
| `tool-call` | `sid`, `callId`, `name`, `args` | nestler-declared tool dispatch |
| `tool-meta` | `callId`, `toolName`, `metadata` | out-of-band metadata for a tool result |
| `breath` | (state snapshot, usually `{}`) | reply to hello — handshake, full state sync on connect | handshake — full state sync on connect |
| `chunk` | `chunkType`, `blockIdx`, `delta`, `partialJson` | streamed model output, partwise (text/reasoning/tool) | model output partwise (text/reasoning/tool) |
| `finish` | `finishReason`, `usage`, optional `exitCode`, `subtype` | turn complete | turn complete — finishReason + usage |
| `error` | `message`, `code`, optional `subtype`, `usage` | turn aborted / hard error | turn aborted |
| `session-ready` | `nestId`, `model`, `tools` | nest spawned, ready for prompts | nest spawned, claude session id known |
| `pulse` | `kind` (CellSpawned/CellReady/CellIdle/CellDied/CellEvicted), `pid` | process lifecycle event | process lifecycle event |
| `permission-ask` | `callId`, `toolName`, `message`, `arg` | mid-stream permission needed | mid-stream permission needed |
| `tendril-reach` | `task`, `tools` | task subagent dispatch | task subagent dispatch |
| `tool-call` | `sid`, `callId`, `name`, `args` | nestler-declared tool dispatch | nestler-declared tool dispatch |
| `tool-meta` | `callId`, `toolName`, `metadata` | out-of-band metadata for a tool result | out-of-band metadata for a tool result |
| `tool-info` | `callId`, `name`, `args`, `result` | completed-in-server tool execution, purely informational. Carries the full pair as one tone. Unlike `tool-call`/`tool-result`, which form a two-phase handoff requiring the recipient to execute and reply, `tool-info` says "this tool ran upstream, here's everything." Consumers render it without taking action. | completed-in-server tool execution — purely informational. Carries the full {callId, name, args, result} pair as one tone. Unlike `ToolCall`/`ToolResult` (which form a two-phase handoff requiring the recipient to execute and reply), `ToolInfo` says "this tool ran upstream, here's everything." Consumers render it without taking action. Used by humd when its native MCP tools run in-process, or when a nestler-tool roundtrip completes successfully and observers want a clean audit event. |

### Either direction

| chi | body fields | meaning |
| chi | body fields | meaning | description |
|---|---|---|
| `echo` | `ok`, optional `error` | delivery ack for `rid` |
| `perf-mark` | `label`, `phase`, `t` | drift timing — measured both ways |
| `log` | `level`, `message`, optional fields | structured log forwarding |
| `drone` | (drone-shaped payload) | drone heartbeat |
| `drone-retrofit` | (retrofit instruction) | drone swallow + retry signal |
| `echo` | `ok`, optional `error` | delivery ack for `rid` | delivery ack for a rid |
| `perf-mark` | `label`, `phase`, `t` | drift timing, measured both ways | drift timing — measured both ways |
| `log` | `level`, `message`, optional fields | structured log forwarding | structured log forwarding |
| `drone` | (drone-shaped payload) | drone heartbeat | drone heartbeat |
| `drone-retrofit` | (retrofit instruction) | drone swallow + retry signal | drone swallow + retry signal |

### Ensemble / inter-humd plumbing

Only emitted across the ensemble layer (not by local nestlers):

`peer-add`, `peer-remove`, `attach`, `detach`, `wane-sync`,
`gossip-publish`, `kad-find-node`, `kad-find-node-resp`.
Only emitted across the ensemble layer (not by local nestlers).
See [`ensemble/README.md`](../ensemble/README.md).

| chi | body fields | meaning | description |
|---|---|---|
| `peer-add` | `humd_id`, `hints` | register a peer humd | register a peer humd — `{ humd_id: hex, hints: [..] }` |
| `peer-remove` | `humd_id` | drop a peer humd | drop a peer humd — `{ humd_id: hex }` |
| `attach` | `sid`, `to`, `from`, `hearOnly` | peer humd asks to observe a sid hosted here. The host records `from` as an observer of `sid`; reply tones for that sid fan out to every observer in addition to the prompt origin. | peer humd asks to observe a sid hosted here — `{ sid, to, from, hearOnly }`. The host records `from` as an observer of `sid`; reply tones for that sid fan out to every observer in addition to the prompt origin. |
| `detach` | `sid`, `to`, `from` | peer humd stops observing. The host drops `from` from the observer roster for `sid`. | peer humd stops observing — `{ sid, to, from }`. The host drops `from` from the observer roster for `sid`. |
| `wane-sync` | `from`, `snapshot` | reconcile WaneTracker after a partition heal, where `snapshot` maps sigil to wane value. The receiver merges each entry by taking the max of local and remote (wane is a Lamport clock; max is convergent). No reply is required — both sides emit their snapshot on heal, so each is informed exactly once. | reconcile WaneTracker after a partition heal — `{ from, snapshot }` where `snapshot` is a map of sigil → wane value. The receiver merges each entry by taking the max of local and remote (wane is a Lamport clock; max is convergent). No reply is required — both sides emit their snapshot on heal, so each is informed exactly once. |
| `gossip-publish` | `topic`, `payload`, `from`, `msg_id` | ensemble-wide gossip pub-sub message. Fan-out broadcast above the Transport seam: every PeerConnection is a gossip neighbor. The receiver dedups on `msg_id` using a bounded LRU, dispatches to per-topic subscribers, and re-fans the tone to every OTHER installed peer so the message percolates across the mesh. Distinct from unicast `route`, which targets ONE humd — gossip is mesh-wide announcements: hum relocation, humd overload, drone alerts. `msg_id` is assigned by the ORIGINATOR, once per publish, and is not derived from `rid` or the payload. A repeat of the same content is a new message; only a byte-identical retransmission is a duplicate, and only the sender can tell those apart. | ensemble-wide gossip pub-sub message — `{ topic, payload, from, msg_id }`. Fan-out broadcast above the Transport seam: every PeerConnection is a gossip neighbor. The receiver dedups on `msg_id` using a bounded LRU, dispatches to per-topic subscribers, and re-fans the tone to every OTHER installed peer so the message percolates across the mesh. Distinct from unicast `route` (which targets ONE humd) — gossip is mesh-wide announcements: hum relocation, humd overload, drone alerts. `msg_id` is assigned by the ORIGINATOR, once per publish, and is not derived from `rid` or the payload. A repeat of the same content is a new message; only a byte-identical retransmission is a duplicate, and only the sender can tell those apart. |
| `kad-find-node` | `query_id`, `target`, `from` | Kademlia DHT FIND_NODE query. The receiver answers with `kad-find-node-resp` carrying up to K HumdAddrs from its routing table closest in XOR distance to `target`. Sent during `Ensemble::kad_find` iterative lookups when a peer's HumdAddr isn't already known locally. | Kademlia DHT FIND_NODE query — `{ query_id, target: <Hid hex>, from: <Hid hex> }`. The receiver answers with `kad-find-node-resp` carrying up to K HumdAddrs from its routing table closest in XOR distance to `target`. Sent during `Ensemble::kad_find` iterative lookups when a peer's HumdAddr isn't already known locally. |
| `kad-find-node-resp` | `query_id`, `from`, `closest` | Kademlia DHT FIND_NODE response, matched to the originating `kad-find-node` by `query_id`. The lookup driver inserts every advertised HumdAddr into its routing table and re-queries the α closest unqueried peers until no closer node is returned. | Kademlia DHT FIND_NODE response — `{ query_id, from: <Hid hex>, closest: [<HumdAddr JSON>, ...] }`. Matched to the originating `kad-find-node` by `query_id`. The lookup driver inserts every advertised HumdAddr into its routing table and re-queries the α closest unqueried peers until no closer node is returned. |
| `backfill` | `author`, `from` | thehum chi-log replay request. Host humd answers with one `chi:"backfill-event"` tone per event in `[from, ..)` for the named author. | thehum chi-log replay request — `{ author: <hid>, from: <seq> }`. Host humd answers with one `chi:"backfill-event"` tone per event in `[from, ..)` for the named author. |

### `pulse.kind`

`pulse` tones carry a `kind` from its own enum.

| kind | description |
|---|---|
| `cell-spawned` | process created |
| `cell-ready` | system init received, accepting input |
| `cell-idle` | turn complete, no listeners |
| `cell-died` | process exited |
| `cell-evicted` | killed to make room |

**Send deadline.** Every inter-humd send is bounded at 5s
(`ensemble::SEND_TIMEOUT`). A peer that stops reading fills its socket
buffer rather than closing, so the write stalls indefinitely while the
Expand Down
Loading
Loading