@bike4mind/cli 0.2.1-epic-lattice.17016 → 0.2.1-feat-cli-usage-command.17001
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{artifactExtractor-LFD46Z57.js → artifactExtractor-GXQ5YZF7.js} +1 -1
- package/dist/{chunk-FMXGH4KC.js → chunk-7R5QIZU3.js} +14 -6
- package/dist/{chunk-HHHI5KKC.js → chunk-F3ETXO5N.js} +2 -2
- package/dist/{chunk-GSXZOOWP.js → chunk-QXGU6KYI.js} +2 -2
- package/dist/{chunk-7JFN4F7V.js → chunk-U3GPYBTD.js} +2 -4
- package/dist/{chunk-ZMZK7YVU.js → chunk-WR6YZRQV.js} +187 -722
- package/dist/{create-H4NTHQFV.js → create-YUYXTEIS.js} +3 -3
- package/dist/index.js +125 -672
- package/dist/{llmMarkdownGenerator-MCARYCM6.js → llmMarkdownGenerator-4ZR3FLEQ.js} +1 -1
- package/dist/{markdownGenerator-SVLZNXRS.js → markdownGenerator-7WE7WKME.js} +1 -1
- package/dist/{mementoService-6AL37G2J.js → mementoService-2BDIT6PH.js} +3 -3
- package/dist/{src-4TOZJYKI.js → src-6J6LFPZ6.js} +1 -125
- package/dist/{src-5NAH3LYJ.js → src-VLP2EHKE.js} +2 -2
- package/dist/{subtractCredits-762T4S77.js → subtractCredits-AWVE6RYS.js} +3 -3
- package/package.json +6 -6
- package/dist/HydrationEngine-TIB3IU6D.js +0 -10
- package/dist/chunk-NHP3UPYU.js +0 -765
|
@@ -230,14 +230,7 @@ var b4mLLMTools = z3.enum([
|
|
|
230
230
|
"create_file",
|
|
231
231
|
"glob_files",
|
|
232
232
|
"grep_search",
|
|
233
|
-
"delete_file"
|
|
234
|
-
// Lattice financial modeling tools
|
|
235
|
-
"lattice_create_model",
|
|
236
|
-
"lattice_add_entity",
|
|
237
|
-
"lattice_set_value",
|
|
238
|
-
"lattice_create_rule",
|
|
239
|
-
"lattice_query",
|
|
240
|
-
"lattice_explain"
|
|
233
|
+
"delete_file"
|
|
241
234
|
]);
|
|
242
235
|
var B4MLLMToolsList = b4mLLMTools.options.map((tool) => tool);
|
|
243
236
|
var RechartsChartTypeSchema = z3.enum([
|
|
@@ -293,9 +286,7 @@ var ArtifactTypeSchema = z4.enum([
|
|
|
293
286
|
"code",
|
|
294
287
|
"quest",
|
|
295
288
|
"file",
|
|
296
|
-
"questmaster"
|
|
297
|
-
"lattice"
|
|
298
|
-
// Financial pro-forma models
|
|
289
|
+
"questmaster"
|
|
299
290
|
]);
|
|
300
291
|
var ArtifactSchema = z4.object({
|
|
301
292
|
id: z4.string(),
|
|
@@ -375,17 +366,6 @@ var RechartsArtifactSchema = ArtifactSchema.extend({
|
|
|
375
366
|
colors: z4.array(z4.string()).optional()
|
|
376
367
|
})
|
|
377
368
|
});
|
|
378
|
-
var LatticeArtifactSchema = ArtifactSchema.extend({
|
|
379
|
-
type: z4.literal("lattice"),
|
|
380
|
-
metadata: ArtifactMetadataSchema.extend({
|
|
381
|
-
modelType: z4.enum(["income_statement", "balance_sheet", "cashflow", "saas_metrics", "custom"]).optional(),
|
|
382
|
-
periodGrain: z4.enum(["month", "quarter", "year"]).optional(),
|
|
383
|
-
currency: z4.string().default("USD"),
|
|
384
|
-
entityCount: z4.number().int().nonnegative().optional(),
|
|
385
|
-
ruleCount: z4.number().int().nonnegative().optional(),
|
|
386
|
-
lastComputedAt: z4.date().optional()
|
|
387
|
-
})
|
|
388
|
-
});
|
|
389
369
|
var MermaidChartMetadataSchema = z4.object({
|
|
390
370
|
chartType: z4.enum([
|
|
391
371
|
"flowchart",
|
|
@@ -419,8 +399,7 @@ var ClaudeArtifactMimeTypes = {
|
|
|
419
399
|
MERMAID: "application/vnd.ant.mermaid",
|
|
420
400
|
RECHARTS: "application/vnd.ant.recharts",
|
|
421
401
|
CODE: "application/vnd.ant.code",
|
|
422
|
-
MARKDOWN: "text/markdown"
|
|
423
|
-
LATTICE: "application/vnd.b4m.lattice"
|
|
402
|
+
MARKDOWN: "text/markdown"
|
|
424
403
|
};
|
|
425
404
|
|
|
426
405
|
// ../../b4m-core/packages/common/dist/src/types/entities/AppFileTypes.js
|
|
@@ -2023,7 +2002,6 @@ var SettingKeySchema = z19.enum([
|
|
|
2023
2002
|
"EnableArtifacts",
|
|
2024
2003
|
"EnableAgents",
|
|
2025
2004
|
"EnableRapidReply",
|
|
2026
|
-
"EnableLattice",
|
|
2027
2005
|
"RapidReplySettings",
|
|
2028
2006
|
"EnableResearchEngine",
|
|
2029
2007
|
"EnableOllama",
|
|
@@ -2482,8 +2460,7 @@ var API_SERVICE_GROUPS = {
|
|
|
2482
2460
|
{ key: "EnableRapidReply", order: 7 },
|
|
2483
2461
|
{ key: "EnableResearchEngine", order: 8 },
|
|
2484
2462
|
{ key: "EnableReactViewer", order: 9 },
|
|
2485
|
-
{ key: "EnableDeepResearch", order: 10 }
|
|
2486
|
-
{ key: "EnableLattice", order: 11 }
|
|
2463
|
+
{ key: "EnableDeepResearch", order: 10 }
|
|
2487
2464
|
]
|
|
2488
2465
|
},
|
|
2489
2466
|
NOTEBOOK: {
|
|
@@ -3385,15 +3362,6 @@ var settingsMap = {
|
|
|
3385
3362
|
group: API_SERVICE_GROUPS.EXPERIMENTAL.id,
|
|
3386
3363
|
order: 9
|
|
3387
3364
|
}),
|
|
3388
|
-
EnableLattice: makeBooleanSetting({
|
|
3389
|
-
key: "EnableLattice",
|
|
3390
|
-
name: "Enable Lattice",
|
|
3391
|
-
defaultValue: false,
|
|
3392
|
-
description: "Whether to enable the Lattice feature for natural language financial pro-forma modeling. Allows creating and manipulating spreadsheet-like models through conversation.",
|
|
3393
|
-
category: "Experimental",
|
|
3394
|
-
group: API_SERVICE_GROUPS.EXPERIMENTAL.id,
|
|
3395
|
-
order: 11
|
|
3396
|
-
}),
|
|
3397
3365
|
enableVoiceSession: makeBooleanSetting({
|
|
3398
3366
|
key: "enableVoiceSession",
|
|
3399
3367
|
name: "Enable Voice Session",
|
|
@@ -4051,445 +4019,6 @@ var InternalTeamMemberSchema = z22.object({
|
|
|
4051
4019
|
});
|
|
4052
4020
|
var InternalTeamMemberListSchema = z22.array(InternalTeamMemberSchema);
|
|
4053
4021
|
|
|
4054
|
-
// ../../b4m-core/packages/common/dist/src/schemas/lattice.js
|
|
4055
|
-
import { z as z23 } from "zod";
|
|
4056
|
-
var LatticeDataTypeSchema = z23.enum([
|
|
4057
|
-
"number",
|
|
4058
|
-
"currency",
|
|
4059
|
-
"percentage",
|
|
4060
|
-
"string",
|
|
4061
|
-
"boolean",
|
|
4062
|
-
"date",
|
|
4063
|
-
"datetime"
|
|
4064
|
-
]);
|
|
4065
|
-
var LatticeEntityTypeSchema = z23.enum(["line_item", "account", "period", "category", "scenario", "custom"]);
|
|
4066
|
-
var LatticeRelationshipTypeSchema = z23.enum(["parent_child", "temporal", "reference", "derived"]);
|
|
4067
|
-
var LatticeRuleTypeSchema = z23.enum(["formula", "aggregation", "constraint", "transformation", "conditional"]);
|
|
4068
|
-
var LatticeOperationSchema = z23.enum([
|
|
4069
|
-
// Arithmetic
|
|
4070
|
-
"ADD",
|
|
4071
|
-
"SUBTRACT",
|
|
4072
|
-
"MULTIPLY",
|
|
4073
|
-
"DIVIDE",
|
|
4074
|
-
"ABS",
|
|
4075
|
-
"ROUND",
|
|
4076
|
-
"FLOOR",
|
|
4077
|
-
"CEIL",
|
|
4078
|
-
"POWER",
|
|
4079
|
-
"SQRT",
|
|
4080
|
-
// Aggregation
|
|
4081
|
-
"SUM",
|
|
4082
|
-
"AVERAGE",
|
|
4083
|
-
"MIN",
|
|
4084
|
-
"MAX",
|
|
4085
|
-
"COUNT",
|
|
4086
|
-
"MEDIAN",
|
|
4087
|
-
// Logical
|
|
4088
|
-
"IF",
|
|
4089
|
-
"AND",
|
|
4090
|
-
"OR",
|
|
4091
|
-
"NOT",
|
|
4092
|
-
"EQUALS",
|
|
4093
|
-
"GREATER_THAN",
|
|
4094
|
-
"LESS_THAN",
|
|
4095
|
-
"GREATER_THAN_OR_EQUAL",
|
|
4096
|
-
"LESS_THAN_OR_EQUAL",
|
|
4097
|
-
"BETWEEN",
|
|
4098
|
-
// Financial
|
|
4099
|
-
"PERCENT_OF",
|
|
4100
|
-
"GROWTH_RATE",
|
|
4101
|
-
"NPV",
|
|
4102
|
-
"IRR",
|
|
4103
|
-
"PMT",
|
|
4104
|
-
"FV",
|
|
4105
|
-
"PV",
|
|
4106
|
-
// Special
|
|
4107
|
-
"REFERENCE",
|
|
4108
|
-
"LOOKUP"
|
|
4109
|
-
]);
|
|
4110
|
-
var LatticeConditionOperatorSchema = z23.enum(["==", "!=", ">", "<", ">=", "<=", "contains", "in"]);
|
|
4111
|
-
var LatticePeriodGrainSchema = z23.enum(["day", "week", "month", "quarter", "year"]);
|
|
4112
|
-
var LatticeNegativeFormatSchema = z23.enum(["parentheses", "minus", "red"]);
|
|
4113
|
-
var LatticeViewTypeSchema = z23.enum([
|
|
4114
|
-
"table",
|
|
4115
|
-
"pivot",
|
|
4116
|
-
"time_series",
|
|
4117
|
-
"comparison",
|
|
4118
|
-
"summary_card",
|
|
4119
|
-
"waterfall",
|
|
4120
|
-
"tree"
|
|
4121
|
-
]);
|
|
4122
|
-
var LatticeModelTypeSchema = z23.enum([
|
|
4123
|
-
"income_statement",
|
|
4124
|
-
"balance_sheet",
|
|
4125
|
-
"cashflow",
|
|
4126
|
-
"saas_metrics",
|
|
4127
|
-
"dcf",
|
|
4128
|
-
"lbo",
|
|
4129
|
-
"custom"
|
|
4130
|
-
]);
|
|
4131
|
-
var LatticeIntentTypeSchema = z23.enum([
|
|
4132
|
-
"CREATE_ENTITY",
|
|
4133
|
-
"SET_VALUE",
|
|
4134
|
-
"CREATE_RULE",
|
|
4135
|
-
"QUERY_VALUE",
|
|
4136
|
-
"QUERY_AGGREGATE",
|
|
4137
|
-
"CREATE_VIEW",
|
|
4138
|
-
"COMPARE",
|
|
4139
|
-
"FORECAST",
|
|
4140
|
-
"EXPLAIN",
|
|
4141
|
-
"UNDO",
|
|
4142
|
-
"REDO",
|
|
4143
|
-
"LIST",
|
|
4144
|
-
"DELETE",
|
|
4145
|
-
"AMBIGUOUS"
|
|
4146
|
-
]);
|
|
4147
|
-
var LatticeErrorTypeSchema = z23.enum([
|
|
4148
|
-
"PARSE_ERROR",
|
|
4149
|
-
"AMBIGUOUS_REFERENCE",
|
|
4150
|
-
"ENTITY_NOT_FOUND",
|
|
4151
|
-
"RULE_NOT_FOUND",
|
|
4152
|
-
"CIRCULAR_DEPENDENCY",
|
|
4153
|
-
"TYPE_MISMATCH",
|
|
4154
|
-
"DIVISION_BY_ZERO",
|
|
4155
|
-
"MISSING_DATA",
|
|
4156
|
-
"INVALID_PERIOD",
|
|
4157
|
-
"CONSTRAINT_VIOLATION",
|
|
4158
|
-
"INVALID_OPERATION"
|
|
4159
|
-
]);
|
|
4160
|
-
var LatticeOperationTypeSchema = z23.enum([
|
|
4161
|
-
"CREATE_ENTITY",
|
|
4162
|
-
"UPDATE_ENTITY",
|
|
4163
|
-
"DELETE_ENTITY",
|
|
4164
|
-
"CREATE_RULE",
|
|
4165
|
-
"UPDATE_RULE",
|
|
4166
|
-
"DELETE_RULE",
|
|
4167
|
-
"SET_VALUE",
|
|
4168
|
-
"CREATE_VIEW",
|
|
4169
|
-
"UPDATE_VIEW",
|
|
4170
|
-
"DELETE_VIEW",
|
|
4171
|
-
"CREATE_SCENARIO",
|
|
4172
|
-
"UPDATE_SCENARIO",
|
|
4173
|
-
"DELETE_SCENARIO",
|
|
4174
|
-
"UPDATE_SETTINGS"
|
|
4175
|
-
]);
|
|
4176
|
-
var LatticeExportFormatSchema = z23.enum(["csv", "json", "xlsx"]);
|
|
4177
|
-
var LatticePrimitiveValueSchema = z23.union([z23.number(), z23.string(), z23.boolean(), z23.date(), z23.null()]);
|
|
4178
|
-
var LatticeAttributeSchema = z23.object({
|
|
4179
|
-
key: z23.string().min(1).max(100),
|
|
4180
|
-
value: LatticePrimitiveValueSchema,
|
|
4181
|
-
dataType: LatticeDataTypeSchema,
|
|
4182
|
-
isComputed: z23.boolean().default(false),
|
|
4183
|
-
computedByRuleId: z23.string().optional(),
|
|
4184
|
-
timestamp: z23.number().optional(),
|
|
4185
|
-
metadata: z23.record(z23.unknown()).optional()
|
|
4186
|
-
});
|
|
4187
|
-
var LatticeEntitySchema = z23.object({
|
|
4188
|
-
id: z23.string().min(1).max(100),
|
|
4189
|
-
type: LatticeEntityTypeSchema,
|
|
4190
|
-
name: z23.string().min(1).max(255),
|
|
4191
|
-
displayName: z23.string().max(255).optional(),
|
|
4192
|
-
attributes: z23.array(LatticeAttributeSchema).default([]),
|
|
4193
|
-
metadata: z23.record(z23.unknown()).default({}),
|
|
4194
|
-
createdAt: z23.date(),
|
|
4195
|
-
updatedAt: z23.date()
|
|
4196
|
-
});
|
|
4197
|
-
var LatticeRelationshipSchema = z23.object({
|
|
4198
|
-
id: z23.string().min(1).max(100),
|
|
4199
|
-
type: LatticeRelationshipTypeSchema,
|
|
4200
|
-
fromEntityId: z23.string(),
|
|
4201
|
-
toEntityId: z23.string(),
|
|
4202
|
-
metadata: z23.record(z23.unknown()).optional()
|
|
4203
|
-
});
|
|
4204
|
-
var LatticeDataStoreSchema = z23.object({
|
|
4205
|
-
entities: z23.array(LatticeEntitySchema).default([]),
|
|
4206
|
-
relationships: z23.array(LatticeRelationshipSchema).default([])
|
|
4207
|
-
});
|
|
4208
|
-
var LatticeInputSchema = z23.object({
|
|
4209
|
-
type: z23.enum(["entity", "attribute", "rule", "literal", "range"]),
|
|
4210
|
-
ref: z23.string(),
|
|
4211
|
-
selector: z23.string().optional()
|
|
4212
|
-
});
|
|
4213
|
-
var LatticeOutputSchema = z23.object({
|
|
4214
|
-
targetEntityId: z23.string(),
|
|
4215
|
-
targetAttribute: z23.string(),
|
|
4216
|
-
dataType: LatticeDataTypeSchema
|
|
4217
|
-
});
|
|
4218
|
-
var LatticeConditionSchema = z23.object({
|
|
4219
|
-
left: LatticeInputSchema,
|
|
4220
|
-
operator: LatticeConditionOperatorSchema,
|
|
4221
|
-
right: LatticeInputSchema,
|
|
4222
|
-
logicalJoin: z23.enum(["AND", "OR"]).optional()
|
|
4223
|
-
});
|
|
4224
|
-
var LatticeRuleDefinitionSchema = z23.object({
|
|
4225
|
-
operation: LatticeOperationSchema,
|
|
4226
|
-
inputs: z23.array(LatticeInputSchema).min(1),
|
|
4227
|
-
output: LatticeOutputSchema,
|
|
4228
|
-
conditions: z23.array(LatticeConditionSchema).optional()
|
|
4229
|
-
});
|
|
4230
|
-
var LatticeRuleSchema = z23.object({
|
|
4231
|
-
id: z23.string().min(1).max(100),
|
|
4232
|
-
name: z23.string().min(1).max(255),
|
|
4233
|
-
description: z23.string().max(1e3).optional(),
|
|
4234
|
-
type: LatticeRuleTypeSchema,
|
|
4235
|
-
definition: LatticeRuleDefinitionSchema,
|
|
4236
|
-
dependencies: z23.array(z23.string()).default([]),
|
|
4237
|
-
priority: z23.number().int().default(0),
|
|
4238
|
-
enabled: z23.boolean().default(true),
|
|
4239
|
-
createdAt: z23.date(),
|
|
4240
|
-
updatedAt: z23.date()
|
|
4241
|
-
});
|
|
4242
|
-
var LatticeRulesetSchema = z23.object({
|
|
4243
|
-
id: z23.string().min(1).max(100),
|
|
4244
|
-
name: z23.string().min(1).max(255),
|
|
4245
|
-
ruleIds: z23.array(z23.string()).default([]),
|
|
4246
|
-
description: z23.string().max(1e3).optional()
|
|
4247
|
-
});
|
|
4248
|
-
var LatticeRulesStoreSchema = z23.object({
|
|
4249
|
-
rules: z23.array(LatticeRuleSchema).default([]),
|
|
4250
|
-
rulesets: z23.array(LatticeRulesetSchema).default([])
|
|
4251
|
-
});
|
|
4252
|
-
var LatticeRowConfigSchema = z23.object({
|
|
4253
|
-
source: z23.enum(["entity", "rule", "category"]),
|
|
4254
|
-
ref: z23.string(),
|
|
4255
|
-
label: z23.string().optional(),
|
|
4256
|
-
indent: z23.number().int().min(0).max(10).optional(),
|
|
4257
|
-
isSummary: z23.boolean().optional()
|
|
4258
|
-
});
|
|
4259
|
-
var LatticeColumnConfigSchema = z23.object({
|
|
4260
|
-
source: z23.enum(["period", "scenario", "attribute", "computed"]),
|
|
4261
|
-
ref: z23.string(),
|
|
4262
|
-
label: z23.string().optional(),
|
|
4263
|
-
width: z23.number().positive().optional()
|
|
4264
|
-
});
|
|
4265
|
-
var LatticeFilterSchema = z23.object({
|
|
4266
|
-
field: z23.string(),
|
|
4267
|
-
operator: LatticeConditionOperatorSchema,
|
|
4268
|
-
value: LatticePrimitiveValueSchema
|
|
4269
|
-
});
|
|
4270
|
-
var LatticeSortConfigSchema = z23.object({
|
|
4271
|
-
field: z23.string(),
|
|
4272
|
-
direction: z23.enum(["asc", "desc"])
|
|
4273
|
-
});
|
|
4274
|
-
var LatticeGroupConfigSchema = z23.object({
|
|
4275
|
-
groupBy: z23.array(z23.string()),
|
|
4276
|
-
aggregation: LatticeOperationSchema
|
|
4277
|
-
});
|
|
4278
|
-
var LatticeFormatConfigSchema = z23.object({
|
|
4279
|
-
numberFormat: z23.string().optional(),
|
|
4280
|
-
currencySymbol: z23.string().max(10).optional(),
|
|
4281
|
-
percentageDecimals: z23.number().int().min(0).max(10).optional(),
|
|
4282
|
-
negativeFormat: LatticeNegativeFormatSchema.optional(),
|
|
4283
|
-
showGridLines: z23.boolean().optional(),
|
|
4284
|
-
zebra: z23.boolean().optional(),
|
|
4285
|
-
compactMode: z23.boolean().optional()
|
|
4286
|
-
});
|
|
4287
|
-
var LatticeViewConfigSchema = z23.object({
|
|
4288
|
-
rows: z23.array(LatticeRowConfigSchema).optional(),
|
|
4289
|
-
columns: z23.array(LatticeColumnConfigSchema).optional(),
|
|
4290
|
-
filters: z23.array(LatticeFilterSchema).optional(),
|
|
4291
|
-
sorting: z23.array(LatticeSortConfigSchema).optional(),
|
|
4292
|
-
grouping: LatticeGroupConfigSchema.optional(),
|
|
4293
|
-
formatting: LatticeFormatConfigSchema.optional()
|
|
4294
|
-
});
|
|
4295
|
-
var LatticeViewSchema = z23.object({
|
|
4296
|
-
id: z23.string().min(1).max(100),
|
|
4297
|
-
type: LatticeViewTypeSchema,
|
|
4298
|
-
name: z23.string().min(1).max(255),
|
|
4299
|
-
config: LatticeViewConfigSchema,
|
|
4300
|
-
createdAt: z23.date(),
|
|
4301
|
-
updatedAt: z23.date()
|
|
4302
|
-
});
|
|
4303
|
-
var LatticeViewStoreSchema = z23.object({
|
|
4304
|
-
views: z23.array(LatticeViewSchema).default([]),
|
|
4305
|
-
activeViewId: z23.string().optional()
|
|
4306
|
-
});
|
|
4307
|
-
var LatticeModelSettingsSchema = z23.object({
|
|
4308
|
-
currency: z23.string().min(1).max(10).default("USD"),
|
|
4309
|
-
fiscalYearStart: z23.string().regex(/^\d{2}-\d{2}$/).default("01-01"),
|
|
4310
|
-
periodGrain: LatticePeriodGrainSchema.default("quarter"),
|
|
4311
|
-
defaultDecimalPlaces: z23.number().int().min(0).max(10).default(2),
|
|
4312
|
-
negativeFormat: LatticeNegativeFormatSchema.default("parentheses")
|
|
4313
|
-
});
|
|
4314
|
-
var LatticeHistoryOperationSchema = z23.object({
|
|
4315
|
-
id: z23.string(),
|
|
4316
|
-
type: LatticeOperationTypeSchema,
|
|
4317
|
-
timestamp: z23.date(),
|
|
4318
|
-
data: z23.record(z23.unknown()),
|
|
4319
|
-
inverse: z23.record(z23.unknown()),
|
|
4320
|
-
description: z23.string(),
|
|
4321
|
-
messageId: z23.string().optional()
|
|
4322
|
-
});
|
|
4323
|
-
var LatticeScenarioOverrideSchema = z23.object({
|
|
4324
|
-
entityId: z23.string(),
|
|
4325
|
-
attributeKey: z23.string(),
|
|
4326
|
-
value: LatticePrimitiveValueSchema
|
|
4327
|
-
});
|
|
4328
|
-
var LatticeScenarioSchema = z23.object({
|
|
4329
|
-
id: z23.string().min(1).max(100),
|
|
4330
|
-
name: z23.string().min(1).max(255),
|
|
4331
|
-
description: z23.string().max(1e3).optional(),
|
|
4332
|
-
overrides: z23.array(LatticeScenarioOverrideSchema).default([]),
|
|
4333
|
-
createdAt: z23.date(),
|
|
4334
|
-
updatedAt: z23.date()
|
|
4335
|
-
});
|
|
4336
|
-
var LatticeComputedValueSchema = z23.object({
|
|
4337
|
-
value: LatticePrimitiveValueSchema,
|
|
4338
|
-
computedByRuleId: z23.string(),
|
|
4339
|
-
computedAt: z23.date()
|
|
4340
|
-
});
|
|
4341
|
-
var LatticeComputedValuesSchema = z23.record(z23.record(LatticeComputedValueSchema));
|
|
4342
|
-
var LatticeCalculationStepSchema = z23.object({
|
|
4343
|
-
ruleId: z23.string(),
|
|
4344
|
-
ruleName: z23.string(),
|
|
4345
|
-
operation: LatticeOperationSchema,
|
|
4346
|
-
inputs: z23.array(z23.object({
|
|
4347
|
-
name: z23.string(),
|
|
4348
|
-
value: LatticePrimitiveValueSchema
|
|
4349
|
-
})),
|
|
4350
|
-
output: LatticePrimitiveValueSchema
|
|
4351
|
-
});
|
|
4352
|
-
var LatticeCalculationChainSchema = z23.object({
|
|
4353
|
-
targetEntity: z23.string(),
|
|
4354
|
-
targetAttribute: z23.string(),
|
|
4355
|
-
finalValue: LatticePrimitiveValueSchema,
|
|
4356
|
-
steps: z23.array(LatticeCalculationStepSchema)
|
|
4357
|
-
});
|
|
4358
|
-
var LatticeModelSchema = z23.object({
|
|
4359
|
-
// Identity
|
|
4360
|
-
id: z23.string().min(1).max(100),
|
|
4361
|
-
name: z23.string().min(1).max(255),
|
|
4362
|
-
description: z23.string().max(2e3).optional(),
|
|
4363
|
-
modelType: LatticeModelTypeSchema.default("custom"),
|
|
4364
|
-
// Ownership
|
|
4365
|
-
userId: z23.string(),
|
|
4366
|
-
sessionId: z23.string().optional(),
|
|
4367
|
-
projectId: z23.string().optional(),
|
|
4368
|
-
organizationId: z23.string().optional(),
|
|
4369
|
-
// Core Data Layers
|
|
4370
|
-
data: LatticeDataStoreSchema.default({ entities: [], relationships: [] }),
|
|
4371
|
-
rules: LatticeRulesStoreSchema.default({ rules: [], rulesets: [] }),
|
|
4372
|
-
views: LatticeViewStoreSchema.default({ views: [] }),
|
|
4373
|
-
// Settings
|
|
4374
|
-
settings: LatticeModelSettingsSchema.default({}),
|
|
4375
|
-
// Scenarios
|
|
4376
|
-
scenarios: z23.array(LatticeScenarioSchema).default([]),
|
|
4377
|
-
activeScenarioId: z23.string().optional(),
|
|
4378
|
-
// History
|
|
4379
|
-
operations: z23.array(LatticeHistoryOperationSchema).default([]),
|
|
4380
|
-
operationIndex: z23.number().int().min(-1).default(-1),
|
|
4381
|
-
// Versioning
|
|
4382
|
-
version: z23.number().int().positive().default(1),
|
|
4383
|
-
contentHash: z23.string().optional(),
|
|
4384
|
-
// Timestamps
|
|
4385
|
-
createdAt: z23.date(),
|
|
4386
|
-
updatedAt: z23.date(),
|
|
4387
|
-
lastComputedAt: z23.date().optional(),
|
|
4388
|
-
// Soft delete
|
|
4389
|
-
deletedAt: z23.date().optional()
|
|
4390
|
-
});
|
|
4391
|
-
var LatticeExtractedEntitySchema = z23.object({
|
|
4392
|
-
type: z23.enum([
|
|
4393
|
-
"line_item_name",
|
|
4394
|
-
"period",
|
|
4395
|
-
"amount",
|
|
4396
|
-
"percentage",
|
|
4397
|
-
"operation",
|
|
4398
|
-
"comparison_operator",
|
|
4399
|
-
"entity_reference",
|
|
4400
|
-
"category",
|
|
4401
|
-
"scenario"
|
|
4402
|
-
]),
|
|
4403
|
-
value: z23.string(),
|
|
4404
|
-
normalizedValue: z23.union([z23.string(), z23.number()]).optional(),
|
|
4405
|
-
position: z23.object({
|
|
4406
|
-
start: z23.number().int().min(0),
|
|
4407
|
-
end: z23.number().int().min(0)
|
|
4408
|
-
}),
|
|
4409
|
-
confidence: z23.number().min(0).max(1)
|
|
4410
|
-
});
|
|
4411
|
-
var LatticeParsedIntentSchema = z23.object({
|
|
4412
|
-
intent: LatticeIntentTypeSchema,
|
|
4413
|
-
confidence: z23.number().min(0).max(1),
|
|
4414
|
-
entities: z23.array(LatticeExtractedEntitySchema),
|
|
4415
|
-
rawInput: z23.string(),
|
|
4416
|
-
normalizedInput: z23.string(),
|
|
4417
|
-
suggestedOperations: z23.array(LatticeHistoryOperationSchema).optional(),
|
|
4418
|
-
ambiguousRefs: z23.array(z23.object({
|
|
4419
|
-
value: z23.string(),
|
|
4420
|
-
candidates: z23.array(z23.string())
|
|
4421
|
-
})).optional(),
|
|
4422
|
-
clarificationNeeded: z23.string().optional()
|
|
4423
|
-
});
|
|
4424
|
-
var LatticeErrorSchema = z23.object({
|
|
4425
|
-
type: LatticeErrorTypeSchema,
|
|
4426
|
-
message: z23.string(),
|
|
4427
|
-
suggestions: z23.array(z23.string()).optional(),
|
|
4428
|
-
context: z23.object({
|
|
4429
|
-
input: z23.string().optional(),
|
|
4430
|
-
position: z23.number().optional(),
|
|
4431
|
-
relatedEntities: z23.array(z23.string()).optional(),
|
|
4432
|
-
relatedRules: z23.array(z23.string()).optional()
|
|
4433
|
-
}).optional()
|
|
4434
|
-
});
|
|
4435
|
-
var CreateLatticeModelRequestSchema = z23.object({
|
|
4436
|
-
name: z23.string().min(1).max(255),
|
|
4437
|
-
description: z23.string().max(2e3).optional(),
|
|
4438
|
-
modelType: LatticeModelTypeSchema.optional(),
|
|
4439
|
-
sessionId: z23.string().optional(),
|
|
4440
|
-
projectId: z23.string().optional(),
|
|
4441
|
-
settings: LatticeModelSettingsSchema.partial().optional()
|
|
4442
|
-
});
|
|
4443
|
-
var UpdateLatticeModelRequestSchema = z23.object({
|
|
4444
|
-
name: z23.string().min(1).max(255).optional(),
|
|
4445
|
-
description: z23.string().max(2e3).optional(),
|
|
4446
|
-
settings: LatticeModelSettingsSchema.partial().optional(),
|
|
4447
|
-
data: LatticeDataStoreSchema.optional(),
|
|
4448
|
-
rules: LatticeRulesStoreSchema.optional(),
|
|
4449
|
-
views: LatticeViewStoreSchema.optional()
|
|
4450
|
-
});
|
|
4451
|
-
var ComputeLatticeRequestSchema = z23.object({
|
|
4452
|
-
scenarioId: z23.string().optional()
|
|
4453
|
-
});
|
|
4454
|
-
var ComputeLatticeResponseSchema = z23.object({
|
|
4455
|
-
computedValues: LatticeComputedValuesSchema,
|
|
4456
|
-
duration: z23.number(),
|
|
4457
|
-
errors: z23.array(LatticeErrorSchema).optional()
|
|
4458
|
-
});
|
|
4459
|
-
var ExplainLatticeRequestSchema = z23.object({
|
|
4460
|
-
entityId: z23.string(),
|
|
4461
|
-
attributeKey: z23.string()
|
|
4462
|
-
});
|
|
4463
|
-
var ExplainLatticeResponseSchema = z23.object({
|
|
4464
|
-
chain: LatticeCalculationChainSchema
|
|
4465
|
-
});
|
|
4466
|
-
var ExportLatticeRequestSchema = z23.object({
|
|
4467
|
-
format: LatticeExportFormatSchema,
|
|
4468
|
-
viewId: z23.string().optional(),
|
|
4469
|
-
scenarioId: z23.string().optional()
|
|
4470
|
-
});
|
|
4471
|
-
var validateLatticeModel = (data) => {
|
|
4472
|
-
return LatticeModelSchema.parse(data);
|
|
4473
|
-
};
|
|
4474
|
-
var validateLatticeEntity = (data) => {
|
|
4475
|
-
return LatticeEntitySchema.parse(data);
|
|
4476
|
-
};
|
|
4477
|
-
var validateLatticeRule = (data) => {
|
|
4478
|
-
return LatticeRuleSchema.parse(data);
|
|
4479
|
-
};
|
|
4480
|
-
var validateLatticeParsedIntent = (data) => {
|
|
4481
|
-
return LatticeParsedIntentSchema.parse(data);
|
|
4482
|
-
};
|
|
4483
|
-
var safeParseLatticeModel = (data) => {
|
|
4484
|
-
return LatticeModelSchema.safeParse(data);
|
|
4485
|
-
};
|
|
4486
|
-
var safeParseLatticeEntity = (data) => {
|
|
4487
|
-
return LatticeEntitySchema.safeParse(data);
|
|
4488
|
-
};
|
|
4489
|
-
var safeParseLatticeRule = (data) => {
|
|
4490
|
-
return LatticeRuleSchema.safeParse(data);
|
|
4491
|
-
};
|
|
4492
|
-
|
|
4493
4022
|
// ../../b4m-core/packages/common/dist/src/constants/user.js
|
|
4494
4023
|
var PREDEFINED_USER_TAGS = ["Developer", "Analyst", "Customer"];
|
|
4495
4024
|
var isPredefinedTag = (tag) => {
|
|
@@ -4500,130 +4029,128 @@ var getPredefinedTags = () => {
|
|
|
4500
4029
|
};
|
|
4501
4030
|
|
|
4502
4031
|
// ../../b4m-core/packages/common/dist/src/llm.js
|
|
4503
|
-
import { z as
|
|
4504
|
-
var DashboardParamsSchema =
|
|
4505
|
-
dashboardDataSources:
|
|
4506
|
-
sourceName:
|
|
4507
|
-
data:
|
|
4032
|
+
import { z as z23 } from "zod";
|
|
4033
|
+
var DashboardParamsSchema = z23.object({
|
|
4034
|
+
dashboardDataSources: z23.array(z23.object({
|
|
4035
|
+
sourceName: z23.string(),
|
|
4036
|
+
data: z23.any()
|
|
4508
4037
|
})),
|
|
4509
|
-
promptName:
|
|
4038
|
+
promptName: z23.string().optional()
|
|
4510
4039
|
});
|
|
4511
|
-
var QuestMasterParamsSchema =
|
|
4512
|
-
questMasterPlanId:
|
|
4513
|
-
questId:
|
|
4514
|
-
subQuestId:
|
|
4040
|
+
var QuestMasterParamsSchema = z23.object({
|
|
4041
|
+
questMasterPlanId: z23.string(),
|
|
4042
|
+
questId: z23.string(),
|
|
4043
|
+
subQuestId: z23.string()
|
|
4515
4044
|
});
|
|
4516
|
-
var ResearchModeConfigurationSchema =
|
|
4517
|
-
id:
|
|
4518
|
-
enabled:
|
|
4519
|
-
model:
|
|
4520
|
-
parameters:
|
|
4521
|
-
temperature:
|
|
4522
|
-
maxTokens:
|
|
4523
|
-
topP:
|
|
4524
|
-
presencePenalty:
|
|
4525
|
-
frequencyPenalty:
|
|
4045
|
+
var ResearchModeConfigurationSchema = z23.object({
|
|
4046
|
+
id: z23.string(),
|
|
4047
|
+
enabled: z23.boolean(),
|
|
4048
|
+
model: z23.string(),
|
|
4049
|
+
parameters: z23.object({
|
|
4050
|
+
temperature: z23.number().optional(),
|
|
4051
|
+
maxTokens: z23.number().optional(),
|
|
4052
|
+
topP: z23.number().optional(),
|
|
4053
|
+
presencePenalty: z23.number().optional(),
|
|
4054
|
+
frequencyPenalty: z23.number().optional()
|
|
4526
4055
|
}),
|
|
4527
|
-
label:
|
|
4056
|
+
label: z23.string().optional()
|
|
4528
4057
|
});
|
|
4529
|
-
var ResearchModeParamsSchema =
|
|
4530
|
-
enabled:
|
|
4531
|
-
configurations:
|
|
4058
|
+
var ResearchModeParamsSchema = z23.object({
|
|
4059
|
+
enabled: z23.boolean(),
|
|
4060
|
+
configurations: z23.array(ResearchModeConfigurationSchema).max(4)
|
|
4532
4061
|
});
|
|
4533
4062
|
var GenerateImageIvokeParamsSchema = OpenAIImageGenerationInput.extend({
|
|
4534
|
-
sessionId:
|
|
4535
|
-
questId:
|
|
4536
|
-
width:
|
|
4537
|
-
height:
|
|
4538
|
-
aspect_ratio:
|
|
4539
|
-
fabFileIds:
|
|
4540
|
-
tools:
|
|
4541
|
-
promptEnhancement:
|
|
4542
|
-
originalPrompt:
|
|
4543
|
-
enhancedPrompt:
|
|
4544
|
-
promptWasEnhanced:
|
|
4063
|
+
sessionId: z23.string(),
|
|
4064
|
+
questId: z23.string().optional(),
|
|
4065
|
+
width: z23.number().optional(),
|
|
4066
|
+
height: z23.number().optional(),
|
|
4067
|
+
aspect_ratio: z23.string().optional(),
|
|
4068
|
+
fabFileIds: z23.array(z23.string()).default([]),
|
|
4069
|
+
tools: z23.array(z23.union([b4mLLMTools, z23.string()])).optional(),
|
|
4070
|
+
promptEnhancement: z23.object({
|
|
4071
|
+
originalPrompt: z23.string(),
|
|
4072
|
+
enhancedPrompt: z23.string(),
|
|
4073
|
+
promptWasEnhanced: z23.boolean()
|
|
4545
4074
|
}).optional()
|
|
4546
4075
|
});
|
|
4547
4076
|
var GenerateImageRequestBodySchema = GenerateImageIvokeParamsSchema.extend({
|
|
4548
|
-
sessionId:
|
|
4549
|
-
sessionName:
|
|
4550
|
-
projectId:
|
|
4077
|
+
sessionId: z23.string().optional(),
|
|
4078
|
+
sessionName: z23.string().optional(),
|
|
4079
|
+
projectId: z23.string().optional()
|
|
4551
4080
|
});
|
|
4552
4081
|
var GenerateImageToolCallSchema = OpenAIImageGenerationInput.extend({
|
|
4553
|
-
safety_tolerance:
|
|
4554
|
-
prompt_upsampling:
|
|
4555
|
-
output_format:
|
|
4556
|
-
seed:
|
|
4082
|
+
safety_tolerance: z23.number().optional(),
|
|
4083
|
+
prompt_upsampling: z23.boolean().optional(),
|
|
4084
|
+
output_format: z23.enum(["jpeg", "png"]).nullable().optional(),
|
|
4085
|
+
seed: z23.number().nullable().optional()
|
|
4557
4086
|
}).omit({
|
|
4558
4087
|
prompt: true
|
|
4559
4088
|
});
|
|
4560
4089
|
var EditImageRequestBodySchema = OpenAIImageGenerationInput.extend({
|
|
4561
|
-
sessionId:
|
|
4562
|
-
questId:
|
|
4563
|
-
aspect_ratio:
|
|
4564
|
-
fabFileIds:
|
|
4565
|
-
image:
|
|
4090
|
+
sessionId: z23.string(),
|
|
4091
|
+
questId: z23.string().optional(),
|
|
4092
|
+
aspect_ratio: z23.string().optional(),
|
|
4093
|
+
fabFileIds: z23.array(z23.string()).default([]),
|
|
4094
|
+
image: z23.string()
|
|
4566
4095
|
});
|
|
4567
|
-
var ChatCompletionInvokeParamsSchema =
|
|
4096
|
+
var ChatCompletionInvokeParamsSchema = z23.object({
|
|
4568
4097
|
/** Notebook session ID */
|
|
4569
|
-
sessionId:
|
|
4570
|
-
historyCount:
|
|
4098
|
+
sessionId: z23.string(),
|
|
4099
|
+
historyCount: z23.number(),
|
|
4571
4100
|
imageConfig: GenerateImageToolCallSchema.optional(),
|
|
4572
|
-
deepResearchConfig:
|
|
4573
|
-
maxDepth:
|
|
4574
|
-
duration:
|
|
4101
|
+
deepResearchConfig: z23.object({
|
|
4102
|
+
maxDepth: z23.number().optional(),
|
|
4103
|
+
duration: z23.number().optional(),
|
|
4575
4104
|
// Note: searchers are passed via ToolContext and not through this API schema
|
|
4576
|
-
searchers:
|
|
4105
|
+
searchers: z23.array(z23.any()).optional()
|
|
4577
4106
|
}).optional(),
|
|
4578
|
-
fabFileIds:
|
|
4107
|
+
fabFileIds: z23.array(z23.string()),
|
|
4579
4108
|
/** Prompt message */
|
|
4580
|
-
message:
|
|
4581
|
-
messageFileIds:
|
|
4582
|
-
questId:
|
|
4109
|
+
message: z23.string(),
|
|
4110
|
+
messageFileIds: z23.array(z23.string()).default([]),
|
|
4111
|
+
questId: z23.string().optional(),
|
|
4583
4112
|
/** Extra context messages to include in the conversation from external sources */
|
|
4584
|
-
extraContextMessages:
|
|
4585
|
-
role:
|
|
4586
|
-
content:
|
|
4587
|
-
fabFileIds:
|
|
4113
|
+
extraContextMessages: z23.array(z23.object({
|
|
4114
|
+
role: z23.enum(["user", "assistant", "system", "function", "tool"]),
|
|
4115
|
+
content: z23.union([z23.string(), z23.array(z23.any())]),
|
|
4116
|
+
fabFileIds: z23.array(z23.string()).optional()
|
|
4588
4117
|
})).optional(),
|
|
4589
4118
|
/** Dashboard related params */
|
|
4590
4119
|
dashboardParams: DashboardParamsSchema.optional(),
|
|
4591
4120
|
/** LLM params */
|
|
4592
4121
|
params: ChatCompletionCreateInputSchema,
|
|
4593
4122
|
/** Whether Quest Master is enabled */
|
|
4594
|
-
enableQuestMaster:
|
|
4123
|
+
enableQuestMaster: z23.boolean().optional(),
|
|
4595
4124
|
/** Whether Mementos is enabled */
|
|
4596
|
-
enableMementos:
|
|
4125
|
+
enableMementos: z23.boolean().optional(),
|
|
4597
4126
|
/** Whether Artifacts is enabled */
|
|
4598
|
-
enableArtifacts:
|
|
4127
|
+
enableArtifacts: z23.boolean().optional(),
|
|
4599
4128
|
/** Whether Agents is enabled */
|
|
4600
|
-
enableAgents:
|
|
4601
|
-
/** Whether Lattice (financial pro-forma modeling) is enabled */
|
|
4602
|
-
enableLattice: z24.boolean().optional(),
|
|
4129
|
+
enableAgents: z23.boolean().optional(),
|
|
4603
4130
|
/** LLM tools to enable (built-in tools or MCP tool names) */
|
|
4604
|
-
tools:
|
|
4131
|
+
tools: z23.array(z23.union([b4mLLMTools, z23.string()])).optional(),
|
|
4605
4132
|
/** Enabled MCP servers */
|
|
4606
|
-
mcpServers:
|
|
4133
|
+
mcpServers: z23.array(z23.string()).optional(),
|
|
4607
4134
|
/** Project ID */
|
|
4608
|
-
projectId:
|
|
4135
|
+
projectId: z23.string().optional(),
|
|
4609
4136
|
/** Organization ID */
|
|
4610
|
-
organizationId:
|
|
4137
|
+
organizationId: z23.string().nullable().optional(),
|
|
4611
4138
|
/** Tool prompt ID to use for the LLM */
|
|
4612
|
-
toolPromptId:
|
|
4139
|
+
toolPromptId: z23.string().optional(),
|
|
4613
4140
|
/** Quest Master related params */
|
|
4614
4141
|
questMaster: QuestMasterParamsSchema.optional(),
|
|
4615
4142
|
/** Research Mode related params */
|
|
4616
4143
|
researchMode: ResearchModeParamsSchema.optional(),
|
|
4617
4144
|
/** Fallback model ID to try if primary model fails */
|
|
4618
|
-
fallbackModel:
|
|
4145
|
+
fallbackModel: z23.string().optional(),
|
|
4619
4146
|
/** Embedding model to use */
|
|
4620
|
-
embeddingModel:
|
|
4147
|
+
embeddingModel: z23.string().optional()
|
|
4621
4148
|
});
|
|
4622
4149
|
var LLMApiRequestBodySchema = ChatCompletionInvokeParamsSchema.extend({
|
|
4623
4150
|
/** Notebook session ID */
|
|
4624
|
-
sessionId:
|
|
4151
|
+
sessionId: z23.string().optional(),
|
|
4625
4152
|
/** Notebook session name */
|
|
4626
|
-
sessionName:
|
|
4153
|
+
sessionName: z23.string().optional()
|
|
4627
4154
|
});
|
|
4628
4155
|
|
|
4629
4156
|
// ../../b4m-core/packages/common/dist/src/utils.js
|
|
@@ -4697,16 +4224,16 @@ var extractSnippetMeta = (content) => {
|
|
|
4697
4224
|
};
|
|
4698
4225
|
|
|
4699
4226
|
// ../../b4m-core/packages/common/dist/src/search.js
|
|
4700
|
-
import { z as
|
|
4701
|
-
var searchSchema =
|
|
4702
|
-
search:
|
|
4703
|
-
pagination:
|
|
4704
|
-
page:
|
|
4705
|
-
limit:
|
|
4227
|
+
import { z as z24 } from "zod";
|
|
4228
|
+
var searchSchema = z24.object({
|
|
4229
|
+
search: z24.string().optional(),
|
|
4230
|
+
pagination: z24.object({
|
|
4231
|
+
page: z24.coerce.number().int().positive(),
|
|
4232
|
+
limit: z24.coerce.number().int().positive()
|
|
4706
4233
|
}).optional(),
|
|
4707
|
-
orderBy:
|
|
4708
|
-
field:
|
|
4709
|
-
direction:
|
|
4234
|
+
orderBy: z24.object({
|
|
4235
|
+
field: z24.string(),
|
|
4236
|
+
direction: z24.enum(["asc", "desc"])
|
|
4710
4237
|
}).optional()
|
|
4711
4238
|
});
|
|
4712
4239
|
|
|
@@ -5928,89 +5455,89 @@ var getMcpProviderMetadata = (providerName) => {
|
|
|
5928
5455
|
};
|
|
5929
5456
|
|
|
5930
5457
|
// ../../b4m-core/packages/common/dist/src/schemas/artifacts.js
|
|
5931
|
-
import { z as
|
|
5932
|
-
var ArtifactStatusSchema =
|
|
5933
|
-
var VisibilitySchema =
|
|
5934
|
-
var ArtifactPermissionsSchema =
|
|
5935
|
-
canRead:
|
|
5936
|
-
canWrite:
|
|
5937
|
-
canDelete:
|
|
5938
|
-
isPublic:
|
|
5939
|
-
inheritFromProject:
|
|
5940
|
-
});
|
|
5941
|
-
var BaseArtifactSchema =
|
|
5942
|
-
id:
|
|
5458
|
+
import { z as z25 } from "zod";
|
|
5459
|
+
var ArtifactStatusSchema = z25.enum(["draft", "review", "published", "archived", "deleted"]);
|
|
5460
|
+
var VisibilitySchema = z25.enum(["private", "project", "organization", "public"]);
|
|
5461
|
+
var ArtifactPermissionsSchema = z25.object({
|
|
5462
|
+
canRead: z25.array(z25.string()),
|
|
5463
|
+
canWrite: z25.array(z25.string()),
|
|
5464
|
+
canDelete: z25.array(z25.string()),
|
|
5465
|
+
isPublic: z25.boolean().default(false),
|
|
5466
|
+
inheritFromProject: z25.boolean().default(true)
|
|
5467
|
+
});
|
|
5468
|
+
var BaseArtifactSchema = z25.object({
|
|
5469
|
+
id: z25.string().uuid(),
|
|
5943
5470
|
type: ArtifactTypeSchema,
|
|
5944
|
-
title:
|
|
5945
|
-
description:
|
|
5471
|
+
title: z25.string().min(1).max(255),
|
|
5472
|
+
description: z25.string().max(1e3).optional(),
|
|
5946
5473
|
// Versioning
|
|
5947
|
-
version:
|
|
5948
|
-
versionTag:
|
|
5949
|
-
currentVersionId:
|
|
5950
|
-
parentVersionId:
|
|
5474
|
+
version: z25.number().int().positive().default(1),
|
|
5475
|
+
versionTag: z25.string().max(100).optional(),
|
|
5476
|
+
currentVersionId: z25.string().uuid().optional(),
|
|
5477
|
+
parentVersionId: z25.string().uuid().optional(),
|
|
5951
5478
|
// Timestamps
|
|
5952
|
-
createdAt:
|
|
5953
|
-
updatedAt:
|
|
5954
|
-
publishedAt:
|
|
5955
|
-
deletedAt:
|
|
5479
|
+
createdAt: z25.date(),
|
|
5480
|
+
updatedAt: z25.date(),
|
|
5481
|
+
publishedAt: z25.date().optional(),
|
|
5482
|
+
deletedAt: z25.date().optional(),
|
|
5956
5483
|
// Ownership & Access
|
|
5957
|
-
userId:
|
|
5958
|
-
projectId:
|
|
5959
|
-
organizationId:
|
|
5484
|
+
userId: z25.string(),
|
|
5485
|
+
projectId: z25.string().optional(),
|
|
5486
|
+
organizationId: z25.string().optional(),
|
|
5960
5487
|
visibility: VisibilitySchema.default("private"),
|
|
5961
5488
|
permissions: ArtifactPermissionsSchema,
|
|
5962
5489
|
// Relationships
|
|
5963
|
-
sourceQuestId:
|
|
5964
|
-
sessionId:
|
|
5965
|
-
parentArtifactId:
|
|
5490
|
+
sourceQuestId: z25.string().optional(),
|
|
5491
|
+
sessionId: z25.string().optional(),
|
|
5492
|
+
parentArtifactId: z25.string().uuid().optional(),
|
|
5966
5493
|
// Status
|
|
5967
5494
|
status: ArtifactStatusSchema.default("draft"),
|
|
5968
|
-
tags:
|
|
5495
|
+
tags: z25.array(z25.string().max(50)).max(20).default([]),
|
|
5969
5496
|
// Content
|
|
5970
|
-
contentHash:
|
|
5971
|
-
contentSize:
|
|
5497
|
+
contentHash: z25.string(),
|
|
5498
|
+
contentSize: z25.number().int().nonnegative(),
|
|
5972
5499
|
// Metadata
|
|
5973
|
-
metadata:
|
|
5500
|
+
metadata: z25.record(z25.unknown()).optional()
|
|
5974
5501
|
});
|
|
5975
|
-
var EnhancedArtifactMetadataSchema =
|
|
5976
|
-
language:
|
|
5977
|
-
dependencies:
|
|
5978
|
-
settings:
|
|
5502
|
+
var EnhancedArtifactMetadataSchema = z25.object({
|
|
5503
|
+
language: z25.string().optional(),
|
|
5504
|
+
dependencies: z25.array(z25.string()).optional(),
|
|
5505
|
+
settings: z25.record(z25.unknown()).optional()
|
|
5979
5506
|
});
|
|
5980
5507
|
var ReactArtifactV2Schema = BaseArtifactSchema.extend({
|
|
5981
|
-
type:
|
|
5982
|
-
content:
|
|
5508
|
+
type: z25.literal("react"),
|
|
5509
|
+
content: z25.string(),
|
|
5983
5510
|
metadata: EnhancedArtifactMetadataSchema.extend({
|
|
5984
|
-
dependencies:
|
|
5985
|
-
props:
|
|
5986
|
-
hasDefaultExport:
|
|
5987
|
-
errorBoundary:
|
|
5511
|
+
dependencies: z25.array(z25.string()),
|
|
5512
|
+
props: z25.record(z25.unknown()).optional(),
|
|
5513
|
+
hasDefaultExport: z25.boolean(),
|
|
5514
|
+
errorBoundary: z25.boolean().default(true)
|
|
5988
5515
|
})
|
|
5989
5516
|
});
|
|
5990
5517
|
var HtmlArtifactV2Schema = BaseArtifactSchema.extend({
|
|
5991
|
-
type:
|
|
5992
|
-
content:
|
|
5518
|
+
type: z25.literal("html"),
|
|
5519
|
+
content: z25.string(),
|
|
5993
5520
|
metadata: EnhancedArtifactMetadataSchema.extend({
|
|
5994
|
-
allowedScripts:
|
|
5995
|
-
cspPolicy:
|
|
5996
|
-
sanitized:
|
|
5521
|
+
allowedScripts: z25.array(z25.string()).default([]),
|
|
5522
|
+
cspPolicy: z25.string().optional(),
|
|
5523
|
+
sanitized: z25.boolean().default(false)
|
|
5997
5524
|
})
|
|
5998
5525
|
});
|
|
5999
5526
|
var SvgArtifactV2Schema = BaseArtifactSchema.extend({
|
|
6000
|
-
type:
|
|
6001
|
-
content:
|
|
5527
|
+
type: z25.literal("svg"),
|
|
5528
|
+
content: z25.string(),
|
|
6002
5529
|
metadata: EnhancedArtifactMetadataSchema.extend({
|
|
6003
|
-
viewBox:
|
|
6004
|
-
width:
|
|
6005
|
-
height:
|
|
6006
|
-
sanitized:
|
|
5530
|
+
viewBox: z25.string().optional(),
|
|
5531
|
+
width: z25.number().positive().optional(),
|
|
5532
|
+
height: z25.number().positive().optional(),
|
|
5533
|
+
sanitized: z25.boolean().default(false)
|
|
6007
5534
|
})
|
|
6008
5535
|
});
|
|
6009
5536
|
var MermaidArtifactV2Schema = BaseArtifactSchema.extend({
|
|
6010
|
-
type:
|
|
6011
|
-
content:
|
|
5537
|
+
type: z25.literal("mermaid"),
|
|
5538
|
+
content: z25.string(),
|
|
6012
5539
|
metadata: EnhancedArtifactMetadataSchema.extend({
|
|
6013
|
-
chartType:
|
|
5540
|
+
chartType: z25.enum([
|
|
6014
5541
|
"flowchart",
|
|
6015
5542
|
"sequenceDiagram",
|
|
6016
5543
|
"classDiagram",
|
|
@@ -6020,7 +5547,7 @@ var MermaidArtifactV2Schema = BaseArtifactSchema.extend({
|
|
|
6020
5547
|
"pie",
|
|
6021
5548
|
"mindmap"
|
|
6022
5549
|
]).optional(),
|
|
6023
|
-
description:
|
|
5550
|
+
description: z25.string().optional()
|
|
6024
5551
|
})
|
|
6025
5552
|
});
|
|
6026
5553
|
var ArtifactStatuses;
|
|
@@ -6048,39 +5575,39 @@ var validateMermaidArtifactV2 = (data) => {
|
|
|
6048
5575
|
};
|
|
6049
5576
|
|
|
6050
5577
|
// ../../b4m-core/packages/common/dist/src/schemas/questmaster.js
|
|
6051
|
-
import { z as
|
|
6052
|
-
var QuestStatusSchema =
|
|
6053
|
-
var QuestSchema =
|
|
6054
|
-
id:
|
|
6055
|
-
title:
|
|
6056
|
-
description:
|
|
5578
|
+
import { z as z26 } from "zod";
|
|
5579
|
+
var QuestStatusSchema = z26.enum(["pending", "in-progress", "completed", "skipped"]);
|
|
5580
|
+
var QuestSchema = z26.object({
|
|
5581
|
+
id: z26.string().uuid(),
|
|
5582
|
+
title: z26.string().min(1).max(255),
|
|
5583
|
+
description: z26.string().max(1e3),
|
|
6057
5584
|
status: QuestStatusSchema.default("pending"),
|
|
6058
|
-
order:
|
|
6059
|
-
dependencies:
|
|
6060
|
-
estimatedMinutes:
|
|
6061
|
-
completedAt:
|
|
6062
|
-
completedBy:
|
|
6063
|
-
metadata:
|
|
6064
|
-
});
|
|
6065
|
-
var QuestResourceSchema = z27.object({
|
|
6066
|
-
type: z27.enum(["documentation", "tutorial", "example", "tool"]),
|
|
6067
|
-
title: z27.string().min(1).max(255),
|
|
6068
|
-
url: z27.string().url(),
|
|
6069
|
-
description: z27.string().max(500).optional()
|
|
5585
|
+
order: z26.number().int().nonnegative(),
|
|
5586
|
+
dependencies: z26.array(z26.string().uuid()).optional(),
|
|
5587
|
+
estimatedMinutes: z26.number().int().positive().optional(),
|
|
5588
|
+
completedAt: z26.date().optional(),
|
|
5589
|
+
completedBy: z26.string().optional(),
|
|
5590
|
+
metadata: z26.record(z26.unknown()).optional()
|
|
6070
5591
|
});
|
|
6071
|
-
var
|
|
6072
|
-
|
|
6073
|
-
|
|
6074
|
-
|
|
6075
|
-
|
|
6076
|
-
|
|
6077
|
-
|
|
6078
|
-
|
|
6079
|
-
|
|
6080
|
-
|
|
5592
|
+
var QuestResourceSchema = z26.object({
|
|
5593
|
+
type: z26.enum(["documentation", "tutorial", "example", "tool"]),
|
|
5594
|
+
title: z26.string().min(1).max(255),
|
|
5595
|
+
url: z26.string().url(),
|
|
5596
|
+
description: z26.string().max(500).optional()
|
|
5597
|
+
});
|
|
5598
|
+
var QuestMasterContentSchema = z26.object({
|
|
5599
|
+
goal: z26.string().min(1).max(500),
|
|
5600
|
+
quests: z26.array(QuestSchema).min(1),
|
|
5601
|
+
totalSteps: z26.number().int().positive(),
|
|
5602
|
+
estimatedDuration: z26.number().int().positive().optional(),
|
|
5603
|
+
complexity: z26.enum(["low", "medium", "high"]),
|
|
5604
|
+
category: z26.string().max(100).optional(),
|
|
5605
|
+
prerequisites: z26.array(z26.string().max(255)).optional(),
|
|
5606
|
+
completionCriteria: z26.array(z26.string().max(500)).optional(),
|
|
5607
|
+
resources: z26.array(QuestResourceSchema).optional()
|
|
6081
5608
|
});
|
|
6082
5609
|
var QuestMasterArtifactV2Schema = BaseArtifactSchema.extend({
|
|
6083
|
-
type:
|
|
5610
|
+
type: z26.literal("questmaster"),
|
|
6084
5611
|
content: QuestMasterContentSchema
|
|
6085
5612
|
});
|
|
6086
5613
|
var validateQuest = (data) => {
|
|
@@ -6097,13 +5624,13 @@ var safeParseQuestMasterArtifactV2 = (data) => {
|
|
|
6097
5624
|
};
|
|
6098
5625
|
|
|
6099
5626
|
// ../../b4m-core/packages/common/dist/src/schemas/curation.js
|
|
6100
|
-
import { z as
|
|
5627
|
+
import { z as z27 } from "zod";
|
|
6101
5628
|
var CurationType;
|
|
6102
5629
|
(function(CurationType2) {
|
|
6103
5630
|
CurationType2["TRANSCRIPT"] = "transcript";
|
|
6104
5631
|
CurationType2["EXECUTIVE_SUMMARY"] = "executive_summary";
|
|
6105
5632
|
})(CurationType || (CurationType = {}));
|
|
6106
|
-
var CurationTypeSchema =
|
|
5633
|
+
var CurationTypeSchema = z27.nativeEnum(CurationType);
|
|
6107
5634
|
var CurationArtifactType;
|
|
6108
5635
|
(function(CurationArtifactType2) {
|
|
6109
5636
|
CurationArtifactType2["CODE"] = "code";
|
|
@@ -6116,7 +5643,7 @@ var CurationArtifactType;
|
|
|
6116
5643
|
CurationArtifactType2["DEEP_RESEARCH"] = "deep_research";
|
|
6117
5644
|
CurationArtifactType2["IMAGE"] = "image";
|
|
6118
5645
|
})(CurationArtifactType || (CurationArtifactType = {}));
|
|
6119
|
-
var CurationArtifactTypeSchema =
|
|
5646
|
+
var CurationArtifactTypeSchema = z27.enum([
|
|
6120
5647
|
"CODE",
|
|
6121
5648
|
"REACT",
|
|
6122
5649
|
"HTML",
|
|
@@ -6127,28 +5654,28 @@ var CurationArtifactTypeSchema = z28.enum([
|
|
|
6127
5654
|
"DEEP_RESEARCH",
|
|
6128
5655
|
"IMAGE"
|
|
6129
5656
|
]);
|
|
6130
|
-
var ExportFormatSchema =
|
|
6131
|
-
var CurationOptionsSchema =
|
|
5657
|
+
var ExportFormatSchema = z27.enum(["markdown", "txt", "html"]);
|
|
5658
|
+
var CurationOptionsSchema = z27.object({
|
|
6132
5659
|
/** Curation type: transcript (Option 1) or executive_summary (Option 2) */
|
|
6133
5660
|
curationType: CurationTypeSchema.default(CurationType.TRANSCRIPT),
|
|
6134
5661
|
/** Include code artifacts in the curated notebook */
|
|
6135
|
-
includeCode:
|
|
5662
|
+
includeCode: z27.boolean().default(true),
|
|
6136
5663
|
/** Include diagrams (Mermaid, SVG) in the curated notebook */
|
|
6137
|
-
includeDiagrams:
|
|
5664
|
+
includeDiagrams: z27.boolean().default(true),
|
|
6138
5665
|
/** Include data visualizations (Recharts) in the curated notebook */
|
|
6139
|
-
includeDataViz:
|
|
5666
|
+
includeDataViz: z27.boolean().default(true),
|
|
6140
5667
|
/** Include QuestMaster plans in the curated notebook */
|
|
6141
|
-
includeQuestMaster:
|
|
5668
|
+
includeQuestMaster: z27.boolean().default(true),
|
|
6142
5669
|
/** Include Deep Research findings in the curated notebook */
|
|
6143
|
-
includeResearch:
|
|
5670
|
+
includeResearch: z27.boolean().default(true),
|
|
6144
5671
|
/** Include images in the curated notebook */
|
|
6145
|
-
includeImages:
|
|
5672
|
+
includeImages: z27.boolean().default(true),
|
|
6146
5673
|
/** Token budget for processing (varies by curation type) */
|
|
6147
|
-
tokenBudget:
|
|
5674
|
+
tokenBudget: z27.number().optional(),
|
|
6148
5675
|
/** Export format for the curated notebook */
|
|
6149
5676
|
exportFormat: ExportFormatSchema.default("markdown"),
|
|
6150
5677
|
/** Custom notebook name (optional, defaults to curated-notebook-{sessionId}) */
|
|
6151
|
-
customNotebookName:
|
|
5678
|
+
customNotebookName: z27.string().optional()
|
|
6152
5679
|
});
|
|
6153
5680
|
|
|
6154
5681
|
// ../../b4m-core/packages/common/dist/src/utils/artifactHelpers.js
|
|
@@ -6391,7 +5918,6 @@ export {
|
|
|
6391
5918
|
SvgArtifactSchema,
|
|
6392
5919
|
MermaidArtifactSchema,
|
|
6393
5920
|
RechartsArtifactSchema,
|
|
6394
|
-
LatticeArtifactSchema,
|
|
6395
5921
|
MermaidChartMetadataSchema,
|
|
6396
5922
|
ChatHistoryItemWithArtifactsSchema,
|
|
6397
5923
|
ArtifactOperationSchema,
|
|
@@ -6557,67 +6083,6 @@ export {
|
|
|
6557
6083
|
UserApiKeyEvents,
|
|
6558
6084
|
InternalTeamMemberSchema,
|
|
6559
6085
|
InternalTeamMemberListSchema,
|
|
6560
|
-
LatticeDataTypeSchema,
|
|
6561
|
-
LatticeEntityTypeSchema,
|
|
6562
|
-
LatticeRelationshipTypeSchema,
|
|
6563
|
-
LatticeRuleTypeSchema,
|
|
6564
|
-
LatticeOperationSchema,
|
|
6565
|
-
LatticeConditionOperatorSchema,
|
|
6566
|
-
LatticePeriodGrainSchema,
|
|
6567
|
-
LatticeNegativeFormatSchema,
|
|
6568
|
-
LatticeViewTypeSchema,
|
|
6569
|
-
LatticeModelTypeSchema,
|
|
6570
|
-
LatticeIntentTypeSchema,
|
|
6571
|
-
LatticeErrorTypeSchema,
|
|
6572
|
-
LatticeOperationTypeSchema,
|
|
6573
|
-
LatticeExportFormatSchema,
|
|
6574
|
-
LatticePrimitiveValueSchema,
|
|
6575
|
-
LatticeAttributeSchema,
|
|
6576
|
-
LatticeEntitySchema,
|
|
6577
|
-
LatticeRelationshipSchema,
|
|
6578
|
-
LatticeDataStoreSchema,
|
|
6579
|
-
LatticeInputSchema,
|
|
6580
|
-
LatticeOutputSchema,
|
|
6581
|
-
LatticeConditionSchema,
|
|
6582
|
-
LatticeRuleDefinitionSchema,
|
|
6583
|
-
LatticeRuleSchema,
|
|
6584
|
-
LatticeRulesetSchema,
|
|
6585
|
-
LatticeRulesStoreSchema,
|
|
6586
|
-
LatticeRowConfigSchema,
|
|
6587
|
-
LatticeColumnConfigSchema,
|
|
6588
|
-
LatticeFilterSchema,
|
|
6589
|
-
LatticeSortConfigSchema,
|
|
6590
|
-
LatticeGroupConfigSchema,
|
|
6591
|
-
LatticeFormatConfigSchema,
|
|
6592
|
-
LatticeViewConfigSchema,
|
|
6593
|
-
LatticeViewSchema,
|
|
6594
|
-
LatticeViewStoreSchema,
|
|
6595
|
-
LatticeModelSettingsSchema,
|
|
6596
|
-
LatticeHistoryOperationSchema,
|
|
6597
|
-
LatticeScenarioOverrideSchema,
|
|
6598
|
-
LatticeScenarioSchema,
|
|
6599
|
-
LatticeComputedValueSchema,
|
|
6600
|
-
LatticeComputedValuesSchema,
|
|
6601
|
-
LatticeCalculationStepSchema,
|
|
6602
|
-
LatticeCalculationChainSchema,
|
|
6603
|
-
LatticeModelSchema,
|
|
6604
|
-
LatticeExtractedEntitySchema,
|
|
6605
|
-
LatticeParsedIntentSchema,
|
|
6606
|
-
LatticeErrorSchema,
|
|
6607
|
-
CreateLatticeModelRequestSchema,
|
|
6608
|
-
UpdateLatticeModelRequestSchema,
|
|
6609
|
-
ComputeLatticeRequestSchema,
|
|
6610
|
-
ComputeLatticeResponseSchema,
|
|
6611
|
-
ExplainLatticeRequestSchema,
|
|
6612
|
-
ExplainLatticeResponseSchema,
|
|
6613
|
-
ExportLatticeRequestSchema,
|
|
6614
|
-
validateLatticeModel,
|
|
6615
|
-
validateLatticeEntity,
|
|
6616
|
-
validateLatticeRule,
|
|
6617
|
-
validateLatticeParsedIntent,
|
|
6618
|
-
safeParseLatticeModel,
|
|
6619
|
-
safeParseLatticeEntity,
|
|
6620
|
-
safeParseLatticeRule,
|
|
6621
6086
|
PREDEFINED_USER_TAGS,
|
|
6622
6087
|
isPredefinedTag,
|
|
6623
6088
|
getPredefinedTags,
|