A TypeScript framework for bridging a web application to the Google Antigravity CLI. Single-page interface with MCP-like tool system and real-time agent communication.
Browser (Single Page) <--WebSocket--> Node/Express Server <--child_process--> Antigravity CLI
|
Tool Registry
(MCP-like system)
1 cd c: \ Users \ User \ Desktop \ debugrem \ agent-bridge
2 npm install
3 npm start
4 # Open http://localhost:3777
agent-bridge/
server/
index.ts Entry point (Express + Socket.IO)
bridge.ts Unified WebSocket event hub
toolRegistry.ts Typed MCP-like tool system
cliDetector.ts Real multi-strategy CLI auto-detection
tools/
transcript.ts YouTube URL to transcript (yt-dlp + API fallback)
client/
index.html Single-page app
src/
style.css Light theme, dot-grid canvas, Google aesthetic
main.js WebSocket, chat UI, tool rail, suggestion chips
output/ Generated files
tsconfig.json
package.json
No mock status. The detection result is real -- if it says "not detected", the CLI is genuinely not found.
1 import type { ToolRegistry } from '../toolRegistry' ;
2
3 export function register ( registry : ToolRegistry ) : void {
4 registry . register ( {
5 name : 'my_tool' ,
6 description : 'Does something useful' ,
7 syntax : 'use <my_tool> <param>' ,
8 pattern : / use\s+<my_tool>\s+(?<param>.+) / i ,
9 mock : false ,
10 async execute ( params , emitProgress ) {
11 emitProgress ( 'Working...' ) ;
12 return { message : 'Done' } ;
13 } ,
14 } ) ;
15 }
The tool extracts subtitles and provides a downloadable transcript.