feat(sessions): show live OpenClaw and Hermes chats on Sparks - #46
Open
kesslerio wants to merge 9 commits into
Open
feat(sessions): show live OpenClaw and Hermes chats on Sparks#46kesslerio wants to merge 9 commits into
kesslerio wants to merge 9 commits into
Conversation
Operators can attach conversation sources from Settings via local convention, state dir, or URL, with tokens kept in the secrets store.
Match conversation origins to Spark LLM listen host and port, and badge each row from mid-turn only so recency cannot mint generating.
Map sessions.list rows to projector input using provider baseUrl and hasActiveRun, returning an empty list when the source is unreachable.
…ating Map dashboard session rows to projector input from billing/profile origin, keeping is_active as unknown unless a live status is present.
Poll OpenClaw and Hermes occupancy once per LLM tick and list generating, stalled, or unknown chats without touching the existing LLM probe.
Pull duplicated URL/path/fetch helpers out of OpenClaw and Hermes readers and skip no-op occupancy writes when the conversation list is unchanged.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #4
Related: #2
Related: #3
TL;DR
The Spark LLM panel now lists OpenClaw and Hermes Agent chats bound to that node's listen address, with generating / stalled / unknown. Generating is mid-turn plus origin match. Recency, GPU busy, and Showcase streaming do not light the badge.
What Problem This Solves
The LLM card already shows model id, slots, and tok/s. It does not name the chats using that node. People bounce to OpenClaw or Hermes to guess occupancy, and a chat can look live while the Spark is idle.
Why This Change Was Made
Attach sources once in Settings (local conventional state, a state dir, or a URL). Project rows by provider
baseUrlhost+port onto each Spark'slanIp/ loopback andllmPorts. OpenClaw useshasActiveRun. Hermesis_activestays unknown unlessstatusis working/running. Occupancy is a snapshotconversationslist, notLlmMetrics. Tokens stay in the secrets store; GET only reportshasToken. Changing the URL origin without a new token clears the stored token.Session-settled from planning: conversations over engine slot lists (user-directed); per-chat generating over node-busy (user-directed); unknown over guessed generating (user-directed); conventional paths plus remote state dir/URL (user-approved); mid-turn without HTTP-in-flight (user-directed).
User Impact
On an llmOn Spark, a bound mid-turn chat shows as generating, then stalled when the turn ends. Missing sources hide the list. The existing probe still works. Workers still have no LLM card.
Risk and Rollout
Low for the current LLM panel: empty/disabled/worker omit
conversations. Additive snapshot field.Must not happen: token on GET/WS, generating from 5-minute recency, transcripts on the snapshot, fleet-specific state paths.
OpenClaw URL mode still HTTP GETs the gateway URL instead of
sessions.listRPC, so a live gateway root may list nothing until that is wired. Hermes local mode still readssessions.json, not sqlite. Hostname origins do not matchlanIp(KTD2).stateDiris not chrooted to home; NUL is rejected. Fetch allowlisting matches existing Spark SSH hosts (no DNS-to-IP rebind check).No migration. Rollout is Settings attach, then watch the Spark page.
After deploy:
[occupancy] poll error:in the server log should self-clear at the 3s fetch timeout. GET/api/session-sourcesmust not include atokenfield.Evidence
npm test— 100 pass, 0 fail (after review fixes)npx tsc --noEmitwas not run to completion here (node_modules/reactmissing on this host)20260814-212653-229754b4No screenshots. The list is a small named-row UI on the existing LLM panel.