Phase 1 of the Scalable Approach for Adding New IDE Session Types RFC,
tracked in #27410.
Gives agent session accounting one canonical vocabulary for app names, so
later work can report a count per app without the agent and the server
disagreeing about what an app is called.
- Adds codersdk/appname.go: NormalizeAppName for storage and lookup, and
AppFamilyName for the places that need a bounded value, such as a
Prometheus label or the Connection_Type enum.
- agentssh.Server keeps session counters in a map keyed by normalized name
instead of three fixed atomics, dropping entries at zero.
- Drops MagicSessionType. Sessions carry plain app names, and unrecognized
ones flow through as themselves rather than collapsing to unknown.
Wire behavior is unchanged: the agent still reports the four session_count_*
fields over Agent API 2.10.
Upgrades to slog v3 which includes a small, but backward incompatible API change to the acceptible call arguments when logging. This change allows us to verify via compile time type checking that arguments are correct and won't cause a panic, as was possible in slog v1, which this replaces (v2 was tagged but never used in coder/coder).
It also updates dependencies that also use slog and were updated.
I've left the `aibridge` dependency as a commit SHA, under the assumption that the team there (cc @pawbana @dannykopping ) will tag and update the dependency soon and on their own schedule.
Other dependencies, I pushed new tags.
Fixes https://github.com/coder/coder/issues/18350
I attempted the route of relying on just the session env vars, in hopes
that this issue was fixed in Toolbox and the process name matching was
no longer need, but it was not a fruitful endeavor and it seems to be
using the same connection logic as it did in gateway, just with new
binary and flag names.