@hasna/brains 0.0.27 → 0.0.29

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.
@@ -0,0 +1,18 @@
1
+ import type { Server } from "@modelcontextprotocol/sdk/server/index.js";
2
+ export declare const DEFAULT_MCP_HTTP_PORT = 8802;
3
+ export declare const MCP_HTTP_HOST = "127.0.0.1";
4
+ export declare const MCP_SERVICE_NAME = "brains";
5
+ export declare function isHttpMode(args: string[]): boolean;
6
+ export declare function isStdioMode(args: string[]): boolean;
7
+ export declare function resolveMcpHttpPort(args: string[]): number;
8
+ export declare function healthPayload(name?: string): {
9
+ status: string;
10
+ name: string;
11
+ };
12
+ export declare function handleMcpRequest(req: Request, buildServer: () => Server): Promise<Response>;
13
+ export declare function startMcpHttpServer(options: {
14
+ name: string;
15
+ port: number;
16
+ buildServer: () => Server;
17
+ }): ReturnType<typeof Bun.serve>;
18
+ //# sourceMappingURL=http.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"http.d.ts","sourceRoot":"","sources":["../../src/mcp/http.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,2CAA2C,CAAC;AAExE,eAAO,MAAM,qBAAqB,OAAO,CAAC;AAC1C,eAAO,MAAM,aAAa,cAAc,CAAC;AACzC,eAAO,MAAM,gBAAgB,WAAW,CAAC;AAEzC,wBAAgB,UAAU,CAAC,IAAI,EAAE,MAAM,EAAE,GAAG,OAAO,CAElD;AAED,wBAAgB,WAAW,CAAC,IAAI,EAAE,MAAM,EAAE,GAAG,OAAO,CAEnD;AAED,wBAAgB,kBAAkB,CAAC,IAAI,EAAE,MAAM,EAAE,GAAG,MAAM,CAQzD;AAED,wBAAgB,aAAa,CAAC,IAAI,GAAE,MAAyB,GAAG;IAAE,MAAM,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,MAAM,CAAA;CAAE,CAE/F;AAED,wBAAsB,gBAAgB,CACpC,GAAG,EAAE,OAAO,EACZ,WAAW,EAAE,MAAM,MAAM,GACxB,OAAO,CAAC,QAAQ,CAAC,CAOnB;AAED,wBAAgB,kBAAkB,CAAC,OAAO,EAAE;IAC1C,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,EAAE,MAAM,MAAM,CAAC;CAC3B,GAAG,UAAU,CAAC,OAAO,GAAG,CAAC,KAAK,CAAC,CAoB/B"}
@@ -5,7 +5,7 @@ export declare const MCP_SERVER_INFO: {
5
5
  readonly name: "brains";
6
6
  readonly version: string;
7
7
  };
8
- export declare function createMcpServer(): Server<{
8
+ export declare function buildServer(): Server<{
9
9
  method: string;
10
10
  params?: {
11
11
  [x: string]: unknown;
@@ -39,6 +39,8 @@ export declare function createMcpServer(): Server<{
39
39
  } | undefined;
40
40
  } | undefined;
41
41
  }>;
42
+ /** @deprecated Use buildServer() */
43
+ export declare const createMcpServer: typeof buildServer;
42
44
  export declare function startMcpServer(transport?: StdioServerTransport): Promise<Server<{
43
45
  method: string;
44
46
  params?: {
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/mcp/index.ts"],"names":[],"mappings":";AACA,OAAO,EAAE,MAAM,EAAE,MAAM,2CAA2C,CAAC;AACnE,OAAO,EAAE,oBAAoB,EAAE,MAAM,2CAA2C,CAAC;AAmEjF,eAAO,MAAM,eAAe;;;CAGlB,CAAC;AAEX,wBAAgB,eAAe;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAqkB9B;AAED,wBAAsB,cAAc,CAAC,SAAS,uBAA6B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAI1E"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/mcp/index.ts"],"names":[],"mappings":";AACA,OAAO,EAAE,MAAM,EAAE,MAAM,2CAA2C,CAAC;AACnE,OAAO,EAAE,oBAAoB,EAAE,MAAM,2CAA2C,CAAC;AAsDjF,eAAO,MAAM,eAAe;;;CAGlB,CAAC;AAEX,wBAAgB,WAAW;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAmf1B;AAED,oCAAoC;AACpC,eAAO,MAAM,eAAe,oBAAc,CAAC;AAqB3C,wBAAsB,cAAc,CAAC,SAAS,uBAA6B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAI1E"}