Commit Graph

36 Commits

Author SHA1 Message Date
509ec1847b fix: scope lifecycle notifications to active session, remove mock mode
- Only show hookHistory/lifecycleEvent when viewing the agent's current
  live session, preventing notification leaking to historical sessions
- Reset notifications on SessionStart (like hookHistory already does)
- Remove mock/demo animation mode from SessionLifecycleStatus
- Delete dead useHooksApproval composable (never imported)
2026-02-24 11:58:05 -06:00
08e73a1eb6 refactor: remove dead notification systems and legacy broadcasts
- Delete claude-hooks.ts store (processHook never called, always empty)
- Delete HookNotifications.vue and NotificationLog.vue (orphan components)
- Delete claude-status.ts route and broadcastClaudeStatus (no consumers)
- Delete agent-bar.md legacy doc
- Remove legacy WS 'claude-hook' broadcast (frontend ignores it)
- Move isAgentRunning tracking into broadcastClaudeHook
2026-02-24 11:42:06 -06:00
2edb3623c8 refactor: unify hook notification system, remove duplicate broadcasts
- Replace forward-hook.ps1 with notify.ps1 (now accepts optional agent param)
- Remove ejecutor settings.local.json (redundant status hooks, deriveStatus covers it)
- Remove legacy claude-permission system (route, store methods, terminal broadcast)
- Remove redundant deriveStatus + /claude-status POST from claude-hook.ts
  (broadcastClaudeHook → processHookEvent already handles status derivation)
- Clean up HookNotifications.vue permission buttons (dead code)
2026-02-24 11:07:34 -06:00
5bd115e197 perf: incremental transcript updates via WebSocket, eliminate polling
- Replace 1500ms polling with fs.watch recursive (reliable on Windows)
- Enrich WS broadcast with newContent delta + session metadata
- Client appends incrementally instead of 2 sequential HTTP requests
- Pre-initialize Tauri HTTP plugin at module load to avoid dynamic import overhead
- Per-file debounce timers (150ms) instead of single shared timer
- Size-based validation for safe incremental appends with HTTP fallback
2026-02-24 11:01:54 -06:00
ba4a1a0059 fix: validate transcript sessions before resume and fix FAB race condition
Server now checks that transcript .jsonl files exist before creating
terminals, preventing dead sessions from --resume errors. Frontend
shows error banner in modal when resume fails. Fixed race condition
where init() would overwrite FAB terminal selection after page refresh
by guarding with pendingSwitchTarget flag.
2026-02-21 12:51:15 -06:00
a56796a1be feat: unified hook notifier, agent auto-detection, terminal transition UI
- Add hooks/notify.ps1 as single hook handler for all events
- Refactor settings.local.json to use notify.ps1 instead of inline PS
- Add Notification hook, auto-detect agent from session_id/transcript
- Rename agent 'main' to 'claude' across server routes and terminal
- Add loading overlay and error state for terminal switching transitions
- Add transitionError ref to useTranscriptDebug composable
2026-02-21 04:33:42 -06:00
b9eec1013b feat: add hook event history with badge counts in SessionLifecycleStatus
Server persists hookHistory[] per agent (cap 500, resets on SessionStart),
synced realtime via session-state-patch. Frontend computes event counts
by macro type and renders color-coded badges at the ribbon start.
Mock mode also accumulates badges during demo sequence.
2026-02-21 04:29:02 -06:00
2aec892f62 feat: server-first terminal creation, broadcast-only WS clients
- Add POST /create-terminal endpoint with MAX_TERMINALS=5 limit
- Server creates PTY, runs command, registers and broadcasts atomically
- Frontend startTerminal() calls server first, connects in reconnect mode
- Remove registerTerminalOnServer() — server handles registration
- Separate broadcast-only WS clients from PTY clients (no phantom "main" PTY)
- All broadcast functions use broadcastToAll() helper
- Fix resume existing flow to create terminal with --resume flag
2026-02-21 00:17:24 -06:00
a6c68f1b9e fix: clients sync to server terminals instead of creating new ones
- Remove auto-creation of terminal sessions from init/selectSession/switchAgent
- Clients only connect to existing alive terminals from server registry
- Remove localStorage persistence (agent/sessionId) — state derived from server
- Refine session-state types: new AgentStatus values, LastError interface
- UI improvements: AgentBadge, ChatContainer, UserInput, BashCard updates
- Simplify claude-hook routes, update session-state service
2026-02-20 22:26:17 -06:00
9945be07b1 feat: centralize session state on terminal server
- Add SessionStateManager (server/services/session-state.ts) as source
  of truth for agent status, tools, approvals, and notifications
