@invaro/opentax 0.8.0 → 0.8.2

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/bundle/http.js CHANGED
@@ -40352,7 +40352,7 @@ var IncompleteReturnError = class extends OpenTaxError {
40352
40352
  };
40353
40353
 
40354
40354
  // dist/version.js
40355
- var COMPOSER_VERSION = "0.8.0";
40355
+ var COMPOSER_VERSION = "0.8.2";
40356
40356
 
40357
40357
  // ../solve/dist/sweep.js
40358
40358
  function evaluateAt(corpus2, baseFacts, options, atCents) {
@@ -48716,7 +48716,7 @@ var facts = [
48716
48716
  id: "spouseSelfEmploymentNetProfit",
48717
48717
  type: "money",
48718
48718
  min: "0",
48719
- description: "JOINT RETURN ONLY: the OTHER spouse's own net profit from self-employment (their own Schedule C line 31) when both spouses are self-employed \u2014 the second Schedule SE. selfEmploymentNetProfit holds the first spouse's. Each spouse's Schedule SE has its own $400 floor and its own social security wage base, coordinated with that spouse's own W-2 box 3 (spouseSocialSecurityWages). Both profits count in gross income, earned income, QBI and Form 8959. Not modeled for this second spouse, disclosed: SEP or solo 401(k) contributions, self-employed health insurance and the simplified home office (sepContribution, selfEmployedHealthPremiums and homeOfficeSquareFeet are the first spouse's). Any other filing status refuses: on a separate or single return, enter the filer's own profit in selfEmploymentNetProfit. In dollars.",
48719
+ description: "JOINT RETURN ONLY: the OTHER spouse's own net profit from self-employment (their own Schedule C line 31) when both spouses are self-employed \u2014 the second Schedule SE. selfEmploymentNetProfit holds the first spouse's. Each spouse's Schedule SE has its own $400 floor and its own social security wage base, coordinated with that spouse's own W-2 box 3 (spouseSocialSecurityWages). Both profits count in gross income, earned income, QBI and Form 8959. Not modeled for this second spouse, disclosed: SEP or solo 401(k) contributions, self-employed health insurance and the simplified home office (sepContribution, selfEmployedHealthPremiums and homeOfficeSquareFeet are the first spouse's). Read only on a joint return \u2014 every other filing status ignores it and never asks for it: on a separate or single return, enter the filer's own profit in selfEmploymentNetProfit. In dollars.",
48720
48720
  default: {
48721
48721
  value: "0",
48722
48722
  rationale: "Assumed only one spouse has self-employment income absent contrary input"
@@ -74897,30 +74897,24 @@ function halfDeductionRule(person) {
74897
74897
  var selfEmploymentRules = [
74898
74898
  {
74899
74899
  id: "us.federal.se_net_profit.spouse",
74900
- version: 1,
74900
+ version: 2,
74901
+ // v1 read the spouse's profit on every return, so single filers were asked about a spouse; v2 reads it only on a joint return
74901
74902
  jurisdiction: "us.federal",
74902
74903
  title: "Second self-employed spouse's net profit (joint returns only)",
74903
74904
  citation: {
74904
74905
  source: "26 U.S.C. \xA7 1402(a); Schedule SE (Form 1040) instructions",
74905
74906
  section: "\xA7 1402(a); \xA7 6017",
74906
74907
  url: "https://www.law.cornell.edu/uscode/text/26/1402",
74907
- excerpt: "Schedule SE instructions: 'If you and your spouse both had self-employment income, each of you must file a separate Schedule SE.' [Only a joint return carries the other spouse's income; on any other status that spouse files their own return, so a spouse profit here refuses.]"
74908
+ excerpt: "Schedule SE instructions: 'If you and your spouse both had self-employment income, each of you must file a separate Schedule SE.' [Only a joint return carries the other spouse's income; on any other status that spouse files their own return, so the input is not read.]"
74908
74909
  },
74909
74910
  effectiveFrom: "2025-01-01",
74910
74911
  output: { type: "money" },
74911
74912
  formula: {
74913
+ // asked only on a joint return: no other return has a second spouse's Schedule SE
74912
74914
  kind: "if",
74913
- cond: { kind: "cmp", op: "eq", left: fact40("spouseSelfEmploymentNetProfit"), right: zero27 },
74914
- then: zero27,
74915
- else: {
74916
- kind: "if",
74917
- cond: { kind: "cmp", op: "eq", left: fact40("filingStatus"), right: { kind: "enum", value: "mfj" } },
74918
- then: fact40("spouseSelfEmploymentNetProfit"),
74919
- else: {
74920
- kind: "unsupported",
74921
- reason: "spouseSelfEmploymentNetProfit is for a joint return only \u2014 on any other filing status each spouse files their own return: enter the filer's own profit in selfEmploymentNetProfit"
74922
- }
74923
- }
74915
+ cond: { kind: "cmp", op: "eq", left: fact40("filingStatus"), right: { kind: "enum", value: "mfj" } },
74916
+ then: fact40("spouseSelfEmploymentNetProfit"),
74917
+ else: zero27
74924
74918
  }
74925
74919
  },
74926
74920
  {
@@ -75760,7 +75754,7 @@ var tipsOvertimeRules = [
75760
75754
  // ../corpus-us-federal/dist/index.js
75761
75755
  var corpusInput = {
75762
75756
  name: "@invaro/opentax-corpus-us-federal",
75763
- version: "0.41.0",
75757
+ version: "0.42.0",
75764
75758
  rules: [
75765
75759
  ...corporateRules,
75766
75760
  ...corporate1120Rules,
package/bundle/index.js CHANGED
@@ -28951,7 +28951,7 @@ import { homedir } from "node:os";
28951
28951
  import { join } from "node:path";
28952
28952
 
28953
28953
  // dist/version.js
28954
- var COMPOSER_VERSION = "0.8.0";
28954
+ var COMPOSER_VERSION = "0.8.2";
28955
28955
 
28956
28956
  // dist/phone-home.js
28957
28957
  var ENDPOINT = "https://opentax.invaro.ai/api/t";
@@ -46811,7 +46811,7 @@ var facts = [
46811
46811
  id: "spouseSelfEmploymentNetProfit",
46812
46812
  type: "money",
46813
46813
  min: "0",
46814
- description: "JOINT RETURN ONLY: the OTHER spouse's own net profit from self-employment (their own Schedule C line 31) when both spouses are self-employed \u2014 the second Schedule SE. selfEmploymentNetProfit holds the first spouse's. Each spouse's Schedule SE has its own $400 floor and its own social security wage base, coordinated with that spouse's own W-2 box 3 (spouseSocialSecurityWages). Both profits count in gross income, earned income, QBI and Form 8959. Not modeled for this second spouse, disclosed: SEP or solo 401(k) contributions, self-employed health insurance and the simplified home office (sepContribution, selfEmployedHealthPremiums and homeOfficeSquareFeet are the first spouse's). Any other filing status refuses: on a separate or single return, enter the filer's own profit in selfEmploymentNetProfit. In dollars.",
46814
+ description: "JOINT RETURN ONLY: the OTHER spouse's own net profit from self-employment (their own Schedule C line 31) when both spouses are self-employed \u2014 the second Schedule SE. selfEmploymentNetProfit holds the first spouse's. Each spouse's Schedule SE has its own $400 floor and its own social security wage base, coordinated with that spouse's own W-2 box 3 (spouseSocialSecurityWages). Both profits count in gross income, earned income, QBI and Form 8959. Not modeled for this second spouse, disclosed: SEP or solo 401(k) contributions, self-employed health insurance and the simplified home office (sepContribution, selfEmployedHealthPremiums and homeOfficeSquareFeet are the first spouse's). Read only on a joint return \u2014 every other filing status ignores it and never asks for it: on a separate or single return, enter the filer's own profit in selfEmploymentNetProfit. In dollars.",
46815
46815
  default: {
46816
46816
  value: "0",
46817
46817
  rationale: "Assumed only one spouse has self-employment income absent contrary input"
@@ -72992,30 +72992,24 @@ function halfDeductionRule(person) {
72992
72992
  var selfEmploymentRules = [
72993
72993
  {
72994
72994
  id: "us.federal.se_net_profit.spouse",
72995
- version: 1,
72995
+ version: 2,
72996
+ // v1 read the spouse's profit on every return, so single filers were asked about a spouse; v2 reads it only on a joint return
72996
72997
  jurisdiction: "us.federal",
72997
72998
  title: "Second self-employed spouse's net profit (joint returns only)",
72998
72999
  citation: {
72999
73000
  source: "26 U.S.C. \xA7 1402(a); Schedule SE (Form 1040) instructions",
73000
73001
  section: "\xA7 1402(a); \xA7 6017",
73001
73002
  url: "https://www.law.cornell.edu/uscode/text/26/1402",
73002
- excerpt: "Schedule SE instructions: 'If you and your spouse both had self-employment income, each of you must file a separate Schedule SE.' [Only a joint return carries the other spouse's income; on any other status that spouse files their own return, so a spouse profit here refuses.]"
73003
+ excerpt: "Schedule SE instructions: 'If you and your spouse both had self-employment income, each of you must file a separate Schedule SE.' [Only a joint return carries the other spouse's income; on any other status that spouse files their own return, so the input is not read.]"
73003
73004
  },
73004
73005
  effectiveFrom: "2025-01-01",
73005
73006
  output: { type: "money" },
73006
73007
  formula: {
73008
+ // asked only on a joint return: no other return has a second spouse's Schedule SE
73007
73009
  kind: "if",
73008
- cond: { kind: "cmp", op: "eq", left: fact40("spouseSelfEmploymentNetProfit"), right: zero27 },
73009
- then: zero27,
73010
- else: {
73011
- kind: "if",
73012
- cond: { kind: "cmp", op: "eq", left: fact40("filingStatus"), right: { kind: "enum", value: "mfj" } },
73013
- then: fact40("spouseSelfEmploymentNetProfit"),
73014
- else: {
73015
- kind: "unsupported",
73016
- reason: "spouseSelfEmploymentNetProfit is for a joint return only \u2014 on any other filing status each spouse files their own return: enter the filer's own profit in selfEmploymentNetProfit"
73017
- }
73018
- }
73010
+ cond: { kind: "cmp", op: "eq", left: fact40("filingStatus"), right: { kind: "enum", value: "mfj" } },
73011
+ then: fact40("spouseSelfEmploymentNetProfit"),
73012
+ else: zero27
73019
73013
  }
73020
73014
  },
73021
73015
  {
@@ -73855,7 +73849,7 @@ var tipsOvertimeRules = [
73855
73849
  // ../corpus-us-federal/dist/index.js
73856
73850
  var corpusInput = {
73857
73851
  name: "@invaro/opentax-corpus-us-federal",
73858
- version: "0.41.0",
73852
+ version: "0.42.0",
73859
73853
  rules: [
73860
73854
  ...corporateRules,
73861
73855
  ...corporate1120Rules,
package/bundle/main.js CHANGED
@@ -27595,7 +27595,7 @@ var init_facts = __esm({
27595
27595
  id: "spouseSelfEmploymentNetProfit",
27596
27596
  type: "money",
27597
27597
  min: "0",
27598
- description: "JOINT RETURN ONLY: the OTHER spouse's own net profit from self-employment (their own Schedule C line 31) when both spouses are self-employed \u2014 the second Schedule SE. selfEmploymentNetProfit holds the first spouse's. Each spouse's Schedule SE has its own $400 floor and its own social security wage base, coordinated with that spouse's own W-2 box 3 (spouseSocialSecurityWages). Both profits count in gross income, earned income, QBI and Form 8959. Not modeled for this second spouse, disclosed: SEP or solo 401(k) contributions, self-employed health insurance and the simplified home office (sepContribution, selfEmployedHealthPremiums and homeOfficeSquareFeet are the first spouse's). Any other filing status refuses: on a separate or single return, enter the filer's own profit in selfEmploymentNetProfit. In dollars.",
27598
+ description: "JOINT RETURN ONLY: the OTHER spouse's own net profit from self-employment (their own Schedule C line 31) when both spouses are self-employed \u2014 the second Schedule SE. selfEmploymentNetProfit holds the first spouse's. Each spouse's Schedule SE has its own $400 floor and its own social security wage base, coordinated with that spouse's own W-2 box 3 (spouseSocialSecurityWages). Both profits count in gross income, earned income, QBI and Form 8959. Not modeled for this second spouse, disclosed: SEP or solo 401(k) contributions, self-employed health insurance and the simplified home office (sepContribution, selfEmployedHealthPremiums and homeOfficeSquareFeet are the first spouse's). Read only on a joint return \u2014 every other filing status ignores it and never asks for it: on a separate or single return, enter the filer's own profit in selfEmploymentNetProfit. In dollars.",
27599
27599
  default: {
27600
27600
  value: "0",
27601
27601
  rationale: "Assumed only one spouse has self-employment income absent contrary input"
@@ -54303,30 +54303,24 @@ var init_self_employment = __esm({
54303
54303
  selfEmploymentRules = [
54304
54304
  {
54305
54305
  id: "us.federal.se_net_profit.spouse",
54306
- version: 1,
54306
+ version: 2,
54307
+ // v1 read the spouse's profit on every return, so single filers were asked about a spouse; v2 reads it only on a joint return
54307
54308
  jurisdiction: "us.federal",
54308
54309
  title: "Second self-employed spouse's net profit (joint returns only)",
54309
54310
  citation: {
54310
54311
  source: "26 U.S.C. \xA7 1402(a); Schedule SE (Form 1040) instructions",
54311
54312
  section: "\xA7 1402(a); \xA7 6017",
54312
54313
  url: "https://www.law.cornell.edu/uscode/text/26/1402",
54313
- excerpt: "Schedule SE instructions: 'If you and your spouse both had self-employment income, each of you must file a separate Schedule SE.' [Only a joint return carries the other spouse's income; on any other status that spouse files their own return, so a spouse profit here refuses.]"
54314
+ excerpt: "Schedule SE instructions: 'If you and your spouse both had self-employment income, each of you must file a separate Schedule SE.' [Only a joint return carries the other spouse's income; on any other status that spouse files their own return, so the input is not read.]"
54314
54315
  },
54315
54316
  effectiveFrom: "2025-01-01",
54316
54317
  output: { type: "money" },
54317
54318
  formula: {
54319
+ // asked only on a joint return: no other return has a second spouse's Schedule SE
54318
54320
  kind: "if",
54319
- cond: { kind: "cmp", op: "eq", left: fact40("spouseSelfEmploymentNetProfit"), right: zero27 },
54320
- then: zero27,
54321
- else: {
54322
- kind: "if",
54323
- cond: { kind: "cmp", op: "eq", left: fact40("filingStatus"), right: { kind: "enum", value: "mfj" } },
54324
- then: fact40("spouseSelfEmploymentNetProfit"),
54325
- else: {
54326
- kind: "unsupported",
54327
- reason: "spouseSelfEmploymentNetProfit is for a joint return only \u2014 on any other filing status each spouse files their own return: enter the filer's own profit in selfEmploymentNetProfit"
54328
- }
54329
- }
54321
+ cond: { kind: "cmp", op: "eq", left: fact40("filingStatus"), right: { kind: "enum", value: "mfj" } },
54322
+ then: fact40("spouseSelfEmploymentNetProfit"),
54323
+ else: zero27
54330
54324
  }
54331
54325
  },
54332
54326
  {
@@ -55276,7 +55270,7 @@ var init_dist2 = __esm({
55276
55270
  init_occupations();
55277
55271
  corpusInput = {
55278
55272
  name: "@invaro/opentax-corpus-us-federal",
55279
- version: "0.41.0",
55273
+ version: "0.42.0",
55280
55274
  rules: [
55281
55275
  ...corporateRules,
55282
55276
  ...corporate1120Rules,
@@ -63391,7 +63385,7 @@ var COMPOSER_VERSION;
63391
63385
  var init_version = __esm({
63392
63386
  "dist/version.js"() {
63393
63387
  "use strict";
63394
- COMPOSER_VERSION = "0.8.0";
63388
+ COMPOSER_VERSION = "0.8.2";
63395
63389
  }
63396
63390
  });
63397
63391
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@invaro/opentax",
3
- "version": "0.8.0",
3
+ "version": "0.8.2",
4
4
  "description": "The verifiable US tax oracle: MCP server for AI agents + full CLI in one self-contained package — every answer cited to statute and machine-checkable",
5
5
  "license": "BUSL-1.1",
6
6
  "type": "module",
@@ -26,9 +26,9 @@
26
26
  "zod": "^4.6.6",
27
27
  "@invaro/opentax-compose": "0.1.1",
28
28
  "@invaro/opentax-core": "0.1.0",
29
- "@invaro/opentax-corpus-us-federal": "0.41.0",
30
- "@invaro/opentax-solve": "0.1.0",
31
- "@invaro/opentax-cli": "0.1.2"
29
+ "@invaro/opentax-cli": "0.1.2",
30
+ "@invaro/opentax-corpus-us-federal": "0.42.0",
31
+ "@invaro/opentax-solve": "0.1.0"
32
32
  },
33
33
  "repository": {
34
34
  "type": "git",