doc.haus Atlas Legal-document workflows on OpenCode, bound to their code
219 documents

V2 specs tour

The upstream OpenCode contracts underneath doc.haus: who owns what, how sessions admit and execute prompts, how tools are built and bounded, and the two accepted decisions on events and provider policy.

Decision

The public HTTP event stream uses one Server-scoped encoded feed with one independently bounded queue per connection.

Core EventV2.listen()
          |
          | one global subscription
          v
Server EventFeed
  public filter
  schema encode
  JSON encode
  SSE frame once
          |
          | nonblocking offer of one shared immutable string
          v
 Queue A   Queue B   Queue C
    |         |         |
 HTTP A    HTTP B    HTTP C

Core owns event meaning, publication, persistence, typed observation, durable logs, replay, and transactional projection.

Server owns public event selection, wire encoding, bounded connection delivery, and subscriber lifecycle.

Protocol continues to own the OpenCodeEvent SSE contract. Generated Promise and Effect clients remain unchanged.