@bike4mind/cli 0.2.29-slack-native-search.18848 → 0.2.29

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.
@@ -165,6 +165,7 @@ var ChatModels;
165
165
  ChatModels2["GROK_3_MINI_FAST"] = "grok-3-mini-fast";
166
166
  ChatModels2["GROK_2"] = "grok-2-1212";
167
167
  ChatModels2["GROK_2_VISION"] = "grok-2-vision-1212";
168
+ ChatModels2["GROK_4"] = "grok-4-0709";
168
169
  ChatModels2["GROK_BETA"] = "grok-beta";
169
170
  ChatModels2["GROK_VISION_BETA"] = "grok-vision-beta";
170
171
  })(ChatModels || (ChatModels = {}));
@@ -365,7 +366,9 @@ var ArtifactTypeSchema = z6.enum([
365
366
  "code",
366
367
  "quest",
367
368
  "file",
368
- "questmaster"
369
+ "questmaster",
370
+ "lattice"
371
+ // Financial pro-forma models
369
372
  ]);
370
373
  var ArtifactSchema = z6.object({
371
374
  id: z6.string(),
@@ -445,6 +448,17 @@ var RechartsArtifactSchema = ArtifactSchema.extend({
445
448
  colors: z6.array(z6.string()).optional()
446
449
  })
447
450
  });
