pigeongov 0.2.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/AGENTS.md +258 -0
- package/LICENSE +21 -0
- package/PRIVACY.md +38 -0
- package/README.md +234 -0
- package/agents.json +72 -0
- package/dist/bin/pigeongov.d.ts +2 -0
- package/dist/bin/pigeongov.js +4 -0
- package/dist/bin/pigeongov.js.map +1 -0
- package/dist/src/advisory/decision-support/contribution-optimizer.d.ts +36 -0
- package/dist/src/advisory/decision-support/contribution-optimizer.js +88 -0
- package/dist/src/advisory/decision-support/contribution-optimizer.js.map +1 -0
- package/dist/src/advisory/decision-support/deduction-optimizer.d.ts +31 -0
- package/dist/src/advisory/decision-support/deduction-optimizer.js +96 -0
- package/dist/src/advisory/decision-support/deduction-optimizer.js.map +1 -0
- package/dist/src/advisory/life-events/events.d.ts +4 -0
- package/dist/src/advisory/life-events/events.js +156 -0
- package/dist/src/advisory/life-events/events.js.map +1 -0
- package/dist/src/advisory/life-events/planner.d.ts +19 -0
- package/dist/src/advisory/life-events/planner.js +72 -0
- package/dist/src/advisory/life-events/planner.js.map +1 -0
- package/dist/src/advisory/screener/engine.d.ts +4 -0
- package/dist/src/advisory/screener/engine.js +368 -0
- package/dist/src/advisory/screener/engine.js.map +1 -0
- package/dist/src/advisory/screener/intake.d.ts +68 -0
- package/dist/src/advisory/screener/intake.js +93 -0
- package/dist/src/advisory/screener/intake.js.map +1 -0
- package/dist/src/analytics/stats.d.ts +18 -0
- package/dist/src/analytics/stats.js +158 -0
- package/dist/src/analytics/stats.js.map +1 -0
- package/dist/src/api/handlers/deadlines.d.ts +2 -0
- package/dist/src/api/handlers/deadlines.js +7 -0
- package/dist/src/api/handlers/deadlines.js.map +1 -0
- package/dist/src/api/handlers/openapi.d.ts +2 -0
- package/dist/src/api/handlers/openapi.js +7 -0
- package/dist/src/api/handlers/openapi.js.map +1 -0
- package/dist/src/api/handlers/workflows.d.ts +5 -0
- package/dist/src/api/handlers/workflows.js +73 -0
- package/dist/src/api/handlers/workflows.js.map +1 -0
- package/dist/src/api/index.d.ts +20 -0
- package/dist/src/api/index.js +70 -0
- package/dist/src/api/index.js.map +1 -0
- package/dist/src/api/openapi.d.ts +5 -0
- package/dist/src/api/openapi.js +384 -0
- package/dist/src/api/openapi.js.map +1 -0
- package/dist/src/api/router.d.ts +19 -0
- package/dist/src/api/router.js +57 -0
- package/dist/src/api/router.js.map +1 -0
- package/dist/src/cli/commands/completions.d.ts +2 -0
- package/dist/src/cli/commands/completions.js +396 -0
- package/dist/src/cli/commands/completions.js.map +1 -0
- package/dist/src/cli/commands/deadlines.d.ts +2 -0
- package/dist/src/cli/commands/deadlines.js +47 -0
- package/dist/src/cli/commands/deadlines.js.map +1 -0
- package/dist/src/cli/commands/doctor.d.ts +2 -0
- package/dist/src/cli/commands/doctor.js +50 -0
- package/dist/src/cli/commands/doctor.js.map +1 -0
- package/dist/src/cli/commands/drafts.d.ts +2 -0
- package/dist/src/cli/commands/drafts.js +75 -0
- package/dist/src/cli/commands/drafts.js.map +1 -0
- package/dist/src/cli/commands/extract.d.ts +2 -0
- package/dist/src/cli/commands/extract.js +17 -0
- package/dist/src/cli/commands/extract.js.map +1 -0
- package/dist/src/cli/commands/fees.d.ts +2 -0
- package/dist/src/cli/commands/fees.js +40 -0
- package/dist/src/cli/commands/fees.js.map +1 -0
- package/dist/src/cli/commands/fill.d.ts +25 -0
- package/dist/src/cli/commands/fill.js +354 -0
- package/dist/src/cli/commands/fill.js.map +1 -0
- package/dist/src/cli/commands/glossary.d.ts +2 -0
- package/dist/src/cli/commands/glossary.js +90 -0
- package/dist/src/cli/commands/glossary.js.map +1 -0
- package/dist/src/cli/commands/life-event.d.ts +2 -0
- package/dist/src/cli/commands/life-event.js +41 -0
- package/dist/src/cli/commands/life-event.js.map +1 -0
- package/dist/src/cli/commands/list.d.ts +2 -0
- package/dist/src/cli/commands/list.js +19 -0
- package/dist/src/cli/commands/list.js.map +1 -0
- package/dist/src/cli/commands/machine.d.ts +2 -0
- package/dist/src/cli/commands/machine.js +100 -0
- package/dist/src/cli/commands/machine.js.map +1 -0
- package/dist/src/cli/commands/merge.d.ts +2 -0
- package/dist/src/cli/commands/merge.js +24 -0
- package/dist/src/cli/commands/merge.js.map +1 -0
- package/dist/src/cli/commands/plugin.d.ts +2 -0
- package/dist/src/cli/commands/plugin.js +119 -0
- package/dist/src/cli/commands/plugin.js.map +1 -0
- package/dist/src/cli/commands/profile.d.ts +2 -0
- package/dist/src/cli/commands/profile.js +125 -0
- package/dist/src/cli/commands/profile.js.map +1 -0
- package/dist/src/cli/commands/review.d.ts +2 -0
- package/dist/src/cli/commands/review.js +25 -0
- package/dist/src/cli/commands/review.js.map +1 -0
- package/dist/src/cli/commands/scaffold.d.ts +2 -0
- package/dist/src/cli/commands/scaffold.js +304 -0
- package/dist/src/cli/commands/scaffold.js.map +1 -0
- package/dist/src/cli/commands/schemas.d.ts +2 -0
- package/dist/src/cli/commands/schemas.js +14 -0
- package/dist/src/cli/commands/schemas.js.map +1 -0
- package/dist/src/cli/commands/screen.d.ts +2 -0
- package/dist/src/cli/commands/screen.js +89 -0
- package/dist/src/cli/commands/screen.js.map +1 -0
- package/dist/src/cli/commands/serve.d.ts +2 -0
- package/dist/src/cli/commands/serve.js +46 -0
- package/dist/src/cli/commands/serve.js.map +1 -0
- package/dist/src/cli/commands/start.d.ts +2 -0
- package/dist/src/cli/commands/start.js +16 -0
- package/dist/src/cli/commands/start.js.map +1 -0
- package/dist/src/cli/commands/stats.d.ts +2 -0
- package/dist/src/cli/commands/stats.js +17 -0
- package/dist/src/cli/commands/stats.js.map +1 -0
- package/dist/src/cli/commands/testdata.d.ts +2 -0
- package/dist/src/cli/commands/testdata.js +60 -0
- package/dist/src/cli/commands/testdata.js.map +1 -0
- package/dist/src/cli/commands/tui.d.ts +2 -0
- package/dist/src/cli/commands/tui.js +26 -0
- package/dist/src/cli/commands/tui.js.map +1 -0
- package/dist/src/cli/commands/validate.d.ts +2 -0
- package/dist/src/cli/commands/validate.js +22 -0
- package/dist/src/cli/commands/validate.js.map +1 -0
- package/dist/src/cli/commands/vault.d.ts +2 -0
- package/dist/src/cli/commands/vault.js +73 -0
- package/dist/src/cli/commands/vault.js.map +1 -0
- package/dist/src/cli/commands/workflows.d.ts +2 -0
- package/dist/src/cli/commands/workflows.js +23 -0
- package/dist/src/cli/commands/workflows.js.map +1 -0
- package/dist/src/cli/display/review.d.ts +2 -0
- package/dist/src/cli/display/review.js +4 -0
- package/dist/src/cli/display/review.js.map +1 -0
- package/dist/src/cli/display/summary.d.ts +2 -0
- package/dist/src/cli/display/summary.js +19 -0
- package/dist/src/cli/display/summary.js.map +1 -0
- package/dist/src/cli/display/validation.d.ts +2 -0
- package/dist/src/cli/display/validation.js +16 -0
- package/dist/src/cli/display/validation.js.map +1 -0
- package/dist/src/cli/index.d.ts +1 -0
- package/dist/src/cli/index.js +83 -0
- package/dist/src/cli/index.js.map +1 -0
- package/dist/src/cli/output.d.ts +21 -0
- package/dist/src/cli/output.js +107 -0
- package/dist/src/cli/output.js.map +1 -0
- package/dist/src/cli/prompts/common.d.ts +21 -0
- package/dist/src/cli/prompts/common.js +53 -0
- package/dist/src/cli/prompts/common.js.map +1 -0
- package/dist/src/cli/prompts/credits.d.ts +3 -0
- package/dist/src/cli/prompts/credits.js +23 -0
- package/dist/src/cli/prompts/credits.js.map +1 -0
- package/dist/src/cli/prompts/deductions.d.ts +12 -0
- package/dist/src/cli/prompts/deductions.js +26 -0
- package/dist/src/cli/prompts/deductions.js.map +1 -0
- package/dist/src/cli/prompts/identity.d.ts +8 -0
- package/dist/src/cli/prompts/identity.js +36 -0
- package/dist/src/cli/prompts/identity.js.map +1 -0
- package/dist/src/cli/prompts/income.d.ts +15 -0
- package/dist/src/cli/prompts/income.js +61 -0
- package/dist/src/cli/prompts/income.js.map +1 -0
- package/dist/src/cli/prompts/workflow.d.ts +3 -0
- package/dist/src/cli/prompts/workflow.js +74 -0
- package/dist/src/cli/prompts/workflow.js.map +1 -0
- package/dist/src/cli/support.d.ts +53 -0
- package/dist/src/cli/support.js +80 -0
- package/dist/src/cli/support.js.map +1 -0
- package/dist/src/cli/tui.d.ts +22 -0
- package/dist/src/cli/tui.js +122 -0
- package/dist/src/cli/tui.js.map +1 -0
- package/dist/src/engine/audit-risk/scorer.d.ts +36 -0
- package/dist/src/engine/audit-risk/scorer.js +132 -0
- package/dist/src/engine/audit-risk/scorer.js.map +1 -0
- package/dist/src/engine/crypto/cost-basis.d.ts +19 -0
- package/dist/src/engine/crypto/cost-basis.js +115 -0
- package/dist/src/engine/crypto/cost-basis.js.map +1 -0
- package/dist/src/engine/crypto/transaction-parser.d.ts +36 -0
- package/dist/src/engine/crypto/transaction-parser.js +124 -0
- package/dist/src/engine/crypto/transaction-parser.js.map +1 -0
- package/dist/src/engine/crypto/wash-sale.d.ts +25 -0
- package/dist/src/engine/crypto/wash-sale.js +51 -0
- package/dist/src/engine/crypto/wash-sale.js.map +1 -0
- package/dist/src/engine/equity/espp.d.ts +41 -0
- package/dist/src/engine/equity/espp.js +90 -0
- package/dist/src/engine/equity/espp.js.map +1 -0
- package/dist/src/engine/equity/iso.d.ts +42 -0
- package/dist/src/engine/equity/iso.js +94 -0
- package/dist/src/engine/equity/iso.js.map +1 -0
- package/dist/src/engine/equity/nso.d.ts +35 -0
- package/dist/src/engine/equity/nso.js +63 -0
- package/dist/src/engine/equity/nso.js.map +1 -0
- package/dist/src/engine/equity/rsu.d.ts +33 -0
- package/dist/src/engine/equity/rsu.js +64 -0
- package/dist/src/engine/equity/rsu.js.map +1 -0
- package/dist/src/engine/field-mapper.d.ts +26 -0
- package/dist/src/engine/field-mapper.js +119 -0
- package/dist/src/engine/field-mapper.js.map +1 -0
- package/dist/src/engine/forms/core-1040.d.ts +2 -0
- package/dist/src/engine/forms/core-1040.js +124 -0
- package/dist/src/engine/forms/core-1040.js.map +1 -0
- package/dist/src/engine/forms/form-8949.d.ts +21 -0
- package/dist/src/engine/forms/form-8949.js +96 -0
- package/dist/src/engine/forms/form-8949.js.map +1 -0
- package/dist/src/engine/forms/index.d.ts +7 -0
- package/dist/src/engine/forms/index.js +6 -0
- package/dist/src/engine/forms/index.js.map +1 -0
- package/dist/src/engine/forms/schedule-b.d.ts +15 -0
- package/dist/src/engine/forms/schedule-b.js +78 -0
- package/dist/src/engine/forms/schedule-b.js.map +1 -0
- package/dist/src/engine/forms/schedule-d.d.ts +9 -0
- package/dist/src/engine/forms/schedule-d.js +86 -0
- package/dist/src/engine/forms/schedule-d.js.map +1 -0
- package/dist/src/engine/fpl.d.ts +70 -0
- package/dist/src/engine/fpl.js +127 -0
- package/dist/src/engine/fpl.js.map +1 -0
- package/dist/src/engine/gig/home-office.d.ts +34 -0
- package/dist/src/engine/gig/home-office.js +53 -0
- package/dist/src/engine/gig/home-office.js.map +1 -0
- package/dist/src/engine/gig/mileage.d.ts +30 -0
- package/dist/src/engine/gig/mileage.js +45 -0
- package/dist/src/engine/gig/mileage.js.map +1 -0
- package/dist/src/engine/gig/multi-1099.d.ts +19 -0
- package/dist/src/engine/gig/multi-1099.js +28 -0
- package/dist/src/engine/gig/multi-1099.js.map +1 -0
- package/dist/src/engine/multiyear/carryforward.d.ts +31 -0
- package/dist/src/engine/multiyear/carryforward.js +77 -0
- package/dist/src/engine/multiyear/carryforward.js.map +1 -0
- package/dist/src/engine/multiyear/compare.d.ts +25 -0
- package/dist/src/engine/multiyear/compare.js +94 -0
- package/dist/src/engine/multiyear/compare.js.map +1 -0
- package/dist/src/engine/multiyear/import.d.ts +23 -0
- package/dist/src/engine/multiyear/import.js +193 -0
- package/dist/src/engine/multiyear/import.js.map +1 -0
- package/dist/src/engine/optimizer/filing-status.d.ts +29 -0
- package/dist/src/engine/optimizer/filing-status.js +66 -0
- package/dist/src/engine/optimizer/filing-status.js.map +1 -0
- package/dist/src/engine/orchestrator.d.ts +14 -0
- package/dist/src/engine/orchestrator.js +135 -0
- package/dist/src/engine/orchestrator.js.map +1 -0
- package/dist/src/engine/scenarios/whatif.d.ts +34 -0
- package/dist/src/engine/scenarios/whatif.js +70 -0
- package/dist/src/engine/scenarios/whatif.js.map +1 -0
- package/dist/src/engine/state/ca/calculator.d.ts +3 -0
- package/dist/src/engine/state/ca/calculator.js +107 -0
- package/dist/src/engine/state/ca/calculator.js.map +1 -0
- package/dist/src/engine/state/common.d.ts +39 -0
- package/dist/src/engine/state/common.js +115 -0
- package/dist/src/engine/state/common.js.map +1 -0
- package/dist/src/engine/state/ga/calculator.d.ts +3 -0
- package/dist/src/engine/state/ga/calculator.js +82 -0
- package/dist/src/engine/state/ga/calculator.js.map +1 -0
- package/dist/src/engine/state/il/calculator.d.ts +3 -0
- package/dist/src/engine/state/il/calculator.js +49 -0
- package/dist/src/engine/state/il/calculator.js.map +1 -0
- package/dist/src/engine/state/mi/calculator.d.ts +3 -0
- package/dist/src/engine/state/mi/calculator.js +60 -0
- package/dist/src/engine/state/mi/calculator.js.map +1 -0
- package/dist/src/engine/state/nc/calculator.d.ts +3 -0
- package/dist/src/engine/state/nc/calculator.js +54 -0
- package/dist/src/engine/state/nc/calculator.js.map +1 -0
- package/dist/src/engine/state/nj/calculator.d.ts +3 -0
- package/dist/src/engine/state/nj/calculator.js +90 -0
- package/dist/src/engine/state/nj/calculator.js.map +1 -0
- package/dist/src/engine/state/ny/calculator.d.ts +3 -0
- package/dist/src/engine/state/ny/calculator.js +103 -0
- package/dist/src/engine/state/ny/calculator.js.map +1 -0
- package/dist/src/engine/state/oh/calculator.d.ts +3 -0
- package/dist/src/engine/state/oh/calculator.js +79 -0
- package/dist/src/engine/state/oh/calculator.js.map +1 -0
- package/dist/src/engine/state/pa/calculator.d.ts +3 -0
- package/dist/src/engine/state/pa/calculator.js +58 -0
- package/dist/src/engine/state/pa/calculator.js.map +1 -0
- package/dist/src/engine/state/registry.d.ts +9 -0
- package/dist/src/engine/state/registry.js +67 -0
- package/dist/src/engine/state/registry.js.map +1 -0
- package/dist/src/engine/state/types.d.ts +57 -0
- package/dist/src/engine/state/types.js +2 -0
- package/dist/src/engine/state/types.js.map +1 -0
- package/dist/src/engine/state/va/calculator.d.ts +3 -0
- package/dist/src/engine/state/va/calculator.js +76 -0
- package/dist/src/engine/state/va/calculator.js.map +1 -0
- package/dist/src/engine/suggestions/missed-deductions.d.ts +43 -0
- package/dist/src/engine/suggestions/missed-deductions.js +128 -0
- package/dist/src/engine/suggestions/missed-deductions.js.map +1 -0
- package/dist/src/engine/tax-calculator.d.ts +55 -0
- package/dist/src/engine/tax-calculator.js +156 -0
- package/dist/src/engine/tax-calculator.js.map +1 -0
- package/dist/src/engine/tax-constants-2025.d.ts +56 -0
- package/dist/src/engine/tax-constants-2025.js +138 -0
- package/dist/src/engine/tax-constants-2025.js.map +1 -0
- package/dist/src/engine/types.d.ts +77 -0
- package/dist/src/engine/types.js +2 -0
- package/dist/src/engine/types.js.map +1 -0
- package/dist/src/engine/va-math.d.ts +24 -0
- package/dist/src/engine/va-math.js +90 -0
- package/dist/src/engine/va-math.js.map +1 -0
- package/dist/src/engine/validator.d.ts +7 -0
- package/dist/src/engine/validator.js +108 -0
- package/dist/src/engine/validator.js.map +1 -0
- package/dist/src/glossary/entries/healthcare.d.ts +2 -0
- package/dist/src/glossary/entries/healthcare.js +78 -0
- package/dist/src/glossary/entries/healthcare.js.map +1 -0
- package/dist/src/glossary/entries/immigration.d.ts +2 -0
- package/dist/src/glossary/entries/immigration.js +112 -0
- package/dist/src/glossary/entries/immigration.js.map +1 -0
- package/dist/src/glossary/entries/tax.d.ts +2 -0
- package/dist/src/glossary/entries/tax.js +149 -0
- package/dist/src/glossary/entries/tax.js.map +1 -0
- package/dist/src/glossary/entries/unemployment.d.ts +2 -0
- package/dist/src/glossary/entries/unemployment.js +52 -0
- package/dist/src/glossary/entries/unemployment.js.map +1 -0
- package/dist/src/glossary/index.d.ts +19 -0
- package/dist/src/glossary/index.js +39 -0
- package/dist/src/glossary/index.js.map +1 -0
- package/dist/src/i18n/index.d.ts +21 -0
- package/dist/src/i18n/index.js +92 -0
- package/dist/src/i18n/index.js.map +1 -0
- package/dist/src/mcp/result.d.ts +3 -0
- package/dist/src/mcp/result.js +7 -0
- package/dist/src/mcp/result.js.map +1 -0
- package/dist/src/mcp/return-bundle.d.ts +19 -0
- package/dist/src/mcp/return-bundle.js +49 -0
- package/dist/src/mcp/return-bundle.js.map +1 -0
- package/dist/src/mcp/shared.d.ts +49102 -0
- package/dist/src/mcp/shared.js +354 -0
- package/dist/src/mcp/shared.js.map +1 -0
- package/dist/src/mcp/tools/build-packet.d.ts +7 -0
- package/dist/src/mcp/tools/build-packet.js +23 -0
- package/dist/src/mcp/tools/build-packet.js.map +1 -0
- package/dist/src/mcp/tools/calculate-tax.d.ts +40 -0
- package/dist/src/mcp/tools/calculate-tax.js +17 -0
- package/dist/src/mcp/tools/calculate-tax.js.map +1 -0
- package/dist/src/mcp/tools/deadlines.d.ts +7 -0
- package/dist/src/mcp/tools/deadlines.js +23 -0
- package/dist/src/mcp/tools/deadlines.js.map +1 -0
- package/dist/src/mcp/tools/describe-form.d.ts +14 -0
- package/dist/src/mcp/tools/describe-form.js +23 -0
- package/dist/src/mcp/tools/describe-form.js.map +1 -0
- package/dist/src/mcp/tools/describe-workflow.d.ts +6 -0
- package/dist/src/mcp/tools/describe-workflow.js +16 -0
- package/dist/src/mcp/tools/describe-workflow.js.map +1 -0
- package/dist/src/mcp/tools/explain-flag.d.ts +7 -0
- package/dist/src/mcp/tools/explain-flag.js +19 -0
- package/dist/src/mcp/tools/explain-flag.js.map +1 -0
- package/dist/src/mcp/tools/extract-document.d.ts +13 -0
- package/dist/src/mcp/tools/extract-document.js +20 -0
- package/dist/src/mcp/tools/extract-document.js.map +1 -0
- package/dist/src/mcp/tools/fees.d.ts +7 -0
- package/dist/src/mcp/tools/fees.js +24 -0
- package/dist/src/mcp/tools/fees.js.map +1 -0
- package/dist/src/mcp/tools/fill-form.d.ts +56 -0
- package/dist/src/mcp/tools/fill-form.js +47 -0
- package/dist/src/mcp/tools/fill-form.js.map +1 -0
- package/dist/src/mcp/tools/fill-workflow.d.ts +7 -0
- package/dist/src/mcp/tools/fill-workflow.js +24 -0
- package/dist/src/mcp/tools/fill-workflow.js.map +1 -0
- package/dist/src/mcp/tools/glossary.d.ts +8 -0
- package/dist/src/mcp/tools/glossary.js +54 -0
- package/dist/src/mcp/tools/glossary.js.map +1 -0
- package/dist/src/mcp/tools/list-forms.d.ts +6 -0
- package/dist/src/mcp/tools/list-forms.js +15 -0
- package/dist/src/mcp/tools/list-forms.js.map +1 -0
- package/dist/src/mcp/tools/list-workflows.d.ts +6 -0
- package/dist/src/mcp/tools/list-workflows.js +16 -0
- package/dist/src/mcp/tools/list-workflows.js.map +1 -0
- package/dist/src/mcp/tools/plan-life-event.d.ts +59 -0
- package/dist/src/mcp/tools/plan-life-event.js +41 -0
- package/dist/src/mcp/tools/plan-life-event.js.map +1 -0
- package/dist/src/mcp/tools/review-form.d.ts +40 -0
- package/dist/src/mcp/tools/review-form.js +26 -0
- package/dist/src/mcp/tools/review-form.js.map +1 -0
- package/dist/src/mcp/tools/review-workflow.d.ts +7 -0
- package/dist/src/mcp/tools/review-workflow.js +27 -0
- package/dist/src/mcp/tools/review-workflow.js.map +1 -0
- package/dist/src/mcp/tools/screen-eligibility.d.ts +53 -0
- package/dist/src/mcp/tools/screen-eligibility.js +44 -0
- package/dist/src/mcp/tools/screen-eligibility.js.map +1 -0
- package/dist/src/mcp/tools/start-workflow.d.ts +6 -0
- package/dist/src/mcp/tools/start-workflow.js +17 -0
- package/dist/src/mcp/tools/start-workflow.js.map +1 -0
- package/dist/src/mcp/tools/validate-form.d.ts +48 -0
- package/dist/src/mcp/tools/validate-form.js +30 -0
- package/dist/src/mcp/tools/validate-form.js.map +1 -0
- package/dist/src/mcp/tools/validate-workflow.d.ts +7 -0
- package/dist/src/mcp/tools/validate-workflow.js +24 -0
- package/dist/src/mcp/tools/validate-workflow.js.map +1 -0
- package/dist/src/pdf/batch.d.ts +8 -0
- package/dist/src/pdf/batch.js +15 -0
- package/dist/src/pdf/batch.js.map +1 -0
- package/dist/src/pdf/merge.d.ts +10 -0
- package/dist/src/pdf/merge.js +62 -0
- package/dist/src/pdf/merge.js.map +1 -0
- package/dist/src/pdf/ocr.d.ts +22 -0
- package/dist/src/pdf/ocr.js +52 -0
- package/dist/src/pdf/ocr.js.map +1 -0
- package/dist/src/pdf/reader.d.ts +2 -0
- package/dist/src/pdf/reader.js +354 -0
- package/dist/src/pdf/reader.js.map +1 -0
- package/dist/src/pdf/shared.d.ts +89 -0
- package/dist/src/pdf/shared.js +137 -0
- package/dist/src/pdf/shared.js.map +1 -0
- package/dist/src/pdf/writer.d.ts +7 -0
- package/dist/src/pdf/writer.js +311 -0
- package/dist/src/pdf/writer.js.map +1 -0
- package/dist/src/plugins/loader.d.ts +15 -0
- package/dist/src/plugins/loader.js +86 -0
- package/dist/src/plugins/loader.js.map +1 -0
- package/dist/src/plugins/sandbox.d.ts +14 -0
- package/dist/src/plugins/sandbox.js +88 -0
- package/dist/src/plugins/sandbox.js.map +1 -0
- package/dist/src/plugins/types.d.ts +17 -0
- package/dist/src/plugins/types.js +13 -0
- package/dist/src/plugins/types.js.map +1 -0
- package/dist/src/schemas/2025/f1040.d.ts +127 -0
- package/dist/src/schemas/2025/f1040.js +104 -0
- package/dist/src/schemas/2025/f1040.js.map +1 -0
- package/dist/src/schemas/2025/f1099-int.d.ts +53 -0
- package/dist/src/schemas/2025/f1099-int.js +51 -0
- package/dist/src/schemas/2025/f1099-int.js.map +1 -0
- package/dist/src/schemas/2025/f1099-nec.d.ts +47 -0
- package/dist/src/schemas/2025/f1099-nec.js +45 -0
- package/dist/src/schemas/2025/f1099-nec.js.map +1 -0
- package/dist/src/schemas/2025/form-8949.d.ts +46 -0
- package/dist/src/schemas/2025/form-8949.js +71 -0
- package/dist/src/schemas/2025/form-8949.js.map +1 -0
- package/dist/src/schemas/2025/index.d.ts +1004 -0
- package/dist/src/schemas/2025/index.js +60 -0
- package/dist/src/schemas/2025/index.js.map +1 -0
- package/dist/src/schemas/2025/schedule-1.d.ts +44 -0
- package/dist/src/schemas/2025/schedule-1.js +56 -0
- package/dist/src/schemas/2025/schedule-1.js.map +1 -0
- package/dist/src/schemas/2025/schedule-b.d.ts +32 -0
- package/dist/src/schemas/2025/schedule-b.js +53 -0
- package/dist/src/schemas/2025/schedule-b.js.map +1 -0
- package/dist/src/schemas/2025/schedule-c.d.ts +58 -0
- package/dist/src/schemas/2025/schedule-c.js +46 -0
- package/dist/src/schemas/2025/schedule-c.js.map +1 -0
- package/dist/src/schemas/2025/schedule-d.d.ts +36 -0
- package/dist/src/schemas/2025/schedule-d.js +52 -0
- package/dist/src/schemas/2025/schedule-d.js.map +1 -0
- package/dist/src/schemas/2025/shared.d.ts +98 -0
- package/dist/src/schemas/2025/shared.js +161 -0
- package/dist/src/schemas/2025/shared.js.map +1 -0
- package/dist/src/schemas/2025/w2.d.ts +57 -0
- package/dist/src/schemas/2025/w2.js +62 -0
- package/dist/src/schemas/2025/w2.js.map +1 -0
- package/dist/src/storage/drafts.d.ts +25 -0
- package/dist/src/storage/drafts.js +117 -0
- package/dist/src/storage/drafts.js.map +1 -0
- package/dist/src/storage/paths.d.ts +15 -0
- package/dist/src/storage/paths.js +33 -0
- package/dist/src/storage/paths.js.map +1 -0
- package/dist/src/storage/profile.d.ts +17 -0
- package/dist/src/storage/profile.js +59 -0
- package/dist/src/storage/profile.js.map +1 -0
- package/dist/src/storage/vault.d.ts +38 -0
- package/dist/src/storage/vault.js +187 -0
- package/dist/src/storage/vault.js.map +1 -0
- package/dist/src/testing/synthetic.d.ts +13 -0
- package/dist/src/testing/synthetic.js +164 -0
- package/dist/src/testing/synthetic.js.map +1 -0
- package/dist/src/types.d.ts +362 -0
- package/dist/src/types.js +2 -0
- package/dist/src/types.js.map +1 -0
- package/dist/src/workflows/deadlines.d.ts +13 -0
- package/dist/src/workflows/deadlines.js +88 -0
- package/dist/src/workflows/deadlines.js.map +1 -0
- package/dist/src/workflows/domains/benefits.d.ts +409 -0
- package/dist/src/workflows/domains/benefits.js +744 -0
- package/dist/src/workflows/domains/benefits.js.map +1 -0
- package/dist/src/workflows/domains/business.d.ts +65 -0
- package/dist/src/workflows/domains/business.js +76 -0
- package/dist/src/workflows/domains/business.js.map +1 -0
- package/dist/src/workflows/domains/education.d.ts +251 -0
- package/dist/src/workflows/domains/education.js +504 -0
- package/dist/src/workflows/domains/education.js.map +1 -0
- package/dist/src/workflows/domains/estate.d.ts +217 -0
- package/dist/src/workflows/domains/estate.js +407 -0
- package/dist/src/workflows/domains/estate.js.map +1 -0
- package/dist/src/workflows/domains/healthcare-ext.d.ts +88 -0
- package/dist/src/workflows/domains/healthcare-ext.js +150 -0
- package/dist/src/workflows/domains/healthcare-ext.js.map +1 -0
- package/dist/src/workflows/domains/healthcare.d.ts +92 -0
- package/dist/src/workflows/domains/healthcare.js +126 -0
- package/dist/src/workflows/domains/healthcare.js.map +1 -0
- package/dist/src/workflows/domains/identity-domain.d.ts +291 -0
- package/dist/src/workflows/domains/identity-domain.js +541 -0
- package/dist/src/workflows/domains/identity-domain.js.map +1 -0
- package/dist/src/workflows/domains/immigration-ext.d.ts +282 -0
- package/dist/src/workflows/domains/immigration-ext.js +590 -0
- package/dist/src/workflows/domains/immigration-ext.js.map +1 -0
- package/dist/src/workflows/domains/immigration.d.ts +121 -0
- package/dist/src/workflows/domains/immigration.js +152 -0
- package/dist/src/workflows/domains/immigration.js.map +1 -0
- package/dist/src/workflows/domains/legal.d.ts +235 -0
- package/dist/src/workflows/domains/legal.js +380 -0
- package/dist/src/workflows/domains/legal.js.map +1 -0
- package/dist/src/workflows/domains/permits.d.ts +65 -0
- package/dist/src/workflows/domains/permits.js +74 -0
- package/dist/src/workflows/domains/permits.js.map +1 -0
- package/dist/src/workflows/domains/retirement.d.ts +59 -0
- package/dist/src/workflows/domains/retirement.js +155 -0
- package/dist/src/workflows/domains/retirement.js.map +1 -0
- package/dist/src/workflows/domains/tax.d.ts +133 -0
- package/dist/src/workflows/domains/tax.js +187 -0
- package/dist/src/workflows/domains/tax.js.map +1 -0
- package/dist/src/workflows/domains/unemployment.d.ts +105 -0
- package/dist/src/workflows/domains/unemployment.js +122 -0
- package/dist/src/workflows/domains/unemployment.js.map +1 -0
- package/dist/src/workflows/domains/veterans.d.ts +189 -0
- package/dist/src/workflows/domains/veterans.js +380 -0
- package/dist/src/workflows/domains/veterans.js.map +1 -0
- package/dist/src/workflows/fees.d.ts +15 -0
- package/dist/src/workflows/fees.js +93 -0
- package/dist/src/workflows/fees.js.map +1 -0
- package/dist/src/workflows/helpers.d.ts +8 -0
- package/dist/src/workflows/helpers.js +66 -0
- package/dist/src/workflows/helpers.js.map +1 -0
- package/dist/src/workflows/io.d.ts +3 -0
- package/dist/src/workflows/io.js +38 -0
- package/dist/src/workflows/io.js.map +1 -0
- package/dist/src/workflows/registry.d.ts +51355 -0
- package/dist/src/workflows/registry.js +140 -0
- package/dist/src/workflows/registry.js.map +1 -0
- package/dist/src/workflows/schemas/benefits.d.ts +78 -0
- package/dist/src/workflows/schemas/benefits.js +91 -0
- package/dist/src/workflows/schemas/benefits.js.map +1 -0
- package/dist/src/workflows/schemas/common.d.ts +27 -0
- package/dist/src/workflows/schemas/common.js +28 -0
- package/dist/src/workflows/schemas/common.js.map +1 -0
- package/dist/src/workflows/schemas/education.d.ts +70 -0
- package/dist/src/workflows/schemas/education.js +85 -0
- package/dist/src/workflows/schemas/education.js.map +1 -0
- package/dist/src/workflows/schemas/estate.d.ts +64 -0
- package/dist/src/workflows/schemas/estate.js +85 -0
- package/dist/src/workflows/schemas/estate.js.map +1 -0
- package/dist/src/workflows/schemas/healthcare-ext.d.ts +15 -0
- package/dist/src/workflows/schemas/healthcare-ext.js +17 -0
- package/dist/src/workflows/schemas/healthcare-ext.js.map +1 -0
- package/dist/src/workflows/schemas/healthcare.d.ts +33 -0
- package/dist/src/workflows/schemas/healthcare.js +20 -0
- package/dist/src/workflows/schemas/healthcare.js.map +1 -0
- package/dist/src/workflows/schemas/identity-domain.d.ts +64 -0
- package/dist/src/workflows/schemas/identity-domain.js +87 -0
- package/dist/src/workflows/schemas/identity-domain.js.map +1 -0
- package/dist/src/workflows/schemas/immigration-ext.d.ts +63 -0
- package/dist/src/workflows/schemas/immigration-ext.js +58 -0
- package/dist/src/workflows/schemas/immigration-ext.js.map +1 -0
- package/dist/src/workflows/schemas/immigration.d.ts +48 -0
- package/dist/src/workflows/schemas/immigration.js +27 -0
- package/dist/src/workflows/schemas/immigration.js.map +1 -0
- package/dist/src/workflows/schemas/legal.d.ts +45 -0
- package/dist/src/workflows/schemas/legal.js +45 -0
- package/dist/src/workflows/schemas/legal.js.map +1 -0
- package/dist/src/workflows/schemas/planning.d.ts +23 -0
- package/dist/src/workflows/schemas/planning.js +15 -0
- package/dist/src/workflows/schemas/planning.js.map +1 -0
- package/dist/src/workflows/schemas/retirement.d.ts +14 -0
- package/dist/src/workflows/schemas/retirement.js +22 -0
- package/dist/src/workflows/schemas/retirement.js.map +1 -0
- package/dist/src/workflows/schemas/tax.d.ts +58 -0
- package/dist/src/workflows/schemas/tax.js +51 -0
- package/dist/src/workflows/schemas/tax.js.map +1 -0
- package/dist/src/workflows/schemas/unemployment.d.ts +33 -0
- package/dist/src/workflows/schemas/unemployment.js +19 -0
- package/dist/src/workflows/schemas/unemployment.js.map +1 -0
- package/dist/src/workflows/schemas/veterans.d.ts +47 -0
- package/dist/src/workflows/schemas/veterans.js +51 -0
- package/dist/src/workflows/schemas/veterans.js.map +1 -0
- package/dist/src/workflows/types.d.ts +9 -0
- package/dist/src/workflows/types.js +2 -0
- package/dist/src/workflows/types.js.map +1 -0
- package/dist/xmcp.config.d.ts +3 -0
- package/dist/xmcp.config.js +29 -0
- package/dist/xmcp.config.js.map +1 -0
- package/llms.txt +48 -0
- package/package.json +82 -0
|
@@ -0,0 +1,155 @@
|
|
|
1
|
+
import { buildEvidenceItem, buildGenericSummary, currency, genericArtifacts, makeCheck, makeFlag, } from "../helpers.js";
|
|
2
|
+
import { ssaEstimatorInputSchema } from "../schemas/retirement.js";
|
|
3
|
+
// ---------------------------------------------------------------------------
|
|
4
|
+
// SSA PIA calculation (simplified)
|
|
5
|
+
// ---------------------------------------------------------------------------
|
|
6
|
+
// 2025 bend points (approximate)
|
|
7
|
+
const BEND_POINT_1 = 1_174;
|
|
8
|
+
const BEND_POINT_2 = 7_078;
|
|
9
|
+
function calculatePia(aime) {
|
|
10
|
+
let pia = 0;
|
|
11
|
+
if (aime <= BEND_POINT_1) {
|
|
12
|
+
pia = aime * 0.9;
|
|
13
|
+
}
|
|
14
|
+
else if (aime <= BEND_POINT_2) {
|
|
15
|
+
pia = BEND_POINT_1 * 0.9 + (aime - BEND_POINT_1) * 0.32;
|
|
16
|
+
}
|
|
17
|
+
else {
|
|
18
|
+
pia = BEND_POINT_1 * 0.9 + (BEND_POINT_2 - BEND_POINT_1) * 0.32 + (aime - BEND_POINT_2) * 0.15;
|
|
19
|
+
}
|
|
20
|
+
return Math.round(pia * 100) / 100;
|
|
21
|
+
}
|
|
22
|
+
function calculateAime(earningsHistory, currentAnnualEarnings) {
|
|
23
|
+
// Collect all earnings including current year, take highest 35 years
|
|
24
|
+
const allEarnings = [
|
|
25
|
+
...earningsHistory.map((e) => e.earnings),
|
|
26
|
+
currentAnnualEarnings,
|
|
27
|
+
].sort((a, b) => b - a);
|
|
28
|
+
// Pad with zeros if fewer than 35 years
|
|
29
|
+
while (allEarnings.length < 35) {
|
|
30
|
+
allEarnings.push(0);
|
|
31
|
+
}
|
|
32
|
+
const top35 = allEarnings.slice(0, 35);
|
|
33
|
+
const totalEarnings = top35.reduce((sum, e) => sum + e, 0);
|
|
34
|
+
return Math.round(totalEarnings / (35 * 12));
|
|
35
|
+
}
|
|
36
|
+
function buildSsaEstimatorBundle(input) {
|
|
37
|
+
const aime = calculateAime(input.earningsHistory, input.currentAnnualEarnings);
|
|
38
|
+
const pia = calculatePia(aime);
|
|
39
|
+
// Age 62: ~70% of PIA, Age 67 (FRA): 100%, Age 70: ~124%
|
|
40
|
+
const benefitAt62 = Math.round(pia * 0.7);
|
|
41
|
+
const benefitAt67 = Math.round(pia);
|
|
42
|
+
const benefitAt70 = Math.round(pia * 1.24);
|
|
43
|
+
// Spousal benefit: up to 50% of higher-earning spouse's PIA
|
|
44
|
+
let spousalBenefit;
|
|
45
|
+
if (input.spouseName && input.spouseEarnings !== undefined) {
|
|
46
|
+
spousalBenefit = Math.round(pia * 0.5);
|
|
47
|
+
}
|
|
48
|
+
// Break-even analysis: collecting at 62 vs 67
|
|
49
|
+
// Monthly difference: benefitAt67 - benefitAt62
|
|
50
|
+
// Cumulative collected at 62 during 5 years: benefitAt62 * 60
|
|
51
|
+
// Break-even months after 67: (benefitAt62 * 60) / (benefitAt67 - benefitAt62)
|
|
52
|
+
const monthlyDifference = benefitAt67 - benefitAt62;
|
|
53
|
+
const cumulativeAt62During5Years = benefitAt62 * 60;
|
|
54
|
+
const breakEvenMonthsAfter67 = monthlyDifference > 0
|
|
55
|
+
? Math.round(cumulativeAt62During5Years / monthlyDifference)
|
|
56
|
+
: 0;
|
|
57
|
+
const breakEvenAge = 67 + Math.round(breakEvenMonthsAfter67 / 12);
|
|
58
|
+
const evidence = [
|
|
59
|
+
buildEvidenceItem("ssa-statement", "Social Security Administration statement", true, input.earningsHistory.length > 0),
|
|
60
|
+
buildEvidenceItem("w2-history", "W-2 history (last 10+ years)", false, input.earningsHistory.length >= 10),
|
|
61
|
+
];
|
|
62
|
+
const flags = [];
|
|
63
|
+
if (input.earningsHistory.length < 10) {
|
|
64
|
+
flags.push(makeFlag("earningsHistory", "warning", "Fewer than 10 years of earnings history provided — estimate accuracy is limited."));
|
|
65
|
+
}
|
|
66
|
+
const checks = [
|
|
67
|
+
makeCheck("earnings-history", "Sufficient earnings history", input.earningsHistory.length >= 10, "warning", "At least 10 years of earnings history is recommended for accurate estimation."),
|
|
68
|
+
];
|
|
69
|
+
const notes = [
|
|
70
|
+
`Applicant: ${input.applicantName}. Date of birth: ${input.dob}.`,
|
|
71
|
+
`AIME (Average Indexed Monthly Earnings): ${currency(aime)}.`,
|
|
72
|
+
`PIA (Primary Insurance Amount): ${currency(pia)}.`,
|
|
73
|
+
`Estimated monthly benefit: ${currency(benefitAt62)} at 62, ${currency(benefitAt67)} at 67, ${currency(benefitAt70)} at 70.`,
|
|
74
|
+
`Break-even analysis: collecting at 62 vs 67 breaks even at approximately age ~${breakEvenAge}.`,
|
|
75
|
+
];
|
|
76
|
+
if (spousalBenefit !== undefined && input.spouseName) {
|
|
77
|
+
notes.push(`Spousal benefit (${input.spouseName}): up to ${currency(spousalBenefit)}/month (50% of worker PIA).`);
|
|
78
|
+
}
|
|
79
|
+
return {
|
|
80
|
+
workflowId: "retirement/ssa-estimator",
|
|
81
|
+
domain: "retirement",
|
|
82
|
+
title: "Social Security retirement benefit estimator",
|
|
83
|
+
summary: "Simplified SSA retirement benefit estimation using AIME/PIA formula. PigeonGov is not affiliated with SSA.",
|
|
84
|
+
applicant: undefined,
|
|
85
|
+
household: [],
|
|
86
|
+
evidence,
|
|
87
|
+
answers: input,
|
|
88
|
+
derived: {
|
|
89
|
+
aime,
|
|
90
|
+
pia,
|
|
91
|
+
benefitAt62,
|
|
92
|
+
benefitAt67,
|
|
93
|
+
benefitAt70,
|
|
94
|
+
spousalBenefit,
|
|
95
|
+
breakEvenAge,
|
|
96
|
+
yearsOfEarnings: input.earningsHistory.length,
|
|
97
|
+
},
|
|
98
|
+
validation: { checks, flaggedFields: flags },
|
|
99
|
+
review: buildGenericSummary("SSA retirement estimate", `${currency(benefitAt62)} at 62 / ${currency(benefitAt67)} at 67 / ${currency(benefitAt70)} at 70`, evidence, flags, notes),
|
|
100
|
+
outputArtifacts: genericArtifacts("retirement-ssa-estimator", evidence),
|
|
101
|
+
provenance: ["workflow-registry"],
|
|
102
|
+
};
|
|
103
|
+
}
|
|
104
|
+
// ---------------------------------------------------------------------------
|
|
105
|
+
// Export
|
|
106
|
+
// ---------------------------------------------------------------------------
|
|
107
|
+
export const retirementWorkflows = {
|
|
108
|
+
"retirement/ssa-estimator": {
|
|
109
|
+
summary: {
|
|
110
|
+
id: "retirement/ssa-estimator",
|
|
111
|
+
domain: "retirement",
|
|
112
|
+
title: "Social Security retirement benefit estimator",
|
|
113
|
+
summary: "Estimate Social Security retirement benefits at ages 62, 67, and 70 using simplified AIME/PIA calculation.",
|
|
114
|
+
status: "active",
|
|
115
|
+
audience: "individual",
|
|
116
|
+
tags: ["ssa", "retirement", "social-security", "pia", "aime", "benefits"],
|
|
117
|
+
},
|
|
118
|
+
inputSchema: ssaEstimatorInputSchema,
|
|
119
|
+
starterData: {
|
|
120
|
+
applicantName: "",
|
|
121
|
+
dob: "",
|
|
122
|
+
earningsHistory: [],
|
|
123
|
+
currentAnnualEarnings: 0,
|
|
124
|
+
},
|
|
125
|
+
sections: [
|
|
126
|
+
{
|
|
127
|
+
id: "personal-info",
|
|
128
|
+
title: "Personal Information",
|
|
129
|
+
fields: [
|
|
130
|
+
{ key: "applicantName", label: "Applicant name", type: "text" },
|
|
131
|
+
{ key: "dob", label: "Date of birth", type: "date" },
|
|
132
|
+
{ key: "spouseName", label: "Spouse name (optional)", type: "text" },
|
|
133
|
+
{ key: "spouseDob", label: "Spouse date of birth (optional)", type: "date" },
|
|
134
|
+
],
|
|
135
|
+
},
|
|
136
|
+
{
|
|
137
|
+
id: "earnings-history",
|
|
138
|
+
title: "Earnings History",
|
|
139
|
+
description: "Enter annual earnings for as many years as available. More history produces better estimates.",
|
|
140
|
+
fields: [
|
|
141
|
+
{ key: "currentAnnualEarnings", label: "Current annual earnings", type: "currency" },
|
|
142
|
+
{ key: "spouseEarnings", label: "Spouse annual earnings (optional)", type: "currency" },
|
|
143
|
+
],
|
|
144
|
+
},
|
|
145
|
+
{
|
|
146
|
+
id: "retirement-planning",
|
|
147
|
+
title: "Retirement Planning",
|
|
148
|
+
description: "Benefits are estimated at ages 62 (early), 67 (full retirement age), and 70 (delayed).",
|
|
149
|
+
fields: [],
|
|
150
|
+
},
|
|
151
|
+
],
|
|
152
|
+
buildBundle: buildSsaEstimatorBundle,
|
|
153
|
+
},
|
|
154
|
+
};
|
|
155
|
+
//# sourceMappingURL=retirement.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"retirement.js","sourceRoot":"","sources":["../../../../src/workflows/domains/retirement.ts"],"names":[],"mappings":"AACA,OAAO,EACL,iBAAiB,EACjB,mBAAmB,EACnB,QAAQ,EACR,gBAAgB,EAChB,SAAS,EACT,QAAQ,GACT,MAAM,eAAe,CAAC;AAEvB,OAAO,EAAE,uBAAuB,EAAE,MAAM,0BAA0B,CAAC;AAGnE,8EAA8E;AAC9E,mCAAmC;AACnC,8EAA8E;AAE9E,iCAAiC;AACjC,MAAM,YAAY,GAAG,KAAK,CAAC;AAC3B,MAAM,YAAY,GAAG,KAAK,CAAC;AAE3B,SAAS,YAAY,CAAC,IAAY;IAChC,IAAI,GAAG,GAAG,CAAC,CAAC;IACZ,IAAI,IAAI,IAAI,YAAY,EAAE,CAAC;QACzB,GAAG,GAAG,IAAI,GAAG,GAAG,CAAC;IACnB,CAAC;SAAM,IAAI,IAAI,IAAI,YAAY,EAAE,CAAC;QAChC,GAAG,GAAG,YAAY,GAAG,GAAG,GAAG,CAAC,IAAI,GAAG,YAAY,CAAC,GAAG,IAAI,CAAC;IAC1D,CAAC;SAAM,CAAC;QACN,GAAG,GAAG,YAAY,GAAG,GAAG,GAAG,CAAC,YAAY,GAAG,YAAY,CAAC,GAAG,IAAI,GAAG,CAAC,IAAI,GAAG,YAAY,CAAC,GAAG,IAAI,CAAC;IACjG,CAAC;IACD,OAAO,IAAI,CAAC,KAAK,CAAC,GAAG,GAAG,GAAG,CAAC,GAAG,GAAG,CAAC;AACrC,CAAC;AAED,SAAS,aAAa,CAAC,eAA0D,EAAE,qBAA6B;IAC9G,qEAAqE;IACrE,MAAM,WAAW,GAAG;QAClB,GAAG,eAAe,CAAC,GAAG,CAA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C,CAAC"}
|
|
@@ -0,0 +1,133 @@
|
|
|
1
|
+
import type { WorkflowBundle } from "../../types.js";
|
|
2
|
+
import type { TaxWorkflowInput } from "../schemas/tax.js";
|
|
3
|
+
export declare const taxWorkflows: {
|
|
4
|
+
readonly "tax/1040": {
|
|
5
|
+
summary: {
|
|
6
|
+
id: string;
|
|
7
|
+
domain: "tax";
|
|
8
|
+
title: string;
|
|
9
|
+
summary: string;
|
|
10
|
+
status: "active";
|
|
11
|
+
audience: "household";
|
|
12
|
+
tags: string[];
|
|
13
|
+
year: number;
|
|
14
|
+
legacyFormId: string;
|
|
15
|
+
};
|
|
16
|
+
inputSchema: import("zod").ZodObject<{
|
|
17
|
+
taxpayer: import("zod").ZodObject<{
|
|
18
|
+
firstName: import("zod").ZodString;
|
|
19
|
+
lastName: import("zod").ZodString;
|
|
20
|
+
ssn: import("zod").ZodDefault<import("zod").ZodString>;
|
|
21
|
+
address: import("zod").ZodObject<{
|
|
22
|
+
street1: import("zod").ZodString;
|
|
23
|
+
street2: import("zod").ZodOptional<import("zod").ZodString>;
|
|
24
|
+
city: import("zod").ZodString;
|
|
25
|
+
state: import("zod").ZodString;
|
|
26
|
+
zipCode: import("zod").ZodString;
|
|
27
|
+
}, import("zod/v4/core").$strict>;
|
|
28
|
+
}, import("zod/v4/core").$strict>;
|
|
29
|
+
spouse: import("zod").ZodOptional<import("zod").ZodObject<{
|
|
30
|
+
firstName: import("zod").ZodString;
|
|
31
|
+
lastName: import("zod").ZodString;
|
|
32
|
+
ssn: import("zod").ZodDefault<import("zod").ZodString>;
|
|
33
|
+
address: import("zod").ZodObject<{
|
|
34
|
+
street1: import("zod").ZodString;
|
|
35
|
+
street2: import("zod").ZodOptional<import("zod").ZodString>;
|
|
36
|
+
city: import("zod").ZodString;
|
|
37
|
+
state: import("zod").ZodString;
|
|
38
|
+
zipCode: import("zod").ZodString;
|
|
39
|
+
}, import("zod/v4/core").$strict>;
|
|
40
|
+
}, import("zod/v4/core").$strict>>;
|
|
41
|
+
dependents: import("zod").ZodDefault<import("zod").ZodArray<import("zod").ZodObject<{
|
|
42
|
+
name: import("zod").ZodString;
|
|
43
|
+
ssn: import("zod").ZodString;
|
|
44
|
+
relationship: import("zod").ZodString;
|
|
45
|
+
childTaxCreditEligible: import("zod").ZodBoolean;
|
|
46
|
+
eitcEligible: import("zod").ZodOptional<import("zod").ZodBoolean>;
|
|
47
|
+
}, import("zod/v4/core").$strict>>>;
|
|
48
|
+
filingStatus: import("zod").ZodEnum<{
|
|
49
|
+
single: "single";
|
|
50
|
+
married_filing_jointly: "married_filing_jointly";
|
|
51
|
+
married_filing_separately: "married_filing_separately";
|
|
52
|
+
head_of_household: "head_of_household";
|
|
53
|
+
qualifying_surviving_spouse: "qualifying_surviving_spouse";
|
|
54
|
+
}>;
|
|
55
|
+
wages: import("zod").ZodDefault<import("zod").ZodCoercedNumber<unknown>>;
|
|
56
|
+
taxableInterest: import("zod").ZodDefault<import("zod").ZodCoercedNumber<unknown>>;
|
|
57
|
+
ordinaryDividends: import("zod").ZodDefault<import("zod").ZodCoercedNumber<unknown>>;
|
|
58
|
+
scheduleCNet: import("zod").ZodDefault<import("zod").ZodCoercedNumber<unknown>>;
|
|
59
|
+
otherIncome: import("zod").ZodDefault<import("zod").ZodCoercedNumber<unknown>>;
|
|
60
|
+
adjustments: import("zod").ZodDefault<import("zod").ZodObject<{
|
|
61
|
+
educatorExpenses: import("zod").ZodDefault<import("zod").ZodCoercedNumber<unknown>>;
|
|
62
|
+
hsaDeduction: import("zod").ZodDefault<import("zod").ZodCoercedNumber<unknown>>;
|
|
63
|
+
selfEmploymentTaxDeduction: import("zod").ZodDefault<import("zod").ZodCoercedNumber<unknown>>;
|
|
64
|
+
iraDeduction: import("zod").ZodDefault<import("zod").ZodCoercedNumber<unknown>>;
|
|
65
|
+
studentLoanInterest: import("zod").ZodDefault<import("zod").ZodCoercedNumber<unknown>>;
|
|
66
|
+
}, import("zod/v4/core").$strict>>;
|
|
67
|
+
useItemizedDeductions: import("zod").ZodDefault<import("zod").ZodBoolean>;
|
|
68
|
+
itemizedDeductions: import("zod").ZodDefault<import("zod").ZodCoercedNumber<unknown>>;
|
|
69
|
+
federalWithheld: import("zod").ZodDefault<import("zod").ZodCoercedNumber<unknown>>;
|
|
70
|
+
estimatedPayments: import("zod").ZodDefault<import("zod").ZodCoercedNumber<unknown>>;
|
|
71
|
+
}, import("zod/v4/core").$strict>;
|
|
72
|
+
starterData: {
|
|
73
|
+
taxpayer: {
|
|
74
|
+
firstName: string;
|
|
75
|
+
lastName: string;
|
|
76
|
+
ssn: string;
|
|
77
|
+
address: {
|
|
78
|
+
street1: string;
|
|
79
|
+
city: string;
|
|
80
|
+
state: string;
|
|
81
|
+
zipCode: string;
|
|
82
|
+
};
|
|
83
|
+
};
|
|
84
|
+
dependents: never[];
|
|
85
|
+
filingStatus: "single";
|
|
86
|
+
wages: number;
|
|
87
|
+
taxableInterest: number;
|
|
88
|
+
ordinaryDividends: number;
|
|
89
|
+
scheduleCNet: number;
|
|
90
|
+
otherIncome: number;
|
|
91
|
+
adjustments: {
|
|
92
|
+
educatorExpenses: number;
|
|
93
|
+
hsaDeduction: number;
|
|
94
|
+
selfEmploymentTaxDeduction: number;
|
|
95
|
+
iraDeduction: number;
|
|
96
|
+
studentLoanInterest: number;
|
|
97
|
+
};
|
|
98
|
+
useItemizedDeductions: false;
|
|
99
|
+
itemizedDeductions: number;
|
|
100
|
+
federalWithheld: number;
|
|
101
|
+
estimatedPayments: number;
|
|
102
|
+
};
|
|
103
|
+
sections: ({
|
|
104
|
+
id: string;
|
|
105
|
+
title: string;
|
|
106
|
+
description: string;
|
|
107
|
+
fields: ({
|
|
108
|
+
key: string;
|
|
109
|
+
label: string;
|
|
110
|
+
type: "text";
|
|
111
|
+
options?: never;
|
|
112
|
+
} | {
|
|
113
|
+
key: string;
|
|
114
|
+
label: string;
|
|
115
|
+
type: "select";
|
|
116
|
+
options: {
|
|
117
|
+
label: string;
|
|
118
|
+
value: string;
|
|
119
|
+
}[];
|
|
120
|
+
})[];
|
|
121
|
+
} | {
|
|
122
|
+
id: string;
|
|
123
|
+
title: string;
|
|
124
|
+
fields: {
|
|
125
|
+
key: string;
|
|
126
|
+
label: string;
|
|
127
|
+
type: "currency";
|
|
128
|
+
}[];
|
|
129
|
+
description?: never;
|
|
130
|
+
})[];
|
|
131
|
+
buildBundle(input: TaxWorkflowInput): WorkflowBundle;
|
|
132
|
+
};
|
|
133
|
+
};
|
|
@@ -0,0 +1,187 @@
|
|
|
1
|
+
import { buildReturnBundle } from "../../engine/field-mapper.js";
|
|
2
|
+
import { calculateFederalTax } from "../../engine/tax-calculator.js";
|
|
3
|
+
import { validateReturnBundle } from "../../engine/validator.js";
|
|
4
|
+
import { currency } from "../helpers.js";
|
|
5
|
+
import { taxInputSchema } from "../schemas/tax.js";
|
|
6
|
+
export const taxWorkflows = {
|
|
7
|
+
"tax/1040": {
|
|
8
|
+
summary: {
|
|
9
|
+
id: "tax/1040",
|
|
10
|
+
domain: "tax",
|
|
11
|
+
title: "Federal individual return",
|
|
12
|
+
summary: "Form 1040 with Schedule 1 and Schedule C aware tax workflow for the 2025 filing season.",
|
|
13
|
+
status: "active",
|
|
14
|
+
audience: "household",
|
|
15
|
+
tags: ["irs", "tax", "refund", "w2", "schedule-c"],
|
|
16
|
+
year: 2025,
|
|
17
|
+
legacyFormId: "1040",
|
|
18
|
+
},
|
|
19
|
+
inputSchema: taxInputSchema,
|
|
20
|
+
starterData: {
|
|
21
|
+
taxpayer: {
|
|
22
|
+
firstName: "",
|
|
23
|
+
lastName: "",
|
|
24
|
+
ssn: "000-00-0000",
|
|
25
|
+
address: {
|
|
26
|
+
street1: "",
|
|
27
|
+
city: "",
|
|
28
|
+
state: "CA",
|
|
29
|
+
zipCode: "",
|
|
30
|
+
},
|
|
31
|
+
},
|
|
32
|
+
dependents: [],
|
|
33
|
+
filingStatus: "single",
|
|
34
|
+
wages: 0,
|
|
35
|
+
taxableInterest: 0,
|
|
36
|
+
ordinaryDividends: 0,
|
|
37
|
+
scheduleCNet: 0,
|
|
38
|
+
otherIncome: 0,
|
|
39
|
+
adjustments: {
|
|
40
|
+
educatorExpenses: 0,
|
|
41
|
+
hsaDeduction: 0,
|
|
42
|
+
selfEmploymentTaxDeduction: 0,
|
|
43
|
+
iraDeduction: 0,
|
|
44
|
+
studentLoanInterest: 0,
|
|
45
|
+
},
|
|
46
|
+
useItemizedDeductions: false,
|
|
47
|
+
itemizedDeductions: 0,
|
|
48
|
+
federalWithheld: 0,
|
|
49
|
+
estimatedPayments: 0,
|
|
50
|
+
},
|
|
51
|
+
sections: [
|
|
52
|
+
{
|
|
53
|
+
id: "identity",
|
|
54
|
+
title: "Identity",
|
|
55
|
+
description: "Collect the taxpayer identity and filing status.",
|
|
56
|
+
fields: [
|
|
57
|
+
{ key: "taxpayer.firstName", label: "First name", type: "text" },
|
|
58
|
+
{ key: "taxpayer.lastName", label: "Last name", type: "text" },
|
|
59
|
+
{ key: "taxpayer.ssn", label: "SSN", type: "text" },
|
|
60
|
+
{
|
|
61
|
+
key: "filingStatus",
|
|
62
|
+
label: "Filing status",
|
|
63
|
+
type: "select",
|
|
64
|
+
options: [
|
|
65
|
+
{ label: "Single", value: "single" },
|
|
66
|
+
{ label: "Married filing jointly", value: "married_filing_jointly" },
|
|
67
|
+
{ label: "Head of household", value: "head_of_household" },
|
|
68
|
+
],
|
|
69
|
+
},
|
|
70
|
+
],
|
|
71
|
+
},
|
|
72
|
+
{
|
|
73
|
+
id: "income",
|
|
74
|
+
title: "Income",
|
|
75
|
+
fields: [
|
|
76
|
+
{ key: "wages", label: "W-2 wages", type: "currency" },
|
|
77
|
+
{ key: "federalWithheld", label: "Federal withholding", type: "currency" },
|
|
78
|
+
{ key: "scheduleCNet", label: "Schedule C net", type: "currency" },
|
|
79
|
+
{ key: "otherIncome", label: "Other income", type: "currency" },
|
|
80
|
+
],
|
|
81
|
+
},
|
|
82
|
+
],
|
|
83
|
+
buildBundle(input) {
|
|
84
|
+
const calculation = calculateFederalTax({
|
|
85
|
+
filingStatus: input.filingStatus,
|
|
86
|
+
wages: input.wages,
|
|
87
|
+
taxableInterest: input.taxableInterest,
|
|
88
|
+
ordinaryDividends: input.ordinaryDividends,
|
|
89
|
+
scheduleCNet: input.scheduleCNet,
|
|
90
|
+
otherIncome: input.otherIncome,
|
|
91
|
+
adjustments: input.adjustments,
|
|
92
|
+
useItemizedDeductions: input.useItemizedDeductions,
|
|
93
|
+
itemizedDeductions: input.itemizedDeductions,
|
|
94
|
+
dependents: input.dependents,
|
|
95
|
+
federalWithheld: input.federalWithheld,
|
|
96
|
+
estimatedPayments: input.estimatedPayments,
|
|
97
|
+
});
|
|
98
|
+
const bundleInput = {
|
|
99
|
+
formId: "1040",
|
|
100
|
+
taxYear: 2025,
|
|
101
|
+
filingStatus: input.filingStatus,
|
|
102
|
+
taxpayer: input.taxpayer,
|
|
103
|
+
dependents: input.dependents,
|
|
104
|
+
importedDocuments: input.federalWithheld > 0
|
|
105
|
+
? [
|
|
106
|
+
{
|
|
107
|
+
type: "w2",
|
|
108
|
+
employerName: "Withholding input",
|
|
109
|
+
wages: input.wages,
|
|
110
|
+
federalWithheld: input.federalWithheld,
|
|
111
|
+
},
|
|
112
|
+
]
|
|
113
|
+
: [],
|
|
114
|
+
taxInput: {
|
|
115
|
+
filingStatus: input.filingStatus,
|
|
116
|
+
wages: input.wages,
|
|
117
|
+
taxableInterest: input.taxableInterest,
|
|
118
|
+
ordinaryDividends: input.ordinaryDividends,
|
|
119
|
+
scheduleCNet: input.scheduleCNet,
|
|
120
|
+
otherIncome: input.otherIncome,
|
|
121
|
+
adjustments: input.adjustments,
|
|
122
|
+
useItemizedDeductions: input.useItemizedDeductions,
|
|
123
|
+
itemizedDeductions: input.itemizedDeductions,
|
|
124
|
+
dependents: input.dependents,
|
|
125
|
+
federalWithheld: input.federalWithheld,
|
|
126
|
+
estimatedPayments: input.estimatedPayments,
|
|
127
|
+
},
|
|
128
|
+
...(input.spouse ? { spouse: input.spouse } : {}),
|
|
129
|
+
};
|
|
130
|
+
const bundle = buildReturnBundle(bundleInput);
|
|
131
|
+
const validation = validateReturnBundle(bundle);
|
|
132
|
+
return {
|
|
133
|
+
workflowId: "tax/1040",
|
|
134
|
+
domain: "tax",
|
|
135
|
+
title: "Federal individual return",
|
|
136
|
+
summary: "Deterministic 2025 federal return bundle.",
|
|
137
|
+
year: 2025,
|
|
138
|
+
legacyFormId: "1040",
|
|
139
|
+
applicant: input.taxpayer,
|
|
140
|
+
household: input.dependents.map((dependent) => ({
|
|
141
|
+
name: dependent.name,
|
|
142
|
+
relationship: dependent.relationship,
|
|
143
|
+
})),
|
|
144
|
+
evidence: [],
|
|
145
|
+
answers: input,
|
|
146
|
+
derived: {
|
|
147
|
+
refund: calculation.refund,
|
|
148
|
+
amountOwed: calculation.amountOwed,
|
|
149
|
+
taxableIncome: calculation.taxableIncome,
|
|
150
|
+
},
|
|
151
|
+
validation: {
|
|
152
|
+
checks: validation.checks,
|
|
153
|
+
flaggedFields: validation.flaggedFields,
|
|
154
|
+
},
|
|
155
|
+
review: {
|
|
156
|
+
headline: calculation.refund > 0
|
|
157
|
+
? `Refund expected: ${currency(calculation.refund)}`
|
|
158
|
+
: `Amount owed: ${currency(calculation.amountOwed)}`,
|
|
159
|
+
notes: [
|
|
160
|
+
`Gross income ${currency(calculation.grossIncome)}`,
|
|
161
|
+
`Taxable income ${currency(calculation.taxableIncome)}`,
|
|
162
|
+
`Federal tax ${currency(calculation.totalTax)}`,
|
|
163
|
+
],
|
|
164
|
+
flaggedFields: validation.flaggedFields,
|
|
165
|
+
},
|
|
166
|
+
outputArtifacts: [
|
|
167
|
+
{
|
|
168
|
+
kind: "bundle",
|
|
169
|
+
label: "1040 return bundle",
|
|
170
|
+
format: "json",
|
|
171
|
+
path: "1040-2025-filled.json",
|
|
172
|
+
},
|
|
173
|
+
{
|
|
174
|
+
kind: "review",
|
|
175
|
+
label: "Return review PDF",
|
|
176
|
+
format: "pdf",
|
|
177
|
+
path: "1040-2025-filled.pdf",
|
|
178
|
+
},
|
|
179
|
+
],
|
|
180
|
+
provenance: ["calculation-engine", "field-mapper", "validator"],
|
|
181
|
+
filledForm: bundle,
|
|
182
|
+
calculation,
|
|
183
|
+
};
|
|
184
|
+
},
|
|
185
|
+
},
|
|
186
|
+
};
|
|
187
|
+
//# sourceMappingURL=tax.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tax.js","sourceRoot":"","sources":["../../../../src/workflows/domains/tax.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,8BAA8B,CAAC;AACjE,OAAO,EAAE,mBAAmB,EAAE,MAAM,gCAAgC,CAAC;AACrE,OAAO,EAAE,oBAAoB,EAAE,MAAM,2BAA2B,CAAC;AAEjE,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AACzC,OAAO,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AAInD,MAAM,CAAC,MAAM,YAAY,GAAG;IAC1B,UAAU,EAAE;QACV,OAAO,EAAE;YACP,EAAE,EAAE,UAAU;YACd,MAAM,EAAE,KAAK;YACb,KAAK,EAAE,2BAA2B;YAClC,OAAO,EAAE,yFAAyF;YAClG,MAAM,EAAE,QAAQ;YAChB,QAAQ,EAAE,WAAW;YACrB,IAAI,EAAE,CAAC,KAAK,EAAE,KAAK,EAAE,QAAQ,EAAE,IAAI,EAAE,YAAY,CAAC;YAClD,IAAI,EAAE,IAAI;YACV,YAAY,EAAE,MAAM;SACrB;QACD,WAAW,EAAE,cAAc;QAC3B,WAAW,EAAE;YACX,QAAQ,EAAE;gBACR,SAAS,EAAE,EAAE;gBACb,QAAQ,EAAE,EAAE;gBACZ,GAAG,EAAE,aAAa;gBAClB,OAAO,EAAE;oBACP,OAAO,EAAE,EAAE;oBACX,IAAI,EAAE,EAAE;oBACR,KAAK,EAAE,IAAI;oBACX,OAAO,EAAE,EAAE;iBACZ;aACF;YACD,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employmentWorkflowInput } from "../schemas/unemployment.js";
|
|
3
|
+
export declare const unemploymentWorkflows: {
|
|
4
|
+
readonly "unemployment/claim-intake": {
|
|
5
|
+
summary: {
|
|
6
|
+
id: string;
|
|
7
|
+
domain: "unemployment";
|
|
8
|
+
title: string;
|
|
9
|
+
summary: string;
|
|
10
|
+
status: "active";
|
|
11
|
+
audience: "individual";
|
|
12
|
+
tags: string[];
|
|
13
|
+
};
|
|
14
|
+
inputSchema: import("zod").ZodObject<{
|
|
15
|
+
applicant: import("zod").ZodObject<{
|
|
16
|
+
firstName: import("zod").ZodString;
|
|
17
|
+
lastName: import("zod").ZodString;
|
|
18
|
+
ssn: import("zod").ZodDefault<import("zod").ZodString>;
|
|
19
|
+
address: import("zod").ZodObject<{
|
|
20
|
+
street1: import("zod").ZodString;
|
|
21
|
+
street2: import("zod").ZodOptional<import("zod").ZodString>;
|
|
22
|
+
city: import("zod").ZodString;
|
|
23
|
+
state: import("zod").ZodString;
|
|
24
|
+
zipCode: import("zod").ZodString;
|
|
25
|
+
}, import("zod/v4/core").$strict>;
|
|
26
|
+
}, import("zod/v4/core").$strict>;
|
|
27
|
+
stateOfClaim: import("zod").ZodString;
|
|
28
|
+
lastEmployerName: import("zod").ZodString;
|
|
29
|
+
lastDayWorked: import("zod").ZodString;
|
|
30
|
+
separationReason: import("zod").ZodEnum<{
|
|
31
|
+
laid_off: "laid_off";
|
|
32
|
+
hours_reduced: "hours_reduced";
|
|
33
|
+
fired: "fired";
|
|
34
|
+
quit: "quit";
|
|
35
|
+
seasonal_end: "seasonal_end";
|
|
36
|
+
}>;
|
|
37
|
+
wagesLast12Months: import("zod").ZodCoercedNumber<unknown>;
|
|
38
|
+
receivingSeverance: import("zod").ZodDefault<import("zod").ZodBoolean>;
|
|
39
|
+
availableForWork: import("zod").ZodDefault<import("zod").ZodBoolean>;
|
|
40
|
+
identityProofAvailable: import("zod").ZodDefault<import("zod").ZodBoolean>;
|
|
41
|
+
wageProofAvailable: import("zod").ZodDefault<import("zod").ZodBoolean>;
|
|
42
|
+
separationNoticeAvailable: import("zod").ZodDefault<import("zod").ZodBoolean>;
|
|
43
|
+
notes: import("zod").ZodOptional<import("zod").ZodString>;
|
|
44
|
+
}, import("zod/v4/core").$strict>;
|
|
45
|
+
starterData: {
|
|
46
|
+
applicant: {
|
|
47
|
+
firstName: string;
|
|
48
|
+
lastName: string;
|
|
49
|
+
ssn: string;
|
|
50
|
+
address: {
|
|
51
|
+
street1: string;
|
|
52
|
+
city: string;
|
|
53
|
+
state: string;
|
|
54
|
+
zipCode: string;
|
|
55
|
+
};
|
|
56
|
+
};
|
|
57
|
+
stateOfClaim: string;
|
|
58
|
+
lastEmployerName: string;
|
|
59
|
+
lastDayWorked: string;
|
|
60
|
+
separationReason: "laid_off";
|
|
61
|
+
wagesLast12Months: number;
|
|
62
|
+
receivingSeverance: false;
|
|
63
|
+
availableForWork: true;
|
|
64
|
+
identityProofAvailable: false;
|
|
65
|
+
wageProofAvailable: false;
|
|
66
|
+
separationNoticeAvailable: false;
|
|
67
|
+
};
|
|
68
|
+
sections: ({
|
|
69
|
+
id: string;
|
|
70
|
+
title: string;
|
|
71
|
+
fields: ({
|
|
72
|
+
key: string;
|
|
73
|
+
label: string;
|
|
74
|
+
type: "text";
|
|
75
|
+
} | {
|
|
76
|
+
key: string;
|
|
77
|
+
label: string;
|
|
78
|
+
type: "date";
|
|
79
|
+
})[];
|
|
80
|
+
} | {
|
|
81
|
+
id: string;
|
|
82
|
+
title: string;
|
|
83
|
+
fields: ({
|
|
84
|
+
key: string;
|
|
85
|
+
label: string;
|
|
86
|
+
type: "select";
|
|
87
|
+
options: {
|
|
88
|
+
label: string;
|
|
89
|
+
value: string;
|
|
90
|
+
}[];
|
|
91
|
+
} | {
|
|
92
|
+
key: string;
|
|
93
|
+
label: string;
|
|
94
|
+
type: "confirm";
|
|
95
|
+
options?: never;
|
|
96
|
+
} | {
|
|
97
|
+
key: string;
|
|
98
|
+
label: string;
|
|
99
|
+
type: "currency";
|
|
100
|
+
options?: never;
|
|
101
|
+
})[];
|
|
102
|
+
})[];
|
|
103
|
+
buildBundle(input: UnemploymentWorkflowInput): WorkflowBundle;
|
|
104
|
+
};
|
|
105
|
+
};
|