@alcyone-labs/arg-parser 2.7.0 → 2.7.2

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/index.mjs CHANGED
@@ -5135,10 +5135,12 @@ _handleMcpServeFlag_fn = async function(processArgs, _mcpServeIndex) {
5135
5135
  if (typeof loggerConfig === "string") {
5136
5136
  mcpLogger = mcpLoggerModule.createMcpLogger("MCP Serve", loggerConfig);
5137
5137
  } else {
5138
- mcpLogger = mcpLoggerModule.createMcpLogger(
5139
- loggerConfig.prefix || "MCP Serve",
5140
- loggerConfig.logToFile
5141
- );
5138
+ mcpLogger = mcpLoggerModule.createMcpLogger({
5139
+ prefix: loggerConfig.prefix || "MCP Serve",
5140
+ logToFile: loggerConfig.logToFile,
5141
+ level: loggerConfig.level,
5142
+ mcpMode: loggerConfig.mcpMode ?? true
5143
+ });
5142
5144
  }
5143
5145
  debug.log("Created MCP logger, about to hijack console");
5144
5146
  globalThis.console = mcpLogger;
@@ -6995,7 +6997,7 @@ Migration guide: https://github.com/alcyone-labs/arg-parser/blob/main/docs/MCP-M
6995
6997
  `After deduplication: ${uniqueTools.length} unique tools`
6996
6998
  );
6997
6999
  uniqueTools.forEach((tool) => {
6998
- var _a2, _b2, _c2, _d, _e, _f;
7000
+ var _a2, _b2, _c2, _d, _e, _f, _g;
6999
7001
  logger2.mcpError(`Registering tool: ${tool.name}`);
7000
7002
  let zodSchema;
7001
7003
  const toolFromUnified = Array.from(this._tools.values()).find(
@@ -7111,6 +7113,29 @@ Migration guide: https://github.com/alcyone-labs/arg-parser/blob/main/docs/MCP-M
7111
7113
  inputSchema: mcpCompatibleSchema
7112
7114
  });
7113
7115
  }
7116
+ if (tool.outputSchema && this.supportsOutputSchemas()) {
7117
+ const convertedOutputSchema = createOutputSchema(tool.outputSchema);
7118
+ toolConfig.outputSchema = convertedOutputSchema;
7119
+ if (process.env["MCP_DEBUG"]) {
7120
+ console.error(
7121
+ `[MCP Debug] Including outputSchema for tool '${tool.name}':`,
7122
+ typeof tool.outputSchema
7123
+ );
7124
+ console.error(
7125
+ `[MCP Debug] Converted outputSchema constructor:`,
7126
+ (_g = convertedOutputSchema == null ? void 0 : convertedOutputSchema.constructor) == null ? void 0 : _g.name
7127
+ );
7128
+ console.error(
7129
+ `[MCP Debug] supportsOutputSchemas():`,
7130
+ this.supportsOutputSchemas()
7131
+ );
7132
+ }
7133
+ } else if (process.env["MCP_DEBUG"]) {
7134
+ console.error(
7135
+ `[MCP Debug] NOT including outputSchema for tool '${tool.name}':`,
7136
+ `hasOutputSchema=${!!tool.outputSchema}, supportsOutputSchemas=${this.supportsOutputSchemas()}`
7137
+ );
7138
+ }
7114
7139
  const simpleExecute = async (args) => {
7115
7140
  if (process.env["MCP_DEBUG"]) {
7116
7141
  console.error(
@@ -7808,7 +7833,17 @@ _startSingleTransport_fn = async function(server, serverInfo, transportConfig, l
7808
7833
  const { StreamableHTTPServerTransport: StreamableHTTPServerTransport2 } = await Promise.resolve().then(() => streamableHttp);
7809
7834
  const express = (await import("express")).default;
7810
7835
  const app = express();
7836
+ app.disable("x-powered-by");
7811
7837
  app.use(express.json());
7838
+ app.get("/favicon.ico", (_req, res) => {
7839
+ const favicon = `<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 16 16">
7840
+ <rect width="16" height="16" fill="white"/>
7841
+ <circle cx="8" cy="8" r="4" fill="red"/>
7842
+ </svg>`;
7843
+ res.setHeader("Content-Type", "image/svg+xml");
7844
+ res.setHeader("Cache-Control", "public, max-age=86400");
7845
+ res.send(favicon);
7846
+ });
7812
7847
  try {
7813
7848
  (_c = (_b = (_a = this._mcpServerConfig) == null ? void 0 : _a.httpServer) == null ? void 0 : _b.configureExpress) == null ? void 0 : _c.call(_b, app);
7814
7849
  } catch (e) {