- Integrate into terminal server with state patches broadcast via WS
- Add /add-approval and /resolve-approval endpoints so approval
  lifecycle is tracked centrally and broadcast to all clients
- Add permissionMode field to AgentSessionState
- Frontend store (session-state.ts) + WS service (session-state-ws.ts)
  consume snapshots and patches from terminal server (4103)
- Rewrite useGlobalApproval to derive pending approvals from
  centralized state — resolving on one client now clears all others
- Migrate useTranscriptDebug: processing, hookMeta, serverRegistry
  now derived from session state store; remove 5s registry polling
- hooks-approval.ts notifies terminal server on add/resolve
2026-02-20 21:06:20 -06:00
220d595568 feat: voice mic, pixel life layer, enhanced transcript-debug UX
VoiceMicButton component, PixelLife aquatic layer, improved UserMessageBubble
with voice display, AgentBadge terminal switcher, ChatContainer voice integration,
FloatingTranscriptDebug ocean life enhancements, and terminal registry support.
Remove traefik config.
2026-02-20 12:12:53 -06:00
eb2bafaea1 feat: ResumeTerminalButton with ephemeral terminal for transcript-debug
- Add ResumeTerminalButton component with floating terminal modal
  (drag, resize, glass morphism, TerminalNavButtons bar)
- Add useEphemeralTerminal composable for temporary PTY sessions
  that auto-run `<agent> --resume <sessionId>` and cleanup on close
- Add /kill-session POST endpoint to terminal server for ephemeral
  session cleanup
- Integrate button in ChatContainer header (ID row) and status bar
- Pass selectedAgent to ChatContainer from TranscriptDebugPage
2026-02-19 18:11:20 -06:00
9bd6123f97 feat: Add transcript-debug page with multi-agent support, hooks approval, and message selection
- Transcript debug: JSONL viewer, parsed chat view, realtime WebSocket updates, session selector
- Multi-agent: ejecutor, nucleo000, and claude (global ~/.claude/projects/) with agent switcher
- Hooks approval: permission/plan request forwarding via PowerShell hooks, long-poll API, UI modals
- Chat features: session ID copy, select mode with checkboxes, multi-select copy, select all/deselect all
- File watchers for all agent transcript directories with polling fallback on Windows
2026-02-18 23:55:09 -06:00
d0fdd04132 asi se fue xd 2026-02-18 12:13:22 -06:00
d27da30494 feat: Replace DB component tools with filesystem-based user-components/
Components are now .vue files in user-components/<folder>/ parsed at runtime.
Replaces 6 DB MCP tools with 2 (list_fs_components, load_fs_component).
Adds vue-parser, fs-components API, and file watcher for live reload.
2026-02-18 10:24:05 -06:00
55265d5145 fix: Per-agent terminal isolation, floating terminal z-index, and char-by-char input
- Add :key to PromptBar to force remount on agent switch, fixing shared terminal session bug
- Raise AgentTerminal z-index above PromptBar backdrop so floating terminal is visible/clickable
- Send prompt text char-by-char (15ms delay) matching FloatingVoice pattern for Claude Code compat
- Guard xterm dispose against unloaded addons to prevent errors on agent switch
- Widen PromptBar panel from 360px to 420px to fit all ChatInput buttons
2026-02-16 00:41:38 -06:00
f3ac7986ec feat: Add transcript engine API and connect ConversationHistory to real data
- Add transcript-engine service that parses Claude Code JSONL transcripts
  with session listing, message extraction, token/stats analysis, and caching
