Initial scaffold from M1 spike (tiletopia)

Tauri 2 + Svelte 5 + xterm.js + portable-pty. Single full-window
WSL terminal pane with clickable distro picker. M1 verified manually
on Windows: window opens, xterm.js renders, claude TUI works,
resize reflows cleanly.

Graduated from ~/claude/ideas/wsl-mux/ per the approved plan at
~/.claude/plans/imperative-coalescing-feigenbaum.md. See memory.md
for decisions, open TODOs, and the M2-M5 roadmap.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
megaproxy 2026-05-22 12:31:29 +01:00
commit b352f8f049
36 changed files with 11534 additions and 0 deletions

32
src/ipc.ts Normal file
View file

@ -0,0 +1,32 @@
import { invoke } from "@tauri-apps/api/core";
import { listen, type UnlistenFn } from "@tauri-apps/api/event";
export type PaneId = number;
export const listDistros = (): Promise<string[]> => invoke("list_distros");
export const spawnPane = (args: {
distro?: string;
cwd?: string;
cols: number;
rows: number;
}): Promise<PaneId> => invoke("spawn_pane", args);
export const writeToPane = (id: PaneId, dataB64: string): Promise<void> =>
invoke("write_to_pane", { id, dataB64 });
export const resizePane = (id: PaneId, cols: number, rows: number): Promise<void> =>
invoke("resize_pane", { id, cols, rows });
export const killPane = (id: PaneId): Promise<void> => invoke("kill_pane", { id });
export const onPaneData = (
id: PaneId,
cb: (b64: string) => void,
): Promise<UnlistenFn> =>
listen<{ b64: string }>(`pane://${id}/data`, (e) => cb(e.payload.b64));
export const onPaneExit = (
id: PaneId,
cb: () => void,
): Promise<UnlistenFn> => listen(`pane://${id}/exit`, () => cb());