451
+ var LatticeArtifactSchema = ArtifactSchema.extend({
452
+ type: z6.literal("lattice"),
453
+ metadata: ArtifactMetadataSchema.extend({
454
+ modelType: z6.enum(["income_statement", "balance_sheet", "cashflow", "saas_metrics", "custom"]).optional(),
455
+ periodGrain: z6.enum(["month", "quarter", "year"]).optional(),
456
+ currency: z6.string().default("USD"),
457
+ entityCount: z6.number().int().nonnegative().optional(),
458
+ ruleCount: z6.number().int().nonnegative().optional(),
459
+ lastComputedAt: z6.date().optional()
460
+ })
461
+ });
448
462
  var MermaidChartMetadataSchema = z6.object({
449
463
  chartType: z6.enum([
450
464
  "flowchart",
@@ -478,7 +492,8 @@ var ClaudeArtifactMimeTypes = {
478
492
  MERMAID: "application/vnd.ant.mermaid",
479
493
  RECHARTS: "application/vnd.ant.recharts",
480
494
  CODE: "application/vnd.ant.code",
481
- MARKDOWN: "text/markdown"
495
+ MARKDOWN: "text/markdown",
496
+ LATTICE: "application/vnd.b4m.lattice"
482
497
  };
483
498
 
484
499
  // ../../b4m-core/packages/common/dist/src/types/entities/AppFileTypes.js
@@ -894,6 +909,129 @@ var RapidReplyResponseStylesCommon = ["auto", "casual", "professional", "code"];
894
909
  var RapidReplyTransitionModes = ["replace", "append", "enhance"];
895
910
  var RapidReplyFallbackBehaviors = ["disable", "continue", "notify"];
896
911
 
912
+ // ../../b4m-core/packages/common/dist/src/types/entities/EmailTypes.js
913
+ var EmailJobStatus;
914
+ (function(EmailJobStatus2) {
915
+ EmailJobStatus2["DRAFT"] = "draft";
916
+ EmailJobStatus2["SCHEDULED"] = "scheduled";
917
+ EmailJobStatus2["QUEUED"] = "queued";
918
+ EmailJobStatus2["PROCESSING"] = "processing";
919
+ EmailJobStatus2["COMPLETED"] = "completed";
920
+ EmailJobStatus2["FAILED"] = "failed";
921
+ EmailJobStatus2["CANCELLED"] = "cancelled";
922
+ })(EmailJobStatus || (EmailJobStatus = {}));
923
+ var EmailSendStatus;
924
+ (function(EmailSendStatus2) {
925
+ EmailSendStatus2["PENDING"] = "pending";
926
+ EmailSendStatus2["PROCESSING"] = "processing";
927
+ EmailSendStatus2["SENT"] = "sent";
928
+ EmailSendStatus2["DELIVERED"] = "delivered";
929
+ EmailSendStatus2["OPENED"] = "opened";
930
+ EmailSendStatus2["CLICKED"] = "clicked";
931
+ EmailSendStatus2["BOUNCED"] = "bounced";
932
+ EmailSendStatus2["COMPLAINED"] = "complained";
933
+ EmailSendStatus2["FAILED"] = "failed";
934
+ EmailSendStatus2["CANCELLED"] = "cancelled";
935
+ })(EmailSendStatus || (EmailSendStatus = {}));
936
+ var EmailJobOverallStatus;
937
+ (function(EmailJobOverallStatus2) {
938
+ EmailJobOverallStatus2["DRAFT"] = "draft";
939
+ EmailJobOverallStatus2["SENDING"] = "sending";
940
+ EmailJobOverallStatus2["COMPLETE"] = "complete";
941
+ EmailJobOverallStatus2["PARTIAL"] = "partial";
942
+ EmailJobOverallStatus2["FAILED"] = "failed";
943
+ })(EmailJobOverallStatus || (EmailJobOverallStatus = {}));
944
+ var EmailCategory;
945
+ (function(EmailCategory2) {
946
+ EmailCategory2["MARKETING"] = "marketing";
947
+ EmailCategory2["PRODUCT_UPDATE"] = "product_update";
948
+ EmailCategory2["NEWSLETTER"] = "newsletter";
949
+ EmailCategory2["ANNOUNCEMENT"] = "announcement";
950
+ EmailCategory2["TRANSACTIONAL"] = "transactional";
951
+ })(EmailCategory || (EmailCategory = {}));
952
+
953
+ // ../../b4m-core/packages/common/dist/src/types/entities/SoftwareSchedulerTypes.js
954
+ function calculateTaskValue(task, estimate) {
955
+ const reach = task.reach ?? estimate?.inferredStackRanking?.reach ?? 5;
956
+ const retention = task.retention ?? estimate?.inferredStackRanking?.retention ?? 5;
957
+ const revenue = task.revenue ?? estimate?.inferredStackRanking?.revenue ?? 5;
958
+ const romance = task.romance ?? estimate?.inferredStackRanking?.romance ?? 5;
959
+ const confidence = task.confidence ?? estimate?.inferredStackRanking?.confidence ?? 5;
960
+ const foundation = task.foundation ?? estimate?.inferredStackRanking?.foundation ?? 5;
961
+ const visibility = task.visibility ?? estimate?.inferredStackRanking?.visibility ?? 5;
962
+ const coreScore = reach * 2 + retention * 3 + revenue * 5;
963
+ const extendedScore = romance * 1.5 + confidence * 1.5 + foundation * 2 + visibility * 1.5;
964
+ return coreScore + extendedScore;
965
+ }
966
+ function calculateResourceAllocations(projects, resources, startPeriod, endPeriod) {
967
+ const allocations = /* @__PURE__ */ new Map();
968
+ for (const resource of resources) {
969
+ for (let period = startPeriod; period <= endPeriod; period++) {
970
+ const key = `${resource.id}-${period}`;
971
+ allocations.set(key, {
972
+ resourceId: resource.id,
973
+ period: period.toString(),
974
+ allocations: [],
975
+ totalPercentage: 0
976
+ });
977
+ }
978
+ }
979
+ for (const project of projects) {
980
+ if (project.status !== "active" && project.status !== "planned")
981
+ continue;
982
+ const projectDuration = project.endPeriod - project.startPeriod + 1;
983
+ for (const phase of project.phases) {
984
+ const phaseStartOffset = project.phases.slice(0, project.phases.indexOf(phase)).reduce((sum, p) => sum + p.pct, 0) / 100;
985
+ const phaseEndOffset = phaseStartOffset + phase.pct / 100;
986
+ const phaseStartPeriod = Math.floor(project.startPeriod + phaseStartOffset * projectDuration);
987
+ const phaseEndPeriod = Math.min(Math.floor(project.startPeriod + phaseEndOffset * projectDuration), project.endPeriod);
988
+ for (const [resourceId, percentage] of Object.entries(phase.teamWeights)) {
989
+ if (percentage <= 0)
990
+ continue;
991
+ for (let period = phaseStartPeriod; period <= phaseEndPeriod; period++) {
992
+ if (period < startPeriod || period > endPeriod)
993
+ continue;
994
+ const key = `${resourceId}-${period}`;
995
+ const allocation = allocations.get(key);
996
+ if (allocation) {
997
+ allocation.allocations.push({
998
+ projectId: project.id,
999
+ projectName: project.name,
1000
+ phaseId: phase.id,
1001
+ phaseName: phase.name,
1002
+ percentage
1003
+ });
1004
+ allocation.totalPercentage += percentage;
1005
+ }
1006
+ }
1007
+ }
1008
+ }
1009
+ }
1010
+ return Array.from(allocations.values());
1011
+ }
1012
+ function detectResourceConflicts(allocations, resources) {
1013
+ const resourceMap = new Map(resources.map((r) => [r.id, r]));
1014
+ const conflicts = [];
1015
+ for (const allocation of allocations) {
1016
+ if (allocation.totalPercentage > 100) {
1017
+ const resource = resourceMap.get(allocation.resourceId);
1018
+ conflicts.push({
1019
+ resourceId: allocation.resourceId,
1020
+ resourceName: resource?.name || allocation.resourceId,
1021
+ period: allocation.period,
1022
+ allocations: allocation.allocations.map((a) => ({
1023
+ projectId: a.projectId,
1024
+ projectName: a.projectName,
1025
+ percentage: a.percentage
1026
+ })),
1027
+ totalPercentage: allocation.totalPercentage,
1028
+ severity: allocation.totalPercentage > 120 ? "critical" : "warning"
1029
+ });
1030
+ }
1031
+ }
1032
+ return conflicts;
1033
+ }
1034
+
897
1035
  // ../../b4m-core/packages/common/dist/src/types/entities/SystemSecretsTypes.js
898
1036
  var SST_PLACEHOLDER_VALUE = "my-secret-placeholder-value";
899
1037
  var NOT_CONFIGURED_PLACEHOLDER = "not-configured";
@@ -1136,6 +1274,43 @@ var SpiderErrorAction = z10.object({
1136
1274
  dryRun: z10.boolean().optional(),
1137
1275
  clientId: z10.string().optional()
1138
1276
  });
1277
+ var PiHistoryProgressAction = z10.object({
1278
+ action: z10.literal("pi_history_progress"),
1279
+ analysisJobId: z10.string(),
1280
+ repoFullName: z10.string(),
1281
+ phase: z10.enum([
1282
+ "fetching_issues",
1283
+ "fetching_prs",
1284
+ "calculating_stats",
1285
+ "building_profiles",
1286
+ "extracting_keywords",
1287
+ "saving"
1288
+ ]),
1289
+ percentage: z10.number(),
1290
+ message: z10.string(),
1291
+ itemsProcessed: z10.number().optional(),
1292
+ totalItems: z10.number().optional(),
1293
+ clientId: z10.string().optional()
1294
+ });
1295
+ var PiHistoryCompleteAction = z10.object({
1296
+ action: z10.literal("pi_history_complete"),
1297
+ analysisJobId: z10.string(),
1298
+ repoFullName: z10.string(),
1299
+ stats: z10.object({
1300
+ closedIssues: z10.number(),
1301
+ mergedPRs: z10.number(),
1302
+ contributors: z10.number()
1303
+ }),
1304
+ clientId: z10.string().optional()
1305
+ });
1306
+ var PiHistoryErrorAction = z10.object({
1307
+ action: z10.literal("pi_history_error"),
1308
+ analysisJobId: z10.string(),
1309
+ repoFullName: z10.string(),
1310
+ error: z10.string(),
1311
+ phase: z10.string(),
1312
+ clientId: z10.string().optional()
1313
+ });
1139
1314
  var StreamedChatCompletionAction = z10.object({
1140
1315
  action: z10.literal("streamed_chat_completion"),
1141
1316
  clientId: z10.string().optional(),
@@ -1257,6 +1432,11 @@ var ResearchModeStreamAction = z10.object({
1257
1432
  completionInfo: z10.any().optional()
1258
1433
  }).optional()
1259
1434
  });
1435
+ var VoiceCreditsExhaustedAction = z10.object({
1436
+ action: z10.literal("voice_credits_exhausted"),
1437
+ creditsUsed: z10.number(),
1438
+ clientId: z10.string().optional()
1439
+ });
1260
1440
  var SessionCreatedAction = shareableDocumentSchema.extend({
1261
1441
  action: z10.literal("session.created"),
1262
1442
  id: z10.string(),
@@ -1313,7 +1493,11 @@ var MessageDataToClient = z10.discriminatedUnion("action", [
1313
1493
  SpiderProgressUpdateAction,
1314
1494
  SpiderCompleteAction,
1315
1495
  SpiderErrorAction,
1316
- SessionCreatedAction
1496
+ PiHistoryProgressAction,
1497
+ PiHistoryCompleteAction,
1498
+ PiHistoryErrorAction,
1499
+ SessionCreatedAction,
1500
+ VoiceCreditsExhaustedAction
1317
1501
  ]);
1318
1502
 
1319
1503
  // ../../b4m-core/packages/common/dist/src/schemas/cliCompletions.js
@@ -1982,9 +2166,13 @@ var OPENAI_IMAGE_QUALITIES = ["standard", "hd", "low", "medium", "high"];
1982
2166
  var OpenAIImageQualitySchema = z16.enum(OPENAI_IMAGE_QUALITIES);
1983
2167
  var OPENAI_IMAGE_STYLES = ["vivid", "natural"];
1984
2168
  var OpenAIImageStyleSchema = z16.enum(OPENAI_IMAGE_STYLES);
2169
+ var LEGACY_IMAGE_MODEL_MAP = {
2170
+ "dall-e-3": ImageModels.GPT_IMAGE_1,
2171
+ "dall-e-2": ImageModels.GPT_IMAGE_1
2172
+ };
1985
2173
  var OpenAIImageGenerationInput = z16.object({
1986
2174
  prompt: z16.string(),
1987
- model: z16.enum(ALL_IMAGE_MODELS),
2175
+ model: z16.preprocess((val) => typeof val === "string" && Object.prototype.hasOwnProperty.call(LEGACY_IMAGE_MODEL_MAP, val) ? LEGACY_IMAGE_MODEL_MAP[val] : val, z16.enum(ALL_IMAGE_MODELS)),
1988
2176
  n: z16.number().min(1).max(10).optional(),
1989
2177
  quality: OpenAIImageQualitySchema.optional(),
1990
2178
  response_format: z16.enum(["b64_json", "url"]).optional(),
@@ -2147,6 +2335,7 @@ var SettingKeySchema = z21.enum([
2147
2335
  "EnableArtifacts",
2148
2336
  "EnableAgents",
2149
2337
  "EnableRapidReply",
2338
+ "EnableLattice",
2150
2339
  "RapidReplySettings",
2151
2340
  "EnableResearchEngine",
2152
2341
  "EnableOllama",
@@ -2672,13 +2861,14 @@ var API_SERVICE_GROUPS = {
2672
2861
  { key: "EnableResearchEngine", order: 8 },
2673
2862
  { key: "EnableReactViewer", order: 9 },
2674
2863
  { key: "EnableDeepResearch", order: 10 },
2675
- { key: "EnableKnowledgeBaseSearch", order: 11 },
2676
- { key: "EnableStreamIdleTimeout", order: 12 },
2677
- { key: "StreamIdleTimeoutSeconds", order: 13 },
2678
- { key: "EnableMcpToolFiltering", order: 14 },
2679
- { key: "McpToolFilteringMaxTools", order: 15 },
2680
- { key: "EnableParallelToolExecution", order: 16 },
2681
- { key: "EnableHelpChat", order: 17 }
2864
+ { key: "EnableLattice", order: 11 },
2865
+ { key: "EnableKnowledgeBaseSearch", order: 12 },
2866
+ { key: "EnableStreamIdleTimeout", order: 13 },
2867
+ { key: "StreamIdleTimeoutSeconds", order: 14 },
2868
+ { key: "EnableMcpToolFiltering", order: 15 },
2869
+ { key: "McpToolFilteringMaxTools", order: 16 },
2870
+ { key: "EnableParallelToolExecution", order: 17 },
2871
+ { key: "EnableHelpChat", order: 18 }
2682
2872
  ]
2683
2873
  },
2684
2874
  NOTEBOOK: {
@@ -3580,6 +3770,15 @@ var settingsMap = {
3580
3770
  group: API_SERVICE_GROUPS.EXPERIMENTAL.id,
3581
3771
  order: 9
3582
3772
  }),
3773
+ EnableLattice: makeBooleanSetting({
3774
+ key: "EnableLattice",
3775
+ name: "Enable Lattice",
3776
+ defaultValue: false,
3777
+ description: "Whether to enable the Lattice feature for natural language financial pro-forma modeling. Allows creating and manipulating spreadsheet-like models through conversation.",
3778
+ category: "Experimental",
3779
+ group: API_SERVICE_GROUPS.EXPERIMENTAL.id,
3780
+ order: 11
3781
+ }),
3583
3782
  EnableKnowledgeBaseSearch: makeBooleanSetting({
3584
3783
  key: "EnableKnowledgeBaseSearch",
3585
3784
  name: "Enable Knowledge Base Search",
@@ -3587,7 +3786,7 @@ var settingsMap = {
3587
3786
  description: "Allow AI to search user uploaded documents. When enabled, users can toggle the Knowledge Base Search tool in AI Settings.",
3588
3787
  category: "Experimental",
3589
3788
  group: API_SERVICE_GROUPS.EXPERIMENTAL.id,
3590
- order: 11
3789
+ order: 12
3591
3790
  }),
3592
3791
  enableVoiceSession: makeBooleanSetting({
3593
3792
  key: "enableVoiceSession",
@@ -4393,6 +4592,445 @@ var InternalTeamMemberSchema = z24.object({
4393
4592
  });
4394
4593
  var InternalTeamMemberListSchema = z24.array(InternalTeamMemberSchema);
4395
4594
 
4595
+ // ../../b4m-core/packages/common/dist/src/schemas/lattice.js
4596
+ import { z as z25 } from "zod";
4597
+ var LatticeDataTypeSchema = z25.enum([
4598
+ "number",
4599
+ "currency",
4600
+ "percentage",
4601
+ "string",
4602
+ "boolean",
4603
+ "date",
4604
+ "datetime"
4605
+ ]);
4606
+ var LatticeEntityTypeSchema = z25.enum(["line_item", "account", "period", "category", "scenario", "custom"]);
4607
+ var LatticeRelationshipTypeSchema = z25.enum(["parent_child", "temporal", "reference", "derived"]);
4608
+ var LatticeRuleTypeSchema = z25.enum(["formula", "aggregation", "constraint", "transformation", "conditional"]);
4609
+ var LatticeOperationSchema = z25.enum([
4610
+ // Arithmetic
4611
+ "ADD",
4612
+ "SUBTRACT",
4613
+ "MULTIPLY",
4614
+ "DIVIDE",
4615
+ "ABS",
4616
+ "ROUND",
4617
+ "FLOOR",
4618
+ "CEIL",
4619
+ "POWER",
4620
+ "SQRT",
4621
+ // Aggregation
4622
+ "SUM",
4623
+ "AVERAGE",
4624
+ "MIN",
4625
+ "MAX",
4626
+ "COUNT",
4627
+ "MEDIAN",
4628
+ // Logical
4629
+ "IF",
4630
+ "AND",
4631
+ "OR",
4632
+ "NOT",
4633
+ "EQUALS",
4634
+ "GREATER_THAN",
4635
+ "LESS_THAN",
4636
+ "GREATER_THAN_OR_EQUAL",
4637
+ "LESS_THAN_OR_EQUAL",
4638
+ "BETWEEN",
4639
+ // Financial
4640
+ "PERCENT_OF",
4641
+ "GROWTH_RATE",
4642
+ "NPV",
4643
+ "IRR",
4644
+ "PMT",
4645
+ "FV",
4646
+ "PV",
4647
+ // Special
4648
+ "REFERENCE",
4649
+ "LOOKUP"
4650
+ ]);
4651
+ var LatticeConditionOperatorSchema = z25.enum(["==", "!=", ">", "<", ">=", "<=", "contains", "in"]);
4652
+ var LatticePeriodGrainSchema = z25.enum(["day", "week", "month", "quarter", "year"]);
4653
+ var LatticeNegativeFormatSchema = z25.enum(["parentheses", "minus", "red"]);
4654
+ var LatticeViewTypeSchema = z25.enum([
4655
+ "table",
4656
+ "pivot",
4657
+ "time_series",
4658
+ "comparison",
4659
+ "summary_card",
4660
+ "waterfall",
4661
+ "tree"
4662
+ ]);
4663
+ var LatticeModelTypeSchema = z25.enum([
4664
+ "income_statement",
4665
+ "balance_sheet",
4666
+ "cashflow",
4667
+ "saas_metrics",
4668
+ "dcf",
4669
+ "lbo",
4670
+ "custom"
4671
+ ]);
4672
+ var LatticeIntentTypeSchema = z25.enum([
4673
+ "CREATE_ENTITY",
4674
+ "SET_VALUE",
4675
+ "CREATE_RULE",
4676
+ "QUERY_VALUE",
4677
+ "QUERY_AGGREGATE",
4678
+ "CREATE_VIEW",
4679
+ "COMPARE",
4680
+ "FORECAST",
4681
+ "EXPLAIN",
4682
+ "UNDO",
4683
+ "REDO",
4684
+ "LIST",
4685
+ "DELETE",
4686
+ "AMBIGUOUS"
4687
+ ]);
4688
+ var LatticeErrorTypeSchema = z25.enum([
4689
+ "PARSE_ERROR",
4690
+ "AMBIGUOUS_REFERENCE",
4691
+ "ENTITY_NOT_FOUND",
4692
+ "RULE_NOT_FOUND",
4693
+ "CIRCULAR_DEPENDENCY",
4694
+ "TYPE_MISMATCH",
4695
+ "DIVISION_BY_ZERO",
4696
+ "MISSING_DATA",
4697
+ "INVALID_PERIOD",
4698
+ "CONSTRAINT_VIOLATION",
4699
+ "INVALID_OPERATION"
4700
+ ]);
4701
+ var LatticeOperationTypeSchema = z25.enum([
4702
+ "CREATE_ENTITY",
4703
+ "UPDATE_ENTITY",
4704
+ "DELETE_ENTITY",
4705
+ "CREATE_RULE",
4706
+ "UPDATE_RULE",
4707
+ "DELETE_RULE",
4708
+ "SET_VALUE",
4709
+ "CREATE_VIEW",
4710
+ "UPDATE_VIEW",
4711
+ "DELETE_VIEW",
4712
+ "CREATE_SCENARIO",
4713
+ "UPDATE_SCENARIO",
4714
+ "DELETE_SCENARIO",
4715
+ "UPDATE_SETTINGS"
4716
+ ]);
4717
+ var LatticeExportFormatSchema = z25.enum(["csv", "json", "xlsx"]);
4718
+ var LatticePrimitiveValueSchema = z25.union([z25.number(), z25.string(), z25.boolean(), z25.date(), z25.null()]);
4719
+ var LatticeAttributeSchema = z25.object({
4720
+ key: z25.string().min(1).max(100),
4721
+ value: LatticePrimitiveValueSchema,
4722
+ dataType: LatticeDataTypeSchema,
4723
+ isComputed: z25.boolean().default(false),
4724
+ computedByRuleId: z25.string().optional(),
4725
+ timestamp: z25.number().optional(),
4726
+ metadata: z25.record(z25.unknown()).optional()
4727
+ });
4728
+ var LatticeEntitySchema = z25.object({
4729
+ id: z25.string().min(1).max(100),
4730
+ type: LatticeEntityTypeSchema,
4731
+ name: z25.string().min(1).max(255),
4732
+ displayName: z25.string().max(255).optional(),
4733
+ attributes: z25.array(LatticeAttributeSchema).default([]),
4734
+ metadata: z25.record(z25.unknown()).default({}),
4735
+ createdAt: z25.date(),
4736
+ updatedAt: z25.date()
4737
+ });
4738
+ var LatticeRelationshipSchema = z25.object({
4739
+ id: z25.string().min(1).max(100),
4740
+ type: LatticeRelationshipTypeSchema,
4741
+ fromEntityId: z25.string(),
4742
+ toEntityId: z25.string(),
4743
+ metadata: z25.record(z25.unknown()).optional()
4744
+ });
4745
+ var LatticeDataStoreSchema = z25.object({
4746
+ entities: z25.array(LatticeEntitySchema).default([]),
4747
+ relationships: z25.array(LatticeRelationshipSchema).default([])
4748
+ });
4749
+ var LatticeInputSchema = z25.object({
4750
+ type: z25.enum(["entity", "attribute", "rule", "literal", "range"]),
4751
+ ref: z25.string(),
4752
+ selector: z25.string().optional()
4753
+ });
4754
+ var LatticeOutputSchema = z25.object({
4755
+ targetEntityId: z25.string(),
4756
+ targetAttribute: z25.string(),
4757
+ dataType: LatticeDataTypeSchema
4758
+ });
4759
+ var LatticeConditionSchema = z25.object({
4760
+ left: LatticeInputSchema,
4761
+ operator: LatticeConditionOperatorSchema,
4762
+ right: LatticeInputSchema,
4763
+ logicalJoin: z25.enum(["AND", "OR"]).optional()
4764
+ });
4765
+ var LatticeRuleDefinitionSchema = z25.object({
4766
+ operation: LatticeOperationSchema,
4767
+ inputs: z25.array(LatticeInputSchema).min(1),
4768
+ output: LatticeOutputSchema,
4769
+ conditions: z25.array(LatticeConditionSchema).optional()
4770
+ });
4771
+ var LatticeRuleSchema = z25.object({
4772
+ id: z25.string().min(1).max(100),
4773
+ name: z25.string().min(1).max(255),
4774
+ description: z25.string().max(1e3).optional(),
4775
+ type: LatticeRuleTypeSchema,
4776
+ definition: LatticeRuleDefinitionSchema,
4777
+ dependencies: z25.array(z25.string()).default([]),
4778
+ priority: z25.number().int().default(0),
4779
+ enabled: z25.boolean().default(true),
4780
+ createdAt: z25.date(),
4781
+ updatedAt: z25.date()
4782
+ });
4783
+ var LatticeRulesetSchema = z25.object({
4784
+ id: z25.string().min(1).max(100),
4785
+ name: z25.string().min(1).max(255),
4786
+ ruleIds: z25.array(z25.string()).default([]),
4787
+ description: z25.string().max(1e3).optional()
4788
+ });
4789
+ var LatticeRulesStoreSchema = z25.object({
4790
+ rules: z25.array(LatticeRuleSchema).default([]),
4791
+ rulesets: z25.array(LatticeRulesetSchema).default([])
4792
+ });
4793
+ var LatticeRowConfigSchema = z25.object({
4794
+ source: z25.enum(["entity", "rule", "category"]),
4795
+ ref: z25.string(),
4796
+ label: z25.string().optional(),
4797
+ indent: z25.number().int().min(0).max(10).optional(),
4798
+ isSummary: z25.boolean().optional()
4799
+ });
4800
+ var LatticeColumnConfigSchema = z25.object({
4801
+ source: z25.enum(["period", "scenario", "attribute", "computed"]),
4802
+ ref: z25.string(),
4803
+ label: z25.string().optional(),
4804
+ width: z25.number().positive().optional()
4805
+ });
4806
+ var LatticeFilterSchema = z25.object({
4807
+ field: z25.string(),
4808
+ operator: LatticeConditionOperatorSchema,
4809
+ value: LatticePrimitiveValueSchema
4810
+ });
4811
+ var LatticeSortConfigSchema = z25.object({
4812
+ field: z25.string(),
4813
+ direction: z25.enum(["asc", "desc"])
4814
+ });
4815
+ var LatticeGroupConfigSchema = z25.object({
4816
+ groupBy: z25.array(z25.string()),
4817
+ aggregation: LatticeOperationSchema
4818
+ });
4819
+ var LatticeFormatConfigSchema = z25.object({
4820
+ numberFormat: z25.string().optional(),
4821
+ currencySymbol: z25.string().max(10).optional(),
4822
+ percentageDecimals: z25.number().int().min(0).max(10).optional(),
4823
+ negativeFormat: LatticeNegativeFormatSchema.optional(),
4824
+ showGridLines: z25.boolean().optional(),
4825
+ zebra: z25.boolean().optional(),
4826
+ compactMode: z25.boolean().optional()
4827
+ });
4828
+ var LatticeViewConfigSchema = z25.object({
4829
+ rows: z25.array(LatticeRowConfigSchema).optional(),
4830
+ columns: z25.array(LatticeColumnConfigSchema).optional(),
4831
+ filters: z25.array(LatticeFilterSchema).optional(),
4832
+ sorting: z25.array(LatticeSortConfigSchema).optional(),
4833
+ grouping: LatticeGroupConfigSchema.optional(),
4834
+ formatting: LatticeFormatConfigSchema.optional()
4835
+ });
4836
+ var LatticeViewSchema = z25.object({
4837
+ id: z25.string().min(1).max(100),
4838
+ type: LatticeViewTypeSchema,
4839
+ name: z25.string().min(1).max(255),
4840
+ config: LatticeViewConfigSchema,
4841
+ createdAt: z25.date(),
4842
+ updatedAt: z25.date()
4843
+ });
4844
+ var LatticeViewStoreSchema = z25.object({
4845
+ views: z25.array(LatticeViewSchema).default([]),
4846
+ activeViewId: z25.string().optional()
4847
+ });
4848
+ var LatticeModelSettingsSchema = z25.object({
4849
+ currency: z25.string().min(1).max(10).default("USD"),
4850
+ fiscalYearStart: z25.string().regex(/^\d{2}-\d{2}$/).default("01-01"),
4851
+ periodGrain: LatticePeriodGrainSchema.default("quarter"),
4852
+ defaultDecimalPlaces: z25.number().int().min(0).max(10).default(2),
4853
+ negativeFormat: LatticeNegativeFormatSchema.default("parentheses")
4854
+ });
4855
+ var LatticeHistoryOperationSchema = z25.object({
4856
+ id: z25.string(),
4857
+ type: LatticeOperationTypeSchema,
4858
+ timestamp: z25.date(),
4859
+ data: z25.record(z25.unknown()),
4860
+ inverse: z25.record(z25.unknown()),
4861
+ description: z25.string(),
4862
+ messageId: z25.string().optional()
4863
+ });
4864
+ var LatticeScenarioOverrideSchema = z25.object({
4865
+ entityId: z25.string(),
4866
+ attributeKey: z25.string(),
4867
+ value: LatticePrimitiveValueSchema
4868
+ });
4869
+ var LatticeScenarioSchema = z25.object({
4870
+ id: z25.string().min(1).max(100),
4871
+ name: z25.string().min(1).max(255),
4872
+ description: z25.string().max(1e3).optional(),
4873
+ overrides: z25.array(LatticeScenarioOverrideSchema).default([]),
4874
+ createdAt: z25.date(),
4875
+ updatedAt: z25.date()
4876
+ });
4877
+ var LatticeComputedValueSchema = z25.object({
4878
+ value: LatticePrimitiveValueSchema,
4879
+ computedByRuleId: z25.string(),
4880
+ computedAt: z25.date()
4881
+ });
4882
+ var LatticeComputedValuesSchema = z25.record(z25.record(LatticeComputedValueSchema));
4883
+ var LatticeCalculationStepSchema = z25.object({
4884
+ ruleId: z25.string(),
4885
+ ruleName: z25.string(),
4886
+ operation: LatticeOperationSchema,
4887
+ inputs: z25.array(z25.object({
4888
+ name: z25.string(),
4889
+ value: LatticePrimitiveValueSchema
4890
+ })),
4891
+ output: LatticePrimitiveValueSchema
4892
+ });
4893
+ var LatticeCalculationChainSchema = z25.object({
4894
+ targetEntity: z25.string(),
4895
+ targetAttribute: z25.string(),
4896
+ finalValue: LatticePrimitiveValueSchema,
4897
+ steps: z25.array(LatticeCalculationStepSchema)
4898
+ });
4899
+ var LatticeModelSchema = z25.object({
4900
+ // Identity
4901
+ id: z25.string().min(1).max(100),
4902
+ name: z25.string().min(1).max(255),
4903
+ description: z25.string().max(2e3).optional(),
4904
+ modelType: LatticeModelTypeSchema.default("custom"),
4905
+ // Ownership
4906
+ userId: z25.string(),
4907
+ sessionId: z25.string().optional(),
4908
+ projectId: z25.string().optional(),
4909
+ organizationId: z25.string().optional(),
4910
+ // Core Data Layers
4911
+ data: LatticeDataStoreSchema.default({ entities: [], relationships: [] }),
4912
+ rules: LatticeRulesStoreSchema.default({ rules: [], rulesets: [] }),
4913
+ views: LatticeViewStoreSchema.default({ views: [] }),
4914
+ // Settings
4915
+ settings: LatticeModelSettingsSchema.default({}),
4916
+ // Scenarios
4917
+ scenarios: z25.array(LatticeScenarioSchema).default([]),
4918
+ activeScenarioId: z25.string().optional(),
4919
+ // History
4920
+ operations: z25.array(LatticeHistoryOperationSchema).default([]),
4921
+ operationIndex: z25.number().int().min(-1).default(-1),
4922
+ // Versioning
4923
+ version: z25.number().int().positive().default(1),
4924
+ contentHash: z25.string().optional(),
4925
+ // Timestamps
4926
+ createdAt: z25.date(),
4927
+ updatedAt: z25.date(),
4928
+ lastComputedAt: z25.date().optional(),
4929
+ // Soft delete
4930
+ deletedAt: z25.date().optional()
4931
+ });
4932
+ var LatticeExtractedEntitySchema = z25.object({
4933
+ type: z25.enum([
4934
+ "line_item_name",
4935
+ "period",
4936
+ "amount",
4937
+ "percentage",
4938
+ "operation",
4939
+ "comparison_operator",
4940
+ "entity_reference",
4941
+ "category",
4942
+ "scenario"
4943
+ ]),
4944
+ value: z25.string(),
4945
+ normalizedValue: z25.union([z25.string(), z25.number()]).optional(),
4946
+ position: z25.object({
4947
+ start: z25.number().int().min(0),
4948
+ end: z25.number().int().min(0)
4949
+ }),
4950
+ confidence: z25.number().min(0).max(1)
4951
+ });
4952
+ var LatticeParsedIntentSchema = z25.object({
4953
+ intent: LatticeIntentTypeSchema,
4954
+ confidence: z25.number().min(0).max(1),
4955
+ entities: z25.array(LatticeExtractedEntitySchema),
4956
+ rawInput: z25.string(),
4957
+ normalizedInput: z25.string(),
4958
+ suggestedOperations: z25.array(LatticeHistoryOperationSchema).optional(),
4959
+ ambiguousRefs: z25.array(z25.object({
4960
+ value: z25.string(),
4961
+ candidates: z25.array(z25.string())
4962
+ })).optional(),
4963
+ clarificationNeeded: z25.string().optional()
4964
+ });
4965
+ var LatticeErrorSchema = z25.object({
4966
+ type: LatticeErrorTypeSchema,
4967
+ message: z25.string(),
4968
+ suggestions: z25.array(z25.string()).optional(),
4969
+ context: z25.object({
4970
+ input: z25.string().optional(),
4971
+ position: z25.number().optional(),
4972
+ relatedEntities: z25.array(z25.string()).optional(),
4973
+ relatedRules: z25.array(z25.string()).optional()
4974
+ }).optional()
4975
+ });
4976
+ var CreateLatticeModelRequestSchema = z25.object({
4977
+ name: z25.string().min(1).max(255),
4978
+ description: z25.string().max(2e3).optional(),
4979
+ modelType: LatticeModelTypeSchema.optional(),
4980
+ sessionId: z25.string().optional(),
4981
+ projectId: z25.string().optional(),
4982
+ settings: LatticeModelSettingsSchema.partial().optional()
4983
+ });
4984
+ var UpdateLatticeModelRequestSchema = z25.object({
4985
+ name: z25.string().min(1).max(255).optional(),
4986
+ description: z25.string().max(2e3).optional(),
4987
+ settings: LatticeModelSettingsSchema.partial().optional(),
4988
+ data: LatticeDataStoreSchema.optional(),
4989
+ rules: LatticeRulesStoreSchema.optional(),
4990
+ views: LatticeViewStoreSchema.optional()
4991
+ });
4992
+ var ComputeLatticeRequestSchema = z25.object({
4993
+ scenarioId: z25.string().optional()
4994
+ });
4995
+ var ComputeLatticeResponseSchema = z25.object({
4996
+ computedValues: LatticeComputedValuesSchema,
4997
+ duration: z25.number(),
4998
+ errors: z25.array(LatticeErrorSchema).optional()
4999
+ });
5000
+ var ExplainLatticeRequestSchema = z25.object({
5001
+ entityId: z25.string(),
5002
+ attributeKey: z25.string()
5003
+ });
5004
+ var ExplainLatticeResponseSchema = z25.object({
5005
+ chain: LatticeCalculationChainSchema
5006
+ });
5007
+ var ExportLatticeRequestSchema = z25.object({
5008
+ format: LatticeExportFormatSchema,
5009
+ viewId: z25.string().optional(),
5010
+ scenarioId: z25.string().optional()
5011
+ });
5012
+ var validateLatticeModel = (data) => {
5013
+ return LatticeModelSchema.parse(data);
5014
+ };
5015
+ var validateLatticeEntity = (data) => {
5016
+ return LatticeEntitySchema.parse(data);
5017
+ };
5018
+ var validateLatticeRule = (data) => {
5019
+ return LatticeRuleSchema.parse(data);
5020
+ };
5021
+ var validateLatticeParsedIntent = (data) => {
5022
+ return LatticeParsedIntentSchema.parse(data);
5023
+ };
5024
+ var safeParseLatticeModel = (data) => {
5025
+ return LatticeModelSchema.safeParse(data);
5026
+ };
5027
+ var safeParseLatticeEntity = (data) => {
5028
+ return LatticeEntitySchema.safeParse(data);
5029
+ };
5030
+ var safeParseLatticeRule = (data) => {
5031
+ return LatticeRuleSchema.safeParse(data);
5032
+ };
5033
+
4396
5034
  // ../../b4m-core/packages/common/dist/src/constants/user.js
4397
5035
  var PREDEFINED_USER_TAGS = ["Developer", "Analyst", "Customer"];
4398
5036
  var isPredefinedTag = (tag) => {
@@ -4403,134 +5041,136 @@ var getPredefinedTags = () => {
4403
5041
  };
4404
5042
 
4405
5043
  // ../../b4m-core/packages/common/dist/src/llm.js
4406
- import { z as z25 } from "zod";
4407
- var DashboardParamsSchema = z25.object({
4408
- dashboardDataSources: z25.array(z25.object({
4409
- sourceName: z25.string(),
4410
- data: z25.any()
5044
+ import { z as z26 } from "zod";
5045
+ var DashboardParamsSchema = z26.object({
5046
+ dashboardDataSources: z26.array(z26.object({
5047
+ sourceName: z26.string(),
5048
+ data: z26.any()
4411
5049
  })),
4412
- promptName: z25.string().optional()
5050
+ promptName: z26.string().optional()
4413
5051
  });
4414
- var QuestMasterParamsSchema = z25.object({
4415
- questMasterPlanId: z25.string(),
4416
- questId: z25.string(),
4417
- subQuestId: z25.string()
5052
+ var QuestMasterParamsSchema = z26.object({
5053
+ questMasterPlanId: z26.string(),
5054
+ questId: z26.string(),
5055
+ subQuestId: z26.string()
4418
5056
  });
4419
- var ResearchModeConfigurationSchema = z25.object({
4420
- id: z25.string(),
4421
- enabled: z25.boolean(),
4422
- model: z25.string(),
4423
- parameters: z25.object({
4424
- temperature: z25.number().optional(),
4425
- maxTokens: z25.number().optional(),
4426
- topP: z25.number().optional(),
4427
- presencePenalty: z25.number().optional(),
4428
- frequencyPenalty: z25.number().optional()
5057
+ var ResearchModeConfigurationSchema = z26.object({
5058
+ id: z26.string(),
5059
+ enabled: z26.boolean(),
5060
+ model: z26.string(),
5061
+ parameters: z26.object({
5062
+ temperature: z26.number().optional(),
5063
+ maxTokens: z26.number().optional(),
5064
+ topP: z26.number().optional(),
5065
+ presencePenalty: z26.number().optional(),
5066
+ frequencyPenalty: z26.number().optional()
4429
5067
  }),
4430
- label: z25.string().optional()
5068
+ label: z26.string().optional()
4431
5069
  });
4432
- var ResearchModeParamsSchema = z25.object({
4433
- enabled: z25.boolean(),
4434
- configurations: z25.array(ResearchModeConfigurationSchema).max(4)
5070
+ var ResearchModeParamsSchema = z26.object({
5071
+ enabled: z26.boolean(),
5072
+ configurations: z26.array(ResearchModeConfigurationSchema).max(4)
4435
5073
  });
4436
5074
  var GenerateImageIvokeParamsSchema = OpenAIImageGenerationInput.extend({
4437
- sessionId: z25.string(),
4438
- questId: z25.string().optional(),
4439
- organizationId: z25.string().nullable().optional(),
4440
- width: z25.number().optional(),
4441
- height: z25.number().optional(),
4442
- aspect_ratio: z25.string().optional(),
4443
- fabFileIds: z25.array(z25.string()).default([]),
4444
- tools: z25.array(z25.union([b4mLLMTools, z25.string()])).optional(),
4445
- promptEnhancement: z25.object({
4446
- originalPrompt: z25.string(),
4447
- enhancedPrompt: z25.string(),
4448
- promptWasEnhanced: z25.boolean()
5075
+ sessionId: z26.string(),
5076
+ questId: z26.string().optional(),
5077
+ organizationId: z26.string().nullable().optional(),
5078
+ width: z26.number().optional(),
5079
+ height: z26.number().optional(),
5080
+ aspect_ratio: z26.string().optional(),
5081
+ fabFileIds: z26.array(z26.string()).default([]),
5082
+ tools: z26.array(z26.union([b4mLLMTools, z26.string()])).optional(),
5083
+ promptEnhancement: z26.object({
5084
+ originalPrompt: z26.string(),
5085
+ enhancedPrompt: z26.string(),
5086
+ promptWasEnhanced: z26.boolean()
4449
5087
  }).optional()
4450
5088
  });
4451
5089
  var GenerateImageRequestBodySchema = GenerateImageIvokeParamsSchema.extend({
4452
- sessionId: z25.string().optional(),
4453
- sessionName: z25.string().optional(),
4454
- projectId: z25.string().optional()
5090
+ sessionId: z26.string().optional(),
5091
+ sessionName: z26.string().optional(),
5092
+ projectId: z26.string().optional()
4455
5093
  });
4456
5094
  var GenerateImageToolCallSchema = OpenAIImageGenerationInput.extend({
4457
- safety_tolerance: z25.number().optional(),
4458
- prompt_upsampling: z25.boolean().optional(),
4459
- output_format: z25.enum(["jpeg", "png"]).nullable().optional(),
4460
- seed: z25.number().nullable().optional(),
4461
- editModel: z25.string().optional()
5095
+ safety_tolerance: z26.number().optional(),
5096
+ prompt_upsampling: z26.boolean().optional(),
5097
+ output_format: z26.enum(["jpeg", "png"]).nullable().optional(),
5098
+ seed: z26.number().nullable().optional(),
5099
+ editModel: z26.string().optional()
4462
5100
  // Model to use for image editing operations (separate from generation model)
4463
5101
  }).omit({
4464
5102
  prompt: true
4465
5103
  });
4466
5104
  var EditImageRequestBodySchema = OpenAIImageGenerationInput.extend({
4467
- sessionId: z25.string(),
4468
- questId: z25.string().optional(),
4469
- organizationId: z25.string().nullable().optional(),
4470
- aspect_ratio: z25.string().optional(),
4471
- fabFileIds: z25.array(z25.string()).default([]),
4472
- image: z25.string()
4473
- });
4474
- var ChatCompletionInvokeParamsSchema = z25.object({
5105
+ sessionId: z26.string(),
5106
+ questId: z26.string().optional(),
5107
+ organizationId: z26.string().nullable().optional(),
5108
+ aspect_ratio: z26.string().optional(),
5109
+ fabFileIds: z26.array(z26.string()).default([]),
5110
+ image: z26.string()
5111
+ });
5112
+ var ChatCompletionInvokeParamsSchema = z26.object({
4475
5113
  /** Notebook session ID */
4476
- sessionId: z25.string(),
4477
- historyCount: z25.number(),
5114
+ sessionId: z26.string(),
5115
+ historyCount: z26.number(),
4478
5116
  imageConfig: GenerateImageToolCallSchema.optional(),
4479
- deepResearchConfig: z25.object({
4480
- maxDepth: z25.number().optional(),
4481
- duration: z25.number().optional(),
5117
+ deepResearchConfig: z26.object({
5118
+ maxDepth: z26.number().optional(),
5119
+ duration: z26.number().optional(),
4482
5120
  // Note: searchers are passed via ToolContext and not through this API schema
4483
- searchers: z25.array(z25.any()).optional()
5121
+ searchers: z26.array(z26.any()).optional()
4484
5122
  }).optional(),
4485
- fabFileIds: z25.array(z25.string()),
5123
+ fabFileIds: z26.array(z26.string()),
4486
5124
  /** Prompt message */
4487
- message: z25.string(),
4488
- messageFileIds: z25.array(z25.string()).default([]),
4489
- questId: z25.string().optional(),
5125
+ message: z26.string(),
5126
+ messageFileIds: z26.array(z26.string()).default([]),
5127
+ questId: z26.string().optional(),
4490
5128
  /** Extra context messages to include in the conversation from external sources */
4491
- extraContextMessages: z25.array(z25.object({
4492
- role: z25.enum(["user", "assistant", "system", "function", "tool"]),
4493
- content: z25.union([z25.string(), z25.array(z25.any())]),
4494
- fabFileIds: z25.array(z25.string()).optional()
5129
+ extraContextMessages: z26.array(z26.object({
5130
+ role: z26.enum(["user", "assistant", "system", "function", "tool"]),
5131
+ content: z26.union([z26.string(), z26.array(z26.any())]),
5132
+ fabFileIds: z26.array(z26.string()).optional()
4495
5133
  })).optional(),
4496
5134
  /** Dashboard related params */
4497
5135
  dashboardParams: DashboardParamsSchema.optional(),
4498
5136
  /** LLM params */
4499
5137
  params: ChatCompletionCreateInputSchema,
4500
5138
  /** Whether Quest Master is enabled */
4501
- enableQuestMaster: z25.boolean().optional(),
5139
+ enableQuestMaster: z26.boolean().optional(),
4502
5140
  /** Whether Mementos is enabled */
4503
- enableMementos: z25.boolean().optional(),
5141
+ enableMementos: z26.boolean().optional(),
4504
5142
  /** Whether Artifacts is enabled */
4505
- enableArtifacts: z25.boolean().optional(),
5143
+ enableArtifacts: z26.boolean().optional(),
4506
5144
  /** Whether Agents is enabled */
4507
- enableAgents: z25.boolean().optional(),
5145
+ enableAgents: z26.boolean().optional(),
5146
+ /** Whether Lattice (financial pro-forma modeling) is enabled */
5147
+ enableLattice: z26.boolean().optional(),
4508
5148
  /** LLM tools to enable (built-in tools or MCP tool names) */
4509
- tools: z25.array(z25.union([b4mLLMTools, z25.string()])).optional(),
5149
+ tools: z26.array(z26.union([b4mLLMTools, z26.string()])).optional(),
4510
5150
  /** Enabled MCP servers */
4511
- mcpServers: z25.array(z25.string()).optional(),
5151
+ mcpServers: z26.array(z26.string()).optional(),
4512
5152
  /** Project ID */
4513
- projectId: z25.string().optional(),
5153
+ projectId: z26.string().optional(),
4514
5154
  /** Organization ID */
4515
- organizationId: z25.string().nullable().optional(),
5155
+ organizationId: z26.string().nullable().optional(),
4516
5156
  /** Tool prompt ID to use for the LLM */
4517
- toolPromptId: z25.string().optional(),
5157
+ toolPromptId: z26.string().optional(),
4518
5158
  /** Quest Master related params */
4519
5159
  questMaster: QuestMasterParamsSchema.optional(),
4520
5160
  /** Research Mode related params */
4521
5161
  researchMode: ResearchModeParamsSchema.optional(),
4522
5162
  /** Fallback model ID to try if primary model fails */
4523
- fallbackModel: z25.string().optional(),
5163
+ fallbackModel: z26.string().optional(),
4524
5164
  /** Embedding model to use */
4525
- embeddingModel: z25.string().optional(),
5165
+ embeddingModel: z26.string().optional(),
4526
5166
  /** User's timezone (IANA format, e.g., "America/New_York") */
4527
- timezone: z25.string().optional()
5167
+ timezone: z26.string().optional()
4528
5168
  });
4529
5169
  var LLMApiRequestBodySchema = ChatCompletionInvokeParamsSchema.extend({
4530
5170
  /** Notebook session ID */
4531
- sessionId: z25.string().optional(),
5171
+ sessionId: z26.string().optional(),
4532
5172
  /** Notebook session name */
4533
- sessionName: z25.string().optional()
5173
+ sessionName: z26.string().optional()
4534
5174
  });
4535
5175
 
4536
5176
  // ../../b4m-core/packages/common/dist/src/utils.js
@@ -4679,16 +5319,16 @@ var extractSnippetMeta = (content) => {
4679
5319
  };
4680
5320
 
4681
5321
  // ../../b4m-core/packages/common/dist/src/search.js
4682
- import { z as z26 } from "zod";
4683
- var searchSchema = z26.object({
4684
- search: z26.string().optional(),
4685
- pagination: z26.object({
4686
- page: z26.coerce.number().int().positive(),
4687
- limit: z26.coerce.number().int().positive()
5322
+ import { z as z27 } from "zod";
5323
+ var searchSchema = z27.object({
5324
+ search: z27.string().optional(),
5325
+ pagination: z27.object({
5326
+ page: z27.coerce.number().int().positive(),
5327
+ limit: z27.coerce.number().int().positive()
4688
5328
  }).optional(),
4689
- orderBy: z26.object({
4690
- field: z26.string(),
4691
- direction: z26.enum(["asc", "desc"])
5329
+ orderBy: z27.object({
5330
+ field: z27.string(),
5331
+ direction: z27.enum(["asc", "desc"])
4692
5332
  }).optional()
4693
5333
  });
4694
5334
 
@@ -4826,6 +5466,80 @@ var LinkedInApi = class {
4826
5466
  };
4827
5467
  };
4828
5468
 
5469
+ // ../../b4m-core/packages/common/dist/src/rateLimitHeaders.js
5470
+ function getHeader(headers, name) {
5471
+ if (!headers || typeof headers !== "object")
5472
+ return null;
5473
+ if (typeof headers.get === "function") {
5474
+ const val = headers.get(name);
5475
+ return typeof val === "string" ? val : null;
5476
+ }
5477
+ const value = headers[name] ?? headers[name.toLowerCase()];
5478
+ return typeof value === "string" ? value : null;
5479
+ }
5480
+ function parseNumber(value) {
5481
+ if (value === null || value === void 0)
5482
+ return null;
5483
+ const num = Number(value);
5484
+ return Number.isFinite(num) ? num : null;
5485
+ }
5486
+ function parseRateLimitHeaders(headers) {
5487
+ const limitStr = getHeader(headers, "X-RateLimit-Limit") ?? getHeader(headers, "x-ratelimit-limit");
5488
+ const remainingStr = getHeader(headers, "X-RateLimit-Remaining") ?? getHeader(headers, "x-ratelimit-remaining");
5489
+ const resetStr = getHeader(headers, "X-RateLimit-Reset") ?? getHeader(headers, "x-ratelimit-reset");
5490
+ const retryAfterStr = getHeader(headers, "Retry-After") ?? getHeader(headers, "retry-after");
5491
+ const limit = parseNumber(limitStr);
5492
+ const remaining = parseNumber(remainingStr);
5493
+ let resetAt = null;
5494
+ if (resetStr !== null) {
5495
+ const resetNum = Number(resetStr);
5496
+ if (Number.isFinite(resetNum)) {
5497
+ resetAt = new Date(resetNum * 1e3);
5498
+ } else {
5499
+ const parsed = new Date(resetStr);
5500
+ if (!isNaN(parsed.getTime())) {
5501
+ resetAt = parsed;
5502
+ }
5503
+ }
5504
+ }
5505
+ let retryAfterMs = null;
5506
+ if (retryAfterStr !== null) {
5507
+ const retryNum = Number(retryAfterStr);
5508
+ if (Number.isFinite(retryNum)) {
5509
+ retryAfterMs = retryNum * 1e3;
5510
+ } else {
5511
+ const parsed = new Date(retryAfterStr);
5512
+ if (!isNaN(parsed.getTime())) {
5513
+ retryAfterMs = Math.max(0, parsed.getTime() - Date.now());
5514
+ }
5515
+ }
5516
+ }
5517
+ let usagePercent = null;
5518
+ if (limit !== null && limit > 0 && remaining !== null) {
5519
+ usagePercent = Math.round((limit - remaining) / limit * 100);
5520
+ }
5521
+ return { limit, remaining, resetAt, retryAfterMs, usagePercent };
5522
+ }
5523
+ function isNearLimit(info, thresholdPercent = 80) {
5524
+ if (info.usagePercent === null)
5525
+ return false;
5526
+ return info.usagePercent >= thresholdPercent;
5527
+ }
5528
+ function buildRateLimitLogEntry(integration, endpoint, info, wasThrottled = false) {
5529
+ return {
5530
+ type: wasThrottled ? "RATE_LIMIT_ERROR" : "RATE_LIMIT",
5531
+ integration,
5532
+ endpoint,
5533
+ limit: info.limit,
5534
+ remaining: info.remaining,
5535
+ resetAt: info.resetAt?.toISOString() ?? null,
5536
+ retryAfterMs: info.retryAfterMs,
5537
+ usagePercent: info.usagePercent,
5538
+ wasThrottled,
5539
+ timestamp: (/* @__PURE__ */ new Date()).toISOString()
5540
+ };
5541
+ }
5542
+
4829
5543
  // ../../b4m-core/packages/common/dist/src/confluence/format.js
4830
5544
  function stripHtmlAndNormalizeWhitespace(html) {
4831
5545
  if (!html)
@@ -5080,6 +5794,26 @@ var ConfluenceApi = class {
5080
5794
  headers,
5081
5795
  body: options.body ? JSON.stringify(options.body) : void 0
5082
5796
  });
5797
+ const rateLimitInfo = parseRateLimitHeaders(response.headers);
5798
+ if (rateLimitInfo.remaining !== null) {
5799
+ const logEntry = buildRateLimitLogEntry("confluence", path, rateLimitInfo);
5800
+ console.error(JSON.stringify(logEntry));
5801
+ }
5802
+ if (isNearLimit(rateLimitInfo)) {
5803
+ console.error(`[Confluence] Rate limit warning: ${rateLimitInfo.usagePercent}% used (${rateLimitInfo.remaining}/${rateLimitInfo.limit} remaining)`);
5804
+ }
5805
+ if (response.status === 429 && (options._retryCount ?? 0) < 1) {
5806
+ const retryAfterMs = rateLimitInfo.retryAfterMs ?? 5e3;
5807
+ const delayMs = Math.min(retryAfterMs, 1e4);
5808
+ const logEntry = buildRateLimitLogEntry("confluence", path, rateLimitInfo, true);
5809
+ console.error(JSON.stringify(logEntry));
5810
+ console.error(`[Confluence] Rate limited on ${path}, retrying after ${delayMs}ms`);
5811
+ await new Promise((resolve) => setTimeout(resolve, delayMs));
5812
+ return this.request(method, path, {
5813
+ ...options,
5814
+ _retryCount: (options._retryCount ?? 0) + 1
5815
+ });
5816
+ }
5083
5817
  if (!response.ok) {
5084
5818
  const rawBody = await response.text();
5085
5819
  let errorDetail = response.statusText;
@@ -6619,6 +7353,26 @@ var JiraApi = class {
6619
7353
  headers,
6620
7354
  body: options.body ? JSON.stringify(options.body) : void 0
6621
7355
  });
7356
+ const rateLimitInfo = parseRateLimitHeaders(response.headers);
7357
+ if (rateLimitInfo.remaining !== null) {
7358
+ const logEntry = buildRateLimitLogEntry("jira", path, rateLimitInfo);
7359
+ console.error(JSON.stringify(logEntry));
7360
+ }
7361
+ if (isNearLimit(rateLimitInfo)) {
7362
+ console.error(`[Jira] Rate limit warning: ${rateLimitInfo.usagePercent}% used (${rateLimitInfo.remaining}/${rateLimitInfo.limit} remaining)`);
7363
+ }
7364
+ if (response.status === 429 && (options._retryCount ?? 0) < 1) {
7365
+ const retryAfterMs = rateLimitInfo.retryAfterMs ?? 5e3;
7366
+ const delayMs = Math.min(retryAfterMs, 1e4);
7367
+ const logEntry = buildRateLimitLogEntry("jira", path, rateLimitInfo, true);
7368
+ console.error(JSON.stringify(logEntry));
7369
+ console.error(`[Jira] Rate limited on ${path}, retrying after ${delayMs}ms`);
7370
+ await new Promise((resolve) => setTimeout(resolve, delayMs));
7371
+ return this.request(method, path, {
7372
+ ...options,
7373
+ _retryCount: (options._retryCount ?? 0) + 1
7374
+ });
7375
+ }
6622
7376
  if (!response.ok) {
6623
7377
  const errorBody = await response.text();
6624
7378
  throw new Error(`Jira API error (${response.status}): ${errorBody}`);
@@ -7373,89 +8127,89 @@ var getMcpProviderMetadata = (providerName) => {
7373
8127
  };
7374
8128
 
7375
8129
  // ../../b4m-core/packages/common/dist/src/schemas/artifacts.js
7376
- import { z as z27 } from "zod";
7377
- var ArtifactStatusSchema = z27.enum(["draft", "review", "published", "archived", "deleted"]);
7378
- var VisibilitySchema = z27.enum(["private", "project", "organization", "public"]);
7379
- var ArtifactPermissionsSchema = z27.object({
7380
- canRead: z27.array(z27.string()),
7381
- canWrite: z27.array(z27.string()),
7382
- canDelete: z27.array(z27.string()),
7383
- isPublic: z27.boolean().default(false),
7384
- inheritFromProject: z27.boolean().default(true)
7385
- });
7386
- var BaseArtifactSchema = z27.object({
7387
- id: z27.string().uuid(),
8130
+ import { z as z28 } from "zod";
8131
+ var ArtifactStatusSchema = z28.enum(["draft", "review", "published", "archived", "deleted"]);
8132
+ var VisibilitySchema = z28.enum(["private", "project", "organization", "public"]);
8133
+ var ArtifactPermissionsSchema = z28.object({
8134
+ canRead: z28.array(z28.string()),
8135
+ canWrite: z28.array(z28.string()),
8136
+ canDelete: z28.array(z28.string()),
8137
+ isPublic: z28.boolean().default(false),
8138
+ inheritFromProject: z28.boolean().default(true)
8139
+ });
8140
+ var BaseArtifactSchema = z28.object({
8141
+ id: z28.string().uuid(),
7388
8142
  type: ArtifactTypeSchema,
7389
- title: z27.string().min(1).max(255),
7390
- description: z27.string().max(1e3).optional(),
8143
+ title: z28.string().min(1).max(255),
8144
+ description: z28.string().max(1e3).optional(),
7391
8145
  // Versioning
7392
- version: z27.number().int().positive().default(1),
7393
- versionTag: z27.string().max(100).optional(),
7394
- currentVersionId: z27.string().uuid().optional(),
7395
- parentVersionId: z27.string().uuid().optional(),
8146
+ version: z28.number().int().positive().default(1),
8147
+ versionTag: z28.string().max(100).optional(),
8148
+ currentVersionId: z28.string().uuid().optional(),
8149
+ parentVersionId: z28.string().uuid().optional(),
7396
8150
  // Timestamps
7397
- createdAt: z27.date(),
7398
- updatedAt: z27.date(),
7399
- publishedAt: z27.date().optional(),
7400
- deletedAt: z27.date().optional(),
8151
+ createdAt: z28.date(),
8152
+ updatedAt: z28.date(),
8153
+ publishedAt: z28.date().optional(),
8154
+ deletedAt: z28.date().optional(),
7401
8155
  // Ownership & Access
7402
- userId: z27.string(),
7403
- projectId: z27.string().optional(),
7404
- organizationId: z27.string().optional(),
8156
+ userId: z28.string(),
8157
+ projectId: z28.string().optional(),
8158
+ organizationId: z28.string().optional(),
7405
8159
  visibility: VisibilitySchema.default("private"),
7406
8160
  permissions: ArtifactPermissionsSchema,
7407
8161
  // Relationships
7408
- sourceQuestId: z27.string().optional(),
7409
- sessionId: z27.string().optional(),
7410
- parentArtifactId: z27.string().uuid().optional(),
8162
+ sourceQuestId: z28.string().optional(),
8163
+ sessionId: z28.string().optional(),
8164
+ parentArtifactId: z28.string().uuid().optional(),
7411
8165
  // Status
7412
8166
  status: ArtifactStatusSchema.default("draft"),
7413
- tags: z27.array(z27.string().max(50)).max(20).default([]),
8167
+ tags: z28.array(z28.string().max(50)).max(20).default([]),
7414
8168
  // Content
7415
- contentHash: z27.string(),
7416
- contentSize: z27.number().int().nonnegative(),
8169
+ contentHash: z28.string(),
8170
+ contentSize: z28.number().int().nonnegative(),
7417
8171
  // Metadata
7418
- metadata: z27.record(z27.unknown()).optional()
8172
+ metadata: z28.record(z28.unknown()).optional()
7419
8173
  });
7420
- var EnhancedArtifactMetadataSchema = z27.object({
7421
- language: z27.string().optional(),
7422
- dependencies: z27.array(z27.string()).optional(),
7423
- settings: z27.record(z27.unknown()).optional()
8174
+ var EnhancedArtifactMetadataSchema = z28.object({
8175
+ language: z28.string().optional(),
8176
+ dependencies: z28.array(z28.string()).optional(),
8177
+ settings: z28.record(z28.unknown()).optional()
7424
8178
  });
7425
8179
  var ReactArtifactV2Schema = BaseArtifactSchema.extend({
7426
- type: z27.literal("react"),
7427
- content: z27.string(),
8180
+ type: z28.literal("react"),
8181
+ content: z28.string(),
7428
8182
  metadata: EnhancedArtifactMetadataSchema.extend({
7429
- dependencies: z27.array(z27.string()),
7430
- props: z27.record(z27.unknown()).optional(),
7431
- hasDefaultExport: z27.boolean(),
7432
- errorBoundary: z27.boolean().default(true)
8183
+ dependencies: z28.array(z28.string()),
8184
+ props: z28.record(z28.unknown()).optional(),
8185
+ hasDefaultExport: z28.boolean(),
8186
+ errorBoundary: z28.boolean().default(true)
7433
8187
  })
7434
8188
  });
7435
8189
  var HtmlArtifactV2Schema = BaseArtifactSchema.extend({
7436
- type: z27.literal("html"),
7437
- content: z27.string(),
8190
+ type: z28.literal("html"),
8191
+ content: z28.string(),
7438
8192
  metadata: EnhancedArtifactMetadataSchema.extend({
7439
- allowedScripts: z27.array(z27.string()).default([]),
7440
- cspPolicy: z27.string().optional(),
7441
- sanitized: z27.boolean().default(false)
8193
+ allowedScripts: z28.array(z28.string()).default([]),
8194
+ cspPolicy: z28.string().optional(),
8195
+ sanitized: z28.boolean().default(false)
7442
8196
  })
7443
8197
  });
7444
8198
  var SvgArtifactV2Schema = BaseArtifactSchema.extend({
7445
- type: z27.literal("svg"),
7446
- content: z27.string(),
8199
+ type: z28.literal("svg"),
8200
+ content: z28.string(),
7447
8201
  metadata: EnhancedArtifactMetadataSchema.extend({
7448
- viewBox: z27.string().optional(),
7449
- width: z27.number().positive().optional(),
7450
- height: z27.number().positive().optional(),
7451
- sanitized: z27.boolean().default(false)
8202
+ viewBox: z28.string().optional(),
8203
+ width: z28.number().positive().optional(),
8204
+ height: z28.number().positive().optional(),
8205
+ sanitized: z28.boolean().default(false)
7452
8206
  })
7453
8207
  });
7454
8208
  var MermaidArtifactV2Schema = BaseArtifactSchema.extend({
7455
- type: z27.literal("mermaid"),
7456
- content: z27.string(),
8209
+ type: z28.literal("mermaid"),
8210
+ content: z28.string(),
7457
8211
  metadata: EnhancedArtifactMetadataSchema.extend({
7458
- chartType: z27.enum([
8212
+ chartType: z28.enum([
7459
8213
  "flowchart",
7460
8214
  "sequenceDiagram",
7461
8215
  "classDiagram",
@@ -7465,7 +8219,7 @@ var MermaidArtifactV2Schema = BaseArtifactSchema.extend({
7465
8219
  "pie",
7466
8220
  "mindmap"
7467
8221
  ]).optional(),
7468
- description: z27.string().optional()
8222
+ description: z28.string().optional()
7469
8223
  })
7470
8224
  });
7471
8225
  var ArtifactStatuses;
@@ -7493,39 +8247,39 @@ var validateMermaidArtifactV2 = (data) => {
7493
8247
  };
7494
8248
 
7495
8249
  // ../../b4m-core/packages/common/dist/src/schemas/questmaster.js
7496
- import { z as z28 } from "zod";
7497
- var QuestStatusSchema = z28.enum(["pending", "in-progress", "completed", "skipped"]);
7498
- var QuestSchema = z28.object({
7499
- id: z28.string().uuid(),
7500
- title: z28.string().min(1).max(255),
7501
- description: z28.string().max(1e3),
8250
+ import { z as z29 } from "zod";
8251
+ var QuestStatusSchema = z29.enum(["pending", "in-progress", "completed", "skipped"]);
8252
+ var QuestSchema = z29.object({
8253
+ id: z29.string().uuid(),
8254
+ title: z29.string().min(1).max(255),
8255
+ description: z29.string().max(1e3),
7502
8256
  status: QuestStatusSchema.default("pending"),
7503
- order: z28.number().int().nonnegative(),
7504
- dependencies: z28.array(z28.string().uuid()).optional(),
7505
- estimatedMinutes: z28.number().int().positive().optional(),
7506
- completedAt: z28.date().optional(),
7507
- completedBy: z28.string().optional(),
7508
- metadata: z28.record(z28.unknown()).optional()
8257
+ order: z29.number().int().nonnegative(),
8258
+ dependencies: z29.array(z29.string().uuid()).optional(),
8259
+ estimatedMinutes: z29.number().int().positive().optional(),
8260
+ completedAt: z29.date().optional(),
8261
+ completedBy: z29.string().optional(),
8262
+ metadata: z29.record(z29.unknown()).optional()
7509
8263
  });
7510
- var QuestResourceSchema = z28.object({
7511
- type: z28.enum(["documentation", "tutorial", "example", "tool"]),
7512
- title: z28.string().min(1).max(255),
7513
- url: z28.string().url(),
7514
- description: z28.string().max(500).optional()
7515
- });
7516
- var QuestMasterContentSchema = z28.object({
7517
- goal: z28.string().min(1).max(500),
7518
- quests: z28.array(QuestSchema).min(1),
7519
- totalSteps: z28.number().int().positive(),
7520
- estimatedDuration: z28.number().int().positive().optional(),
7521
- complexity: z28.enum(["low", "medium", "high"]),
7522
- category: z28.string().max(100).optional(),
7523
- prerequisites: z28.array(z28.string().max(255)).optional(),
7524
- completionCriteria: z28.array(z28.string().max(500)).optional(),
7525
- resources: z28.array(QuestResourceSchema).optional()
8264
+ var QuestResourceSchema = z29.object({
8265
+ type: z29.enum(["documentation", "tutorial", "example", "tool"]),
8266
+ title: z29.string().min(1).max(255),
8267
+ url: z29.string().url(),
8268
+ description: z29.string().max(500).optional()
8269
+ });
8270
+ var QuestMasterContentSchema = z29.object({
8271
+ goal: z29.string().min(1).max(500),
8272
+ quests: z29.array(QuestSchema).min(1),
8273
+ totalSteps: z29.number().int().positive(),
8274
+ estimatedDuration: z29.number().int().positive().optional(),
8275
+ complexity: z29.enum(["low", "medium", "high"]),
8276
+ category: z29.string().max(100).optional(),
8277
+ prerequisites: z29.array(z29.string().max(255)).optional(),
8278
+ completionCriteria: z29.array(z29.string().max(500)).optional(),
8279
+ resources: z29.array(QuestResourceSchema).optional()
7526
8280
  });
7527
8281
  var QuestMasterArtifactV2Schema = BaseArtifactSchema.extend({
7528
- type: z28.literal("questmaster"),
8282
+ type: z29.literal("questmaster"),
7529
8283
  content: QuestMasterContentSchema
7530
8284
  });
7531
8285
  var validateQuest = (data) => {
@@ -7542,13 +8296,13 @@ var safeParseQuestMasterArtifactV2 = (data) => {
7542
8296
  };
7543
8297
 
7544
8298
  // ../../b4m-core/packages/common/dist/src/schemas/curation.js
7545
- import { z as z29 } from "zod";
8299
+ import { z as z30 } from "zod";
7546
8300
  var CurationType;
7547
8301
  (function(CurationType2) {
7548
8302
  CurationType2["TRANSCRIPT"] = "transcript";
7549
8303
  CurationType2["EXECUTIVE_SUMMARY"] = "executive_summary";
7550
8304
  })(CurationType || (CurationType = {}));
7551
- var CurationTypeSchema = z29.nativeEnum(CurationType);
8305
+ var CurationTypeSchema = z30.nativeEnum(CurationType);
7552
8306
  var CurationArtifactType;
7553
8307
  (function(CurationArtifactType2) {
7554
8308
  CurationArtifactType2["CODE"] = "code";
@@ -7561,7 +8315,7 @@ var CurationArtifactType;
7561
8315
  CurationArtifactType2["DEEP_RESEARCH"] = "deep_research";
7562
8316
  CurationArtifactType2["IMAGE"] = "image";
7563
8317
  })(CurationArtifactType || (CurationArtifactType = {}));
7564
- var CurationArtifactTypeSchema = z29.enum([
8318
+ var CurationArtifactTypeSchema = z30.enum([
7565
8319
  "CODE",
7566
8320
  "REACT",
7567
8321
  "HTML",
@@ -7572,28 +8326,28 @@ var CurationArtifactTypeSchema = z29.enum([
7572
8326
  "DEEP_RESEARCH",
7573
8327
  "IMAGE"
7574
8328
  ]);
7575
- var ExportFormatSchema = z29.enum(["markdown", "txt", "html"]);
7576
- var CurationOptionsSchema = z29.object({
8329
+ var ExportFormatSchema = z30.enum(["markdown", "txt", "html"]);
8330
+ var CurationOptionsSchema = z30.object({
7577
8331
  /** Curation type: transcript (Option 1) or executive_summary (Option 2) */
7578
8332
  curationType: CurationTypeSchema.default(CurationType.TRANSCRIPT),
7579
8333
  /** Include code artifacts in the curated notebook */
7580
- includeCode: z29.boolean().default(true),
8334
+ includeCode: z30.boolean().default(true),
7581
8335
  /** Include diagrams (Mermaid, SVG) in the curated notebook */
7582
- includeDiagrams: z29.boolean().default(true),
8336
+ includeDiagrams: z30.boolean().default(true),
7583
8337
  /** Include data visualizations (Recharts) in the curated notebook */
7584
- includeDataViz: z29.boolean().default(true),
8338
+ includeDataViz: z30.boolean().default(true),
7585
8339
  /** Include QuestMaster plans in the curated notebook */
7586
- includeQuestMaster: z29.boolean().default(true),
8340
+ includeQuestMaster: z30.boolean().default(true),
7587
8341
  /** Include Deep Research findings in the curated notebook */
7588
- includeResearch: z29.boolean().default(true),
8342
+ includeResearch: z30.boolean().default(true),
7589
8343
  /** Include images in the curated notebook */
7590
- includeImages: z29.boolean().default(true),
8344
+ includeImages: z30.boolean().default(true),
7591
8345
  /** Token budget for processing (varies by curation type) */
7592
- tokenBudget: z29.number().optional(),
8346
+ tokenBudget: z30.number().optional(),
7593
8347
  /** Export format for the curated notebook */
7594
8348
  exportFormat: ExportFormatSchema.default("markdown"),
7595
8349
  /** Custom notebook name (optional, defaults to curated-notebook-{sessionId}) */
7596
- customNotebookName: z29.string().optional()
8350
+ customNotebookName: z30.string().optional()
7597
8351
  });
7598
8352
 
7599
8353
  // ../../b4m-core/packages/common/dist/src/utils/artifactHelpers.js
@@ -7776,6 +8530,12 @@ function buildSSEEvent(text, info) {
7776
8530
  outputTokens: info.outputTokens
7777
8531
  };
7778
8532
  }
8533
+ if (info?.creditsUsed !== void 0 || info?.usdCost !== void 0) {
8534
+ event.credits = {
8535
+ used: info.creditsUsed,
8536
+ usdCost: info.usdCost
8537
+ };
8538
+ }
7779
8539
  if (info?.thinking && info.thinking.length > 0) {
7780
8540
  event.thinking = info.thinking;
7781
8541
  }
@@ -7852,6 +8612,7 @@ export {
7852
8612
  SvgArtifactSchema,
7853
8613
  MermaidArtifactSchema,
7854
8614
  RechartsArtifactSchema,
8615
+ LatticeArtifactSchema,
7855
8616
  MermaidChartMetadataSchema,
7856
8617
  ChatHistoryItemWithArtifactsSchema,
7857
8618
  ArtifactOperationSchema,
@@ -7910,6 +8671,13 @@ export {
7910
8671
  RapidReplyResponseStylesCommon,
7911
8672
  RapidReplyTransitionModes,
7912
8673
  RapidReplyFallbackBehaviors,
8674
+ EmailJobStatus,
8675
+ EmailSendStatus,
8676
+ EmailJobOverallStatus,
8677
+ EmailCategory,
8678
+ calculateTaskValue,
8679
+ calculateResourceAllocations,
8680
+ detectResourceConflicts,
7913
8681
  SST_PLACEHOLDER_VALUE,
7914
8682
  NOT_CONFIGURED_PLACEHOLDER,
7915
8683
  isPlaceholderValue,
@@ -7933,6 +8701,9 @@ export {
7933
8701
  SpiderProgressUpdateAction,
7934
8702
  SpiderCompleteAction,
7935
8703
  SpiderErrorAction,
8704
+ PiHistoryProgressAction,
8705
+ PiHistoryCompleteAction,
8706
+ PiHistoryErrorAction,
7936
8707
  StreamedChatCompletionAction,
7937
8708
  StreamedRapidReplyAction,
7938
8709
  HeartbeatPongAction,
@@ -7941,6 +8712,7 @@ export {
7941
8712
  UpdateResearchTaskStatusAction,
7942
8713
  ImportHistoryJobProgressUpdateAction,
7943
8714
  ResearchModeStreamAction,
8715
+ VoiceCreditsExhaustedAction,
7944
8716
  SessionCreatedAction,
7945
8717
  MessageDataToServer,
7946
8718
  MessageDataToClient,
@@ -7971,6 +8743,7 @@ export {
7971
8743
  OpenAIImageQualitySchema,
7972
8744
  OPENAI_IMAGE_STYLES,
7973
8745
  OpenAIImageStyleSchema,
8746
+ LEGACY_IMAGE_MODEL_MAP,
7974
8747
  OpenAIImageGenerationInput,
7975
8748
  PASSWORD_RULES,
7976
8749
  PASSWORD_ERROR_MESSAGES,
@@ -8030,6 +8803,67 @@ export {
8030
8803
  SlackEvents,
8031
8804
  InternalTeamMemberSchema,
8032
8805
  InternalTeamMemberListSchema,
8806
+ LatticeDataTypeSchema,
8807
+ LatticeEntityTypeSchema,
8808
+ LatticeRelationshipTypeSchema,
8809
+ LatticeRuleTypeSchema,
8810
+ LatticeOperationSchema,
8811
+ LatticeConditionOperatorSchema,
8812
+ LatticePeriodGrainSchema,
8813
+ LatticeNegativeFormatSchema,
8814
+ LatticeViewTypeSchema,
8815
+ LatticeModelTypeSchema,
8816
+ LatticeIntentTypeSchema,
8817
+ LatticeErrorTypeSchema,
8818
+ LatticeOperationTypeSchema,
8819
+ LatticeExportFormatSchema,
8820
+ LatticePrimitiveValueSchema,
8821
+ LatticeAttributeSchema,
8822
+ LatticeEntitySchema,
8823
+ LatticeRelationshipSchema,
8824
+ LatticeDataStoreSchema,
8825
+ LatticeInputSchema,
8826
+ LatticeOutputSchema,
8827
+ LatticeConditionSchema,
8828
+ LatticeRuleDefinitionSchema,
8829
+ LatticeRuleSchema,
8830
+ LatticeRulesetSchema,
8831
+ LatticeRulesStoreSchema,
8832
+ LatticeRowConfigSchema,
8833
+ LatticeColumnConfigSchema,
8834
+ LatticeFilterSchema,
8835
+ LatticeSortConfigSchema,
8836
+ LatticeGroupConfigSchema,
8837
+ LatticeFormatConfigSchema,
8838
+ LatticeViewConfigSchema,
8839
+ LatticeViewSchema,
8840
+ LatticeViewStoreSchema,
8841
+ LatticeModelSettingsSchema,
8842
+ LatticeHistoryOperationSchema,
8843
+ LatticeScenarioOverrideSchema,
8844
+ LatticeScenarioSchema,
8845
+ LatticeComputedValueSchema,
8846
+ LatticeComputedValuesSchema,
8847
+ LatticeCalculationStepSchema,
8848
+ LatticeCalculationChainSchema,
8849
+ LatticeModelSchema,
8850
+ LatticeExtractedEntitySchema,
8851
+ LatticeParsedIntentSchema,
8852
+ LatticeErrorSchema,
8853
+ CreateLatticeModelRequestSchema,
8854
+ UpdateLatticeModelRequestSchema,
8855
+ ComputeLatticeRequestSchema,
8856
+ ComputeLatticeResponseSchema,
8857
+ ExplainLatticeRequestSchema,
8858
+ ExplainLatticeResponseSchema,
8859
+ ExportLatticeRequestSchema,
8860
+ validateLatticeModel,
8861
+ validateLatticeEntity,
8862
+ validateLatticeRule,
8863
+ validateLatticeParsedIntent,
8864
+ safeParseLatticeModel,
8865
+ safeParseLatticeEntity,
8866
+ safeParseLatticeRule,
8033
8867
  PREDEFINED_USER_TAGS,
8034
8868
  isPredefinedTag,
8035
8869
  getPredefinedTags,
@@ -8056,6 +8890,9 @@ export {
8056
8890
  extractSnippetMeta,
8057
8891
  searchSchema,
8058
8892
  LinkedInApi,
8893
+ parseRateLimitHeaders,
8894
+ isNearLimit,
8895
+ buildRateLimitLogEntry,
8059
8896
  RESTRICTION_OPERATIONS,
8060
8897
  RESTRICTION_SUBJECT_TYPES,
8061
8898
  CONFLUENCE_MAX_ATTACHMENT_SIZE,