@hasna/shortlinks 0.1.24 → 0.2.0

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.
@@ -1,14 +1,24 @@
1
1
  import type { Server } from "@modelcontextprotocol/sdk/server/index.js";
2
+ import { type McpHttpServerHandle } from "@hasna/mcp-harness";
3
+ /**
4
+ * open-shortlinks MCP transport/port boilerplate — thin shim over
5
+ * `@hasna/mcp-harness`. The public API (names, signatures, health shape) is
6
+ * preserved so `mcp/index.ts` is unchanged; only the hand-rolled `node:http` +
7
+ * `StreamableHTTPServerTransport` server, port parsing, and health helpers
8
+ * were removed in favor of the shared harness.
9
+ *
10
+ * shortlinks builds its MCP server with the low-level `Server` (not the
11
+ * high-level `McpServer`); the harness's Node adapter is typed against
12
+ * `McpServer` but only calls `.connect()`/`.close()` at runtime, both of
13
+ * which `Server` implements identically — the cast below mirrors the same
14
+ * pattern used by open-signatures.
15
+ */
2
16
  export declare const MCP_HTTP_SERVICE_NAME = "shortlinks";
3
17
  export declare const DEFAULT_MCP_HTTP_PORT = 8851;
18
+ export type { McpHttpServerHandle };
4
19
  export declare function isHttpMode(argv?: string[], env?: NodeJS.ProcessEnv): boolean;
5
20
  export declare function isStdioMode(argv?: string[], env?: NodeJS.ProcessEnv): boolean;
6
21
  export declare function resolveMcpHttpPort(argv?: string[], env?: NodeJS.ProcessEnv): number;
7
- export type McpHttpServerHandle = {
8
- port: number;
9
- host: string;
10
- close: () => Promise<void>;
11
- };
12
22
  export declare function startMcpHttpServer(buildServer: () => Server, options?: {
13
23
  port?: number;
14
24
  host?: string;
@@ -7,8 +7,9 @@
7
7
  * shortlinks-mcp stdio (default; for editor/agent clients)
8
8
  * shortlinks-mcp --http Streamable HTTP on 127.0.0.1:8851 (shared service)
9
9
  *
10
- * Store mode follows HASNA_SHORTLINKS_STORE (local SQLite | postgres). In
11
- * postgres mode it reads/writes RDS directly (Amendment A1).
10
+ * Every tool routes through the shared client {@link Store}: the cloud ApiStore
11
+ * (HTTPS `/v1` + bearer key) when the client flip is on, otherwise the on-box
12
+ * LocalStore SQLite. No DSN, no direct sqlite/fetch — same seam the CLI uses.
12
13
  */
13
14
  import { Server } from "@modelcontextprotocol/sdk/server/index.js";
14
15
  export declare function buildServer(): Server;