Installing
The released program is a jar on Maven Central. Coursier fetches that jar and
the libraries in its POM, then runs hallmonitor.Main. The version in the
coordinate is the git tag: v0.1.0 publishes 0.1.0.
You still bring the TOML file. Coursier does not ship examples/hall-monitor.toml.
With no argument the process reads HALL_MONITOR_CONFIG, then ./hall-monitor.toml.
Launch
One shot, in the foreground:
cs launch rocks.earlyeffect::hall-monitor:0.1.0 -- hall-monitor.toml
:: is the Scala 3 artifact, hall-monitor_3. Anything after -- is the
program's own arguments. The first one is the config file.
A launcher you keep
cs bootstrap writes a small program that downloads the same jars on first
run and then starts them:
cs bootstrap rocks.earlyeffect::hall-monitor:0.1.0 -o hall-monitor -f
./hall-monitor hall-monitor.toml
-f replaces an older copy at that path. Put ./hall-monitor somewhere on
your PATH if you want the name by itself.
The short name
cs install scalafmt works because scalafmt is a name in Coursier's default
channel. cs install hall-monitor looks at
that same list. Hall Monitor is not on it, so the bare command does not find
a jar.
cs launch and cs bootstrap skip the list and take the Maven coordinate.
A short name is a small JSON descriptor. This repo keeps one at
coursier/apps.json:
{
"hall-monitor": {
"repositories": ["central"],
"dependencies": ["rocks.earlyeffect::hall-monitor:latest.release"],
"mainClass": "hallmonitor.Main"
}
}
latest.release follows the newest version on Central. Once that file is on
main, the channel is its raw URL:
cs install --channel https://raw.githubusercontent.com/early-effect/hall-monitor/main/coursier/apps.json hall-monitor
hall-monitor hall-monitor.toml
The bare cs install hall-monitor, with no --channel, is a pull request to
coursier/apps. The contrib list is the
usual place. Until that pull request is merged, pass the channel.
Grok Build and Bedrock
Two upstreams are already wired the way the harnesses at home call them.
Grok Build models use the grok login session and the Responses API, which is
what dsh's grok-build adapter posts to https://api.x.ai/v1/responses:
[[backends]]
id = "grok-4.7"
kind = "conversational"
baseUrl = "https://api.x.ai/v1"
upstreamModel = "grok-4.7"
auth = "grok"
protocol = "responses"
Bedrock does not shell out. Hall Monitor reads the AWS SSO profile, refreshes
the SSO token when it is near expiry, asks for role credentials, and SigV4-signs
the same bearer Grok Build sends. Grok on Bedrock is chat completions. Opus on
Bedrock is Anthropic messages, with the version header on that backend. If the
SSO login itself is dead, the error says to run aws sso login.
[[backends]]
id = "grok-4.6-bedrock"
kind = "conversational"
baseUrl = "https://bedrock-runtime.us-west-2.amazonaws.com/openai/v1"
upstreamModel = "us.xai.grok-4.6"
auth = "bedrock"
profile = "us-dev"
region = "us-west-2"
developerRole = false
maxTokensField = "max_tokens"
[[backends]]
id = "opus-5.5-bedrock"
kind = "conversational"
baseUrl = "https://bedrock-runtime.us-west-2.amazonaws.com/anthropic/v1"
upstreamModel = "us.anthropic.claude-opus-5-5"
protocol = "messages"
auth = "bedrock"
profile = "us-dev"
region = "us-west-2"
[backends.headers]
anthropic-version = "2023-06-01"
[backends.headers] belongs to the backend directly above it. The bearer is
cached for twelve hours. A harness still speaks chat completions. The monitor
translates when the upstream speaks Responses or Anthropic messages.
From a checkout
Working on this repository does not need Central:
sbt "app/run examples/hall-monitor.toml"
That forks the same hallmonitor.Main. Stopping it does not stop sbt.
Stopping
The process stays in the terminal where you started it. The log line says
Ctrl-C to stop. Ctrl-C stops it. So does kill on that process. The listen
port comes back. A config file that does not load exits on its own, with a
message, and status 1.