@markcolabs/mcp 0.2.0 → 0.4.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.
Files changed (75) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +128 -205
  3. package/dist/index.d.ts +9 -23
  4. package/dist/index.d.ts.map +1 -1
  5. package/dist/index.js +51 -186
  6. package/dist/index.js.map +1 -1
  7. package/package.json +21 -12
  8. package/dist/disclaimers/ymyl.d.ts +0 -16
  9. package/dist/disclaimers/ymyl.d.ts.map +0 -1
  10. package/dist/disclaimers/ymyl.js +0 -20
  11. package/dist/disclaimers/ymyl.js.map +0 -1
  12. package/dist/engines/compoundInterest.d.ts +0 -75
  13. package/dist/engines/compoundInterest.d.ts.map +0 -1
  14. package/dist/engines/compoundInterest.js +0 -74
  15. package/dist/engines/compoundInterest.js.map +0 -1
  16. package/dist/engines/data/federalTax.d.ts +0 -47
  17. package/dist/engines/data/federalTax.d.ts.map +0 -1
  18. package/dist/engines/data/federalTax.js +0 -111
  19. package/dist/engines/data/federalTax.js.map +0 -1
  20. package/dist/engines/data/irs2026.d.ts +0 -30
  21. package/dist/engines/data/irs2026.d.ts.map +0 -1
  22. package/dist/engines/data/irs2026.js +0 -30
  23. package/dist/engines/data/irs2026.js.map +0 -1
  24. package/dist/engines/data/ssa.d.ts +0 -39
  25. package/dist/engines/data/ssa.d.ts.map +0 -1
  26. package/dist/engines/data/ssa.js +0 -55
  27. package/dist/engines/data/ssa.js.map +0 -1
  28. package/dist/engines/mortgage.d.ts +0 -70
  29. package/dist/engines/mortgage.d.ts.map +0 -1
  30. package/dist/engines/mortgage.js +0 -60
  31. package/dist/engines/mortgage.js.map +0 -1
  32. package/dist/engines/paycheck.d.ts +0 -93
  33. package/dist/engines/paycheck.d.ts.map +0 -1
  34. package/dist/engines/paycheck.js +0 -113
  35. package/dist/engines/paycheck.js.map +0 -1
  36. package/dist/engines/retirement401k.d.ts +0 -109
  37. package/dist/engines/retirement401k.d.ts.map +0 -1
  38. package/dist/engines/retirement401k.js +0 -130
  39. package/dist/engines/retirement401k.js.map +0 -1
  40. package/dist/engines/socialSecurity.d.ts +0 -63
  41. package/dist/engines/socialSecurity.d.ts.map +0 -1
  42. package/dist/engines/socialSecurity.js +0 -139
  43. package/dist/engines/socialSecurity.js.map +0 -1
  44. package/dist/envelope.d.ts +0 -76
  45. package/dist/envelope.d.ts.map +0 -1
  46. package/dist/envelope.js +0 -34
  47. package/dist/envelope.js.map +0 -1
  48. package/dist/shared/bounds.d.ts +0 -83
  49. package/dist/shared/bounds.d.ts.map +0 -1
  50. package/dist/shared/bounds.js +0 -121
  51. package/dist/shared/bounds.js.map +0 -1
  52. package/dist/tools/compoundInterest.d.ts +0 -48
  53. package/dist/tools/compoundInterest.d.ts.map +0 -1
  54. package/dist/tools/compoundInterest.js +0 -107
  55. package/dist/tools/compoundInterest.js.map +0 -1
  56. package/dist/tools/mortgage.d.ts +0 -51
  57. package/dist/tools/mortgage.d.ts.map +0 -1
  58. package/dist/tools/mortgage.js +0 -112
  59. package/dist/tools/mortgage.js.map +0 -1
  60. package/dist/tools/paycheck.d.ts +0 -54
  61. package/dist/tools/paycheck.d.ts.map +0 -1
  62. package/dist/tools/paycheck.js +0 -122
  63. package/dist/tools/paycheck.js.map +0 -1
  64. package/dist/tools/retirement401k.d.ts +0 -85
  65. package/dist/tools/retirement401k.d.ts.map +0 -1
  66. package/dist/tools/retirement401k.js +0 -141
  67. package/dist/tools/retirement401k.js.map +0 -1
  68. package/dist/tools/socialSecurity.d.ts +0 -51
  69. package/dist/tools/socialSecurity.d.ts.map +0 -1
  70. package/dist/tools/socialSecurity.js +0 -117
  71. package/dist/tools/socialSecurity.js.map +0 -1
  72. package/dist/util/zod-to-json-schema.d.ts +0 -28
  73. package/dist/util/zod-to-json-schema.d.ts.map +0 -1
  74. package/dist/util/zod-to-json-schema.js +0 -98
  75. package/dist/util/zod-to-json-schema.js.map +0 -1
package/dist/index.js CHANGED
@@ -1,197 +1,62 @@
1
1
  #!/usr/bin/env node
