0949c6f0d7
Use native browser and Tauri behavior instead of custom selector, dialog, and window-state implementations. Remove obsolete bridge, relay, asset, and dependency paths to keep the supported surface small. BREAKING CHANGE: The Noctalia relay no longer accepts --agent, and the Tauri host no longer exposes the legacy load_agent command.
14 lines
827 B
JavaScript
14 lines
827 B
JavaScript
import assert from "node:assert/strict";
|
|
import test from "node:test";
|
|
import { createNoctaliaStateRelay } from "../src/client/noctalia-relay.js";
|
|
|
|
test("relays aggregate workspace summary as compact Noctalia state", async () => {
|
|
const updates = [];
|
|
const relay = createNoctaliaStateRelay({
|
|
client: { request: async (operation) => { assert.equal(operation, "get_workspace_summary"); return { openCount: 3, workingCount: 1, attentionCount: 2, recoveringCount: 0, errorCount: 1 }; } },
|
|
onState: (state) => updates.push(state), pollMs: 250,
|
|
});
|
|
await relay.start(); relay.stop();
|
|
assert.deepEqual(updates, [{ state: "error", projectLabel: "3 sessions", attentionCount: 2, detail: "3 open · 1 working · 2 attention · 0 recovering · 1 errors", openCount: 3, workingCount: 1, recoveringCount: 0, errorCount: 1 }]);
|
|
});
|