Skip to content

Commit 2ad52a6

Browse files
committed
chore: add clarifications
1 parent e42a448 commit 2ad52a6

File tree

1 file changed

+13
-4
lines changed

1 file changed

+13
-4
lines changed

src/common/config.ts

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -216,9 +216,19 @@ export const UserConfigSchema = z.object({
216216
.default("enabled")
217217
.describe("When set to disabled, disables telemetry collection."),
218218
transport: z.enum(["stdio", "http"]).default("stdio").describe("Either 'stdio' or 'http'."),
219-
httpPort: z.number().default(3000).describe("Port number."),
220-
httpHost: z.string().default("127.0.0.1").describe("Host to bind the http server."),
221-
httpHeaders: z.record(z.string()).describe("HTTP headers to pass to the http server."),
219+
httpPort: z
220+
.number()
221+
.default(3000)
222+
.describe("Port number for the HTTP server (only used when transport is 'http')."),
223+
httpHost: z
224+
.string()
225+
.default("127.0.0.1")
226+
.describe("Host address to bind the HTTP server to (only used when transport is 'http')."),
227+
httpHeaders: z
228+
.record(z.string())
229+
.describe(
230+
"Custom HTTP headers to include in responses from the HTTP server (only used when transport is 'http'). Useful for adding CORS headers, authentication tokens, or other custom headers required by your client application."
231+
),
222232
idleTimeoutMs: z
223233
.number()
224234
.default(600_000)
@@ -268,7 +278,6 @@ export const UserConfigSchema = z.object({
268278
.describe("Default similarity function for vector search: 'euclidean', 'cosine', or 'dotProduct'."),
269279
});
270280

271-
// Export UserConfig type derived from the Zod schema
272281
export type UserConfig = z.infer<typeof UserConfigSchema> & CliOptions;
273282

274283
export const defaultUserConfig: UserConfig = {

0 commit comments

Comments
 (0)