Add Ghostty terminal, session recovery, voice asset caching, and gitignore large assets

Integrates ghostty-web and node-pty packages, adds tmux session recovery on startup,
refactors WebSocket transport to noServer mode, caches Sherpa voice model assets via
service worker. Large assets (sherpa, ghostty-vt.wasm, fonts) are now gitignored as
they are copied from the webterm project.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-06-20 08:39:44 -04:00
parent c61712d8c4
commit edbecd2c83
7 changed files with 87 additions and 7 deletions
+10 -4
View File
@@ -22,11 +22,10 @@ export class WebSocketTransport extends EventEmitter {
// connection is never terminated before it has a chance to respond.
private alive = new WeakMap<WebSocket, boolean>();
/** Create WebSocketServer on /ws path with JWT verification and ping/pong keepalive. */
setup(server: HttpServer | HttpsServer): void {
/** Create WebSocketServer in noServer mode. Call handleUpgrade() from your server upgrade handler. */
setup(_server: HttpServer | HttpsServer): void {
this.wss = new WebSocketServer({
server,
path: '/ws',
noServer: true,
verifyClient: ({ req }, cb) => {
const url = new URL(req.url!, `http://${req.headers.host}`);
const token = url.searchParams.get('token');
@@ -73,6 +72,13 @@ export class WebSocketTransport extends EventEmitter {
this.pingInterval.unref();
}
/** Route an HTTP upgrade request into this WSS (called from server's upgrade handler). */
handleUpgrade(req: import('http').IncomingMessage, socket: import('stream').Duplex, head: Buffer): void {
this.wss!.handleUpgrade(req, socket, head, (ws) => {
this.wss!.emit('connection', ws, req);
});
}
/** Shut down the WebSocket server and stop keepalive. */
destroy(): void {
if (this.pingInterval) {