@bike4mind/cli 0.9.2 → 0.9.3

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.
@@ -12,7 +12,7 @@ import timezone from "dayjs/plugin/timezone.js";
12
12
  import utc from "dayjs/plugin/utc.js";
13
13
  import relativeTime from "dayjs/plugin/relativeTime.js";
14
14
  import localizedFormat from "dayjs/plugin/localizedFormat.js";
15
- import fs from "fs/promises";
15
+ import fs$1 from "fs/promises";
16
16
  //#region ../../b4m-core/common/dist/types/entities/UserTypes.mjs
17
17
  let CollectionType = /* @__PURE__ */ function(CollectionType) {
18
18
  CollectionType["NOTEBOOK"] = "notebook";
@@ -22,7 +22,143 @@ let CollectionType = /* @__PURE__ */ function(CollectionType) {
22
22
  return CollectionType;
23
23
  }({});
24
24
  //#endregion
25
+ //#region ../../b4m-core/common/dist/api-d6gSEqLB.mjs
26
+ const extractSnippetMeta = (content) => {
27
+ const snippetRegex = /<!--snippet-meta\s*(\{[\s\S]*?\})\s*-->[\n\s]*([\s\S]*?)(?=<!--snippet-meta|$)/g;
28
+ const sections = [];
29
+ let lastIndex = 0;
30
+ let match;
31
+ while ((match = snippetRegex.exec(content)) !== null) {
32
+ if (match.index > lastIndex) {
33
+ const textBefore = content.slice(lastIndex, match.index).trim();
34
+ if (textBefore) sections.push({
35
+ type: "text",
36
+ content: textBefore
37
+ });
38
+ }
39
+ try {
40
+ const meta = JSON.parse(match[1]);
41
+ const snippetContent = match[2].trim();
42
+ if (meta && snippetContent) sections.push({
43
+ type: "snippet",
44
+ meta,
45
+ content: snippetContent
46
+ });
47
+ } catch (e) {
48
+ console.error("Error parsing snippet meta:", e);
49
+ }
50
+ lastIndex = match.index + match[0].length;
51
+ }
52
+ if (lastIndex < content.length) {
53
+ const remainingText = content.slice(lastIndex).trim();
54
+ if (remainingText) sections.push({
55
+ type: "text",
56
+ content: remainingText
57
+ });
58
+ }
59
+ return { sections };
60
+ };
61
+ function getHeader(headers, name) {
62
+ if (!headers || typeof headers !== "object") return null;
63
+ if (typeof headers.get === "function") {
64
+ const val = headers.get(name);
65
+ return typeof val === "string" ? val : null;
66
+ }
67
+ const value = headers[name] ?? headers[name.toLowerCase()];
68
+ return typeof value === "string" ? value : null;
69
+ }
70
+ function parseNumber(value) {
71
+ if (value === null || value === void 0) return null;
72
+ const num = Number(value);
73
+ return Number.isFinite(num) ? num : null;
74
+ }
75
+ /**
76
+ * Parse rate limit headers from an HTTP response.
77
+ *
78
+ * Reads standard headers:
79
+ * - `X-RateLimit-Limit` — max requests per window
80
+ * - `X-RateLimit-Remaining` — requests left
81
+ * - `X-RateLimit-Reset` — Unix epoch seconds when the window resets
82
+ * - `Retry-After` — seconds to wait (on 429 responses), or an HTTP-date
83
+ */
84
+ function parseRateLimitHeaders(headers) {
85
+ const limitStr = getHeader(headers, "X-RateLimit-Limit") ?? getHeader(headers, "x-ratelimit-limit");
86
+ const remainingStr = getHeader(headers, "X-RateLimit-Remaining") ?? getHeader(headers, "x-ratelimit-remaining");
87
+ const resetStr = getHeader(headers, "X-RateLimit-Reset") ?? getHeader(headers, "x-ratelimit-reset");
88
+ const retryAfterStr = getHeader(headers, "Retry-After") ?? getHeader(headers, "retry-after");
89
+ const limit = parseNumber(limitStr);
90
+ const remaining = parseNumber(remainingStr);
91
+ let resetAt = null;
92
+ if (resetStr !== null) {
93
+ const resetNum = Number(resetStr);
94
+ if (Number.isFinite(resetNum)) resetAt = /* @__PURE__ */ new Date(resetNum * 1e3);
95
+ else {
96
+ const parsed = new Date(resetStr);
97
+ if (!isNaN(parsed.getTime())) resetAt = parsed;
98
+ }
99
+ }
100
+ let retryAfterMs = null;
101
+ if (retryAfterStr !== null) {
102
+ const retryNum = Number(retryAfterStr);
103
+ if (Number.isFinite(retryNum)) retryAfterMs = retryNum * 1e3;
104
+ else {
105
+ const parsed = new Date(retryAfterStr);
106
+ if (!isNaN(parsed.getTime())) retryAfterMs = Math.max(0, parsed.getTime() - Date.now());
107
+ }
108
+ }
109
+ let usagePercent = null;
110
+ if (limit !== null && limit > 0 && remaining !== null && remaining >= 0) usagePercent = Math.round((limit - remaining) / limit * 100);
111
+ return {
112
+ limit,
113
+ remaining,
114
+ resetAt,
115
+ retryAfterMs,
116
+ usagePercent
117
+ };
118
+ }
119
+ /**
120
+ * Check whether the current rate limit usage is near the threshold.
121
+ *
122
+ * @param info - Parsed rate limit info
123
+ * @param thresholdPercent - Usage percentage threshold (default: 80)
124
+ * @returns true if usage is at or above the threshold
125
+ */
126
+ function isNearLimit(info, thresholdPercent = 80) {
127
+ if (info.usagePercent === null) return false;
128
+ return info.usagePercent >= thresholdPercent;
129
+ }
130
+ /**
131
+ * Build a structured log object for rate limit events.
132
+ * Used by all integration clients to emit consistent log lines.
133
+ */
134
+ function buildRateLimitLogEntry(integration, endpoint, info, wasThrottled = false) {
135
+ return {
136
+ type: wasThrottled ? "RATE_LIMIT_ERROR" : "RATE_LIMIT",
137
+ integration,
138
+ endpoint,
139
+ limit: info.limit,
140
+ remaining: info.remaining,
141
+ resetAt: info.resetAt?.toISOString() ?? null,
142
+ retryAfterMs: info.retryAfterMs,
143
+ usagePercent: info.usagePercent,
144
+ wasThrottled,
145
+ timestamp: (/* @__PURE__ */ new Date()).toISOString()
146
+ };
147
+ }
148
+ //#endregion
25
149
  //#region ../../b4m-core/common/dist/index.mjs
150
+ let HttpStatus = /* @__PURE__ */ function(HttpStatus) {
151
+ HttpStatus[HttpStatus["Ok"] = 200] = "Ok";
152
+ HttpStatus[HttpStatus["Created"] = 201] = "Created";
153
+ HttpStatus[HttpStatus["BadRequest"] = 400] = "BadRequest";
154
+ HttpStatus[HttpStatus["Unauthorized"] = 401] = "Unauthorized";
155
+ HttpStatus[HttpStatus["Forbidden"] = 403] = "Forbidden";
156
+ HttpStatus[HttpStatus["NotFound"] = 404] = "NotFound";
157
+ HttpStatus[HttpStatus["UnprocessableEntity"] = 422] = "UnprocessableEntity";
158
+ HttpStatus[HttpStatus["TooManyRequests"] = 429] = "TooManyRequests";
159
+ HttpStatus[HttpStatus["InternalServerError"] = 500] = "InternalServerError";
160
+ return HttpStatus;
161
+ }({});
26
162
  var HTTPError = class extends Error {
27
163
  constructor(statusCode, message, additionalInfo) {
28
164
  super(message);
@@ -52,6 +188,42 @@ var UnprocessableEntityError = class extends HTTPError {
52
188
  this.name = "UnprocessableEntityError";
53
189
  }
54
190
  };
191
+ var BadRequestError = class extends HTTPError {
192
+ constructor(message, additionalInfo) {
193
+ super(400, message, additionalInfo);
194
+ this.additionalInfo = additionalInfo;
195
+ this.name = "BadRequestError";
196
+ }
197
+ };
198
+ var UnauthorizedError = class extends HTTPError {
199
+ constructor(message, additionalInfo) {
200
+ super(401, message, additionalInfo);
201
+ this.additionalInfo = additionalInfo;
202
+ this.name = "UnauthorizedError";
203
+ }
204
+ };
205
+ var ForbiddenError = class extends HTTPError {
206
+ constructor(message, additionalInfo) {
207
+ super(403, message, additionalInfo);
208
+ this.additionalInfo = additionalInfo;
209
+ this.name = "ForbiddenError";
210
+ }
211
+ };
212
+ var TooManyRequestsError = class extends HTTPError {
213
+ constructor(message, additionalInfo) {
214
+ super(429, message, additionalInfo);
215
+ this.additionalInfo = additionalInfo;
216
+ this.name = "TooManyRequestsError";
217
+ }
218
+ };
219
+ var CorruptedFileError = class extends HTTPError {
220
+ constructor(fileName, fileType, corruptionDetails, additionalInfo) {
221
+ const message = `File '${fileName}' (${fileType}) appears to be corrupted${corruptionDetails ? `: ${corruptionDetails}` : ""}. Please try uploading the file again.`;
222
+ super(422, message, additionalInfo);
223
+ this.additionalInfo = additionalInfo;
224
+ this.name = "CorruptedFileError";
225
+ }
226
+ };
55
227
  function isZodError(err) {
56
228
  return Boolean(err && (err instanceof ZodError || err.name === "ZodError"));
57
229
  }
@@ -247,6 +419,24 @@ const FIXED_TEMPERATURE_MODELS = new Set([
247
419
  "gpt-5.5"
248
420
  ]);
249
421
  /**
422
+ * Models that do not accept the temperature parameter at all.
423
+ * The API will reject requests that include temperature for these models.
424
+ */
425
+ const NO_TEMPERATURE_MODELS = new Set(["claude-opus-4-7", "global.anthropic.claude-opus-4-7"]);
426
+ /**
427
+ * Bedrock-hosted Claude models that do NOT support prompt caching (`cache_control`).
428
+ * Sending `cache_control` to these models triggers a Bedrock deserialization error:
429
+ * `tools.N.cache_control: Extra inputs are not permitted`
430
+ *
431
+ * AWS Bedrock added prompt caching for Claude 3.5 Haiku and Claude 3.7 Sonnet (and later);
432
+ * the OG Claude 3 Haiku and the v1 Claude 3.5 Sonnet were not retrofitted.
433
+ *
434
+ * Keep this set narrow — default behavior is to apply caching when `cacheStrategy.enableCaching`
435
+ * is true. Add a model here only when we have concrete evidence (a Bedrock validation error)
436
+ * that it rejects `cache_control`.
437
+ */
438
+ const BEDROCK_NO_PROMPT_CACHING_MODELS = new Set(["anthropic.claude-3-haiku-20240307-v1:0", "anthropic.claude-3-5-sonnet-20240620-v1:0"]);
439
+ /**
250
440
  * Speech to Text Models
251
441
  *
252
442
  */
@@ -291,6 +481,13 @@ z.enum({
291
481
  ...SpeechToTextModels,
292
482
  ...VideoModels
293
483
  });
484
+ /** Returns true if the model is deprecated on or before the provided date (default: now). */
485
+ const isModelDeprecated = (model, now = /* @__PURE__ */ new Date()) => {
486
+ if (!model.deprecationDate) return false;
487
+ const todayYMD = new Date(now.toISOString().slice(0, 10));
488
+ const cutoff = /* @__PURE__ */ new Date(model.deprecationDate + "T00:00:00Z");
489
+ return todayYMD.getTime() >= cutoff.getTime();
490
+ };
294
491
  z$1.enum([
295
492
  "openai",
296
493
  "test",
@@ -699,6 +896,18 @@ z.object({
699
896
  content: z.string(),
700
897
  metadata: ArtifactMetadataSchema.optional()
701
898
  });
899
+ const ClaudeArtifactMimeTypes = {
900
+ REACT: "application/vnd.ant.react",
901
+ HTML: "text/html",
902
+ SVG: "image/svg+xml",
903
+ MERMAID: "application/vnd.ant.mermaid",
904
+ RECHARTS: "application/vnd.ant.recharts",
905
+ CHESS: "application/vnd.ant.chess",
906
+ CODE: "application/vnd.ant.code",
907
+ MARKDOWN: "text/markdown",
908
+ LATTICE: "application/vnd.b4m.lattice",
909
+ PYTHON: "application/vnd.ant.python"
910
+ };
702
911
  let KnowledgeType = /* @__PURE__ */ function(KnowledgeType) {
703
912
  /**
704
913
  * A knowledge that is from a URL.
@@ -851,7 +1060,13 @@ const GenericCreditAddTransaction = BaseCreditTransaction.extend({
851
1060
  /**
852
1061
  * Optional reason/source for the transaction (e.g., 'admin_grant', 'refund', 'adjustment', 'legacy_purchase')
853
1062
  */
854
- reason: z.string().optional()
1063
+ reason: z.string().optional(),
1064
+ /**
1065
+ * Idempotency key — unique sparse index in the DB prevents duplicate credits on SQS retry.
1066
+ * Use deterministic keys like `completion-refund:${qWorkRunId}` or `failed-refund:${qWorkRunId}`.
1067
+ * E11000 on this field = already processed (not an error).
1068
+ */
1069
+ transactionId: z.string().optional()
855
1070
  });
856
1071
  /**
857
1072
  * Generic credit deduction transaction for legacy data and flexible use cases
@@ -2338,6 +2553,151 @@ const SessionCreatedAction = shareableDocumentSchema.extend({
2338
2553
  createdAt: z.date(),
2339
2554
  updatedAt: z.date()
2340
2555
  });
2556
+ /**
2557
+ * ========================================
2558
+ * Agent Execution (Phase 3 — #8008)
2559
+ * ========================================
2560
+ *
2561
+ * Server→client events streamed during a ReAct agent execution. The
2562
+ * matching server emitters live in `apps/client/server/queueHandlers/
2563
+ * agentExecutor.ts` and `apps/client/server/websocket/agentExecute.ts`.
2564
+ *
2565
+ * Client→server `agent_execute` commands are validated server-side by
2566
+ * the Zod schemas in `agentExecute.ts`; this file only models the
2567
+ * inbound (client-bound) side so `subscribeToAction` can be typed.
2568
+ */
2569
+ const AgentStepSchema = z.object({
2570
+ type: z.enum([
2571
+ "thought",
2572
+ "action",
2573
+ "observation",
2574
+ "final_answer"
2575
+ ]),
2576
+ content: z.string(),
2577
+ metadata: z.object({
2578
+ toolName: z.string().optional(),
2579
+ toolInput: z.unknown().optional(),
2580
+ timestamp: z.number(),
2581
+ tokenUsage: z.object({
2582
+ prompt: z.number(),
2583
+ completion: z.number(),
2584
+ total: z.number()
2585
+ }).optional(),
2586
+ confidence: z.number().optional(),
2587
+ confidenceSource: z.enum([
2588
+ "deterministic",
2589
+ "llm_self_report",
2590
+ "heuristic",
2591
+ "default"
2592
+ ]).optional()
2593
+ }).optional()
2594
+ });
2595
+ const ExecutionStartedAction = z.object({
2596
+ action: z.literal("execution_started"),
2597
+ executionId: z.string()
2598
+ });
2599
+ const IterationStepAction = z.object({
2600
+ action: z.literal("iteration_step"),
2601
+ executionId: z.string(),
2602
+ iteration: z.number(),
2603
+ step: AgentStepSchema,
2604
+ isComplete: z.boolean()
2605
+ });
2606
+ /**
2607
+ * `progress` is emitted both for status transitions (`status` set) and for
2608
+ * per-iteration credit deduction (`creditsUsed` + `iteration` set). One
2609
+ * permissive shape; consumers branch on which fields are present.
2610
+ */
2611
+ const AgentProgressAction = z.object({
2612
+ action: z.literal("progress"),
2613
+ executionId: z.string(),
2614
+ status: z.string().optional(),
2615
+ creditsUsed: z.number().optional(),
2616
+ iteration: z.number().optional()
2617
+ });
2618
+ const AgentCompletedAction = z.object({
2619
+ action: z.literal("completed"),
2620
+ executionId: z.string(),
2621
+ answer: z.string().optional(),
2622
+ totalIterations: z.number(),
2623
+ totalCreditsUsed: z.number()
2624
+ });
2625
+ const AgentFailedAction = z.object({
2626
+ action: z.literal("failed"),
2627
+ executionId: z.string(),
2628
+ reason: z.string(),
2629
+ message: z.string().optional(),
2630
+ toolName: z.string().optional()
2631
+ });
2632
+ const AgentResumedAction = z.object({
2633
+ action: z.literal("resumed"),
2634
+ executionId: z.string(),
2635
+ invocationCount: z.number().optional(),
2636
+ reason: z.string().optional()
2637
+ });
2638
+ const AgentErrorAction = z.object({
2639
+ action: z.literal("agent_error"),
2640
+ message: z.string(),
2641
+ executionId: z.string().optional()
2642
+ });
2643
+ const AbortAcknowledgedAction = z.object({
2644
+ action: z.literal("abort_acknowledged"),
2645
+ executionId: z.string()
2646
+ });
2647
+ const SubagentStartedAction = z.object({
2648
+ action: z.literal("subagent_started"),
2649
+ executionId: z.string(),
2650
+ childExecutionId: z.string(),
2651
+ agentName: z.string(),
2652
+ model: z.string().optional(),
2653
+ thoroughness: z.string().optional(),
2654
+ maxIterations: z.number().optional()
2655
+ });
2656
+ const SubagentIterationStepAction = z.object({
2657
+ action: z.literal("subagent_iteration_step"),
2658
+ executionId: z.string(),
2659
+ childExecutionId: z.string(),
2660
+ agentName: z.string(),
2661
+ iteration: z.number(),
2662
+ step: AgentStepSchema
2663
+ });
2664
+ const SubagentCompletedAction = z.object({
2665
+ action: z.literal("subagent_completed"),
2666
+ executionId: z.string(),
2667
+ childExecutionId: z.string(),
2668
+ agentName: z.string(),
2669
+ totalCredits: z.number(),
2670
+ iterations: z.number(),
2671
+ finalAnswer: z.string().optional()
2672
+ });
2673
+ const SubagentFailedAction = z.object({
2674
+ action: z.literal("subagent_failed"),
2675
+ executionId: z.string(),
2676
+ childExecutionId: z.string(),
2677
+ error: z.string(),
2678
+ isTimeout: z.boolean().optional(),
2679
+ partialAnswer: z.string().optional()
2680
+ });
2681
+ const PermissionRequestAction = z.object({
2682
+ action: z.literal("permission_request"),
2683
+ executionId: z.string(),
2684
+ toolName: z.string(),
2685
+ toolInput: z.unknown(),
2686
+ iteration: z.number()
2687
+ });
2688
+ const ReconnectResultAction = z.object({
2689
+ action: z.literal("reconnect_result"),
2690
+ found: z.boolean(),
2691
+ executionId: z.string().optional(),
2692
+ status: z.string().optional(),
2693
+ pendingPermission: z.object({
2694
+ toolName: z.string(),
2695
+ toolInput: z.unknown(),
2696
+ requestedAt: z.union([z.string(), z.date()])
2697
+ }).optional(),
2698
+ totalCreditsUsed: z.number().optional(),
2699
+ iterationCount: z.number().optional()
2700
+ });
2341
2701
  z.discriminatedUnion("action", [
2342
2702
  DataSubscribeRequestAction,
2343
2703
  DataUnsubscribeRequestAction,
@@ -2354,6 +2714,12 @@ z.discriminatedUnion("action", [
2354
2714
  CcAgentEventAction,
2355
2715
  CcAgentDisconnectAction
2356
2716
  ]);
2717
+ /** Server → Client: quantum run status update (Qwork completion/failure/cancellation) */
2718
+ const QuantumRunUpdatedAction = z.object({
2719
+ action: z.literal("quantum_run_updated"),
2720
+ runId: z.string(),
2721
+ status: z.string()
2722
+ });
2357
2723
  z.discriminatedUnion("action", [
2358
2724
  DataSubscriptionUpdateAction,
2359
2725
  InboxRefetchAction,
@@ -2391,7 +2757,22 @@ z.discriminatedUnion("action", [
2391
2757
  TavernStockUpdateAction,
2392
2758
  JupyterNotebookProgressAction,
2393
2759
  DataLakeBatchProgressAction,
2394
- CcAgentCommandAction
2760
+ CcAgentCommandAction,
2761
+ QuantumRunUpdatedAction,
2762
+ ExecutionStartedAction,
2763
+ IterationStepAction,
2764
+ AgentProgressAction,
2765
+ AgentCompletedAction,
2766
+ AgentFailedAction,
2767
+ AgentResumedAction,
2768
+ AgentErrorAction,
2769
+ AbortAcknowledgedAction,
2770
+ SubagentStartedAction,
2771
+ SubagentIterationStepAction,
2772
+ SubagentCompletedAction,
2773
+ SubagentFailedAction,
2774
+ PermissionRequestAction,
2775
+ ReconnectResultAction
2395
2776
  ]);
2396
2777
  /**
2397
2778
  * Tool schema matching ICompletionOptionTools.toolSchema. The Zod surface only
@@ -2447,6 +2828,7 @@ const CompletionMessageSchema = z.object({
2447
2828
  z.object({
2448
2829
  model: z.string(),
2449
2830
  messages: z.array(CompletionMessageSchema),
2831
+ response_format: ResponseFormatSchema.optional(),
2450
2832
  options: z.object({
2451
2833
  temperature: z.number().optional(),
2452
2834
  maxTokens: z.number().optional(),
@@ -3243,6 +3625,7 @@ z.enum([
3243
3625
  "voyageApiKey",
3244
3626
  "FirecrawlApiKey",
3245
3627
  "EnableDeepResearch",
3628
+ "EnableDeepResearchDefault",
3246
3629
  "EnableKnowledgeBaseSearch",
3247
3630
  "DefaultChunkSize",
3248
3631
  "DefaultAPIModel",
@@ -3250,14 +3633,22 @@ z.enum([
3250
3633
  "FormatPromptTemplate",
3251
3634
  "UseFormatPrompt",
3252
3635
  "EnableQuestMaster",
3636
+ "EnableQuestMasterDefault",
3253
3637
  "EnableMementos",
3638
+ "EnableMementosDefault",
3254
3639
  "EnableArtifacts",
3640
+ "EnableArtifactsDefault",
3255
3641
  "EnableAgents",
3642
+ "EnableAgentsDefault",
3256
3643
  "EnableRapidReply",
3644
+ "EnableRapidReplyDefault",
3257
3645
  "EnableLattice",
3646
+ "EnableLatticeDefault",
3258
3647
  "RapidReplySettings",
3259
3648
  "EnableResearchEngine",
3649
+ "EnableResearchEngineDefault",
3260
3650
  "EnableOllama",
3651
+ "EnableOllamaDefault",
3261
3652
  "ollamaBackend",
3262
3653
  "MementoMaxTotalChars",
3263
3654
  "UseImagePrompt",
@@ -3360,12 +3751,15 @@ z.enum([
3360
3751
  "EnableParallelToolExecution",
3361
3752
  "EnableHelpChat",
3362
3753
  "EnableBmPi",
3754
+ "EnableBmPiDefault",
3363
3755
  "EnableBmPiJira",
3364
3756
  "EnableQuantumCanvasser",
3757
+ "EnableQuantumCanvasserDefault",
3365
3758
  "EnableContextTelemetry",
3366
3759
  "contextTelemetryAlerts",
3367
3760
  "sreAgentConfig",
3368
- "secopsTriageConfig"
3761
+ "secopsTriageConfig",
3762
+ "overwatchRollupSync"
3369
3763
  ]);
3370
3764
  function makeStringSetting(config) {
3371
3765
  return {
@@ -4192,100 +4586,152 @@ const API_SERVICE_GROUPS = {
4192
4586
  icon: "Science",
4193
4587
  settings: [
4194
4588
  {
4195
- key: "EnableQuestMaster",
4196
- order: 1
4589
+ key: "EnableAgents",
4590
+ order: 10
4197
4591
  },
4198
4592
  {
4199
- key: "EnableMementos",
4200
- order: 2
4593
+ key: "EnableAgentsDefault",
4594
+ order: 11
4201
4595
  },
4202
4596
  {
4203
- key: "MementoMaxTotalChars",
4204
- order: 3
4597
+ key: "enableAgentProactiveMessages",
4598
+ order: 12
4205
4599
  },
4206
4600
  {
4207
4601
  key: "EnableArtifacts",
4208
- order: 4
4602
+ order: 20
4209
4603
  },
4210
4604
  {
4211
- key: "EnableAgents",
4212
- order: 5
4605
+ key: "EnableArtifactsDefault",
4606
+ order: 21
4213
4607
  },
4214
4608
  {
4215
- key: "enableAgentProactiveMessages",
4216
- order: 6
4609
+ key: "EnableBmPi",
4610
+ order: 30
4217
4611
  },
4218
4612
  {
4219
- key: "EnableRapidReply",
4220
- order: 7
4613
+ key: "EnableBmPiDefault",
4614
+ order: 31
4221
4615
  },
4222
4616
  {
4223
- key: "EnableResearchEngine",
4224
- order: 8
4617
+ key: "EnableBmPiJira",
4618
+ order: 32
4225
4619
  },
4226
4620
  {
4227
- key: "EnableReactViewer",
4228
- order: 9
4621
+ key: "EnableDeepResearch",
4622
+ order: 40
4229
4623
  },
4230
4624
  {
4231
- key: "EnableDeepResearch",
4232
- order: 10
4625
+ key: "EnableDeepResearchDefault",
4626
+ order: 41
4233
4627
  },
4234
4628
  {
4235
4629
  key: "EnableLattice",
4236
- order: 11
4630
+ order: 50
4237
4631
  },
4238
4632
  {
4239
- key: "EnableKnowledgeBaseSearch",
4240
- order: 12
4633
+ key: "EnableLatticeDefault",
4634
+ order: 51
4241
4635
  },
4242
4636
  {
4243
- key: "EnableStreamIdleTimeout",
4244
- order: 13
4637
+ key: "EnableMementos",
4638
+ order: 60
4245
4639
  },
4246
4640
  {
4247
- key: "StreamIdleTimeoutSeconds",
4248
- order: 14
4641
+ key: "EnableMementosDefault",
4642
+ order: 61
4249
4643
  },
4250
4644
  {
4251
- key: "EnableMcpToolFiltering",
4252
- order: 15
4645
+ key: "MementoMaxTotalChars",
4646
+ order: 62
4253
4647
  },
4254
4648
  {
4255
- key: "McpToolFilteringMaxTools",
4256
- order: 16
4649
+ key: "EnableOllama",
4650
+ order: 70
4257
4651
  },
4258
4652
  {
4259
- key: "EnableParallelToolExecution",
4260
- order: 17
4653
+ key: "EnableOllamaDefault",
4654
+ order: 71
4655
+ },
4656
+ {
4657
+ key: "ollamaBackend",
4658
+ order: 72
4659
+ },
4660
+ {
4661
+ key: "EnableQuantumCanvasser",
4662
+ order: 80
4663
+ },
4664
+ {
4665
+ key: "EnableQuantumCanvasserDefault",
4666
+ order: 81
4667
+ },
4668
+ {
4669
+ key: "EnableQuestMaster",
4670
+ order: 90
4671
+ },
4672
+ {
4673
+ key: "EnableQuestMasterDefault",
4674
+ order: 91
4675
+ },
4676
+ {
4677
+ key: "EnableRapidReply",
4678
+ order: 100
4679
+ },
4680
+ {
4681
+ key: "EnableRapidReplyDefault",
4682
+ order: 101
4683
+ },
4684
+ {
4685
+ key: "EnableResearchEngine",
4686
+ order: 110
4687
+ },
4688
+ {
4689
+ key: "EnableResearchEngineDefault",
4690
+ order: 111
4261
4691
  },
4262
4692
  {
4263
4693
  key: "EnableHelpChat",
4264
- order: 18
4694
+ order: 200
4265
4695
  },
4266
4696
  {
4267
- key: "EnableBmPi",
4268
- order: 19
4697
+ key: "EnableKnowledgeBaseSearch",
4698
+ order: 210
4269
4699
  },
4270
4700
  {
4271
- key: "EnableBmPiJira",
4272
- order: 20
4701
+ key: "EnableMcpToolFiltering",
4702
+ order: 220
4273
4703
  },
4274
4704
  {
4275
- key: "EnableQuantumCanvasser",
4276
- order: 21
4705
+ key: "McpToolFilteringMaxTools",
4706
+ order: 221
4707
+ },
4708
+ {
4709
+ key: "EnableParallelToolExecution",
4710
+ order: 230
4711
+ },
4712
+ {
4713
+ key: "EnableReactViewer",
4714
+ order: 240
4715
+ },
4716
+ {
4717
+ key: "EnableStreamIdleTimeout",
4718
+ order: 250
4719
+ },
4720
+ {
4721
+ key: "StreamIdleTimeoutSeconds",
4722
+ order: 251
4277
4723
  },
4278
4724
  {
4279
4725
  key: "EnableFmpFinancialData",
4280
- order: 22
4726
+ order: 260
4281
4727
  },
4282
4728
  {
4283
4729
  key: "EnablePotionQuest",
4284
- order: 23
4730
+ order: 270
4285
4731
  },
4286
4732
  {
4287
4733
  key: "EnableTavernQuestBoardContext",
4288
- order: 24
4734
+ order: 280
4289
4735
  }
4290
4736
  ]
4291
4737
  },
@@ -4491,1137 +4937,1400 @@ const API_SERVICE_GROUPS = {
4491
4937
  ]
4492
4938
  }
4493
4939
  };
4494
- makeStringSetting({
4495
- key: "DefaultAPIModel",
4496
- name: "Default API Model",
4497
- defaultValue: "gpt-5",
4498
- description: "The default AI model to use for API requests when no model is specified.",
4499
- options: CHAT_MODELS,
4500
- category: "AI",
4501
- order: 1
4502
- }), makeStringSetting({
4503
- key: "openaiDemoKey",
4504
- name: "OpenAI API Key",
4505
- defaultValue: "",
4506
- description: "The global API Key for OpenAI.",
4507
- isSensitive: true,
4508
- category: "AI",
4509
- group: API_SERVICE_GROUPS.OPENAI.id,
4510
- order: 1
4511
- }), makeStringSetting({
4512
- key: "xaiApiKey",
4513
- name: "xAI API Key",
4514
- defaultValue: "",
4515
- description: "The global API Key for xAI.",
4516
- isSensitive: true,
4517
- category: "AI",
4518
- group: API_SERVICE_GROUPS.XAI.id,
4519
- order: 1
4520
- }), makeStringSetting({
4521
- key: "voyageApiKey",
4522
- name: "Voyage API Key",
4523
- defaultValue: "",
4524
- description: "The global API Key for Voyage AI.",
4525
- isSensitive: true,
4526
- category: "AI",
4527
- group: API_SERVICE_GROUPS.VOYAGE.id,
4528
- order: 1
4529
- }), makeStringSetting({
4530
- key: "anthropicDemoKey",
4531
- name: "Anthropic API Key",
4532
- defaultValue: "",
4533
- description: "The global API Key for Anthropic.",
4534
- isSensitive: true,
4535
- category: "AI",
4536
- group: API_SERVICE_GROUPS.ANTHROPIC.id,
4537
- order: 1
4538
- }), makeStringSetting({
4539
- key: "geminiDemoKey",
4540
- name: "Gemini API Key",
4541
- defaultValue: "",
4542
- description: "The global API Key for Gemini.",
4543
- isSensitive: true,
4544
- category: "AI",
4545
- group: API_SERVICE_GROUPS.GEMINI.id,
4546
- order: 1
4547
- }), makeNumberSetting({
4548
- key: "AutoNameNotebook",
4549
- name: "Auto Name Notebook",
4550
- defaultValue: 1,
4551
- description: "The number of previous prompts to use to name a notebook. Set to 0 to disable.",
4552
- category: "Notebooks",
4553
- group: API_SERVICE_GROUPS.NOTEBOOK.id,
4554
- order: 1
4555
- }), makeBooleanSetting({
4556
- key: "EnableQuestMaster",
4557
- name: "Enable Quest Master",
4558
- defaultValue: true,
4559
- description: "Whether to enable the Quest Master feature.",
4560
- category: "Experimental",
4561
- group: API_SERVICE_GROUPS.EXPERIMENTAL.id,
4562
- order: 1
4563
- }), makeBooleanSetting({
4564
- key: "EnableMementos",
4565
- name: "Enable Mementos",
4566
- defaultValue: false,
4567
- description: "Whether to enable the Memento feature.",
4568
- category: "Experimental",
4569
- group: API_SERVICE_GROUPS.EXPERIMENTAL.id,
4570
- order: 2
4571
- }), makeNumberSetting({
4572
- key: "MementoMaxTotalChars",
4573
- name: "Memento Max Total Chars",
4574
- defaultValue: 32e3,
4575
- description: "The maximum total number of characters for mementos.",
4576
- category: "Experimental",
4577
- group: API_SERVICE_GROUPS.EXPERIMENTAL.id,
4578
- order: 3
4579
- }), makeBooleanSetting({
4580
- key: "EnableArtifacts",
4581
- name: "Enable Artifacts",
4582
- defaultValue: true,
4583
- description: "Whether to enable the Artifacts feature.",
4584
- category: "Experimental",
4585
- group: API_SERVICE_GROUPS.EXPERIMENTAL.id,
4586
- order: 4
4587
- }), makeBooleanSetting({
4588
- key: "EnableAgents",
4589
- name: "Enable Agents",
4590
- defaultValue: true,
4591
- description: "Whether to enable the Agents feature for AI assistants with specialized capabilities.",
4592
- category: "Experimental",
4593
- group: API_SERVICE_GROUPS.EXPERIMENTAL.id,
4594
- order: 5
4595
- }), makeBooleanSetting({
4596
- key: "EnableRapidReply",
4597
- name: "Enable Rapid Reply",
4598
- defaultValue: true,
4599
- description: "Whether to enable the Rapid Reply feature that provides instant acknowledgments using fast mini models while processing full responses.",
4600
- category: "Experimental",
4601
- group: API_SERVICE_GROUPS.EXPERIMENTAL.id,
4602
- order: 6
4603
- }), makeBooleanSetting({
4604
- key: "EnableResearchEngine",
4605
- name: "Enable Research Engine",
4606
- defaultValue: true,
4607
- description: "Whether to enable the Research Engine feature.",
4608
- category: "Experimental",
4609
- group: API_SERVICE_GROUPS.EXPERIMENTAL.id,
4610
- order: 7
4611
- }), makeBooleanSetting({
4612
- key: "EnableReactViewer",
4613
- name: "Enable React Viewer",
4614
- defaultValue: true,
4615
- description: "Whether to enable the React component viewer with sandboxed execution. Required for viewing AI-generated React components.",
4616
- category: "Experimental",
4617
- group: API_SERVICE_GROUPS.EXPERIMENTAL.id,
4618
- order: 8
4619
- }), makeNumberSetting({
4620
- key: "DefaultChunkSize",
4621
- name: "Default Chunk Size",
4622
- defaultValue: 2100,
4623
- description: "The default chunk size for splitting large documents.",
4624
- category: "AI",
4625
- order: 3
4626
- }), makeBooleanSetting({
4627
- key: "ModerationEnabled",
4628
- name: "Moderation Enabled",
4629
- defaultValue: false,
4630
- description: "Whether to enable moderation for LLM prompts.",
4631
- category: "AI Moderation"
4632
- }), makeStringSetting({
4633
- key: "FormatPromptTemplate",
4634
- name: "Format Prompt Template",
4635
- defaultValue: "",
4636
- description: "The template to use for formatting prompts.",
4637
- category: "AI",
4638
- order: 4
4639
- }), makeBooleanSetting({
4640
- key: "UseFormatPrompt",
4641
- name: "Use Format Prompt",
4642
- defaultValue: false,
4643
- description: "Whether to use the format prompt template.",
4644
- category: "AI",
4645
- order: 5
4646
- }), makeBooleanSetting({
4647
- key: "UseImagePrompt",
4648
- name: "Use Image Prompt",
4649
- defaultValue: true,
4650
- description: "Whether to use image prompts.",
4651
- category: "AI",
4652
- order: 6
4653
- }), makeNumberSetting({
4654
- key: "pricePerCredit",
4655
- name: "Price Per Credit",
4656
- defaultValue: 50,
4657
- description: "The price per credit for purchasing credits.",
4658
- category: "Users",
4659
- group: API_SERVICE_GROUPS.CREDITS.id,
4660
- order: 1
4661
- }), makeStringSetting({
4662
- key: "tagLineMain",
4663
- name: "Tag Line Main",
4664
- defaultValue: "Bike4Mind",
4665
- description: "The main tag line to display on the app.",
4666
- category: "Branding",
4667
- group: API_SERVICE_GROUPS.BRANDING.id,
4668
- order: 1
4669
- }), makeStringSetting({
4670
- key: "tagLineSub",
4671
- name: "Tag Line Sub",
4672
- defaultValue: "",
4673
- description: "The sub tag line to display on the app.",
4674
- category: "Branding",
4675
- group: API_SERVICE_GROUPS.BRANDING.id,
4676
- order: 2
4677
- }), makeStringSetting({
4678
- key: "defaultTags",
4679
- name: "Default Tags",
4680
- defaultValue: "",
4681
- description: "The default tags to be applied to new users.",
4682
- category: "Users"
4683
- }), makeBooleanSetting({
4684
- key: "EnableReferralToSlack",
4685
- name: "Enable Referral to Slack",
4686
- defaultValue: false,
4687
- description: "Sends a notification to Slack when a referral is sent.",
4688
- category: "Referrals"
4689
- }), makeNumberSetting({
4690
- key: "ReferralCreditsAmount",
4691
- name: "Referal Credits Amount",
4692
- defaultValue: 1e4,
4693
- description: "Credits to give to the referred user.",
4694
- category: "Referrals"
4695
- }), makeBooleanSetting({
4696
- key: "EnableReferralToEmail",
4697
- name: "Enable Referral to Email",
4698
- defaultValue: true,
4699
- description: "Whether to enable referral to Email.",
4700
- category: "Referrals"
4701
- }), makeStringSetting({
4702
- key: "registrationLink",
4703
- name: "Registration Link",
4704
- defaultValue: "",
4705
- description: "The link to use for registration.",
4706
- category: "Users",
4707
- group: API_SERVICE_GROUPS.REGISTRATION.id,
4708
- order: 1
4709
- }), makeStringSetting({
4710
- key: "FeedbackReceiveEmail",
4711
- name: "Main Feedback Email",
4712
- defaultValue: "",
4713
- description: "The primary email to receive feedback.",
4714
- category: "Feedback",
4715
- group: API_SERVICE_GROUPS.FEEDBACK.id,
4716
- order: 9
4717
- }), makeStringSetting({
4718
- key: "FeedbackKyle",
4719
- name: "Kyle Feedback Email",
4720
- defaultValue: "",
4721
- description: "The email to receive feedback for Kyle.",
4722
- category: "Feedback",
4723
- group: API_SERVICE_GROUPS.FEEDBACK.id,
4724
- order: 11
4725
- }), makeBooleanSetting({
4726
- key: "EnableFeedBackToEmail",
4727
- name: "Enable Email Feedback",
4728
- defaultValue: false,
4729
- description: "Whether to enable feedback to Email.",
4730
- category: "Feedback",
4731
- group: API_SERVICE_GROUPS.FEEDBACK.id,
4732
- order: 1
4733
- }), makeBooleanSetting({
4734
- key: "EnableFeedBackToSlack",
4735
- name: "Enable Slack Feedback",
4736
- defaultValue: false,
4737
- description: "Whether to enable feedback to Slack.",
4738
- category: "Feedback",
4739
- group: API_SERVICE_GROUPS.FEEDBACK.id,
4740
- order: 2
4741
- }), makeStringSetting({
4742
- key: "SlackDefaultWebhookUrl",
4743
- name: "Default Slack Webhook URL",
4744
- defaultValue: "",
4745
- description: "The default webhook URL for sending notifications to Slack when a specific URL is not available.",
4746
- category: "Feedback",
4747
- group: API_SERVICE_GROUPS.FEEDBACK.id,
4748
- order: 3,
4749
- isSensitive: true
4750
- }), makeStringSetting({
4751
- key: "SlackGeneralWebhookUrl",
4752
- name: "General Channel Webhook URL",
4753
- defaultValue: "",
4754
- description: "The webhook URL for sending notifications to the #general Slack channel.",
4755
- category: "Feedback",
4756
- group: API_SERVICE_GROUPS.FEEDBACK.id,
4757
- order: 4,
4758
- isSensitive: true
4759
- }), makeStringSetting({
4760
- key: "SlackLiveopsWebhookUrl",
4761
- name: "LiveOps Channel Webhook URL",
4762
- defaultValue: "",
4763
- description: "The webhook URL for sending feedback and operations to the #bike4mind-liveops Slack channel.",
4764
- category: "Feedback",
4765
- group: API_SERVICE_GROUPS.FEEDBACK.id,
4766
- order: 5,
4767
- isSensitive: true
4768
- }), makeStringSetting({
4769
- key: "SlackUserActivityWebhookUrl",
4770
- name: "User Activity Channel Webhook URL",
4771
- defaultValue: "",
4772
- description: "The webhook URL for sending user activity reports to the #user-activity Slack channel.",
4773
- category: "Feedback",
4774
- group: API_SERVICE_GROUPS.FEEDBACK.id,
4775
- order: 6,
4776
- isSensitive: true
4777
- }), makeStringSetting({
4778
- key: "SlackFeedbackWebhookUrl",
4779
- name: "Feedback Channel Webhook URL",
4780
- defaultValue: "",
4781
- description: "The webhook URL for sending feedback to the #bike4mind-feedback Slack channel.",
4782
- category: "Feedback",
4783
- group: API_SERVICE_GROUPS.FEEDBACK.id,
4784
- order: 7,
4785
- isSensitive: true
4786
- }), makeStringSetting({
4787
- key: "liveFeedbackEmail",
4788
- name: "Live Feedback Email",
4789
- defaultValue: "",
4790
- description: "The email to receive live feedback.",
4791
- category: "Feedback",
4792
- group: API_SERVICE_GROUPS.FEEDBACK.id,
4793
- order: 10
4794
- }), makeStringSetting({
4795
- key: "feedbackErik",
4796
- name: "Erik Feedback Email",
4797
- defaultValue: "",
4798
- description: "The email to receive feedback for Erik.",
4799
- category: "Feedback",
4800
- group: API_SERVICE_GROUPS.FEEDBACK.id,
4801
- order: 12
4802
- }), makeStringSetting({
4803
- key: "kyleFeedback",
4804
- name: "Kyle Feedback (Alt)",
4805
- defaultValue: "",
4806
- description: "Alternative email to receive feedback for Kyle.",
4807
- category: "Feedback",
4808
- group: API_SERVICE_GROUPS.FEEDBACK.id,
4809
- order: 13
4810
- }), makeBooleanSetting({
4811
- key: "EnableUserDeletionEmailNotification",
4812
- name: "Enable User Deletion Email Notification",
4813
- defaultValue: false,
4814
- description: "Whether to enable user deletion email notification.",
4815
- category: "Users",
4816
- group: API_SERVICE_GROUPS.USER_MANAGEMENT.id,
4817
- order: 1
4818
- }), makeBooleanSetting({
4819
- key: "EnableUserDeletionSlackNotification",
4820
- name: "Enable User Deletion Slack Notification",
4821
- defaultValue: false,
4822
- description: "Whether to enable user deletion slack notification.",
4823
- category: "Users",
4824
- group: API_SERVICE_GROUPS.USER_MANAGEMENT.id,
4825
- order: 2
4826
- }), makeStringSetting({
4827
- key: "AdminEmail",
4828
- name: "Admin Email",
4829
- defaultValue: "",
4830
- description: "The email to receive admin notifications.",
4831
- category: "Admin",
4832
- group: API_SERVICE_GROUPS.ADMIN.id,
4833
- order: 2
4834
- }), makeNumberSetting({
4835
- key: "MaxFileSize",
4836
- name: "Max File Size",
4837
- defaultValue: 30,
4838
- description: "The maximum file size allowed for uploads in MB.",
4839
- category: "Knowledge",
4840
- group: API_SERVICE_GROUPS.KNOWLEDGE.id,
4841
- order: 1
4842
- }), makeNumberSetting({
4843
- key: "DefaultContext",
4844
- name: "Default Context Size",
4845
- defaultValue: 4096,
4846
- description: "The default context size for AI models.",
4847
- category: "AI",
4848
- order: 2
4849
- }), makeStringSetting({
4850
- key: "FeedbackSendEmailUsername",
4851
- name: "Sender Email Username",
4852
- defaultValue: "",
4853
- description: "The username for the email account used to send feedback.",
4854
- category: "Feedback",
4855
- group: API_SERVICE_GROUPS.FEEDBACK.id,
4856
- order: 7,
4857
- isSensitive: true
4858
- }), makeStringSetting({
4859
- key: "FeedbackSendEmailPassword",
4860
- name: "Sender Email Password",
4861
- defaultValue: "",
4862
- description: "The password for the email account used to send feedback.",
4863
- category: "Feedback",
4864
- group: API_SERVICE_GROUPS.FEEDBACK.id,
4865
- order: 8,
4866
- isSensitive: true
4867
- }), makeBooleanSetting({
4868
- key: "ScanURLinPrompt",
4869
- name: "Scan URL in Prompt",
4870
- defaultValue: true,
4871
- description: "Whether to scan and process URLs in user prompts.",
4872
- category: "AI",
4873
- order: 7
4874
- }), makeStringSetting({
4875
- key: "DefaultInviteCode",
4876
- name: "Default Invite Code",
4877
- defaultValue: "",
4878
- description: "The default invite code for new user registrations.",
4879
- category: "Users",
4880
- group: API_SERVICE_GROUPS.REGISTRATION.id,
4881
- order: 2
4882
- }), makeStringSetting({
4883
- key: "serverStatus",
4884
- name: "Server Status",
4885
- defaultValue: "live",
4886
- description: "The current status of the server.",
4887
- category: "Admin",
4888
- group: API_SERVICE_GROUPS.ADMIN.id,
4889
- order: 1,
4890
- options: Object.values(ServerStatusEnum)
4891
- }), makeNumberSetting({
4892
- key: "defaultSeats",
4893
- name: "Default Seats",
4894
- defaultValue: 20,
4895
- description: "The default number of seats for new organizations.",
4896
- category: "Users"
4897
- }), makeBooleanSetting({
4898
- key: "enableGoogleCalendar",
4899
- name: "Enable Google Calendar Integration",
4900
- defaultValue: false,
4901
- description: "Whether to enable scheduling of briefing/advisory using google calendar",
4902
- category: "Calendar",
4903
- group: API_SERVICE_GROUPS.CALENDAR.id,
4904
- order: 1
4905
- }), makeStringSetting({
4906
- key: "googleCalendarServiceAccountEmail",
4907
- name: "Service Account Email",
4908
- defaultValue: "",
4909
- description: "The service account email address that has access to google calendar API.",
4910
- category: "Calendar",
4911
- group: API_SERVICE_GROUPS.CALENDAR.id,
4912
- order: 2
4913
- }), makeStringSetting({
4914
- key: "googleCalendarServiceAccountSecret",
4915
- name: "Service Account Secret",
4916
- defaultValue: "",
4917
- description: "The base64 encoded service account secret that is associated with the service account email.",
4918
- category: "Calendar",
4919
- group: API_SERVICE_GROUPS.CALENDAR.id,
4920
- order: 3,
4921
- isSensitive: true
4922
- }), makeStringSetting({
4923
- key: "googleCalendarOrganizerEmail",
4924
- name: "Organizer Email",
4925
- defaultValue: "",
4926
- description: "The organizer email for creating events.",
4927
- category: "Calendar",
4928
- group: API_SERVICE_GROUPS.CALENDAR.id,
4929
- order: 4
4930
- }), makeBooleanSetting({
4931
- key: "enforceCredits",
4932
- name: "Enforce Credits",
4933
- defaultValue: true,
4934
- description: "Whether to enforce credits for users",
4935
- group: API_SERVICE_GROUPS.CREDITS.id,
4936
- category: "Users"
4937
- }), makeBooleanSetting({
4938
- key: "enableTeamPlan",
4939
- name: "Enable Team Plan",
4940
- defaultValue: false,
4941
- description: "Whether to enable team plans",
4942
- group: API_SERVICE_GROUPS.CREDITS.id,
4943
- category: "Users"
4944
- }), makeStringSetting({
4945
- key: "FacebookLink",
4946
- name: "Facebook Link",
4947
- defaultValue: void 0,
4948
- description: "The Facebook social media link.",
4949
- category: "Branding",
4950
- group: API_SERVICE_GROUPS.BRANDING.id,
4951
- order: 3
4952
- }), makeStringSetting({
4953
- key: "RedditLink",
4954
- name: "Reddit Link",
4955
- defaultValue: void 0,
4956
- description: "The Reddit social media link.",
4957
- category: "Branding",
4958
- group: API_SERVICE_GROUPS.BRANDING.id,
4959
- order: 7
4960
- }), makeStringSetting({
4961
- key: "InstagramLink",
4962
- name: "Instagram Link",
4963
- defaultValue: void 0,
4964
- description: "The Instagram social media link.",
4965
- category: "Branding",
4966
- group: API_SERVICE_GROUPS.BRANDING.id,
4967
- order: 5
4968
- }), makeStringSetting({
4969
- key: "YoutubeLink",
4970
- name: "Youtube Link",
4971
- defaultValue: void 0,
4972
- description: "The Youtube social media link.",
4973
- category: "Branding",
4974
- group: API_SERVICE_GROUPS.BRANDING.id,
4975
- order: 6
4976
- }), makeStringSetting({
4977
- key: "TwitterLink",
4978
- name: "Twitter Link",
4979
- defaultValue: void 0,
4980
- description: "The Twitter social media link.",
4981
- category: "Branding",
4982
- group: API_SERVICE_GROUPS.BRANDING.id,
4983
- order: 4
4984
- }), makeObjectSetting({
4985
- key: "logoSettings",
4986
- name: "Logo Settings",
4987
- defaultValue: {
4988
- customLogoUrl: "",
4989
- customDarkLogoUrl: "",
4990
- useBothLogos: false
4991
- },
4992
- description: "Logo configuration for light and dark modes.",
4993
- category: "Branding",
4994
- group: API_SERVICE_GROUPS.BRANDING.id,
4995
- order: 3,
4996
- schema: LogoSettingsSchema
4997
- }), makeBooleanSetting({
4998
- key: "CSMandCTAFlag",
4999
- name: "Toggle the CSM and CTA Display",
5000
- defaultValue: false,
5001
- description: "Toggle the Customer Success Manager and CTA Display",
5002
- category: "Users",
5003
- group: API_SERVICE_GROUPS.USER_MANAGEMENT.id,
5004
- order: 3
5005
- }), makeStringSetting({
5006
- key: "SystemFiles",
5007
- name: "System Prompt Files",
5008
- defaultValue: void 0,
5009
- description: "The global system prompt files to be used for AI model configuration.",
5010
- category: "AI",
5011
- group: API_SERVICE_GROUPS.OPENAI.id,
5012
- order: 8
5013
- }), makeStringSetting({
5014
- key: "OpenWeatherKey",
5015
- name: "OpenWeather Key",
5016
- defaultValue: "",
5017
- description: "The key for the OpenWeather API.",
5018
- category: "Tools",
5019
- group: API_SERVICE_GROUPS.WEATHER.id,
5020
- order: 2,
5021
- isSensitive: true
5022
- }), makeStringSetting({
5023
- key: "SerperKey",
5024
- name: "Serp Search API Key",
5025
- defaultValue: "",
5026
- description: "The key for the Serp Search API.",
5027
- category: "Tools",
5028
- group: API_SERVICE_GROUPS.SEARCH.id,
5029
- order: 1,
5030
- isSensitive: true
5031
- }), makeStringSetting({
5032
- key: "WolframAlphaKey",
5033
- name: "Wolfram Alpha API Key",
5034
- defaultValue: "",
5035
- description: "The AppID for Wolfram Alpha LLM API. Get one at developer.wolframalpha.com.",
5036
- category: "Tools",
5037
- group: API_SERVICE_GROUPS.SEARCH.id,
5038
- order: 2,
5039
- isSensitive: true
5040
- }), makeStringSetting({
5041
- key: "FmpApiKey",
5042
- name: "Financial Modeling Prep API Key",
5043
- defaultValue: "",
5044
- description: "API key for Financial Modeling Prep (stock quotes, company data, financial statements). Get one at financialmodelingprep.com.",
5045
- category: "Tools",
5046
- group: API_SERVICE_GROUPS.SEARCH.id,
5047
- order: 3,
5048
- isSensitive: true
5049
- }), makeBooleanSetting({
5050
- key: "EnableFmpFinancialData",
5051
- name: "Enable Financial Data Tool",
5052
- defaultValue: false,
5053
- description: "Whether to enable the FMP Financial Data tool for stock quotes, company profiles, and financial statements in chat. Requires FmpApiKey to be set.",
5054
- category: "Experimental",
5055
- group: API_SERVICE_GROUPS.EXPERIMENTAL.id,
5056
- order: 13
5057
- }), makeStringSetting({
5058
- key: "PotionQuestApiKey",
5059
- name: "PotionQuest API Key",
5060
- defaultValue: "",
5061
- description: "API key for PotionQuest (procedural RPG content: NPCs, encounters, quests, loot, prophecies, legendary affixes, dice rolls). Get one at potionquest.com.",
5062
- category: "Tools",
5063
- group: API_SERVICE_GROUPS.SEARCH.id,
5064
- order: 4,
5065
- isSensitive: true
5066
- }), makeBooleanSetting({
5067
- key: "EnablePotionQuest",
5068
- name: "Enable PotionQuest Tools",
5069
- defaultValue: false,
5070
- description: "Whether to expose the PotionQuest dice + content generators as tools to tavern agents. Requires PotionQuestApiKey to be set.",
5071
- category: "Experimental",
5072
- group: API_SERVICE_GROUPS.EXPERIMENTAL.id,
5073
- order: 14
5074
- }), makeBooleanSetting({
5075
- key: "EnableTavernQuestBoardContext",
5076
- name: "Inject Quest Board Into Heartbeat Prompt",
5077
- defaultValue: true,
5078
- description: "Whether agent heartbeats see the quest board and their claimed quests in the system prompt. Toggle OFF for diagnostic isolation: when disabled, agents only see user @mentions and direct context, removing the pull from previously-claimed quests. The quest board itself still functions; only the prompt context is suppressed.",
5079
- category: "Experimental",
5080
- group: API_SERVICE_GROUPS.EXPERIMENTAL.id,
5081
- order: 15
5082
- }), makeNumberSetting({
5083
- key: "VectorThreshold",
5084
- name: "Vector Threshold",
5085
- defaultValue: 4e4,
5086
- description: "The file size threshold (in bytes) above which files should be vectorized.",
5087
- category: "Knowledge",
5088
- group: API_SERVICE_GROUPS.KNOWLEDGE.id,
5089
- order: 2
5090
- }), makeNumberSetting({
5091
- key: "MaxContentLength",
5092
- name: "Max Content Length",
5093
- defaultValue: 5e4,
5094
- description: "The maximum character length for file content displayed in workbench (truncated if larger).",
5095
- category: "Knowledge",
5096
- group: API_SERVICE_GROUPS.KNOWLEDGE.id,
5097
- order: 3
5098
- }), makeBooleanSetting({
5099
- key: "enableAutoChunk",
5100
- name: "Enable Auto Chunk and Vector",
5101
- defaultValue: true,
5102
- description: "When enabled, the system will automatically chunk and vectorize the knowledge upon successful upload.",
5103
- category: "Knowledge",
5104
- group: API_SERVICE_GROUPS.KNOWLEDGE.id,
5105
- order: 4
5106
- }), makeBooleanSetting({
5107
- key: "EnableWeatherService",
5108
- name: "Enable Weather Service",
5109
- defaultValue: true,
5110
- description: "Whether to enable the OpenWeather API integration.",
5111
- category: "Tools",
5112
- group: API_SERVICE_GROUPS.WEATHER.id,
5113
- order: 1
5114
- }), makeStringSetting({
5115
- key: "WeatherUnits",
5116
- name: "Weather Units",
5117
- defaultValue: "metric",
5118
- description: "The unit system to use for weather data (metric/imperial).",
5119
- category: "Tools",
5120
- group: API_SERVICE_GROUPS.WEATHER.id,
5121
- order: 3,
5122
- options: ["metric", "imperial"]
5123
- }), makeBooleanSetting({
5124
- key: "EnableMCPServer",
5125
- name: "Enable MCP Server",
5126
- defaultValue: false,
5127
- description: "Whether to enable the MCP Server.",
5128
- category: "Tools",
5129
- group: API_SERVICE_GROUPS.MCP.id,
5130
- order: 1
5131
- }), makeStringSetting({
5132
- key: "githubMcpClientId",
5133
- name: "GitHub MCP Client ID",
5134
- defaultValue: "",
5135
- description: "The OAuth Client ID for GitHub MCP integration.",
5136
- category: "Tools",
5137
- group: API_SERVICE_GROUPS.MCP.id,
5138
- order: 2,
5139
- isSensitive: false
5140
- }), makeStringSetting({
5141
- key: "githubMcpClientSecret",
5142
- name: "GitHub MCP Client Secret",
5143
- defaultValue: "",
5144
- description: "The OAuth Client Secret for GitHub MCP integration.",
5145
- category: "Tools",
5146
- group: API_SERVICE_GROUPS.MCP.id,
5147
- order: 3,
5148
- isSensitive: true
5149
- }), makeStringSetting({
5150
- key: "atlassianClientId",
5151
- name: "Atlassian Client ID",
5152
- defaultValue: "",
5153
- description: "The OAuth Client ID for Atlassian integration (Jira and Confluence).",
5154
- category: "Tools",
5155
- group: API_SERVICE_GROUPS.MCP.id,
5156
- order: 4,
5157
- isSensitive: false
5158
- }), makeStringSetting({
5159
- key: "atlassianClientSecret",
5160
- name: "Atlassian Client Secret",
5161
- defaultValue: "",
5162
- description: "The OAuth Client Secret for Atlassian integration (Jira and Confluence).",
5163
- category: "Tools",
5164
- group: API_SERVICE_GROUPS.MCP.id,
5165
- order: 5,
5166
- isSensitive: true
5167
- }), makeStringSetting({
5168
- key: "notionClientId",
5169
- name: "Notion Client ID",
5170
- defaultValue: "",
5171
- description: "The OAuth Client ID for Notion integration.",
5172
- category: "Tools",
5173
- group: API_SERVICE_GROUPS.MCP.id,
5174
- order: 6,
5175
- isSensitive: false
5176
- }), makeStringSetting({
5177
- key: "notionClientSecret",
5178
- name: "Notion Client Secret",
5179
- defaultValue: "",
5180
- description: "The OAuth Client Secret for Notion integration.",
5181
- category: "Tools",
5182
- group: API_SERVICE_GROUPS.MCP.id,
5183
- order: 7,
5184
- isSensitive: true
5185
- }), makeStringSetting({
5186
- key: "qWorkUrl",
5187
- name: "Q/Work URL",
5188
- defaultValue: "",
5189
- description: "The base URL for the Q/Work API (for example: https://q.bike4mind.com).",
5190
- category: "Tools",
5191
- group: API_SERVICE_GROUPS.Q_WORK.id,
5192
- order: 1
5193
- }), makeStringSetting({
5194
- key: "qWorkToken",
5195
- name: "Q/Work Token",
5196
- defaultValue: "",
5197
- description: "The bearer token used to authenticate requests to Q/Work.",
5198
- category: "Tools",
5199
- group: API_SERVICE_GROUPS.Q_WORK.id,
5200
- order: 2,
5201
- isSensitive: true
5202
- }), makeBooleanSetting({
5203
- key: "EnableOllama",
5204
- name: "Enable Ollama",
5205
- defaultValue: false,
5206
- description: "Whether to enable Ollama for local model usage. Requires ollamaBackend to be set.",
5207
- category: "Experimental"
5208
- }), makeStringSetting({
5209
- key: "ollamaBackend",
5210
- name: "Ollama Backend",
5211
- defaultValue: "",
5212
- description: "The backend for the Ollama API, e.g. http://localhost:11434",
5213
- category: "Experimental",
5214
- isSensitive: true
5215
- }), makeStringSetting({
5216
- key: "bflApiKey",
5217
- name: "BlackForest Labs API Key",
5218
- defaultValue: "",
5219
- description: "The API Key for BlackForest Labs image generation service.",
5220
- isSensitive: true,
5221
- category: "AI",
5222
- group: API_SERVICE_GROUPS.IMAGE_GENERATION.id,
5223
- order: 1
5224
- }), makeStringSetting({
5225
- key: "defaultEmbeddingModel",
5226
- name: "Default Embedding Model",
5227
- defaultValue: "text-embedding-ada-002",
5228
- description: "The default embedding model to use",
5229
- category: "AI",
5230
- group: API_SERVICE_GROUPS.EMBEDDING.id,
5231
- options: [
5232
- ...Object.values(OpenAIEmbeddingModel),
5233
- ...Object.values(VoyageAIEmbeddingModel),
5234
- ...Object.values(BedrockEmbeddingModel)
5235
- ]
5236
- }), makeStringSetting({
5237
- key: "slackSigningSecret",
5238
- name: "Slack Signing Secret",
5239
- defaultValue: "",
5240
- description: "The signing secret from your Slack app configuration for request verification.",
5241
- category: "Slack",
5242
- group: API_SERVICE_GROUPS.SLACK.id,
5243
- order: 1,
5244
- isSensitive: true
5245
- }), makeStringSetting({
5246
- key: "slackBotToken",
5247
- name: "Slack Bot Token",
5248
- defaultValue: "",
5249
- description: "The bot user OAuth token from your Slack app (starts with xoxb-).",
5250
- category: "Slack",
5251
- group: API_SERVICE_GROUPS.SLACK.id,
5252
- order: 2,
5253
- isSensitive: true
5254
- }), makeBooleanSetting({
5255
- key: "enforceMFA",
5256
- name: "Enforce Multi-Factor Authentication",
5257
- description: "Require TOTP (Time-based One-Time Password) for all users when logging in. When disabled, MFA is optional and users can enable/disable it in their profiles.",
5258
- defaultValue: false,
5259
- category: "Users"
5260
- }), makeStringSetting({
5261
- key: "FirecrawlApiKey",
5262
- name: "Firecrawl API Key",
5263
- description: "The API key for Firecrawl web scraping service",
5264
- defaultValue: "",
5265
- isSensitive: true,
5266
- category: "AI"
5267
- }), makeBooleanSetting({
5268
- key: "EnableDeepResearch",
5269
- name: "Enable Deep Research",
5270
- defaultValue: true,
5271
- description: "Whether to enable the Deep Research tool for comprehensive web-based research.",
5272
- category: "Experimental",
5273
- group: API_SERVICE_GROUPS.EXPERIMENTAL.id,
5274
- order: 9
5275
- }), makeBooleanSetting({
5276
- key: "EnableLattice",
5277
- name: "Enable Lattice",
5278
- defaultValue: false,
5279
- description: "Whether to enable the Lattice feature for natural language financial pro-forma modeling. Allows creating and manipulating spreadsheet-like models through conversation.",
5280
- category: "Experimental",
5281
- group: API_SERVICE_GROUPS.EXPERIMENTAL.id,
5282
- order: 11
5283
- }), makeBooleanSetting({
5284
- key: "EnableKnowledgeBaseSearch",
5285
- name: "Enable Knowledge Base Search",
5286
- defaultValue: true,
5287
- description: "Allow AI to search user uploaded documents. When enabled, users can toggle the Knowledge Base Search tool in AI Settings.",
5288
- category: "Experimental",
5289
- group: API_SERVICE_GROUPS.EXPERIMENTAL.id,
5290
- order: 12
5291
- }), makeBooleanSetting({
5292
- key: "enableVoiceSession",
5293
- name: "Enable Voice Session",
5294
- defaultValue: false,
5295
- description: "Whether to enable the voice session.",
5296
- category: "AI",
5297
- group: API_SERVICE_GROUPS.VOICE_SESSION.id,
5298
- order: 9
5299
- }), makeStringSetting({
5300
- key: "voiceSessionAiVoice",
5301
- name: "Default Assistant Voice",
5302
- defaultValue: "alloy",
5303
- description: "The default voice for the assistant in the voice session.",
5304
- options: [
5305
- "alloy",
5306
- "ash",
5307
- "ballad",
5308
- "cedar",
5309
- "coral",
5310
- "echo",
5311
- "marin",
5312
- "sage",
5313
- "shimmer",
5314
- "verse"
5315
- ],
5316
- category: "AI",
5317
- group: API_SERVICE_GROUPS.VOICE_SESSION.id,
5318
- order: 10
5319
- }), makeStringSetting({
5320
- key: "voiceSessionTranscriptionModel",
5321
- name: "Default Voice Session Transcription Model",
5322
- defaultValue: "whisper-1",
5323
- description: "The default model to use for transcribing the user's voice in the voice session.",
5324
- category: "AI",
5325
- group: API_SERVICE_GROUPS.VOICE_SESSION.id,
5326
- options: [
5327
- "gpt-4o-transcribe",
5328
- "gpt-4o-mini-transcribe",
5329
- "whisper-1"
5330
- ],
5331
- order: 11
5332
- }), makeStringSetting({
5333
- key: "voiceSessionVadType",
5334
- name: "Turn Detection Mode",
5335
- defaultValue: "semantic_vad",
5336
- description: "How the system detects when the user has finished speaking. \"semantic_vad\" uses a classifier to understand when the user is done (recommended). \"server_vad\" uses silence duration.",
5337
- category: "AI",
5338
- group: API_SERVICE_GROUPS.VOICE_SESSION.id,
5339
- options: ["server_vad", "semantic_vad"],
5340
- order: 12
5341
- }), makeStringSetting({
5342
- key: "voiceSessionVadEagerness",
5343
- name: "Semantic VAD Eagerness",
5344
- defaultValue: "medium",
5345
- description: "How eagerly the assistant responds when using semantic VAD. \"low\" waits longer (8s max), \"medium\" is balanced (4s max, recommended), \"high\" responds quickly (2s max).",
5346
- category: "AI",
5347
- group: API_SERVICE_GROUPS.VOICE_SESSION.id,
5348
- options: [
5349
- "low",
5350
- "medium",
5351
- "high"
5352
- ],
5353
- order: 13
5354
- }), makeObjectSetting({
5355
- key: "RapidReplySettings",
5356
- name: "Rapid Reply Settings",
5357
- defaultValue: {
5358
- enabled: false,
5359
- allowedUserTags: [],
5360
- defaultMaxTokens: 150,
5361
- defaultResponseStyle: "auto",
5362
- maxAcceptableLatency: 2e3,
5363
- minSuccessRate: 90,
5364
- transitionMode: "replace",
5365
- showIndicator: true,
5366
- indicatorText: "Thinking...",
5367
- fallbackBehavior: "continue",
5368
- metrics: {
5369
- totalRequests: 0,
5370
- successfulRequests: 0,
5371
- averageLatency: 0,
5372
- lastUpdated: /* @__PURE__ */ new Date()
5373
- }
5374
- },
5375
- description: "Configuration settings for the Rapid Reply feature that provides instant acknowledgments using fast mini models.",
5376
- category: "Experimental",
5377
- group: API_SERVICE_GROUPS.EXPERIMENTAL.id,
5378
- order: 10,
5379
- schema: RapidReplySettingsSchema
5380
- }), makeStringSetting({
5381
- key: "pdfjsExpressViewerKey",
5382
- name: "PDF.js Express Viewer Key",
5383
- defaultValue: "",
5384
- description: "The license key for PDF.js Express Viewer for PDF document viewing.",
5385
- isSensitive: true,
5386
- category: "Tools",
5387
- group: API_SERVICE_GROUPS.PDF_VIEWER.id,
5388
- order: 1
5389
- }), makeBooleanSetting({
5390
- key: "EnableEmailAnalysis",
5391
- name: "Enable Email Analysis",
5392
- defaultValue: true,
5393
- description: "Enable AI-powered analysis of ingested emails (summary, entities, sentiment, action items).",
5394
- category: "AI",
5395
- order: 200
5396
- }), makeStringSetting({
5397
- key: "EmailAnalysisModel",
5398
- name: "Email Analysis Model",
5399
- defaultValue: "us.anthropic.claude-haiku-4-5-20251001-v1:0",
5400
- description: "The AI model to use for email analysis. Defaults to Claude 4.5 Haiku via Bedrock.",
5401
- options: CHAT_MODELS,
5402
- category: "AI",
5403
- order: 201
5404
- }), makeNumberSetting({
5405
- key: "EmailAnalysisTemperature",
5406
- name: "Email Analysis Temperature",
5407
- defaultValue: .3,
5408
- description: "Temperature setting for email analysis LLM (0.0-1.0). Lower values = more deterministic.",
5409
- category: "AI",
5410
- order: 202
5411
- }), makeStringSetting({
5412
- key: "EmailAnalysisPrompt",
5413
- name: "Email Analysis Meta-Prompt",
5414
- defaultValue: "",
5415
- description: "Custom meta-prompt template for email analysis. Leave empty to use default. Supports variables: {{from}}, {{to}}, {{subject}}, {{bodyMarkdown}}",
5416
- category: "AI",
5417
- order: 203
5418
- }), makeNumberSetting({
5419
- key: "MaxDailyEmailAnalyses",
5420
- name: "Max Daily Email Analyses",
5421
- defaultValue: 100,
5422
- description: "Maximum number of AI email analyses per user per 24-hour period. Prevents cost explosion from spam floods.",
5423
- category: "AI",
5424
- order: 204
5425
- }), makeBooleanSetting({
5426
- key: "whatsNewAutomationEnabled",
5427
- name: "Enable What's New Automation",
5428
- defaultValue: false,
5429
- description: "Enable automated generation of What's New modals from release information. Disable to prevent automatic modal creation during releases.",
5430
- category: "Admin",
5431
- order: 100
5432
- }), makeObjectSetting({
5433
- key: "whatsNewConfig",
5434
- name: "What's New Configuration",
5435
- defaultValue: {
5436
- modelId: "gpt-4o-mini",
5437
- temperature: .7,
5438
- maxTokens: 2e3,
5439
- timeoutMs: 12e4,
5440
- modalPriority: 10,
5441
- modalExpiryDays: 30,
5442
- maxPreviousModals: 10,
5443
- titleMaxLength: 100,
5444
- subtitleMaxLength: 200,
5445
- descriptionMaxLength: 2e3,
5446
- maxCommits: 50,
5447
- maxPullRequests: 20,
5448
- maxReleaseBodyLength: 2e3,
5449
- maxCommitMessageLength: 200,
5450
- maxPRBodyLength: 500,
5451
- maxChangelogLength: 1e3,
5452
- repository: "MillionOnMars/lumina5",
5453
- targetBranch: "main"
5454
- },
5455
- description: "Configuration for automated What's New modal generation, including LLM model selection, prompt parameters, validation rules, and content sanitization limits.",
5456
- category: "Admin",
5457
- order: 101,
5458
- schema: WhatsNewConfigSchema
5459
- }), makeObjectSetting({
5460
- key: "whatsNewSyncConfig",
5461
- name: "What's New Sync Configuration",
5462
- defaultValue: { autoSyncEnabled: true },
5463
- description: "Configuration for What's New modal syncing from production. Used by fork/non-production environments to control automatic synchronization.",
5464
- category: "Admin",
5465
- order: 102,
5466
- schema: WhatsNewSyncConfigSchema
5467
- }), makeBooleanSetting({
5468
- key: "enableAgentProactiveMessages",
5469
- name: "Enable Agent Proactive Messages",
5470
- defaultValue: false,
5471
- description: "Enable agents to send proactive messages to users in sessions. When disabled, the agent proactive messaging settings button will be hidden.",
5472
- category: "Experimental",
5473
- group: API_SERVICE_GROUPS.EXPERIMENTAL.id,
5474
- order: 6
5475
- }), makeBooleanSetting({
5476
- key: "EnableEnhancedDateTime",
5477
- name: "Enable Enhanced DateTime",
5478
- defaultValue: true,
5479
- description: "Enable advanced datetime features: Unix timestamps, Julian days, date calculations, historical day lookups.",
5480
- category: "Tools",
5481
- group: API_SERVICE_GROUPS.DATETIME_ASTRONOMY.id,
5482
- order: 1
5483
- }), makeBooleanSetting({
5484
- key: "EnableHistoricalFeatures",
5485
- name: "Enable Historical Features",
5486
- defaultValue: true,
5487
- description: "Enable Wikipedia \"On This Day\" tool for historical events, births, deaths, and holidays.",
5488
- category: "Tools",
5489
- group: API_SERVICE_GROUPS.DATETIME_ASTRONOMY.id,
5490
- order: 2
5491
- }), makeBooleanSetting({
5492
- key: "EnableAstronomyFeatures",
5493
- name: "Enable Astronomy Features",
5494
- defaultValue: true,
5495
- description: "Enable astronomy tools: moon phases, sunrise/sunset calculations, and ISS tracking.",
5496
- category: "Tools",
5497
- group: API_SERVICE_GROUPS.DATETIME_ASTRONOMY.id,
5498
- order: 3
5499
- }), makeBooleanSetting({
5500
- key: "EnableStreamIdleTimeout",
5501
- name: "Enable Stream Idle Timeout",
5502
- defaultValue: true,
5503
- description: "Detect and abort hanging Anthropic streams when no events are received within the timeout period.",
5504
- category: "Experimental",
5505
- group: API_SERVICE_GROUPS.EXPERIMENTAL.id,
5506
- order: 12
5507
- }), makeNumberSetting({
5508
- key: "StreamIdleTimeoutSeconds",
5509
- name: "Stream Idle Timeout (seconds)",
5510
- defaultValue: 90,
5511
- description: "Seconds to wait between stream events before aborting. Use 180 for thinking models (Claude 4.x with extended thinking). Default: 90 seconds.",
5512
- category: "Experimental",
5513
- group: API_SERVICE_GROUPS.EXPERIMENTAL.id,
5514
- order: 13
5515
- }), makeBooleanSetting({
5516
- key: "EnableMcpToolFiltering",
5517
- name: "Enable MCP Tool Filtering",
5518
- defaultValue: false,
5519
- description: "Filter MCP tools by relevance to user query to reduce payload size. Experimental feature to reduce streaming hangs with large tool sets (e.g., Jira with 44 tools).",
5520
- category: "Experimental",
5521
- group: API_SERVICE_GROUPS.EXPERIMENTAL.id,
5522
- order: 14
5523
- }), makeNumberSetting({
5524
- key: "McpToolFilteringMaxTools",
5525
- name: "Max MCP Tools After Filtering",
5526
- defaultValue: 20,
5527
- description: "Maximum number of MCP tools to send after relevance filtering. Only applies when EnableMcpToolFiltering is enabled.",
5528
- category: "Experimental",
5529
- group: API_SERVICE_GROUPS.EXPERIMENTAL.id,
5530
- order: 15
5531
- }), makeBooleanSetting({
5532
- key: "EnableParallelToolExecution",
5533
- name: "Enable Parallel Tool Execution",
5534
- defaultValue: false,
5535
- description: "Execute read-only tools (file reads, searches) in parallel for 2-3x speed improvement. Write tools still execute sequentially for safety.",
5536
- category: "Experimental",
5537
- group: API_SERVICE_GROUPS.EXPERIMENTAL.id,
5538
- order: 16
5539
- }), makeBooleanSetting({
5540
- key: "EnableHelpChat",
5541
- name: "Enable Help Chat",
5542
- defaultValue: true,
5543
- description: "Enable the AI-powered chat assistant in the Help Center panel. When enabled, users can ask questions about the documentation and get contextual answers.",
5544
- category: "Experimental",
5545
- group: API_SERVICE_GROUPS.EXPERIMENTAL.id,
5546
- order: 17
5547
- }), makeBooleanSetting({
5548
- key: "EnableBmPi",
5549
- name: "Enable B4M Pi",
5550
- defaultValue: true,
5551
- description: "Enable the B4M Pi (Project Intelligence) module for repository analysis, task scheduling, and team activity dashboards.",
5552
- category: "Experimental",
5553
- group: API_SERVICE_GROUPS.EXPERIMENTAL.id,
5554
- order: 18
5555
- }), makeBooleanSetting({
5556
- key: "EnableBmPiJira",
5557
- name: "Enable B4M Pi — Jira Integration",
5558
- defaultValue: false,
5559
- description: "Show Jira source toggle and Jira views in the B4M Pi dashboard. Requires \"Enable B4M Pi\" to be on.",
5560
- category: "Experimental",
5561
- group: API_SERVICE_GROUPS.EXPERIMENTAL.id,
5562
- order: 19,
5563
- dependsOn: "EnableBmPi"
5564
- }), makeBooleanSetting({
5565
- key: "EnableQuantumCanvasser",
5566
- name: "Enable OptiHashi",
5567
- defaultValue: false,
5568
- description: "Enable OptiHashi, the quantum optimizer module for AI-driven optimization across classical and quantum solvers.",
5569
- category: "Experimental",
5570
- group: API_SERVICE_GROUPS.EXPERIMENTAL.id,
5571
- order: 18
5572
- }), makeBooleanSetting({
5573
- key: "EnableContextTelemetry",
5574
- name: "Enable Context Telemetry",
5575
- defaultValue: false,
5576
- description: "Enable privacy-first telemetry for LLM completions. Captures operational metadata for debugging without storing content or user identity.",
5577
- category: "Admin",
5578
- order: 120
5579
- }), makeObjectSetting({
5580
- key: "sreAgentConfig",
5581
- name: "SRE Agent Config",
5582
- defaultValue: SreAgentConfigSchema.parse({}),
5583
- description: "Configuration for the autonomous SRE Agent Trio pipeline (Sentinel → Diagnostician → Surgeon). Master kill switch defaults to disabled.",
5584
- category: "Admin",
5585
- order: 130,
5586
- schema: SreAgentConfigSchema
5587
- }), makeObjectSetting({
5588
- key: "contextTelemetryAlerts",
5589
- name: "Context Telemetry Alerts",
5590
- defaultValue: {
5591
- enabled: false,
5592
- autoCreateIssues: false,
5593
- temperature: CONTEXT_TELEMETRY_VALIDATION_LIMITS.temperature.default,
5594
- maxTokens: CONTEXT_TELEMETRY_VALIDATION_LIMITS.maxTokens.default,
5595
- timeoutMs: CONTEXT_TELEMETRY_VALIDATION_LIMITS.timeoutMs.default,
5596
- llmAnalysisThreshold: CONTEXT_TELEMETRY_VALIDATION_LIMITS.llmAnalysisThreshold.default,
5597
- alertThreshold: CONTEXT_TELEMETRY_VALIDATION_LIMITS.alertThreshold.default,
5598
- criticalThreshold: CONTEXT_TELEMETRY_VALIDATION_LIMITS.criticalThreshold.default,
5599
- dedupWindowMinutes: CONTEXT_TELEMETRY_VALIDATION_LIMITS.dedupWindowMinutes.default,
5600
- regressionLookbackDays: CONTEXT_TELEMETRY_VALIDATION_LIMITS.regressionLookbackDays.default,
5601
- regressionGracePeriodHours: CONTEXT_TELEMETRY_VALIDATION_LIMITS.regressionGracePeriodHours.default,
5602
- duplicateAlertCooldownHours: CONTEXT_TELEMETRY_VALIDATION_LIMITS.duplicateAlertCooldownHours.default,
5603
- enableLlmPriority: false,
5604
- baselineWindowDays: CONTEXT_TELEMETRY_VALIDATION_LIMITS.baselineWindowDays.default,
5605
- sloResponseTimeP95Ms: CONTEXT_TELEMETRY_VALIDATION_LIMITS.sloResponseTimeP95Ms.default,
5606
- sloFirstTokenTimeMs: CONTEXT_TELEMETRY_VALIDATION_LIMITS.sloFirstTokenTimeMs.default,
5607
- sloErrorRatePercent: CONTEXT_TELEMETRY_VALIDATION_LIMITS.sloErrorRatePercent.default,
5608
- sloContextUtilizationPercent: CONTEXT_TELEMETRY_VALIDATION_LIMITS.sloContextUtilizationPercent.default,
5609
- maxIssuesPerHour: CONTEXT_TELEMETRY_VALIDATION_LIMITS.maxIssuesPerHour.default,
5610
- dryRun: false
5611
- },
5612
- description: "Configure Slack alerts for context telemetry anomalies. Set thresholds for warnings and critical alerts.",
5613
- category: "Admin",
5614
- order: 121,
5615
- schema: ContextTelemetryAlertsSchema
5616
- }), makeObjectSetting({
5617
- key: "secopsTriageConfig",
5618
- name: "SecOps Triage Config",
5619
- defaultValue: SecopsTriageConfigSchema.parse({}),
5620
- description: "Configuration for SecOps Triage — auto-creates GitHub issues for critical/high OWASP ZAP scan findings via the b4m-prod GitHub App. Disabled by default.",
5621
- category: "SecOps",
5622
- order: 131,
5623
- schema: SecopsTriageConfigSchema
5624
- });
4940
+ const settingsMap = {
4941
+ DefaultAPIModel: makeStringSetting({
4942
+ key: "DefaultAPIModel",
4943
+ name: "Default API Model",
4944
+ defaultValue: "gpt-5",
4945
+ description: "The default AI model to use for API requests when no model is specified.",
4946
+ options: CHAT_MODELS,
4947
+ category: "AI",
4948
+ order: 1
4949
+ }),
4950
+ openaiDemoKey: makeStringSetting({
4951
+ key: "openaiDemoKey",
4952
+ name: "OpenAI API Key",
4953
+ defaultValue: "",
4954
+ description: "The global API Key for OpenAI.",
4955
+ isSensitive: true,
4956
+ category: "AI",
4957
+ group: API_SERVICE_GROUPS.OPENAI.id,
4958
+ order: 1
4959
+ }),
4960
+ xaiApiKey: makeStringSetting({
4961
+ key: "xaiApiKey",
4962
+ name: "xAI API Key",
4963
+ defaultValue: "",
4964
+ description: "The global API Key for xAI.",
4965
+ isSensitive: true,
4966
+ category: "AI",
4967
+ group: API_SERVICE_GROUPS.XAI.id,
4968
+ order: 1
4969
+ }),
4970
+ voyageApiKey: makeStringSetting({
4971
+ key: "voyageApiKey",
4972
+ name: "Voyage API Key",
4973
+ defaultValue: "",
4974
+ description: "The global API Key for Voyage AI.",
4975
+ isSensitive: true,
4976
+ category: "AI",
4977
+ group: API_SERVICE_GROUPS.VOYAGE.id,
4978
+ order: 1
4979
+ }),
4980
+ anthropicDemoKey: makeStringSetting({
4981
+ key: "anthropicDemoKey",
4982
+ name: "Anthropic API Key",
4983
+ defaultValue: "",
4984
+ description: "The global API Key for Anthropic.",
4985
+ isSensitive: true,
4986
+ category: "AI",
4987
+ group: API_SERVICE_GROUPS.ANTHROPIC.id,
4988
+ order: 1
4989
+ }),
4990
+ geminiDemoKey: makeStringSetting({
4991
+ key: "geminiDemoKey",
4992
+ name: "Gemini API Key",
4993
+ defaultValue: "",
4994
+ description: "The global API Key for Gemini.",
4995
+ isSensitive: true,
4996
+ category: "AI",
4997
+ group: API_SERVICE_GROUPS.GEMINI.id,
4998
+ order: 1
4999
+ }),
5000
+ AutoNameNotebook: makeNumberSetting({
5001
+ key: "AutoNameNotebook",
5002
+ name: "Auto Name Notebook",
5003
+ defaultValue: 1,
5004
+ description: "The number of previous prompts to use to name a notebook. Set to 0 to disable.",
5005
+ category: "Notebooks",
5006
+ group: API_SERVICE_GROUPS.NOTEBOOK.id,
5007
+ order: 1
5008
+ }),
5009
+ EnableQuestMaster: makeBooleanSetting({
5010
+ key: "EnableQuestMaster",
5011
+ name: "Enable Quest Master",
5012
+ defaultValue: true,
5013
+ description: "Whether to enable the Quest Master feature.",
5014
+ category: "Experimental",
5015
+ group: API_SERVICE_GROUPS.EXPERIMENTAL.id,
5016
+ order: 90
5017
+ }),
5018
+ EnableQuestMasterDefault: makeBooleanSetting({
5019
+ key: "EnableQuestMasterDefault",
5020
+ name: "Quest Master: On by default for users",
5021
+ defaultValue: false,
5022
+ description: "When enabled, Quest Master is active for users who have never explicitly toggled it.",
5023
+ category: "Experimental",
5024
+ group: API_SERVICE_GROUPS.EXPERIMENTAL.id,
5025
+ order: 91,
5026
+ dependsOn: "EnableQuestMaster"
5027
+ }),
5028
+ EnableMementos: makeBooleanSetting({
5029
+ key: "EnableMementos",
5030
+ name: "Enable Mementos",
5031
+ defaultValue: false,
5032
+ description: "Whether to enable the Memento feature.",
5033
+ category: "Experimental",
5034
+ group: API_SERVICE_GROUPS.EXPERIMENTAL.id,
5035
+ order: 60
5036
+ }),
5037
+ EnableMementosDefault: makeBooleanSetting({
5038
+ key: "EnableMementosDefault",
5039
+ name: "Mementos: On by default for users",
5040
+ defaultValue: false,
5041
+ description: "When enabled, Mementos is active for users who have never explicitly toggled it.",
5042
+ category: "Experimental",
5043
+ group: API_SERVICE_GROUPS.EXPERIMENTAL.id,
5044
+ order: 61,
5045
+ dependsOn: "EnableMementos"
5046
+ }),
5047
+ MementoMaxTotalChars: makeNumberSetting({
5048
+ key: "MementoMaxTotalChars",
5049
+ name: "Memento Max Total Chars",
5050
+ defaultValue: 32e3,
5051
+ description: "The maximum total number of characters for mementos.",
5052
+ category: "Experimental",
5053
+ group: API_SERVICE_GROUPS.EXPERIMENTAL.id,
5054
+ order: 62,
5055
+ dependsOn: "EnableMementos"
5056
+ }),
5057
+ EnableArtifacts: makeBooleanSetting({
5058
+ key: "EnableArtifacts",
5059
+ name: "Enable Artifacts",
5060
+ defaultValue: true,
5061
+ description: "Whether to enable the Artifacts feature.",
5062
+ category: "Experimental",
5063
+ group: API_SERVICE_GROUPS.EXPERIMENTAL.id,
5064
+ order: 20
5065
+ }),
5066
+ EnableArtifactsDefault: makeBooleanSetting({
5067
+ key: "EnableArtifactsDefault",
5068
+ name: "Artifacts: On by default for users",
5069
+ defaultValue: false,
5070
+ description: "When enabled, the Artifacts feature is active for users who have never explicitly toggled it.",
5071
+ category: "Experimental",
5072
+ group: API_SERVICE_GROUPS.EXPERIMENTAL.id,
5073
+ order: 21,
5074
+ dependsOn: "EnableArtifacts"
5075
+ }),
5076
+ EnableAgents: makeBooleanSetting({
5077
+ key: "EnableAgents",
5078
+ name: "Enable Agents",
5079
+ defaultValue: true,
5080
+ description: "Whether to enable the Agents feature for AI assistants with specialized capabilities.",
5081
+ category: "Experimental",
5082
+ group: API_SERVICE_GROUPS.EXPERIMENTAL.id,
5083
+ order: 10
5084
+ }),
5085
+ EnableAgentsDefault: makeBooleanSetting({
5086
+ key: "EnableAgentsDefault",
5087
+ name: "Agents: On by default for users",
5088
+ defaultValue: false,
5089
+ description: "When enabled, the Agents feature is active for users who have never explicitly toggled it.",
5090
+ category: "Experimental",
5091
+ group: API_SERVICE_GROUPS.EXPERIMENTAL.id,
5092
+ order: 11,
5093
+ dependsOn: "EnableAgents"
5094
+ }),
5095
+ EnableRapidReply: makeBooleanSetting({
5096
+ key: "EnableRapidReply",
5097
+ name: "Enable Rapid Reply",
5098
+ defaultValue: true,
5099
+ description: "Whether to enable the Rapid Reply feature that provides instant acknowledgments using fast mini models while processing full responses.",
5100
+ category: "Experimental",
5101
+ group: API_SERVICE_GROUPS.EXPERIMENTAL.id,
5102
+ order: 100
5103
+ }),
5104
+ EnableRapidReplyDefault: makeBooleanSetting({
5105
+ key: "EnableRapidReplyDefault",
5106
+ name: "Rapid Reply: On by default for users",
5107
+ defaultValue: false,
5108
+ description: "When enabled, Rapid Reply is active for users who have never explicitly toggled it.",
5109
+ category: "Experimental",
5110
+ group: API_SERVICE_GROUPS.EXPERIMENTAL.id,
5111
+ order: 101,
5112
+ dependsOn: "EnableRapidReply"
5113
+ }),
5114
+ EnableResearchEngine: makeBooleanSetting({
5115
+ key: "EnableResearchEngine",
5116
+ name: "Enable Research Engine",
5117
+ defaultValue: true,
5118
+ description: "Whether to enable the Research Engine feature.",
5119
+ category: "Experimental",
5120
+ group: API_SERVICE_GROUPS.EXPERIMENTAL.id,
5121
+ order: 110
5122
+ }),
5123
+ EnableResearchEngineDefault: makeBooleanSetting({
5124
+ key: "EnableResearchEngineDefault",
5125
+ name: "Research Engine: On by default for users",
5126
+ defaultValue: false,
5127
+ description: "When enabled, the Research Engine is active for users who have never explicitly toggled it.",
5128
+ category: "Experimental",
5129
+ group: API_SERVICE_GROUPS.EXPERIMENTAL.id,
5130
+ order: 111,
5131
+ dependsOn: "EnableResearchEngine"
5132
+ }),
5133
+ EnableReactViewer: makeBooleanSetting({
5134
+ key: "EnableReactViewer",
5135
+ name: "Enable React Viewer",
5136
+ defaultValue: true,
5137
+ description: "Whether to enable the React component viewer with sandboxed execution. Required for viewing AI-generated React components.",
5138
+ category: "Experimental",
5139
+ group: API_SERVICE_GROUPS.EXPERIMENTAL.id,
5140
+ order: 240
5141
+ }),
5142
+ DefaultChunkSize: makeNumberSetting({
5143
+ key: "DefaultChunkSize",
5144
+ name: "Default Chunk Size",
5145
+ defaultValue: 2100,
5146
+ description: "The default chunk size for splitting large documents.",
5147
+ category: "AI",
5148
+ order: 3
5149
+ }),
5150
+ ModerationEnabled: makeBooleanSetting({
5151
+ key: "ModerationEnabled",
5152
+ name: "Moderation Enabled",
5153
+ defaultValue: false,
5154
+ description: "Whether to enable moderation for LLM prompts.",
5155
+ category: "AI Moderation"
5156
+ }),
5157
+ FormatPromptTemplate: makeStringSetting({
5158
+ key: "FormatPromptTemplate",
5159
+ name: "Format Prompt Template",
5160
+ defaultValue: "",
5161
+ description: "The template to use for formatting prompts.",
5162
+ category: "AI",
5163
+ order: 4
5164
+ }),
5165
+ UseFormatPrompt: makeBooleanSetting({
5166
+ key: "UseFormatPrompt",
5167
+ name: "Use Format Prompt",
5168
+ defaultValue: false,
5169
+ description: "Whether to use the format prompt template.",
5170
+ category: "AI",
5171
+ order: 5
5172
+ }),
5173
+ UseImagePrompt: makeBooleanSetting({
5174
+ key: "UseImagePrompt",
5175
+ name: "Use Image Prompt",
5176
+ defaultValue: true,
5177
+ description: "Whether to use image prompts.",
5178
+ category: "AI",
5179
+ order: 6
5180
+ }),
5181
+ pricePerCredit: makeNumberSetting({
5182
+ key: "pricePerCredit",
5183
+ name: "Price Per Credit",
5184
+ defaultValue: 50,
5185
+ description: "The price per credit for purchasing credits.",
5186
+ category: "Users",
5187
+ group: API_SERVICE_GROUPS.CREDITS.id,
5188
+ order: 1
5189
+ }),
5190
+ tagLineMain: makeStringSetting({
5191
+ key: "tagLineMain",
5192
+ name: "Tag Line Main",
5193
+ defaultValue: "Bike4Mind",
5194
+ description: "The main tag line to display on the app.",
5195
+ category: "Branding",
5196
+ group: API_SERVICE_GROUPS.BRANDING.id,
5197
+ order: 1
5198
+ }),
5199
+ tagLineSub: makeStringSetting({
5200
+ key: "tagLineSub",
5201
+ name: "Tag Line Sub",
5202
+ defaultValue: "",
5203
+ description: "The sub tag line to display on the app.",
5204
+ category: "Branding",
5205
+ group: API_SERVICE_GROUPS.BRANDING.id,
5206
+ order: 2
5207
+ }),
5208
+ defaultTags: makeStringSetting({
5209
+ key: "defaultTags",
5210
+ name: "Default Tags",
5211
+ defaultValue: "",
5212
+ description: "The default tags to be applied to new users.",
5213
+ category: "Users"
5214
+ }),
5215
+ EnableReferralToSlack: makeBooleanSetting({
5216
+ key: "EnableReferralToSlack",
5217
+ name: "Enable Referral to Slack",
5218
+ defaultValue: false,
5219
+ description: "Sends a notification to Slack when a referral is sent.",
5220
+ category: "Referrals"
5221
+ }),
5222
+ ReferralCreditsAmount: makeNumberSetting({
5223
+ key: "ReferralCreditsAmount",
5224
+ name: "Referal Credits Amount",
5225
+ defaultValue: 1e4,
5226
+ description: "Credits to give to the referred user.",
5227
+ category: "Referrals"
5228
+ }),
5229
+ EnableReferralToEmail: makeBooleanSetting({
5230
+ key: "EnableReferralToEmail",
5231
+ name: "Enable Referral to Email",
5232
+ defaultValue: true,
5233
+ description: "Whether to enable referral to Email.",
5234
+ category: "Referrals"
5235
+ }),
5236
+ registrationLink: makeStringSetting({
5237
+ key: "registrationLink",
5238
+ name: "Registration Link",
5239
+ defaultValue: "",
5240
+ description: "The link to use for registration.",
5241
+ category: "Users",
5242
+ group: API_SERVICE_GROUPS.REGISTRATION.id,
5243
+ order: 1
5244
+ }),
5245
+ FeedbackReceiveEmail: makeStringSetting({
5246
+ key: "FeedbackReceiveEmail",
5247
+ name: "Main Feedback Email",
5248
+ defaultValue: "",
5249
+ description: "The primary email to receive feedback.",
5250
+ category: "Feedback",
5251
+ group: API_SERVICE_GROUPS.FEEDBACK.id,
5252
+ order: 9
5253
+ }),
5254
+ FeedbackKyle: makeStringSetting({
5255
+ key: "FeedbackKyle",
5256
+ name: "Kyle Feedback Email",
5257
+ defaultValue: "",
5258
+ description: "The email to receive feedback for Kyle.",
5259
+ category: "Feedback",
5260
+ group: API_SERVICE_GROUPS.FEEDBACK.id,
5261
+ order: 11
5262
+ }),
5263
+ EnableFeedBackToEmail: makeBooleanSetting({
5264
+ key: "EnableFeedBackToEmail",
5265
+ name: "Enable Email Feedback",
5266
+ defaultValue: false,
5267
+ description: "Whether to enable feedback to Email.",
5268
+ category: "Feedback",
5269
+ group: API_SERVICE_GROUPS.FEEDBACK.id,
5270
+ order: 1
5271
+ }),
5272
+ EnableFeedBackToSlack: makeBooleanSetting({
5273
+ key: "EnableFeedBackToSlack",
5274
+ name: "Enable Slack Feedback",
5275
+ defaultValue: false,
5276
+ description: "Whether to enable feedback to Slack.",
5277
+ category: "Feedback",
5278
+ group: API_SERVICE_GROUPS.FEEDBACK.id,
5279
+ order: 2
5280
+ }),
5281
+ SlackDefaultWebhookUrl: makeStringSetting({
5282
+ key: "SlackDefaultWebhookUrl",
5283
+ name: "Default Slack Webhook URL",
5284
+ defaultValue: "",
5285
+ description: "The default webhook URL for sending notifications to Slack when a specific URL is not available.",
5286
+ category: "Feedback",
5287
+ group: API_SERVICE_GROUPS.FEEDBACK.id,
5288
+ order: 3,
5289
+ isSensitive: true
5290
+ }),
5291
+ SlackGeneralWebhookUrl: makeStringSetting({
5292
+ key: "SlackGeneralWebhookUrl",
5293
+ name: "General Channel Webhook URL",
5294
+ defaultValue: "",
5295
+ description: "The webhook URL for sending notifications to the #general Slack channel.",
5296
+ category: "Feedback",
5297
+ group: API_SERVICE_GROUPS.FEEDBACK.id,
5298
+ order: 4,
5299
+ isSensitive: true
5300
+ }),
5301
+ SlackLiveopsWebhookUrl: makeStringSetting({
5302
+ key: "SlackLiveopsWebhookUrl",
5303
+ name: "LiveOps Channel Webhook URL",
5304
+ defaultValue: "",
5305
+ description: "The webhook URL for sending feedback and operations to the #bike4mind-liveops Slack channel.",
5306
+ category: "Feedback",
5307
+ group: API_SERVICE_GROUPS.FEEDBACK.id,
5308
+ order: 5,
5309
+ isSensitive: true
5310
+ }),
5311
+ SlackUserActivityWebhookUrl: makeStringSetting({
5312
+ key: "SlackUserActivityWebhookUrl",
5313
+ name: "User Activity Channel Webhook URL",
5314
+ defaultValue: "",
5315
+ description: "The webhook URL for sending user activity reports to the #user-activity Slack channel.",
5316
+ category: "Feedback",
5317
+ group: API_SERVICE_GROUPS.FEEDBACK.id,
5318
+ order: 6,
5319
+ isSensitive: true
5320
+ }),
5321
+ SlackFeedbackWebhookUrl: makeStringSetting({
5322
+ key: "SlackFeedbackWebhookUrl",
5323
+ name: "Feedback Channel Webhook URL",
5324
+ defaultValue: "",
5325
+ description: "The webhook URL for sending feedback to the #bike4mind-feedback Slack channel.",
5326
+ category: "Feedback",
5327
+ group: API_SERVICE_GROUPS.FEEDBACK.id,
5328
+ order: 7,
5329
+ isSensitive: true
5330
+ }),
5331
+ liveFeedbackEmail: makeStringSetting({
5332
+ key: "liveFeedbackEmail",
5333
+ name: "Live Feedback Email",
5334
+ defaultValue: "",
5335
+ description: "The email to receive live feedback.",
5336
+ category: "Feedback",
5337
+ group: API_SERVICE_GROUPS.FEEDBACK.id,
5338
+ order: 10
5339
+ }),
5340
+ feedbackErik: makeStringSetting({
5341
+ key: "feedbackErik",
5342
+ name: "Erik Feedback Email",
5343
+ defaultValue: "",
5344
+ description: "The email to receive feedback for Erik.",
5345
+ category: "Feedback",
5346
+ group: API_SERVICE_GROUPS.FEEDBACK.id,
5347
+ order: 12
5348
+ }),
5349
+ kyleFeedback: makeStringSetting({
5350
+ key: "kyleFeedback",
5351
+ name: "Kyle Feedback (Alt)",
5352
+ defaultValue: "",
5353
+ description: "Alternative email to receive feedback for Kyle.",
5354
+ category: "Feedback",
5355
+ group: API_SERVICE_GROUPS.FEEDBACK.id,
5356
+ order: 13
5357
+ }),
5358
+ EnableUserDeletionEmailNotification: makeBooleanSetting({
5359
+ key: "EnableUserDeletionEmailNotification",
5360
+ name: "Enable User Deletion Email Notification",
5361
+ defaultValue: false,
5362
+ description: "Whether to enable user deletion email notification.",
5363
+ category: "Users",
5364
+ group: API_SERVICE_GROUPS.USER_MANAGEMENT.id,
5365
+ order: 1
5366
+ }),
5367
+ EnableUserDeletionSlackNotification: makeBooleanSetting({
5368
+ key: "EnableUserDeletionSlackNotification",
5369
+ name: "Enable User Deletion Slack Notification",
5370
+ defaultValue: false,
5371
+ description: "Whether to enable user deletion slack notification.",
5372
+ category: "Users",
5373
+ group: API_SERVICE_GROUPS.USER_MANAGEMENT.id,
5374
+ order: 2
5375
+ }),
5376
+ AdminEmail: makeStringSetting({
5377
+ key: "AdminEmail",
5378
+ name: "Admin Email",
5379
+ defaultValue: "",
5380
+ description: "The email to receive admin notifications.",
5381
+ category: "Admin",
5382
+ group: API_SERVICE_GROUPS.ADMIN.id,
5383
+ order: 2
5384
+ }),
5385
+ MaxFileSize: makeNumberSetting({
5386
+ key: "MaxFileSize",
5387
+ name: "Max File Size",
5388
+ defaultValue: 30,
5389
+ description: "The maximum file size allowed for uploads in MB.",
5390
+ category: "Knowledge",
5391
+ group: API_SERVICE_GROUPS.KNOWLEDGE.id,
5392
+ order: 1
5393
+ }),
5394
+ DefaultContext: makeNumberSetting({
5395
+ key: "DefaultContext",
5396
+ name: "Default Context Size",
5397
+ defaultValue: 4096,
5398
+ description: "The default context size for AI models.",
5399
+ category: "AI",
5400
+ order: 2
5401
+ }),
5402
+ FeedbackSendEmailUsername: makeStringSetting({
5403
+ key: "FeedbackSendEmailUsername",
5404
+ name: "Sender Email Username",
5405
+ defaultValue: "",
5406
+ description: "The username for the email account used to send feedback.",
5407
+ category: "Feedback",
5408
+ group: API_SERVICE_GROUPS.FEEDBACK.id,
5409
+ order: 7,
5410
+ isSensitive: true
5411
+ }),
5412
+ FeedbackSendEmailPassword: makeStringSetting({
5413
+ key: "FeedbackSendEmailPassword",
5414
+ name: "Sender Email Password",
5415
+ defaultValue: "",
5416
+ description: "The password for the email account used to send feedback.",
5417
+ category: "Feedback",
5418
+ group: API_SERVICE_GROUPS.FEEDBACK.id,
5419
+ order: 8,
5420
+ isSensitive: true
5421
+ }),
5422
+ ScanURLinPrompt: makeBooleanSetting({
5423
+ key: "ScanURLinPrompt",
5424
+ name: "Scan URL in Prompt",
5425
+ defaultValue: true,
5426
+ description: "Whether to scan and process URLs in user prompts.",
5427
+ category: "AI",
5428
+ order: 7
5429
+ }),
5430
+ DefaultInviteCode: makeStringSetting({
5431
+ key: "DefaultInviteCode",
5432
+ name: "Default Invite Code",
5433
+ defaultValue: "",
5434
+ description: "The default invite code for new user registrations.",
5435
+ category: "Users",
5436
+ group: API_SERVICE_GROUPS.REGISTRATION.id,
5437
+ order: 2
5438
+ }),
5439
+ serverStatus: makeStringSetting({
5440
+ key: "serverStatus",
5441
+ name: "Server Status",
5442
+ defaultValue: "live",
5443
+ description: "The current status of the server.",
5444
+ category: "Admin",
5445
+ group: API_SERVICE_GROUPS.ADMIN.id,
5446
+ order: 1,
5447
+ options: Object.values(ServerStatusEnum)
5448
+ }),
5449
+ defaultSeats: makeNumberSetting({
5450
+ key: "defaultSeats",
5451
+ name: "Default Seats",
5452
+ defaultValue: 20,
5453
+ description: "The default number of seats for new organizations.",
5454
+ category: "Users"
5455
+ }),
5456
+ enableGoogleCalendar: makeBooleanSetting({
5457
+ key: "enableGoogleCalendar",
5458
+ name: "Enable Google Calendar Integration",
5459
+ defaultValue: false,
5460
+ description: "Whether to enable scheduling of briefing/advisory using google calendar",
5461
+ category: "Calendar",
5462
+ group: API_SERVICE_GROUPS.CALENDAR.id,
5463
+ order: 1
5464
+ }),
5465
+ googleCalendarServiceAccountEmail: makeStringSetting({
5466
+ key: "googleCalendarServiceAccountEmail",
5467
+ name: "Service Account Email",
5468
+ defaultValue: "",
5469
+ description: "The service account email address that has access to google calendar API.",
5470
+ category: "Calendar",
5471
+ group: API_SERVICE_GROUPS.CALENDAR.id,
5472
+ order: 2
5473
+ }),
5474
+ googleCalendarServiceAccountSecret: makeStringSetting({
5475
+ key: "googleCalendarServiceAccountSecret",
5476
+ name: "Service Account Secret",
5477
+ defaultValue: "",
5478
+ description: "The base64 encoded service account secret that is associated with the service account email.",
5479
+ category: "Calendar",
5480
+ group: API_SERVICE_GROUPS.CALENDAR.id,
5481
+ order: 3,
5482
+ isSensitive: true
5483
+ }),
5484
+ googleCalendarOrganizerEmail: makeStringSetting({
5485
+ key: "googleCalendarOrganizerEmail",
5486
+ name: "Organizer Email",
5487
+ defaultValue: "",
5488
+ description: "The organizer email for creating events.",
5489
+ category: "Calendar",
5490
+ group: API_SERVICE_GROUPS.CALENDAR.id,
5491
+ order: 4
5492
+ }),
5493
+ enforceCredits: makeBooleanSetting({
5494
+ key: "enforceCredits",
5495
+ name: "Enforce Credits",
5496
+ defaultValue: true,
5497
+ description: "Whether to enforce credits for users",
5498
+ group: API_SERVICE_GROUPS.CREDITS.id,
5499
+ category: "Users"
5500
+ }),
5501
+ enableTeamPlan: makeBooleanSetting({
5502
+ key: "enableTeamPlan",
5503
+ name: "Enable Team Plan",
5504
+ defaultValue: false,
5505
+ description: "Whether to enable team plans",
5506
+ group: API_SERVICE_GROUPS.CREDITS.id,
5507
+ category: "Users"
5508
+ }),
5509
+ FacebookLink: makeStringSetting({
5510
+ key: "FacebookLink",
5511
+ name: "Facebook Link",
5512
+ defaultValue: void 0,
5513
+ description: "The Facebook social media link.",
5514
+ category: "Branding",
5515
+ group: API_SERVICE_GROUPS.BRANDING.id,
5516
+ order: 3
5517
+ }),
5518
+ RedditLink: makeStringSetting({
5519
+ key: "RedditLink",
5520
+ name: "Reddit Link",
5521
+ defaultValue: void 0,
5522
+ description: "The Reddit social media link.",
5523
+ category: "Branding",
5524
+ group: API_SERVICE_GROUPS.BRANDING.id,
5525
+ order: 7
5526
+ }),
5527
+ InstagramLink: makeStringSetting({
5528
+ key: "InstagramLink",
5529
+ name: "Instagram Link",
5530
+ defaultValue: void 0,
5531
+ description: "The Instagram social media link.",
5532
+ category: "Branding",
5533
+ group: API_SERVICE_GROUPS.BRANDING.id,
5534
+ order: 5
5535
+ }),
5536
+ YoutubeLink: makeStringSetting({
5537
+ key: "YoutubeLink",
5538
+ name: "Youtube Link",
5539
+ defaultValue: void 0,
5540
+ description: "The Youtube social media link.",
5541
+ category: "Branding",
5542
+ group: API_SERVICE_GROUPS.BRANDING.id,
5543
+ order: 6
5544
+ }),
5545
+ TwitterLink: makeStringSetting({
5546
+ key: "TwitterLink",
5547
+ name: "Twitter Link",
5548
+ defaultValue: void 0,
5549
+ description: "The Twitter social media link.",
5550
+ category: "Branding",
5551
+ group: API_SERVICE_GROUPS.BRANDING.id,
5552
+ order: 4
5553
+ }),
5554
+ logoSettings: makeObjectSetting({
5555
+ key: "logoSettings",
5556
+ name: "Logo Settings",
5557
+ defaultValue: {
5558
+ customLogoUrl: "",
5559
+ customDarkLogoUrl: "",
5560
+ useBothLogos: false
5561
+ },
5562
+ description: "Logo configuration for light and dark modes.",
5563
+ category: "Branding",
5564
+ group: API_SERVICE_GROUPS.BRANDING.id,
5565
+ order: 3,
5566
+ schema: LogoSettingsSchema
5567
+ }),
5568
+ CSMandCTAFlag: makeBooleanSetting({
5569
+ key: "CSMandCTAFlag",
5570
+ name: "Toggle the CSM and CTA Display",
5571
+ defaultValue: false,
5572
+ description: "Toggle the Customer Success Manager and CTA Display",
5573
+ category: "Users",
5574
+ group: API_SERVICE_GROUPS.USER_MANAGEMENT.id,
5575
+ order: 3
5576
+ }),
5577
+ SystemFiles: makeStringSetting({
5578
+ key: "SystemFiles",
5579
+ name: "System Prompt Files",
5580
+ defaultValue: void 0,
5581
+ description: "The global system prompt files to be used for AI model configuration.",
5582
+ category: "AI",
5583
+ group: API_SERVICE_GROUPS.OPENAI.id,
5584
+ order: 8
5585
+ }),
5586
+ OpenWeatherKey: makeStringSetting({
5587
+ key: "OpenWeatherKey",
5588
+ name: "OpenWeather Key",
5589
+ defaultValue: "",
5590
+ description: "The key for the OpenWeather API.",
5591
+ category: "Tools",
5592
+ group: API_SERVICE_GROUPS.WEATHER.id,
5593
+ order: 2,
5594
+ isSensitive: true
5595
+ }),
5596
+ SerperKey: makeStringSetting({
5597
+ key: "SerperKey",
5598
+ name: "Serp Search API Key",
5599
+ defaultValue: "",
5600
+ description: "The key for the Serp Search API.",
5601
+ category: "Tools",
5602
+ group: API_SERVICE_GROUPS.SEARCH.id,
5603
+ order: 1,
5604
+ isSensitive: true
5605
+ }),
5606
+ WolframAlphaKey: makeStringSetting({
5607
+ key: "WolframAlphaKey",
5608
+ name: "Wolfram Alpha API Key",
5609
+ defaultValue: "",
5610
+ description: "The AppID for Wolfram Alpha LLM API. Get one at developer.wolframalpha.com.",
5611
+ category: "Tools",
5612
+ group: API_SERVICE_GROUPS.SEARCH.id,
5613
+ order: 2,
5614
+ isSensitive: true
5615
+ }),
5616
+ FmpApiKey: makeStringSetting({
5617
+ key: "FmpApiKey",
5618
+ name: "Financial Modeling Prep API Key",
5619
+ defaultValue: "",
5620
+ description: "API key for Financial Modeling Prep (stock quotes, company data, financial statements). Get one at financialmodelingprep.com.",
5621
+ category: "Tools",
5622
+ group: API_SERVICE_GROUPS.SEARCH.id,
5623
+ order: 3,
5624
+ isSensitive: true
5625
+ }),
5626
+ EnableFmpFinancialData: makeBooleanSetting({
5627
+ key: "EnableFmpFinancialData",
5628
+ name: "Enable Financial Data Tool",
5629
+ defaultValue: false,
5630
+ description: "Whether to enable the FMP Financial Data tool for stock quotes, company profiles, and financial statements in chat. Requires FmpApiKey to be set.",
5631
+ category: "Experimental",
5632
+ group: API_SERVICE_GROUPS.EXPERIMENTAL.id,
5633
+ order: 260
5634
+ }),
5635
+ PotionQuestApiKey: makeStringSetting({
5636
+ key: "PotionQuestApiKey",
5637
+ name: "PotionQuest API Key",
5638
+ defaultValue: "",
5639
+ description: "API key for PotionQuest (procedural RPG content: NPCs, encounters, quests, loot, prophecies, legendary affixes, dice rolls). Get one at potionquest.com.",
5640
+ category: "Tools",
5641
+ group: API_SERVICE_GROUPS.SEARCH.id,
5642
+ order: 4,
5643
+ isSensitive: true
5644
+ }),
5645
+ EnablePotionQuest: makeBooleanSetting({
5646
+ key: "EnablePotionQuest",
5647
+ name: "Enable PotionQuest Tools",
5648
+ defaultValue: false,
5649
+ description: "Whether to expose the PotionQuest dice + content generators as tools to tavern agents. Requires PotionQuestApiKey to be set.",
5650
+ category: "Experimental",
5651
+ group: API_SERVICE_GROUPS.EXPERIMENTAL.id,
5652
+ order: 270
5653
+ }),
5654
+ EnableTavernQuestBoardContext: makeBooleanSetting({
5655
+ key: "EnableTavernQuestBoardContext",
5656
+ name: "Inject Quest Board Into Heartbeat Prompt",
5657
+ defaultValue: true,
5658
+ description: "Whether agent heartbeats see the quest board and their claimed quests in the system prompt. Toggle OFF for diagnostic isolation: when disabled, agents only see user @mentions and direct context, removing the pull from previously-claimed quests. The quest board itself still functions; only the prompt context is suppressed.",
5659
+ category: "Experimental",
5660
+ group: API_SERVICE_GROUPS.EXPERIMENTAL.id,
5661
+ order: 280
5662
+ }),
5663
+ VectorThreshold: makeNumberSetting({
5664
+ key: "VectorThreshold",
5665
+ name: "Vector Threshold",
5666
+ defaultValue: 4e4,
5667
+ description: "The file size threshold (in bytes) above which files should be vectorized.",
5668
+ category: "Knowledge",
5669
+ group: API_SERVICE_GROUPS.KNOWLEDGE.id,
5670
+ order: 2
5671
+ }),
5672
+ MaxContentLength: makeNumberSetting({
5673
+ key: "MaxContentLength",
5674
+ name: "Max Content Length",
5675
+ defaultValue: 5e4,
5676
+ description: "The maximum character length for file content displayed in workbench (truncated if larger).",
5677
+ category: "Knowledge",
5678
+ group: API_SERVICE_GROUPS.KNOWLEDGE.id,
5679
+ order: 3
5680
+ }),
5681
+ enableAutoChunk: makeBooleanSetting({
5682
+ key: "enableAutoChunk",
5683
+ name: "Enable Auto Chunk and Vector",
5684
+ defaultValue: true,
5685
+ description: "When enabled, the system will automatically chunk and vectorize the knowledge upon successful upload.",
5686
+ category: "Knowledge",
5687
+ group: API_SERVICE_GROUPS.KNOWLEDGE.id,
5688
+ order: 4
5689
+ }),
5690
+ EnableWeatherService: makeBooleanSetting({
5691
+ key: "EnableWeatherService",
5692
+ name: "Enable Weather Service",
5693
+ defaultValue: true,
5694
+ description: "Whether to enable the OpenWeather API integration.",
5695
+ category: "Tools",
5696
+ group: API_SERVICE_GROUPS.WEATHER.id,
5697
+ order: 1
5698
+ }),
5699
+ WeatherUnits: makeStringSetting({
5700
+ key: "WeatherUnits",
5701
+ name: "Weather Units",
5702
+ defaultValue: "metric",
5703
+ description: "The unit system to use for weather data (metric/imperial).",
5704
+ category: "Tools",
5705
+ group: API_SERVICE_GROUPS.WEATHER.id,
5706
+ order: 3,
5707
+ options: ["metric", "imperial"]
5708
+ }),
5709
+ EnableMCPServer: makeBooleanSetting({
5710
+ key: "EnableMCPServer",
5711
+ name: "Enable MCP Server",
5712
+ defaultValue: false,
5713
+ description: "Whether to enable the MCP Server.",
5714
+ category: "Tools",
5715
+ group: API_SERVICE_GROUPS.MCP.id,
5716
+ order: 1
5717
+ }),
5718
+ githubMcpClientId: makeStringSetting({
5719
+ key: "githubMcpClientId",
5720
+ name: "GitHub MCP Client ID",
5721
+ defaultValue: "",
5722
+ description: "The OAuth Client ID for GitHub MCP integration.",
5723
+ category: "Tools",
5724
+ group: API_SERVICE_GROUPS.MCP.id,
5725
+ order: 2,
5726
+ isSensitive: false
5727
+ }),
5728
+ githubMcpClientSecret: makeStringSetting({
5729
+ key: "githubMcpClientSecret",
5730
+ name: "GitHub MCP Client Secret",
5731
+ defaultValue: "",
5732
+ description: "The OAuth Client Secret for GitHub MCP integration.",
5733
+ category: "Tools",
5734
+ group: API_SERVICE_GROUPS.MCP.id,
5735
+ order: 3,
5736
+ isSensitive: true
5737
+ }),
5738
+ atlassianClientId: makeStringSetting({
5739
+ key: "atlassianClientId",
5740
+ name: "Atlassian Client ID",
5741
+ defaultValue: "",
5742
+ description: "The OAuth Client ID for Atlassian integration (Jira and Confluence).",
5743
+ category: "Tools",
5744
+ group: API_SERVICE_GROUPS.MCP.id,
5745
+ order: 4,
5746
+ isSensitive: false
5747
+ }),
5748
+ atlassianClientSecret: makeStringSetting({
5749
+ key: "atlassianClientSecret",
5750
+ name: "Atlassian Client Secret",
5751
+ defaultValue: "",
5752
+ description: "The OAuth Client Secret for Atlassian integration (Jira and Confluence).",
5753
+ category: "Tools",
5754
+ group: API_SERVICE_GROUPS.MCP.id,
5755
+ order: 5,
5756
+ isSensitive: true
5757
+ }),
5758
+ notionClientId: makeStringSetting({
5759
+ key: "notionClientId",
5760
+ name: "Notion Client ID",
5761
+ defaultValue: "",
5762
+ description: "The OAuth Client ID for Notion integration.",
5763
+ category: "Tools",
5764
+ group: API_SERVICE_GROUPS.MCP.id,
5765
+ order: 6,
5766
+ isSensitive: false
5767
+ }),
5768
+ notionClientSecret: makeStringSetting({
5769
+ key: "notionClientSecret",
5770
+ name: "Notion Client Secret",
5771
+ defaultValue: "",
5772
+ description: "The OAuth Client Secret for Notion integration.",
5773
+ category: "Tools",
5774
+ group: API_SERVICE_GROUPS.MCP.id,
5775
+ order: 7,
5776
+ isSensitive: true
5777
+ }),
5778
+ qWorkUrl: makeStringSetting({
5779
+ key: "qWorkUrl",
5780
+ name: "Q/Work URL",
5781
+ defaultValue: "",
5782
+ description: "The base URL for the Q/Work API (for example: https://q.bike4mind.com).",
5783
+ category: "Tools",
5784
+ group: API_SERVICE_GROUPS.Q_WORK.id,
5785
+ order: 1
5786
+ }),
5787
+ qWorkToken: makeStringSetting({
5788
+ key: "qWorkToken",
5789
+ name: "Q/Work Token",
5790
+ defaultValue: "",
5791
+ description: "The bearer token used to authenticate requests to Q/Work.",
5792
+ category: "Tools",
5793
+ group: API_SERVICE_GROUPS.Q_WORK.id,
5794
+ order: 2,
5795
+ isSensitive: true
5796
+ }),
5797
+ EnableOllama: makeBooleanSetting({
5798
+ key: "EnableOllama",
5799
+ name: "Enable Ollama",
5800
+ defaultValue: false,
5801
+ description: "Whether to enable Ollama for local model usage. Requires ollamaBackend to be set.",
5802
+ category: "Experimental",
5803
+ group: API_SERVICE_GROUPS.EXPERIMENTAL.id,
5804
+ order: 70
5805
+ }),
5806
+ EnableOllamaDefault: makeBooleanSetting({
5807
+ key: "EnableOllamaDefault",
5808
+ name: "Private Model Hub: On by default for users",
5809
+ defaultValue: false,
5810
+ description: "When enabled, Private Model Hub is active for users who have never explicitly toggled it.",
5811
+ category: "Experimental",
5812
+ group: API_SERVICE_GROUPS.EXPERIMENTAL.id,
5813
+ order: 71,
5814
+ dependsOn: "EnableOllama"
5815
+ }),
5816
+ ollamaBackend: makeStringSetting({
5817
+ key: "ollamaBackend",
5818
+ name: "Ollama Backend",
5819
+ defaultValue: "",
5820
+ description: "The backend for the Ollama API, e.g. http://localhost:11434",
5821
+ category: "Experimental",
5822
+ group: API_SERVICE_GROUPS.EXPERIMENTAL.id,
5823
+ order: 72,
5824
+ isSensitive: true,
5825
+ dependsOn: "EnableOllama"
5826
+ }),
5827
+ bflApiKey: makeStringSetting({
5828
+ key: "bflApiKey",
5829
+ name: "BlackForest Labs API Key",
5830
+ defaultValue: "",
5831
+ description: "The API Key for BlackForest Labs image generation service.",
5832
+ isSensitive: true,
5833
+ category: "AI",
5834
+ group: API_SERVICE_GROUPS.IMAGE_GENERATION.id,
5835
+ order: 1
5836
+ }),
5837
+ defaultEmbeddingModel: makeStringSetting({
5838
+ key: "defaultEmbeddingModel",
5839
+ name: "Default Embedding Model",
5840
+ defaultValue: "text-embedding-ada-002",
5841
+ description: "The default embedding model to use",
5842
+ category: "AI",
5843
+ group: API_SERVICE_GROUPS.EMBEDDING.id,
5844
+ options: [
5845
+ ...Object.values(OpenAIEmbeddingModel),
5846
+ ...Object.values(VoyageAIEmbeddingModel),
5847
+ ...Object.values(BedrockEmbeddingModel)
5848
+ ]
5849
+ }),
5850
+ slackSigningSecret: makeStringSetting({
5851
+ key: "slackSigningSecret",
5852
+ name: "Slack Signing Secret",
5853
+ defaultValue: "",
5854
+ description: "The signing secret from your Slack app configuration for request verification.",
5855
+ category: "Slack",
5856
+ group: API_SERVICE_GROUPS.SLACK.id,
5857
+ order: 1,
5858
+ isSensitive: true
5859
+ }),
5860
+ slackBotToken: makeStringSetting({
5861
+ key: "slackBotToken",
5862
+ name: "Slack Bot Token",
5863
+ defaultValue: "",
5864
+ description: "The bot user OAuth token from your Slack app (starts with xoxb-).",
5865
+ category: "Slack",
5866
+ group: API_SERVICE_GROUPS.SLACK.id,
5867
+ order: 2,
5868
+ isSensitive: true
5869
+ }),
5870
+ enforceMFA: makeBooleanSetting({
5871
+ key: "enforceMFA",
5872
+ name: "Enforce Multi-Factor Authentication",
5873
+ description: "Require TOTP (Time-based One-Time Password) for all users when logging in. When disabled, MFA is optional and users can enable/disable it in their profiles.",
5874
+ defaultValue: false,
5875
+ category: "Users"
5876
+ }),
5877
+ FirecrawlApiKey: makeStringSetting({
5878
+ key: "FirecrawlApiKey",
5879
+ name: "Firecrawl API Key",
5880
+ description: "The API key for Firecrawl web scraping service",
5881
+ defaultValue: "",
5882
+ isSensitive: true,
5883
+ category: "AI"
5884
+ }),
5885
+ EnableDeepResearch: makeBooleanSetting({
5886
+ key: "EnableDeepResearch",
5887
+ name: "Enable Deep Research",
5888
+ defaultValue: true,
5889
+ description: "Whether to enable the Deep Research tool for comprehensive web-based research.",
5890
+ category: "Experimental",
5891
+ group: API_SERVICE_GROUPS.EXPERIMENTAL.id,
5892
+ order: 40
5893
+ }),
5894
+ EnableDeepResearchDefault: makeBooleanSetting({
5895
+ key: "EnableDeepResearchDefault",
5896
+ name: "Deep Research: On by default for users",
5897
+ defaultValue: false,
5898
+ description: "When enabled, Deep Research is active for users who have never explicitly toggled it.",
5899
+ category: "Experimental",
5900
+ group: API_SERVICE_GROUPS.EXPERIMENTAL.id,
5901
+ order: 41,
5902
+ dependsOn: "EnableDeepResearch"
5903
+ }),
5904
+ EnableLattice: makeBooleanSetting({
5905
+ key: "EnableLattice",
5906
+ name: "Enable Lattice",
5907
+ defaultValue: false,
5908
+ description: "Whether to enable the Lattice feature for natural language financial pro-forma modeling. Allows creating and manipulating spreadsheet-like models through conversation.",
5909
+ category: "Experimental",
5910
+ group: API_SERVICE_GROUPS.EXPERIMENTAL.id,
5911
+ order: 50
5912
+ }),
5913
+ EnableLatticeDefault: makeBooleanSetting({
5914
+ key: "EnableLatticeDefault",
5915
+ name: "Lattice: On by default for users",
5916
+ defaultValue: false,
5917
+ description: "When enabled, Lattice is active for users who have never explicitly toggled it.",
5918
+ category: "Experimental",
5919
+ group: API_SERVICE_GROUPS.EXPERIMENTAL.id,
5920
+ order: 51,
5921
+ dependsOn: "EnableLattice"
5922
+ }),
5923
+ EnableKnowledgeBaseSearch: makeBooleanSetting({
5924
+ key: "EnableKnowledgeBaseSearch",
5925
+ name: "Enable Knowledge Base Search",
5926
+ defaultValue: true,
5927
+ description: "Allow AI to search user uploaded documents. When enabled, users can toggle the Knowledge Base Search tool in AI Settings.",
5928
+ category: "Experimental",
5929
+ group: API_SERVICE_GROUPS.EXPERIMENTAL.id,
5930
+ order: 210
5931
+ }),
5932
+ enableVoiceSession: makeBooleanSetting({
5933
+ key: "enableVoiceSession",
5934
+ name: "Enable Voice Session",
5935
+ defaultValue: false,
5936
+ description: "Whether to enable the voice session.",
5937
+ category: "AI",
5938
+ group: API_SERVICE_GROUPS.VOICE_SESSION.id,
5939
+ order: 9
5940
+ }),
5941
+ voiceSessionAiVoice: makeStringSetting({
5942
+ key: "voiceSessionAiVoice",
5943
+ name: "Default Assistant Voice",
5944
+ defaultValue: "alloy",
5945
+ description: "The default voice for the assistant in the voice session.",
5946
+ options: [
5947
+ "alloy",
5948
+ "ash",
5949
+ "ballad",
5950
+ "cedar",
5951
+ "coral",
5952
+ "echo",
5953
+ "marin",
5954
+ "sage",
5955
+ "shimmer",
5956
+ "verse"
5957
+ ],
5958
+ category: "AI",
5959
+ group: API_SERVICE_GROUPS.VOICE_SESSION.id,
5960
+ order: 10
5961
+ }),
5962
+ voiceSessionTranscriptionModel: makeStringSetting({
5963
+ key: "voiceSessionTranscriptionModel",
5964
+ name: "Default Voice Session Transcription Model",
5965
+ defaultValue: "whisper-1",
5966
+ description: "The default model to use for transcribing the user's voice in the voice session.",
5967
+ category: "AI",
5968
+ group: API_SERVICE_GROUPS.VOICE_SESSION.id,
5969
+ options: [
5970
+ "gpt-4o-transcribe",
5971
+ "gpt-4o-mini-transcribe",
5972
+ "whisper-1"
5973
+ ],
5974
+ order: 11
5975
+ }),
5976
+ voiceSessionVadType: makeStringSetting({
5977
+ key: "voiceSessionVadType",
5978
+ name: "Turn Detection Mode",
5979
+ defaultValue: "semantic_vad",
5980
+ description: "How the system detects when the user has finished speaking. \"semantic_vad\" uses a classifier to understand when the user is done (recommended). \"server_vad\" uses silence duration.",
5981
+ category: "AI",
5982
+ group: API_SERVICE_GROUPS.VOICE_SESSION.id,
5983
+ options: ["server_vad", "semantic_vad"],
5984
+ order: 12
5985
+ }),
5986
+ voiceSessionVadEagerness: makeStringSetting({
5987
+ key: "voiceSessionVadEagerness",
5988
+ name: "Semantic VAD Eagerness",
5989
+ defaultValue: "medium",
5990
+ description: "How eagerly the assistant responds when using semantic VAD. \"low\" waits longer (8s max), \"medium\" is balanced (4s max, recommended), \"high\" responds quickly (2s max).",
5991
+ category: "AI",
5992
+ group: API_SERVICE_GROUPS.VOICE_SESSION.id,
5993
+ options: [
5994
+ "low",
5995
+ "medium",
5996
+ "high"
5997
+ ],
5998
+ order: 13
5999
+ }),
6000
+ RapidReplySettings: makeObjectSetting({
6001
+ key: "RapidReplySettings",
6002
+ name: "Rapid Reply Settings",
6003
+ defaultValue: {
6004
+ enabled: false,
6005
+ allowedUserTags: [],
6006
+ defaultMaxTokens: 150,
6007
+ defaultResponseStyle: "auto",
6008
+ maxAcceptableLatency: 2e3,
6009
+ minSuccessRate: 90,
6010
+ transitionMode: "replace",
6011
+ showIndicator: true,
6012
+ indicatorText: "Thinking...",
6013
+ fallbackBehavior: "continue",
6014
+ metrics: {
6015
+ totalRequests: 0,
6016
+ successfulRequests: 0,
6017
+ averageLatency: 0,
6018
+ lastUpdated: /* @__PURE__ */ new Date()
6019
+ }
6020
+ },
6021
+ description: "Configuration settings for the Rapid Reply feature that provides instant acknowledgments using fast mini models.",
6022
+ category: "Experimental",
6023
+ group: API_SERVICE_GROUPS.EXPERIMENTAL.id,
6024
+ order: 10,
6025
+ schema: RapidReplySettingsSchema
6026
+ }),
6027
+ pdfjsExpressViewerKey: makeStringSetting({
6028
+ key: "pdfjsExpressViewerKey",
6029
+ name: "PDF.js Express Viewer Key",
6030
+ defaultValue: "",
6031
+ description: "The license key for PDF.js Express Viewer for PDF document viewing.",
6032
+ isSensitive: true,
6033
+ category: "Tools",
6034
+ group: API_SERVICE_GROUPS.PDF_VIEWER.id,
6035
+ order: 1
6036
+ }),
6037
+ EnableEmailAnalysis: makeBooleanSetting({
6038
+ key: "EnableEmailAnalysis",
6039
+ name: "Enable Email Analysis",
6040
+ defaultValue: true,
6041
+ description: "Enable AI-powered analysis of ingested emails (summary, entities, sentiment, action items).",
6042
+ category: "AI",
6043
+ order: 200
6044
+ }),
6045
+ EmailAnalysisModel: makeStringSetting({
6046
+ key: "EmailAnalysisModel",
6047
+ name: "Email Analysis Model",
6048
+ defaultValue: "us.anthropic.claude-haiku-4-5-20251001-v1:0",
6049
+ description: "The AI model to use for email analysis. Defaults to Claude 4.5 Haiku via Bedrock.",
6050
+ options: CHAT_MODELS,
6051
+ category: "AI",
6052
+ order: 201
6053
+ }),
6054
+ EmailAnalysisTemperature: makeNumberSetting({
6055
+ key: "EmailAnalysisTemperature",
6056
+ name: "Email Analysis Temperature",
6057
+ defaultValue: .3,
6058
+ description: "Temperature setting for email analysis LLM (0.0-1.0). Lower values = more deterministic.",
6059
+ category: "AI",
6060
+ order: 202
6061
+ }),
6062
+ EmailAnalysisPrompt: makeStringSetting({
6063
+ key: "EmailAnalysisPrompt",
6064
+ name: "Email Analysis Meta-Prompt",
6065
+ defaultValue: "",
6066
+ description: "Custom meta-prompt template for email analysis. Leave empty to use default. Supports variables: {{from}}, {{to}}, {{subject}}, {{bodyMarkdown}}",
6067
+ category: "AI",
6068
+ order: 203
6069
+ }),
6070
+ MaxDailyEmailAnalyses: makeNumberSetting({
6071
+ key: "MaxDailyEmailAnalyses",
6072
+ name: "Max Daily Email Analyses",
6073
+ defaultValue: 100,
6074
+ description: "Maximum number of AI email analyses per user per 24-hour period. Prevents cost explosion from spam floods.",
6075
+ category: "AI",
6076
+ order: 204
6077
+ }),
6078
+ whatsNewAutomationEnabled: makeBooleanSetting({
6079
+ key: "whatsNewAutomationEnabled",
6080
+ name: "Enable What's New Automation",
6081
+ defaultValue: false,
6082
+ description: "Enable automated generation of What's New modals from release information. Disable to prevent automatic modal creation during releases.",
6083
+ category: "Admin",
6084
+ order: 100
6085
+ }),
6086
+ whatsNewConfig: makeObjectSetting({
6087
+ key: "whatsNewConfig",
6088
+ name: "What's New Configuration",
6089
+ defaultValue: {
6090
+ modelId: "gpt-4o-mini",
6091
+ temperature: .7,
6092
+ maxTokens: 2e3,
6093
+ timeoutMs: 12e4,
6094
+ modalPriority: 10,
6095
+ modalExpiryDays: 30,
6096
+ maxPreviousModals: 10,
6097
+ titleMaxLength: 100,
6098
+ subtitleMaxLength: 200,
6099
+ descriptionMaxLength: 2e3,
6100
+ maxCommits: 50,
6101
+ maxPullRequests: 20,
6102
+ maxReleaseBodyLength: 2e3,
6103
+ maxCommitMessageLength: 200,
6104
+ maxPRBodyLength: 500,
6105
+ maxChangelogLength: 1e3,
6106
+ repository: "MillionOnMars/lumina5",
6107
+ targetBranch: "main"
6108
+ },
6109
+ description: "Configuration for automated What's New modal generation, including LLM model selection, prompt parameters, validation rules, and content sanitization limits.",
6110
+ category: "Admin",
6111
+ order: 101,
6112
+ schema: WhatsNewConfigSchema
6113
+ }),
6114
+ whatsNewSyncConfig: makeObjectSetting({
6115
+ key: "whatsNewSyncConfig",
6116
+ name: "What's New Sync Configuration",
6117
+ defaultValue: { autoSyncEnabled: true },
6118
+ description: "Configuration for What's New modal syncing from production. Used by fork/non-production environments to control automatic synchronization.",
6119
+ category: "Admin",
6120
+ order: 102,
6121
+ schema: WhatsNewSyncConfigSchema
6122
+ }),
6123
+ enableAgentProactiveMessages: makeBooleanSetting({
6124
+ key: "enableAgentProactiveMessages",
6125
+ name: "Enable Agent Proactive Messages",
6126
+ defaultValue: false,
6127
+ description: "Enable agents to send proactive messages to users in sessions. When disabled, the agent proactive messaging settings button will be hidden.",
6128
+ category: "Experimental",
6129
+ group: API_SERVICE_GROUPS.EXPERIMENTAL.id,
6130
+ order: 12,
6131
+ dependsOn: "EnableAgents"
6132
+ }),
6133
+ EnableEnhancedDateTime: makeBooleanSetting({
6134
+ key: "EnableEnhancedDateTime",
6135
+ name: "Enable Enhanced DateTime",
6136
+ defaultValue: true,
6137
+ description: "Enable advanced datetime features: Unix timestamps, Julian days, date calculations, historical day lookups.",
6138
+ category: "Tools",
6139
+ group: API_SERVICE_GROUPS.DATETIME_ASTRONOMY.id,
6140
+ order: 1
6141
+ }),
6142
+ EnableHistoricalFeatures: makeBooleanSetting({
6143
+ key: "EnableHistoricalFeatures",
6144
+ name: "Enable Historical Features",
6145
+ defaultValue: true,
6146
+ description: "Enable Wikipedia \"On This Day\" tool for historical events, births, deaths, and holidays.",
6147
+ category: "Tools",
6148
+ group: API_SERVICE_GROUPS.DATETIME_ASTRONOMY.id,
6149
+ order: 2
6150
+ }),
6151
+ EnableAstronomyFeatures: makeBooleanSetting({
6152
+ key: "EnableAstronomyFeatures",
6153
+ name: "Enable Astronomy Features",
6154
+ defaultValue: true,
6155
+ description: "Enable astronomy tools: moon phases, sunrise/sunset calculations, and ISS tracking.",
6156
+ category: "Tools",
6157
+ group: API_SERVICE_GROUPS.DATETIME_ASTRONOMY.id,
6158
+ order: 3
6159
+ }),
6160
+ EnableStreamIdleTimeout: makeBooleanSetting({
6161
+ key: "EnableStreamIdleTimeout",
6162
+ name: "Enable Stream Idle Timeout",
6163
+ defaultValue: true,
6164
+ description: "Detect and abort hanging Anthropic streams when no events are received within the timeout period.",
6165
+ category: "Experimental",
6166
+ group: API_SERVICE_GROUPS.EXPERIMENTAL.id,
6167
+ order: 250
6168
+ }),
6169
+ StreamIdleTimeoutSeconds: makeNumberSetting({
6170
+ key: "StreamIdleTimeoutSeconds",
6171
+ name: "Stream Idle Timeout (seconds)",
6172
+ defaultValue: 90,
6173
+ description: "Seconds to wait between stream events before aborting. Use 180 for thinking models (Claude 4.x with extended thinking). Default: 90 seconds.",
6174
+ category: "Experimental",
6175
+ group: API_SERVICE_GROUPS.EXPERIMENTAL.id,
6176
+ order: 251,
6177
+ dependsOn: "EnableStreamIdleTimeout"
6178
+ }),
6179
+ EnableMcpToolFiltering: makeBooleanSetting({
6180
+ key: "EnableMcpToolFiltering",
6181
+ name: "Enable MCP Tool Filtering",
6182
+ defaultValue: false,
6183
+ description: "Filter MCP tools by relevance to user query to reduce payload size. Experimental feature to reduce streaming hangs with large tool sets (e.g., Jira with 44 tools).",
6184
+ category: "Experimental",
6185
+ group: API_SERVICE_GROUPS.EXPERIMENTAL.id,
6186
+ order: 220
6187
+ }),
6188
+ McpToolFilteringMaxTools: makeNumberSetting({
6189
+ key: "McpToolFilteringMaxTools",
6190
+ name: "Max MCP Tools After Filtering",
6191
+ defaultValue: 20,
6192
+ description: "Maximum number of MCP tools to send after relevance filtering. Only applies when EnableMcpToolFiltering is enabled.",
6193
+ category: "Experimental",
6194
+ group: API_SERVICE_GROUPS.EXPERIMENTAL.id,
6195
+ order: 221,
6196
+ dependsOn: "EnableMcpToolFiltering"
6197
+ }),
6198
+ EnableParallelToolExecution: makeBooleanSetting({
6199
+ key: "EnableParallelToolExecution",
6200
+ name: "Enable Parallel Tool Execution",
6201
+ defaultValue: false,
6202
+ description: "Execute read-only tools (file reads, searches) in parallel for 2-3x speed improvement. Write tools still execute sequentially for safety.",
6203
+ category: "Experimental",
6204
+ group: API_SERVICE_GROUPS.EXPERIMENTAL.id,
6205
+ order: 230
6206
+ }),
6207
+ EnableHelpChat: makeBooleanSetting({
6208
+ key: "EnableHelpChat",
6209
+ name: "Enable Help Chat",
6210
+ defaultValue: true,
6211
+ description: "Enable the AI-powered chat assistant in the Help Center panel. When enabled, users can ask questions about the documentation and get contextual answers.",
6212
+ category: "Experimental",
6213
+ group: API_SERVICE_GROUPS.EXPERIMENTAL.id,
6214
+ order: 200
6215
+ }),
6216
+ EnableBmPi: makeBooleanSetting({
6217
+ key: "EnableBmPi",
6218
+ name: "Enable B4M Pi",
6219
+ defaultValue: true,
6220
+ description: "Enable the B4M Pi (Project Intelligence) module for repository analysis, task scheduling, and team activity dashboards.",
6221
+ category: "Experimental",
6222
+ group: API_SERVICE_GROUPS.EXPERIMENTAL.id,
6223
+ order: 30
6224
+ }),
6225
+ EnableBmPiDefault: makeBooleanSetting({
6226
+ key: "EnableBmPiDefault",
6227
+ name: "B4M Pi: On by default for users",
6228
+ defaultValue: false,
6229
+ description: "When enabled, B4M Pi is active for users who have never explicitly toggled it.",
6230
+ category: "Experimental",
6231
+ group: API_SERVICE_GROUPS.EXPERIMENTAL.id,
6232
+ order: 31,
6233
+ dependsOn: "EnableBmPi"
6234
+ }),
6235
+ EnableBmPiJira: makeBooleanSetting({
6236
+ key: "EnableBmPiJira",
6237
+ name: "Enable B4M Pi — Jira Integration",
6238
+ defaultValue: false,
6239
+ description: "Show Jira source toggle and Jira views in the B4M Pi dashboard. Requires \"Enable B4M Pi\" to be on.",
6240
+ category: "Experimental",
6241
+ group: API_SERVICE_GROUPS.EXPERIMENTAL.id,
6242
+ order: 32,
6243
+ dependsOn: "EnableBmPi"
6244
+ }),
6245
+ EnableQuantumCanvasser: makeBooleanSetting({
6246
+ key: "EnableQuantumCanvasser",
6247
+ name: "Enable OptiHashi",
6248
+ defaultValue: false,
6249
+ description: "Enable OptiHashi, the quantum optimizer module for AI-driven optimization across classical and quantum solvers.",
6250
+ category: "Experimental",
6251
+ group: API_SERVICE_GROUPS.EXPERIMENTAL.id,
6252
+ order: 80
6253
+ }),
6254
+ EnableQuantumCanvasserDefault: makeBooleanSetting({
6255
+ key: "EnableQuantumCanvasserDefault",
6256
+ name: "OptiHashi: On by default for users",
6257
+ defaultValue: false,
6258
+ description: "When enabled, OptiHashi is active for users who have never explicitly toggled it.",
6259
+ category: "Experimental",
6260
+ group: API_SERVICE_GROUPS.EXPERIMENTAL.id,
6261
+ order: 81,
6262
+ dependsOn: "EnableQuantumCanvasser"
6263
+ }),
6264
+ EnableContextTelemetry: makeBooleanSetting({
6265
+ key: "EnableContextTelemetry",
6266
+ name: "Enable Context Telemetry",
6267
+ defaultValue: false,
6268
+ description: "Enable privacy-first telemetry for LLM completions. Captures operational metadata for debugging without storing content or user identity.",
6269
+ category: "Admin",
6270
+ order: 120
6271
+ }),
6272
+ sreAgentConfig: makeObjectSetting({
6273
+ key: "sreAgentConfig",
6274
+ name: "SRE Agent Config",
6275
+ defaultValue: SreAgentConfigSchema.parse({}),
6276
+ description: "Configuration for the autonomous SRE Agent Trio pipeline (Sentinel → Diagnostician → Surgeon). Master kill switch defaults to disabled.",
6277
+ category: "Admin",
6278
+ order: 130,
6279
+ schema: SreAgentConfigSchema
6280
+ }),
6281
+ contextTelemetryAlerts: makeObjectSetting({
6282
+ key: "contextTelemetryAlerts",
6283
+ name: "Context Telemetry Alerts",
6284
+ defaultValue: {
6285
+ enabled: false,
6286
+ autoCreateIssues: false,
6287
+ temperature: CONTEXT_TELEMETRY_VALIDATION_LIMITS.temperature.default,
6288
+ maxTokens: CONTEXT_TELEMETRY_VALIDATION_LIMITS.maxTokens.default,
6289
+ timeoutMs: CONTEXT_TELEMETRY_VALIDATION_LIMITS.timeoutMs.default,
6290
+ llmAnalysisThreshold: CONTEXT_TELEMETRY_VALIDATION_LIMITS.llmAnalysisThreshold.default,
6291
+ alertThreshold: CONTEXT_TELEMETRY_VALIDATION_LIMITS.alertThreshold.default,
6292
+ criticalThreshold: CONTEXT_TELEMETRY_VALIDATION_LIMITS.criticalThreshold.default,
6293
+ dedupWindowMinutes: CONTEXT_TELEMETRY_VALIDATION_LIMITS.dedupWindowMinutes.default,
6294
+ regressionLookbackDays: CONTEXT_TELEMETRY_VALIDATION_LIMITS.regressionLookbackDays.default,
6295
+ regressionGracePeriodHours: CONTEXT_TELEMETRY_VALIDATION_LIMITS.regressionGracePeriodHours.default,
6296
+ duplicateAlertCooldownHours: CONTEXT_TELEMETRY_VALIDATION_LIMITS.duplicateAlertCooldownHours.default,
6297
+ enableLlmPriority: false,
6298
+ baselineWindowDays: CONTEXT_TELEMETRY_VALIDATION_LIMITS.baselineWindowDays.default,
6299
+ sloResponseTimeP95Ms: CONTEXT_TELEMETRY_VALIDATION_LIMITS.sloResponseTimeP95Ms.default,
6300
+ sloFirstTokenTimeMs: CONTEXT_TELEMETRY_VALIDATION_LIMITS.sloFirstTokenTimeMs.default,
6301
+ sloErrorRatePercent: CONTEXT_TELEMETRY_VALIDATION_LIMITS.sloErrorRatePercent.default,
6302
+ sloContextUtilizationPercent: CONTEXT_TELEMETRY_VALIDATION_LIMITS.sloContextUtilizationPercent.default,
6303
+ maxIssuesPerHour: CONTEXT_TELEMETRY_VALIDATION_LIMITS.maxIssuesPerHour.default,
6304
+ dryRun: false
6305
+ },
6306
+ description: "Configure Slack alerts for context telemetry anomalies. Set thresholds for warnings and critical alerts.",
6307
+ category: "Admin",
6308
+ order: 121,
6309
+ schema: ContextTelemetryAlertsSchema
6310
+ }),
6311
+ secopsTriageConfig: makeObjectSetting({
6312
+ key: "secopsTriageConfig",
6313
+ name: "SecOps Triage Config",
6314
+ defaultValue: SecopsTriageConfigSchema.parse({}),
6315
+ description: "Configuration for SecOps Triage — auto-creates GitHub issues for critical/high OWASP ZAP scan findings via the b4m-prod GitHub App. Disabled by default.",
6316
+ category: "SecOps",
6317
+ order: 131,
6318
+ schema: SecopsTriageConfigSchema
6319
+ }),
6320
+ overwatchRollupSync: makeObjectSetting({
6321
+ key: "overwatchRollupSync",
6322
+ name: "Overwatch Rollup Sync Lock",
6323
+ defaultValue: {},
6324
+ description: "Internal lock document for the Overwatch daily rollup cron. Prevents concurrent executions. Not user-configurable.",
6325
+ category: "Admin",
6326
+ order: 132,
6327
+ schema: z.object({
6328
+ lockedAt: z.date().nullable().optional(),
6329
+ lastCompletedAt: z.date().optional(),
6330
+ lastResult: z.enum(["success", "failed"]).optional()
6331
+ })
6332
+ })
6333
+ };
5625
6334
  z.preprocess((val) => {
5626
6335
  if (typeof val === "string") {
5627
6336
  if (val.toLowerCase() === "true") return true;
@@ -8564,6 +9273,7 @@ dayjs.extend(utc);
8564
9273
  dayjs.extend(timezone);
8565
9274
  dayjs.extend(relativeTime);
8566
9275
  dayjs.extend(localizedFormat);
9276
+ var dayjsConfig_default = dayjs;
8567
9277
  const logger = class Logger {
8568
9278
  static {
8569
9279
  this.instance = null;
@@ -8584,7 +9294,7 @@ const logger = class Logger {
8584
9294
  async initialize(sessionId) {
8585
9295
  this.sessionId = sessionId;
8586
9296
  const debugDir = path.join(os.homedir(), ".bike4mind", "debug");
8587
- await fs.mkdir(debugDir, { recursive: true });
9297
+ await fs$1.mkdir(debugDir, { recursive: true });
8588
9298
  this.logFilePath = path.join(debugDir, `${sessionId}.txt`);
8589
9299
  await this.writeToFile("INFO", "=== CLI SESSION START ===");
8590
9300
  }
@@ -8636,7 +9346,7 @@ const logger = class Logger {
8636
9346
  if (!this.fileLoggingEnabled || !this.logFilePath) return;
8637
9347
  try {
8638
9348
  const logEntry = `[${(/* @__PURE__ */ new Date()).toISOString().replace("T", " ").substring(0, 19)}] [${level}] ${message}\n`;
8639
- await fs.appendFile(this.logFilePath, logEntry, "utf-8");
9349
+ await fs$1.appendFile(this.logFilePath, logEntry, "utf-8");
8640
9350
  } catch (error) {
8641
9351
  console.error("File logging failed:", error);
8642
9352
  }
@@ -8753,11 +9463,11 @@ const logger = class Logger {
8753
9463
  if (!this.fileLoggingEnabled) return;
8754
9464
  try {
8755
9465
  const debugDir = path.join(os.homedir(), ".bike4mind", "debug");
8756
- const files = await fs.readdir(debugDir);
9466
+ const files = await fs$1.readdir(debugDir);
8757
9467
  const thirtyDaysAgo = Date.now() - 720 * 60 * 60 * 1e3;
8758
9468
  for (const file of files) {
8759
9469
  const filePath = path.join(debugDir, file);
8760
- if ((await fs.stat(filePath)).mtime.getTime() < thirtyDaysAgo) await fs.unlink(filePath);
9470
+ if ((await fs$1.stat(filePath)).mtime.getTime() < thirtyDaysAgo) await fs$1.unlink(filePath);
8761
9471
  }
8762
9472
  } catch (error) {
8763
9473
  console.error("Failed to cleanup old logs:", error);
@@ -9577,4 +10287,4 @@ var ConfigStore = class {
9577
10287
  }
9578
10288
  };
9579
10289
  //#endregion
9580
- export { ReceivedCreditTransaction as $, ImageGenerationUsageTransaction as A, resolveNavigationIntents as At, NotFoundError as B, FileEvents as C, getAccessibleDataLakes as Ct, GenericCreditAddTransaction as D, isGPTImage2Model as Dt, GenerateImageToolCallSchema as E, getViewById as Et, KnowledgeType as F, CollectionType as Ft, ProfileEvents as G, OpenAIImageGenerationInput as H, LLMEvents as I, PromptMetaZodSchema as J, ProjectEvents as K, MiscEvents as L, InboxEvents as M, secureParameters as Mt, InviteEvents as N, validateJupyterKernelName as Nt, GenericCreditDeductTransaction as O, isGPTImageModel as Ot, InviteType as P, validateNotebookPath as Pt, RealtimeVoiceUsageTransaction as Q, ModalEvents as R, FeedbackEvents as S, b4mLLMTools as St, GEMINI_IMAGE_MODELS as T, getMcpProviderMetadata as Tt, Permission as U, OpenAIEmbeddingModel as V, PermissionDeniedError as W, QuestMasterParamsSchema as X, PurchaseTransaction as Y, REASONING_SUPPORTED_MODELS as Z, CompletionApiUsageTransaction as _, VIDEO_SIZE_CONSTRAINTS as _t, ApiKeyEvents as a, ResearchTaskType as at, FIXED_TEMPERATURE_MODELS as b, VoyageAIEmbeddingModel as bt, AppFileEvents as c, SpeechToTextUsageTransaction as ct, BFL_IMAGE_MODELS as d, TagType as dt, RechartsChartTypeList as et, BFL_SAFETY_TOLERANCE as f, TaskScheduleHandler as ft, ChatModels as g, UiNavigationEvents as gt, ChatCompletionCreateInputSchema as h, TransferCreditTransaction as ht, AiEvents as i, ResearchTaskPeriodicFrequencyType as it, ImageModels as j, sanitizeTelemetryError as jt, ImageEditUsageTransaction as k, obfuscateApiKey as kt, ArtifactTypeSchema as l, SubscriptionCreditTransaction as lt, CREDIT_DEDUCT_TRANSACTION_TYPES as m, ToolUsageTransaction as mt, logger as n, ResearchModeParamsSchema as nt, ApiKeyScope as o, SessionEvents as ot, BedrockEmbeddingModel as p, TextGenerationUsageTransaction as pt, PromptIntentSchema as q, ALERT_THRESHOLDS as r, ResearchTaskExecutionType as rt, ApiKeyType as s, SpeechToTextModels as st, ConfigStore as t, RegInviteEvents as tt, AuthEvents as u, SupportedFabFileMimeTypes as ut, DashboardParamsSchema as v, VideoGenerationUsageTransaction as vt, FriendshipEvents as w, getDataLakeTags as wt, FavoriteDocumentType as x, XAI_IMAGE_MODELS as xt, ElabsEvents as y, VideoModels as yt, ModelBackend as z };
10290
+ export { PermissionDeniedError as $, isNearLimit as $t, GEMINI_IMAGE_MODELS as A, VideoGenerationUsageTransaction as At, InternalServerError as B, isGPTImage2Model as Bt, ElabsEvents as C, TooManyRequestsError as Ct, FileEvents as D, UnauthorizedError as Dt, FeedbackEvents as E, UiNavigationEvents as Et, HttpStatus as F, dayjsConfig_default as Ft, MiscEvents as G, resolveNavigationIntents as Gt, InviteType as H, isModelDeprecated as Ht, ImageEditUsageTransaction as I, getAccessibleDataLakes as It, NO_TEMPERATURE_MODELS as J, settingsMap as Jt, ModalEvents as K, sanitizeTelemetryError as Kt, ImageGenerationUsageTransaction as L, getDataLakeTags as Lt, GenericCreditAddTransaction as M, VoyageAIEmbeddingModel as Mt, GenericCreditDeductTransaction as N, XAI_IMAGE_MODELS as Nt, ForbiddenError as O, UnprocessableEntityError as Ot, HTTPError as P, b4mLLMTools as Pt, Permission as Q, extractSnippetMeta as Qt, ImageModels as R, getMcpProviderMetadata as Rt, DashboardParamsSchema as S, TextGenerationUsageTransaction as St, FavoriteDocumentType as T, TransferCreditTransaction as Tt, KnowledgeType as U, isZodError as Ut, InviteEvents as V, isGPTImageModel as Vt, LLMEvents as W, obfuscateApiKey as Wt, OpenAIEmbeddingModel as X, validateNotebookPath as Xt, NotFoundError as Y, validateJupyterKernelName as Yt, OpenAIImageGenerationInput as Z, buildRateLimitLogEntry as Zt, ChatCompletionCreateInputSchema as _, SpeechToTextUsageTransaction as _t, ApiKeyEvents as a, QuestMasterParamsSchema as at, CompletionApiUsageTransaction as b, TagType as bt, AppFileEvents as c, ReceivedCreditTransaction as ct, BEDROCK_NO_PROMPT_CACHING_MODELS as d, ResearchModeParamsSchema as dt, parseRateLimitHeaders as en, ProfileEvents as et, BFL_IMAGE_MODELS as f, ResearchTaskExecutionType as ft, CREDIT_DEDUCT_TRANSACTION_TYPES as g, SpeechToTextModels as gt, BedrockEmbeddingModel as h, SessionEvents as ht, AiEvents as i, PurchaseTransaction as it, GenerateImageToolCallSchema as j, VideoModels as jt, FriendshipEvents as k, VIDEO_SIZE_CONSTRAINTS as kt, ArtifactTypeSchema as l, RechartsChartTypeList as lt, BadRequestError as m, ResearchTaskType as mt, logger as n, PromptIntentSchema as nt, ApiKeyScope as o, REASONING_SUPPORTED_MODELS as ot, BFL_SAFETY_TOLERANCE as p, ResearchTaskPeriodicFrequencyType as pt, ModelBackend as q, secureParameters as qt, ALERT_THRESHOLDS as r, PromptMetaZodSchema as rt, ApiKeyType as s, RealtimeVoiceUsageTransaction as st, ConfigStore as t, CollectionType as tn, ProjectEvents as tt, AuthEvents as u, RegInviteEvents as ut, ChatModels as v, SubscriptionCreditTransaction as vt, FIXED_TEMPERATURE_MODELS as w, ToolUsageTransaction as wt, CorruptedFileError as x, TaskScheduleHandler as xt, ClaudeArtifactMimeTypes as y, SupportedFabFileMimeTypes as yt, InboxEvents as z, getViewById as zt };