feat(v2): scaffold Tauri 2.x + Svelte 5 project (Phase 1)

- Tauri 2.10 + Svelte 5.45 + TypeScript + Vite 7
- Catppuccin Mocha theme with CSS variables and semantic aliases
- CSS Grid layout: sidebar (260px) + workspace, responsive breakpoints
  for ultrawide (3440px+) and narrow (<1200px)
- Component structure: Layout/, Terminal/, Agent/, Markdown/, Sidebar/
- Svelte 5 stores with $state runes: sessions, agents, layout
- SDK message adapter (abstracts Agent SDK wire format)
- PTY bridge (Tauri IPC wrapper, stubbed for Phase 2)
- Node.js sidecar entry point (stdio NDJSON, stubbed for Phase 3)
- Rust modules: pty, sidecar, watcher, session (stubbed)
- Vite dev server on port 9700
- Build verified: binary + .deb + .rpm + AppImage all produced
This commit is contained in:
Hibryda 2026-03-05 23:26:27 +01:00
parent 5996615e68
commit 758d626fab
51 changed files with 2287 additions and 0 deletions

View file

@ -0,0 +1,30 @@
// PTY Bridge — IPC wrapper for Rust PTY backend
// Phase 2: terminal spawn, resize, input/output streaming
export interface PtyOptions {
shell?: string;
cwd?: string;
env?: Record<string, string>;
cols?: number;
rows?: number;
}
/**
* Spawn a new PTY session via Tauri IPC.
* Phase 2: implement with @tauri-apps/api invoke
*/
export async function spawnPty(_options: PtyOptions): Promise<string> {
throw new Error('Not implemented — Phase 2');
}
export async function writePty(_id: string, _data: string): Promise<void> {
throw new Error('Not implemented — Phase 2');
}
export async function resizePty(_id: string, _cols: number, _rows: number): Promise<void> {
throw new Error('Not implemented — Phase 2');
}
export async function killPty(_id: string): Promise<void> {
throw new Error('Not implemented — Phase 2');
}

View file

@ -0,0 +1,25 @@
// SDK Message Adapter — insulates UI from Claude Agent SDK wire format changes
// This is the ONLY place that knows SDK internals.
// Phase 3: full implementation
export interface AgentMessage {
id: string;
type: 'text' | 'tool_call' | 'tool_result' | 'subagent_spawn' | 'subagent_stop' | 'status' | 'cost' | 'unknown';
parentId?: string;
content: unknown;
timestamp: number;
}
/**
* Adapt a raw SDK message to our internal format.
* When SDK changes wire format, only this function needs updating.
*/
export function adaptSDKMessage(raw: Record<string, unknown>): AgentMessage {
// Phase 3: implement based on actual SDK message types
return {
id: (raw.id as string) ?? crypto.randomUUID(),
type: 'unknown',
content: raw,
timestamp: Date.now(),
};
}