saf: give the panel's next cuts an owner
This commit is contained in:
parent
2bd61ec4b3
commit
184a449731
7 changed files with 441 additions and 12 deletions
|
|
@ -132,9 +132,9 @@ Rectangle {
|
|||
}
|
||||
|
||||
// "—" where a provider does not report tokens. Rendering a
|
||||
// 0 would be a measurement claim we cannot back: the
|
||||
// Souveraine substrate records TokenUsage but nothing calls
|
||||
// assistant_with_usage yet (TASK-67). An em dash is the
|
||||
// 0 would be a measurement claim we cannot back. The
|
||||
// substrate persists per-turn usage, but this presence
|
||||
// projection does not aggregate it. An em dash is the
|
||||
// honest glyph for "not measured".
|
||||
StyledText {
|
||||
Layout.alignment: Qt.AlignVCenter
|
||||
|
|
|
|||
|
|
@ -136,11 +136,12 @@ codex_json() {
|
|||
|
||||
# ------------------------------------------------------------ souveraine ----
|
||||
# ~/.souveraine/server/agents/<agent>/conversations/<conv>/conversation.json
|
||||
# carries updated_at + message_count. It does NOT carry token usage: the
|
||||
# substrate records `TokenUsage` but `assistant_with_usage` has zero callers
|
||||
# (TASK-67). We report -1 for tokens rather than 0, because 0 is a measurement
|
||||
# and -1 is an admission. The day TASK-67 lands, this starts reporting real
|
||||
# numbers and nothing else has to change.
|
||||
# carries updated_at + message_count. It does NOT carry aggregate token usage:
|
||||
# the substrate persists per-turn `TokenUsage` in its message record, while
|
||||
# this bounded presence scan intentionally reads only conversation metadata.
|
||||
# We report -1 rather than 0, because 0 is a measurement and -1 is an
|
||||
# admission. A direct substrate projection can fill the fields later without
|
||||
# changing the surface contract.
|
||||
souveraine_json() {
|
||||
local dir="$HOME/.souveraine/server/agents"
|
||||
[ -d "$dir" ] || { echo '{"available":false,"error":"no ~/.souveraine"}'; return; }
|
||||
|
|
|
|||
|
|
@ -113,10 +113,10 @@ Singleton {
|
|||
}
|
||||
|
||||
// Total tokens for a session, or -1 when the provider genuinely does not
|
||||
// report them. -1 is deliberate: the Souveraine substrate records TokenUsage
|
||||
// but `assistant_with_usage` has zero callers (TASK-67), so a 0 here would
|
||||
// be a measurement claim we cannot back. Surfaces must render -1 as "—",
|
||||
// never as zero.
|
||||
// report them. -1 is deliberate: Souveraine persists per-turn TokenUsage,
|
||||
// but the conversation.json metadata inspected by the presence collector
|
||||
// does not aggregate it. A 0 here would be a measurement claim we cannot
|
||||
// back. Surfaces must render -1 as "—", never as zero.
|
||||
function sessionTokens(s) {
|
||||
if (!s)
|
||||
return -1;
|
||||
|
|
|
|||
Loading…
Reference in a new issue