Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
179a8dff6e |
+1
-1
@@ -4,7 +4,7 @@ build-backend = "hatchling.build"
|
|||||||
|
|
||||||
[project]
|
[project]
|
||||||
name = "ratatoskr"
|
name = "ratatoskr"
|
||||||
version = "0.17.12"
|
version = "0.17.13"
|
||||||
description = "Worldtree Conversation API debug TUI — multi-pane observability dashboard"
|
description = "Worldtree Conversation API debug TUI — multi-pane observability dashboard"
|
||||||
readme = "README.md"
|
readme = "README.md"
|
||||||
requires-python = ">=3.12"
|
requires-python = ">=3.12"
|
||||||
|
|||||||
@@ -510,6 +510,14 @@ body {
|
|||||||
<div class="select-wrap">
|
<div class="select-wrap">
|
||||||
<select id="agent-picker"><option>loading…</option></select>
|
<select id="agent-picker"><option>loading…</option></select>
|
||||||
</div>
|
</div>
|
||||||
|
<label class="field-label" for="bifrost-plane">Bifrost binding (Tier-3 provider)</label>
|
||||||
|
<div class="select-wrap">
|
||||||
|
<select id="bifrost-plane">
|
||||||
|
<option value="">none — observe only</option>
|
||||||
|
<option value="memory">memory (:8391) — durable recall</option>
|
||||||
|
<option value="affect">affect (:8390) — persona / PAD</option>
|
||||||
|
</select>
|
||||||
|
</div>
|
||||||
<button id="start-btn">open session</button>
|
<button id="start-btn">open session</button>
|
||||||
<div class="setup-err" id="setup-err"></div>
|
<div class="setup-err" id="setup-err"></div>
|
||||||
</div>
|
</div>
|
||||||
@@ -734,19 +742,35 @@ async function startSession() {
|
|||||||
try {
|
try {
|
||||||
// end_user_id is server-configured (RATATOSKR_END_USER_ID) — not sent
|
// end_user_id is server-configured (RATATOSKR_END_USER_ID) — not sent
|
||||||
// from the browser; the server ignores any end_user_id in this body.
|
// from the browser; the server ignores any end_user_id in this body.
|
||||||
|
// Issue #17: the browser selects only the PLANE; the consumer key + host
|
||||||
|
// are server-held (the key never reaches the browser).
|
||||||
|
const plane = $("bifrost-plane").value;
|
||||||
|
const reqBody = { agent_id: agentId };
|
||||||
|
if (plane) reqBody.bifrost_plane = plane;
|
||||||
const r = await fetch("/api/sessions", {
|
const r = await fetch("/api/sessions", {
|
||||||
method: "POST", headers: { "Content-Type": "application/json" },
|
method: "POST", headers: { "Content-Type": "application/json" },
|
||||||
body: JSON.stringify({ agent_id: agentId }),
|
body: JSON.stringify(reqBody),
|
||||||
});
|
});
|
||||||
if (r.status !== 201) {
|
if (r.status !== 201) {
|
||||||
$("setup-err").textContent = "create session failed: HTTP " + r.status;
|
let detail = "HTTP " + r.status;
|
||||||
|
try {
|
||||||
|
const err = await r.json();
|
||||||
|
if (err && err.error_code) {
|
||||||
|
detail = err.error_code + (err.bifrost_error ? " (" + err.bifrost_error + ")" : "");
|
||||||
|
}
|
||||||
|
} catch (_) { /* non-JSON body */ }
|
||||||
|
$("setup-err").textContent = "create session failed: " + detail;
|
||||||
$("start-btn").disabled = false;
|
$("start-btn").disabled = false;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
const info = await r.json();
|
const info = await r.json();
|
||||||
state.sessionId = info.session_id;
|
state.sessionId = info.session_id;
|
||||||
|
// Issue #17 bound-state indicator: plane + endpoint (never the key).
|
||||||
|
const boundTag = info.bifrost
|
||||||
|
? ` · <span class="a">⇄ ${esc(info.bifrost.plane)}</span> ${esc(info.bifrost.endpoint)}`
|
||||||
|
: "";
|
||||||
$("identity").innerHTML =
|
$("identity").innerHTML =
|
||||||
`<span class="a">${esc(agentId)}</span> · …${esc(info.session_id.slice(-8))}`;
|
`<span class="a">${esc(agentId)}</span> · …${esc(info.session_id.slice(-8))}${boundTag}`;
|
||||||
setConn("idle", "connected");
|
setConn("idle", "connected");
|
||||||
$("setup").style.display = "none";
|
$("setup").style.display = "none";
|
||||||
$("workspace").classList.add("live");
|
$("workspace").classList.add("live");
|
||||||
|
|||||||
Reference in New Issue
Block a user