feat: @agor/stores package (3 stores) + 58 BackendAdapter tests
@agor/stores: - theme.svelte.ts, notifications.svelte.ts, health.svelte.ts extracted - Original files replaced with re-exports (zero consumer changes needed) - pnpm workspace + Vite/tsconfig aliases configured BackendAdapter tests (58 new): - backend-adapter.test.ts: 9 tests (lifecycle, singleton, testing seam) - tauri-adapter.test.ts: 28 tests (invoke mapping, command names, params) - electrobun-adapter.test.ts: 21 tests (RPC names, capabilities, stubs) Total: 523 tests passing (was 465, +58)
This commit is contained in:
parent
5e1fd62ed9
commit
f0850f0785
22 changed files with 1389 additions and 25 deletions
|
|
@ -94,11 +94,11 @@ const ptyHandlers = createPtyHandlers(ptyClient);
|
|||
const filesHandlers = createFilesHandlers();
|
||||
const settingsHandlers = createSettingsHandlers(settingsDb);
|
||||
const agentHandlers = createAgentHandlers(sidecarManager, sessionDb, rpcRef);
|
||||
const btmsgHandlers = createBtmsgHandlers(btmsgDb);
|
||||
const bttaskHandlers = createBttaskHandlers(bttaskDb);
|
||||
const btmsgHandlers = createBtmsgHandlers(btmsgDb, rpcRef);
|
||||
const bttaskHandlers = createBttaskHandlers(bttaskDb, rpcRef);
|
||||
const searchHandlers = createSearchHandlers(searchDb);
|
||||
const pluginHandlers = createPluginHandlers();
|
||||
const remoteHandlers = createRemoteHandlers(relayClient);
|
||||
const remoteHandlers = createRemoteHandlers(relayClient, settingsDb);
|
||||
|
||||
// ── RPC definition ─────────────────────────────────────────────────────────
|
||||
|
||||
|
|
@ -218,6 +218,17 @@ const rpc = BrowserView.defineRPC<PtyRPCSchema>({
|
|||
} catch (err) { console.error("[memora.list]", err); return { memories: [] }; }
|
||||
},
|
||||
|
||||
// ── Feature 8: Diagnostics ─────────────────────────────────────────
|
||||
"diagnostics.stats": () => {
|
||||
return {
|
||||
ptyConnected: ptyClient.isConnected,
|
||||
relayConnections: relayClient.listMachines().filter(m => m.status === "connected").length,
|
||||
activeSidecars: sidecarManager.listSessions().filter(s => s.status === "running").length,
|
||||
rpcCallCount: 0, // Placeholder — Electrobun doesn't expose RPC call count
|
||||
droppedEvents: 0,
|
||||
};
|
||||
},
|
||||
|
||||
// ── Telemetry ─────────────────────────────────────────────────────
|
||||
"telemetry.log": ({ level, message, attributes }) => {
|
||||
try { telemetry.log(level, `[frontend] ${message}`, attributes ?? {}); return { ok: true }; }
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue