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,198 @@
|
|
|
1
|
+
import * as fs from 'fs';
|
|
2
|
+
import * as path from 'path';
|
|
3
|
+
|
|
4
|
+
export type ErrorCategory = 'typescript' | 'io' | 'validation' | 'git' | 'unknown';
|
|
5
|
+
|
|
6
|
+
export interface DiagnosisResult {
|
|
7
|
+
errorType: string;
|
|
8
|
+
category: ErrorCategory;
|
|
9
|
+
rootCause: string;
|
|
10
|
+
affectedFile?: string;
|
|
11
|
+
lineNumber?: number;
|
|
12
|
+
suggestions: string[];
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
export interface RecoverySuggestion {
|
|
16
|
+
action: string;
|
|
17
|
+
command?: string;
|
|
18
|
+
priority: 'critical' | 'high' | 'medium' | 'low';
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
export class ErrorDiagnostics {
|
|
22
|
+
private workingDir: string;
|
|
23
|
+
private progressFile: string;
|
|
24
|
+
|
|
25
|
+
constructor(workingDir: string) {
|
|
26
|
+
this.workingDir = workingDir;
|
|
27
|
+
this.progressFile = path.join(workingDir, 'progress.md');
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
diagnoseError(error: Error | string, context: string): DiagnosisResult {
|
|
31
|
+
const errorMessage = typeof error === 'string' ? error : error.message;
|
|
32
|
+
const errorType = this.extractErrorType(errorMessage);
|
|
33
|
+
const category = this.categorizeError(error);
|
|
34
|
+
const rootCause = this.extractRootCause(errorMessage, category);
|
|
35
|
+
const { file, line } = this.extractFileInfo(errorMessage);
|
|
36
|
+
const suggestions = this.generateSuggestions(category, errorMessage, rootCause);
|
|
37
|
+
|
|
38
|
+
const diagnosis: DiagnosisResult = {
|
|
39
|
+
errorType,
|
|
40
|
+
category,
|
|
41
|
+
rootCause,
|
|
42
|
+
affectedFile: file,
|
|
43
|
+
lineNumber: line,
|
|
44
|
+
suggestions
|
|
45
|
+
};
|
|
46
|
+
|
|
47
|
+
this.logError(error, context);
|
|
48
|
+
|
|
49
|
+
return diagnosis;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
categorizeError(error: Error | string): ErrorCategory {
|
|
53
|
+
const message = typeof error === 'string' ? error : error.message;
|
|
54
|
+
|
|
55
|
+
if (message.includes('syntax') || message.includes('SyntaxError') || message.includes('TS')) {
|
|
56
|
+
return 'typescript';
|
|
57
|
+
}
|
|
58
|
+
if (message.includes('ENOENT') || message.includes('EACCES') || message.includes('no such file')) {
|
|
59
|
+
return 'io';
|
|
60
|
+
}
|
|
61
|
+
if (message.includes('validation') || message.includes('ValidationError')) {
|
|
62
|
+
return 'validation';
|
|
63
|
+
}
|
|
64
|
+
if (message.includes('fatal') || message.includes('git')) {
|
|
65
|
+
return 'git';
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
return 'unknown';
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
suggestRecovery(diagnosis: DiagnosisResult): RecoverySuggestion {
|
|
72
|
+
const categoryRecovery: Record<ErrorCategory, RecoverySuggestion> = {
|
|
73
|
+
typescript: {
|
|
74
|
+
action: 'Fix TypeScript syntax error',
|
|
75
|
+
command: 'npx tsc --noEmit',
|
|
76
|
+
priority: 'critical'
|
|
77
|
+
},
|
|
78
|
+
io: {
|
|
79
|
+
action: 'Verify file path and permissions',
|
|
80
|
+
command: 'ls -la ' + (diagnosis.affectedFile || '.'),
|
|
81
|
+
priority: 'high'
|
|
82
|
+
},
|
|
83
|
+
validation: {
|
|
84
|
+
action: 'Validate input data against schema',
|
|
85
|
+
command: 'npm run validate',
|
|
86
|
+
priority: 'high'
|
|
87
|
+
},
|
|
88
|
+
git: {
|
|
89
|
+
action: 'Check git repository status',
|
|
90
|
+
command: 'git status',
|
|
91
|
+
priority: 'medium'
|
|
92
|
+
},
|
|
93
|
+
unknown: {
|
|
94
|
+
action: 'Review error logs and context',
|
|
95
|
+
priority: 'medium'
|
|
96
|
+
}
|
|
97
|
+
};
|
|
98
|
+
|
|
99
|
+
return categoryRecovery[diagnosis.category] || categoryRecovery.unknown;
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
logError(error: Error | string, context: string): void {
|
|
103
|
+
const timestamp = new Date().toISOString();
|
|
104
|
+
const errorMessage = typeof error === 'string' ? error : error.message;
|
|
105
|
+
const category = this.categorizeError(error);
|
|
106
|
+
const errorType = this.extractErrorType(errorMessage);
|
|
107
|
+
|
|
108
|
+
const logEntry = `### ERROR: ${errorType} at ${timestamp}\n**Context**: ${context}\n**Category**: ${category}\n**Message**: ${errorMessage}\n\n`;
|
|
109
|
+
|
|
110
|
+
try {
|
|
111
|
+
if (!fs.existsSync(this.progressFile)) {
|
|
112
|
+
fs.writeFileSync(this.progressFile, '# Progress Log\n\n');
|
|
113
|
+
}
|
|
114
|
+
const currentContent = fs.readFileSync(this.progressFile, 'utf-8');
|
|
115
|
+
fs.writeFileSync(this.progressFile, logEntry + currentContent);
|
|
116
|
+
} catch (err) {
|
|
117
|
+
console.error('Failed to log error to progress.md:', err);
|
|
118
|
+
}
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
private extractErrorType(message: string): string {
|
|
122
|
+
const typeMatch = message.match(/^([A-Z][a-zA-Z]*Error)/);
|
|
123
|
+
if (typeMatch) {
|
|
124
|
+
return typeMatch[1];
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
if (message.includes('syntax')) return 'SyntaxError';
|
|
128
|
+
if (message.includes('ENOENT')) return 'FileNotFoundError';
|
|
129
|
+
if (message.includes('EACCES')) return 'PermissionError';
|
|
130
|
+
if (message.includes('validation')) return 'ValidationError';
|
|
131
|
+
|
|
132
|
+
return 'UnknownError';
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
private extractRootCause(message: string, category: ErrorCategory): string {
|
|
136
|
+
switch (category) {
|
|
137
|
+
case 'typescript':
|
|
138
|
+
return message.includes('cannot find') ? 'Missing type definition or import' : 'Invalid TypeScript syntax';
|
|
139
|
+
case 'io':
|
|
140
|
+
return message.includes('ENOENT') ? 'File or directory does not exist' : 'File access denied';
|
|
141
|
+
case 'validation':
|
|
142
|
+
return 'Input validation failed - data does not match expected schema';
|
|
143
|
+
case 'git':
|
|
144
|
+
return 'Git operation failed - check repository state';
|
|
145
|
+
default:
|
|
146
|
+
return 'Unknown error - check logs for details';
|
|
147
|
+
}
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
private extractFileInfo(message: string): { file?: string; line?: number } {
|
|
151
|
+
const fileMatch = message.match(/(?:file|path|at\s+)['"]?([^\s'"]+\.(?:ts|js|json))['"]?/i);
|
|
152
|
+
const lineMatch = message.match(/(?:line|:)[\s:]?(\d+)/i);
|
|
153
|
+
|
|
154
|
+
return {
|
|
155
|
+
file: fileMatch ? fileMatch[1] : undefined,
|
|
156
|
+
line: lineMatch ? parseInt(lineMatch[1], 10) : undefined
|
|
157
|
+
};
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
private generateSuggestions(
|
|
161
|
+
category: ErrorCategory,
|
|
162
|
+
message: string,
|
|
163
|
+
rootCause: string
|
|
164
|
+
): string[] {
|
|
165
|
+
const suggestions: string[] = [];
|
|
166
|
+
|
|
167
|
+
switch (category) {
|
|
168
|
+
case 'typescript':
|
|
169
|
+
suggestions.push('Check for missing imports or type definitions');
|
|
170
|
+
suggestions.push('Verify variable and function names are spelled correctly');
|
|
171
|
+
suggestions.push('Run npm run type-check to identify all TypeScript errors');
|
|
172
|
+
if (message.includes('cannot find')) {
|
|
173
|
+
suggestions.push('Install missing dependencies with npm install');
|
|
174
|
+
}
|
|
175
|
+
break;
|
|
176
|
+
case 'io':
|
|
177
|
+
suggestions.push('Verify the file path is correct and exists');
|
|
178
|
+
suggestions.push('Check file permissions');
|
|
179
|
+
suggestions.push('Ensure the directory structure is properly created');
|
|
180
|
+
break;
|
|
181
|
+
case 'validation':
|
|
182
|
+
suggestions.push('Review the input data format');
|
|
183
|
+
suggestions.push('Check against the expected schema');
|
|
184
|
+
suggestions.push('Validate all required fields are present');
|
|
185
|
+
break;
|
|
186
|
+
case 'git':
|
|
187
|
+
suggestions.push('Run git status to check repository state');
|
|
188
|
+
suggestions.push('Verify branch is up to date');
|
|
189
|
+
suggestions.push('Check for uncommitted changes');
|
|
190
|
+
break;
|
|
191
|
+
default:
|
|
192
|
+
suggestions.push('Review the full error message and stack trace');
|
|
193
|
+
suggestions.push('Check the affected file and surrounding code');
|
|
194
|
+
}
|
|
195
|
+
|
|
196
|
+
return suggestions;
|
|
197
|
+
}
|
|
198
|
+
}
|
|
@@ -0,0 +1,157 @@
|
|
|
1
|
+
import * as fs from 'fs';
|
|
2
|
+
import * as path from 'path';
|
|
3
|
+
|
|
4
|
+
export interface SkillData {
|
|
5
|
+
label: string;
|
|
6
|
+
rootCause: string;
|
|
7
|
+
solution: string;
|
|
8
|
+
timestamp: string;
|
|
9
|
+
usageCount: number;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
export class SkillCapture {
|
|
13
|
+
private skillsDir: string;
|
|
14
|
+
|
|
15
|
+
constructor(skillsDir: string) {
|
|
16
|
+
this.skillsDir = skillsDir;
|
|
17
|
+
this.ensureDirectory();
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
private ensureDirectory(): void {
|
|
21
|
+
if (!fs.existsSync(this.skillsDir)) {
|
|
22
|
+
fs.mkdirSync(this.skillsDir, { recursive: true });
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
private slugify(label: string): string {
|
|
27
|
+
return label
|
|
28
|
+
.toLowerCase()
|
|
29
|
+
.trim()
|
|
30
|
+
.replace(/[^\w\s-]/g, '')
|
|
31
|
+
.replace(/\s+/g, '-')
|
|
32
|
+
.replace(/-+/g, '-');
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
private getFilePath(label: string): string {
|
|
36
|
+
return path.join(this.skillsDir, `${this.slugify(label)}.md`);
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
captureSkill(label: string, rootCause: string, solution: string): string {
|
|
40
|
+
const filename = `${this.slugify(label)}.md`;
|
|
41
|
+
const filePath = this.getFilePath(label);
|
|
42
|
+
const timestamp = new Date().toISOString();
|
|
43
|
+
|
|
44
|
+
const content = `# ${label}
|
|
45
|
+
|
|
46
|
+
**Root Cause**: ${rootCause}
|
|
47
|
+
|
|
48
|
+
**Solution**: ${solution}
|
|
49
|
+
|
|
50
|
+
**Captured**: ${timestamp}
|
|
51
|
+
**Usage Count**: 0`;
|
|
52
|
+
|
|
53
|
+
fs.writeFileSync(filePath, content, 'utf8');
|
|
54
|
+
return filename;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
loadSkill(label: string): SkillData | null {
|
|
58
|
+
const filePath = this.getFilePath(label);
|
|
59
|
+
|
|
60
|
+
if (!fs.existsSync(filePath)) {
|
|
61
|
+
return null;
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
const content = fs.readFileSync(filePath, 'utf8');
|
|
65
|
+
const skillData = this.parseSkillFile(content, label);
|
|
66
|
+
|
|
67
|
+
if (skillData) {
|
|
68
|
+
skillData.usageCount += 1;
|
|
69
|
+
this.saveSkill(filePath, skillData);
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
return skillData;
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
private parseSkillFile(content: string, label: string): SkillData | null {
|
|
76
|
+
const rootCauseMatch = content.match(/\*\*Root Cause\*\*:\s*(.+?)(?=\n\n|\n\*\*)/s);
|
|
77
|
+
const solutionMatch = content.match(/\*\*Solution\*\*:\s*(.+?)(?=\n\n|\n\*\*)/s);
|
|
78
|
+
const timestampMatch = content.match(/\*\*Captured\*\*:\s*(.+?)(?=\n|\r)/);
|
|
79
|
+
const usageCountMatch = content.match(/\*\*Usage Count\*\*:\s*(\d+)/);
|
|
80
|
+
|
|
81
|
+
if (!rootCauseMatch || !solutionMatch || !timestampMatch) {
|
|
82
|
+
return null;
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
return {
|
|
86
|
+
label,
|
|
87
|
+
rootCause: rootCauseMatch[1].trim(),
|
|
88
|
+
solution: solutionMatch[1].trim(),
|
|
89
|
+
timestamp: timestampMatch[1].trim(),
|
|
90
|
+
usageCount: parseInt(usageCountMatch?.[1] || '0', 10),
|
|
91
|
+
};
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
private saveSkill(filePath: string, skillData: SkillData): void {
|
|
95
|
+
const content = `# ${skillData.label}
|
|
96
|
+
|
|
97
|
+
**Root Cause**: ${skillData.rootCause}
|
|
98
|
+
|
|
99
|
+
**Solution**: ${skillData.solution}
|
|
100
|
+
|
|
101
|
+
**Captured**: ${skillData.timestamp}
|
|
102
|
+
**Usage Count**: ${skillData.usageCount}`;
|
|
103
|
+
|
|
104
|
+
fs.writeFileSync(filePath, content, 'utf8');
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
searchSkills(keyword: string): SkillData[] {
|
|
108
|
+
const keyword_lower = keyword.toLowerCase();
|
|
109
|
+
const files = this.getSkillFiles();
|
|
110
|
+
const results: SkillData[] = [];
|
|
111
|
+
|
|
112
|
+
for (const file of files) {
|
|
113
|
+
const content = fs.readFileSync(file, 'utf8');
|
|
114
|
+
const filename = path.basename(file, '.md');
|
|
115
|
+
const skillData = this.parseSkillFile(content, filename);
|
|
116
|
+
|
|
117
|
+
if (
|
|
118
|
+
skillData &&
|
|
119
|
+
(skillData.label.toLowerCase().includes(keyword_lower) ||
|
|
120
|
+
skillData.rootCause.toLowerCase().includes(keyword_lower) ||
|
|
121
|
+
skillData.solution.toLowerCase().includes(keyword_lower))
|
|
122
|
+
) {
|
|
123
|
+
results.push(skillData);
|
|
124
|
+
}
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
return results;
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
listSkills(): SkillData[] {
|
|
131
|
+
const files = this.getSkillFiles();
|
|
132
|
+
const skills: SkillData[] = [];
|
|
133
|
+
|
|
134
|
+
for (const file of files) {
|
|
135
|
+
const content = fs.readFileSync(file, 'utf8');
|
|
136
|
+
const filename = path.basename(file, '.md');
|
|
137
|
+
const skillData = this.parseSkillFile(content, filename);
|
|
138
|
+
|
|
139
|
+
if (skillData) {
|
|
140
|
+
skills.push(skillData);
|
|
141
|
+
}
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
return skills.sort((a, b) => b.usageCount - a.usageCount);
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
private getSkillFiles(): string[] {
|
|
148
|
+
if (!fs.existsSync(this.skillsDir)) {
|
|
149
|
+
return [];
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
return fs
|
|
153
|
+
.readdirSync(this.skillsDir)
|
|
154
|
+
.filter((file) => file.endsWith('.md'))
|
|
155
|
+
.map((file) => path.join(this.skillsDir, file));
|
|
156
|
+
}
|
|
157
|
+
}
|