- Add transcript REST routes (sessions list, latest, by session ID, section filtering)
- Rewrite ConversationHistory to fetch from /api/transcript/* instead of mock data
- Add session pills for switching between conversation sessions
- Add stats bar footer with model, duration, tokens, and tool count
- Add TranscriptSession/TranscriptMessage types, ChatInput, InputSettings,
  PromptBar updates, TranscriptCard, and useVoiceCapture composable
2026-02-15 20:05:43 -06:00
816a8d9abe feat: Rich hook forwarding, permission bridge, and toast notifications
Replace hardcoded PowerShell status hooks with stdin-forwarding hooks
that send full Claude Code hook data (tool_input, tool_response, prompt,
session_id, model, etc.) to /api/claude-hook endpoint.

- PowerShell hooks read stdin JSON and POST to /api/claude-hook
- Server derives status for backward-compat FAB animations
- Server extracts assistant_response from transcript on Stop events
- New /api/claude-permission endpoint with Promise-based allow/deny flow
- HookNotifications.vue: toast system showing session, prompt, tool use,
  tool results, notifications, and final assistant response
- WebSocket broadcast for claude-hook and claude-permission message types
2026-02-15 16:16:59 -06:00
4aaeb8844f feat: Add tree file view for git status, AgentBar dock, and settings updates
- Add StatusTree component with collapsible directory hierarchy for staged/unstaged/untracked files
- Replace flat file lists in GitPage with tree view showing file type icons and git status badges
- Add AgentBar arc dock with per-agent terminal frame and voice modal
- Update ejecutor settings with hooks for claude-status reporting
2026-02-15 14:21:18 -06:00
9a636e26a7 feat: Enforce exclusive auto-request (one client at a time)
Server is now source of truth for autoRequest. When a client enables it,
all other clients lose it. Broadcast includes autoRequest per client,
frontend syncs from server state on each torch-update.
2026-02-14 23:40:30 -06:00
2a80b7751b feat: Add torch client identity, early connection and auto-request
- Named clients persisted in localStorage, editable from dropdown
- Auto-request: clients can auto-receive torch when no holder exists
- Early torch init in App.vue (fires before WebMCP, awaited later)
- Deferred torch connection in toolRegistry for race condition safety
- TorchButton rewritten as dropdown with name editor, toggle, client list
- Server broadcasts client names, supports update-name message
- MCP tool handlers display client names
2026-02-14 23:30:56 -06:00
39faf4bf77 fix: Route transfer message to torch handler in sync server 2026-02-14 18:28:42 -06:00
1a51b34228 feat: Add torch MCP tools for multi-browser control
- Add torchHandlers.ts with 5 tools:
  - list_torch_clients: list connected browsers with metadata
  - get_torch_status: show current torch holder
  - transfer_torch: transfer control to another browser
  - request_torch: request MCP control
  - release_torch: release MCP control
- Add 'transfer' message type to server torch-handler
- Add torch category to all pages
- Export helper functions from torch.ts
2026-02-14 17:52:16 -06:00
0f73bd60bf refactor: Unify sync server and combine torch with connection UI
- Consolidate git and torch WebSocket servers on port 4105
- Create separate handlers for git and torch in handlers/ directory
- Combine TorchButton with connection status into single pill button
- Remove StatusBar (now redundant with TorchButton)
- Remove auto-assign torch on register/disconnect
- Remove auto-connect to MCP on page load
- Connection only happens when user explicitly requests torch
2026-02-14 17:13:32 -06:00
c98f3e2b99 refactor: Use dedicated WebSocket server for torch sync
- Add torch WebSocket server on port 4106
- Remove HTTP polling, use WebSocket for instant sync
- Torch state changes broadcast immediately to all clients
- Auto-reconnect on disconnect
- Add port 4106 to kill-ports script
2026-02-14 16:40:40 -06:00
2a01574d00 fix: Improve terminal buffer handling and replay performance
- Add chunked replay (8KB chunks with 10ms delay) to avoid overwhelming xterm.js
- Add clear-buffer server command to reset terminal history
- Add clear buffer button in terminal header
- Filter out tiny resize events during CSS transitions (ignore < 20x5)
- Remove premature fit() call from init - wait for onBecameVisible
2026-02-14 12:57:30 -06:00
88a76c005d refactor: Separate git watcher from terminal service
- Create dedicated git-watcher.ts with its own WebSocket server (port 4105)
- Remove git watcher code from terminal.ts (no more PTY dependency)
- Add /ws/git endpoint for Traefik routing
- GitPage now connects to dedicated git WebSocket instead of terminal
2026-02-14 12:42:03 -06:00
303755437d refactor: Extract terminal rendering logic to useTerminalRenderer composable
- Create useTerminalRenderer.ts with all xterm.js logic
- Support custom theme, fontSize, fontFamily options
- Add handleReplay() for proper visibility handling
- Add getBufferContent() for copying terminal content
- Refactor FloatingTerminal.vue to use composable
- Refactor TerminalPage.vue to use composable
- Server: Add request-replay message type for on-demand replay
- Server: Remove auto-replay on connect (client requests when ready)
- Fix xterm.js rendering issues with hidden containers (v-show)
2026-02-14 12:16:34 -06:00
e3ce3712b5 fix: Filter noisy git watcher events
Only react to meaningful changes (refs, HEAD, index, objects).
Ignore lock files, FETCH_HEAD, fsmonitor, and other noisy files.
2026-02-14 11:25:16 -06:00
8daf07819b feat: Add realtime git status updates via WebSocket
- Add file watcher on .git directory in terminal server
- Broadcast git-change events to connected clients
- Frontend auto-refreshes when changes detected
- Visual indicator shows realtime connection status
2026-02-14 11:20:55 -06:00
47f5524416 feat: Introduce Nucleo as the main AI agent identity
- Add Nucleo atom logo with animated orbiting electrons
- Redesign FAB with glassmorphism effect and purple gradient
- Add connection indicator (green dot) when terminal is open
- Update FloatingTerminal header with Nucleo branding
- Add PermissionRequest hook support with red alert animation
- Document Nucleo in README with visual states table
- Create official Nucleo logo SVG in docs/
2026-02-14 02:56:50 -06:00
d9e2548fb8 feat: Add rich Claude status animations to FAB
- Add multiple hook-driven animations for FAB (processing, reading, writing, subagent, sessionStart, notification)
- Create claude-status.ts route to handle status updates from Claude Code hooks
- Broadcast status via WebSocket to all connected clients
- Processing (UserPromptSubmit→Stop): orange pulsing dots
- Reading (Read/Glob/Grep): cyan eye icon with scan animation
- Writing (Edit/Write): green pencil icon with pulse
- Subagent: purple orbital ring animation
- SessionStart: green wake-up ripple effect (3s)
- Notification: yellow bounce animation (2s)
- Tool flash: quick white flash on any tool use
2026-02-14 02:42:30 -06:00
5be0fb91ab fix: Improve Whisper server startup with async polling and reduce logs
- Make server startup async to avoid Bun's 10s timeout
- Add frontend polling to detect when server is ready
- Use PowerShell Get-NetTCPConnection for reliable port detection
- Add starting state to prevent multiple simultaneous starts
- Reduce verbose logging, keep only essential info
- Add dev-dist and nul to gitignore
2026-02-14 01:03:02 -06:00
638e6ac8e0 feat: Add Whisper GPU speech-to-text with progressive transcription
- Add faster-whisper Python server for GPU-accelerated transcription
- Support dual mode: Web Speech API or Whisper GPU (toggleable)
- Progressive transcription every 3 seconds while recording
- Separate terminal server process (stable during hot-reload)
- Add Ctrl+V paste and Ctrl+C copy support in FloatingTerminal
- Add MCP tools: whisper_start, whisper_stop, whisper_toggle, whisper_status
- Update package.json with separate api/terminal/frontend processes
2026-02-13 23:47:52 -06:00
3c57f95b90 feat: Add PWA support and CORS configuration
- Configure VitePWA with manifest, icons and service worker
- Add PwaInstallBanner component for install prompt in header
- Enable CORS for z590.interno.com access
- Use dynamic hostname for terminal WebSocket connection
- Add generate-icons script with sharp for PWA icons
- Fix theme-color to match header background
2026-02-13 18:00:54 -06:00
645f51a74e refactor: Modularize server into separate concerns
Split monolithic index.ts (~1400 lines) into modular structure:
- config.ts: Server configuration and constants
- db/: Database initialization, migrations, and seeds
- routes/: API handlers by domain (themes, canvas, components, etc.)
- services/: Terminal WebSocket server
- utils/: CORS helpers

Entry point now only coordinates initialization.
2026-02-13 13:01:18 -06:00