@hasna/cloud 0.1.33 → 0.1.34

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/cli/index.js CHANGED
@@ -6158,7 +6158,7 @@ var require_arrayParser = __commonJS((exports, module) => {
6158
6158
  };
6159
6159
  });
6160
6160
 
6161
- // node_modules/postgres-date/index.js
6161
+ // node_modules/pg-types/node_modules/postgres-date/index.js
6162
6162
  var require_postgres_date = __commonJS((exports, module) => {
6163
6163
  var DATE_TIME = /(\d{1,})-(\d{2})-(\d{2}) (\d{2}):(\d{2}):(\d{2})(\.\d{1,})?.*?( BC)?$/;
6164
6164
  var DATE = /^(\d{1,})-(\d{2})-(\d{2})( BC)?$/;
@@ -6260,7 +6260,7 @@ var require_mutable = __commonJS((exports, module) => {
6260
6260
  }
6261
6261
  });
6262
6262
 
6263
- // node_modules/postgres-interval/index.js
6263
+ // node_modules/pg-types/node_modules/postgres-interval/index.js
6264
6264
  var require_postgres_interval = __commonJS((exports, module) => {
6265
6265
  var extend = require_mutable();
6266
6266
  module.exports = PostgresInterval;
@@ -6352,7 +6352,7 @@ var require_postgres_interval = __commonJS((exports, module) => {
6352
6352
  }
6353
6353
  });
6354
6354
 
6355
- // node_modules/postgres-bytea/index.js
6355
+ // node_modules/pg-types/node_modules/postgres-bytea/index.js
6356
6356
  var require_postgres_bytea = __commonJS((exports, module) => {
6357
6357
  var bufferFrom = Buffer.from || Buffer;
6358
6358
  module.exports = function parseBytea(input) {
package/dist/index.js CHANGED
@@ -156,7 +156,7 @@ var require_arrayParser = __commonJS((exports, module) => {
156
156
  };
157
157
  });
158
158
 
159
- // node_modules/postgres-date/index.js
159
+ // node_modules/pg-types/node_modules/postgres-date/index.js
160
160
  var require_postgres_date = __commonJS((exports, module) => {
161
161
  var DATE_TIME = /(\d{1,})-(\d{2})-(\d{2}) (\d{2}):(\d{2}):(\d{2})(\.\d{1,})?.*?( BC)?$/;
162
162
  var DATE = /^(\d{1,})-(\d{2})-(\d{2})( BC)?$/;
@@ -258,7 +258,7 @@ var require_mutable = __commonJS((exports, module) => {
258
258
  }
259
259
  });
260
260
 
261
- // node_modules/postgres-interval/index.js
261
+ // node_modules/pg-types/node_modules/postgres-interval/index.js
262
262
  var require_postgres_interval = __commonJS((exports, module) => {
263
263
  var extend = require_mutable();
264
264
  module.exports = PostgresInterval;
@@ -350,7 +350,7 @@ var require_postgres_interval = __commonJS((exports, module) => {
350
350
  }
351
351
  });
352
352
 
353
- // node_modules/postgres-bytea/index.js
353
+ // node_modules/pg-types/node_modules/postgres-bytea/index.js
354
354
  var require_postgres_bytea = __commonJS((exports, module) => {
355
355
  var bufferFrom = Buffer.from || Buffer;
356
356
  module.exports = function parseBytea(input) {
@@ -1,7 +1,8 @@
1
1
  import { type IncomingMessage, type ServerResponse } from "node:http";
2
2
  import type { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
3
- export declare const DEFAULT_MCP_HTTP_PORT = 8804;
3
+ export declare const DEFAULT_MCP_HTTP_PORT = 8852;
4
4
  export declare const MCP_SERVICE_NAME = "cloud";
5
+ export declare function isStdioMode(argv?: string[]): boolean;
5
6
  export declare function resolveMcpHttpPort(explicit?: number): number;
6
7
  export declare function isHttpMode(argv?: string[]): boolean;
7
8
  export declare function parseHttpArgv(argv?: string[]): {
@@ -1 +1 @@
1
- {"version":3,"file":"http.d.ts","sourceRoot":"","sources":["../../src/mcp/http.ts"],"names":[],"mappings":"AAAA,OAAO,EAAgB,KAAK,eAAe,EAAE,KAAK,cAAc,EAAE,MAAM,WAAW,CAAC;AAEpF,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;AAGzE,eAAO,MAAM,qBAAqB,OAAO,CAAC;AAC1C,eAAO,MAAM,gBAAgB,UAAU,CAAC;AAExC,wBAAgB,kBAAkB,CAAC,QAAQ,CAAC,EAAE,MAAM,GAAG,MAAM,CAQ5D;AAED,wBAAgB,UAAU,CAAC,IAAI,GAAE,MAAM,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O,CAElE;AAED,wBAAgB,kBAAkB,CAAC,QAAQ,CAAC,EAAE,MAAM,GAAG,MAAM,CAQ5D;AAED,wBAAgB,UAAU,CAAC,IAAI,GAAE,MAAM,EAAiB,GAAG,OAAO,CAEjE;AAED,wBAAgB,aAAa,CAAC,IAAI,GAAE,MAAM,EAAiB,GAAG;IAAE,IAAI,EAAE,OAAO,CAAC;IAAC,IAAI,CAAC,EAAE,MAAM,CAAA;CAAE,CAQ7F;AAUD,wBAAsB,sBAAsB,CAC1C,GAAG,EAAE,eAAe,EACpB,GAAG,EAAE,cAAc,EACnB,SAAS,GAAE,MAAM,SAAS,GAAG,OAAO,CAAC,SAAS,CAAe,GAC5D,OAAO,CAAC,IAAI,CAAC,CAUf;AAED,wBAAgB,aAAa,CAAC,IAAI,GAAE,MAAyB,GAAG;IAAE,MAAM,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,MAAM,CAAA;CAAE,CAE/F;AAED,wBAAsB,kBAAkB,CAAC,OAAO,GAAE;IAChD,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,SAAS,CAAC,EAAE,MAAM,SAAS,GAAG,OAAO,CAAC,SAAS,CAAC,CAAC;IACjD,IAAI,CAAC,EAAE,MAAM,CAAC;CACV,GAAG,OAAO,CAAC;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,CAAA;CAAE,CAAC,CAuC7D;AAED,wBAAsB,gBAAgB,CAAC,OAAO,GAAE;IAAE,IAAI,CAAC,EAAE,MAAM,CAAA;CAAO,GAAG,OAAO,CAAC,IAAI,CAAC,CAIrF"}
package/dist/mcp/index.js CHANGED
@@ -10596,7 +10596,7 @@ var require_arrayParser = __commonJS((exports, module) => {
10596
10596
  };
10597
10597
  });
10598
10598
 
10599
- // node_modules/postgres-date/index.js
10599
+ // node_modules/pg-types/node_modules/postgres-date/index.js
10600
10600
  var require_postgres_date = __commonJS((exports, module) => {
10601
10601
  var DATE_TIME = /(\d{1,})-(\d{2})-(\d{2}) (\d{2}):(\d{2}):(\d{2})(\.\d{1,})?.*?( BC)?$/;
10602
10602
  var DATE = /^(\d{1,})-(\d{2})-(\d{2})( BC)?$/;
@@ -10698,7 +10698,7 @@ var require_mutable = __commonJS((exports, module) => {
10698
10698
  }
10699
10699
  });
10700
10700
 
10701
- // node_modules/postgres-interval/index.js
10701
+ // node_modules/pg-types/node_modules/postgres-interval/index.js
10702
10702
  var require_postgres_interval = __commonJS((exports, module) => {
10703
10703
  var extend2 = require_mutable();
10704
10704
  module.exports = PostgresInterval;
@@ -10790,7 +10790,7 @@ var require_postgres_interval = __commonJS((exports, module) => {
10790
10790
  }
10791
10791
  });
10792
10792
 
10793
- // node_modules/postgres-bytea/index.js
10793
+ // node_modules/pg-types/node_modules/postgres-bytea/index.js
10794
10794
  var require_postgres_bytea = __commonJS((exports, module) => {
10795
10795
  var bufferFrom = Buffer.from || Buffer;
10796
10796
  module.exports = function parseBytea(input) {
@@ -27411,8 +27411,11 @@ class StreamableHTTPServerTransport {
27411
27411
  }
27412
27412
 
27413
27413
  // src/mcp/http.ts
27414
- var DEFAULT_MCP_HTTP_PORT = 8804;
27414
+ var DEFAULT_MCP_HTTP_PORT = 8852;
27415
27415
  var MCP_SERVICE_NAME = "cloud";
27416
+ function isStdioMode(argv = process.argv) {
27417
+ return argv.includes("--stdio") || process.env.MCP_STDIO === "1";
27418
+ }
27416
27419
  function resolveMcpHttpPort(explicit) {
27417
27420
  if (explicit != null && !Number.isNaN(explicit))
27418
27421
  return explicit;
@@ -27774,14 +27777,14 @@ Done. ${results.length} services, ${totalApplied} migrations applied.`);
27774
27777
  return server;
27775
27778
  }
27776
27779
  async function main() {
27777
- const { http, port } = parseHttpArgv();
27778
- if (http) {
27779
- await runMcpHttpServer({ port: resolveMcpHttpPort(port) });
27780
+ const { port } = parseHttpArgv();
27781
+ if (isStdioMode()) {
27782
+ const server = buildServer();
27783
+ const transport = new StdioServerTransport;
27784
+ await server.connect(transport);
27780
27785
  return;
27781
27786
  }
27782
- const server = buildServer();
27783
- const transport = new StdioServerTransport;
27784
- await server.connect(transport);
27787
+ await runMcpHttpServer({ port: resolveMcpHttpPort(port) });
27785
27788
  }
27786
27789
  main().catch((err) => {
27787
27790
  console.error("cloud-mcp failed to start:", err);
@@ -155,7 +155,7 @@ var require_arrayParser = __commonJS((exports, module) => {
155
155
  };
156
156
  });
157
157
 
158
- // node_modules/postgres-date/index.js
158
+ // node_modules/pg-types/node_modules/postgres-date/index.js
159
159
  var require_postgres_date = __commonJS((exports, module) => {
160
160
  var DATE_TIME = /(\d{1,})-(\d{2})-(\d{2}) (\d{2}):(\d{2}):(\d{2})(\.\d{1,})?.*?( BC)?$/;
161
161
  var DATE = /^(\d{1,})-(\d{2})-(\d{2})( BC)?$/;
@@ -257,7 +257,7 @@ var require_mutable = __commonJS((exports, module) => {
257
257
  }
258
258
  });
259
259
 
260
- // node_modules/postgres-interval/index.js
260
+ // node_modules/pg-types/node_modules/postgres-interval/index.js
261
261
  var require_postgres_interval = __commonJS((exports, module) => {
262
262
  var extend = require_mutable();
263
263
  module.exports = PostgresInterval;
@@ -349,7 +349,7 @@ var require_postgres_interval = __commonJS((exports, module) => {
349
349
  }
350
350
  });
351
351
 
352
- // node_modules/postgres-bytea/index.js
352
+ // node_modules/pg-types/node_modules/postgres-bytea/index.js
353
353
  var require_postgres_bytea = __commonJS((exports, module) => {
354
354
  var bufferFrom = Buffer.from || Buffer;
355
355
  module.exports = function parseBytea(input) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hasna/cloud",
3
- "version": "0.1.33",
3
+ "version": "0.1.34",
4
4
  "description": "Shared cloud infrastructure — database adapter (SQLite + PostgreSQL), sync engine, feedback system, unified dotfile config",
5
5
  "license": "Apache-2.0",
6
6
  "type": "module",