@hasna/mcps 0.0.21 → 0.0.22

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/lib/db.d.ts CHANGED
@@ -1,10 +1,5 @@
1
1
  import { Database } from "bun:sqlite";
2
- export declare class SqliteAdapter {
3
- readonly raw: Database;
4
- constructor(path: string);
5
- run(sql: string, ...params: any[]): import("bun:sqlite").Changes;
6
- close(): void;
7
- }
2
+ import { SqliteAdapter } from "@hasna/cloud";
8
3
  export declare function getDb(): Database;
9
4
  export declare function closeDb(): void;
10
5
  /** Get the SqliteAdapter for direct SQL queries (e.g. feedback). */
@@ -0,0 +1,12 @@
1
+ import { type Server } from "node:http";
2
+ export declare const DEFAULT_HTTP_PORT = 8866;
3
+ export declare const HTTP_NAME = "mcps";
4
+ export interface StartHttpServerOptions {
5
+ port?: number;
6
+ host?: string;
7
+ name?: string;
8
+ }
9
+ export declare function isHttpMode(args?: string[]): boolean;
10
+ export declare function isStdioMode(args?: string[]): boolean;
11
+ export declare function resolveHttpPort(args?: string[]): number;
12
+ export declare function startHttpServer(options?: StartHttpServerOptions): Server;
@@ -1,5 +1,7 @@
1
1
  #!/usr/bin/env bun
2
- export { createMcpServer, VERSION } from "./server.js";
2
+ export { buildServer, createMcpServer, VERSION } from "./server.js";
3
+ export { isHttpMode, resolveHttpPort, startHttpServer, DEFAULT_HTTP_PORT, HTTP_NAME } from "./http.js";
3
4
  export { buildMcpTools, listTools, registerMcpTools, tools, } from "./tools.js";
4
5
  export type { McpsMcpToolDefinition } from "./tools.js";
5
6
  export declare function startMcpServer(): Promise<void>;
7
+ export declare function main(args?: string[]): Promise<void>;