copilot-money-mcp 1.2.0 → 1.2.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cli.js +12 -1
- package/package.json +1 -1
package/dist/cli.js
CHANGED
|
@@ -27562,6 +27562,11 @@ function isIncomeCategory(categoryId) {
|
|
|
27562
27562
|
const lowerCategory = categoryId.toLowerCase();
|
|
27563
27563
|
return lowerCategory.includes("income") || lowerCategory.includes("payroll") || lowerCategory.includes("salary") || lowerCategory.includes("wage");
|
|
27564
27564
|
}
|
|
27565
|
+
function isKnownPlaidCategory(categoryId) {
|
|
27566
|
+
if (categoryId in CATEGORY_NAMES)
|
|
27567
|
+
return true;
|
|
27568
|
+
return categoryId.toLowerCase() in CATEGORY_NAMES;
|
|
27569
|
+
}
|
|
27565
27570
|
|
|
27566
27571
|
// src/core/database.ts
|
|
27567
27572
|
function findCopilotDatabase() {
|
|
@@ -29146,7 +29151,13 @@ class CopilotMoneyTools {
|
|
|
29146
29151
|
}
|
|
29147
29152
|
async getBudgets(options = {}) {
|
|
29148
29153
|
const { active_only = false } = options;
|
|
29149
|
-
const
|
|
29154
|
+
const allBudgets = await this.db.getBudgets(active_only);
|
|
29155
|
+
const categoryMap2 = await this.getUserCategoryMap();
|
|
29156
|
+
const budgets = allBudgets.filter((b) => {
|
|
29157
|
+
if (!b.category_id)
|
|
29158
|
+
return true;
|
|
29159
|
+
return categoryMap2.has(b.category_id) || isKnownPlaidCategory(b.category_id);
|
|
29160
|
+
});
|
|
29150
29161
|
let totalBudgeted = 0;
|
|
29151
29162
|
for (const budget of budgets) {
|
|
29152
29163
|
if (budget.amount) {
|