@invaro/opentax 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/LICENSE +190 -0
- package/dist/documents.d.ts +177 -0
- package/dist/documents.d.ts.map +1 -0
- package/dist/documents.js +246 -0
- package/dist/documents.js.map +1 -0
- package/dist/hosted-bundle.d.ts +8 -0
- package/dist/hosted-bundle.d.ts.map +1 -0
- package/dist/hosted-bundle.js +8 -0
- package/dist/hosted-bundle.js.map +1 -0
- package/dist/http.d.ts +15 -0
- package/dist/http.d.ts.map +1 -0
- package/dist/http.js +90 -0
- package/dist/http.js.map +1 -0
- package/dist/index.d.ts +9 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +13 -0
- package/dist/index.js.map +1 -0
- package/dist/schema.d.ts +60 -0
- package/dist/schema.d.ts.map +1 -0
- package/dist/schema.js +467 -0
- package/dist/schema.js.map +1 -0
- package/dist/server.d.ts +14 -0
- package/dist/server.d.ts.map +1 -0
- package/dist/server.js +509 -0
- package/dist/server.js.map +1 -0
- package/dist/state-return/ca.d.ts +3 -0
- package/dist/state-return/ca.d.ts.map +1 -0
- package/dist/state-return/ca.js +108 -0
- package/dist/state-return/ca.js.map +1 -0
- package/dist/state-return/il.d.ts +3 -0
- package/dist/state-return/il.d.ts.map +1 -0
- package/dist/state-return/il.js +64 -0
- package/dist/state-return/il.js.map +1 -0
- package/dist/state-return/index.d.ts +8 -0
- package/dist/state-return/index.d.ts.map +1 -0
- package/dist/state-return/index.js +38 -0
- package/dist/state-return/index.js.map +1 -0
- package/dist/state-return/money.d.ts +10 -0
- package/dist/state-return/money.d.ts.map +1 -0
- package/dist/state-return/money.js +18 -0
- package/dist/state-return/money.js.map +1 -0
- package/dist/state-return/ny.d.ts +3 -0
- package/dist/state-return/ny.d.ts.map +1 -0
- package/dist/state-return/ny.js +59 -0
- package/dist/state-return/ny.js.map +1 -0
- package/dist/state-return/shape.d.ts +80 -0
- package/dist/state-return/shape.d.ts.map +1 -0
- package/dist/state-return/shape.js +97 -0
- package/dist/state-return/shape.js.map +1 -0
- package/dist/state-return/types.d.ts +17 -0
- package/dist/state-return/types.d.ts.map +1 -0
- package/dist/state-return/types.js +6 -0
- package/dist/state-return/types.js.map +1 -0
- package/dist/state-return/va-worksheets.d.ts +70 -0
- package/dist/state-return/va-worksheets.d.ts.map +1 -0
- package/dist/state-return/va-worksheets.js +116 -0
- package/dist/state-return/va-worksheets.js.map +1 -0
- package/dist/state-return/va.d.ts +3 -0
- package/dist/state-return/va.d.ts.map +1 -0
- package/dist/state-return/va.js +130 -0
- package/dist/state-return/va.js.map +1 -0
- package/dist/state-return.d.ts +4 -0
- package/dist/state-return.d.ts.map +1 -0
- package/dist/state-return.js +3 -0
- package/dist/state-return.js.map +1 -0
- package/package.json +54 -0
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
/** 2025 California Form 540 line composer. */
|
|
2
|
+
import { c, rd, max0, fmtD } from "./money.js";
|
|
3
|
+
import { isJoint, isHohOrQss } from "./types.js";
|
|
4
|
+
const STD_DEDUCTION_SINGLE = 570600n; // $5,706
|
|
5
|
+
const STD_DEDUCTION_JOINT_HOH = 1141200n; // $11,412
|
|
6
|
+
const PERSONAL_EXEMPTION_CREDIT = 15300n; // $153 (also the 65+/blind add-on)
|
|
7
|
+
const DEPENDENT_EXEMPTION_CREDIT = 47500n; // $475
|
|
8
|
+
/** Schedule CA nonconformity adjustments the composer applies itself. */
|
|
9
|
+
function scheduleCaAdjustments(input, notes) {
|
|
10
|
+
const ssSub = rd(c(input.taxableSocialSecurity));
|
|
11
|
+
const uiSub = rd(c(input.unemploymentCompensation));
|
|
12
|
+
const hsaDistSub = rd(c(input.caHsaTaxableDistribution));
|
|
13
|
+
const educatorAdd = rd(c(input.caEducatorExpensesDeducted));
|
|
14
|
+
const hsaDedAdd = rd(c(input.caHsaDeduction));
|
|
15
|
+
const ab5WageAdd = rd(c(input.caAb5GrossIncomeAddition));
|
|
16
|
+
const ab5LossAdd = rd(c(input.caAb5NetLossAddition));
|
|
17
|
+
const deprAdd = rd(c(input.caDepreciationAddition));
|
|
18
|
+
if (ssSub > 0n)
|
|
19
|
+
notes.push(`CA subtraction: federally taxable social security ${fmtD(ssSub)} (Schedule CA line 6 col B)`);
|
|
20
|
+
if (uiSub > 0n)
|
|
21
|
+
notes.push(`CA subtraction: unemployment compensation ${fmtD(uiSub)} (Schedule CA line 7 col B)`);
|
|
22
|
+
if (hsaDistSub > 0n)
|
|
23
|
+
notes.push(`CA subtraction: federally taxed HSA distribution ${fmtD(hsaDistSub)} (no § 223 conformity)`);
|
|
24
|
+
if (educatorAdd > 0n)
|
|
25
|
+
notes.push(`CA addition: federal educator-expense deduction ${fmtD(educatorAdd)} added back (no § 62(a)(2)(D) conformity)`);
|
|
26
|
+
if (hsaDedAdd > 0n)
|
|
27
|
+
notes.push(`CA addition: federal HSA deduction ${fmtD(hsaDedAdd)} added back (no § 223 conformity)`);
|
|
28
|
+
if (ab5WageAdd > 0n)
|
|
29
|
+
notes.push(`CA wage addition ${fmtD(ab5WageAdd)}: business gross income reclassified as employee wages for California (AB 5)`);
|
|
30
|
+
if (ab5LossAdd > 0n)
|
|
31
|
+
notes.push(`CA business addition ${fmtD(ab5LossAdd)}: federal Schedule C net loss disallowed for California (AB 5 employee classification)`);
|
|
32
|
+
if (deprAdd > 0n)
|
|
33
|
+
notes.push(`CA addition ${fmtD(deprAdd)}: depreciation difference (California does not conform to § 168(k) bonus depreciation)`);
|
|
34
|
+
return {
|
|
35
|
+
adds: educatorAdd + hsaDedAdd + ab5WageAdd + ab5LossAdd + deprAdd,
|
|
36
|
+
subs: ssSub + uiSub + hsaDistSub,
|
|
37
|
+
};
|
|
38
|
+
}
|
|
39
|
+
export function composeCA(input, evalStateTax, notes) {
|
|
40
|
+
const joint = isJoint(input);
|
|
41
|
+
// 2025 Form 540: L75 = CalEITC, L76 = YCTC (printed order; FYTC is 77)
|
|
42
|
+
const l13 = rd(c(input.federalAGI));
|
|
43
|
+
const { adds, subs } = scheduleCaAdjustments(input, notes);
|
|
44
|
+
const l17 = rd(l13 + c(input.additions) + adds - c(input.subtractions) - subs);
|
|
45
|
+
const standard = joint || isHohOrQss(input) ? STD_DEDUCTION_JOINT_HOH : STD_DEDUCTION_SINGLE;
|
|
46
|
+
const itemized = rd(c(input.caItemizedDeductions));
|
|
47
|
+
const l18 = itemized > standard ? itemized : standard; // § 63(e) election: greater of standard or itemized
|
|
48
|
+
if (itemized > standard)
|
|
49
|
+
notes.push(`CA itemized deduction ${fmtD(itemized)} exceeds the standard deduction ${fmtD(standard)} — line 18 itemizes (Schedule CA Part II, agent-computed and disclosed)`);
|
|
50
|
+
const l19 = max0(l17 - l18);
|
|
51
|
+
const l31 = rd(evalStateTax("us.ca.income_tax", l19));
|
|
52
|
+
// CA gives a QSS filer the same TWO personal exemption credits as MFJ
|
|
53
|
+
// (Form 540 line 7 doubles for MFJ/QSS; reference-validated: QSS 2x153 +
|
|
54
|
+
// dependent 475 + senior 153 = 934 on ty25-ca-009).
|
|
55
|
+
const persons = joint || input.filingStatus === "qss" ? 2n : 1n;
|
|
56
|
+
const l32 = rd(persons * PERSONAL_EXEMPTION_CREDIT +
|
|
57
|
+
BigInt(input.dependents ?? 0) * DEPENDENT_EXEMPTION_CREDIT +
|
|
58
|
+
BigInt(input.ageOrBlindBoxes ?? 0) * PERSONAL_EXEMPTION_CREDIT);
|
|
59
|
+
const renters = rd(c(input.caRentersCredit));
|
|
60
|
+
// Form 540 line 48: line 31 minus exemption credits (line 32) minus the
|
|
61
|
+
// renter's credit (line 46) and other nonrefundable credits — floored at 0.
|
|
62
|
+
const l48 = max0(l31 - l32 - renters);
|
|
63
|
+
if (l31 < l32 + renters && l31 > 0n)
|
|
64
|
+
notes.push("CA exemption credits and/or renter's credit exceed tax — line 48 floors at $0 (both are nonrefundable)");
|
|
65
|
+
// Line 61 AMT: a passed caAmt wins; otherwise build Schedule P AMTI from the
|
|
66
|
+
// ISO preference + the taxes-in-itemized addback (standard deduction added
|
|
67
|
+
// back instead when not itemizing) and evaluate us.ca.amt.
|
|
68
|
+
let amt = rd(c(input.caAmt));
|
|
69
|
+
if (input.caAmt === undefined && (input.caIsoPreference !== undefined || input.caAmtTaxesAddback !== undefined)) {
|
|
70
|
+
const addback = itemized > standard ? rd(c(input.caAmtTaxesAddback)) : standard;
|
|
71
|
+
const amti = l19 + addback + rd(c(input.caIsoPreference));
|
|
72
|
+
// Schedule P line 25 compares TMT against the line 31 regular tax BEFORE
|
|
73
|
+
// exemption credits (reference-validated: TMT 25,484 − 12,038 = 13,446).
|
|
74
|
+
amt = rd(evalStateTax("us.ca.amt", l19, { caAmti: amti, caRegularTax: l31 }));
|
|
75
|
+
notes.push(`Schedule P: AMTI ${fmtD(amti)} = taxable income ${fmtD(l19)} + ${itemized > standard ? "itemized-taxes addback" : "standard-deduction addback"} ${fmtD(addback)} + ISO preference ${fmtD(rd(c(input.caIsoPreference)))}; AMT ${fmtD(amt)}`);
|
|
76
|
+
}
|
|
77
|
+
const bhst = rd(c(input.caBhst));
|
|
78
|
+
// Line 63: California 2.5% additional tax on early distributions
|
|
79
|
+
// (R&TC § 17085(c)(1), FTB 3805P) — computed from the federally penalized base.
|
|
80
|
+
const earlyBase = rd(c(input.caTaxableEarlyDistribution));
|
|
81
|
+
const l63 = rd((earlyBase * 25n) / 1000n);
|
|
82
|
+
if (l63 > 0n)
|
|
83
|
+
notes.push(`CA line 63: 2.5% early-distribution additional tax ${fmtD(l63)} on ${fmtD(earlyBase)} (R&TC § 17085(c)(1))`);
|
|
84
|
+
const l64 = l48 + amt + bhst + l63; // line 64: add line 48, line 61, line 62, and line 63
|
|
85
|
+
const l71 = c(input.stateWithholding);
|
|
86
|
+
// Form 540 line 72 = "2025 CA estimated tax and other payments" — extension
|
|
87
|
+
// (FTB 3519) payments and prior-year credited overpayments fold in here.
|
|
88
|
+
const l72 = c(input.estimatedPayments) + rd(c(input.extensionPayment)) + rd(c(input.priorYearOverpaymentCredited));
|
|
89
|
+
const l75 = rd(c(input.caCalEITC));
|
|
90
|
+
const l76 = rd(c(input.caYCTC));
|
|
91
|
+
const l78 = l71 + l72 + l75 + l76 + rd(c(input.refundableCredits));
|
|
92
|
+
const due = l64 + c(input.useTax);
|
|
93
|
+
const l97 = max0(l78 - due);
|
|
94
|
+
const l111 = max0(due - l78);
|
|
95
|
+
return {
|
|
96
|
+
"13_federal_agi": fmtD(l13), "17_ca_agi": fmtD(l17), "18_ca_deduction": fmtD(l18),
|
|
97
|
+
"19_ca_taxable_income": fmtD(l19), "31_tax": fmtD(l31), "32_exemption_credits": fmtD(l32),
|
|
98
|
+
"46_renters_credit": fmtD(renters),
|
|
99
|
+
"48_tax_after_credits": fmtD(l48),
|
|
100
|
+
...(amt !== 0n ? { "61_amt": fmtD(amt) } : {}),
|
|
101
|
+
...(bhst !== 0n ? { "62_bhst": fmtD(bhst) } : {}),
|
|
102
|
+
...(l63 !== 0n ? { "63_other_taxes": fmtD(l63) } : {}),
|
|
103
|
+
"64_total_tax": fmtD(l64), "71_ca_withholding": fmtD(l71), "72_estimated_payments": fmtD(l72),
|
|
104
|
+
"75_caleitc": fmtD(l75), "76_yctc": fmtD(l76), "78_total_payments": fmtD(l78),
|
|
105
|
+
"97_overpaid": fmtD(l97), "111_amount_owed": fmtD(l111), "115_refund": fmtD(l97),
|
|
106
|
+
};
|
|
107
|
+
}
|
|
108
|
+
//# sourceMappingURL=ca.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ca.js","sourceRoot":"","sources":["../../src/state-return/ca.ts"],"names":[],"mappings":"AAAA,8CAA8C;AAC9C,OAAO,EAAE,CAAC,EAAE,EAAE,EAAE,IAAI,EAAE,IAAI,EAAc,MAAM,YAAY,CAAC;AAC3D,OAAO,EAAE,OAAO,EAAE,UAAU,EAAiD,MAAM,YAAY,CAAC;AAEhG,MAAM,oBAAoB,GAAG,OAAO,CAAC,CAAC,SAAS;AAC/C,MAAM,uBAAuB,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],"names":[],"mappings":"AAEA,OAAO,EAAW,KAAK,gBAAgB,EAAE,KAAK,iBAAiB,EAAE,MAAM,YAAY,CAAC;AAKpF,wBAAgB,SAAS,CACvB,KAAK,EAAE,gBAAgB,EACvB,YAAY,EAAE,iBAAiB,EAC/B,KAAK,EAAE,MAAM,EAAE,GACd,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAoCxB"}
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
/** 2025 Form IL-1040 line composer (line numbers per the printed form). */
|
|
2
|
+
import { c, rd, max0, fmtD } from "./money.js";
|
|
3
|
+
import { isJoint } from "./types.js";
|
|
4
|
+
const EXEMPTION = 285000n; // $2,850 per exemption (2025)
|
|
5
|
+
const AGE_BLIND_BOX = 100000n; // $1,000 per 65+/blind box
|
|
6
|
+
export function composeIL(input, evalStateTax, notes) {
|
|
7
|
+
const fagi = c(input.federalAGI);
|
|
8
|
+
const fedEITC = c(input.federalEITC);
|
|
9
|
+
const wh = c(input.stateWithholding);
|
|
10
|
+
const est = c(input.estimatedPayments);
|
|
11
|
+
const l1 = rd(fagi);
|
|
12
|
+
const l4 = rd(l1 + c(input.additions));
|
|
13
|
+
const l9 = max0(rd(l4 - c(input.subtractions))); // "may not be less than zero"
|
|
14
|
+
const nExemptions = input.exemptions ?? 1;
|
|
15
|
+
let l10 = rd(BigInt(nExemptions) * EXEMPTION + BigInt(input.ageOrBlindBoxes ?? 0) * AGE_BLIND_BOX);
|
|
16
|
+
// IL-1040 line 10: a taxpayer someone else can claim as a dependent gets NO
|
|
17
|
+
// exemption allowance when base income exceeds the exemption amount.
|
|
18
|
+
if (input.claimedAsDependent === true && l9 > EXEMPTION) {
|
|
19
|
+
l10 = 0n;
|
|
20
|
+
notes.push("IL exemption allowance $0: taxpayer is claimable as a dependent on another return and base income exceeds $2,850");
|
|
21
|
+
}
|
|
22
|
+
const l11 = max0(l9 - l10); // "may not be less than zero"
|
|
23
|
+
const l12 = rd(evalStateTax("us.il.income_tax", l11));
|
|
24
|
+
const l14 = l12;
|
|
25
|
+
const l18 = ilNonrefundableCredits(input, l14, notes);
|
|
26
|
+
const l21 = rd(c(input.useTax));
|
|
27
|
+
const l23 = l14 - l18 + l21;
|
|
28
|
+
const l29 = input.ilEitcOverride !== undefined ? rd(c(input.ilEitcOverride)) : rd((fedEITC * 20n) / 100n);
|
|
29
|
+
const l30 = input.ilChildUnder12 ? rd((l29 * 40n) / 100n) : 0n;
|
|
30
|
+
if (!input.ilChildUnder12 && l29 > 0n)
|
|
31
|
+
notes.push("IL CTC $0: no dependent child under 12 indicated");
|
|
32
|
+
const l31 = wh + est + l29 + l30;
|
|
33
|
+
const l32 = max0(l31 - l23);
|
|
34
|
+
const l41 = max0(l23 - l31);
|
|
35
|
+
return {
|
|
36
|
+
"1_federal_agi": fmtD(l1), "4_total_income": fmtD(l4), "9_base_income": fmtD(l9),
|
|
37
|
+
"10_exemption_allowance": fmtD(l10), "11_net_income": fmtD(l11), "12_tax": fmtD(l12),
|
|
38
|
+
"14_income_tax": fmtD(l14), "18_nonrefundable_credits": fmtD(l18),
|
|
39
|
+
"21_use_tax": fmtD(l21), "23_total_tax": fmtD(l23),
|
|
40
|
+
"29_il_eitc": fmtD(l29), "30_il_ctc": fmtD(l30), "31_payments_refundable": fmtD(l31),
|
|
41
|
+
"32_overpayment": fmtD(l32), "38_refund": fmtD(l32), "41_amount_owed": fmtD(l41),
|
|
42
|
+
};
|
|
43
|
+
}
|
|
44
|
+
/** Schedule ICR (property tax + K-12) + 1299-C educator credit, capped at tax due. */
|
|
45
|
+
function ilNonrefundableCredits(input, taxDue, notes) {
|
|
46
|
+
const propertyTax = rd((c(input.ilPropertyTaxPaid) * 5n) / 100n);
|
|
47
|
+
const k12 = (() => {
|
|
48
|
+
const over = max0(c(input.ilK12Expenses) - 25000n);
|
|
49
|
+
const credit = rd((over * 25n) / 100n);
|
|
50
|
+
return credit > 75000n ? 75000n : credit;
|
|
51
|
+
})();
|
|
52
|
+
const teacher = (() => {
|
|
53
|
+
const t = rd(c(input.ilTeacherExpenses));
|
|
54
|
+
// 1299-C cap: $500, or $1,000 MFJ when both spouses are educators
|
|
55
|
+
const cap = isJoint(input) ? 100000n : 50000n;
|
|
56
|
+
return t > cap ? cap : t;
|
|
57
|
+
})();
|
|
58
|
+
const available = propertyTax + k12 + teacher + rd(c(input.nonrefundableCredits));
|
|
59
|
+
const allowed = available > taxDue ? taxDue : available;
|
|
60
|
+
if (available > allowed)
|
|
61
|
+
notes.push(`IL credits available ${fmtD(available)} capped at tax due — line 18 reports the ALLOWED amount`);
|
|
62
|
+
return allowed;
|
|
63
|
+
}
|
|
64
|
+
//# sourceMappingURL=il.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"il.js","sourceRoot":"","sources":["../../src/state-return/il.ts"],"names":[],"mappings":"AAAA,2EAA2E;AAC3E,OAAO,EAAE,CAAC,EAAE,EAAE,EAAE,IAAI,EAAE,IAAI,EAAc,MAAM,YAAY,CAAC;AAC3D,OAAO,EAAE,OAAO,EAAiD,MAAM,YAAY,CAAC;AAEpF,MAAM,SAAS,GAAG,OAAO,CAAC,CAAC,8BAA8B;AACzD,MAAM,aAAa,GAAG,OAAO,CAAC,CAAC,2BAA2B;AAE1D,MAAM,UAAU,SAAS,CACvB,KAAuB,EACvB,YAA+B,EAC/B,KAAe;IAEf,MAAM,IAAI,GAAG,CAAC,CAAC,KAAK,CAAC,UAAU,CAAC,CAAC;IACjC,MAAM,OAAO,GAAG,CAAC,CAAC,KAAK,CAAC,WAAW,CAAC,CAAC;IACrC,MAAM,EAAE,GAAG,CAAC,CAAC,KAAK,CAAC,gBAAgB,CAAC,CAAC;IACrC,MAAM,GAAG,GAAG,CAAC,CAAC,KAAK,CAAC,iBAAiB,CAAC,CAAC;IACvC,MAAM,EAAE,GAAG,EAAE,CAAC,IAAI,CAAC,CAAC;IACpB,MAAM,EAAE,GAAG,EAAE,CAAC,EAAE,GAAG,CAAC,CAAC,KAAK,CA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 @@
|
|
|
1
|
+
import type { StateReturnInput, StateTaxEvaluator } from "./types.js";
|
|
2
|
+
export { stateReturnShape } from "./shape.js";
|
|
3
|
+
export type { StateReturnInput, StateTaxEvaluator } from "./types.js";
|
|
4
|
+
export declare function composeStateReturn(input: StateReturnInput, evalStateTax: StateTaxEvaluator): {
|
|
5
|
+
lines: Record<string, string>;
|
|
6
|
+
notes: string[];
|
|
7
|
+
};
|
|
8
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/state-return/index.ts"],"names":[],"mappings":"AAkBA,OAAO,KAAK,EAAE,gBAAgB,EAAE,iBAAiB,EAAE,MAAM,YAAY,CAAC;AAEtE,OAAO,EAAE,gBAAgB,EAAE,MAAM,YAAY,CAAC;AAC9C,YAAY,EAAE,gBAAgB,EAAE,iBAAiB,EAAE,MAAM,YAAY,CAAC;AAEtE,wBAAgB,kBAAkB,CAChC,KAAK,EAAE,gBAAgB,EACvB,YAAY,EAAE,iBAAiB,GAC9B;IAAE,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAAC,KAAK,EAAE,MAAM,EAAE,CAAA;CAAE,CAcpD"}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* compute_state_return — deterministic printed-form line composers for the
|
|
3
|
+
* state jurisdictions in the corpus (IL-1040, VA 760, CA 540, NY IT-201).
|
|
4
|
+
*
|
|
5
|
+
* Round-12 finding: agents' state tax ARITHMETIC is oracle-exact, but they
|
|
6
|
+
* transpose printed-form line numbers and drift on whole-dollar rounding when
|
|
7
|
+
* composing by hand. This module fixes the composition layer the same way
|
|
8
|
+
* compute_return fixed it federally: line numbers come from the printed 2025
|
|
9
|
+
* forms, every line is whole-dollar rounded, and every computed component is
|
|
10
|
+
* an oracle target. State-specific FACTS (additions, subtractions, credits
|
|
11
|
+
* without targets, withholding splits) are agent-transcribed inputs — the
|
|
12
|
+
* composer never invents them; worksheets the printed forms prescribe
|
|
13
|
+
* (VA Schedule A / STA / age deduction, CA Schedule P) are computed here.
|
|
14
|
+
*/
|
|
15
|
+
import { composeCA } from "./ca.js";
|
|
16
|
+
import { composeIL } from "./il.js";
|
|
17
|
+
import { composeNY } from "./ny.js";
|
|
18
|
+
import { composeVA } from "./va.js";
|
|
19
|
+
export { stateReturnShape } from "./shape.js";
|
|
20
|
+
export function composeStateReturn(input, evalStateTax) {
|
|
21
|
+
const notes = [];
|
|
22
|
+
// filingStatus (when provided) is authoritative — derive the legacy flags
|
|
23
|
+
const fs = input.filingStatus;
|
|
24
|
+
if (fs) {
|
|
25
|
+
input.filingJoint = fs === "mfj";
|
|
26
|
+
input.filingHoh = fs === "hoh";
|
|
27
|
+
input.filingHohOrQss = fs === "hoh" || fs === "qss" || fs === "mfj";
|
|
28
|
+
}
|
|
29
|
+
const j = input.jurisdiction;
|
|
30
|
+
if (j === "il")
|
|
31
|
+
return { lines: composeIL(input, evalStateTax, notes), notes };
|
|
32
|
+
if (j === "va")
|
|
33
|
+
return { lines: composeVA(input, evalStateTax, notes), notes };
|
|
34
|
+
if (j === "ca")
|
|
35
|
+
return { lines: composeCA(input, evalStateTax, notes), notes };
|
|
36
|
+
return { lines: composeNY(input, evalStateTax, notes), notes };
|
|
37
|
+
}
|
|
38
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/state-return/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AACH,OAAO,EAAE,SAAS,EAAE,MAAM,SAAS,CAAC;AACpC,OAAO,EAAE,SAAS,EAAE,MAAM,SAAS,CAAC;AACpC,OAAO,EAAE,SAAS,EAAE,MAAM,SAAS,CAAC;AACpC,OAAO,EAAE,SAAS,EAAE,MAAM,SAAS,CAAC;AAGpC,OAAO,EAAE,gBAAgB,EAAE,MAAM,YAAY,CAAC;AAG9C,MAAM,UAAU,kBAAkB,CAChC,KAAuB,EACvB,YAA+B;IAE/B,MAAM,KAAK,GAAa,EAAE,CAAC;IAC3B,0EAA0E;IAC1E,MAAM,EAAE,GAAI,KAAmC,CAAC,YAAY,CAAC;IAC7D,IAAI,EAAE,EAAE,CAAC;QACN,KAAiC,CAAC,WAAW,GAAG,EAAE,KAAK,KAAK,CAAC;QAC7D,KAAiC,CAAC,SAAS,GAAG,EAAE,KAAK,KAAK,CAAC;QAC3D,KAAiC,CAAC,cAAc,GAAG,EAAE,KAAK,KAAK,IAAI,EAAE,KAAK,KAAK,IAAI,EAAE,KAAK,KAAK,CAAC;IACnG,CAAC;IACD,MAAM,CAAC,GAAG,KAAK,CAAC,YAAY,CAAC;IAC7B,IAAI,CAAC,KAAK,IAAI;QAAE,OAAO,EAAE,KAAK,EAAE,SAAS,CAAC,KAAK,EAAE,YAAY,EAAE,KAAK,CAAC,EAAE,KAAK,EAAE,CAAC;IAC/E,IAAI,CAAC,KAAK,IAAI;QAAE,OAAO,EAAE,KAAK,EAAE,SAAS,CAAC,KAAK,EAAE,YAAY,EAAE,KAAK,CAAC,EAAE,KAAK,EAAE,CAAC;IAC/E,IAAI,CAAC,KAAK,IAAI;QAAE,OAAO,EAAE,KAAK,EAAE,SAAS,CAAC,KAAK,EAAE,YAAY,EAAE,KAAK,CAAC,EAAE,KAAK,EAAE,CAAC;IAC/E,OAAO,EAAE,KAAK,EAAE,SAAS,CAAC,KAAK,EAAE,YAAY,EAAE,KAAK,CAAC,EAAE,KAAK,EAAE,CAAC;AACjE,CAAC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/** Whole-dollar money helpers shared by the state composers. */
|
|
2
|
+
export type Cents = bigint;
|
|
3
|
+
/** dollars (agent JSON number) → cents */
|
|
4
|
+
export declare const c: (d: unknown) => Cents;
|
|
5
|
+
/** whole-dollar, half-up, sign-aware */
|
|
6
|
+
export declare const rd: (x: Cents) => Cents;
|
|
7
|
+
export declare const max0: (x: Cents) => Cents;
|
|
8
|
+
export declare const min2: (a: Cents, b: Cents) => Cents;
|
|
9
|
+
export declare const fmtD: (x: Cents) => string;
|
|
10
|
+
//# sourceMappingURL=money.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"money.d.ts","sourceRoot":"","sources":["../../src/state-return/money.ts"],"names":[],"mappings":"AAAA,gEAAgE;AAEhE,MAAM,MAAM,KAAK,GAAG,MAAM,CAAC;AAE3B,0CAA0C;AAC1C,eAAO,MAAM,CAAC,GAAI,GAAG,OAAO,KAAG,KAAuD,CAAC;AAEvF,wCAAwC;AACxC,eAAO,MAAM,EAAE,GAAI,GAAG,KAAK,KAAG,KAK7B,CAAC;AAEF,eAAO,MAAM,IAAI,GAAI,GAAG,KAAK,KAAG,KAA0B,CAAC;AAE3D,eAAO,MAAM,IAAI,GAAI,GAAG,KAAK,EAAE,GAAG,KAAK,KAAG,KAAwB,CAAC;AAEnE,eAAO,MAAM,IAAI,GAAI,GAAG,KAAK,KAAG,MAI/B,CAAC"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/** Whole-dollar money helpers shared by the state composers. */
|
|
2
|
+
/** dollars (agent JSON number) → cents */
|
|
3
|
+
export const c = (d) => BigInt(Math.round((d ?? 0) * 100));
|
|
4
|
+
/** whole-dollar, half-up, sign-aware */
|
|
5
|
+
export const rd = (x) => {
|
|
6
|
+
const neg = x < 0n;
|
|
7
|
+
const a = neg ? -x : x;
|
|
8
|
+
const r = ((a + 50n) / 100n) * 100n;
|
|
9
|
+
return neg ? -r : r;
|
|
10
|
+
};
|
|
11
|
+
export const max0 = (x) => (x > 0n ? x : 0n);
|
|
12
|
+
export const min2 = (a, b) => (a < b ? a : b);
|
|
13
|
+
export const fmtD = (x) => {
|
|
14
|
+
const neg = x < 0n;
|
|
15
|
+
const a = neg ? -x : x;
|
|
16
|
+
return `${neg ? "-" : ""}$${(a / 100n).toLocaleString()}`;
|
|
17
|
+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AAC,CAAC,CAAC,CAAC;IACvB,OAAO,GAAG,GAAG,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,IAAI,CAAC,CAAC,GAAG,IAAI,CAAC,CAAC,cAAc,EAAE,EAAE,CAAC;AAC5D,CAAC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ny.d.ts","sourceRoot":"","sources":["../../src/state-return/ny.ts"],"names":[],"mappings":"AAEA,OAAO,EAAkB,KAAK,gBAAgB,EAAE,KAAK,iBAAiB,EAAE,MAAM,YAAY,CAAC;AAO3F,wBAAgB,SAAS,CACvB,KAAK,EAAE,gBAAgB,EACvB,YAAY,EAAE,iBAAiB,EAC/B,KAAK,EAAE,MAAM,EAAE,GACd,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAgDxB"}
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
/** 2025 New York IT-201 line composer. */
|
|
2
|
+
import { c, rd, max0, fmtD } from "./money.js";
|
|
3
|
+
import { isJoint, isHoh } from "./types.js";
|
|
4
|
+
const STD_DEDUCTION_JOINT = 1605000n; // $16,050
|
|
5
|
+
const STD_DEDUCTION_HOH = 1120000n; // $11,200
|
|
6
|
+
const STD_DEDUCTION_SINGLE = 800000n; // $8,000
|
|
7
|
+
const DEPENDENT_EXEMPTION = 100000n; // $1,000 (line 36)
|
|
8
|
+
export function composeNY(input, evalStateTax, notes) {
|
|
9
|
+
// IT-201 (2025 printed order): 72 = NYS withholding ONLY (W-2 box 17), 73 =
|
|
10
|
+
// NYC, 74 = Yonkers, 75 = estimated tax payments AND IT-370 extension amount
|
|
11
|
+
// (one combined line); refundable credits sit in the 63-71 block → line 76.
|
|
12
|
+
const l1 = rd(c(input.wages));
|
|
13
|
+
const l19 = rd(c(input.federalAGI));
|
|
14
|
+
const l24 = rd(l19 + c(input.additions));
|
|
15
|
+
// Line 27: taxable social security is ALWAYS subtracted — applied
|
|
16
|
+
// automatically from taxableSocialSecurity.
|
|
17
|
+
const ssSub = rd(c(input.taxableSocialSecurity));
|
|
18
|
+
if (ssSub > 0n)
|
|
19
|
+
notes.push(`NY subtraction: federally taxable social security ${fmtD(ssSub)} (IT-201 line 27)`);
|
|
20
|
+
const l32 = rd(c(input.subtractions)) + ssSub;
|
|
21
|
+
const l33 = l24 - l32;
|
|
22
|
+
const l34 = isJoint(input) ? STD_DEDUCTION_JOINT : isHoh(input) ? STD_DEDUCTION_HOH : STD_DEDUCTION_SINGLE;
|
|
23
|
+
const l37 = max0(l33 - l34 - BigInt(input.dependents ?? 0) * DEPENDENT_EXEMPTION);
|
|
24
|
+
// NYS/NYC tax via the RAW rate schedule at the exact income (useFormulaMethod):
|
|
25
|
+
// the printed $50-bracket table can differ by $1; reference implementations
|
|
26
|
+
// (including the TaxCalcBench references) evaluate the schedule directly.
|
|
27
|
+
const l39 = rd(evalStateTax("us.ny.income_tax", l37, { useFormulaMethod: true }));
|
|
28
|
+
const l43 = rd(c(input.nyHouseholdCredit)); // claimed in full on 43 per the reference convention
|
|
29
|
+
const l44 = max0(l39 - l43);
|
|
30
|
+
let nycNet = 0n;
|
|
31
|
+
if (input.nycTaxableIncome !== undefined && c(input.nycTaxableIncome) > 0n) {
|
|
32
|
+
const nycTax = rd(evalStateTax("us.ny.nyc_income_tax", rd(c(input.nycTaxableIncome)), { useFormulaMethod: true }));
|
|
33
|
+
nycNet = max0(nycTax - rd(c(input.nycHouseholdCredit)));
|
|
34
|
+
}
|
|
35
|
+
// Line 55: Yonkers resident income tax surcharge (us.ny.yonkers_surcharge,
|
|
36
|
+
// 16.75% of the netted worksheet base) — NOT line 54 (MCTMT, out of scope).
|
|
37
|
+
const yonkers = rd(c(input.yonkersSurcharge));
|
|
38
|
+
const l62 = l44 + nycNet + yonkers + c(input.useTax);
|
|
39
|
+
const l72 = c(input.stateWithholding);
|
|
40
|
+
const l73 = c(input.cityWithholding);
|
|
41
|
+
const l74 = c(input.yonkersWithholding);
|
|
42
|
+
const l75 = c(input.estimatedPayments) + rd(c(input.extensionPayment));
|
|
43
|
+
const l76 = l72 + l73 + l74 + l75 + rd(c(input.refundableCredits));
|
|
44
|
+
const l77 = max0(l76 - l62);
|
|
45
|
+
const owed = max0(l62 - l76);
|
|
46
|
+
if (owed > 0n)
|
|
47
|
+
notes.push(`balance due ${fmtD(owed)} (IT-201 line 80)`);
|
|
48
|
+
return {
|
|
49
|
+
"1_wages": fmtD(l1), "19_federal_agi": fmtD(l19), "24_fagi_plus_additions": fmtD(l24),
|
|
50
|
+
"32_subtractions": fmtD(l32), "33_ny_agi": fmtD(l33), "34_deduction": fmtD(l34),
|
|
51
|
+
"37_taxable_income": fmtD(l37), "39_nys_tax": fmtD(l39), "43_nonrefundable_credits": fmtD(l43),
|
|
52
|
+
"44_nys_tax_after_credits": fmtD(l44),
|
|
53
|
+
...(yonkers !== 0n ? { "55_yonkers_surcharge": fmtD(yonkers) } : {}),
|
|
54
|
+
"62_total_tax": fmtD(l62), "72_nys_withholding": fmtD(l72),
|
|
55
|
+
"73_nyc_withholding": fmtD(l73), "74_yonkers_withholding": fmtD(l74), "75_estimated_payments": fmtD(l75),
|
|
56
|
+
"76_total_payments": fmtD(l76), "77_overpaid": fmtD(l77), "78_refund": fmtD(l77),
|
|
57
|
+
};
|
|
58
|
+
}
|
|
59
|
+
//# sourceMappingURL=ny.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ny.js","sourceRoot":"","sources":["../../src/state-return/ny.ts"],"names":[],"mappings":"AAAA,0CAA0C;AAC1C,OAAO,EAAE,CAAC,EAAE,EAAE,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,YAAY,CAAC;AAC/C,OAAO,EAAE,OAAO,EAAE,KAAK,EAAiD,MAAM,YAAY,CAAC;AAE3F,MAAM,mBAAmB,GAAG,QAAQ,CAAC,CAAC,UAAU;AAChD,MAAM,iBAAiB,GAAG,QAAQ,CAAC,CAAC,UAAU;AAC9C,MAAM,oBAAoB,GAAG,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AI,CAAC,GAAG,CAAC,EAAE,aAAa,EAAE,IAAI,CAAC,GAAG,CAAC,EAAE,WAAW,EAAE,IAAI,CAAC,GAAG,CAAC;KACjF,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* compute_state_return input shape — grouped by scope: shared inputs first,
|
|
3
|
+
* then one block per state. Every field is agent-transcribed FACT or an
|
|
4
|
+
* oracle-target answer; the composers never invent amounts.
|
|
5
|
+
*/
|
|
6
|
+
import { z } from "zod";
|
|
7
|
+
export declare const stateReturnShape: {
|
|
8
|
+
nyHouseholdCredit: z.ZodOptional<z.ZodNumber>;
|
|
9
|
+
nycTaxableIncome: z.ZodOptional<z.ZodNumber>;
|
|
10
|
+
nycHouseholdCredit: z.ZodOptional<z.ZodNumber>;
|
|
11
|
+
yonkersSurcharge: z.ZodOptional<z.ZodNumber>;
|
|
12
|
+
caCalEITC: z.ZodOptional<z.ZodNumber>;
|
|
13
|
+
caYCTC: z.ZodOptional<z.ZodNumber>;
|
|
14
|
+
caItemizedDeductions: z.ZodOptional<z.ZodNumber>;
|
|
15
|
+
caRentersCredit: z.ZodOptional<z.ZodNumber>;
|
|
16
|
+
caAmt: z.ZodOptional<z.ZodNumber>;
|
|
17
|
+
caBhst: z.ZodOptional<z.ZodNumber>;
|
|
18
|
+
caEducatorExpensesDeducted: z.ZodOptional<z.ZodNumber>;
|
|
19
|
+
caHsaDeduction: z.ZodOptional<z.ZodNumber>;
|
|
20
|
+
caHsaTaxableDistribution: z.ZodOptional<z.ZodNumber>;
|
|
21
|
+
caAb5GrossIncomeAddition: z.ZodOptional<z.ZodNumber>;
|
|
22
|
+
caAb5NetLossAddition: z.ZodOptional<z.ZodNumber>;
|
|
23
|
+
caDepreciationAddition: z.ZodOptional<z.ZodNumber>;
|
|
24
|
+
caTaxableEarlyDistribution: z.ZodOptional<z.ZodNumber>;
|
|
25
|
+
caIsoPreference: z.ZodOptional<z.ZodNumber>;
|
|
26
|
+
caAmtTaxesAddback: z.ZodOptional<z.ZodNumber>;
|
|
27
|
+
vaAgeDeduction: z.ZodOptional<z.ZodNumber>;
|
|
28
|
+
vaAgeQualifyingFull: z.ZodOptional<z.ZodNumber>;
|
|
29
|
+
vaAgeQualifyingTested: z.ZodOptional<z.ZodNumber>;
|
|
30
|
+
vaRefundableEitc: z.ZodOptional<z.ZodNumber>;
|
|
31
|
+
vaSpouseTaxAdjustment: z.ZodOptional<z.ZodNumber>;
|
|
32
|
+
vaYourVagi: z.ZodOptional<z.ZodNumber>;
|
|
33
|
+
vaSpouseVagi: z.ZodOptional<z.ZodNumber>;
|
|
34
|
+
vaYourAgeBlindBoxes: z.ZodOptional<z.ZodNumber>;
|
|
35
|
+
vaSpouseAgeBlindBoxes: z.ZodOptional<z.ZodNumber>;
|
|
36
|
+
vaFamilyVagi: z.ZodOptional<z.ZodNumber>;
|
|
37
|
+
vaItemizing: z.ZodOptional<z.ZodBoolean>;
|
|
38
|
+
vaItemizedMedical: z.ZodOptional<z.ZodNumber>;
|
|
39
|
+
vaItemizedStateLocalIncomeTaxes: z.ZodOptional<z.ZodNumber>;
|
|
40
|
+
vaItemizedSalesTaxes: z.ZodOptional<z.ZodNumber>;
|
|
41
|
+
vaItemizedRealEstateTaxes: z.ZodOptional<z.ZodNumber>;
|
|
42
|
+
vaItemizedPersonalPropertyTaxes: z.ZodOptional<z.ZodNumber>;
|
|
43
|
+
vaItemizedOtherTaxes: z.ZodOptional<z.ZodNumber>;
|
|
44
|
+
vaItemizedMortgageInterest: z.ZodOptional<z.ZodNumber>;
|
|
45
|
+
vaItemizedInvestmentInterest: z.ZodOptional<z.ZodNumber>;
|
|
46
|
+
vaItemizedCharitable: z.ZodOptional<z.ZodNumber>;
|
|
47
|
+
vaItemizedCasualty: z.ZodOptional<z.ZodNumber>;
|
|
48
|
+
vaItemizedGambling: z.ZodOptional<z.ZodNumber>;
|
|
49
|
+
vaItemizedOther: z.ZodOptional<z.ZodNumber>;
|
|
50
|
+
vaScheduleAdjDeductions: z.ZodOptional<z.ZodNumber>;
|
|
51
|
+
ilPropertyTaxPaid: z.ZodOptional<z.ZodNumber>;
|
|
52
|
+
ilK12Expenses: z.ZodOptional<z.ZodNumber>;
|
|
53
|
+
ilTeacherExpenses: z.ZodOptional<z.ZodNumber>;
|
|
54
|
+
ilChildUnder12: z.ZodOptional<z.ZodBoolean>;
|
|
55
|
+
ilEitcOverride: z.ZodOptional<z.ZodNumber>;
|
|
56
|
+
jurisdiction: z.ZodEnum<["il", "va", "ca", "ny"]>;
|
|
57
|
+
filingStatus: z.ZodOptional<z.ZodEnum<["single", "mfj", "mfs", "hoh", "qss"]>>;
|
|
58
|
+
federalAGI: z.ZodNumber;
|
|
59
|
+
federalEITC: z.ZodOptional<z.ZodNumber>;
|
|
60
|
+
wages: z.ZodOptional<z.ZodNumber>;
|
|
61
|
+
additions: z.ZodOptional<z.ZodNumber>;
|
|
62
|
+
subtractions: z.ZodOptional<z.ZodNumber>;
|
|
63
|
+
exemptions: z.ZodOptional<z.ZodNumber>;
|
|
64
|
+
ageOrBlindBoxes: z.ZodOptional<z.ZodNumber>;
|
|
65
|
+
dependents: z.ZodOptional<z.ZodNumber>;
|
|
66
|
+
stateWithholding: z.ZodOptional<z.ZodNumber>;
|
|
67
|
+
spouseStateWithholding: z.ZodOptional<z.ZodNumber>;
|
|
68
|
+
cityWithholding: z.ZodOptional<z.ZodNumber>;
|
|
69
|
+
yonkersWithholding: z.ZodOptional<z.ZodNumber>;
|
|
70
|
+
estimatedPayments: z.ZodOptional<z.ZodNumber>;
|
|
71
|
+
priorYearOverpaymentCredited: z.ZodOptional<z.ZodNumber>;
|
|
72
|
+
extensionPayment: z.ZodOptional<z.ZodNumber>;
|
|
73
|
+
taxableSocialSecurity: z.ZodOptional<z.ZodNumber>;
|
|
74
|
+
unemploymentCompensation: z.ZodOptional<z.ZodNumber>;
|
|
75
|
+
claimedAsDependent: z.ZodOptional<z.ZodBoolean>;
|
|
76
|
+
useTax: z.ZodOptional<z.ZodNumber>;
|
|
77
|
+
nonrefundableCredits: z.ZodOptional<z.ZodNumber>;
|
|
78
|
+
refundableCredits: z.ZodOptional<z.ZodNumber>;
|
|
79
|
+
};
|
|
80
|
+
//# sourceMappingURL=shape.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"shape.d.ts","sourceRoot":"","sources":["../../src/state-return/shape.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAmGxB,eAAO,MAAM,gBAAgB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAA4C,CAAC"}
|
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* compute_state_return input shape — grouped by scope: shared inputs first,
|
|
3
|
+
* then one block per state. Every field is agent-transcribed FACT or an
|
|
4
|
+
* oracle-target answer; the composers never invent amounts.
|
|
5
|
+
*/
|
|
6
|
+
import { z } from "zod";
|
|
7
|
+
const usd = z.number().finite();
|
|
8
|
+
const shared = {
|
|
9
|
+
jurisdiction: z.enum(["il", "va", "ca", "ny"]),
|
|
10
|
+
filingStatus: z.enum(["single", "mfj", "mfs", "hoh", "qss"]).optional().describe("REQUIRED in practice: the federal filing status — drives the state bracket schedule, standard deduction column, and exemption structure. The filingJoint/filingHoh/filingHohOrQss booleans are legacy aliases; when filingStatus is present it wins."),
|
|
11
|
+
// federal substrate values, computed by compute_return in the SAME session
|
|
12
|
+
// (pass them verbatim — whole dollars)
|
|
13
|
+
federalAGI: usd.describe("federal Form 1040 line 11 (from compute_return, verbatim)"),
|
|
14
|
+
federalEITC: usd.optional().describe("federal EIC, line 27a (from compute_return)"),
|
|
15
|
+
wages: usd.optional().describe("federal line 1a wages (NY IT-201 line 1)"),
|
|
16
|
+
additions: usd.optional().describe("total state additions to federal AGI (e.g. NY 414(h) A-104 + IRC-125 A-101; VA Schedule ADJ line 2 codes). GATE RULE: coded addition/subtraction line-item arrays sitting under a false 'do you have additions/subtractions' boolean are inactive template rows (especially $1-$4 placeholder amounts) — transcribe $0 for them and disclose; the gate controls for these arrays"),
|
|
17
|
+
subtractions: usd.optional().describe("total state subtractions OTHER than the automatic ones (taxable social security / unemployment have their own inputs below; e.g. NY S-136 alimony paid, IL retirement subtraction)"),
|
|
18
|
+
exemptions: z.number().int().optional().describe("personal + dependent exemption COUNT (self + spouse + dependents)"),
|
|
19
|
+
ageOrBlindBoxes: z.number().int().optional().describe("count of age-65+/blind boxes checked (taxpayer/spouse, per box)"),
|
|
20
|
+
dependents: z.number().int().optional().describe("dependent count (CA dependent exemption credits; NY $1,000 exemptions)"),
|
|
21
|
+
stateWithholding: usd.optional().describe("state income tax withheld (IL line 25 / VA 19a / CA 71 / NY 72). CONVENTIONS: IL line 25 sums state withholding from EVERY document (W-2s + all 1099s). NY line 72 = W-2 box 17 NYS withholding PLUS NY-coded state withholding from 1099s whose PAYER has an in-state (NY) address; NY-coded withholding printed by an OUT-OF-STATE-addressed payer is NOT included (reference-composition convention, validated across ty25-ny-003 — NY payers, included — and ty25-ny-008 — TX-addressed payer, excluded); disclose any excluded amount in notes. VA 19a = the PRIMARY taxpayer's withholding from EVERY document type (W-2, 1099, VK-1 — Form 760 line 19 instructions name all three; the payer's address does NOT matter for VA, unlike NY); a jointly-issued document's state withholding splits 50/50 between 19a/19b with the odd dollar to the primary."),
|
|
22
|
+
spouseStateWithholding: usd.optional().describe("VA line 19b spouse withholding (spouse's own W-2/1099/VK-1 boxes + spouse's half of jointly-issued documents' withholding, odd dollar to the primary)"),
|
|
23
|
+
cityWithholding: usd.optional().describe("NY line 73 NYC withholding"),
|
|
24
|
+
yonkersWithholding: usd.optional().describe("NY line 74 Yonkers withholding (W-2 box 19 with a Yonkers locality)"),
|
|
25
|
+
estimatedPayments: usd.optional().describe("state estimated payments ONLY (extension payments and prior-year credited overpayments have their own lines where the form provides them)"),
|
|
26
|
+
priorYearOverpaymentCredited: usd.optional().describe("prior-year state overpayment applied toward this year's estimated tax. VA 760 line 21 (its own printed line — never fold into line 20 estimated payments). Other states: folded into the estimated-payments line."),
|
|
27
|
+
extensionPayment: usd.optional().describe("payment made with an extension request. VA 760 line 22 (its own line, never folded into the estimated-payments line). NY IT-201 line 75 is the COMBINED line — 'estimated tax payments and amount paid with Form IT-370' — so for NY this is added into the same line as estimatedPayments, not kept separate."),
|
|
28
|
+
taxableSocialSecurity: usd.optional().describe("federally TAXABLE social security (Form 1040 line 6b, from compute_return). REQUIRED whenever nonzero: VA (760 line 5 subtraction), CA (Schedule CA line 6 col B), and NY (IT-201 line 27) all subtract it — the composer applies the subtraction automatically; do NOT also fold it into the generic subtractions total."),
|
|
29
|
+
unemploymentCompensation: usd.optional().describe("unemployment compensation included in federal AGI (Schedule 1 line 7). REQUIRED whenever nonzero: VA fully subtracts it (Va. Code § 58.1-322.02(9), Schedule ADJ) and CA excludes it (Schedule CA line 7 col B) — the composer subtracts automatically for those states; do NOT also fold it into the generic subtractions total. IL and NY tax it (no subtraction)."),
|
|
30
|
+
claimedAsDependent: z.boolean().optional().describe("someone else can claim this taxpayer as a dependent (carry the prior-year 1040 'Someone can claim: You as a dependent' checkbox forward as a continuing condition unless the current-year interview contradicts it). IL: zeroes the line 10 exemption allowance when base income exceeds the exemption amount. VA: limits the standard deduction to earned income."),
|
|
31
|
+
useTax: usd.optional().describe("consumer use / sales-use tax owed on the return"),
|
|
32
|
+
nonrefundableCredits: usd.optional().describe("state NONREFUNDABLE credits without an oracle target — capped at the state tax due by the composer (an excess never creates a refund). VA: do NOT put the low-income credit or any VA EITC election here — passing it forces a legacy capped path; instead pass federalEITC (+ vaFamilyVagi if testing the low-income credit) and the composer computes and SELECTS the Form 760 line 23 credit itself (TY2025 refundable VA EITC = 20% of federal EIC, uncapped — it dominates whenever federal EITC > 0). IL: pass ICR raw inputs instead where fields exist."),
|
|
33
|
+
refundableCredits: usd.optional().describe("state refundable credits, e.g. the NY credit block: ESCC + NYS EIC + IT-216 + NYC EIC + NYC school tax + NYC child care (WITHOUT their own oracle target, self-computed per the us.ny.parameters citation and disclosed) PLUS us.ny.it214 (the Real Property Tax Credit, which DOES have an oracle target as of TY2025 v5 — pass its computed answer here, not a hand-derived percentage of rent)"),
|
|
34
|
+
};
|
|
35
|
+
const il = {
|
|
36
|
+
ilPropertyTaxPaid: usd.optional().describe("IL property tax on principal residence, net of business-use portion"),
|
|
37
|
+
ilK12Expenses: usd.optional().describe("IL qualified K-12 education expenses (before the $250 floor)"),
|
|
38
|
+
ilTeacherExpenses: usd.optional().describe("IL Schedule 1299-C educator materials expenses"),
|
|
39
|
+
ilChildUnder12: z.boolean().optional().describe("IL CTC gate: a QUALIFYING CHILD (§ 152(c) lineage — child/stepchild/foster/sibling or their descendants) under age 12. A qualifying-relative/ODC-only dependent does NOT satisfy this even if under 12; leave false."),
|
|
40
|
+
ilEitcOverride: usd.optional().describe("us.il.eitc oracle target's answer (35 ILCS 5/212(a)(vi), (b-5), (b-10): 20% of the federal EITC recomputed WITHOUT the § 32(c)(1)(A)(ii) childless age gate) — WINS over the generic 20%-of-federalEITC line-29 computation when present. MUST be used (not merely optional) for a taxpayer age 18-24 or 65+ with NO qualifying children: federalEITC alone is correctly $0 for that population under federal law, so line 29 = 20% x federalEITC would wrongly zero out Illinois' decoupled credit — pass us.il.eitc's computed answer instead. Safe to pass for every IL EITC claimant (agrees with the generic computation outside the decoupled population)."),
|
|
41
|
+
};
|
|
42
|
+
const va = {
|
|
43
|
+
vaAgeDeduction: usd.optional().describe("OVERRIDE ONLY — pass vaAgeQualifyingFull/vaAgeQualifyingTested instead and the composer computes the age deduction itself (including the AFAGI social-security exclusion agents routinely miss). When splitting an odd joint total between spouses (Form 760 lines 4a/4b), the odd dollar goes to the SPOUSE."),
|
|
44
|
+
vaAgeQualifyingFull: z.number().int().optional().describe("count of filers (taxpayer/spouse) born ON OR BEFORE January 1, 1939 — each gets the UNCONDITIONAL $12,000 age deduction (no income test)"),
|
|
45
|
+
vaAgeQualifyingTested: z.number().int().optional().describe("count of filers born January 2, 1939 - January 1, 1961 (65+ for 2025 but income-tested): the composer computes $12,000 each, reduced dollar-for-dollar by AFAGI over $50,000 single / $75,000 married — where AFAGI = federal AGI MINUS the federally taxable social security (the SS exclusion is the step agents miss; Va. Code § 58.1-322.03(2))"),
|
|
46
|
+
vaRefundableEitc: usd.optional().describe("OVERRIDE ONLY — the composer now computes the Form 760 line 23 credit itself from federalEITC + the eligibility inputs below. If passed, this refundable amount wins over the computed selection."),
|
|
47
|
+
vaSpouseTaxAdjustment: usd.optional().describe("OVERRIDE ONLY — the composer now computes the VA Spouse Tax Adjustment worksheet itself when vaYourVagi/vaSpouseVagi are provided. If passed, this amount wins."),
|
|
48
|
+
vaYourVagi: usd.optional().describe("PRIMARY taxpayer's separate VAGI (MFJ only — the 760 instructions' 'Worksheet for Determining Separate Virginia Adjusted Gross Income': own wages/SE/pensions, own share of joint items 50/50, own age deduction and subtractions). Enables the composer's Spouse Tax Adjustment worksheet (Form 760 line 17). vaYourVagi + vaSpouseVagi must equal line 9 VAGI."),
|
|
49
|
+
vaSpouseVagi: usd.optional().describe("spouse's separate VAGI for the STA worksheet (Form 760 line 17 box; MFJ only)"),
|
|
50
|
+
vaYourAgeBlindBoxes: z.number().int().optional().describe("STA worksheet Part 1 line 2: PRIMARY taxpayer's 65+/blind box count (0-2) — per-spouse exemption = boxes x $800 + $930"),
|
|
51
|
+
vaSpouseAgeBlindBoxes: z.number().int().optional().describe("STA worksheet Part 1 line 2: spouse's 65+/blind box count (0-2)"),
|
|
52
|
+
vaFamilyVagi: usd.optional().describe("Schedule ADJ line 10 total family VAGI (you + spouse + dependents' VAGI) for the Credit for Low-Income Individuals poverty test; defaults to line 9 VAGI when omitted"),
|
|
53
|
+
// VA Schedule A (itemized) — pass the FEDERAL Schedule A component amounts;
|
|
54
|
+
// the composer applies the Virginia exceptions (10% medical floor, sales-tax
|
|
55
|
+
// cap, no SALT cap on property taxes, the Virginia Pease limitation) itself.
|
|
56
|
+
vaItemizing: z.boolean().optional().describe("taxpayer itemized federally (VA requires the same election, Va. Code § 58.1-322.03(1)) — enables the VA Schedule A computation from the component inputs below; Form 760 line 10 replaces the line 11 standard deduction"),
|
|
57
|
+
vaItemizedMedical: usd.optional().describe("VA Sch A line 1: total medical/dental expenses BEFORE any floor (VA applies its own 10%-of-FAGI floor — Virginia deconforms from the federal 7.5% floor)"),
|
|
58
|
+
vaItemizedStateLocalIncomeTaxes: usd.optional().describe("VA Sch A line 5a when INCOME taxes are claimed (mutually exclusive with sales taxes)"),
|
|
59
|
+
vaItemizedSalesTaxes: usd.optional().describe("VA Sch A line 5a when the general SALES tax election was made federally — capped at the Virginia SALT cap ($40,000; $20,000 MFS for TY2025)"),
|
|
60
|
+
vaItemizedRealEstateTaxes: usd.optional().describe("VA Sch A line 5b real estate taxes — NOT subject to the SALT cap for Virginia"),
|
|
61
|
+
vaItemizedPersonalPropertyTaxes: usd.optional().describe("VA Sch A line 5c personal property taxes — NOT subject to the SALT cap for Virginia"),
|
|
62
|
+
vaItemizedOtherTaxes: usd.optional().describe("VA Sch A line 6 other taxes (foreign income tax etc.)"),
|
|
63
|
+
vaItemizedMortgageInterest: usd.optional().describe("VA Sch A home mortgage interest and points (federal Schedule A amount)"),
|
|
64
|
+
vaItemizedInvestmentInterest: usd.optional().describe("VA Sch A investment interest (protected from the overall limitation)"),
|
|
65
|
+
vaItemizedCharitable: usd.optional().describe("VA Sch A charitable contributions (federal Schedule A amount)"),
|
|
66
|
+
vaItemizedCasualty: usd.optional().describe("VA Sch A casualty/theft losses (protected from the overall limitation)"),
|
|
67
|
+
vaItemizedGambling: usd.optional().describe("VA Sch A gambling losses (§ 165(d), limited to winnings; protected from the overall limitation)"),
|
|
68
|
+
vaItemizedOther: usd.optional().describe("VA Sch A other itemized deductions"),
|
|
69
|
+
vaScheduleAdjDeductions: usd.optional().describe("Schedule ADJ line 9 total deductions (deduction CODES like 105 continuing-teacher-education, 199 other) — prints on Form 760 line 13; these are DEDUCTIONS from VAGI, never income subtractions on line 7"),
|
|
70
|
+
};
|
|
71
|
+
const ca = {
|
|
72
|
+
caCalEITC: usd.optional().describe("us.ca.caleitc result (pass the oracle target's answer)"),
|
|
73
|
+
caYCTC: usd.optional().describe("us.ca.yctc result (pass the oracle target's answer)"),
|
|
74
|
+
caItemizedDeductions: usd.optional().describe("CA itemized deduction total (Schedule CA Part II, line 29) — agent-computed per Schedule CA's own itemized rules WITH disclosure (differs from the federal Schedule A: no SALT cap, mortgage/medical add-backs, etc.). Form 540 line 18 takes the GREATER of this or the CA standard deduction; omit to use the standard deduction only."),
|
|
75
|
+
caRentersCredit: usd.optional().describe("us.ca.renters_credit result (pass the oracle target's answer) — nonrefundable, joins the exemption credits in the line-48 subtraction from tax."),
|
|
76
|
+
caAmt: usd.optional().describe("OVERRIDE for Form 540 line 61 — prefer caIsoPreference + caAmtTaxesAddback so the composer builds Schedule P AMTI and evaluates us.ca.amt itself; a passed caAmt wins."),
|
|
77
|
+
caBhst: usd.optional().describe("us.ca.bhst result (pass the oracle target's answer) — Form 540 line 62 Behavioral Health Services Tax (R&TC § 17043, 1% of CA taxable income over $1,000,000); added into line 64 total tax when nonzero."),
|
|
78
|
+
caEducatorExpensesDeducted: usd.optional().describe("federal educator-expense deduction claimed (§ 62(a)(2)(D)) — California does NOT conform: the composer ADDS it back on Schedule CA (line 11 col C). Pass the federal amount actually deducted (both spouses' combined)."),
|
|
79
|
+
caHsaDeduction: usd.optional().describe("federal HSA deduction (Form 8889 line 13) — California does not conform to § 223: the composer ADDS it back for CA"),
|
|
80
|
+
caHsaTaxableDistribution: usd.optional().describe("HSA distribution amount taxed federally (Form 8889 line 16) — not income for California: the composer SUBTRACTS it for CA"),
|
|
81
|
+
caAb5GrossIncomeAddition: usd.optional().describe("gross income from businesses where the worker is classified as an EMPLOYEE for California (AB 5/Dynamex reclassification; the intake's ca_form540_schca.add_gross_income field) — Schedule CA WAGE addition, col C"),
|
|
82
|
+
caAb5NetLossAddition: usd.optional().describe("net losses from businesses where the worker is an employee for California (intake ca_form540_schca.add_net_loss) — the federal Schedule C loss is disallowed for CA: Schedule CA BUSINESS addition, col C"),
|
|
83
|
+
caDepreciationAddition: usd.optional().describe("CA depreciation-difference addition: federal depreciation (with § 168(k) bonus, which California NEVER conforms to) minus CA depreciation (plain MACRS on the same asset). Positive = CA income addition (Schedule CA col C on the business/rents line). Compute per-asset and disclose."),
|
|
84
|
+
caTaxableEarlyDistribution: usd.optional().describe("retirement-plan early distribution amount subject to the FEDERAL § 72(t) additional tax — California imposes its own 2.5% additional tax on the same base (R&TC § 17085(c)(1), FTB 3805P); the composer computes 2.5% and prints it on Form 540 line 63"),
|
|
85
|
+
caIsoPreference: usd.optional().describe("ISO exercise spread AMT preference (§ 56(b)(3) as modified by R&TC § 17062) — with caAmtTaxesAddback this lets the composer BUILD Schedule P AMTI itself (AMTI = line 19 taxable income + taxes deducted in the CA itemized deduction + this preference; standard deduction added back instead when not itemizing) and evaluate us.ca.amt internally; caAmt (a precomputed answer) wins if both are given"),
|
|
86
|
+
caAmtTaxesAddback: usd.optional().describe("taxes actually included in the CA itemized deduction (property taxes etc. surviving the Schedule CA SALT adjustments) — the Schedule P line 2 addback used when the composer builds AMTI from caIsoPreference; $0 when not itemizing (the composer adds back the standard deduction instead)"),
|
|
87
|
+
};
|
|
88
|
+
const ny = {
|
|
89
|
+
nyHouseholdCredit: usd.optional().describe("NYS household credit from table 2 (us.ny.parameters citation)"),
|
|
90
|
+
nycTaxableIncome: usd.optional().describe("NYC taxable income (IT-201 line 47) if NYC resident"),
|
|
91
|
+
nycHouseholdCredit: usd.optional().describe("NYC household credit from table 5"),
|
|
92
|
+
yonkersSurcharge: usd
|
|
93
|
+
.optional()
|
|
94
|
+
.describe("us.ny.yonkers_surcharge result (pass the oracle target's answer) — 16.75% of the Yonkers worksheet's netted base (nyYonkersBase). Added into line 62's total and printed on its own line (IT-201 LINE 55, not 54 — line 54 is MCTMT) when nonzero."),
|
|
95
|
+
};
|
|
96
|
+
export const stateReturnShape = { ...shared, ...il, ...va, ...ca, ...ny };
|
|
97
|
+
//# sourceMappingURL=shape.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"shape.js","sourceRoot":"","sources":["../../src/state-return/shape.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,MAAM,GAAG,GAAG,CAAC,CAAC,MAAM,EAAE,CAAC,MAAM,EAAE,CAAC;AAEhC,MAAM,MAAM,GAAG;IACb,YAAY,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,CAAC,CAAC;IAC9C,YAAY,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC,QAAQ,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,CAAC,CAAC,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,sPAAsP,CAAC;IACxU,2EAA2E;IAC3E,uCAAuC;IACvC,UAAU,EAAE,GAAG,CAAC,QAAQ,CAAC,2DAA2D,CAAC;IACrF,WAAW,EAAE,GAAG,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,6CAA6C,CAAC;IACnF,KAAK,EAAE,GAAG,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,0CAA0C,CAAC;IAC1E,SAAS,EAAE,GAAG,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,kXAAkX,CAAC;IACtZ,YAAY,EAAE,GAAG,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,oLAAoL,CAAC;IAC3N,UAAU,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,mEAAmE,CAAC;IACrH,eAAe,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,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