@bike4mind/cli 0.2.29-subagent-delegation.18906 → 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.
@@ -310,9 +310,7 @@ var b4mLLMTools = z5.enum([
310
310
  "iss_tracker",
311
311
  "planet_visibility",
312
312
  // Knowledge base search
313
- "search_knowledge_base",
314
- // Agent delegation
315
- "delegate_to_agent"
313
+ "search_knowledge_base"
316
314
  ]);
317
315
  var B4MLLMToolsList = b4mLLMTools.options.map((tool) => tool);
318
316
  var RechartsChartTypeSchema = z5.enum([
@@ -368,7 +366,9 @@ var ArtifactTypeSchema = z6.enum([
368
366
  "code",
369
367
  "quest",
370
368
  "file",
371
- "questmaster"
369
+ "questmaster",
370
+ "lattice"
371
+ // Financial pro-forma models
372
372
  ]);
373
373
  var ArtifactSchema = z6.object({
374
374
  id: z6.string(),
@@ -448,6 +448,17 @@ var RechartsArtifactSchema = ArtifactSchema.extend({
448
448
  colors: z6.array(z6.string()).optional()
449
449
  })
450
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
+ });
451
462
  var MermaidChartMetadataSchema = z6.object({
452
463
  chartType: z6.enum([
453
464
  "flowchart",
@@ -481,7 +492,8 @@ var ClaudeArtifactMimeTypes = {
481
492
  MERMAID: "application/vnd.ant.mermaid",
482
493
  RECHARTS: "application/vnd.ant.recharts",
483
494
  CODE: "application/vnd.ant.code",
484
- MARKDOWN: "text/markdown"
495
+ MARKDOWN: "text/markdown",
496
+ LATTICE: "application/vnd.b4m.lattice"
485
497
  };
486
498
 
487
499
  // ../../b4m-core/packages/common/dist/src/types/entities/AppFileTypes.js
@@ -897,6 +909,129 @@ var RapidReplyResponseStylesCommon = ["auto", "casual", "professional", "code"];
897
909
  var RapidReplyTransitionModes = ["replace", "append", "enhance"];
898
910
  var RapidReplyFallbackBehaviors = ["disable", "continue", "notify"];
899
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
+
900
1035
  // ../../b4m-core/packages/common/dist/src/types/entities/SystemSecretsTypes.js
901
1036
  var SST_PLACEHOLDER_VALUE = "my-secret-placeholder-value";
902
1037
  var NOT_CONFIGURED_PLACEHOLDER = "not-configured";
@@ -1139,6 +1274,43 @@ var SpiderErrorAction = z10.object({
1139
1274
  dryRun: z10.boolean().optional(),
1140
1275
  clientId: z10.string().optional()
1141
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
+ });
1142
1314
  var StreamedChatCompletionAction = z10.object({
1143
1315
  action: z10.literal("streamed_chat_completion"),
1144
1316
  clientId: z10.string().optional(),
@@ -1260,6 +1432,11 @@ var ResearchModeStreamAction = z10.object({
1260
1432
  completionInfo: z10.any().optional()
1261
1433
  }).optional()
1262
1434
  });
1435
+ var VoiceCreditsExhaustedAction = z10.object({
1436
+ action: z10.literal("voice_credits_exhausted"),
1437
+ creditsUsed: z10.number(),
1438
+ clientId: z10.string().optional()
1439
+ });
1263
1440
  var SessionCreatedAction = shareableDocumentSchema.extend({
1264
1441
  action: z10.literal("session.created"),
1265
1442
  id: z10.string(),
@@ -1316,7 +1493,11 @@ var MessageDataToClient = z10.discriminatedUnion("action", [
1316
1493
  SpiderProgressUpdateAction,
1317
1494
  SpiderCompleteAction,
1318
1495
  SpiderErrorAction,
1319
- SessionCreatedAction
1496
+ PiHistoryProgressAction,
1497
+ PiHistoryCompleteAction,
1498
+ PiHistoryErrorAction,
1499
+ SessionCreatedAction,
1500
+ VoiceCreditsExhaustedAction
1320
1501
  ]);
1321
1502
 
1322
1503
  // ../../b4m-core/packages/common/dist/src/schemas/cliCompletions.js
@@ -2154,6 +2335,7 @@ var SettingKeySchema = z21.enum([
2154
2335
  "EnableArtifacts",
2155
2336
  "EnableAgents",
2156
2337
  "EnableRapidReply",
2338
+ "EnableLattice",
2157
2339
  "RapidReplySettings",
2158
2340
  "EnableResearchEngine",
2159
2341
  "EnableOllama",
@@ -2679,13 +2861,14 @@ var API_SERVICE_GROUPS = {
2679
2861
  { key: "EnableResearchEngine", order: 8 },
2680
2862
  { key: "EnableReactViewer", order: 9 },
2681
2863
  { key: "EnableDeepResearch", order: 10 },
2682
- { key: "EnableKnowledgeBaseSearch", order: 11 },
2683
- { key: "EnableStreamIdleTimeout", order: 12 },
2684
- { key: "StreamIdleTimeoutSeconds", order: 13 },
2685
- { key: "EnableMcpToolFiltering", order: 14 },
2686
- { key: "McpToolFilteringMaxTools", order: 15 },
2687
- { key: "EnableParallelToolExecution", order: 16 },
2688
- { 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 }
2689
2872
  ]
2690
2873
  },
2691
2874
  NOTEBOOK: {
@@ -3587,6 +3770,15 @@ var settingsMap = {
3587
3770
  group: API_SERVICE_GROUPS.EXPERIMENTAL.id,
3588
3771
  order: 9
3589
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
+ }),
3590
3782
  EnableKnowledgeBaseSearch: makeBooleanSetting({
3591
3783
  key: "EnableKnowledgeBaseSearch",
3592
3784
  name: "Enable Knowledge Base Search",
@@ -3594,7 +3786,7 @@ var settingsMap = {
3594
3786
  description: "Allow AI to search user uploaded documents. When enabled, users can toggle the Knowledge Base Search tool in AI Settings.",
3595
3787
  category: "Experimental",
3596
3788
  group: API_SERVICE_GROUPS.EXPERIMENTAL.id,
3597
- order: 11
3789
+ order: 12
3598
3790
  }),
3599
3791
  enableVoiceSession: makeBooleanSetting({
3600
3792
  key: "enableVoiceSession",
@@ -4400,6 +4592,445 @@ var InternalTeamMemberSchema = z24.object({
4400
4592
  });
4401
4593
  var InternalTeamMemberListSchema = z24.array(InternalTeamMemberSchema);
4402
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
+
4403
5034
  // ../../b4m-core/packages/common/dist/src/constants/user.js
4404
5035
  var PREDEFINED_USER_TAGS = ["Developer", "Analyst", "Customer"];
4405
5036
  var isPredefinedTag = (tag) => {
@@ -4410,134 +5041,136 @@ var getPredefinedTags = () => {
4410
5041
  };
4411
5042
 
4412
5043
  // ../../b4m-core/packages/common/dist/src/llm.js
4413
- import { z as z25 } from "zod";
4414
- var DashboardParamsSchema = z25.object({
4415
- dashboardDataSources: z25.array(z25.object({
4416
- sourceName: z25.string(),
4417
- 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()
4418
5049
  })),
4419
- promptName: z25.string().optional()
5050
+ promptName: z26.string().optional()
4420
5051
  });
4421
- var QuestMasterParamsSchema = z25.object({
4422
- questMasterPlanId: z25.string(),
4423
- questId: z25.string(),
4424
- subQuestId: z25.string()
5052
+ var QuestMasterParamsSchema = z26.object({
5053
+ questMasterPlanId: z26.string(),
5054
+ questId: z26.string(),
5055
+ subQuestId: z26.string()
4425
5056
  });
4426
- var ResearchModeConfigurationSchema = z25.object({
4427
- id: z25.string(),
4428
- enabled: z25.boolean(),
4429
- model: z25.string(),
4430
- parameters: z25.object({
4431
- temperature: z25.number().optional(),
4432
- maxTokens: z25.number().optional(),
4433
- topP: z25.number().optional(),
4434
- presencePenalty: z25.number().optional(),
4435
- 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()
4436
5067
  }),
4437
- label: z25.string().optional()
5068
+ label: z26.string().optional()
4438
5069
  });
4439
- var ResearchModeParamsSchema = z25.object({
4440
- enabled: z25.boolean(),
4441
- configurations: z25.array(ResearchModeConfigurationSchema).max(4)
5070
+ var ResearchModeParamsSchema = z26.object({
5071
+ enabled: z26.boolean(),
5072
+ configurations: z26.array(ResearchModeConfigurationSchema).max(4)
4442
5073
  });
4443
5074
  var GenerateImageIvokeParamsSchema = OpenAIImageGenerationInput.extend({
4444
- sessionId: z25.string(),
4445
- questId: z25.string().optional(),
4446
- organizationId: z25.string().nullable().optional(),
4447
- width: z25.number().optional(),
4448
- height: z25.number().optional(),
4449
- aspect_ratio: z25.string().optional(),
4450
- fabFileIds: z25.array(z25.string()).default([]),
4451
- tools: z25.array(z25.union([b4mLLMTools, z25.string()])).optional(),
4452
- promptEnhancement: z25.object({
4453
- originalPrompt: z25.string(),
4454
- enhancedPrompt: z25.string(),
4455
- 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()
4456
5087
  }).optional()
4457
5088
  });
4458
5089
  var GenerateImageRequestBodySchema = GenerateImageIvokeParamsSchema.extend({
4459
- sessionId: z25.string().optional(),
4460
- sessionName: z25.string().optional(),
4461
- projectId: z25.string().optional()
5090
+ sessionId: z26.string().optional(),
5091
+ sessionName: z26.string().optional(),
5092
+ projectId: z26.string().optional()
4462
5093
  });
4463
5094
  var GenerateImageToolCallSchema = OpenAIImageGenerationInput.extend({
4464
- safety_tolerance: z25.number().optional(),
4465
- prompt_upsampling: z25.boolean().optional(),
4466
- output_format: z25.enum(["jpeg", "png"]).nullable().optional(),
4467
- seed: z25.number().nullable().optional(),
4468
- 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()
4469
5100
  // Model to use for image editing operations (separate from generation model)
4470
5101
  }).omit({
4471
5102
  prompt: true
4472
5103
  });
4473
5104
  var EditImageRequestBodySchema = OpenAIImageGenerationInput.extend({
4474
- sessionId: z25.string(),
4475
- questId: z25.string().optional(),
4476
- organizationId: z25.string().nullable().optional(),
4477
- aspect_ratio: z25.string().optional(),
4478
- fabFileIds: z25.array(z25.string()).default([]),
4479
- image: z25.string()
4480
- });
4481
- 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({
4482
5113
  /** Notebook session ID */
4483
- sessionId: z25.string(),
4484
- historyCount: z25.number(),
5114
+ sessionId: z26.string(),
5115
+ historyCount: z26.number(),
4485
5116
  imageConfig: GenerateImageToolCallSchema.optional(),
4486
- deepResearchConfig: z25.object({
4487
- maxDepth: z25.number().optional(),
4488
- duration: z25.number().optional(),
5117
+ deepResearchConfig: z26.object({
5118
+ maxDepth: z26.number().optional(),
5119
+ duration: z26.number().optional(),
4489
5120
  // Note: searchers are passed via ToolContext and not through this API schema
4490
- searchers: z25.array(z25.any()).optional()
5121
+ searchers: z26.array(z26.any()).optional()
4491
5122
  }).optional(),
4492
- fabFileIds: z25.array(z25.string()),
5123
+ fabFileIds: z26.array(z26.string()),
4493
5124
  /** Prompt message */
4494
- message: z25.string(),
4495
- messageFileIds: z25.array(z25.string()).default([]),
4496
- questId: z25.string().optional(),
5125
+ message: z26.string(),
5126
+ messageFileIds: z26.array(z26.string()).default([]),
5127
+ questId: z26.string().optional(),
4497
5128
  /** Extra context messages to include in the conversation from external sources */
4498
- extraContextMessages: z25.array(z25.object({
4499
- role: z25.enum(["user", "assistant", "system", "function", "tool"]),
4500
- content: z25.union([z25.string(), z25.array(z25.any())]),
4501
- 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()
4502
5133
  })).optional(),
4503
5134
  /** Dashboard related params */
4504
5135
  dashboardParams: DashboardParamsSchema.optional(),
4505
5136
  /** LLM params */
4506
5137
  params: ChatCompletionCreateInputSchema,
4507
5138
  /** Whether Quest Master is enabled */
4508
- enableQuestMaster: z25.boolean().optional(),
5139
+ enableQuestMaster: z26.boolean().optional(),
4509
5140
  /** Whether Mementos is enabled */
4510
- enableMementos: z25.boolean().optional(),
5141
+ enableMementos: z26.boolean().optional(),
4511
5142
  /** Whether Artifacts is enabled */
4512
- enableArtifacts: z25.boolean().optional(),
5143
+ enableArtifacts: z26.boolean().optional(),
4513
5144
  /** Whether Agents is enabled */
4514
- enableAgents: z25.boolean().optional(),
5145
+ enableAgents: z26.boolean().optional(),
5146
+ /** Whether Lattice (financial pro-forma modeling) is enabled */
5147
+ enableLattice: z26.boolean().optional(),
4515
5148
  /** LLM tools to enable (built-in tools or MCP tool names) */
4516
- tools: z25.array(z25.union([b4mLLMTools, z25.string()])).optional(),
5149
+ tools: z26.array(z26.union([b4mLLMTools, z26.string()])).optional(),
4517
5150
  /** Enabled MCP servers */
4518
- mcpServers: z25.array(z25.string()).optional(),
5151
+ mcpServers: z26.array(z26.string()).optional(),
4519
5152
  /** Project ID */
4520
- projectId: z25.string().optional(),
5153
+ projectId: z26.string().optional(),
4521
5154
  /** Organization ID */
4522
- organizationId: z25.string().nullable().optional(),
5155
+ organizationId: z26.string().nullable().optional(),
4523
5156
  /** Tool prompt ID to use for the LLM */
4524
- toolPromptId: z25.string().optional(),
5157
+ toolPromptId: z26.string().optional(),
4525
5158
  /** Quest Master related params */
4526
5159
  questMaster: QuestMasterParamsSchema.optional(),
4527
5160
  /** Research Mode related params */
4528
5161
  researchMode: ResearchModeParamsSchema.optional(),
4529
5162
  /** Fallback model ID to try if primary model fails */
4530
- fallbackModel: z25.string().optional(),
5163
+ fallbackModel: z26.string().optional(),
4531
5164
  /** Embedding model to use */
4532
- embeddingModel: z25.string().optional(),
5165
+ embeddingModel: z26.string().optional(),
4533
5166
  /** User's timezone (IANA format, e.g., "America/New_York") */
4534
- timezone: z25.string().optional()
5167
+ timezone: z26.string().optional()
4535
5168
  });
4536
5169
  var LLMApiRequestBodySchema = ChatCompletionInvokeParamsSchema.extend({
4537
5170
  /** Notebook session ID */
4538
- sessionId: z25.string().optional(),
5171
+ sessionId: z26.string().optional(),
4539
5172
  /** Notebook session name */
4540
- sessionName: z25.string().optional()
5173
+ sessionName: z26.string().optional()
4541
5174
  });
4542
5175
 
4543
5176
  // ../../b4m-core/packages/common/dist/src/utils.js
@@ -4686,16 +5319,16 @@ var extractSnippetMeta = (content) => {
4686
5319
  };
4687
5320
 
4688
5321
  // ../../b4m-core/packages/common/dist/src/search.js
4689
- import { z as z26 } from "zod";
4690
- var searchSchema = z26.object({
4691
- search: z26.string().optional(),
4692
- pagination: z26.object({
4693
- page: z26.coerce.number().int().positive(),
4694
- 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()
4695
5328
  }).optional(),
4696
- orderBy: z26.object({
4697
- field: z26.string(),
4698
- direction: z26.enum(["asc", "desc"])
5329
+ orderBy: z27.object({
5330
+ field: z27.string(),
5331
+ direction: z27.enum(["asc", "desc"])
4699
5332
  }).optional()
4700
5333
  });
4701
5334
 
@@ -4833,6 +5466,80 @@ var LinkedInApi = class {
4833
5466
  };
4834
5467
  };
4835
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
+
4836
5543
  // ../../b4m-core/packages/common/dist/src/confluence/format.js
4837
5544
  function stripHtmlAndNormalizeWhitespace(html) {
4838
5545
  if (!html)
@@ -5087,6 +5794,26 @@ var ConfluenceApi = class {
5087
5794
  headers,
5088
5795
  body: options.body ? JSON.stringify(options.body) : void 0
5089
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
+ }
5090
5817
  if (!response.ok) {
5091
5818
  const rawBody = await response.text();
5092
5819
  let errorDetail = response.statusText;
@@ -6626,6 +7353,26 @@ var JiraApi = class {
6626
7353
  headers,
6627
7354
  body: options.body ? JSON.stringify(options.body) : void 0
6628
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
+ }
6629
7376
  if (!response.ok) {
6630
7377
  const errorBody = await response.text();
6631
7378
  throw new Error(`Jira API error (${response.status}): ${errorBody}`);
@@ -7380,89 +8127,89 @@ var getMcpProviderMetadata = (providerName) => {
7380
8127
  };
7381
8128
 
7382
8129
  // ../../b4m-core/packages/common/dist/src/schemas/artifacts.js
7383
- import { z as z27 } from "zod";
7384
- var ArtifactStatusSchema = z27.enum(["draft", "review", "published", "archived", "deleted"]);
7385
- var VisibilitySchema = z27.enum(["private", "project", "organization", "public"]);
7386
- var ArtifactPermissionsSchema = z27.object({
7387
- canRead: z27.array(z27.string()),
7388
- canWrite: z27.array(z27.string()),
7389
- canDelete: z27.array(z27.string()),
7390
- isPublic: z27.boolean().default(false),
7391
- inheritFromProject: z27.boolean().default(true)
7392
- });
7393
- var BaseArtifactSchema = z27.object({
7394
- 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(),
7395
8142
  type: ArtifactTypeSchema,
7396
- title: z27.string().min(1).max(255),
7397
- description: z27.string().max(1e3).optional(),
8143
+ title: z28.string().min(1).max(255),
8144
+ description: z28.string().max(1e3).optional(),
7398
8145
  // Versioning
7399
- version: z27.number().int().positive().default(1),
7400
- versionTag: z27.string().max(100).optional(),
7401
- currentVersionId: z27.string().uuid().optional(),
7402
- 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(),
7403
8150
  // Timestamps
7404
- createdAt: z27.date(),
7405
- updatedAt: z27.date(),
7406
- publishedAt: z27.date().optional(),
7407
- deletedAt: z27.date().optional(),
8151
+ createdAt: z28.date(),
8152
+ updatedAt: z28.date(),
8153
+ publishedAt: z28.date().optional(),
8154
+ deletedAt: z28.date().optional(),
7408
8155
  // Ownership & Access
7409
- userId: z27.string(),
7410
- projectId: z27.string().optional(),
7411
- organizationId: z27.string().optional(),
8156
+ userId: z28.string(),
8157
+ projectId: z28.string().optional(),
8158
+ organizationId: z28.string().optional(),
7412
8159
  visibility: VisibilitySchema.default("private"),
7413
8160
  permissions: ArtifactPermissionsSchema,
7414
8161
  // Relationships
7415
- sourceQuestId: z27.string().optional(),
7416
- sessionId: z27.string().optional(),
7417
- parentArtifactId: z27.string().uuid().optional(),
8162
+ sourceQuestId: z28.string().optional(),
8163
+ sessionId: z28.string().optional(),
8164
+ parentArtifactId: z28.string().uuid().optional(),
7418
8165
  // Status
7419
8166
  status: ArtifactStatusSchema.default("draft"),
7420
- tags: z27.array(z27.string().max(50)).max(20).default([]),
8167
+ tags: z28.array(z28.string().max(50)).max(20).default([]),
7421
8168
  // Content
7422
- contentHash: z27.string(),
7423
- contentSize: z27.number().int().nonnegative(),
8169
+ contentHash: z28.string(),
8170
+ contentSize: z28.number().int().nonnegative(),
7424
8171
  // Metadata
7425
- metadata: z27.record(z27.unknown()).optional()
8172
+ metadata: z28.record(z28.unknown()).optional()
7426
8173
  });
7427
- var EnhancedArtifactMetadataSchema = z27.object({
7428
- language: z27.string().optional(),
7429
- dependencies: z27.array(z27.string()).optional(),
7430
- 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()
7431
8178
  });
7432
8179
  var ReactArtifactV2Schema = BaseArtifactSchema.extend({
7433
- type: z27.literal("react"),
7434
- content: z27.string(),
8180
+ type: z28.literal("react"),
8181
+ content: z28.string(),
7435
8182
  metadata: EnhancedArtifactMetadataSchema.extend({
7436
- dependencies: z27.array(z27.string()),
7437
- props: z27.record(z27.unknown()).optional(),
7438
- hasDefaultExport: z27.boolean(),
7439
- 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)
7440
8187
  })
7441
8188
  });
7442
8189
  var HtmlArtifactV2Schema = BaseArtifactSchema.extend({
7443
- type: z27.literal("html"),
7444
- content: z27.string(),
8190
+ type: z28.literal("html"),
8191
+ content: z28.string(),
7445
8192
  metadata: EnhancedArtifactMetadataSchema.extend({
7446
- allowedScripts: z27.array(z27.string()).default([]),
7447
- cspPolicy: z27.string().optional(),
7448
- sanitized: z27.boolean().default(false)
8193
+ allowedScripts: z28.array(z28.string()).default([]),
8194
+ cspPolicy: z28.string().optional(),
8195
+ sanitized: z28.boolean().default(false)
7449
8196
  })
7450
8197
  });
7451
8198
  var SvgArtifactV2Schema = BaseArtifactSchema.extend({
7452
- type: z27.literal("svg"),
7453
- content: z27.string(),
8199
+ type: z28.literal("svg"),
8200
+ content: z28.string(),
7454
8201
  metadata: EnhancedArtifactMetadataSchema.extend({
7455
- viewBox: z27.string().optional(),
7456
- width: z27.number().positive().optional(),
7457
- height: z27.number().positive().optional(),
7458
- 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)
7459
8206
  })
7460
8207
  });
7461
8208
  var MermaidArtifactV2Schema = BaseArtifactSchema.extend({
7462
- type: z27.literal("mermaid"),
7463
- content: z27.string(),
8209
+ type: z28.literal("mermaid"),
8210
+ content: z28.string(),
7464
8211
  metadata: EnhancedArtifactMetadataSchema.extend({
7465
- chartType: z27.enum([
8212
+ chartType: z28.enum([
7466
8213
  "flowchart",
7467
8214
  "sequenceDiagram",
7468
8215
  "classDiagram",
@@ -7472,7 +8219,7 @@ var MermaidArtifactV2Schema = BaseArtifactSchema.extend({
7472
8219
  "pie",
7473
8220
  "mindmap"
7474
8221
  ]).optional(),
7475
- description: z27.string().optional()
8222
+ description: z28.string().optional()
7476
8223
  })
7477
8224
  });
7478
8225
  var ArtifactStatuses;
@@ -7500,39 +8247,39 @@ var validateMermaidArtifactV2 = (data) => {
7500
8247
  };
7501
8248
 
7502
8249
  // ../../b4m-core/packages/common/dist/src/schemas/questmaster.js
7503
- import { z as z28 } from "zod";
7504
- var QuestStatusSchema = z28.enum(["pending", "in-progress", "completed", "skipped"]);
7505
- var QuestSchema = z28.object({
7506
- id: z28.string().uuid(),
7507
- title: z28.string().min(1).max(255),
7508
- 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),
7509
8256
  status: QuestStatusSchema.default("pending"),
7510
- order: z28.number().int().nonnegative(),
7511
- dependencies: z28.array(z28.string().uuid()).optional(),
7512
- estimatedMinutes: z28.number().int().positive().optional(),
7513
- completedAt: z28.date().optional(),
7514
- completedBy: z28.string().optional(),
7515
- 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()
7516
8263
  });
7517
- var QuestResourceSchema = z28.object({
7518
- type: z28.enum(["documentation", "tutorial", "example", "tool"]),
7519
- title: z28.string().min(1).max(255),
7520
- url: z28.string().url(),
7521
- description: z28.string().max(500).optional()
7522
- });
7523
- var QuestMasterContentSchema = z28.object({
7524
- goal: z28.string().min(1).max(500),
7525
- quests: z28.array(QuestSchema).min(1),
7526
- totalSteps: z28.number().int().positive(),
7527
- estimatedDuration: z28.number().int().positive().optional(),
7528
- complexity: z28.enum(["low", "medium", "high"]),
7529
- category: z28.string().max(100).optional(),
7530
- prerequisites: z28.array(z28.string().max(255)).optional(),
7531
- completionCriteria: z28.array(z28.string().max(500)).optional(),
7532
- 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()
7533
8280
  });
7534
8281
  var QuestMasterArtifactV2Schema = BaseArtifactSchema.extend({
7535
- type: z28.literal("questmaster"),
8282
+ type: z29.literal("questmaster"),
7536
8283
  content: QuestMasterContentSchema
7537
8284
  });
7538
8285
  var validateQuest = (data) => {
@@ -7549,13 +8296,13 @@ var safeParseQuestMasterArtifactV2 = (data) => {
7549
8296
  };
7550
8297
 
7551
8298
  // ../../b4m-core/packages/common/dist/src/schemas/curation.js
7552
- import { z as z29 } from "zod";
8299
+ import { z as z30 } from "zod";
7553
8300
  var CurationType;
7554
8301
  (function(CurationType2) {
7555
8302
  CurationType2["TRANSCRIPT"] = "transcript";
7556
8303
  CurationType2["EXECUTIVE_SUMMARY"] = "executive_summary";
7557
8304
  })(CurationType || (CurationType = {}));
7558
- var CurationTypeSchema = z29.nativeEnum(CurationType);
8305
+ var CurationTypeSchema = z30.nativeEnum(CurationType);
7559
8306
  var CurationArtifactType;
7560
8307
  (function(CurationArtifactType2) {
7561
8308
  CurationArtifactType2["CODE"] = "code";
@@ -7568,7 +8315,7 @@ var CurationArtifactType;
7568
8315
  CurationArtifactType2["DEEP_RESEARCH"] = "deep_research";
7569
8316
  CurationArtifactType2["IMAGE"] = "image";
7570
8317
  })(CurationArtifactType || (CurationArtifactType = {}));
7571
- var CurationArtifactTypeSchema = z29.enum([
8318
+ var CurationArtifactTypeSchema = z30.enum([
7572
8319
  "CODE",
7573
8320
  "REACT",
7574
8321
  "HTML",
@@ -7579,28 +8326,28 @@ var CurationArtifactTypeSchema = z29.enum([
7579
8326
  "DEEP_RESEARCH",
7580
8327
  "IMAGE"
7581
8328
  ]);
7582
- var ExportFormatSchema = z29.enum(["markdown", "txt", "html"]);
7583
- var CurationOptionsSchema = z29.object({
8329
+ var ExportFormatSchema = z30.enum(["markdown", "txt", "html"]);
8330
+ var CurationOptionsSchema = z30.object({
7584
8331
  /** Curation type: transcript (Option 1) or executive_summary (Option 2) */
7585
8332
  curationType: CurationTypeSchema.default(CurationType.TRANSCRIPT),
7586
8333
  /** Include code artifacts in the curated notebook */
7587
- includeCode: z29.boolean().default(true),
8334
+ includeCode: z30.boolean().default(true),
7588
8335
  /** Include diagrams (Mermaid, SVG) in the curated notebook */
7589
- includeDiagrams: z29.boolean().default(true),
8336
+ includeDiagrams: z30.boolean().default(true),
7590
8337
  /** Include data visualizations (Recharts) in the curated notebook */
7591
- includeDataViz: z29.boolean().default(true),
8338
+ includeDataViz: z30.boolean().default(true),
7592
8339
  /** Include QuestMaster plans in the curated notebook */
7593
- includeQuestMaster: z29.boolean().default(true),
8340
+ includeQuestMaster: z30.boolean().default(true),
7594
8341
  /** Include Deep Research findings in the curated notebook */
7595
- includeResearch: z29.boolean().default(true),
8342
+ includeResearch: z30.boolean().default(true),
7596
8343
  /** Include images in the curated notebook */
7597
- includeImages: z29.boolean().default(true),
8344
+ includeImages: z30.boolean().default(true),
7598
8345
  /** Token budget for processing (varies by curation type) */
7599
- tokenBudget: z29.number().optional(),
8346
+ tokenBudget: z30.number().optional(),
7600
8347
  /** Export format for the curated notebook */
7601
8348
  exportFormat: ExportFormatSchema.default("markdown"),
7602
8349
  /** Custom notebook name (optional, defaults to curated-notebook-{sessionId}) */
7603
- customNotebookName: z29.string().optional()
8350
+ customNotebookName: z30.string().optional()
7604
8351
  });
7605
8352
 
7606
8353
  // ../../b4m-core/packages/common/dist/src/utils/artifactHelpers.js
@@ -7865,6 +8612,7 @@ export {
7865
8612
  SvgArtifactSchema,
7866
8613
  MermaidArtifactSchema,
7867
8614
  RechartsArtifactSchema,
8615
+ LatticeArtifactSchema,
7868
8616
  MermaidChartMetadataSchema,
7869
8617
  ChatHistoryItemWithArtifactsSchema,
7870
8618
  ArtifactOperationSchema,
@@ -7923,6 +8671,13 @@ export {
7923
8671
  RapidReplyResponseStylesCommon,
7924
8672
  RapidReplyTransitionModes,
7925
8673
  RapidReplyFallbackBehaviors,
8674
+ EmailJobStatus,
8675
+ EmailSendStatus,
8676
+ EmailJobOverallStatus,
8677
+ EmailCategory,
8678
+ calculateTaskValue,
8679
+ calculateResourceAllocations,
8680
+ detectResourceConflicts,
7926
8681
  SST_PLACEHOLDER_VALUE,
7927
8682
  NOT_CONFIGURED_PLACEHOLDER,
7928
8683
  isPlaceholderValue,
@@ -7946,6 +8701,9 @@ export {
7946
8701
  SpiderProgressUpdateAction,
7947
8702
  SpiderCompleteAction,
7948
8703
  SpiderErrorAction,
8704
+ PiHistoryProgressAction,
8705
+ PiHistoryCompleteAction,
8706
+ PiHistoryErrorAction,
7949
8707
  StreamedChatCompletionAction,
7950
8708
  StreamedRapidReplyAction,
7951
8709
  HeartbeatPongAction,
@@ -7954,6 +8712,7 @@ export {
7954
8712
  UpdateResearchTaskStatusAction,
7955
8713
  ImportHistoryJobProgressUpdateAction,
7956
8714
  ResearchModeStreamAction,
8715
+ VoiceCreditsExhaustedAction,
7957
8716
  SessionCreatedAction,
7958
8717
  MessageDataToServer,
7959
8718
  MessageDataToClient,
@@ -8044,6 +8803,67 @@ export {
8044
8803
  SlackEvents,
8045
8804
  InternalTeamMemberSchema,
8046
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,
8047
8867
  PREDEFINED_USER_TAGS,
8048
8868
  isPredefinedTag,
8049
8869
  getPredefinedTags,
@@ -8070,6 +8890,9 @@ export {
8070
8890
  extractSnippetMeta,
8071
8891
  searchSchema,
8072
8892
  LinkedInApi,
8893
+ parseRateLimitHeaders,
8894
+ isNearLimit,
8895
+ buildRateLimitLogEntry,
8073
8896
  RESTRICTION_OPERATIONS,
8074
8897
  RESTRICTION_SUBJECT_TYPES,
8075
8898
  CONFLUENCE_MAX_ATTACHMENT_SIZE,