@hasna/mcps 0.0.19 → 0.0.21

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,32 @@
1
+ import { PgAdapterAsync } from "./remote-storage.js";
2
+ export declare const CLOUD_TABLES: readonly ["servers", "tool_cache", "sources", "machines", "provider_profiles", "feedback"];
3
+ type CloudTable = (typeof CLOUD_TABLES)[number];
4
+ export interface SyncResult {
5
+ table: string;
6
+ rowsRead: number;
7
+ rowsWritten: number;
8
+ errors: string[];
9
+ }
10
+ export interface SyncMeta {
11
+ table_name: string;
12
+ last_synced_at: string | null;
13
+ direction: "push" | "pull";
14
+ }
15
+ export declare function getCloudDatabaseUrl(): string | null;
16
+ export declare function getCloudPg(): Promise<PgAdapterAsync>;
17
+ export declare function runCloudMigrations(remote: PgAdapterAsync): Promise<void>;
18
+ export declare function cloudPush(options?: {
19
+ tables?: string[];
20
+ }): Promise<SyncResult[]>;
21
+ export declare function cloudPull(options?: {
22
+ tables?: string[];
23
+ }): Promise<SyncResult[]>;
24
+ export declare function cloudSync(options?: {
25
+ tables?: string[];
26
+ }): Promise<{
27
+ push: SyncResult[];
28
+ pull: SyncResult[];
29
+ }>;
30
+ export declare function getSyncMetaAll(): SyncMeta[];
31
+ export declare function resolveTables(tables?: string[]): CloudTable[];
32
+ export {};
package/dist/lib/db.d.ts CHANGED
@@ -1,5 +1,10 @@
1
1
  import { Database } from "bun:sqlite";
2
- import { SqliteAdapter } from "@hasna/cloud";
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
+ }
3
8
  export declare function getDb(): Database;
4
9
  export declare function closeDb(): void;
5
10
  /** Get the SqliteAdapter for direct SQL queries (e.g. feedback). */
@@ -0,0 +1,10 @@
1
+ export declare class PgAdapterAsync {
2
+ private readonly pool;
3
+ constructor(connectionString: string);
4
+ run(sql: string, ...params: unknown[]): Promise<{
5
+ changes: number;
6
+ }>;
7
+ get(sql: string, ...params: unknown[]): Promise<unknown>;
8
+ all(sql: string, ...params: unknown[]): Promise<unknown[]>;
9
+ close(): Promise<void>;
10
+ }
@@ -1,7 +1,5 @@
1
1
  #!/usr/bin/env bun
2
- export { buildServer, createMcpServer, VERSION } from "./server.js";
3
- export { isHttpMode, resolveHttpPort, startHttpServer, DEFAULT_HTTP_PORT, HTTP_NAME } from "./http.js";
2
+ export { createMcpServer, VERSION } from "./server.js";
4
3
  export { buildMcpTools, listTools, registerMcpTools, tools, } from "./tools.js";
5
4
  export type { McpsMcpToolDefinition } from "./tools.js";
6
5
  export declare function startMcpServer(): Promise<void>;
7
- export declare function main(args?: string[]): Promise<void>;