@bike4mind/cli 0.2.31-b4m-cli-undo-command.19493 → 0.2.31-b4m-cli-undo-command.19535
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bin/bike4mind-cli.mjs +48 -0
- package/dist/{artifactExtractor-Z6CL6QFN.js → artifactExtractor-T6NJ7V7P.js} +1 -1
- package/dist/{chunk-LBTTUQJM.js → chunk-32PKF3N7.js} +16 -15
- package/dist/{chunk-RI45VJW3.js → chunk-3SPW5FYJ.js} +3 -3
- package/dist/{chunk-ZOWCX4MQ.js → chunk-ERV5G6MX.js} +3 -3
- package/dist/{chunk-2LLA4MTN.js → chunk-F4PXVLZX.js} +2 -2
- package/dist/{chunk-T67NGQW6.js → chunk-JWJF6O4L.js} +3 -3
- package/dist/chunk-M2QCFHVX.js +244 -0
- package/dist/{chunk-GE7Q64MS.js → chunk-NI22LIK3.js} +167 -165
- package/dist/{chunk-OCYRD7D6.js → chunk-PFBYGCOW.js} +109 -31
- package/dist/commands/doctorCommand.js +87 -0
- package/dist/commands/mcpCommand.js +1 -1
- package/dist/commands/updateCommand.js +42 -0
- package/dist/create-XOEMSBER.js +12 -0
- package/dist/index.js +187 -291
- package/dist/{llmMarkdownGenerator-KGA4HTQN.js → llmMarkdownGenerator-NPX7ULSW.js} +1 -1
- package/dist/{markdownGenerator-ERG7FI5H.js → markdownGenerator-TVJ2RQXC.js} +1 -1
- package/dist/{mementoService-I56R5DNA.js → mementoService-HGH2XVLM.js} +4 -4
- package/dist/{notificationDeduplicator-UTHJHMSZ.js → notificationDeduplicator-HUC53NEW.js} +1 -1
- package/dist/{src-IAR65K73.js → src-2BRBILH7.js} +1 -1
- package/dist/{src-EMANOLFK.js → src-JZ6OHGTX.js} +3 -3
- package/dist/{subtractCredits-3MEQF5CV.js → subtractCredits-4VIHTUR4.js} +4 -4
- package/package.json +9 -9
- package/dist/create-JNUW7ICC.js +0 -12
|
@@ -46,7 +46,7 @@ var ImageModels;
|
|
|
46
46
|
ImageModels2["GEMINI_3_PRO_IMAGE_PREVIEW"] = "gemini-3-pro-image-preview";
|
|
47
47
|
})(ImageModels || (ImageModels = {}));
|
|
48
48
|
var IMAGE_MODELS = Object.values(ImageModels);
|
|
49
|
-
var supportedImageModels = z.
|
|
49
|
+
var supportedImageModels = z.enum(ImageModels);
|
|
50
50
|
var IMAGE_SIZE_CONSTRAINTS = {
|
|
51
51
|
BFL: {
|
|
52
52
|
minWidth: 256,
|
|
@@ -170,7 +170,7 @@ var ChatModels;
|
|
|
170
170
|
ChatModels2["GROK_VISION_BETA"] = "grok-vision-beta";
|
|
171
171
|
})(ChatModels || (ChatModels = {}));
|
|
172
172
|
var CHAT_MODELS = Object.values(ChatModels);
|
|
173
|
-
var supportedChatModels = z.
|
|
173
|
+
var supportedChatModels = z.enum(ChatModels);
|
|
174
174
|
var REASONING_SUPPORTED_MODELS = /* @__PURE__ */ new Set([
|
|
175
175
|
ChatModels.O1,
|
|
176
176
|
ChatModels.O3_MINI,
|
|
@@ -191,14 +191,14 @@ var SpeechToTextModels;
|
|
|
191
191
|
SpeechToTextModels2["AWS_TRANSCRIBE"] = "transcribe";
|
|
192
192
|
})(SpeechToTextModels || (SpeechToTextModels = {}));
|
|
193
193
|
var SPEECH_TO_TEXT_MODELS = Object.values(SpeechToTextModels);
|
|
194
|
-
var supportedSpeechToTextModels = z.
|
|
194
|
+
var supportedSpeechToTextModels = z.enum(SpeechToTextModels);
|
|
195
195
|
var VideoModels;
|
|
196
196
|
(function(VideoModels2) {
|
|
197
197
|
VideoModels2["SORA_2"] = "sora-2";
|
|
198
198
|
VideoModels2["SORA_2_PRO"] = "sora-2-pro";
|
|
199
199
|
})(VideoModels || (VideoModels = {}));
|
|
200
200
|
var VIDEO_MODELS = Object.values(VideoModels);
|
|
201
|
-
var supportedVideoModels = z.
|
|
201
|
+
var supportedVideoModels = z.enum(VideoModels);
|
|
202
202
|
var VIDEO_SIZE_CONSTRAINTS = {
|
|
203
203
|
SORA: {
|
|
204
204
|
durations: [4, 8, 12],
|
|
@@ -207,7 +207,7 @@ var VIDEO_SIZE_CONSTRAINTS = {
|
|
|
207
207
|
defaultSize: "720x1280"
|
|
208
208
|
}
|
|
209
209
|
};
|
|
210
|
-
var supportedModels = z.
|
|
210
|
+
var supportedModels = z.enum({
|
|
211
211
|
...ChatModels,
|
|
212
212
|
...ImageModels,
|
|
213
213
|
...SpeechToTextModels,
|
|
@@ -247,11 +247,11 @@ var SoraVideoInputSchema = z4.object({
|
|
|
247
247
|
/** Text description of the video to generate */
|
|
248
248
|
prompt: z4.string().min(1).max(1e4),
|
|
249
249
|
/** Model to use for generation */
|
|
250
|
-
model: z4.
|
|
250
|
+
model: z4.enum(VideoModels).prefault(VideoModels.SORA_2),
|
|
251
251
|
/** Video duration in seconds: 4, 8, or 12 */
|
|
252
|
-
seconds: z4.union([z4.literal(4), z4.literal(8), z4.literal(12)]).
|
|
252
|
+
seconds: z4.union([z4.literal(4), z4.literal(8), z4.literal(12)]).prefault(4),
|
|
253
253
|
/** Video resolution */
|
|
254
|
-
size: z4.enum(["720x1280", "1280x720", "1024x1792", "1792x1024"]).
|
|
254
|
+
size: z4.enum(["720x1280", "1280x720", "1024x1792", "1792x1024"]).prefault(VIDEO_SIZE_CONSTRAINTS.SORA.defaultSize),
|
|
255
255
|
/** Optional user identifier for abuse tracking */
|
|
256
256
|
user: z4.string().optional()
|
|
257
257
|
});
|
|
@@ -274,7 +274,7 @@ var SoraVideoResultSchema = z4.object({
|
|
|
274
274
|
/** Status should be 'completed' */
|
|
275
275
|
status: z4.literal("completed"),
|
|
276
276
|
/** URL to download the video (temporary, expires after a period) */
|
|
277
|
-
video_url: z4.
|
|
277
|
+
video_url: z4.url().optional(),
|
|
278
278
|
/** Video duration in seconds */
|
|
279
279
|
duration: z4.number().optional(),
|
|
280
280
|
/** Video resolution */
|
|
@@ -282,9 +282,9 @@ var SoraVideoResultSchema = z4.object({
|
|
|
282
282
|
});
|
|
283
283
|
var GenerateVideoRequestBodySchema = z4.object({
|
|
284
284
|
prompt: z4.string().min(1),
|
|
285
|
-
model: z4.
|
|
286
|
-
seconds: z4.union([z4.literal(4), z4.literal(8), z4.literal(12)]).optional().
|
|
287
|
-
size: z4.enum(["720x1280", "1280x720", "1024x1792", "1792x1024"]).optional().
|
|
285
|
+
model: z4.enum(VideoModels).optional().prefault(VideoModels.SORA_2),
|
|
286
|
+
seconds: z4.union([z4.literal(4), z4.literal(8), z4.literal(12)]).optional().prefault(4),
|
|
287
|
+
size: z4.enum(["720x1280", "1280x720", "1024x1792", "1792x1024"]).optional().prefault(VIDEO_SIZE_CONSTRAINTS.SORA.defaultSize),
|
|
288
288
|
sessionId: z4.string().optional(),
|
|
289
289
|
sessionName: z4.string().optional(),
|
|
290
290
|
questId: z4.string().optional(),
|
|
@@ -376,7 +376,7 @@ import { z as z6 } from "zod";
|
|
|
376
376
|
var ArtifactMetadataSchema = z6.object({
|
|
377
377
|
language: z6.string().optional(),
|
|
378
378
|
dependencies: z6.array(z6.string()).optional(),
|
|
379
|
-
settings: z6.record(z6.unknown()).optional()
|
|
379
|
+
settings: z6.record(z6.string(), z6.unknown()).optional()
|
|
380
380
|
});
|
|
381
381
|
var ArtifactTypeSchema = z6.enum([
|
|
382
382
|
"mermaid",
|
|
@@ -399,7 +399,7 @@ var ArtifactSchema = z6.object({
|
|
|
399
399
|
content: z6.string(),
|
|
400
400
|
preview: z6.string().optional(),
|
|
401
401
|
metadata: ArtifactMetadataSchema.optional(),
|
|
402
|
-
version: z6.
|
|
402
|
+
version: z6.int().positive().prefault(1).optional(),
|
|
403
403
|
createdAt: z6.date(),
|
|
404
404
|
updatedAt: z6.date()
|
|
405
405
|
});
|
|
@@ -418,18 +418,18 @@ var QuestMasterArtifactSchema = ArtifactSchema.extend({
|
|
|
418
418
|
var ReactArtifactSchema = ArtifactSchema.extend({
|
|
419
419
|
type: z6.literal("react"),
|
|
420
420
|
metadata: ArtifactMetadataSchema.extend({
|
|
421
|
-
dependencies: z6.array(z6.string()).
|
|
422
|
-
props: z6.record(z6.unknown()).optional(),
|
|
423
|
-
hasDefaultExport: z6.boolean().
|
|
424
|
-
errorBoundary: z6.boolean().
|
|
421
|
+
dependencies: z6.array(z6.string()).prefault([]),
|
|
422
|
+
props: z6.record(z6.string(), z6.unknown()).optional(),
|
|
423
|
+
hasDefaultExport: z6.boolean().prefault(true),
|
|
424
|
+
errorBoundary: z6.boolean().prefault(true)
|
|
425
425
|
})
|
|
426
426
|
});
|
|
427
427
|
var HtmlArtifactSchema = ArtifactSchema.extend({
|
|
428
428
|
type: z6.literal("html"),
|
|
429
429
|
metadata: ArtifactMetadataSchema.extend({
|
|
430
|
-
allowedScripts: z6.array(z6.string()).
|
|
430
|
+
allowedScripts: z6.array(z6.string()).prefault([]),
|
|
431
431
|
cspPolicy: z6.string().optional(),
|
|
432
|
-
sanitized: z6.boolean().
|
|
432
|
+
sanitized: z6.boolean().prefault(true)
|
|
433
433
|
})
|
|
434
434
|
});
|
|
435
435
|
var SvgArtifactSchema = ArtifactSchema.extend({
|
|
@@ -438,7 +438,7 @@ var SvgArtifactSchema = ArtifactSchema.extend({
|
|
|
438
438
|
viewBox: z6.string().optional(),
|
|
439
439
|
width: z6.number().optional(),
|
|
440
440
|
height: z6.number().optional(),
|
|
441
|
-
sanitized: z6.boolean().
|
|
441
|
+
sanitized: z6.boolean().prefault(true)
|
|
442
442
|
})
|
|
443
443
|
});
|
|
444
444
|
var MermaidArtifactSchema = ArtifactSchema.extend({
|
|
@@ -475,9 +475,9 @@ var LatticeArtifactSchema = ArtifactSchema.extend({
|
|
|
475
475
|
metadata: ArtifactMetadataSchema.extend({
|
|
476
476
|
modelType: z6.enum(["income_statement", "balance_sheet", "cashflow", "saas_metrics", "custom"]).optional(),
|
|
477
477
|
periodGrain: z6.enum(["month", "quarter", "year"]).optional(),
|
|
478
|
-
currency: z6.string().
|
|
479
|
-
entityCount: z6.
|
|
480
|
-
ruleCount: z6.
|
|
478
|
+
currency: z6.string().prefault("USD"),
|
|
479
|
+
entityCount: z6.int().nonnegative().optional(),
|
|
480
|
+
ruleCount: z6.int().nonnegative().optional(),
|
|
481
481
|
lastComputedAt: z6.date().optional()
|
|
482
482
|
})
|
|
483
483
|
});
|
|
@@ -581,11 +581,11 @@ var InvitePermission;
|
|
|
581
581
|
})(InvitePermission || (InvitePermission = {}));
|
|
582
582
|
var groupShareSchema = z8.object({
|
|
583
583
|
groupId: z8.string(),
|
|
584
|
-
permissions: z8.array(z8.
|
|
584
|
+
permissions: z8.array(z8.enum(Permission))
|
|
585
585
|
});
|
|
586
586
|
var userShareSchema = z8.object({
|
|
587
587
|
userId: z8.string(),
|
|
588
|
-
permissions: z8.array(z8.
|
|
588
|
+
permissions: z8.array(z8.enum(Permission)),
|
|
589
589
|
/** The project ID if the user is shared from a project */
|
|
590
590
|
projectId: z8.string().optional(),
|
|
591
591
|
extraData: z8.object({
|
|
@@ -709,13 +709,13 @@ var BaseCreditTransaction = z9.object({
|
|
|
709
709
|
id: z9.string().optional(),
|
|
710
710
|
// MongoDB ObjectId
|
|
711
711
|
ownerId: z9.string(),
|
|
712
|
-
ownerType: z9.
|
|
712
|
+
ownerType: z9.enum(CreditHolderType),
|
|
713
713
|
/**
|
|
714
714
|
* Credits used or added
|
|
715
715
|
*/
|
|
716
716
|
credits: z9.number(),
|
|
717
717
|
description: z9.string().optional(),
|
|
718
|
-
metadata: z9.record(z9.any()).optional(),
|
|
718
|
+
metadata: z9.record(z9.string(), z9.any()).optional(),
|
|
719
719
|
// For additional context
|
|
720
720
|
createdAt: z9.date(),
|
|
721
721
|
updatedAt: z9.date()
|
|
@@ -726,7 +726,7 @@ var PurchaseTransaction = BaseCreditTransaction.extend({
|
|
|
726
726
|
* @deprecated Use ownerId and ownerType instead
|
|
727
727
|
*/
|
|
728
728
|
userId: z9.string().optional(),
|
|
729
|
-
status: z9.
|
|
729
|
+
status: z9.enum(CreditPurchaseStatus),
|
|
730
730
|
stripePaymentIntentId: z9.string(),
|
|
731
731
|
packageId: z9.string().optional(),
|
|
732
732
|
amount: z9.number()
|
|
@@ -737,7 +737,7 @@ var SubscriptionCreditTransaction = BaseCreditTransaction.extend({
|
|
|
737
737
|
var ReceivedCreditTransaction = BaseCreditTransaction.extend({
|
|
738
738
|
type: z9.literal("received_credit"),
|
|
739
739
|
senderId: z9.string(),
|
|
740
|
-
senderType: z9.
|
|
740
|
+
senderType: z9.enum(CreditHolderType)
|
|
741
741
|
});
|
|
742
742
|
var GenericCreditAddTransaction = BaseCreditTransaction.extend({
|
|
743
743
|
type: z9.literal("generic_add"),
|
|
@@ -803,7 +803,7 @@ var CompletionApiUsageTransaction = BaseCreditTransaction.extend({
|
|
|
803
803
|
var TransferCreditTransaction = BaseCreditTransaction.extend({
|
|
804
804
|
type: z9.literal("transfer_credit"),
|
|
805
805
|
recipientId: z9.string(),
|
|
806
|
-
recipientType: z9.
|
|
806
|
+
recipientType: z9.enum(CreditHolderType)
|
|
807
807
|
});
|
|
808
808
|
var CreditTransaction = z9.discriminatedUnion("type", [
|
|
809
809
|
PurchaseTransaction,
|
|
@@ -1195,9 +1195,9 @@ var DataSubscribeRequestAction = z10.object({
|
|
|
1195
1195
|
accessToken: z10.string().optional(),
|
|
1196
1196
|
subscriptionId: z10.string(),
|
|
1197
1197
|
collectionName: z10.string(),
|
|
1198
|
-
query: z10.
|
|
1199
|
-
fields: z10.
|
|
1200
|
-
fetchInitialData: z10.boolean().
|
|
1198
|
+
query: z10.looseObject({}),
|
|
1199
|
+
fields: z10.looseObject({}),
|
|
1200
|
+
fetchInitialData: z10.boolean().prefault(true).optional(),
|
|
1201
1201
|
clientId: z10.string().optional()
|
|
1202
1202
|
});
|
|
1203
1203
|
var DataUnsubscribeRequestAction = z10.object({
|
|
@@ -1220,7 +1220,7 @@ var VoiceSessionSendTranscriptAction = z10.object({
|
|
|
1220
1220
|
var CliCompletionRequestAction = z10.object({
|
|
1221
1221
|
action: z10.literal("cli_completion_request"),
|
|
1222
1222
|
accessToken: z10.string(),
|
|
1223
|
-
requestId: z10.
|
|
1223
|
+
requestId: z10.uuid(),
|
|
1224
1224
|
model: z10.string(),
|
|
1225
1225
|
messages: z10.array(z10.object({
|
|
1226
1226
|
role: z10.enum(["user", "assistant", "system"]),
|
|
@@ -1236,9 +1236,9 @@ var CliCompletionRequestAction = z10.object({
|
|
|
1236
1236
|
var CliToolRequestAction = z10.object({
|
|
1237
1237
|
action: z10.literal("cli_tool_request"),
|
|
1238
1238
|
accessToken: z10.string(),
|
|
1239
|
-
requestId: z10.
|
|
1239
|
+
requestId: z10.uuid(),
|
|
1240
1240
|
toolName: z10.string(),
|
|
1241
|
-
input: z10.record(z10.unknown())
|
|
1241
|
+
input: z10.record(z10.string(), z10.unknown())
|
|
1242
1242
|
});
|
|
1243
1243
|
var VoiceSessionEndedAction = z10.object({
|
|
1244
1244
|
action: z10.literal("voice_session_ended"),
|
|
@@ -1260,10 +1260,10 @@ var DataSubscriptionUpdateAction = z10.object({
|
|
|
1260
1260
|
collectionName: z10.string(),
|
|
1261
1261
|
operationType: z10.string(),
|
|
1262
1262
|
clientId: z10.string().optional(),
|
|
1263
|
-
data: z10.
|
|
1263
|
+
data: z10.looseObject({
|
|
1264
1264
|
_id: z10.string(),
|
|
1265
1265
|
id: z10.string()
|
|
1266
|
-
})
|
|
1266
|
+
})
|
|
1267
1267
|
});
|
|
1268
1268
|
var LLMStatusUpdateAction = z10.object({
|
|
1269
1269
|
action: z10.literal("llm_status_update"),
|
|
@@ -2188,32 +2188,32 @@ var BFL_IMAGE_MODELS = [
|
|
|
2188
2188
|
];
|
|
2189
2189
|
var CommonBFLParams = z14.object({
|
|
2190
2190
|
prompt: z14.string().nullable().optional(),
|
|
2191
|
-
safety_tolerance: z14.number().min(BFL_SAFETY_TOLERANCE.MIN).max(BFL_SAFETY_TOLERANCE.MAX).optional().
|
|
2192
|
-
output_format: z14.enum(["jpeg", "png"]).nullable().optional().
|
|
2191
|
+
safety_tolerance: z14.number().min(BFL_SAFETY_TOLERANCE.MIN).max(BFL_SAFETY_TOLERANCE.MAX).optional().prefault(BFL_SAFETY_TOLERANCE.DEFAULT),
|
|
2192
|
+
output_format: z14.enum(["jpeg", "png"]).nullable().optional().prefault("jpeg"),
|
|
2193
2193
|
image_prompt: z14.string().nullable().optional(),
|
|
2194
2194
|
webhook_url: z14.string().min(1).max(2083).nullable().optional(),
|
|
2195
2195
|
webhook_secret: z14.string().nullable().optional()
|
|
2196
2196
|
});
|
|
2197
2197
|
var FluxProInputSchema = CommonBFLParams.extend({
|
|
2198
|
-
width: z14.number().min(256).max(1440).
|
|
2199
|
-
height: z14.number().min(256).max(1440).
|
|
2200
|
-
steps: z14.number().min(1).max(50).
|
|
2201
|
-
prompt_upsampling: z14.boolean().
|
|
2198
|
+
width: z14.number().min(256).max(1440).prefault(1024),
|
|
2199
|
+
height: z14.number().min(256).max(1440).prefault(768),
|
|
2200
|
+
steps: z14.number().min(1).max(50).prefault(40).nullable().optional(),
|
|
2201
|
+
prompt_upsampling: z14.boolean().prefault(false),
|
|
2202
2202
|
seed: z14.number().nullable().optional(),
|
|
2203
|
-
guidance: z14.number().min(1.5).max(5).
|
|
2204
|
-
interval: z14.number().min(1).max(4).
|
|
2203
|
+
guidance: z14.number().min(1.5).max(5).prefault(2.5).nullable().optional(),
|
|
2204
|
+
interval: z14.number().min(1).max(4).prefault(2).nullable().optional()
|
|
2205
2205
|
});
|
|
2206
2206
|
var FluxUltraInputSchema = CommonBFLParams.extend({
|
|
2207
|
-
prompt_upsampling: z14.boolean().
|
|
2207
|
+
prompt_upsampling: z14.boolean().prefault(false),
|
|
2208
2208
|
seed: z14.number().nullable().optional(),
|
|
2209
|
-
aspect_ratio: z14.string().
|
|
2210
|
-
raw: z14.boolean().
|
|
2211
|
-
image_prompt_strength: z14.number().min(0).max(1).
|
|
2209
|
+
aspect_ratio: z14.string().prefault("16:9"),
|
|
2210
|
+
raw: z14.boolean().prefault(false),
|
|
2211
|
+
image_prompt_strength: z14.number().min(0).max(1).prefault(0.1)
|
|
2212
2212
|
});
|
|
2213
2213
|
var FluxKontextInputSchema = CommonBFLParams.extend({
|
|
2214
2214
|
input_image: z14.string().min(1),
|
|
2215
2215
|
// Required base64 encoded input image
|
|
2216
|
-
prompt_upsampling: z14.boolean().
|
|
2216
|
+
prompt_upsampling: z14.boolean().prefault(false),
|
|
2217
2217
|
seed: z14.number().nullable().optional(),
|
|
2218
2218
|
aspect_ratio: z14.string().optional()
|
|
2219
2219
|
// Optional aspect ratio override
|
|
@@ -2230,12 +2230,12 @@ var GEMINI_IMAGE_MODELS = [
|
|
|
2230
2230
|
];
|
|
2231
2231
|
var GeminiImageGenerationInputSchema = z15.object({
|
|
2232
2232
|
prompt: z15.string().min(1),
|
|
2233
|
-
n: z15.number().min(1).max(8).
|
|
2233
|
+
n: z15.number().min(1).max(8).prefault(1).optional(),
|
|
2234
2234
|
// Generate up to 8 images
|
|
2235
2235
|
aspect_ratio: z15.string().optional(),
|
|
2236
2236
|
// e.g., "16:9", "1:1", "9:16"
|
|
2237
|
-
output_format: z15.enum(["jpeg", "png"]).
|
|
2238
|
-
safety_tolerance: z15.number().min(0).max(1).
|
|
2237
|
+
output_format: z15.enum(["jpeg", "png"]).prefault("png").optional(),
|
|
2238
|
+
safety_tolerance: z15.number().min(0).max(1).prefault(0.5).optional()
|
|
2239
2239
|
// 0 = strict, 1 = permissive
|
|
2240
2240
|
});
|
|
2241
2241
|
var GeminiImageEditingInputSchema = z15.object({
|
|
@@ -2243,8 +2243,8 @@ var GeminiImageEditingInputSchema = z15.object({
|
|
|
2243
2243
|
// Base64 encoded image or data URL
|
|
2244
2244
|
prompt: z15.string().min(1),
|
|
2245
2245
|
aspect_ratio: z15.string().optional(),
|
|
2246
|
-
output_format: z15.enum(["jpeg", "png"]).
|
|
2247
|
-
safety_tolerance: z15.number().min(0).max(1).
|
|
2246
|
+
output_format: z15.enum(["jpeg", "png"]).prefault("png").optional(),
|
|
2247
|
+
safety_tolerance: z15.number().min(0).max(1).prefault(0.5).optional()
|
|
2248
2248
|
});
|
|
2249
2249
|
|
|
2250
2250
|
// ../../b4m-core/packages/common/dist/src/schemas/openai.js
|
|
@@ -2258,7 +2258,7 @@ var ChatCompletionCreateInputSchema = z16.object({
|
|
|
2258
2258
|
max_tokens: z16.number(),
|
|
2259
2259
|
presence_penalty: z16.number().min(-2).max(2).optional(),
|
|
2260
2260
|
frequency_penalty: z16.number().min(-2).max(2).optional(),
|
|
2261
|
-
logit_bias: z16.record(z16.number()).nullable().optional(),
|
|
2261
|
+
logit_bias: z16.record(z16.string(), z16.number()).nullable().optional(),
|
|
2262
2262
|
stream: z16.boolean().optional(),
|
|
2263
2263
|
thinking: z16.object({
|
|
2264
2264
|
enabled: z16.boolean(),
|
|
@@ -2287,7 +2287,9 @@ var ALL_IMAGE_SIZES = [...OPENAI_IMAGE_SIZES, ...BFL_IMAGE_SIZES];
|
|
|
2287
2287
|
var OpenAIImageSizeSchema = z16.enum(OPENAI_IMAGE_SIZES);
|
|
2288
2288
|
var ImageSizeSchema = z16.union([
|
|
2289
2289
|
z16.enum(ALL_IMAGE_SIZES),
|
|
2290
|
-
z16.string().regex(/^\d+x\d+$/, {
|
|
2290
|
+
z16.string().regex(/^\d+x\d+$/, {
|
|
2291
|
+
error: "Size must be in format 'widthxheight'"
|
|
2292
|
+
})
|
|
2291
2293
|
]);
|
|
2292
2294
|
var OPENAI_IMAGE_QUALITIES = ["standard", "hd", "low", "medium", "high"];
|
|
2293
2295
|
var OpenAIImageQualitySchema = z16.enum(OPENAI_IMAGE_QUALITIES);
|
|
@@ -2355,8 +2357,8 @@ function validatePasswordServer(password, BadRequestError) {
|
|
|
2355
2357
|
// ../../b4m-core/packages/common/dist/src/schemas/query.js
|
|
2356
2358
|
import { z as z18 } from "zod";
|
|
2357
2359
|
var QueryPaginate = z18.object({
|
|
2358
|
-
pageSize: z18.coerce.number().int().positive().
|
|
2359
|
-
pageNumber: z18.coerce.number().int().positive().
|
|
2360
|
+
pageSize: z18.coerce.number().int().positive().prefault(5),
|
|
2361
|
+
pageNumber: z18.coerce.number().int().positive().prefault(1),
|
|
2360
2362
|
orgId: z18.string().nullable().optional()
|
|
2361
2363
|
});
|
|
2362
2364
|
var QueryFilters = z18.object({
|
|
@@ -2434,9 +2436,9 @@ var BedrockEmbeddingModel;
|
|
|
2434
2436
|
BedrockEmbeddingModel2["TITAN_TEXT_EMBEDDINGS_V2"] = "amazon.titan-embed-text-v2:0";
|
|
2435
2437
|
})(BedrockEmbeddingModel || (BedrockEmbeddingModel = {}));
|
|
2436
2438
|
var SupportedEmbeddingModelSchema = z20.union([
|
|
2437
|
-
z20.
|
|
2438
|
-
z20.
|
|
2439
|
-
z20.
|
|
2439
|
+
z20.enum(OpenAIEmbeddingModel),
|
|
2440
|
+
z20.enum(VoyageAIEmbeddingModel),
|
|
2441
|
+
z20.enum(BedrockEmbeddingModel)
|
|
2440
2442
|
]);
|
|
2441
2443
|
function isSupportedEmbeddingModel(model) {
|
|
2442
2444
|
return SupportedEmbeddingModelSchema.safeParse(model).success;
|
|
@@ -2686,7 +2688,7 @@ function makeNumberSetting(config) {
|
|
|
2686
2688
|
return {
|
|
2687
2689
|
...config,
|
|
2688
2690
|
type: "number",
|
|
2689
|
-
schema: z21.coerce.number().
|
|
2691
|
+
schema: z21.coerce.number().prefault(config.defaultValue ?? 0)
|
|
2690
2692
|
};
|
|
2691
2693
|
}
|
|
2692
2694
|
function makeBooleanSetting(config) {
|
|
@@ -2701,7 +2703,7 @@ function makeBooleanSetting(config) {
|
|
|
2701
2703
|
return false;
|
|
2702
2704
|
}
|
|
2703
2705
|
return val;
|
|
2704
|
-
}, z21.boolean()).
|
|
2706
|
+
}, z21.boolean()).prefault(config.defaultValue ?? false)
|
|
2705
2707
|
};
|
|
2706
2708
|
}
|
|
2707
2709
|
function makeObjectSetting(config) {
|
|
@@ -2718,27 +2720,27 @@ var ServerStatusEnum;
|
|
|
2718
2720
|
ServerStatusEnum2["Offline"] = "offline";
|
|
2719
2721
|
})(ServerStatusEnum || (ServerStatusEnum = {}));
|
|
2720
2722
|
var LogoSettingsSchema = z21.object({
|
|
2721
|
-
customLogoUrl: z21.string().optional().
|
|
2722
|
-
customDarkLogoUrl: z21.string().optional().
|
|
2723
|
-
useBothLogos: z21.boolean().optional().
|
|
2723
|
+
customLogoUrl: z21.string().optional().prefault(""),
|
|
2724
|
+
customDarkLogoUrl: z21.string().optional().prefault(""),
|
|
2725
|
+
useBothLogos: z21.boolean().optional().prefault(false)
|
|
2724
2726
|
});
|
|
2725
2727
|
var RapidReplySettingsSchema = z21.object({
|
|
2726
|
-
enabled: z21.boolean().
|
|
2727
|
-
allowedUserTags: z21.array(z21.string()).
|
|
2728
|
-
defaultMaxTokens: z21.number().
|
|
2729
|
-
defaultResponseStyle: z21.enum(["auto", "casual", "professional", "code"]).
|
|
2730
|
-
maxAcceptableLatency: z21.number().
|
|
2731
|
-
minSuccessRate: z21.number().
|
|
2732
|
-
transitionMode: z21.enum(["replace", "append", "enhance"]).
|
|
2733
|
-
showIndicator: z21.boolean().
|
|
2734
|
-
indicatorText: z21.string().
|
|
2735
|
-
fallbackBehavior: z21.enum(["disable", "continue", "notify"]).
|
|
2728
|
+
enabled: z21.boolean().prefault(false),
|
|
2729
|
+
allowedUserTags: z21.array(z21.string()).prefault([]),
|
|
2730
|
+
defaultMaxTokens: z21.number().prefault(150),
|
|
2731
|
+
defaultResponseStyle: z21.enum(["auto", "casual", "professional", "code"]).prefault("auto"),
|
|
2732
|
+
maxAcceptableLatency: z21.number().prefault(2e3),
|
|
2733
|
+
minSuccessRate: z21.number().prefault(90),
|
|
2734
|
+
transitionMode: z21.enum(["replace", "append", "enhance"]).prefault("replace"),
|
|
2735
|
+
showIndicator: z21.boolean().prefault(true),
|
|
2736
|
+
indicatorText: z21.string().prefault("Thinking..."),
|
|
2737
|
+
fallbackBehavior: z21.enum(["disable", "continue", "notify"]).prefault("continue"),
|
|
2736
2738
|
metrics: z21.object({
|
|
2737
|
-
totalRequests: z21.number().
|
|
2738
|
-
successfulRequests: z21.number().
|
|
2739
|
-
averageLatency: z21.number().
|
|
2740
|
-
lastUpdated: z21.date().
|
|
2741
|
-
}).
|
|
2739
|
+
totalRequests: z21.number().prefault(0),
|
|
2740
|
+
successfulRequests: z21.number().prefault(0),
|
|
2741
|
+
averageLatency: z21.number().prefault(0),
|
|
2742
|
+
lastUpdated: z21.date().prefault(() => /* @__PURE__ */ new Date())
|
|
2743
|
+
}).prefault({
|
|
2742
2744
|
totalRequests: 0,
|
|
2743
2745
|
successfulRequests: 0,
|
|
2744
2746
|
averageLatency: 0,
|
|
@@ -2799,7 +2801,7 @@ var WhatsNewConfigSchema = z21.object({
|
|
|
2799
2801
|
});
|
|
2800
2802
|
var WhatsNewSyncConfigSchema = z21.object({
|
|
2801
2803
|
autoSyncEnabled: z21.boolean().default(true),
|
|
2802
|
-
lastSyncAt: z21.
|
|
2804
|
+
lastSyncAt: z21.iso.datetime().optional(),
|
|
2803
2805
|
lastSyncResult: z21.enum(["success", "skipped", "failed"]).optional(),
|
|
2804
2806
|
lastSyncModalId: z21.string().optional(),
|
|
2805
2807
|
/** Error message from last sync attempt (only populated when lastSyncResult is 'failed') */
|
|
@@ -2809,7 +2811,7 @@ var WhatsNewSyncConfigSchema = z21.object({
|
|
|
2809
2811
|
* Must be validated against domain allowlist (CloudFront/S3 only) before saving.
|
|
2810
2812
|
* Takes precedence over SST secret when set.
|
|
2811
2813
|
*/
|
|
2812
|
-
distributionUrlOverride: z21.
|
|
2814
|
+
distributionUrlOverride: z21.url().nullable().optional()
|
|
2813
2815
|
});
|
|
2814
2816
|
var LIVEOPS_TRIAGE_VALIDATION_LIMITS = {
|
|
2815
2817
|
// Model configuration
|
|
@@ -2841,7 +2843,7 @@ var LiveopsTriageConfigSchema = z21.object({
|
|
|
2841
2843
|
// Custom prompt template (optional)
|
|
2842
2844
|
promptTemplate: z21.string().min(LT.promptTemplate.min, `Prompt template must be at least ${LT.promptTemplate.min} characters`).max(LT.promptTemplate.max, `Prompt template cannot exceed ${LT.promptTemplate.max.toLocaleString()} characters`).trim().optional(),
|
|
2843
2845
|
// Run tracking (for idempotency)
|
|
2844
|
-
lastRunAt: z21.
|
|
2846
|
+
lastRunAt: z21.iso.datetime().optional(),
|
|
2845
2847
|
lastRunDate: z21.string().optional(),
|
|
2846
2848
|
// YYYY-MM-DD for idempotency
|
|
2847
2849
|
lastRunResult: z21.object({
|
|
@@ -4470,7 +4472,7 @@ var CitableSourceSchema = z23.object({
|
|
|
4470
4472
|
/** Processing status for real-time updates */
|
|
4471
4473
|
status: z23.enum(["pending", "processing", "complete", "error"]).optional(),
|
|
4472
4474
|
/** Extensibility metadata */
|
|
4473
|
-
metadata: z23.
|
|
4475
|
+
metadata: z23.looseObject({
|
|
4474
4476
|
sourceSystem: z23.string().optional(),
|
|
4475
4477
|
icon: z23.string().optional(),
|
|
4476
4478
|
tags: z23.array(z23.string()).optional(),
|
|
@@ -4479,7 +4481,7 @@ var CitableSourceSchema = z23.object({
|
|
|
4479
4481
|
chunkId: z23.string().optional(),
|
|
4480
4482
|
relevanceScore: z23.number().optional(),
|
|
4481
4483
|
fullContext: z23.string().optional()
|
|
4482
|
-
}).
|
|
4484
|
+
}).optional()
|
|
4483
4485
|
});
|
|
4484
4486
|
var PromptMetaZodSchema = z23.object({
|
|
4485
4487
|
model: PromptMetaModelSchema.optional(),
|
|
@@ -4779,7 +4781,7 @@ import { z as z24 } from "zod";
|
|
|
4779
4781
|
var InternalTeamMemberSchema = z24.object({
|
|
4780
4782
|
name: z24.string().min(1, "Name is required"),
|
|
4781
4783
|
phone: z24.string().min(1, "Phone is required"),
|
|
4782
|
-
email: z24.
|
|
4784
|
+
email: z24.email("Must be a valid email").optional(),
|
|
4783
4785
|
role: z24.string().optional(),
|
|
4784
4786
|
department: z24.string().optional(),
|
|
4785
4787
|
isActive: z24.boolean().optional()
|
|
@@ -4914,18 +4916,18 @@ var LatticeAttributeSchema = z25.object({
|
|
|
4914
4916
|
key: z25.string().min(1).max(100),
|
|
4915
4917
|
value: LatticePrimitiveValueSchema,
|
|
4916
4918
|
dataType: LatticeDataTypeSchema,
|
|
4917
|
-
isComputed: z25.boolean().
|
|
4919
|
+
isComputed: z25.boolean().prefault(false),
|
|
4918
4920
|
computedByRuleId: z25.string().optional(),
|
|
4919
4921
|
timestamp: z25.number().optional(),
|
|
4920
|
-
metadata: z25.record(z25.unknown()).optional()
|
|
4922
|
+
metadata: z25.record(z25.string(), z25.unknown()).optional()
|
|
4921
4923
|
});
|
|
4922
4924
|
var LatticeEntitySchema = z25.object({
|
|
4923
4925
|
id: z25.string().min(1).max(100),
|
|
4924
4926
|
type: LatticeEntityTypeSchema,
|
|
4925
4927
|
name: z25.string().min(1).max(255),
|
|
4926
4928
|
displayName: z25.string().max(255).optional(),
|
|
4927
|
-
attributes: z25.array(LatticeAttributeSchema).
|
|
4928
|
-
metadata: z25.record(z25.unknown()).
|
|
4929
|
+
attributes: z25.array(LatticeAttributeSchema).prefault([]),
|
|
4930
|
+
metadata: z25.record(z25.string(), z25.unknown()).prefault({}),
|
|
4929
4931
|
createdAt: z25.date(),
|
|
4930
4932
|
updatedAt: z25.date()
|
|
4931
4933
|
});
|
|
@@ -4934,11 +4936,11 @@ var LatticeRelationshipSchema = z25.object({
|
|
|
4934
4936
|
type: LatticeRelationshipTypeSchema,
|
|
4935
4937
|
fromEntityId: z25.string(),
|
|
4936
4938
|
toEntityId: z25.string(),
|
|
4937
|
-
metadata: z25.record(z25.unknown()).optional()
|
|
4939
|
+
metadata: z25.record(z25.string(), z25.unknown()).optional()
|
|
4938
4940
|
});
|
|
4939
4941
|
var LatticeDataStoreSchema = z25.object({
|
|
4940
|
-
entities: z25.array(LatticeEntitySchema).
|
|
4941
|
-
relationships: z25.array(LatticeRelationshipSchema).
|
|
4942
|
+
entities: z25.array(LatticeEntitySchema).prefault([]),
|
|
4943
|
+
relationships: z25.array(LatticeRelationshipSchema).prefault([])
|
|
4942
4944
|
});
|
|
4943
4945
|
var LatticeInputSchema = z25.object({
|
|
4944
4946
|
type: z25.enum(["entity", "attribute", "rule", "literal", "range"]),
|
|
@@ -4968,27 +4970,27 @@ var LatticeRuleSchema = z25.object({
|
|
|
4968
4970
|
description: z25.string().max(1e3).optional(),
|
|
4969
4971
|
type: LatticeRuleTypeSchema,
|
|
4970
4972
|
definition: LatticeRuleDefinitionSchema,
|
|
4971
|
-
dependencies: z25.array(z25.string()).
|
|
4972
|
-
priority: z25.
|
|
4973
|
-
enabled: z25.boolean().
|
|
4973
|
+
dependencies: z25.array(z25.string()).prefault([]),
|
|
4974
|
+
priority: z25.int().prefault(0),
|
|
4975
|
+
enabled: z25.boolean().prefault(true),
|
|
4974
4976
|
createdAt: z25.date(),
|
|
4975
4977
|
updatedAt: z25.date()
|
|
4976
4978
|
});
|
|
4977
4979
|
var LatticeRulesetSchema = z25.object({
|
|
4978
4980
|
id: z25.string().min(1).max(100),
|
|
4979
4981
|
name: z25.string().min(1).max(255),
|
|
4980
|
-
ruleIds: z25.array(z25.string()).
|
|
4982
|
+
ruleIds: z25.array(z25.string()).prefault([]),
|
|
4981
4983
|
description: z25.string().max(1e3).optional()
|
|
4982
4984
|
});
|
|
4983
4985
|
var LatticeRulesStoreSchema = z25.object({
|
|
4984
|
-
rules: z25.array(LatticeRuleSchema).
|
|
4985
|
-
rulesets: z25.array(LatticeRulesetSchema).
|
|
4986
|
+
rules: z25.array(LatticeRuleSchema).prefault([]),
|
|
4987
|
+
rulesets: z25.array(LatticeRulesetSchema).prefault([])
|
|
4986
4988
|
});
|
|
4987
4989
|
var LatticeRowConfigSchema = z25.object({
|
|
4988
4990
|
source: z25.enum(["entity", "rule", "category"]),
|
|
4989
4991
|
ref: z25.string(),
|
|
4990
4992
|
label: z25.string().optional(),
|
|
4991
|
-
indent: z25.
|
|
4993
|
+
indent: z25.int().min(0).max(10).optional(),
|
|
4992
4994
|
isSummary: z25.boolean().optional()
|
|
4993
4995
|
});
|
|
4994
4996
|
var LatticeColumnConfigSchema = z25.object({
|
|
@@ -5013,7 +5015,7 @@ var LatticeGroupConfigSchema = z25.object({
|
|
|
5013
5015
|
var LatticeFormatConfigSchema = z25.object({
|
|
5014
5016
|
numberFormat: z25.string().optional(),
|
|
5015
5017
|
currencySymbol: z25.string().max(10).optional(),
|
|
5016
|
-
percentageDecimals: z25.
|
|
5018
|
+
percentageDecimals: z25.int().min(0).max(10).optional(),
|
|
5017
5019
|
negativeFormat: LatticeNegativeFormatSchema.optional(),
|
|
5018
5020
|
showGridLines: z25.boolean().optional(),
|
|
5019
5021
|
zebra: z25.boolean().optional(),
|
|
@@ -5036,22 +5038,22 @@ var LatticeViewSchema = z25.object({
|
|
|
5036
5038
|
updatedAt: z25.date()
|
|
5037
5039
|
});
|
|
5038
5040
|
var LatticeViewStoreSchema = z25.object({
|
|
5039
|
-
views: z25.array(LatticeViewSchema).
|
|
5041
|
+
views: z25.array(LatticeViewSchema).prefault([]),
|
|
5040
5042
|
activeViewId: z25.string().optional()
|
|
5041
5043
|
});
|
|
5042
5044
|
var LatticeModelSettingsSchema = z25.object({
|
|
5043
|
-
currency: z25.string().min(1).max(10).
|
|
5044
|
-
fiscalYearStart: z25.string().regex(/^\d{2}-\d{2}$/).
|
|
5045
|
-
periodGrain: LatticePeriodGrainSchema.
|
|
5046
|
-
defaultDecimalPlaces: z25.
|
|
5047
|
-
negativeFormat: LatticeNegativeFormatSchema.
|
|
5045
|
+
currency: z25.string().min(1).max(10).prefault("USD"),
|
|
5046
|
+
fiscalYearStart: z25.string().regex(/^\d{2}-\d{2}$/).prefault("01-01"),
|
|
5047
|
+
periodGrain: LatticePeriodGrainSchema.prefault("quarter"),
|
|
5048
|
+
defaultDecimalPlaces: z25.int().min(0).max(10).prefault(2),
|
|
5049
|
+
negativeFormat: LatticeNegativeFormatSchema.prefault("parentheses")
|
|
5048
5050
|
});
|
|
5049
5051
|
var LatticeHistoryOperationSchema = z25.object({
|
|
5050
5052
|
id: z25.string(),
|
|
5051
5053
|
type: LatticeOperationTypeSchema,
|
|
5052
5054
|
timestamp: z25.date(),
|
|
5053
|
-
data: z25.record(z25.unknown()),
|
|
5054
|
-
inverse: z25.record(z25.unknown()),
|
|
5055
|
+
data: z25.record(z25.string(), z25.unknown()),
|
|
5056
|
+
inverse: z25.record(z25.string(), z25.unknown()),
|
|
5055
5057
|
description: z25.string(),
|
|
5056
5058
|
messageId: z25.string().optional()
|
|
5057
5059
|
});
|
|
@@ -5064,7 +5066,7 @@ var LatticeScenarioSchema = z25.object({
|
|
|
5064
5066
|
id: z25.string().min(1).max(100),
|
|
5065
5067
|
name: z25.string().min(1).max(255),
|
|
5066
5068
|
description: z25.string().max(1e3).optional(),
|
|
5067
|
-
overrides: z25.array(LatticeScenarioOverrideSchema).
|
|
5069
|
+
overrides: z25.array(LatticeScenarioOverrideSchema).prefault([]),
|
|
5068
5070
|
createdAt: z25.date(),
|
|
5069
5071
|
updatedAt: z25.date()
|
|
5070
5072
|
});
|
|
@@ -5073,7 +5075,7 @@ var LatticeComputedValueSchema = z25.object({
|
|
|
5073
5075
|
computedByRuleId: z25.string(),
|
|
5074
5076
|
computedAt: z25.date()
|
|
5075
5077
|
});
|
|
5076
|
-
var LatticeComputedValuesSchema = z25.record(z25.record(LatticeComputedValueSchema));
|
|
5078
|
+
var LatticeComputedValuesSchema = z25.record(z25.string(), z25.record(z25.string(), LatticeComputedValueSchema));
|
|
5077
5079
|
var LatticeCalculationStepSchema = z25.object({
|
|
5078
5080
|
ruleId: z25.string(),
|
|
5079
5081
|
ruleName: z25.string(),
|
|
@@ -5095,26 +5097,26 @@ var LatticeModelSchema = z25.object({
|
|
|
5095
5097
|
id: z25.string().min(1).max(100),
|
|
5096
5098
|
name: z25.string().min(1).max(255),
|
|
5097
5099
|
description: z25.string().max(2e3).optional(),
|
|
5098
|
-
modelType: LatticeModelTypeSchema.
|
|
5100
|
+
modelType: LatticeModelTypeSchema.prefault("custom"),
|
|
5099
5101
|
// Ownership
|
|
5100
5102
|
userId: z25.string(),
|
|
5101
5103
|
sessionId: z25.string().optional(),
|
|
5102
5104
|
projectId: z25.string().optional(),
|
|
5103
5105
|
organizationId: z25.string().optional(),
|
|
5104
5106
|
// Core Data Layers
|
|
5105
|
-
data: LatticeDataStoreSchema.
|
|
5106
|
-
rules: LatticeRulesStoreSchema.
|
|
5107
|
-
views: LatticeViewStoreSchema.
|
|
5107
|
+
data: LatticeDataStoreSchema.prefault({ entities: [], relationships: [] }),
|
|
5108
|
+
rules: LatticeRulesStoreSchema.prefault({ rules: [], rulesets: [] }),
|
|
5109
|
+
views: LatticeViewStoreSchema.prefault({ views: [] }),
|
|
5108
5110
|
// Settings
|
|
5109
|
-
settings: LatticeModelSettingsSchema.
|
|
5111
|
+
settings: LatticeModelSettingsSchema.prefault({}),
|
|
5110
5112
|
// Scenarios
|
|
5111
|
-
scenarios: z25.array(LatticeScenarioSchema).
|
|
5113
|
+
scenarios: z25.array(LatticeScenarioSchema).prefault([]),
|
|
5112
5114
|
activeScenarioId: z25.string().optional(),
|
|
5113
5115
|
// History
|
|
5114
|
-
operations: z25.array(LatticeHistoryOperationSchema).
|
|
5115
|
-
operationIndex: z25.
|
|
5116
|
+
operations: z25.array(LatticeHistoryOperationSchema).prefault([]),
|
|
5117
|
+
operationIndex: z25.int().min(-1).prefault(-1),
|
|
5116
5118
|
// Versioning
|
|
5117
|
-
version: z25.
|
|
5119
|
+
version: z25.int().positive().prefault(1),
|
|
5118
5120
|
contentHash: z25.string().optional(),
|
|
5119
5121
|
// Timestamps
|
|
5120
5122
|
createdAt: z25.date(),
|
|
@@ -5138,8 +5140,8 @@ var LatticeExtractedEntitySchema = z25.object({
|
|
|
5138
5140
|
value: z25.string(),
|
|
5139
5141
|
normalizedValue: z25.union([z25.string(), z25.number()]).optional(),
|
|
5140
5142
|
position: z25.object({
|
|
5141
|
-
start: z25.
|
|
5142
|
-
end: z25.
|
|
5143
|
+
start: z25.int().min(0),
|
|
5144
|
+
end: z25.int().min(0)
|
|
5143
5145
|
}),
|
|
5144
5146
|
confidence: z25.number().min(0).max(1)
|
|
5145
5147
|
});
|
|
@@ -5272,7 +5274,7 @@ var GenerateImageIvokeParamsSchema = OpenAIImageGenerationInput.extend({
|
|
|
5272
5274
|
width: z26.number().optional(),
|
|
5273
5275
|
height: z26.number().optional(),
|
|
5274
5276
|
aspect_ratio: z26.string().optional(),
|
|
5275
|
-
fabFileIds: z26.array(z26.string()).
|
|
5277
|
+
fabFileIds: z26.array(z26.string()).prefault([]),
|
|
5276
5278
|
tools: z26.array(z26.union([b4mLLMTools, z26.string()])).optional(),
|
|
5277
5279
|
promptEnhancement: z26.object({
|
|
5278
5280
|
originalPrompt: z26.string(),
|
|
@@ -5300,7 +5302,7 @@ var EditImageRequestBodySchema = OpenAIImageGenerationInput.extend({
|
|
|
5300
5302
|
questId: z26.string().optional(),
|
|
5301
5303
|
organizationId: z26.string().nullable().optional(),
|
|
5302
5304
|
aspect_ratio: z26.string().optional(),
|
|
5303
|
-
fabFileIds: z26.array(z26.string()).
|
|
5305
|
+
fabFileIds: z26.array(z26.string()).prefault([]),
|
|
5304
5306
|
image: z26.string()
|
|
5305
5307
|
});
|
|
5306
5308
|
var ChatCompletionInvokeParamsSchema = z26.object({
|
|
@@ -5317,7 +5319,7 @@ var ChatCompletionInvokeParamsSchema = z26.object({
|
|
|
5317
5319
|
fabFileIds: z26.array(z26.string()),
|
|
5318
5320
|
/** Prompt message */
|
|
5319
5321
|
message: z26.string(),
|
|
5320
|
-
messageFileIds: z26.array(z26.string()).
|
|
5322
|
+
messageFileIds: z26.array(z26.string()).prefault([]),
|
|
5321
5323
|
questId: z26.string().optional(),
|
|
5322
5324
|
/** Extra context messages to include in the conversation from external sources */
|
|
5323
5325
|
extraContextMessages: z26.array(z26.object({
|
|
@@ -9017,19 +9019,19 @@ var ArtifactPermissionsSchema = z28.object({
|
|
|
9017
9019
|
canRead: z28.array(z28.string()),
|
|
9018
9020
|
canWrite: z28.array(z28.string()),
|
|
9019
9021
|
canDelete: z28.array(z28.string()),
|
|
9020
|
-
isPublic: z28.boolean().
|
|
9021
|
-
inheritFromProject: z28.boolean().
|
|
9022
|
+
isPublic: z28.boolean().prefault(false),
|
|
9023
|
+
inheritFromProject: z28.boolean().prefault(true)
|
|
9022
9024
|
});
|
|
9023
9025
|
var BaseArtifactSchema = z28.object({
|
|
9024
|
-
id: z28.
|
|
9026
|
+
id: z28.uuid(),
|
|
9025
9027
|
type: ArtifactTypeSchema,
|
|
9026
9028
|
title: z28.string().min(1).max(255),
|
|
9027
9029
|
description: z28.string().max(1e3).optional(),
|
|
9028
9030
|
// Versioning
|
|
9029
|
-
version: z28.
|
|
9031
|
+
version: z28.int().positive().prefault(1),
|
|
9030
9032
|
versionTag: z28.string().max(100).optional(),
|
|
9031
|
-
currentVersionId: z28.
|
|
9032
|
-
parentVersionId: z28.
|
|
9033
|
+
currentVersionId: z28.uuid().optional(),
|
|
9034
|
+
parentVersionId: z28.uuid().optional(),
|
|
9033
9035
|
// Timestamps
|
|
9034
9036
|
createdAt: z28.date(),
|
|
9035
9037
|
updatedAt: z28.date(),
|
|
@@ -9039,43 +9041,43 @@ var BaseArtifactSchema = z28.object({
|
|
|
9039
9041
|
userId: z28.string(),
|
|
9040
9042
|
projectId: z28.string().optional(),
|
|
9041
9043
|
organizationId: z28.string().optional(),
|
|
9042
|
-
visibility: VisibilitySchema.
|
|
9044
|
+
visibility: VisibilitySchema.prefault("private"),
|
|
9043
9045
|
permissions: ArtifactPermissionsSchema,
|
|
9044
9046
|
// Relationships
|
|
9045
9047
|
sourceQuestId: z28.string().optional(),
|
|
9046
9048
|
sessionId: z28.string().optional(),
|
|
9047
|
-
parentArtifactId: z28.
|
|
9049
|
+
parentArtifactId: z28.uuid().optional(),
|
|
9048
9050
|
// Status
|
|
9049
|
-
status: ArtifactStatusSchema.
|
|
9050
|
-
tags: z28.array(z28.string().max(50)).max(20).
|
|
9051
|
+
status: ArtifactStatusSchema.prefault("draft"),
|
|
9052
|
+
tags: z28.array(z28.string().max(50)).max(20).prefault([]),
|
|
9051
9053
|
// Content
|
|
9052
9054
|
contentHash: z28.string(),
|
|
9053
|
-
contentSize: z28.
|
|
9055
|
+
contentSize: z28.int().nonnegative(),
|
|
9054
9056
|
// Metadata
|
|
9055
|
-
metadata: z28.record(z28.unknown()).optional()
|
|
9057
|
+
metadata: z28.record(z28.string(), z28.unknown()).optional()
|
|
9056
9058
|
});
|
|
9057
9059
|
var EnhancedArtifactMetadataSchema = z28.object({
|
|
9058
9060
|
language: z28.string().optional(),
|
|
9059
9061
|
dependencies: z28.array(z28.string()).optional(),
|
|
9060
|
-
settings: z28.record(z28.unknown()).optional()
|
|
9062
|
+
settings: z28.record(z28.string(), z28.unknown()).optional()
|
|
9061
9063
|
});
|
|
9062
9064
|
var ReactArtifactV2Schema = BaseArtifactSchema.extend({
|
|
9063
9065
|
type: z28.literal("react"),
|
|
9064
9066
|
content: z28.string(),
|
|
9065
9067
|
metadata: EnhancedArtifactMetadataSchema.extend({
|
|
9066
9068
|
dependencies: z28.array(z28.string()),
|
|
9067
|
-
props: z28.record(z28.unknown()).optional(),
|
|
9069
|
+
props: z28.record(z28.string(), z28.unknown()).optional(),
|
|
9068
9070
|
hasDefaultExport: z28.boolean(),
|
|
9069
|
-
errorBoundary: z28.boolean().
|
|
9071
|
+
errorBoundary: z28.boolean().prefault(true)
|
|
9070
9072
|
})
|
|
9071
9073
|
});
|
|
9072
9074
|
var HtmlArtifactV2Schema = BaseArtifactSchema.extend({
|
|
9073
9075
|
type: z28.literal("html"),
|
|
9074
9076
|
content: z28.string(),
|
|
9075
9077
|
metadata: EnhancedArtifactMetadataSchema.extend({
|
|
9076
|
-
allowedScripts: z28.array(z28.string()).
|
|
9078
|
+
allowedScripts: z28.array(z28.string()).prefault([]),
|
|
9077
9079
|
cspPolicy: z28.string().optional(),
|
|
9078
|
-
sanitized: z28.boolean().
|
|
9080
|
+
sanitized: z28.boolean().prefault(false)
|
|
9079
9081
|
})
|
|
9080
9082
|
});
|
|
9081
9083
|
var SvgArtifactV2Schema = BaseArtifactSchema.extend({
|
|
@@ -9085,7 +9087,7 @@ var SvgArtifactV2Schema = BaseArtifactSchema.extend({
|
|
|
9085
9087
|
viewBox: z28.string().optional(),
|
|
9086
9088
|
width: z28.number().positive().optional(),
|
|
9087
9089
|
height: z28.number().positive().optional(),
|
|
9088
|
-
sanitized: z28.boolean().
|
|
9090
|
+
sanitized: z28.boolean().prefault(false)
|
|
9089
9091
|
})
|
|
9090
9092
|
});
|
|
9091
9093
|
var MermaidArtifactV2Schema = BaseArtifactSchema.extend({
|
|
@@ -9133,28 +9135,28 @@ var validateMermaidArtifactV2 = (data) => {
|
|
|
9133
9135
|
import { z as z29 } from "zod";
|
|
9134
9136
|
var QuestStatusSchema = z29.enum(["pending", "in-progress", "completed", "skipped"]);
|
|
9135
9137
|
var QuestSchema = z29.object({
|
|
9136
|
-
id: z29.
|
|
9138
|
+
id: z29.uuid(),
|
|
9137
9139
|
title: z29.string().min(1).max(255),
|
|
9138
9140
|
description: z29.string().max(1e3),
|
|
9139
|
-
status: QuestStatusSchema.
|
|
9140
|
-
order: z29.
|
|
9141
|
-
dependencies: z29.array(z29.
|
|
9142
|
-
estimatedMinutes: z29.
|
|
9141
|
+
status: QuestStatusSchema.prefault("pending"),
|
|
9142
|
+
order: z29.int().nonnegative(),
|
|
9143
|
+
dependencies: z29.array(z29.uuid()).optional(),
|
|
9144
|
+
estimatedMinutes: z29.int().positive().optional(),
|
|
9143
9145
|
completedAt: z29.date().optional(),
|
|
9144
9146
|
completedBy: z29.string().optional(),
|
|
9145
|
-
metadata: z29.record(z29.unknown()).optional()
|
|
9147
|
+
metadata: z29.record(z29.string(), z29.unknown()).optional()
|
|
9146
9148
|
});
|
|
9147
9149
|
var QuestResourceSchema = z29.object({
|
|
9148
9150
|
type: z29.enum(["documentation", "tutorial", "example", "tool"]),
|
|
9149
9151
|
title: z29.string().min(1).max(255),
|
|
9150
|
-
url: z29.
|
|
9152
|
+
url: z29.url(),
|
|
9151
9153
|
description: z29.string().max(500).optional()
|
|
9152
9154
|
});
|
|
9153
9155
|
var QuestMasterContentSchema = z29.object({
|
|
9154
9156
|
goal: z29.string().min(1).max(500),
|
|
9155
9157
|
quests: z29.array(QuestSchema).min(1),
|
|
9156
|
-
totalSteps: z29.
|
|
9157
|
-
estimatedDuration: z29.
|
|
9158
|
+
totalSteps: z29.int().positive(),
|
|
9159
|
+
estimatedDuration: z29.int().positive().optional(),
|
|
9158
9160
|
complexity: z29.enum(["low", "medium", "high"]),
|
|
9159
9161
|
category: z29.string().max(100).optional(),
|
|
9160
9162
|
prerequisites: z29.array(z29.string().max(255)).optional(),
|
|
@@ -9185,7 +9187,7 @@ var CurationType;
|
|
|
9185
9187
|
CurationType2["TRANSCRIPT"] = "transcript";
|
|
9186
9188
|
CurationType2["EXECUTIVE_SUMMARY"] = "executive_summary";
|
|
9187
9189
|
})(CurationType || (CurationType = {}));
|
|
9188
|
-
var CurationTypeSchema = z30.
|
|
9190
|
+
var CurationTypeSchema = z30.enum(CurationType);
|
|
9189
9191
|
var CurationArtifactType;
|
|
9190
9192
|
(function(CurationArtifactType2) {
|
|
9191
9193
|
CurationArtifactType2["CODE"] = "code";
|
|
@@ -9212,23 +9214,23 @@ var CurationArtifactTypeSchema = z30.enum([
|
|
|
9212
9214
|
var ExportFormatSchema = z30.enum(["markdown", "txt", "html"]);
|
|
9213
9215
|
var CurationOptionsSchema = z30.object({
|
|
9214
9216
|
/** Curation type: transcript (Option 1) or executive_summary (Option 2) */
|
|
9215
|
-
curationType: CurationTypeSchema.
|
|
9217
|
+
curationType: CurationTypeSchema.prefault(CurationType.TRANSCRIPT),
|
|
9216
9218
|
/** Include code artifacts in the curated notebook */
|
|
9217
|
-
includeCode: z30.boolean().
|
|
9219
|
+
includeCode: z30.boolean().prefault(true),
|
|
9218
9220
|
/** Include diagrams (Mermaid, SVG) in the curated notebook */
|
|
9219
|
-
includeDiagrams: z30.boolean().
|
|
9221
|
+
includeDiagrams: z30.boolean().prefault(true),
|
|
9220
9222
|
/** Include data visualizations (Recharts) in the curated notebook */
|
|
9221
|
-
includeDataViz: z30.boolean().
|
|
9223
|
+
includeDataViz: z30.boolean().prefault(true),
|
|
9222
9224
|
/** Include QuestMaster plans in the curated notebook */
|
|
9223
|
-
includeQuestMaster: z30.boolean().
|
|
9225
|
+
includeQuestMaster: z30.boolean().prefault(true),
|
|
9224
9226
|
/** Include Deep Research findings in the curated notebook */
|
|
9225
|
-
includeResearch: z30.boolean().
|
|
9227
|
+
includeResearch: z30.boolean().prefault(true),
|
|
9226
9228
|
/** Include images in the curated notebook */
|
|
9227
|
-
includeImages: z30.boolean().
|
|
9229
|
+
includeImages: z30.boolean().prefault(true),
|
|
9228
9230
|
/** Token budget for processing (varies by curation type) */
|
|
9229
9231
|
tokenBudget: z30.number().optional(),
|
|
9230
9232
|
/** Export format for the curated notebook */
|
|
9231
|
-
exportFormat: ExportFormatSchema.
|
|
9233
|
+
exportFormat: ExportFormatSchema.prefault("markdown"),
|
|
9232
9234
|
/** Custom notebook name (optional, defaults to curated-notebook-{sessionId}) */
|
|
9233
9235
|
customNotebookName: z30.string().optional()
|
|
9234
9236
|
});
|