Skip to content

Same agent Smaller bill. The tools and infrastructure to get more work from your AI. Fewer tokens. Less compute. Lower cost.

1.7 KB
Raw Blame
# NATS server for OpenLIT realtime signals.
#
# Two users with least-privilege permissions. Passwords come from the
# environment (NATS_RECEIVER_PASSWORD, NATS_ENGINE_PASSWORD); the server
# refuses to start when either is unset. If you change OPENLIT_SIGNALS_STREAM,
# replace OPENLIT_SIGNALS below to match.

port: 4222

# Monitoring (healthz, jsz, varz) answers on loopback only, inside the
# container. It is never published to the host.
http: 127.0.0.1:8222

max_payload: 1MB

jetstream {
  store_dir: "/data"
  max_file_store: 1GB
  max_memory_store: 64MB
}

authorization {
  users: [
    {
      # OTLP receiver: publishes signals and keeps the stream configured.
      user: openlit-receiver
      password: $NATS_RECEIVER_PASSWORD
      permissions: {
        publish: {
          allow: [
            "openlit.signal.>",
            "$JS.API.STREAM.CREATE.OPENLIT_SIGNALS",
            "$JS.API.STREAM.UPDATE.OPENLIT_SIGNALS",
            "$JS.API.STREAM.INFO.OPENLIT_SIGNALS"
          ]
        }
        subscribe: { allow: ["_INBOX_RECEIVER.>"] }
      }
    },
    {
      # Realtime engine: reads the stream through an ordered (ephemeral pull)
      # consumer. It cannot publish signals or change the stream.
      user: openlit-engine
      password: $NATS_ENGINE_PASSWORD
      permissions: {
        publish: {
          allow: [
            "$JS.API.STREAM.INFO.OPENLIT_SIGNALS",
            "$JS.API.CONSUMER.CREATE.OPENLIT_SIGNALS",
            "$JS.API.CONSUMER.CREATE.OPENLIT_SIGNALS.>",
            "$JS.API.CONSUMER.DELETE.OPENLIT_SIGNALS.>",
            "$JS.API.CONSUMER.INFO.OPENLIT_SIGNALS.>",
            "$JS.API.CONSUMER.MSG.NEXT.OPENLIT_SIGNALS.>"
          ]
        }
        subscribe: { allow: ["_INBOX_ENGINE.>"] }
      }
    }
  ]
}