UNPKG

unstructured-client

Version:

<h3 align="center"> <img src="https://raw.githubusercontent.com/Unstructured-IO/unstructured/main/img/unstructured_logo.png" height="200" > </h3>

128 lines 4.97 kB
"use strict"; /* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { if (k2 === undefined) k2 = k; var desc = Object.getOwnPropertyDescriptor(m, k); if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { desc = { enumerable: true, get: function() { return m[k]; } }; } Object.defineProperty(o, k2, desc); }) : (function(o, m, k, k2) { if (k2 === undefined) k2 = k; o[k2] = m[k]; })); var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { Object.defineProperty(o, "default", { enumerable: true, value: v }); }) : function(o, v) { o["default"] = v; }); var __importStar = (this && this.__importStar) || function (mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); __setModuleDefault(result, mod); return result; }; Object.defineProperty(exports, "__esModule", { value: true }); exports.startCommand = void 0; const core_1 = require("@stricli/core"); const z = __importStar(require("zod")); const config_js_1 = require("../../../lib/config.js"); const console_logger_js_1 = require("../../console-logger.js"); const scopes_js_1 = require("../../scopes.js"); exports.startCommand = (0, core_1.buildCommand)({ loader: async () => { const { main } = await import("./impl.js"); return main; }, parameters: { flags: { transport: { kind: "enum", brief: "The transport to use for communicating with the server", default: "stdio", values: ["stdio", "sse"], }, port: { kind: "parsed", brief: "The port to use when the SSE transport is enabled", default: "2718", parse: (val) => z.coerce.number().int().gte(0).lt(65536).parse(val), }, tool: { kind: "parsed", brief: "Specify tools to mount on the server", optional: true, variadic: true, parse: (value) => { return z.string().parse(value); }, }, ...(scopes_js_1.mcpScopes.length ? { scope: { kind: "enum", brief: "Mount tools/resources that match given scope (repeatable flag)", values: scopes_js_1.mcpScopes, variadic: true, optional: true, }, } : {}), "api-key-auth": { kind: "parsed", brief: "Sets the apiKeyAuth auth field for the API", optional: true, parse: (value) => { return z.string().parse(value); }, }, "server-url": { kind: "parsed", brief: "Overrides the default server URL used by the SDK", optional: true, parse: (value) => new URL(value).toString(), }, server: { kind: "enum", brief: "Selects a predefined server used by the SDK", optional: true, values: Object.keys(config_js_1.ServerList), }, "log-level": { kind: "enum", brief: "The log level to use for the server", default: "info", values: console_logger_js_1.consoleLoggerLevels, }, env: { kind: "parsed", brief: "Environment variables made available to the server", optional: true, variadic: true, parse: (val) => { const sepIdx = val.indexOf("="); if (sepIdx === -1) { throw new Error("Invalid environment variable format"); } const key = val.slice(0, sepIdx); const value = val.slice(sepIdx + 1); return [ z.string().nonempty({ message: "Environment variable key must be a non-empty string", }).parse(key), z.string().nonempty({ message: "Environment variable value must be a non-empty string", }).parse(value), ]; }, }, }, }, docs: { brief: "Run the Model Context Protocol server", }, }); //# sourceMappingURL=command.js.map