Skip to content

feat(rooms): add rooms.yaml config, the room log and infer rooms commands - #1951

Merged
edenreich merged 4 commits into
mainfrom
fix/issue-1944
Nov 23, 2026
Merged

edenreich merged 4 commits into
mainfrom
fix/issue-1944

Conversation

@inference-gateway-maintainer

@inference-gateway-maintainer inference-gateway-maintainer Bot commented Nov 23, 2026 •

Copy link
Copy Markdown
Contributor

Resolves #1944

Summary

First step of rooms, part of #1943: the rooms.yaml split config, the room log, and the infer rooms commands that read them. A room is a named group of agents the user talks to in one project. Every member keeps its own deterministic session id room-<room>-<agent> and one append-only JSONL log per room records every post. Later room steps (routing, member sessions) build on this data.

Changes

  • rooms.yaml loads as a split sidecar under the rooms key, home and project layers, through the sidecars table in cmd/runtime/config.go, and config.Config.Rooms defaults in DefaultConfig(). A broken rooms.yaml fails the load naming the file
  • DefaultConfig() holds the public room with agents: ["*"] in block style. A rooms.yaml that defines public itself replaces the default, one without it keeps the default (RoomsConfig.WithDefaultRoom in postProcess)
  • infer init seeds a rooms.yaml from the defaults
  • new bounded context internal/rooms with a pure domain/ (Room, Member, Post, Route), a README.md, the context root expanding rooms against the agents the registry knows, and internal/AGENTS.md listing it
  • the room log is append-only JSONL at ~/.infer/projects/<slug of the room's project>/rooms/<room>.jsonl (internal/rooms/infrastructure/jsonl.go, the domain Log port). A post records author, text, mentions, routes with the router's probability, and its time
  • infer rooms list and infer rooms show <room> print rooms with their resolved members and a room's log, both with --format json
  • a room's project empty means the daemon default project dir (the working directory at resolve time). A room name must be filesystem-safe, dash-free and unique (validated in Config.Validate), so no two rooms' members share a session id
  • table tests: rooms.yaml loading (cmd/runtime), defaults plus a redefined public (config), "*" resolution picking up a newly added agent and member session ids (internal/rooms domain), log append and read across two appends without loss (infrastructure)

Review fixes

  • Room names keep to letters, digits and underscores. With dashes allowed, room dev with agent ops-reviewer and room dev-ops with agent reviewer both got room-dev-ops-reviewer
  • A log line that does not decode, such as one torn by a crash, is skipped instead of failing the whole log, and an unwritten log prints "posts": []
  • A name in a room's agents that no agent carries takes no seat
  • The log table cuts long posts on a character boundary (formatting.TruncateText)
  • infer rooms show has an in-memory command test, and the init test checks that rooms.yaml is seeded

docs ticket: inference-gateway/docs#1297 tracks the user-facing pages (rooms.yaml, the room log, the infer rooms commands).

@inference-gateway-maintainer
inference-gateway-maintainer Bot marked this pull request as ready for review November 23, 2026 17:21
@inference-gateway-maintainer
inference-gateway-maintainer Bot requested a review from a team as a code owner November 23, 2026 17:21
Room and agent names could both carry a dash, so room dev with agent
ops-reviewer and room dev-ops with agent reviewer both got the session id
room-dev-ops-reviewer and would have shared one conversation. Room names now
keep to letters, digits and underscores, so the room part of an id ends at the
first dash and every seat is unique. rooms.yaml is new, so no room breaks.

- a log line that does not decode, such as one a crash tore mid-write, is
  skipped instead of failing the whole log, and an unwritten log reads as an
  empty list so infer rooms show --format json prints [] and not null
- a broken rooms.yaml fails the load naming the file instead of silently
  falling back to the public room, as composer.yaml does
- a name in a room's agents that no agent carries takes no seat, as the
  resolution's doc promised
- the log table cuts a long post on a character boundary through
  formatting.TruncateText instead of slicing bytes
- the rooms tables are left-aligned, the not-found error lists the rooms
  joined, and cmp.Or replaces valueOr
- DefaultRoomsPath, InvokedByRoom and MemberSessionID are gone, the JSONL log
  asserts it implements the Log port, RoomsRoomConfig is RoomConfig, and doc
  prose has no semicolons

Tests cover a dashed room name, an unknown agent, a torn log line, an empty
log, a broken rooms.yaml, infer rooms show through a fresh root, and infer
init seeding rooms.yaml.
@edenreich
edenreich merged commit f3774d6 into main Nov 23, 2026
14 checks passed
@edenreich
edenreich deleted the fix/issue-1944 branch November 23, 2026 18:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Todo

Development

Successfully merging this pull request may close these issues.

[FEATURE] Rooms config and the room log

1 participant