@vibebrowser/mcp 0.2.4 → 0.2.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/server.d.ts CHANGED
@@ -3,38 +3,83 @@
3
3
  *
4
4
  * MCP server that bridges AI clients with the Vibe browser extension.
5
5
  */
6
- import { ServerConfig } from './types.js';
6
+ import { type ServerConfig, type ServerTransportMode } from './types.js';
7
7
  /**
8
8
  * Vibe MCP Server
9
9
  *
10
- * Exposes Vibe browser tools to MCP clients via stdio transport.
10
+ * Exposes Vibe browser tools to MCP clients via stdio or streamable HTTP transport.
11
11
  */
12
12
  export declare class VibeMcpServer {
13
- private server;
14
- private connection;
15
- private config;
13
+ private readonly connection;
14
+ private readonly config;
15
+ private readonly sessions;
16
+ private stdioServer;
17
+ private httpApp;
18
+ private httpServer;
19
+ private shutdownStarted;
16
20
  constructor(config?: Partial<ServerConfig>);
17
21
  /**
18
- * Set up MCP request handlers
22
+ * Start the MCP server
23
+ */
24
+ start(): Promise<void>;
25
+ /**
26
+ * Shutdown the server
27
+ */
28
+ stop(): Promise<void>;
29
+ /**
30
+ * Return the configured MCP endpoint URL in HTTP mode.
19
31
  */
20
- private setupHandlers;
32
+ getHttpUrl(): string | null;
33
+ /**
34
+ * Return the configured transport mode.
35
+ */
36
+ getTransportMode(): ServerTransportMode;
21
37
  /**
22
38
  * Set up extension connection events
23
39
  */
24
40
  private setupConnectionEvents;
25
41
  /**
26
- * Start the MCP server
42
+ * Create a configured MCP server instance.
27
43
  */
28
- start(): Promise<void>;
44
+ private createProtocolServer;
45
+ private withDefaultPageStateFormat;
46
+ private withFallbackPageContent;
47
+ private takeMarkdownSnapshot;
48
+ private findToolByName;
29
49
  /**
30
- * Shutdown the server
50
+ * Start stdio MCP transport.
51
+ */
52
+ private startStdioServer;
53
+ /**
54
+ * Start streamable HTTP MCP transport.
55
+ */
56
+ private startHttpServer;
57
+ /**
58
+ * Handle a streamable HTTP request.
59
+ */
60
+ private handleHttpRequest;
61
+ /**
62
+ * Resolve or create the HTTP session transport for a request.
63
+ */
64
+ private resolveHttpTransport;
65
+ /**
66
+ * Create a new streamable HTTP session.
31
67
  */
68
+ private createHttpSession;
69
+ /**
70
+ * Notify all connected transports that the tool list changed.
71
+ */
72
+ private notifyToolListChanged;
73
+ private sendToolListChanged;
74
+ /**
75
+ * Handle process termination.
76
+ */
77
+ private registerProcessHandlers;
32
78
  private shutdown;
33
79
  /**
34
80
  * Log message if debug is enabled
35
81
  */
36
82
  private log;
37
- private notifyToolListChanged;
38
83
  }
39
84
  /**
40
85
  * Create and start the MCP server
@@ -1 +1 @@
1
- {"version":3,"file":"server.d.ts","sourceRoot":"","sources":["../src/server.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAUH,OAAO,EAAyC,YAAY,EAAkB,MAAM,YAAY,CAAC;AAOjG;;;;GAIG;AACH,qBAAa,aAAa;IACxB,OAAO,CAAC,MAAM,CAAS;IACvB,OAAO,CAAC,UAAU,CAAsB;IACxC,OAAO,CAAC,MAAM,CAAe;gBAEjB,MAAM,GAAE,OAAO,CAAC,YAAY,CAAM;IAiC9C;;OAEG;IACH,OAAO,CAAC,aAAa;IAiDrB;;OAEG;IACH,OAAO,CAAC,qBAAqB;IAqB7B;;OAEG;IACG,KAAK,IAAI,OAAO,CAAC,IAAI,CAAC;IAoB5B;;OAEG;YACW,QAAQ;IAatB;;OAEG;IACH,OAAO,CAAC,GAAG;IAMX,OAAO,CAAC,qBAAqB;CAS9B;AAED;;GAEG;AACH,wBAAsB,YAAY,CAAC,MAAM,CAAC,EAAE,OAAO,CAAC,YAAY,CAAC,GAAG,OAAO,CAAC,aAAa,CAAC,CAIzF"}
1
+ {"version":3,"file":"server.d.ts","sourceRoot":"","sources":["../src/server.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAcH,OAAO,EAIL,KAAK,YAAY,EACjB,KAAK,mBAAmB,EAGzB,MAAM,YAAY,CAAC;AAgBpB;;;;GAIG;AACH,q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