2
2
  /**
3
- * @markcolabs/mcp — MCP server entrypoint.
3
+ * @markcolabs/mcp v0.4.0 stdio↔HTTPS shim.
4
4
  *
5
- * v0.2.0 (per ADR-0039 + ADR-0041 reconciliation). Registers:
6
- * - 5 tools:
7
- * dc.calculator.mortgage.monthlyPayment (S135 Item 5)
8
- * dc.calculator.compoundInterest.futureValue (S135 Item 5)
9
- * dc.calculator.retirement401k.projection (S136 Item 3, renamed v0.2.0 per ADR-0041 D2)
10
- * dc.calculator.socialSecurity.estimatedBenefit (S136 Item 3, renamed v0.2.0 per ADR-0041 D2)
11
- * dc.calculator.paycheck.netPay (S136 Item 3)
12
- * - 1 resource: dc://disclaimers/ymyl (canonical YMYL disclaimer)
5
+ * Proxies MCP JSON-RPC messages from stdin to the hosted MCP server at
6
+ * mcp.digitalcalculator.info/mcp and writes responses back to stdout.
13
7
  *
14
- * Transport: stdio (default for local MCP clients).
8
+ * Per ADR-0044a (ACCEPTED 2026-05-28): engine source lives in the private
9
+ * monorepo at infra/mcp/. This shim contains no calculation logic — it is
10
+ * a thin transport adapter only. MIT-licensed.
15
11
  *
16
- * S136 hits O5-KR1 5-tool target. Post-S136: methodology resources
17
- * (dc://methodologies/*) and the `plan-retirement` prompt template (O5-KR2).
12
+ * Claude Desktop config:
13
+ * { "mcpServers": { "digitalcalculator": { "command": "npx", "args": ["-y", "@markcolabs/mcp"] } } }
18
14
  */
