paisa-mcp 0.4.8 → 0.4.10
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/index.js +33 -3
- package/dist/index.js.map +6 -5
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -58659,6 +58659,11 @@ function entityRule(e2, bag) {
|
|
|
58659
58659
|
return bag.merchantRules[e2.merchantId] ?? null;
|
|
58660
58660
|
return bag.personRules[e2.personId] ?? null;
|
|
58661
58661
|
}
|
|
58662
|
+
// ../reconciliation/src/income.ts
|
|
58663
|
+
var SALARY = /\bSALARY\b|\bPAYROLL\b|\bSAL\s?CR\b/i;
|
|
58664
|
+
function salaryCreditIds(rows) {
|
|
58665
|
+
return rows.filter((r2) => r2.type === "credit" && !r2.categoryId && !r2.isTransfer && !r2.isIgnored && SALARY.test(r2.description)).map((r2) => r2.id);
|
|
58666
|
+
}
|
|
58662
58667
|
// ../reconciliation/src/match.ts
|
|
58663
58668
|
var DEFAULT_DATE_TOLERANCE = 2;
|
|
58664
58669
|
var DEFAULT_AMOUNT_TOLERANCE = 0.02;
|
|
@@ -60931,6 +60936,20 @@ async function runRescan(client, crypto4) {
|
|
|
60931
60936
|
});
|
|
60932
60937
|
});
|
|
60933
60938
|
await postLinks(client, links);
|
|
60939
|
+
const salaryIds = salaryCreditIds(allRows);
|
|
60940
|
+
if (salaryIds.length > 0) {
|
|
60941
|
+
const salary = (await loadCategoryIndex(client)).bySlug.get("salary");
|
|
60942
|
+
if (salary) {
|
|
60943
|
+
for (let i2 = 0;i2 < salaryIds.length; i2 += 200) {
|
|
60944
|
+
await client.patch("/api/transactions/bulk", {
|
|
60945
|
+
ids: salaryIds.slice(i2, i2 + 200),
|
|
60946
|
+
categoryId: salary.id,
|
|
60947
|
+
categoryType: salary.type
|
|
60948
|
+
});
|
|
60949
|
+
}
|
|
60950
|
+
categorized += salaryIds.length;
|
|
60951
|
+
}
|
|
60952
|
+
}
|
|
60934
60953
|
return { linked: links.length, categorized, unresolved: plan.unresolvedCount };
|
|
60935
60954
|
}
|
|
60936
60955
|
var TRUNCATED_WARNING = "TRUNCATED: the API capped this result, so it is INCOMPLETE. Do not import/reconcile/resolve against it — narrow the query (smaller date range) and re-run.";
|
|
@@ -61838,7 +61857,18 @@ async function runCasImport(deps, args) {
|
|
|
61838
61857
|
});
|
|
61839
61858
|
added++;
|
|
61840
61859
|
}
|
|
61841
|
-
|
|
61860
|
+
let netWorth;
|
|
61861
|
+
try {
|
|
61862
|
+
const nw = await deps.client.post("/api/net-worth/auto", {});
|
|
61863
|
+
netWorth = { updated: true, total: Number(nw.data?.totalNetWorth ?? 0) };
|
|
61864
|
+
} catch (err) {
|
|
61865
|
+
const msg = err instanceof Error ? err.message : String(err);
|
|
61866
|
+
netWorth = {
|
|
61867
|
+
updated: false,
|
|
61868
|
+
reason: /manual|hand/i.test(msg) ? "This month's net worth was entered by hand; left as is (update_net_worth mode=auto overwrite=true replaces it)." : msg
|
|
61869
|
+
};
|
|
61870
|
+
}
|
|
61871
|
+
return { ...plan, dryRun: false, added, netWorth };
|
|
61842
61872
|
}
|
|
61843
61873
|
|
|
61844
61874
|
// src/lib/statement-import.ts
|
|
@@ -62288,7 +62318,7 @@ function registerResources2(server2, tools) {
|
|
|
62288
62318
|
// package.json
|
|
62289
62319
|
var package_default = {
|
|
62290
62320
|
name: "paisa-mcp",
|
|
62291
|
-
version: "0.4.
|
|
62321
|
+
version: "0.4.10",
|
|
62292
62322
|
repository: {
|
|
62293
62323
|
type: "git",
|
|
62294
62324
|
url: "git+https://github.com/nimit9/paisa.git",
|
|
@@ -62387,5 +62417,5 @@ main().catch((err) => {
|
|
|
62387
62417
|
process.exit(1);
|
|
62388
62418
|
});
|
|
62389
62419
|
|
|
62390
|
-
//# debugId=
|
|
62420
|
+
//# debugId=70DF5E5697F5257E64756E2164756E21
|
|
62391
62421
|
//# sourceMappingURL=index.js.map
|