In v2 a session's `slug` is published on the `session.created` event and nowhere else. `SessionInfo` — what `session.get` / `session.list` and `GET /api/session` return — has no `slug` (checked on 2.0.24), no later session event carries it, and a plugin's context has no `session.log` to read the create back from.
So a plugin that identifies sessions by slug loses every session created before the background service last started: after a restart, a resumed session can be fully active and the plugin still has no way to learn its slug. In v1 every `session.updated` carried the full session including `slug`, so this didn't come up.
Ask: add `slug` to `SessionInfo` (it is already on the stored session, since `session.created` emits it).
Context: Tin Can uses the slug as the session's address for cross-session messaging. We currently work around this by having the plugin persist slugs itself, which only covers sessions created while the plugin was installed.
In v2 a session's `slug` is published on the `session.created` event and nowhere else. `SessionInfo` — what `session.get` / `session.list` and `GET /api/session` return — has no `slug` (checked on 2.0.24), no later session event carries it, and a plugin's context has no `session.log` to read the create back from.
So a plugin that identifies sessions by slug loses every session created before the background service last started: after a restart, a resumed session can be fully active and the plugin still has no way to learn its slug. In v1 every `session.updated` carried the full session including `slug`, so this didn't come up.
Ask: add `slug` to `SessionInfo` (it is already on the stored session, since `session.created` emits it).
Context: Tin Can uses the slug as the session's address for cross-session messaging. We currently work around this by having the plugin persist slugs itself, which only covers sessions created while the plugin was installed.