@hasna/configs 0.2.32 → 0.2.33

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,6 +1,7 @@
1
- export declare const MCP_HTTP_PORT = 8807;
1
+ export declare const MCP_HTTP_PORT = 8853;
2
2
  export declare const MCP_NAME = "configs";
3
3
  export declare function isHttpMode(argv: string[]): boolean;
4
+ export declare function isStdioMode(argv: string[]): boolean;
4
5
  export declare function resolveHttpPort(argv: string[]): number;
5
6
  export declare function healthPayload(): {
6
7
  status: string;
@@ -1 +1 @@
1
- {"version":3,"file":"http.d.ts","sourceRoot":"","sources":["../../src/mcp/http.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,aAAa,OAAO,CAAC;AAClC,eAAO,MAAM,QAAQ,YAAY,CAAC;AAElC,wBAAgB,UAAU,CAAC,IAAI,EAAE,MAAM,EAAE,GAAG,OAAO,CAElD;AAED,wBAAgB,eAAe,CAAC,IAAI,EAAE,MAAM,EAAE,GAAG,MAAM,CAiBtD;AAED,wBAAgB,aAAa,IAAI;IAAE,MAAM,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,MAAM,CAAA;CAAE,CAEhE;AAYD,wBAAsB,oBAAoB,CAAC,GAAG,EAAE,OAAO,GAAG,OAAO,CAAC,QAAQ,GAAG,IAAI,CAAC,CASjF;AAED,wBAAsB,kBAAkB,CACtC,IAAI,EAAE,MAAM,GACX,OAAO,CAAC;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,MAAM,IAAI,CAAA;CAAE,CAAC,CAW7C;AAED,wBAAgB,kBAAkB,CAAC,GAAG,EAAE;IACtC,GAAG,EAAE,CAAC,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,CAAC,CAAC,EAAE;QAAE,IAAI,EAAE,CAAC,IAAI,EAAE,OAAO,KAAK,QAAQ,CAAC;QAAC,GAAG,EAAE;YAAE,GAAG,EAAE,OAAO,CAAA;SAAE,CAAA;KAA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KAAE,KAAK,QAAQ,GAAG,OAAO,CAAC,QAAQ,CAAC,KAAK,IAAI,CAAC;IACxI,GAAG,EAAE,CAAC,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,CAAC,CAAC,EAAE;QAAE,GAAG,EAAE;YAAE,GAAG,EAAE,OAAO,CAAA;SAAE,CAAA;KAAE,KAAK,QAAQ,GAAG,OAAO,CAAC,QAAQ,CAAC,KAAK,IAAI,CAAC;CACtG,GAAG,IAAI,CAMP"}
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/mcp/index.ts"],"names":[],"mappings":";AAoCA,OAAO,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/mcp/index.ts"],"names":[],"mappings":";AAqCA,OAAO,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC"}
package/dist/mcp/index.js CHANGED
@@ -11250,7 +11250,7 @@ var init_sync_dir = __esm(() => {
11250
11250
  var require_package = __commonJS((exports, module) => {
11251
11251
  module.exports = {
11252
11252
  name: "@hasna/configs",
11253
- version: "0.2.32",
11253
+ version: "0.2.33",
11254
11254
  description: "AI coding agent configuration manager \u2014 store, version, apply, and share all your AI coding configs. CLI + MCP + REST API + Dashboard.",
11255
11255
  type: "module",
11256
11256
  main: "dist/index.js",
@@ -11695,10 +11695,10 @@ function buildServer() {
11695
11695
 
11696
11696
  // src/mcp/http.ts
11697
11697
  import { WebStandardStreamableHTTPServerTransport } from "@modelcontextprotocol/sdk/server/webStandardStreamableHttp.js";
11698
- var MCP_HTTP_PORT = 8807;
11698
+ var MCP_HTTP_PORT = 8853;
11699
11699
  var MCP_NAME = "configs";
11700
- function isHttpMode(argv) {
11701
- return argv.includes("--http") || process.env.MCP_HTTP === "1";
11700
+ function isStdioMode(argv) {
11701
+ return argv.includes("--stdio") || process.env.MCP_STDIO === "1";
11702
11702
  }
11703
11703
  function resolveHttpPort(argv) {
11704
11704
  const eqArg = argv.find((a) => a.startsWith("--port="));
@@ -11765,15 +11765,15 @@ async function main() {
11765
11765
  await proc.exited;
11766
11766
  process.exit(0);
11767
11767
  }
11768
- if (isHttpMode(argv)) {
11769
- const port = resolveHttpPort(argv);
11770
- const { port: boundPort } = await startMcpHttpServer(port);
11771
- console.error(`configs-mcp HTTP listening on http://127.0.0.1:${boundPort}/mcp`);
11768
+ if (isStdioMode(argv)) {
11769
+ const server = buildServer();
11770
+ const transport = new StdioServerTransport;
11771
+ await server.connect(transport);
11772
11772
  return;
11773
11773
  }
11774
- const server = buildServer();
11775
- const transport = new StdioServerTransport;
11776
- await server.connect(transport);
11774
+ const port = resolveHttpPort(argv);
11775
+ const { port: boundPort } = await startMcpHttpServer(port);
11776
+ console.error(`configs-mcp HTTP listening on http://127.0.0.1:${boundPort}/mcp`);
11777
11777
  }
11778
11778
  if (import.meta.main) {
11779
11779
  main().catch((err2) => {
@@ -17751,7 +17751,7 @@ var require_dist2 = __commonJS((exports, module) => {
17751
17751
  var require_package = __commonJS((exports, module) => {
17752
17752
  module.exports = {
17753
17753
  name: "@hasna/configs",
17754
- version: "0.2.32",
17754
+ version: "0.2.33",
17755
17755
  description: "AI coding agent configuration manager \u2014 store, version, apply, and share all your AI coding configs. CLI + MCP + REST API + Dashboard.",
17756
17756
  type: "module",
17757
17757
  main: "dist/index.js",
@@ -18205,7 +18205,7 @@ var HonoRequest = class {
18205
18205
  return headerData;
18206
18206
  }
18207
18207
  async parseBody(options) {
18208
- return parseBody(this, options);
18208
+ return this.bodyCache.parsedBody ??= await parseBody(this, options);
18209
18209
  }
18210
18210
  #cachedBody = (key) => {
18211
18211
  const { bodyCache, raw } = this;
@@ -19386,9 +19386,6 @@ var cors = (options) => {
19386
19386
  const findAllowOrigin = ((optsOrigin) => {
19387
19387
  if (typeof optsOrigin === "string") {
19388
19388
  if (optsOrigin === "*") {
19389
- if (opts.credentials) {
19390
- return (origin) => origin || null;
19391
- }
19392
19389
  return () => optsOrigin;
19393
19390
  } else {
19394
19391
  return (origin) => optsOrigin === origin ? origin : null;
@@ -19423,7 +19420,7 @@ var cors = (options) => {
19423
19420
  set("Access-Control-Expose-Headers", opts.exposeHeaders.join(","));
19424
19421
  }
19425
19422
  if (c.req.method === "OPTIONS") {
19426
- if (opts.origin !== "*" || opts.credentials) {
19423
+ if (opts.origin !== "*") {
19427
19424
  set("Vary", "Origin");
19428
19425
  }
19429
19426
  if (opts.maxAge != null) {
@@ -19453,7 +19450,7 @@ var cors = (options) => {
19453
19450
  });
19454
19451
  }
19455
19452
  await next();
19456
- if (opts.origin !== "*" || opts.credentials) {
19453
+ if (opts.origin !== "*") {
19457
19454
  c.header("Vary", "Origin", { append: true });
19458
19455
  }
19459
19456
  };
@@ -23332,7 +23329,7 @@ var AssertObjectSchema = custom2((v) => v !== null && (typeof v === "object" ||
23332
23329
  var ProgressTokenSchema = union([string2(), number2().int()]);
23333
23330
  var CursorSchema = string2();
23334
23331
  var TaskCreationParamsSchema = looseObject({
23335
- ttl: number2().optional(),
23332
+ ttl: union([number2(), _null3()]).optional(),
23336
23333
  pollInterval: number2().optional()
23337
23334
  });
23338
23335
  var TaskMetadataSchema = object({
@@ -23486,8 +23483,7 @@ var ClientCapabilitiesSchema = object({
23486
23483
  roots: object({
23487
23484
  listChanged: boolean2().optional()
23488
23485
  }).optional(),
23489
- tasks: ClientTasksCapabilitySchema.optional(),
23490
- extensions: record(string2(), AssertObjectSchema).optional()
23486
+ tasks: ClientTasksCapabilitySchema.optional()
23491
23487
  });
23492
23488
  var InitializeRequestParamsSchema = BaseRequestParamsSchema.extend({
23493
23489
  protocolVersion: string2(),
@@ -23513,8 +23509,7 @@ var ServerCapabilitiesSchema = object({
23513
23509
  tools: object({
23514
23510
  listChanged: boolean2().optional()
23515
23511
  }).optional(),
23516
- tasks: ServerTasksCapabilitySchema.optional(),
23517
- extensions: record(string2(), AssertObjectSchema).optional()
23512
+ tasks: ServerTasksCapabilitySchema.optional()
23518
23513
  });
23519
23514
  var InitializeResultSchema = ResultSchema.extend({
23520
23515
  protocolVersion: string2(),
@@ -23629,7 +23624,6 @@ var ResourceSchema = object({
23629
23624
  uri: string2(),
23630
23625
  description: optional(string2()),
23631
23626
  mimeType: optional(string2()),
23632
- size: optional(number2()),
23633
23627
  annotations: AnnotationsSchema.optional(),
23634
23628
  _meta: optional(looseObject({}))
23635
23629
  });
@@ -24987,10 +24981,6 @@ class Protocol {
24987
24981
  this._progressHandlers.clear();
24988
24982
  this._taskProgressTokens.clear();
24989
24983
  this._pendingDebouncedNotifications.clear();
24990
- for (const info of this._timeoutInfo.values()) {
24991
- clearTimeout(info.timeoutId);
24992
- }
24993
- this._timeoutInfo.clear();
24994
24984
  for (const controller of this._requestHandlerAbortControllers.values()) {
24995
24985
  controller.abort();
24996
24986
  }
@@ -25121,9 +25111,7 @@ class Protocol {
25121
25111
  await capturedTransport?.send(errorResponse);
25122
25112
  }
25123
25113
  }).catch((error2) => this._onerror(new Error(`Failed to send response: ${error2}`))).finally(() => {
25124
- if (this._requestHandlerAbortControllers.get(request.id) === abortController) {
25125
- this._requestHandlerAbortControllers.delete(request.id);
25126
- }
25114
+ this._requestHandlerAbortControllers.delete(request.id);
25127
25115
  });
25128
25116
  }
25129
25117
  _onprogress(notification) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hasna/configs",
3
- "version": "0.2.32",
3
+ "version": "0.2.33",
4
4
  "description": "AI coding agent configuration manager — store, version, apply, and share all your AI coding configs. CLI + MCP + REST API + Dashboard.",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",