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:
Hibryda 2026-03-22 04:45:56 +01:00
parent 5e1fd62ed9
commit f0850f0785
22 changed files with 1389 additions and 25 deletions

View file

@ -136,8 +136,16 @@
// ── Send user input to daemon ──────────────────────────────────────────
// Feature 5: Max terminal paste chunk (64KB) — truncate with warning
const MAX_PASTE_CHUNK = 64 * 1024;
term.onData((data: string) => {
appRpc.request['pty.write']({ sessionId, data }).catch((err: unknown) => {
let payload = data;
if (payload.length > MAX_PASTE_CHUNK) {
console.warn(`[terminal] Paste truncated from ${payload.length} to ${MAX_PASTE_CHUNK} bytes`);
payload = payload.slice(0, MAX_PASTE_CHUNK);
term.writeln('\r\n\x1b[33m[agor] Paste truncated to 64KB\x1b[0m');
}
appRpc.request['pty.write']({ sessionId, data: payload }).catch((err: unknown) => {
console.error('[pty.write] error:', err);
});
});