19
- import { Server } from "@modelcontextprotocol/sdk/server/index.js";
20
- import { StdioServerTransport } from "@modelcontextprotocol/sdk/server/stdio.js";
21
- import { CallToolRequestSchema, ListResourcesRequestSchema, ListToolsRequestSchema, ReadResourceRequestSchema, } from "@modelcontextprotocol/sdk/types.js";
22
- import { zodToJsonSchema } from "./util/zod-to-json-schema.js";
23
- import * as mortgageTool from "./tools/mortgage.js";
24
- import * as compoundInterestTool from "./tools/compoundInterest.js";
25
- import * as retirement401kTool from "./tools/retirement401k.js";
26
- import * as socialSecurityTool from "./tools/socialSecurity.js";
27
- import * as paycheckTool from "./tools/paycheck.js";
28
- import { YMYL_DISCLAIMER, YMYL_DISCLAIMER_URI, } from "./disclaimers/ymyl.js";
29
- // Re-export the tool execute functions and engines so consumers (and parity
30
- // tests) can import them directly without spinning up the MCP transport.
31
- export { execute as executeMortgageTool } from "./tools/mortgage.js";
32
- export { execute as executeCompoundInterestTool } from "./tools/compoundInterest.js";
33
- export { execute as executeRetirement401kTool } from "./tools/retirement401k.js";
34
- export { execute as executeSocialSecurityTool } from "./tools/socialSecurity.js";
35
- export { execute as executePaycheckTool } from "./tools/paycheck.js";
36
- export * as mortgageEngine from "./engines/mortgage.js";
37
- export * as compoundInterestEngine from "./engines/compoundInterest.js";
38
- export * as retirement401kEngine from "./engines/retirement401k.js";
39
- export * as socialSecurityEngine from "./engines/socialSecurity.js";
40
- export * as paycheckEngine from "./engines/paycheck.js";
41
- export * from "./envelope.js";
42
- // ---------------------------------------------------------------------------
43
- // Server setup
44
- // ---------------------------------------------------------------------------
45
- const server = new Server({
46
- name: "@markcolabs/mcp",
47
- version: "0.2.0",
48
- }, {
49
- capabilities: {
50
- tools: {},
51
- resources: {},
52
- },
53
- });
54
- // ---------------------------------------------------------------------------
55
- // tools/list
56
- // ---------------------------------------------------------------------------
57
- server.setRequestHandler(ListToolsRequestSchema, async () => {
58
- return {
59
- tools: [
60
- {
61
- name: mortgageTool.TOOL_NAME,
62
- description: mortgageTool.TOOL_DESCRIPTION,
63
- inputSchema: zodToJsonSchema(mortgageTool.MortgageMonthlyPaymentInputSchema),
64
- },
65
- {
66
- name: compoundInterestTool.TOOL_NAME,
67
- description: compoundInterestTool.TOOL_DESCRIPTION,
68
- inputSchema: zodToJsonSchema(compoundInterestTool.CompoundInterestFutureValueInputSchema),
69
- },
70
- {
71
- name: retirement401kTool.TOOL_NAME,
72
- description: retirement401kTool.TOOL_DESCRIPTION,
73
- inputSchema: zodToJsonSchema(retirement401kTool.Retirement401kProjectionInputSchema),
74
- },
75
- {
76
- name: socialSecurityTool.TOOL_NAME,
77
- description: socialSecurityTool.TOOL_DESCRIPTION,
78
- inputSchema: zodToJsonSchema(socialSecurityTool.SocialSecurityEstimateInputSchema),
15
+ import * as readline from "readline";
16
+ import * as https from "https";
17
+ const MCP_ENDPOINT = "https://mcp.digitalcalculator.info/mcp";
18
+ const SESSION_ID = Math.random().toString(36).slice(2);
19
+ function post(body) {
20
+ return new Promise((resolve, reject) => {
21
+ const url = new URL(MCP_ENDPOINT);
22
+ const data = Buffer.from(body);
23
+ const req = https.request({
24
+ hostname: url.hostname,
25
+ path: url.pathname,
26
+ method: "POST",
27
+ headers: {
28
+ "Content-Type": "application/json",
29
+ "Content-Length": data.byteLength,
30
+ "Mcp-Session-Id": SESSION_ID,
79
31
  },
80
- {
81
- name: paycheckTool.TOOL_NAME,
82
- description: paycheckTool.TOOL_DESCRIPTION,
83
- inputSchema: zodToJsonSchema(paycheckTool.PaycheckNetPayInputSchema),
84
- },
85
- ],
86
- };
87
- });
88
- // ---------------------------------------------------------------------------
89
- // tools/call
90
- // ---------------------------------------------------------------------------
91
- server.setRequestHandler(CallToolRequestSchema, async (request) => {
92
- const { name, arguments: args } = request.params;
93
- let result;
94
- switch (name) {
95
- case mortgageTool.TOOL_NAME:
96
- result = mortgageTool.execute(args);
97
- break;
98
- case compoundInterestTool.TOOL_NAME:
99
- result = compoundInterestTool.execute(args);
100
- break;
101
- case retirement401kTool.TOOL_NAME:
102
- result = retirement401kTool.execute(args);
103
- break;
104
- case socialSecurityTool.TOOL_NAME:
105
- result = socialSecurityTool.execute(args);
106
- break;
107
- case paycheckTool.TOOL_NAME:
108
- result = paycheckTool.execute(args);
109
- break;
110
- default:
111
- return {
112
- isError: true,
113
- content: [
114
- {
115
- type: "text",
116
- text: JSON.stringify({
117
- error: {
118
- code: "INPUT_VALIDATION",
119
- message: `Unknown tool: ${name}`,
120
- retriable: false,
121
- },
122
- }),
123
- },
124
- ],
125
- };
126
- }
127
- if (result.ok) {
128
- return {
129
- content: [
130
- {
131
- type: "text",
132
- text: JSON.stringify(result.value, null, 2),
133
- },
134
- ],
135
- };
32
+ }, (res) => {
33
+ const chunks = [];
34
+ res.on("data", (chunk) => chunks.push(chunk));
35
+ res.on("end", () => resolve(Buffer.concat(chunks).toString("utf8")));
36
+ });
37
+ req.on("error", reject);
38
+ req.write(data);
39
+ req.end();
40
+ });
41
+ }
42
+ const rl = readline.createInterface({ input: process.stdin, terminal: false });
43
+ rl.on("line", async (line) => {
44
+ const trimmed = line.trim();
45
+ if (!trimmed)
46
+ return;
47
+ try {
48
+ const response = await post(trimmed);
49
+ process.stdout.write(response + "\n");
136
50
  }
137
- return {
138
- isError: true,
139
- content: [
140
- {
141
- type: "text",
142
- text: JSON.stringify(result.error),
143
- },
144
- ],
145
- };
146
- });
147
- // ---------------------------------------------------------------------------
148
- // resources/list — exposes the canonical YMYL disclaimer (O5-KR2 stub)
149
- // ---------------------------------------------------------------------------
150
- server.setRequestHandler(ListResourcesRequestSchema, async () => {
151
- return {
152
- resources: [
153
- {
154
- uri: YMYL_DISCLAIMER_URI,
155
- name: "Canonical YMYL Disclaimer",
156
- description: "Single source of truth for the YMYL disclaimer string returned in every tool response.",
157
- mimeType: "text/plain",
158
- },
159
- ],
160
- };
161
- });
162
- server.setRequestHandler(ReadResourceRequestSchema, async (request) => {
163
- const { uri } = request.params;
164
- if (uri === YMYL_DISCLAIMER_URI) {
165
- return {
166
- contents: [
167
- {
168
- uri,
169
- mimeType: "text/plain",
170
- text: YMYL_DISCLAIMER,
171
- },
172
- ],
173
- };
51
+ catch (err) {
52
+ const message = err instanceof Error ? err.message : String(err);
53
+ const parsed = (() => { try {
54
+ return JSON.parse(trimmed);
55
+ }
56
+ catch {
57
+ return {};
58
+ } })();
59
+ process.stdout.write(JSON.stringify({ jsonrpc: "2.0", id: parsed.id ?? null, error: { code: -32603, message } }) + "\n");
174
60
  }
175
- throw new Error(`Unknown resource: ${uri}`);
176
61
  });
177
- // ---------------------------------------------------------------------------
178
- // Boot — only run when invoked directly (not when imported by tests).
179
- // ---------------------------------------------------------------------------
180
- async function main() {
181
- const transport = new StdioServerTransport();
182
- await server.connect(transport);
183
- // eslint-disable-next-line no-console
184
- console.error("[@markcolabs/mcp] v0.2.0 ready (stdio) — 5 tools registered.");
185
- }
186
- // Run only when invoked as a binary, not when imported by parity tests.
187
- const isDirect = import.meta.url === `file://${process.argv[1]}` ||
188
- process.argv[1]?.endsWith("dist/index.js") ||
189
- process.argv[1]?.endsWith("dist\\index.js");
190
- if (isDirect) {
191
- main().catch((err) => {
192
- // eslint-disable-next-line no-console
193
- console.error("[@markcolabs/mcp] fatal:", err);
194
- process.exit(1);
195
- });
196
- }
197
62
  //# sourceMappingURL=index.js.map
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AACA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,EAAE,MAAM,EAAE,MAAM,2CAA2C,CAAC;AACnE,OAAO,EAAE,oBAAoB,EAAE,MAAM,2CAA2C,CAAC;AACjF,OAAO,EACL,qBAAqB,EACrB,0BAA0B,EAC1B,sBAAsB,EACtB,yBAAyB,GAC1B,MAAM,oCAAoC,CAAC;AAC5C,OAAO,EAAE,eAAe,EAAE,MAAM,8BAA8B,CAAC;AAE/D,OAAO,KAAK,YAAY,MAAM,qBAAqB,CAAC;AACpD,OAAO,KAAK,oBAAoB,MAAM,6BAA6B,CAAC;AACpE,OAAO,KAAK,kBAAkB,MAAM,2BAA2B,CAAC;AAChE,OAAO,KAAK,kBAAkB,MAAM,2BAA2B,CAAC;AAChE,OAAO,KAAK,YAAY,MAAM,qBAAqB,CAAC;AACpD,OAAO,EACL,eAAe,EACf,mBAAmB,GACpB,MAAM,uBAAuB,CAAC;AAE/B,4EAA4E;AAC5E,yEAAyE;AACzE,OAAO,EAAE,OAAO,IAAI,mBAAmB,EAAE,MAAM,qBAAqB,CAAC;AACrE,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CAAC,EAAE,CAAC,MAAM,EAAE,KAAK,EAAE,IAAI,EAAE,EAAE;IAC3B,MAAM,OAAO,GAAG,IAAI,CAAC,IAAI,EAAE,CAAC;IAC5B,IAAI,CAAC,OAAO;QAAE,OAAO;IACrB,IAAI,CAAC;QACH,MAAM,QAAQ,GAAG,MAAM,IAAI,CAAC,OAAO,CAAC,CAAC;QACrC,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,QAAQ,GAAG,IAAI,CAAC,CAAC;IACxC,CAAC;IAAC,OAAO,GAAG,EAAE,CAAC;QACb,MAAM,OAAO,GAAG,GAAG,YAAY,KAAK,CAAC,CAAC,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC;QACjE,MAAM,MAAM,GAAG,CAAC,GAAG,EAAE,GAAG,IAAI,CAAC;YAAC,OAAO,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC;QAAC,CAAC;QAAC,MAAM,CAAC;YAAC,OAAO,EAAE,CAAC;QAAC,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC;QACtF,OAAO,CAAC,MAAM,CAAC,KAAK,CAClB,IAAI,CAAC,SAAS,CAAC,EAAE,OAAO,EAAE,KAAK,EAAE,EAAE,EAAE,MAAM,CAAC,EAAE,IAAI,IAAI,EAAE,KAAK,EAAE,EAAE,IAAI,EAAE,CAAC,KAAK,EAAE,OAAO,EAAE,EAAE,CAAC,GAAG,IAAI,CACnG,CAAC;IACJ,CAAC;AACH,CAAC,CAAC,CAAC"}
package/package.json CHANGED
@@ -1,8 +1,8 @@
1
1
  {
2
2
  "name": "@markcolabs/mcp",
3
- "version": "0.2.0",
3
+ "version": "0.4.0",
4
4
  "private": false,
5
- "description": "Model Context Protocol server for digitalcalculator.info financial calculators. v0.2.0 ships 5 calculator tools (mortgage monthlyPayment, compound-interest futureValue, retirement401k projection, Social Security estimatedBenefit, paycheck netPay). Per ADR-0039 + ADR-0041 contract reconciliation.",
5
+ "description": "MCP stdio↔HTTPS shim for digitalcalculator.info financial calculators. Proxies MCP JSON-RPC to the hosted server at mcp.digitalcalculator.info/mcp. Per ADR-0044a: engine source is private; this package is a thin transport adapter only.",
6
6
  "type": "module",
7
7
  "main": "./dist/index.js",
8
8
  "types": "./dist/index.d.ts",
@@ -12,22 +12,17 @@
12
12
  "scripts": {
13
13
  "build": "tsc",
14
14
  "start": "node ./dist/index.js",
15
- "test": "vitest run",
16
- "test:watch": "vitest",
17
15
  "typecheck": "tsc --noEmit"
18
16
  },
19
17
  "files": [
20
18
  "dist",
21
- "README.md"
19
+ "README.md",
20
+ "LICENSE"
22
21
  ],
23
- "dependencies": {
24
- "@modelcontextprotocol/sdk": "^1.0.0",
25
- "zod": "^3.23.8"
26
- },
22
+ "dependencies": {},
27
23
  "devDependencies": {
28
24
  "@types/node": "^20.12.7",
29
- "typescript": "^5.4.5",
30
- "vitest": "^4.0.18"
25
+ "typescript": "^5.4.5"
31
26
  },
32
27
  "engines": {
33
28
  "node": ">=18.0.0"
@@ -35,16 +30,30 @@
35
30
  "keywords": [
36
31
  "mcp",
37
32
  "model-context-protocol",
33
+ "mcp-server",
34
+ "claude-mcp",
35
+ "anthropic",
38
36
  "financial-calculator",
39
37
  "mortgage",
40
38
  "compound-interest",
41
39
  "401k",
42
40
  "social-security",
43
41
  "paycheck",
44
- "digitalcalculator"
42
+ "ira",
43
+ "roth-conversion",
44
+ "rmd",
45
+ "hsa",
46
+ "inflation",
47
+ "savings",
48
+ "digitalcalculator",
49
+ "digitalcalculator.info"
45
50
  ],
46
51
  "author": "Markcolabs LLC",
47
52
  "license": "MIT",
53
+ "homepage": "https://www.digitalcalculator.info/mcp/",
54
+ "bugs": {
55
+ "url": "https://github.com/mark57-ux/digitalcalculator/issues"
56
+ },
48
57
  "repository": {
49
58
  "type": "git",
50
59
  "url": "https://github.com/mark57-ux/digitalcalculator.git",
@@ -1,16 +0,0 @@
1
- /**
2
- * Canonical YMYL disclaimer — single source of truth.
3
- *
4
- * Per ADR-0039 § 3 and § Implementation Notes / "YMYL disclaimer canonicalization":
5
- * - Every ToolResult.disclaimer field embeds this exact string.
6
- * - The same string is exposed as the `dc://disclaimers/ymyl` MCP resource.
7
- * - Tools do NOT author their own disclaimers. All MCP responses use this constant.
8
- *
9
- * Authoring is owned by Content. Updates here propagate to every tool response.
10
- */
11
- export declare const YMYL_DISCLAIMER: string;
12
- /**
13
- * MCP resource URI under which the disclaimer is exposed (O5-KR2).
14
- */
15
- export declare const YMYL_DISCLAIMER_URI = "dc://disclaimers/ymyl";
16
- //# sourceMappingURL=ymyl.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"ymyl.d.ts","sourceRoot":"","sources":["../../src/disclaimers/ymyl.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AACH,eAAO,MAAM,eAAe,QAKqE,CAAC;AAElG;;GAEG;AACH,eAAO,MAAM,mBAAmB,0BAA0B,CAAC"}
@@ -1,20 +0,0 @@
1
- /**
2
- * Canonical YMYL disclaimer — single source of truth.
3
- *
4
- * Per ADR-0039 § 3 and § Implementation Notes / "YMYL disclaimer canonicalization":
5
- * - Every ToolResult.disclaimer field embeds this exact string.
6
- * - The same string is exposed as the `dc://disclaimers/ymyl` MCP resource.
7
- * - Tools do NOT author their own disclaimers. All MCP responses use this constant.
8
- *
9
- * Authoring is owned by Content. Updates here propagate to every tool response.
10
- */
11
- export const YMYL_DISCLAIMER = "Estimates only — for educational purposes. Results are computed in USD using deterministic " +
12
- "formulas and the inputs you provided. They do not constitute financial, tax, legal, or " +
13
- "investment advice. Actual rates, fees, taxes, and outcomes vary by lender, jurisdiction, " +
14
- "and personal circumstances. Verify with a licensed professional before making financial " +
15
- "decisions. Source: digitalcalculator.info — see methodology link for formula and assumptions.";
16
- /**
17
- * MCP resource URI under which the disclaimer is exposed (O5-KR2).
18
- */
19
- export const YMYL_DISCLAIMER_URI = "dc://disclaimers/ymyl";
20
- //# sourceMappingURL=ymyl.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"ymyl.js","sourceRoot":"","sources":["../../src/disclaimers/ymyl.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AACH,MAAM,CAAC,MAAM,eAAe,GAC1B,6FAA6F;IAC7F,yFAAyF;IACzF,2FAA2F;IAC3F,0FAA0F;IAC1F,+FAA+F,CAAC;AAElG;;GAEG;AACH,MAAM,CAAC,MAAM,mBAAmB,GAAG,uBAAuB,CAAC"}
@@ -1,75 +0,0 @@
1
- /**
2
- * Compound-interest engine — lifted from
3
- * site/src/pages/compound-interest-calculator/compound-interest-calculator.js
4
- * (function `calculateFutureValue`).
5
- *
6
- * Per ADR-0039 § 5: pure synchronous functions, ENGINE_VERSION constant,
7
- * parity test against the site source as the gate.
8
- *
9
- * Math reference:
10
- * FV_principal = P * (1 + r/n)^(nt)
11
- * FV_contributions = PMT_per_period * [((1 + r/n)^(nt) - 1) / (r/n)] (if r > 0)
12
- * FV_contributions = PMT_per_period * (n * t) (if r == 0)
13
- * where:
14
- * P = initial principal
15
- * PMT_per_period = monthlyContribution * (12 / n)
16
- * r = annual rate as decimal (e.g., 0.07 for 7%)
17
- * n = compounding periods per year
18
- * t = years
19
- *
20
- * The engine accepts the rate as a percent and compounding as a label
21
- * (per ADR-0039 § 2 Percent-suffix convention + sprint prompt enum).
22
- */
23
- import { type CompoundingFrequencyLabel } from "../shared/bounds.js";
24
- /**
25
- * SemVer of the compound-interest engine math. Per ADR-0039 § 5 (reaffirmed in
26
- * ADR-0041 Position #4a): major bump = math change; minor = additive output;
27
- * patch = numerical correction. NOT bumped for cosmetic refactors.
28
- * - 0.1.0: initial v1 lift from compound-interest-calculator.js (S135 Item 5).
29
- * - 0.2.0 (v0.1.0 publish): out-of-policy package-surface bump — superseded.
30
- * - 1.0.0 (v0.2.0 publish): one-time reset to align with ADR-0039 § 5 per ADR-0041 D4a.
31
- * Math unchanged from 0.1.0 / 0.2.0.
32
- */
33
- export declare const ENGINE_VERSION = "1.0.0";
34
- /**
35
- * Inputs to the compound-interest future-value engine.
36
- *
37
- * Per ADR-0039 § 2:
38
- * - Monetary fields are bare USD numbers.
39
- * - Percentage fields use whole-number-percent units (e.g., 7 for 7%).
40
- * - Optional fields default to 0 inside the engine.
41
- */
42
- export interface CompoundInterestFutureValueInput {
43
- /** Initial principal in USD. */
44
- principal: number;
45
- /** Annual interest rate as whole-number percent (e.g., 7 for 7%). */
46
- annualRatePercent: number;
47
- /** Investment period in years. May be 0 (returns principal alone). */
48
- years: number;
49
- /** Compounding frequency label. */
50
- compoundingFrequency: CompoundingFrequencyLabel;
51
- /** Monthly contribution in USD. Optional — defaults to 0. */
52
- monthlyContribution?: number;
53
- }
54
- /**
55
- * Result payload (what goes inside ToolResult.result).
56
- */
57
- export interface CompoundInterestFutureValueResult {
58
- /** Future value (principal + contributions + interest), in USD. */
59
- futureValue: number;
60
- /** Total contributed (principal + sum of monthly contributions over the period), in USD. */
61
- totalContributions: number;
62
- /** Interest earned (futureValue - totalContributions), in USD. */
63
- interestEarned: number;
64
- }
65
- /**
66
- * Compute the future value of a compound-interest investment with optional
67
- * regular monthly contributions.
68
- *
69
- * 1-to-1 port of site/src/pages/compound-interest-calculator/compound-interest-calculator.js
70
- * function `calculateFutureValue`. Site uses `annualRate` as decimal; this engine
71
- * accepts whole-number percent and converts internally so the contract is
72
- * Percent-suffix consistent (ADR-0039).
73
- */
74
- export declare function futureValue(input: CompoundInterestFutureValueInput): CompoundInterestFutureValueResult;
75
- //# sourceMappingURL=compoundInterest.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"compoundInterest.d.ts","sourceRoot":"","sources":["../../src/engines/compoundInterest.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;GAqBG;AAEH,OAAO,EAEL,KAAK,yBAAyB,EAC/B,MAAM,qBAAqB,CAAC;AAE7B;;;;;;;;GAQG;AACH,eAAO,MAAM,cAAc,UAAU,CAAC;AAEtC;;;;;;;GAOG;AACH,MAAM,WAAW,gCAAgC;IAC/C,gCAAgC;IAChC,SAAS,EAAE,MAAM,CAAC;IAClB,qEAAqE;IACrE,iBAAiB,EAAE,MAAM,CAAC;IAC1B,sEAAsE;IACtE,KAAK,EAAE,MAAM,CAAC;IACd,mCAAmC;IACnC,oBAAoB,EAAE,yBAAyB,CAAC;IAChD,6DAA6D;IAC7D,mBAAmB,CAAC,EAAE,MAAM,CAAC;CAC9B;AAED;;GAEG;AACH,MAAM,WAAW,iCAAiC;IAChD,mEAAmE;IACnE,WAAW,EAAE,MAAM,CAAC;IACpB,4FAA4F;IAC5F,kBAAkB,EAAE,MAAM,CAAC;IAC3B,kEAAkE;IAClE,cAAc,EAAE,MAAM,CAAC;CACxB;AAED;;;;;;;;GAQG;AACH,wBAAgB,WAAW,CACzB,KAAK,EAAE,gCAAgC,GACtC,iCAAiC,CAyCnC"}
@@ -1,74 +0,0 @@
1
- /**
2
- * Compound-interest engine — lifted from
3
- * site/src/pages/compound-interest-calculator/compound-interest-calculator.js
4
- * (function `calculateFutureValue`).
5
- *
6
- * Per ADR-0039 § 5: pure synchronous functions, ENGINE_VERSION constant,
7
- * parity test against the site source as the gate.
8
- *
9
- * Math reference:
10
- * FV_principal = P * (1 + r/n)^(nt)
11
- * FV_contributions = PMT_per_period * [((1 + r/n)^(nt) - 1) / (r/n)] (if r > 0)
12
- * FV_contributions = PMT_per_period * (n * t) (if r == 0)
13
- * where:
14
- * P = initial principal
15
- * PMT_per_period = monthlyContribution * (12 / n)
16
- * r = annual rate as decimal (e.g., 0.07 for 7%)
17
- * n = compounding periods per year
18
- * t = years
19
- *
20
- * The engine accepts the rate as a percent and compounding as a label
21
- * (per ADR-0039 § 2 Percent-suffix convention + sprint prompt enum).
22
- */
23
- import { COMPOUNDING_FREQUENCY, } from "../shared/bounds.js";
24
- /**
25
- * SemVer of the compound-interest engine math. Per ADR-0039 § 5 (reaffirmed in
26
- * ADR-0041 Position #4a): major bump = math change; minor = additive output;
27
- * patch = numerical correction. NOT bumped for cosmetic refactors.
28
- * - 0.1.0: initial v1 lift from compound-interest-calculator.js (S135 Item 5).
29
- * - 0.2.0 (v0.1.0 publish): out-of-policy package-surface bump — superseded.
30
- * - 1.0.0 (v0.2.0 publish): one-time reset to align with ADR-0039 § 5 per ADR-0041 D4a.
31
- * Math unchanged from 0.1.0 / 0.2.0.
32
- */
33
- export const ENGINE_VERSION = "1.0.0";
34
- /**
35
- * Compute the future value of a compound-interest investment with optional
36
- * regular monthly contributions.
37
- *
38
- * 1-to-1 port of site/src/pages/compound-interest-calculator/compound-interest-calculator.js
39
- * function `calculateFutureValue`. Site uses `annualRate` as decimal; this engine
40
- * accepts whole-number percent and converts internally so the contract is
41
- * Percent-suffix consistent (ADR-0039).
42
- */
43
- export function futureValue(input) {
44
- const { principal, annualRatePercent, years, compoundingFrequency, monthlyContribution = 0, } = input;
45
- // Percent → decimal at the engine boundary.
46
- const r = annualRatePercent / 100;
47
- const n = COMPOUNDING_FREQUENCY[compoundingFrequency];
48
- const t = years;
49
- const periods = n * t;
50
- const periodicRate = r / n;
51
- // FV of principal.
52
- const fvPrincipal = principal * Math.pow(1 + periodicRate, periods);
53
- // FV of regular contributions (annuity-due-like, contributions split per period).
54
- const contributionPerPeriod = monthlyContribution * (12 / n);
55
- let fvContributions = 0;
56
- if (periodicRate > 0 && contributionPerPeriod > 0) {
57
- fvContributions =
58
- contributionPerPeriod *
59
- ((Math.pow(1 + periodicRate, periods) - 1) / periodicRate);
60
- }
61
- else if (contributionPerPeriod > 0) {
62
- // 0% rate: contributions just sum.
63
- fvContributions = contributionPerPeriod * periods;
64
- }
65
- const futureValueTotal = fvPrincipal + fvContributions;
66
- const totalContributions = principal + monthlyContribution * 12 * t;
67
- const interestEarned = futureValueTotal - totalContributions;
68
- return {
69
- futureValue: futureValueTotal,
70
- totalContributions,
71
- interestEarned,
72
- };
73
- }
74
- //# sourceMappingURL=compoundInterest.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"compoundInterest.js","sourceRoot":"","sources":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AAgB,GAAG,WAAW,GAAG,eAAe,CAAC;IACvD,MAAM,kBAAkB,GAAG,SAAS,GAAG,mBAAmB,GAAG,EAAE,GAAG,CAAC,CAAC;IACpE,MAAM,cAAc,GAAG,gBAAgB,GAAG,kBAAkB,CAAC;IAE7D,OAAO;QACL,WAAW,EAAE,gBAAgB;QAC7B,kBAAkB;QAClB,cAAc;KACf,CAAC;AACJ,CAAC"}
@@ -1,47 +0,0 @@
1
- /**
2
- * Self-contained 2026 federal tax data subset for the @markcolabs/mcp
3
- * package's paycheck engine.
4
- *
5
- * Mirrored from site/src/data/annual-limits.js. See engines/data/ssa.ts for the
6
- * full rationale on the mirror pattern (npm consumers cannot reach site/src/).
7
- *
8
- * Filing status keys mirror the paycheck engine's camelCase convention:
9
- * "single" | "married" | "marriedSeparate" | "headOfHousehold"
10
- *
11
- * Source of truth: IRS Rev. Proc. 2025-32 (2026 inflation adjustments).
12
- * Last verified: 2026-05-09.
13
- */
14
- import { SS_WAGE_BASE } from "./ssa.js";
15
- export type FilingStatus = "single" | "married" | "marriedSeparate" | "headOfHousehold";
16
- /** FICA statutory rates (unchanged since 1990 / ACA 2013). */
17
- export declare const FICA_RATES: {
18
- readonly socialSecurityRate: 0.062;
19
- readonly medicareRate: 0.0145;
20
- readonly additionalMedicareRate: 0.009;
21
- };
22
- /** Additional Medicare Tax 0.9% kicks in above these wage thresholds (filing-status keyed). */
23
- export declare const ADDITIONAL_MEDICARE_THRESHOLDS_2026: Record<FilingStatus, number>;
24
- /** 2026 standard deductions (IRS Rev. Proc. 2025-32). */
25
- export declare const STANDARD_DEDUCTIONS_2026: Record<FilingStatus, number>;
26
- /** Tax bracket entry. `max: null` indicates the top open-ended bracket. */
27
- export interface TaxBracket {
28
- min: number;
29
- max: number | null;
30
- rate: number;
31
- /** Cumulative tax at this bracket's floor (Percentage Method). */
32
- baseTax: number;
33
- }
34
- /**
35
- * 2026 federal tax brackets (IRS Rev. Proc. 2025-32; verified AL-2026-001 S134).
36
- * Filing-status keyed; values match site/src/data/annual-limits.js TAX_BRACKETS[2026].
37
- */
38
- export declare const FEDERAL_TAX_BRACKETS_2026: Record<FilingStatus, TaxBracket[]>;
39
- /** Pay periods per year. Matches site/src/utils/paycheck-tax-engine.js PAY_PERIODS. */
40
- export declare const PAY_PERIODS_PER_YEAR: Record<"weekly" | "biweekly" | "semimonthly" | "monthly" | "quarterly" | "annual", number>;
41
- export type PayFrequencyLabel = keyof typeof PAY_PERIODS_PER_YEAR;
42
- /** US states with no income tax (paycheck engine NO_TAX_STATES). */
43
- export declare const NO_TAX_STATES: readonly ["AK", "FL", "NV", "NH", "SD", "TN", "TX", "WA", "WY"];
44
- export type NoTaxStateCode = (typeof NO_TAX_STATES)[number];
45
- /** Re-export SS wage base for paycheck engine (FICA SS cap). */
46
- export { SS_WAGE_BASE };
47
- //# sourceMappingURL=federalTax.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"federalTax.d.ts","sourceRoot":"","sources":["../../../src/engines/data/federalTax.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAEH,OAAO,EAAE,YAAY,EAAE,MAAM,UAAU,CAAC;AAExC,MAAM,MAAM,YAAY,GAAG,QAAQ,GAAG,SAAS,GAAG,iBAAiB,GAAG,iBAAiB,CAAC;AAExF,8DAA8D;AAC9D,eAAO,MAAM,UAAU;;;;CAIb,CAAC;AAEX,+FAA+F;AAC/F,eAAO,MAAM,mCAAmC,EAAE,MAAM,CAAC,YAAY,EAAE,MAAM,CAK5E,CAAC;AAEF,yDAAyD;AACzD,eAAO,MAAM,wBAAwB,EAAE,MAAM,CAAC,YAAY,EAAE,MAAM,CAKjE,CAAC;AAEF,2EAA2E;AAC3E,MAAM,WAAW,UAAU;IACzB,GAAG,EAAE,MAAM,CAAC;IACZ,GAAG,EAAE,MAAM,GAAG,IAAI,CAAC;IACnB,IAAI,EAAE,MAAM,CAAC;IACb,kEAAkE;IAClE,OAAO,EAAE,MAAM,CAAC;CACjB;AAgBD;;;GAGG;AACH,eAAO,MAAM,yBAAyB,EAAE,MAAM,CAAC,YAAY,EAAE,UAAU,EAAE,CAqCxE,CAAC;AAEF,uFAAuF;AACvF,eAAO,MAAM,oBAAoB,EAAE,MAAM,CACvC,QAAQ,GAAG,UAAU,GAAG,aAAa,GAAG,SAAS,GAAG,WAAW,GAAG,QAAQ,EAC1E,MAAM,CAQP,CAAC;AAEF,MAAM,MAAM,iBAAiB,GAAG,MAAM,OAAO,oBAAoB,CAAC;AAElE,oEAAoE;AACpE,eAAO,MAAM,aAAa,iEAUhB,CAAC;AAEX,MAAM,MAAM,cAAc,GAAG,CAAC,OAAO,aAAa,CAAC,CAAC,MAAM,CAAC,CAAC;AAE5D,gEAAgE;AAChE,OAAO,EAAE,YAAY,EAAE,CAAC"}