lean-claudient-core 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.reports/detailed-analysis_2026-06-20_01ed326b.html +200 -0
- package/.reports/detailed-analysis_2026-06-20_08d39381.html +200 -0
- package/.reports/detailed-analysis_2026-06-20_0a331144.html +200 -0
- package/.reports/detailed-analysis_2026-06-20_0d54ffef.html +200 -0
- package/.reports/detailed-analysis_2026-06-20_14bfa31c.html +200 -0
- package/.reports/detailed-analysis_2026-06-20_211feac4.html +200 -0
- package/.reports/detailed-analysis_2026-06-20_22381bc2.html +200 -0
- package/.reports/detailed-analysis_2026-06-20_29b4ea0a.html +200 -0
- package/.reports/detailed-analysis_2026-06-20_2df0ad14.html +200 -0
- package/.reports/detailed-analysis_2026-06-20_343ec84c.html +200 -0
- package/.reports/detailed-analysis_2026-06-20_3a01030d.html +200 -0
- package/.reports/detailed-analysis_2026-06-20_3b4c99ec.html +200 -0
- package/.reports/detailed-analysis_2026-06-20_3d368827.html +200 -0
- package/.reports/detailed-analysis_2026-06-20_53544d3d.html +200 -0
- package/.reports/detailed-analysis_2026-06-20_5721164a.html +200 -0
- package/.reports/detailed-analysis_2026-06-20_57caf5e7.html +200 -0
- package/.reports/detailed-analysis_2026-06-20_624302f5.html +200 -0
- package/.reports/detailed-analysis_2026-06-20_62456384.html +200 -0
- package/.reports/detailed-analysis_2026-06-20_636a52f1.html +200 -0
- package/.reports/detailed-analysis_2026-06-20_63d1ad41.html +200 -0
- package/.reports/detailed-analysis_2026-06-20_7451ccd7.html +200 -0
- package/.reports/detailed-analysis_2026-06-20_74da4e9a.html +200 -0
- package/.reports/detailed-analysis_2026-06-20_83a90083.html +200 -0
- package/.reports/detailed-analysis_2026-06-20_867fbdd9.html +200 -0
- package/.reports/detailed-analysis_2026-06-20_974c3299.html +200 -0
- package/.reports/detailed-analysis_2026-06-20_a04639a2.html +200 -0
- package/.reports/detailed-analysis_2026-06-20_a8e23d6d.html +200 -0
- package/.reports/detailed-analysis_2026-06-20_aa9150f0.html +200 -0
- package/.reports/detailed-analysis_2026-06-20_acbeee08.html +200 -0
- package/.reports/detailed-analysis_2026-06-20_c4ffa0e2.html +200 -0
- package/.reports/detailed-analysis_2026-06-20_c5f7684b.html +200 -0
- package/.reports/detailed-analysis_2026-06-20_c963b1fa.html +200 -0
- package/.reports/detailed-analysis_2026-06-20_d4bde41f.html +200 -0
- package/.reports/detailed-analysis_2026-06-20_d6eb2497.html +200 -0
- package/.reports/detailed-analysis_2026-06-20_ea6f7f58.html +200 -0
- package/.reports/detailed-analysis_2026-06-20_ebf4e060.html +200 -0
- package/.reports/detailed-analysis_2026-06-20_ec4313a9.html +200 -0
- package/.reports/detailed-analysis_2026-06-20_fc65d18e.html +200 -0
- package/.reports/executive-summary_2026-06-20_00406d50.html +109 -0
- package/.reports/executive-summary_2026-06-20_0bb202d3.html +109 -0
- package/.reports/executive-summary_2026-06-20_0bcd7481.html +109 -0
- package/.reports/executive-summary_2026-06-20_11506445.html +109 -0
- package/.reports/executive-summary_2026-06-20_13616cda.html +109 -0
- package/.reports/executive-summary_2026-06-20_19d41c2f.html +109 -0
- package/.reports/executive-summary_2026-06-20_1b0d6e96.html +109 -0
- package/.reports/executive-summary_2026-06-20_1e38670b.html +109 -0
- package/.reports/executive-summary_2026-06-20_1f32f793.html +109 -0
- package/.reports/executive-summary_2026-06-20_1f40f7d3.html +109 -0
- package/.reports/executive-summary_2026-06-20_25a40a7e.html +109 -0
- package/.reports/executive-summary_2026-06-20_26d11818.html +109 -0
- package/.reports/executive-summary_2026-06-20_26ed4593.html +109 -0
- package/.reports/executive-summary_2026-06-20_291b90a8.html +109 -0
- package/.reports/executive-summary_2026-06-20_2957a848.html +109 -0
- package/.reports/executive-summary_2026-06-20_2a04eb77.html +109 -0
- package/.reports/executive-summary_2026-06-20_2fa701f9.html +109 -0
- package/.reports/executive-summary_2026-06-20_327af8f5.html +109 -0
- package/.reports/executive-summary_2026-06-20_3418c729.html +109 -0
- package/.reports/executive-summary_2026-06-20_3571763d.html +109 -0
- package/.reports/executive-summary_2026-06-20_36225353.html +109 -0
- package/.reports/executive-summary_2026-06-20_3b2de891.html +109 -0
- package/.reports/executive-summary_2026-06-20_45b980c2.html +109 -0
- package/.reports/executive-summary_2026-06-20_46fcbf17.html +109 -0
- package/.reports/executive-summary_2026-06-20_48c8fa5e.html +109 -0
- package/.reports/executive-summary_2026-06-20_4ba55c43.html +109 -0
- package/.reports/executive-summary_2026-06-20_4f4498e6.html +109 -0
- package/.reports/executive-summary_2026-06-20_54c33bf0.html +109 -0
- package/.reports/executive-summary_2026-06-20_54cc7077.html +109 -0
- package/.reports/executive-summary_2026-06-20_5a12912e.html +109 -0
- package/.reports/executive-summary_2026-06-20_636fac87.html +109 -0
- package/.reports/executive-summary_2026-06-20_6587faaf.html +109 -0
- package/.reports/executive-summary_2026-06-20_6adbdd03.html +109 -0
- package/.reports/executive-summary_2026-06-20_6bf344ec.html +109 -0
- package/.reports/executive-summary_2026-06-20_7142aeed.html +109 -0
- package/.reports/executive-summary_2026-06-20_72bc0ceb.html +109 -0
- package/.reports/executive-summary_2026-06-20_775752ac.html +109 -0
- package/.reports/executive-summary_2026-06-20_7a9c3223.html +109 -0
- package/.reports/executive-summary_2026-06-20_808e6376.html +109 -0
- package/.reports/executive-summary_2026-06-20_8de9142d.html +109 -0
- package/.reports/executive-summary_2026-06-20_91981fbe.html +109 -0
- package/.reports/executive-summary_2026-06-20_93191c8c.html +109 -0
- package/.reports/executive-summary_2026-06-20_9be48a87.html +109 -0
- package/.reports/executive-summary_2026-06-20_9c127198.html +109 -0
- package/.reports/executive-summary_2026-06-20_9ee303ac.html +109 -0
- package/.reports/executive-summary_2026-06-20_9ee52709.html +109 -0
- package/.reports/executive-summary_2026-06-20_a0fa27de.html +109 -0
- package/.reports/executive-summary_2026-06-20_a1813e47.html +109 -0
- package/.reports/executive-summary_2026-06-20_a974edc1.html +109 -0
- package/.reports/executive-summary_2026-06-20_aa711737.html +109 -0
- package/.reports/executive-summary_2026-06-20_aa752246.html +109 -0
- package/.reports/executive-summary_2026-06-20_ac6f0927.html +109 -0
- package/.reports/executive-summary_2026-06-20_b231b143.html +109 -0
- package/.reports/executive-summary_2026-06-20_b570a2bd.html +109 -0
- package/.reports/executive-summary_2026-06-20_b6fbf650.html +109 -0
- package/.reports/executive-summary_2026-06-20_b9f8ddf3.html +109 -0
- package/.reports/executive-summary_2026-06-20_bf95cc63.html +109 -0
- package/.reports/executive-summary_2026-06-20_c0d0aefe.html +109 -0
- package/.reports/executive-summary_2026-06-20_c1933c36.html +109 -0
- package/.reports/executive-summary_2026-06-20_c99bba8a.html +109 -0
- package/.reports/executive-summary_2026-06-20_cc3846ac.html +109 -0
- package/.reports/executive-summary_2026-06-20_d485993c.html +109 -0
- package/.reports/executive-summary_2026-06-20_d56f75f7.html +109 -0
- package/.reports/executive-summary_2026-06-20_d57660cc.html +109 -0
- package/.reports/executive-summary_2026-06-20_dc036f62.html +109 -0
- package/.reports/executive-summary_2026-06-20_df783f47.html +109 -0
- package/.reports/executive-summary_2026-06-20_e2191adb.html +109 -0
- package/.reports/executive-summary_2026-06-20_e9f1d504.html +109 -0
- package/.reports/executive-summary_2026-06-20_ea82f5e1.html +109 -0
- package/.reports/executive-summary_2026-06-20_ec3e70cb.html +109 -0
- package/.reports/executive-summary_2026-06-20_ee6cf902.html +109 -0
- package/.reports/executive-summary_2026-06-20_f6cb657c.html +109 -0
- package/.reports/executive-summary_2026-06-20_f8c60046.html +109 -0
- package/.reports/executive-summary_2026-06-20_fa184840.html +109 -0
- package/.reports/executive-summary_2026-06-20_fc88bcb4.html +109 -0
- package/.reports/executive-summary_2026-06-20_ffa79c4e.html +109 -0
- package/README.md +53 -0
- package/dist/automation/actionApprover.d.ts +89 -0
- package/dist/automation/actionApprover.d.ts.map +1 -0
- package/dist/automation/actionApprover.js +264 -0
- package/dist/automation/actionApprover.js.map +1 -0
- package/dist/automation/actionExecutor.d.ts +125 -0
- package/dist/automation/actionExecutor.d.ts.map +1 -0
- package/dist/automation/actionExecutor.js +304 -0
- package/dist/automation/actionExecutor.js.map +1 -0
- package/dist/automation/alertRules.d.ts +55 -0
- package/dist/automation/alertRules.d.ts.map +1 -0
- package/dist/automation/alertRules.js +70 -0
- package/dist/automation/alertRules.js.map +1 -0
- package/dist/automation/alertSystem.d.ts +109 -0
- package/dist/automation/alertSystem.d.ts.map +1 -0
- package/dist/automation/alertSystem.js +303 -0
- package/dist/automation/alertSystem.js.map +1 -0
- package/dist/automation/competitorResponse.d.ts +119 -0
- package/dist/automation/competitorResponse.d.ts.map +1 -0
- package/dist/automation/competitorResponse.js +343 -0
- package/dist/automation/competitorResponse.js.map +1 -0
- package/dist/automation/composioClient.d.ts +107 -0
- package/dist/automation/composioClient.d.ts.map +1 -0
- package/dist/automation/composioClient.js +286 -0
- package/dist/automation/composioClient.js.map +1 -0
- package/dist/automation/crmExport.d.ts +116 -0
- package/dist/automation/crmExport.d.ts.map +1 -0
- package/dist/automation/crmExport.js +282 -0
- package/dist/automation/crmExport.js.map +1 -0
- package/dist/automation/crmIntegration.d.ts +83 -0
- package/dist/automation/crmIntegration.d.ts.map +1 -0
- package/dist/automation/crmIntegration.js +207 -0
- package/dist/automation/crmIntegration.js.map +1 -0
- package/dist/automation/gmailIntegration.d.ts +73 -0
- package/dist/automation/gmailIntegration.d.ts.map +1 -0
- package/dist/automation/gmailIntegration.js +184 -0
- package/dist/automation/gmailIntegration.js.map +1 -0
- package/dist/automation/index.d.ts +17 -0
- package/dist/automation/index.d.ts.map +1 -0
- package/dist/automation/index.js +17 -0
- package/dist/automation/index.js.map +1 -0
- package/dist/automation/jiraIntegration.d.ts +103 -0
- package/dist/automation/jiraIntegration.d.ts.map +1 -0
- package/dist/automation/jiraIntegration.js +222 -0
- package/dist/automation/jiraIntegration.js.map +1 -0
- package/dist/automation/jobQueue.d.ts +98 -0
- package/dist/automation/jobQueue.d.ts.map +1 -0
- package/dist/automation/jobQueue.js +207 -0
- package/dist/automation/jobQueue.js.map +1 -0
- package/dist/automation/leadQualification.d.ts +60 -0
- package/dist/automation/leadQualification.d.ts.map +1 -0
- package/dist/automation/leadQualification.js +204 -0
- package/dist/automation/leadQualification.js.map +1 -0
- package/dist/automation/qualificationRules.d.ts +100 -0
- package/dist/automation/qualificationRules.d.ts.map +1 -0
- package/dist/automation/qualificationRules.js +202 -0
- package/dist/automation/qualificationRules.js.map +1 -0
- package/dist/automation/responseTemplates.d.ts +64 -0
- package/dist/automation/responseTemplates.d.ts.map +1 -0
- package/dist/automation/responseTemplates.js +374 -0
- package/dist/automation/responseTemplates.js.map +1 -0
- package/dist/automation/scheduler.d.ts +85 -0
- package/dist/automation/scheduler.d.ts.map +1 -0
- package/dist/automation/scheduler.js +194 -0
- package/dist/automation/scheduler.js.map +1 -0
- package/dist/automation/types.d.ts +223 -0
- package/dist/automation/types.d.ts.map +1 -0
- package/dist/automation/types.js +32 -0
- package/dist/automation/types.js.map +1 -0
- package/dist/cli/index.d.ts +3 -0
- package/dist/cli/index.d.ts.map +1 -0
- package/dist/cli/index.js +575 -0
- package/dist/cli/index.js.map +1 -0
- package/dist/compression/caveman.d.ts +14 -0
- package/dist/compression/caveman.d.ts.map +1 -0
- package/dist/compression/caveman.js +188 -0
- package/dist/compression/caveman.js.map +1 -0
- package/dist/compression/caveman.test.d.ts +2 -0
- package/dist/compression/caveman.test.d.ts.map +1 -0
- package/dist/compression/caveman.test.js.map +1 -0
- package/dist/config/configManager.d.ts +6 -0
- package/dist/config/configManager.d.ts.map +1 -0
- package/dist/config/configManager.js +62 -0
- package/dist/config/configManager.js.map +1 -0
- package/dist/config/schema.d.ts +95 -0
- package/dist/config/schema.d.ts.map +1 -0
- package/dist/config/schema.js +19 -0
- package/dist/config/schema.js.map +1 -0
- package/dist/context/autoCompact.d.ts +19 -0
- package/dist/context/autoCompact.d.ts.map +1 -0
- package/dist/context/autoCompact.js +101 -0
- package/dist/context/autoCompact.js.map +1 -0
- package/dist/context/readDedup.d.ts +21 -0
- package/dist/context/readDedup.d.ts.map +1 -0
- package/dist/context/readDedup.js +55 -0
- package/dist/context/readDedup.js.map +1 -0
- package/dist/context/toolBudgets.d.ts +15 -0
- package/dist/context/toolBudgets.d.ts.map +1 -0
- package/dist/context/toolBudgets.js +35 -0
- package/dist/context/toolBudgets.js.map +1 -0
- package/dist/core/auditLogger.d.ts +30 -0
- package/dist/core/auditLogger.d.ts.map +1 -0
- package/dist/core/auditLogger.js +51 -0
- package/dist/core/auditLogger.js.map +1 -0
- package/dist/core/stateManager.d.ts +10 -0
- package/dist/core/stateManager.d.ts.map +1 -0
- package/dist/core/stateManager.js +59 -0
- package/dist/core/stateManager.js.map +1 -0
- package/dist/database/feedbackSchema.d.ts +80 -0
- package/dist/database/feedbackSchema.d.ts.map +1 -0
- package/dist/database/feedbackSchema.js +94 -0
- package/dist/database/feedbackSchema.js.map +1 -0
- package/dist/database/leadsSchema.d.ts +99 -0
- package/dist/database/leadsSchema.d.ts.map +1 -0
- package/dist/database/leadsSchema.js +136 -0
- package/dist/database/leadsSchema.js.map +1 -0
- package/dist/intelligence/competitorScoring.d.ts +25 -0
- package/dist/intelligence/competitorScoring.d.ts.map +1 -0
- package/dist/intelligence/competitorScoring.js +181 -0
- package/dist/intelligence/competitorScoring.js.map +1 -0
- package/dist/intelligence/competitorTracker.d.ts +36 -0
- package/dist/intelligence/competitorTracker.d.ts.map +1 -0
- package/dist/intelligence/competitorTracker.js +286 -0
- package/dist/intelligence/competitorTracker.js.map +1 -0
- package/dist/intelligence/competitorTypes.d.ts +93 -0
- package/dist/intelligence/competitorTypes.d.ts.map +1 -0
- package/dist/intelligence/competitorTypes.js +6 -0
- package/dist/intelligence/competitorTypes.js.map +1 -0
- package/dist/intelligence/competitors.json +76 -0
- package/dist/intelligence/feedbackLoop.d.ts +118 -0
- package/dist/intelligence/feedbackLoop.d.ts.map +1 -0
- package/dist/intelligence/feedbackLoop.js +368 -0
- package/dist/intelligence/feedbackLoop.js.map +1 -0
- package/dist/intelligence/gitHubTracker.d.ts +14 -0
- package/dist/intelligence/gitHubTracker.d.ts.map +1 -0
- package/dist/intelligence/gitHubTracker.js +153 -0
- package/dist/intelligence/gitHubTracker.js.map +1 -0
- package/dist/intelligence/hackerNewsScanner.d.ts +21 -0
- package/dist/intelligence/hackerNewsScanner.d.ts.map +1 -0
- package/dist/intelligence/hackerNewsScanner.js +88 -0
- package/dist/intelligence/hackerNewsScanner.js.map +1 -0
- package/dist/intelligence/hiringSignals.d.ts +16 -0
- package/dist/intelligence/hiringSignals.d.ts.map +1 -0
- package/dist/intelligence/hiringSignals.js +132 -0
- package/dist/intelligence/hiringSignals.js.map +1 -0
- package/dist/intelligence/index.d.ts +9 -0
- package/dist/intelligence/index.d.ts.map +1 -0
- package/dist/intelligence/index.js +9 -0
- package/dist/intelligence/index.js.map +1 -0
- package/dist/intelligence/leadEnrichment.d.ts +59 -0
- package/dist/intelligence/leadEnrichment.d.ts.map +1 -0
- package/dist/intelligence/leadEnrichment.js +209 -0
- package/dist/intelligence/leadEnrichment.js.map +1 -0
- package/dist/intelligence/leadEnrichmentTypes.d.ts +49 -0
- package/dist/intelligence/leadEnrichmentTypes.d.ts.map +1 -0
- package/dist/intelligence/leadEnrichmentTypes.js +7 -0
- package/dist/intelligence/leadEnrichmentTypes.js.map +1 -0
- package/dist/intelligence/marketScanner.d.ts +18 -0
- package/dist/intelligence/marketScanner.d.ts.map +1 -0
- package/dist/intelligence/marketScanner.js +225 -0
- package/dist/intelligence/marketScanner.js.map +1 -0
- package/dist/intelligence/polymarketScanner.d.ts +20 -0
- package/dist/intelligence/polymarketScanner.d.ts.map +1 -0
- package/dist/intelligence/polymarketScanner.js +88 -0
- package/dist/intelligence/polymarketScanner.js.map +1 -0
- package/dist/intelligence/redditScanner.d.ts +22 -0
- package/dist/intelligence/redditScanner.d.ts.map +1 -0
- package/dist/intelligence/redditScanner.js +89 -0
- package/dist/intelligence/redditScanner.js.map +1 -0
- package/dist/intelligence/signalAggregator.d.ts +10 -0
- package/dist/intelligence/signalAggregator.d.ts.map +1 -0
- package/dist/intelligence/signalAggregator.js +64 -0
- package/dist/intelligence/signalAggregator.js.map +1 -0
- package/dist/intelligence/trendAnalysis.d.ts +13 -0
- package/dist/intelligence/trendAnalysis.d.ts.map +1 -0
- package/dist/intelligence/trendAnalysis.js +106 -0
- package/dist/intelligence/trendAnalysis.js.map +1 -0
- package/dist/intelligence/twitterScanner.d.ts +22 -0
- package/dist/intelligence/twitterScanner.d.ts.map +1 -0
- package/dist/intelligence/twitterScanner.js +63 -0
- package/dist/intelligence/twitterScanner.js.map +1 -0
- package/dist/intelligence/types.d.ts +566 -0
- package/dist/intelligence/types.d.ts.map +1 -0
- package/dist/intelligence/types.js +87 -0
- package/dist/intelligence/types.js.map +1 -0
- package/dist/intelligence/userComplaints.d.ts +15 -0
- package/dist/intelligence/userComplaints.d.ts.map +1 -0
- package/dist/intelligence/userComplaints.js +193 -0
- package/dist/intelligence/userComplaints.js.map +1 -0
- package/dist/metrics/businessMetrics.d.ts +41 -0
- package/dist/metrics/businessMetrics.d.ts.map +1 -0
- package/dist/metrics/businessMetrics.js +120 -0
- package/dist/metrics/businessMetrics.js.map +1 -0
- package/dist/metrics/businessMetrics.test.d.ts +2 -0
- package/dist/metrics/businessMetrics.test.d.ts.map +1 -0
- package/dist/metrics/businessMetrics.test.js.map +1 -0
- package/dist/metrics/businessMetricsAgg.d.ts +85 -0
- package/dist/metrics/businessMetricsAgg.d.ts.map +1 -0
- package/dist/metrics/businessMetricsAgg.js +406 -0
- package/dist/metrics/businessMetricsAgg.js.map +1 -0
- package/dist/metrics/competitorMetrics.d.ts +57 -0
- package/dist/metrics/competitorMetrics.d.ts.map +1 -0
- package/dist/metrics/competitorMetrics.js +94 -0
- package/dist/metrics/competitorMetrics.js.map +1 -0
- package/dist/metrics/dashboardGenerator.d.ts +16 -0
- package/dist/metrics/dashboardGenerator.d.ts.map +1 -0
- package/dist/metrics/dashboardGenerator.js +313 -0
- package/dist/metrics/dashboardGenerator.js.map +1 -0
- package/dist/metrics/dashboardHTML.d.ts +18 -0
- package/dist/metrics/dashboardHTML.d.ts.map +1 -0
- package/dist/metrics/dashboardHTML.js +613 -0
- package/dist/metrics/dashboardHTML.js.map +1 -0
- package/dist/metrics/grafanaExport.d.ts +53 -0
- package/dist/metrics/grafanaExport.d.ts.map +1 -0
- package/dist/metrics/grafanaExport.js +277 -0
- package/dist/metrics/grafanaExport.js.map +1 -0
- package/dist/metrics/index.d.ts +17 -0
- package/dist/metrics/index.d.ts.map +1 -0
- package/dist/metrics/index.js +17 -0
- package/dist/metrics/index.js.map +1 -0
- package/dist/metrics/leadsMetrics.d.ts +48 -0
- package/dist/metrics/leadsMetrics.d.ts.map +1 -0
- package/dist/metrics/leadsMetrics.js +82 -0
- package/dist/metrics/leadsMetrics.js.map +1 -0
- package/dist/metrics/leadsMetrics.test.d.ts +2 -0
- package/dist/metrics/leadsMetrics.test.d.ts.map +1 -0
- package/dist/metrics/leadsMetrics.test.js.map +1 -0
- package/dist/metrics/metricsTypes.d.ts +114 -0
- package/dist/metrics/metricsTypes.d.ts.map +1 -0
- package/dist/metrics/metricsTypes.js +7 -0
- package/dist/metrics/metricsTypes.js.map +1 -0
- package/dist/metrics/revenueProjection.d.ts +44 -0
- package/dist/metrics/revenueProjection.d.ts.map +1 -0
- package/dist/metrics/revenueProjection.js +239 -0
- package/dist/metrics/revenueProjection.js.map +1 -0
- package/dist/metrics/revenueTypes.d.ts +62 -0
- package/dist/metrics/revenueTypes.d.ts.map +1 -0
- package/dist/metrics/revenueTypes.js +7 -0
- package/dist/metrics/revenueTypes.js.map +1 -0
- package/dist/metrics/roiCalculator.d.ts +39 -0
- package/dist/metrics/roiCalculator.d.ts.map +1 -0
- package/dist/metrics/roiCalculator.js +128 -0
- package/dist/metrics/roiCalculator.js.map +1 -0
- package/dist/metrics/roiCalculator.test.d.ts +2 -0
- package/dist/metrics/roiCalculator.test.d.ts.map +1 -0
- package/dist/metrics/roiCalculator.test.js.map +1 -0
- package/dist/metrics/trendMetrics.d.ts +51 -0
- package/dist/metrics/trendMetrics.d.ts.map +1 -0
- package/dist/metrics/trendMetrics.js +116 -0
- package/dist/metrics/trendMetrics.js.map +1 -0
- package/dist/modes/conservativeCTOMode.d.ts +32 -0
- package/dist/modes/conservativeCTOMode.d.ts.map +1 -0
- package/dist/modes/conservativeCTOMode.js +98 -0
- package/dist/modes/conservativeCTOMode.js.map +1 -0
- package/dist/modes/index.d.ts +3 -0
- package/dist/modes/index.d.ts.map +1 -0
- package/dist/modes/index.js +3 -0
- package/dist/modes/index.js.map +1 -0
- package/dist/modes/seniorDeveloperMode.d.ts +17 -0
- package/dist/modes/seniorDeveloperMode.d.ts.map +1 -0
- package/dist/modes/seniorDeveloperMode.js +77 -0
- package/dist/modes/seniorDeveloperMode.js.map +1 -0
- package/dist/recovery/contextRecovery.d.ts +28 -0
- package/dist/recovery/contextRecovery.d.ts.map +1 -0
- package/dist/recovery/contextRecovery.js +113 -0
- package/dist/recovery/contextRecovery.js.map +1 -0
- package/dist/repair/errorDiagnostics.d.ts +28 -0
- package/dist/repair/errorDiagnostics.d.ts.map +1 -0
- package/dist/repair/errorDiagnostics.js +158 -0
- package/dist/repair/errorDiagnostics.js.map +1 -0
- package/dist/repair/skillCapture.d.ts +22 -0
- package/dist/repair/skillCapture.d.ts.map +1 -0
- package/dist/repair/skillCapture.js +119 -0
- package/dist/repair/skillCapture.js.map +1 -0
- package/dist/reporting/reportGenerator.d.ts +117 -0
- package/dist/reporting/reportGenerator.d.ts.map +1 -0
- package/dist/reporting/reportGenerator.js +613 -0
- package/dist/reporting/reportGenerator.js.map +1 -0
- package/dist/reporting/templates.d.ts +68 -0
- package/dist/reporting/templates.d.ts.map +1 -0
- package/dist/reporting/templates.js +629 -0
- package/dist/reporting/templates.js.map +1 -0
- package/dist/security/owaspScanner.d.ts +74 -0
- package/dist/security/owaspScanner.d.ts.map +1 -0
- package/dist/security/owaspScanner.js +309 -0
- package/dist/security/owaspScanner.js.map +1 -0
- package/dist/security/piiRedaction.d.ts +67 -0
- package/dist/security/piiRedaction.d.ts.map +1 -0
- package/dist/security/piiRedaction.js +189 -0
- package/dist/security/piiRedaction.js.map +1 -0
- package/dist/security/secretsDetection.d.ts +47 -0
- package/dist/security/secretsDetection.d.ts.map +1 -0
- package/dist/security/secretsDetection.js +272 -0
- package/dist/security/secretsDetection.js.map +1 -0
- package/dist/subagents/builder.d.ts +33 -0
- package/dist/subagents/builder.d.ts.map +1 -0
- package/dist/subagents/builder.js +158 -0
- package/dist/subagents/builder.js.map +1 -0
- package/dist/subagents/investigator.d.ts +31 -0
- package/dist/subagents/investigator.d.ts.map +1 -0
- package/dist/subagents/investigator.js +166 -0
- package/dist/subagents/investigator.js.map +1 -0
- package/dist/subagents/orchestrator.d.ts +48 -0
- package/dist/subagents/orchestrator.d.ts.map +1 -0
- package/dist/subagents/orchestrator.js +151 -0
- package/dist/subagents/orchestrator.js.map +1 -0
- package/dist/subagents/reviewer.d.ts +31 -0
- package/dist/subagents/reviewer.d.ts.map +1 -0
- package/dist/subagents/reviewer.js +154 -0
- package/dist/subagents/reviewer.js.map +1 -0
- package/dist/telemetry/tokenCounter.d.ts +21 -0
- package/dist/telemetry/tokenCounter.d.ts.map +1 -0
- package/dist/telemetry/tokenCounter.js +49 -0
- package/dist/telemetry/tokenCounter.js.map +1 -0
- package/package.json +61 -0
- package/src/automation/actionApprover.ts +342 -0
- package/src/automation/actionExecutor.ts +399 -0
- package/src/automation/alertRules.ts +113 -0
- package/src/automation/alertSystem.ts +402 -0
- package/src/automation/competitorResponse.ts +511 -0
- package/src/automation/composioClient.ts +360 -0
- package/src/automation/crmExport.ts +407 -0
- package/src/automation/crmIntegration.ts +268 -0
- package/src/automation/gmailIntegration.ts +244 -0
- package/src/automation/index.ts +17 -0
- package/src/automation/jiraIntegration.ts +310 -0
- package/src/automation/jobQueue.ts +278 -0
- package/src/automation/leadQualification.ts +270 -0
- package/src/automation/qualificationRules.ts +304 -0
- package/src/automation/responseTemplates.ts +419 -0
- package/src/automation/scheduler.ts +254 -0
- package/src/automation/types.ts +270 -0
- package/src/cli/index.ts +646 -0
- package/src/compression/caveman.ts +257 -0
- package/src/config/configManager.ts +63 -0
- package/src/config/schema.ts +27 -0
- package/src/context/autoCompact.ts +123 -0
- package/src/context/readDedup.ts +84 -0
- package/src/context/toolBudgets.ts +43 -0
- package/src/core/auditLogger.ts +69 -0
- package/src/core/stateManager.ts +73 -0
- package/src/database/feedbackSchema.ts +168 -0
- package/src/database/leadsSchema.ts +205 -0
- package/src/intelligence/competitorScoring.ts +292 -0
- package/src/intelligence/competitorTracker.ts +362 -0
- package/src/intelligence/competitorTypes.ts +100 -0
- package/src/intelligence/competitors.json +76 -0
- package/src/intelligence/feedbackLoop.ts +538 -0
- package/src/intelligence/gitHubTracker.ts +204 -0
- package/src/intelligence/hackerNewsScanner.ts +121 -0
- package/src/intelligence/hiringSignals.ts +162 -0
- package/src/intelligence/index.ts +9 -0
- package/src/intelligence/leadEnrichment.ts +275 -0
- package/src/intelligence/leadEnrichmentTypes.ts +54 -0
- package/src/intelligence/marketScanner.ts +285 -0
- package/src/intelligence/polymarketScanner.ts +120 -0
- package/src/intelligence/redditScanner.ts +122 -0
- package/src/intelligence/signalAggregator.ts +94 -0
- package/src/intelligence/trendAnalysis.ts +140 -0
- package/src/intelligence/twitterScanner.ts +94 -0
- package/src/intelligence/types.ts +130 -0
- package/src/intelligence/userComplaints.ts +236 -0
- package/src/metrics/businessMetrics.ts +186 -0
- package/src/metrics/businessMetricsAgg.ts +554 -0
- package/src/metrics/competitorMetrics.ts +175 -0
- package/src/metrics/dashboardGenerator.ts +335 -0
- package/src/metrics/dashboardHTML.ts +637 -0
- package/src/metrics/grafanaExport.ts +347 -0
- package/src/metrics/index.ts +17 -0
- package/src/metrics/leadsMetrics.ts +145 -0
- package/src/metrics/metricsTypes.ts +129 -0
- package/src/metrics/revenueProjection.ts +319 -0
- package/src/metrics/revenueTypes.ts +67 -0
- package/src/metrics/roiCalculator.ts +199 -0
- package/src/metrics/trendMetrics.ts +190 -0
- package/src/modes/conservativeCTOMode.ts +124 -0
- package/src/modes/index.ts +6 -0
- package/src/modes/seniorDeveloperMode.ts +94 -0
- package/src/recovery/contextRecovery.ts +141 -0
- package/src/repair/errorDiagnostics.ts +198 -0
- package/src/repair/skillCapture.ts +157 -0
- package/src/reporting/reportGenerator.ts +802 -0
- package/src/reporting/templates.ts +677 -0
- package/src/security/owaspScanner.ts +390 -0
- package/src/security/phase8Hardening.ts +536 -0
- package/src/security/piiRedaction.ts +215 -0
- package/src/security/secretsDetection.js +271 -0
- package/src/security/secretsDetection.ts +318 -0
- package/src/subagents/builder.ts +277 -0
- package/src/subagents/investigator.ts +224 -0
- package/src/subagents/orchestrator.ts +212 -0
- package/src/subagents/reviewer.ts +215 -0
- package/src/telemetry/tokenCounter.ts +81 -0
|
@@ -0,0 +1,244 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Gmail Integration via Composio
|
|
3
|
+
* Draft and send emails with professional templates.
|
|
4
|
+
* All sends require human approval before execution.
|
|
5
|
+
*/
|
|
6
|
+
|
|
7
|
+
import ComposioClient from './composioClient.js';
|
|
8
|
+
|
|
9
|
+
interface EmailTemplate {
|
|
10
|
+
name: string;
|
|
11
|
+
subject: string;
|
|
12
|
+
body: string;
|
|
13
|
+
isHtml: boolean;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
interface DraftEmailResponse {
|
|
17
|
+
draftId: string;
|
|
18
|
+
to: string;
|
|
19
|
+
subject: string;
|
|
20
|
+
preview: string;
|
|
21
|
+
threadId?: string;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
interface SendEmailResponse {
|
|
25
|
+
messageId: string;
|
|
26
|
+
status: 'sent';
|
|
27
|
+
timestamp: string;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
/**
|
|
31
|
+
* Gmail integration for drafting and sending professional emails
|
|
32
|
+
*/
|
|
33
|
+
export class GmailIntegration {
|
|
34
|
+
private composio: ComposioClient;
|
|
35
|
+
private senderEmail: string;
|
|
36
|
+
|
|
37
|
+
private templates: Record<string, EmailTemplate> = {
|
|
38
|
+
marketIntel: {
|
|
39
|
+
name: 'Market Intelligence Update',
|
|
40
|
+
subject: 'Market Intelligence: New Competitive Threat Detected',
|
|
41
|
+
body: `Hi Team,
|
|
42
|
+
|
|
43
|
+
We've detected a new market opportunity based on competitor activity analysis. See details below.
|
|
44
|
+
|
|
45
|
+
This email was auto-generated by Lean Claudient's market intelligence engine.
|
|
46
|
+
|
|
47
|
+
Best regards,
|
|
48
|
+
Lean Claudient Bot`,
|
|
49
|
+
isHtml: false
|
|
50
|
+
},
|
|
51
|
+
leadNotification: {
|
|
52
|
+
name: 'New Lead Created',
|
|
53
|
+
subject: 'New Lead: {companyName}',
|
|
54
|
+
body: `Hi Sales Team,
|
|
55
|
+
|
|
56
|
+
A new lead has been auto-created based on market signals:
|
|
57
|
+
|
|
58
|
+
Company: {companyName}
|
|
59
|
+
Contact: {contactName} ({contactEmail})
|
|
60
|
+
Pain Point: {painPoint}
|
|
61
|
+
Signal Strength: {strength}
|
|
62
|
+
|
|
63
|
+
Please review and follow up accordingly.
|
|
64
|
+
|
|
65
|
+
Best regards,
|
|
66
|
+
Lean Claudient Bot`,
|
|
67
|
+
isHtml: false
|
|
68
|
+
},
|
|
69
|
+
featureRequest: {
|
|
70
|
+
name: 'Feature Request Summary',
|
|
71
|
+
subject: 'Feature Request: {featureTitle}',
|
|
72
|
+
body: `Hi Product Team,
|
|
73
|
+
|
|
74
|
+
Based on market analysis, we recommend prioritizing the following feature:
|
|
75
|
+
|
|
76
|
+
Feature: {featureTitle}
|
|
77
|
+
User Pain Point: {painPoint}
|
|
78
|
+
Market Demand: {demand}
|
|
79
|
+
Priority: {priority}
|
|
80
|
+
|
|
81
|
+
Please review and consider for the next sprint.
|
|
82
|
+
|
|
83
|
+
Best regards,
|
|
84
|
+
Lean Claudient Bot`,
|
|
85
|
+
isHtml: false
|
|
86
|
+
}
|
|
87
|
+
};
|
|
88
|
+
|
|
89
|
+
constructor(composio: ComposioClient, senderEmail: string) {
|
|
90
|
+
this.composio = composio;
|
|
91
|
+
this.senderEmail = senderEmail;
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
/**
|
|
95
|
+
* Draft an email (saved locally, not sent)
|
|
96
|
+
* Returns draft ID for human review before sending
|
|
97
|
+
*/
|
|
98
|
+
async draftEmail(
|
|
99
|
+
to: string,
|
|
100
|
+
subject: string,
|
|
101
|
+
body: string,
|
|
102
|
+
isHtml: boolean = false
|
|
103
|
+
): Promise<DraftEmailResponse> {
|
|
104
|
+
try {
|
|
105
|
+
const response = await this.composio.request('/integrations/gmail/draft', 'POST', {
|
|
106
|
+
to,
|
|
107
|
+
subject,
|
|
108
|
+
body,
|
|
109
|
+
isHtml,
|
|
110
|
+
from: this.senderEmail
|
|
111
|
+
});
|
|
112
|
+
|
|
113
|
+
return {
|
|
114
|
+
draftId: response.id,
|
|
115
|
+
to,
|
|
116
|
+
subject,
|
|
117
|
+
preview: body.substring(0, 150).trim() + '...',
|
|
118
|
+
threadId: response.threadId
|
|
119
|
+
};
|
|
120
|
+
} catch (error) {
|
|
121
|
+
throw new Error(`Failed to draft email: ${(error as Error).message}`);
|
|
122
|
+
}
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
/**
|
|
126
|
+
* Draft email from template with variable substitution
|
|
127
|
+
*/
|
|
128
|
+
async draftFromTemplate(
|
|
129
|
+
templateName: string,
|
|
130
|
+
to: string,
|
|
131
|
+
variables: Record<string, string>
|
|
132
|
+
): Promise<DraftEmailResponse> {
|
|
133
|
+
const template = this.templates[templateName];
|
|
134
|
+
if (!template) {
|
|
135
|
+
throw new Error(`Template not found: ${templateName}`);
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
let subject = template.subject;
|
|
139
|
+
let body = template.body;
|
|
140
|
+
|
|
141
|
+
// Substitute variables
|
|
142
|
+
for (const [key, value] of Object.entries(variables)) {
|
|
143
|
+
subject = subject.replace(`{${key}}`, value);
|
|
144
|
+
body = body.replace(`{${key}}`, value);
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
return this.draftEmail(to, subject, body, template.isHtml);
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
/**
|
|
151
|
+
* Send a previously drafted email
|
|
152
|
+
* Requires human approval before execution
|
|
153
|
+
*/
|
|
154
|
+
async sendEmail(draftId: string): Promise<SendEmailResponse> {
|
|
155
|
+
try {
|
|
156
|
+
const response = await this.composio.request(
|
|
157
|
+
`/integrations/gmail/draft/${draftId}/send`,
|
|
158
|
+
'POST',
|
|
159
|
+
{}
|
|
160
|
+
);
|
|
161
|
+
|
|
162
|
+
return {
|
|
163
|
+
messageId: response.id,
|
|
164
|
+
status: 'sent',
|
|
165
|
+
timestamp: new Date().toISOString()
|
|
166
|
+
};
|
|
167
|
+
} catch (error) {
|
|
168
|
+
throw new Error(`Failed to send email: ${(error as Error).message}`);
|
|
169
|
+
}
|
|
170
|
+
}
|
|
171
|
+
|
|
172
|
+
/**
|
|
173
|
+
* Get draft details for review
|
|
174
|
+
*/
|
|
175
|
+
async getDraftDetails(draftId: string): Promise<{
|
|
176
|
+
to: string;
|
|
177
|
+
subject: string;
|
|
178
|
+
body: string;
|
|
179
|
+
isHtml: boolean;
|
|
180
|
+
}> {
|
|
181
|
+
try {
|
|
182
|
+
const response = await this.composio.request(`/integrations/gmail/draft/${draftId}`);
|
|
183
|
+
return {
|
|
184
|
+
to: response.to,
|
|
185
|
+
subject: response.subject,
|
|
186
|
+
body: response.body,
|
|
187
|
+
isHtml: response.isHtml || false
|
|
188
|
+
};
|
|
189
|
+
} catch (error) {
|
|
190
|
+
throw new Error(`Failed to retrieve draft: ${(error as Error).message}`);
|
|
191
|
+
}
|
|
192
|
+
}
|
|
193
|
+
|
|
194
|
+
/**
|
|
195
|
+
* Send custom email with professional formatting
|
|
196
|
+
*/
|
|
197
|
+
async sendCustomEmail(
|
|
198
|
+
to: string,
|
|
199
|
+
subject: string,
|
|
200
|
+
body: string,
|
|
201
|
+
isHtml: boolean = false
|
|
202
|
+
): Promise<SendEmailResponse> {
|
|
203
|
+
try {
|
|
204
|
+
const response = await this.composio.request('/integrations/gmail/send', 'POST', {
|
|
205
|
+
to,
|
|
206
|
+
subject,
|
|
207
|
+
body,
|
|
208
|
+
isHtml,
|
|
209
|
+
from: this.senderEmail
|
|
210
|
+
});
|
|
211
|
+
|
|
212
|
+
return {
|
|
213
|
+
messageId: response.id,
|
|
214
|
+
status: 'sent',
|
|
215
|
+
timestamp: new Date().toISOString()
|
|
216
|
+
};
|
|
217
|
+
} catch (error) {
|
|
218
|
+
throw new Error(`Failed to send email: ${(error as Error).message}`);
|
|
219
|
+
}
|
|
220
|
+
}
|
|
221
|
+
|
|
222
|
+
/**
|
|
223
|
+
* Get available templates
|
|
224
|
+
*/
|
|
225
|
+
getTemplates(): Record<string, { subject: string; preview: string }> {
|
|
226
|
+
const result: Record<string, { subject: string; preview: string }> = {};
|
|
227
|
+
for (const [key, template] of Object.entries(this.templates)) {
|
|
228
|
+
result[key] = {
|
|
229
|
+
subject: template.subject,
|
|
230
|
+
preview: template.body.substring(0, 100) + '...'
|
|
231
|
+
};
|
|
232
|
+
}
|
|
233
|
+
return result;
|
|
234
|
+
}
|
|
235
|
+
|
|
236
|
+
/**
|
|
237
|
+
* Register custom template
|
|
238
|
+
*/
|
|
239
|
+
registerTemplate(name: string, template: EmailTemplate): void {
|
|
240
|
+
this.templates[name] = template;
|
|
241
|
+
}
|
|
242
|
+
}
|
|
243
|
+
|
|
244
|
+
export default GmailIntegration;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Composio Automation Module
|
|
3
|
+
* Unified exports for business automation integrations
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
export { ComposioClient, default as ComposioClientDefault } from './composioClient.js';
|
|
7
|
+
export { GmailIntegration, default as GmailIntegrationDefault } from './gmailIntegration.js';
|
|
8
|
+
export { CRMIntegration, CRMPlatform, default as CRMIntegrationDefault } from './crmIntegration.js';
|
|
9
|
+
export { JiraIntegration, IssueType, JiraPriority, default as JiraIntegrationDefault } from './jiraIntegration.js';
|
|
10
|
+
export { ActionExecutor, MarketFinding, AutomatedAction, ActionType, default as ActionExecutorDefault } from './actionExecutor.js';
|
|
11
|
+
export { ActionApprover, default as ActionApproverDefault } from './actionApprover.js';
|
|
12
|
+
export { LeadQualifier, getLeadQualifier, resetLeadQualifier, default as LeadQualifierDefault } from './leadQualification.js';
|
|
13
|
+
export { AlertSystem, createAlertSystem, type Alert, default as AlertSystemDefault } from './alertSystem.js';
|
|
14
|
+
export { DEFAULT_THRESHOLDS, validateThresholds, type AlertThresholds, type AlertSeverity } from './alertRules.js';
|
|
15
|
+
export { Scheduler, type ScheduledJob, type JobStatus, default as SchedulerDefault } from './scheduler.js';
|
|
16
|
+
export { JobQueue, type QueuedJob, type QueueStats, default as JobQueueDefault } from './jobQueue.js';
|
|
17
|
+
export { CRMExporter, type CRMOpportunity, type ExportHistoryEntry, type CRMConfig, default as CRMExporterDefault } from './crmExport.js';
|
|
@@ -0,0 +1,310 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Jira Integration via Composio
|
|
3
|
+
* Auto-create epics and issues based on market intelligence findings.
|
|
4
|
+
* Link to GitHub discussions and Reddit threads for context.
|
|
5
|
+
*/
|
|
6
|
+
|
|
7
|
+
import ComposioClient from './composioClient.js';
|
|
8
|
+
|
|
9
|
+
export type JiraPriority = 'lowest' | 'low' | 'medium' | 'high' | 'highest';
|
|
10
|
+
export type IssueType = 'epic' | 'story' | 'bug' | 'task';
|
|
11
|
+
|
|
12
|
+
interface JiraEpicConfig {
|
|
13
|
+
title: string;
|
|
14
|
+
description: string;
|
|
15
|
+
priority: JiraPriority;
|
|
16
|
+
labels?: string[];
|
|
17
|
+
externalLinks?: Array<{
|
|
18
|
+
url: string;
|
|
19
|
+
title: string;
|
|
20
|
+
type: 'github' | 'reddit' | 'hackernews';
|
|
21
|
+
}>;
|
|
22
|
+
customFields?: Record<string, any>;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
interface JiraIssueResponse {
|
|
26
|
+
issueId: string;
|
|
27
|
+
key: string;
|
|
28
|
+
title: string;
|
|
29
|
+
url: string;
|
|
30
|
+
status: string;
|
|
31
|
+
timestamp: string;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
interface LinkedResource {
|
|
35
|
+
type: 'github_discussion' | 'reddit_thread' | 'hackernews_comment';
|
|
36
|
+
url: string;
|
|
37
|
+
title: string;
|
|
38
|
+
relevanceScore: number;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
/**
|
|
42
|
+
* Jira integration for automated issue and epic creation
|
|
43
|
+
*/
|
|
44
|
+
export class JiraIntegration {
|
|
45
|
+
private composio: ComposioClient;
|
|
46
|
+
private projectKey: string;
|
|
47
|
+
private jiraBaseUrl: string;
|
|
48
|
+
|
|
49
|
+
private priorityMapping: Record<JiraPriority, number> = {
|
|
50
|
+
lowest: 5,
|
|
51
|
+
low: 4,
|
|
52
|
+
medium: 3,
|
|
53
|
+
high: 2,
|
|
54
|
+
highest: 1
|
|
55
|
+
};
|
|
56
|
+
|
|
57
|
+
constructor(composio: ComposioClient, projectKey: string, jiraBaseUrl: string) {
|
|
58
|
+
this.composio = composio;
|
|
59
|
+
this.projectKey = projectKey;
|
|
60
|
+
this.jiraBaseUrl = jiraBaseUrl;
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
/**
|
|
64
|
+
* Create a new epic based on market intelligence findings
|
|
65
|
+
*/
|
|
66
|
+
async createEpic(config: JiraEpicConfig): Promise<JiraIssueResponse> {
|
|
67
|
+
try {
|
|
68
|
+
const payload = {
|
|
69
|
+
fields: {
|
|
70
|
+
project: { key: this.projectKey },
|
|
71
|
+
issuetype: { name: 'Epic' },
|
|
72
|
+
summary: config.title,
|
|
73
|
+
description: this.formatDescription(config.description, config.externalLinks),
|
|
74
|
+
priority: { name: this.priorityToJiraName(config.priority) },
|
|
75
|
+
labels: config.labels || ['market-intelligence', 'auto-generated'],
|
|
76
|
+
...config.customFields
|
|
77
|
+
}
|
|
78
|
+
};
|
|
79
|
+
|
|
80
|
+
const response = await this.composio.request('/integrations/jira/issues', 'POST', payload);
|
|
81
|
+
|
|
82
|
+
const issueId = response.id || response.key;
|
|
83
|
+
const issueUrl = `${this.jiraBaseUrl}/browse/${response.key}`;
|
|
84
|
+
|
|
85
|
+
// Link external resources if provided
|
|
86
|
+
if (config.externalLinks && config.externalLinks.length > 0) {
|
|
87
|
+
await this.linkResources(response.key, config.externalLinks);
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
return {
|
|
91
|
+
issueId,
|
|
92
|
+
key: response.key,
|
|
93
|
+
title: config.title,
|
|
94
|
+
url: issueUrl,
|
|
95
|
+
status: response.fields.status?.name || 'To Do',
|
|
96
|
+
timestamp: new Date().toISOString()
|
|
97
|
+
};
|
|
98
|
+
} catch (error) {
|
|
99
|
+
throw new Error(`Failed to create Jira epic: ${(error as Error).message}`);
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
/**
|
|
104
|
+
* Create a story linked to an epic
|
|
105
|
+
*/
|
|
106
|
+
async createStory(
|
|
107
|
+
epicKey: string,
|
|
108
|
+
title: string,
|
|
109
|
+
description: string,
|
|
110
|
+
priority: JiraPriority = 'medium'
|
|
111
|
+
): Promise<JiraIssueResponse> {
|
|
112
|
+
try {
|
|
113
|
+
const payload = {
|
|
114
|
+
fields: {
|
|
115
|
+
project: { key: this.projectKey },
|
|
116
|
+
issuetype: { name: 'Story' },
|
|
117
|
+
summary: title,
|
|
118
|
+
description,
|
|
119
|
+
priority: { name: this.priorityToJiraName(priority) },
|
|
120
|
+
parent: { key: epicKey },
|
|
121
|
+
labels: ['market-intelligence', 'auto-generated']
|
|
122
|
+
}
|
|
123
|
+
};
|
|
124
|
+
|
|
125
|
+
const response = await this.composio.request('/integrations/jira/issues', 'POST', payload);
|
|
126
|
+
|
|
127
|
+
return {
|
|
128
|
+
issueId: response.id || response.key,
|
|
129
|
+
key: response.key,
|
|
130
|
+
title,
|
|
131
|
+
url: `${this.jiraBaseUrl}/browse/${response.key}`,
|
|
132
|
+
status: response.fields.status?.name || 'To Do',
|
|
133
|
+
timestamp: new Date().toISOString()
|
|
134
|
+
};
|
|
135
|
+
} catch (error) {
|
|
136
|
+
throw new Error(`Failed to create story: ${(error as Error).message}`);
|
|
137
|
+
}
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
/**
|
|
141
|
+
* Link external resources (GitHub discussions, Reddit threads) to Jira epic
|
|
142
|
+
*/
|
|
143
|
+
private async linkResources(
|
|
144
|
+
epicKey: string,
|
|
145
|
+
links: Array<{ url: string; title: string; type: string }>
|
|
146
|
+
): Promise<void> {
|
|
147
|
+
try {
|
|
148
|
+
for (const link of links) {
|
|
149
|
+
await this.composio.request(
|
|
150
|
+
`/integrations/jira/issues/${epicKey}/links`,
|
|
151
|
+
'POST',
|
|
152
|
+
{
|
|
153
|
+
body: `Related to: [${link.title}|${link.url}]`,
|
|
154
|
+
type: link.type
|
|
155
|
+
}
|
|
156
|
+
);
|
|
157
|
+
}
|
|
158
|
+
} catch (error) {
|
|
159
|
+
console.warn('Failed to link resources:', (error as Error).message);
|
|
160
|
+
}
|
|
161
|
+
}
|
|
162
|
+
|
|
163
|
+
/**
|
|
164
|
+
* Format epic description with linked resources
|
|
165
|
+
*/
|
|
166
|
+
private formatDescription(
|
|
167
|
+
baseDescription: string,
|
|
168
|
+
externalLinks?: Array<{ url: string; title: string; type: string }>
|
|
169
|
+
): string {
|
|
170
|
+
let formatted = baseDescription;
|
|
171
|
+
|
|
172
|
+
if (externalLinks && externalLinks.length > 0) {
|
|
173
|
+
formatted += '\n\n*Related Discussions:*\n';
|
|
174
|
+
for (const link of externalLinks) {
|
|
175
|
+
formatted += `* [${link.title}|${link.url}]\n`;
|
|
176
|
+
}
|
|
177
|
+
}
|
|
178
|
+
|
|
179
|
+
formatted += '\n\n_Auto-generated by Lean Claudient market intelligence engine_';
|
|
180
|
+
|
|
181
|
+
return formatted;
|
|
182
|
+
}
|
|
183
|
+
|
|
184
|
+
/**
|
|
185
|
+
* Convert priority level to Jira priority name
|
|
186
|
+
*/
|
|
187
|
+
private priorityToJiraName(priority: JiraPriority): string {
|
|
188
|
+
const map: Record<JiraPriority, string> = {
|
|
189
|
+
lowest: 'Lowest',
|
|
190
|
+
low: 'Low',
|
|
191
|
+
medium: 'Medium',
|
|
192
|
+
high: 'High',
|
|
193
|
+
highest: 'Highest'
|
|
194
|
+
};
|
|
195
|
+
return map[priority];
|
|
196
|
+
}
|
|
197
|
+
|
|
198
|
+
/**
|
|
199
|
+
* Get issue details
|
|
200
|
+
*/
|
|
201
|
+
async getIssue(issueKey: string): Promise<any> {
|
|
202
|
+
try {
|
|
203
|
+
const response = await this.composio.request(`/integrations/jira/issues/${issueKey}`);
|
|
204
|
+
return response;
|
|
205
|
+
} catch (error) {
|
|
206
|
+
throw new Error(`Failed to retrieve issue: ${(error as Error).message}`);
|
|
207
|
+
}
|
|
208
|
+
}
|
|
209
|
+
|
|
210
|
+
/**
|
|
211
|
+
* Update issue status
|
|
212
|
+
*/
|
|
213
|
+
async updateStatus(issueKey: string, statusName: string): Promise<{ success: boolean }> {
|
|
214
|
+
try {
|
|
215
|
+
await this.composio.request(
|
|
216
|
+
`/integrations/jira/issues/${issueKey}/transitions`,
|
|
217
|
+
'POST',
|
|
218
|
+
{
|
|
219
|
+
transition: { name: statusName }
|
|
220
|
+
}
|
|
221
|
+
);
|
|
222
|
+
return { success: true };
|
|
223
|
+
} catch (error) {
|
|
224
|
+
throw new Error(`Failed to update status: ${(error as Error).message}`);
|
|
225
|
+
}
|
|
226
|
+
}
|
|
227
|
+
|
|
228
|
+
/**
|
|
229
|
+
* Add comment to issue
|
|
230
|
+
*/
|
|
231
|
+
async addComment(issueKey: string, comment: string): Promise<{ success: boolean }> {
|
|
232
|
+
try {
|
|
233
|
+
await this.composio.request(
|
|
234
|
+
`/integrations/jira/issues/${issueKey}/comments`,
|
|
235
|
+
'POST',
|
|
236
|
+
{
|
|
237
|
+
body: comment
|
|
238
|
+
}
|
|
239
|
+
);
|
|
240
|
+
return { success: true };
|
|
241
|
+
} catch (error) {
|
|
242
|
+
throw new Error(`Failed to add comment: ${(error as Error).message}`);
|
|
243
|
+
}
|
|
244
|
+
}
|
|
245
|
+
|
|
246
|
+
/**
|
|
247
|
+
* Create threat response epic from market findings
|
|
248
|
+
* Combines title, description, and links into Jira epic
|
|
249
|
+
*/
|
|
250
|
+
async createThreatResponseEpic(
|
|
251
|
+
threatTitle: string,
|
|
252
|
+
threatDescription: string,
|
|
253
|
+
threatLevel: 'critical' | 'high' | 'medium' | 'low',
|
|
254
|
+
linkedResources: LinkedResource[]
|
|
255
|
+
): Promise<JiraIssueResponse> {
|
|
256
|
+
const priorityMap: Record<string, JiraPriority> = {
|
|
257
|
+
critical: 'highest',
|
|
258
|
+
high: 'high',
|
|
259
|
+
medium: 'medium',
|
|
260
|
+
low: 'low'
|
|
261
|
+
};
|
|
262
|
+
const priority: JiraPriority = priorityMap[threatLevel];
|
|
263
|
+
|
|
264
|
+
const externalLinks: Array<{ url: string; title: string; type: 'github' | 'reddit' | 'hackernews' }> = linkedResources.map(r => ({
|
|
265
|
+
url: r.url,
|
|
266
|
+
title: r.title,
|
|
267
|
+
type: this.resourceTypeToLinkType(r.type) as 'github' | 'reddit' | 'hackernews'
|
|
268
|
+
}));
|
|
269
|
+
|
|
270
|
+
return this.createEpic({
|
|
271
|
+
title: `Threat Response: ${threatTitle}`,
|
|
272
|
+
description: `*Threat Level:* ${threatLevel.toUpperCase()}\n\n${threatDescription}`,
|
|
273
|
+
priority,
|
|
274
|
+
labels: ['threat-response', 'market-intelligence', 'auto-generated'],
|
|
275
|
+
externalLinks
|
|
276
|
+
});
|
|
277
|
+
}
|
|
278
|
+
|
|
279
|
+
/**
|
|
280
|
+
* Convert resource type to Jira link type
|
|
281
|
+
*/
|
|
282
|
+
private resourceTypeToLinkType(
|
|
283
|
+
type: 'github_discussion' | 'reddit_thread' | 'hackernews_comment'
|
|
284
|
+
): string {
|
|
285
|
+
return type;
|
|
286
|
+
}
|
|
287
|
+
|
|
288
|
+
/**
|
|
289
|
+
* Get epic URL
|
|
290
|
+
*/
|
|
291
|
+
getEpicUrl(epicKey: string): string {
|
|
292
|
+
return `${this.jiraBaseUrl}/browse/${epicKey}`;
|
|
293
|
+
}
|
|
294
|
+
|
|
295
|
+
/**
|
|
296
|
+
* Update project key (for multi-project support)
|
|
297
|
+
*/
|
|
298
|
+
setProjectKey(projectKey: string): void {
|
|
299
|
+
this.projectKey = projectKey;
|
|
300
|
+
}
|
|
301
|
+
|
|
302
|
+
/**
|
|
303
|
+
* Get current project key
|
|
304
|
+
*/
|
|
305
|
+
getProjectKey(): string {
|
|
306
|
+
return this.projectKey;
|
|
307
|
+
}
|
|
308
|
+
}
|
|
309
|
+
|
|
310
|
+
export default JiraIntegration;
|