openfatture 2.2.0__tar.gz → 2.4.0__tar.gz
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.
- {openfatture-2.2.0 → openfatture-2.4.0}/PKG-INFO +24 -13
- {openfatture-2.2.0 → openfatture-2.4.0}/README.md +11 -4
- {openfatture-2.2.0 → openfatture-2.4.0}/openfatture/__init__.py +2 -2
- {openfatture-2.2.0 → openfatture-2.4.0}/openfatture/ai/agents/compliance/rules.py +7 -3
- {openfatture-2.2.0 → openfatture-2.4.0}/openfatture/ai/agents/compliance/sdi_patterns.py +1 -1
- {openfatture-2.2.0 → openfatture-2.4.0}/openfatture/ai/domain/prompt.py +18 -10
- {openfatture-2.2.0 → openfatture-2.4.0}/openfatture/ai/domain/response.py +4 -1
- {openfatture-2.2.0 → openfatture-2.4.0}/openfatture/ai/orchestration/__init__.py +19 -9
- {openfatture-2.2.0 → openfatture-2.4.0}/openfatture/ai/orchestration/native_tools.py +0 -1
- {openfatture-2.2.0 → openfatture-2.4.0}/openfatture/ai/orchestration/react.py +2 -2
- {openfatture-2.2.0 → openfatture-2.4.0}/openfatture/ai/orchestration/workflows/__init__.py +18 -12
- {openfatture-2.2.0 → openfatture-2.4.0}/openfatture/ai/orchestration/workflows/invoice_creation.py +11 -0
- {openfatture-2.2.0 → openfatture-2.4.0}/openfatture/ai/providers/factory.py +5 -1
- {openfatture-2.2.0 → openfatture-2.4.0}/openfatture/ai/providers/openai.py +2 -1
- openfatture-2.4.0/openfatture/ai/runtime/contracts.py +66 -0
- {openfatture-2.2.0 → openfatture-2.4.0}/openfatture/ai/runtime/graph.py +17 -3
- {openfatture-2.2.0 → openfatture-2.4.0}/openfatture/ai/runtime/graph_backend.py +30 -17
- {openfatture-2.2.0 → openfatture-2.4.0}/openfatture/ai/runtime/prompt.py +3 -0
- {openfatture-2.2.0 → openfatture-2.4.0}/openfatture/ai/runtime/service.py +150 -37
- {openfatture-2.2.0 → openfatture-2.4.0}/openfatture/ai/tools/invoice_tools/__init__.py +211 -1
- openfatture-2.4.0/openfatture/ai/tools/invoice_tools/line_helpers.py +231 -0
- openfatture-2.4.0/openfatture/ai/tools/invoice_tools/nota_credito.py +9 -0
- {openfatture-2.2.0 → openfatture-2.4.0}/openfatture/ai/tools/models.py +4 -4
- {openfatture-2.2.0 → openfatture-2.4.0}/openfatture/ai/tools/registry/core.py +145 -29
- {openfatture-2.2.0 → openfatture-2.4.0}/openfatture/ai/tools/registry/defaults.py +1 -1
- openfatture-2.4.0/openfatture/ai/tools/registry/policy.py +234 -0
- openfatture-2.4.0/openfatture/billing/application/nota_credito_ops.py +242 -0
- {openfatture-2.2.0 → openfatture-2.4.0}/openfatture/billing/fatture/service.py +15 -0
- openfatture-2.4.0/openfatture/cli/assistant_ui.py +166 -0
- openfatture-2.4.0/openfatture/cli/commands/assistant.py +229 -0
- {openfatture-2.2.0 → openfatture-2.4.0}/openfatture/cli/commands/cliente.py +7 -0
- {openfatture-2.2.0 → openfatture-2.4.0}/openfatture/cli/commands/config.py +4 -1
- {openfatture-2.2.0 → openfatture-2.4.0}/openfatture/cli/commands/fattura.py +71 -11
- {openfatture-2.2.0 → openfatture-2.4.0}/openfatture/cli/commands/init.py +42 -6
- {openfatture-2.2.0 → openfatture-2.4.0}/openfatture/cli/commands/status.py +56 -3
- {openfatture-2.2.0 → openfatture-2.4.0}/openfatture/cli/config_file.py +2 -0
- openfatture-2.4.0/openfatture/cli/database.py +31 -0
- {openfatture-2.2.0 → openfatture-2.4.0}/openfatture/cli/formatters/html.py +1 -1
- {openfatture-2.2.0 → openfatture-2.4.0}/openfatture/cli/formatters/markdown.py +1 -1
- {openfatture-2.2.0 → openfatture-2.4.0}/openfatture/cli/formatters/rich_formatter.py +1 -1
- {openfatture-2.2.0 → openfatture-2.4.0}/openfatture/cli/formatters/utils.py +4 -4
- {openfatture-2.2.0 → openfatture-2.4.0}/openfatture/cli/main.py +9 -2
- {openfatture-2.2.0 → openfatture-2.4.0}/openfatture/events/ai_events.py +13 -0
- {openfatture-2.2.0 → openfatture-2.4.0}/openfatture/events/persistence.py +3 -1
- {openfatture-2.2.0 → openfatture-2.4.0}/openfatture/hooks/executor.py +4 -1
- {openfatture-2.2.0 → openfatture-2.4.0}/openfatture/i18n/locales/en/cli.ftl +40 -0
- {openfatture-2.2.0 → openfatture-2.4.0}/openfatture/i18n/locales/it/cli.ftl +40 -0
- {openfatture-2.2.0 → openfatture-2.4.0}/openfatture/payment/application/notifications/notifier.py +16 -5
- {openfatture-2.2.0 → openfatture-2.4.0}/openfatture/payment/application/payment_commands.py +24 -1
- {openfatture-2.2.0 → openfatture-2.4.0}/openfatture/payment/templates/reminder_email.html +1 -1
- {openfatture-2.2.0 → openfatture-2.4.0}/openfatture/payment/templates/reminder_email.txt +1 -1
- {openfatture-2.2.0 → openfatture-2.4.0}/openfatture/pdf/components/header.py +39 -1
- {openfatture-2.2.0 → openfatture-2.4.0}/openfatture/pdf/components/table.py +36 -1
- {openfatture-2.2.0 → openfatture-2.4.0}/openfatture/pdf/generator.py +73 -10
- openfatture-2.4.0/openfatture/pdf/templates/base.py +766 -0
- {openfatture-2.2.0 → openfatture-2.4.0}/openfatture/pdf/tool_ops.py +4 -0
- {openfatture-2.2.0 → openfatture-2.4.0}/openfatture/platform/config.py +30 -12
- {openfatture-2.2.0 → openfatture-2.4.0}/openfatture/platform/logging.py +66 -22
- {openfatture-2.2.0 → openfatture-2.4.0}/openfatture/platform/validators.py +29 -0
- {openfatture-2.2.0 → openfatture-2.4.0}/openfatture/sdi/application/invoice_sdi_ops.py +31 -0
- openfatture-2.4.0/openfatture/sdi/schemas/FatturaPA_v1.2.2.xsd +1454 -0
- openfatture-2.4.0/openfatture/sdi/schemas/README.md +30 -0
- openfatture-2.4.0/openfatture/sdi/schemas/__init__.py +1 -0
- openfatture-2.4.0/openfatture/sdi/schemas/xmldsig-core-schema.xsd +318 -0
- {openfatture-2.2.0 → openfatture-2.4.0}/openfatture/sdi/validator/xsd_validator.py +35 -29
- {openfatture-2.2.0 → openfatture-2.4.0}/openfatture/sdi/xml_builder/fatturapa.py +39 -5
- {openfatture-2.2.0 → openfatture-2.4.0}/openfatture/storage/database/models.py +15 -0
- {openfatture-2.2.0 → openfatture-2.4.0}/pyproject.toml +26 -5
- {openfatture-2.2.0 → openfatture-2.4.0}/tests/ai/domain/test_prompt.py +9 -1
- {openfatture-2.2.0 → openfatture-2.4.0}/tests/ai/test_assistant_runtime.py +4 -4
- openfatture-2.4.0/tests/ai/test_confirmation_gate.py +89 -0
- {openfatture-2.2.0 → openfatture-2.4.0}/tests/ai/test_native_tool_calling.py +2 -2
- {openfatture-2.2.0 → openfatture-2.4.0}/tests/ai/test_react_orchestration_integration.py +3 -4
- openfatture-2.4.0/tests/ai/test_runtime_completion.py +149 -0
- openfatture-2.4.0/tests/ai/test_tool_confirmation.py +504 -0
- {openfatture-2.2.0 → openfatture-2.4.0}/tests/ai/test_tool_loop_graph.py +1 -1
- openfatture-2.4.0/tests/ai/test_tool_retry_policy.py +55 -0
- openfatture-2.4.0/tests/cli/test_assistant_presentation.py +103 -0
- openfatture-2.4.0/tests/cli/test_assistant_pty.py +159 -0
- openfatture-2.4.0/tests/cli/test_credential_presentation.py +56 -0
- {openfatture-2.2.0 → openfatture-2.4.0}/tests/cli/test_fattura_commands.py +46 -0
- openfatture-2.4.0/tests/cli/test_fresh_database_commands.py +57 -0
- {openfatture-2.2.0 → openfatture-2.4.0}/tests/cli/test_init_commands.py +72 -5
- {openfatture-2.2.0 → openfatture-2.4.0}/tests/cli/test_public_surface.py +32 -0
- {openfatture-2.2.0 → openfatture-2.4.0}/tests/cli/test_slash_commands.py +3 -5
- {openfatture-2.2.0 → openfatture-2.4.0}/tests/cli/test_status_readiness.py +62 -1
- {openfatture-2.2.0 → openfatture-2.4.0}/tests/conftest.py +47 -2
- openfatture-2.4.0/tests/fixtures/minimal_fatturapa.xml +75 -0
- {openfatture-2.2.0 → openfatture-2.4.0}/tests/hooks/test_executor.py +21 -0
- {openfatture-2.2.0 → openfatture-2.4.0}/tests/integration/test_invoice_workflow.py +2 -2
- openfatture-2.4.0/tests/integration/test_nota_credito_workflow.py +370 -0
- {openfatture-2.2.0 → openfatture-2.4.0}/tests/payment/application/notifications/test_notifier.py +3 -3
- openfatture-2.4.0/tests/payment/application/notifications/test_notifier_autoescape.py +54 -0
- {openfatture-2.2.0 → openfatture-2.4.0}/tests/pdf/test_pdf_generator.py +142 -0
- openfatture-2.4.0/tests/pdf/test_single_row_invoice_page_count.py +160 -0
- {openfatture-2.2.0 → openfatture-2.4.0}/tests/platform/test_config.py +30 -0
- openfatture-2.4.0/tests/unit/test_bollo_assolto_virtuale.py +187 -0
- openfatture-2.4.0/tests/unit/test_data_emissione_independent.py +178 -0
- openfatture-2.4.0/tests/unit/test_issued_elsewhere_flag.py +285 -0
- openfatture-2.4.0/tests/unit/test_line_helpers.py +137 -0
- openfatture-2.4.0/tests/unit/test_payment_terms_immediate.py +483 -0
- openfatture-2.4.0/tests/unit/test_pdf_dati_riepilogo.py +309 -0
- {openfatture-2.2.0 → openfatture-2.4.0}/tests/unit/test_xsd_validator.py +135 -139
- openfatture-2.2.0/.actrc +0 -29
- openfatture-2.2.0/.bumpversion.toml +0 -21
- openfatture-2.2.0/.dockerignore +0 -97
- openfatture-2.2.0/.env.example +0 -263
- openfatture-2.2.0/.gitattributes +0 -19
- openfatture-2.2.0/.github/ISSUE_TEMPLATE/bug_report.md +0 -48
- openfatture-2.2.0/.github/ISSUE_TEMPLATE/feature_request.md +0 -34
- openfatture-2.2.0/.github/copilot-instructions.md +0 -29
- openfatture-2.2.0/.github/dependabot.yml +0 -32
- openfatture-2.2.0/.github/pull_request_template.md +0 -39
- openfatture-2.2.0/.github/workflows/demo-validation.yml +0 -51
- openfatture-2.2.0/.github/workflows/deploy-landing.yml +0 -55
- openfatture-2.2.0/.github/workflows/payment-tests.yml +0 -242
- openfatture-2.2.0/.github/workflows/performance.yml +0 -361
- openfatture-2.2.0/.github/workflows/release.yml +0 -96
- openfatture-2.2.0/.github/workflows/test.yml +0 -189
- openfatture-2.2.0/.pre-commit-config.yaml +0 -28
- openfatture-2.2.0/.python-version +0 -1
- openfatture-2.2.0/.secrets.example +0 -27
- openfatture-2.2.0/CHANGELOG.md +0 -427
- openfatture-2.2.0/CLAUDE.md +0 -50
- openfatture-2.2.0/CONTRIBUTING.md +0 -258
- openfatture-2.2.0/Dockerfile +0 -59
- openfatture-2.2.0/Dockerfile.payment +0 -108
- openfatture-2.2.0/Makefile +0 -47
- openfatture-2.2.0/QUICKSTART.md +0 -56
- openfatture-2.2.0/SECURITY.md +0 -205
- openfatture-2.2.0/alembic/README +0 -1
- openfatture-2.2.0/alembic/env.py +0 -85
- openfatture-2.2.0/alembic/script.py.mako +0 -28
- openfatture-2.2.0/alembic/versions/21807fbe7cd6_add_natura_and_dati_cassa_previdenziale.py +0 -64
- openfatture-2.2.0/alembic/versions/692d8837_add_prodotto_id_to_riga_fattura.py +0 -61
- openfatture-2.2.0/alembic/versions/c5568d1a4226_add_composite_indexes_for_performance.py +0 -43
- openfatture-2.2.0/alembic.ini +0 -147
- openfatture-2.2.0/docker-compose.yml +0 -69
- openfatture-2.2.0/docs/AI_ARCHITECTURE.md +0 -85
- openfatture-2.2.0/docs/ARCHITECTURE.md +0 -92
- openfatture-2.2.0/docs/ARCHITECTURE_DIAGRAMS.md +0 -749
- openfatture-2.2.0/docs/ARCHITECTURE_REDESIGN.md +0 -350
- openfatture-2.2.0/docs/CLI_REFERENCE.md +0 -73
- openfatture-2.2.0/docs/CONFIGURATION.md +0 -95
- openfatture-2.2.0/docs/CORE_VS_EXTENSIONS.md +0 -188
- openfatture-2.2.0/docs/DEVELOPMENT.md +0 -100
- openfatture-2.2.0/docs/EMAIL_TEMPLATES.md +0 -361
- openfatture-2.2.0/docs/GLOSSARY.md +0 -19
- openfatture-2.2.0/docs/I18N_CLI_IMPLEMENTATION.md +0 -381
- openfatture-2.2.0/docs/I18N_CLI_PHASE2_COMPLETE.md +0 -315
- openfatture-2.2.0/docs/I18N_IMPLEMENTATION_SUMMARY.md +0 -257
- openfatture-2.2.0/docs/PDF_GENERATION.md +0 -968
- openfatture-2.2.0/docs/PERFORMANCE_TESTING.md +0 -552
- openfatture-2.2.0/docs/QUICKSTART.md +0 -542
- openfatture-2.2.0/docs/README.md +0 -46
- openfatture-2.2.0/docs/SDI_TRANSPORT_READINESS.md +0 -249
- openfatture-2.2.0/docs/STATUS.md +0 -64
- openfatture-2.2.0/docs/TECHNICAL_DEBT.md +0 -252
- openfatture-2.2.0/docs/examples/custom-commands/cliente-info.yaml +0 -40
- openfatture-2.2.0/docs/examples/custom-commands/compliance-check.yaml +0 -67
- openfatture-2.2.0/docs/examples/custom-commands/fattura-rapida.yaml +0 -30
- openfatture-2.2.0/docs/examples/custom-commands/iva.yaml +0 -32
- openfatture-2.2.0/docs/examples/custom-commands/report-mensile.yaml +0 -55
- openfatture-2.2.0/docs/guidelines/BEST_PRACTICES_2025.md +0 -395
- openfatture-2.2.0/docs/guidelines/REACT_BEST_PRACTICES.md +0 -900
- openfatture-2.2.0/docs/history/FIX_SUMMARY.md +0 -301
- openfatture-2.2.0/docs/history/IMPLEMENTATION_SUMMARY.md +0 -177
- openfatture-2.2.0/docs/history/NEXT_RELEASE_PLAN.md +0 -125
- openfatture-2.2.0/docs/history/PHASE_1_SUMMARY.md +0 -420
- openfatture-2.2.0/docs/history/PHASE_2_SUMMARY.md +0 -571
- openfatture-2.2.0/docs/history/PHASE_4_1_SUMMARY.md +0 -556
- openfatture-2.2.0/docs/history/PHASE_4_2_SUMMARY.md +0 -390
- openfatture-2.2.0/docs/history/PHASE_4_3_SUMMARY.md +0 -482
- openfatture-2.2.0/docs/history/PHASE_4_SUMMARY.md +0 -3015
- openfatture-2.2.0/docs/history/ROADMAP.md +0 -189
- openfatture-2.2.0/docs/history/i18n/I18N_EXTRACTION_SUMMARY.md +0 -386
- openfatture-2.2.0/docs/history/i18n/I18N_INDEX.md +0 -390
- openfatture-2.2.0/docs/history/i18n/I18N_MIGRATION_GUIDE.md +0 -553
- openfatture-2.2.0/docs/history/i18n/I18N_REFERENCE_QUICK.txt +0 -341
- openfatture-2.2.0/docs/history/i18n/I18N_STRINGS_EXTRACTION.md +0 -449
- openfatture-2.2.0/docs/history/i18n/I18N_STRINGS_STRUCTURED.json +0 -1060
- openfatture-2.2.0/docs/history/i18n/README.md +0 -9
- openfatture-2.2.0/docs/history/lightning/LIGHTNING_COMPLIANCE_ITALIA.md +0 -550
- openfatture-2.2.0/docs/history/lightning/LIGHTNING_INTEGRATION.md +0 -961
- openfatture-2.2.0/docs/history/lightning/LIGHTNING_NETWORK.md +0 -563
- openfatture-2.2.0/docs/history/lightning/LIGHTNING_TROUBLESHOOTING.md +0 -767
- openfatture-2.2.0/docs/history/lightning/README.md +0 -20
- openfatture-2.2.0/docs/history/session_final_summary.md +0 -140
- openfatture-2.2.0/docs/releases/v1.0.0.md +0 -80
- openfatture-2.2.0/docs/releases/v1.0.1.md +0 -29
- openfatture-2.2.0/docs/releases/v1.1.0.md +0 -38
- openfatture-2.2.0/docs/releases/v1.2.0.md +0 -25
- openfatture-2.2.0/docs/releases/v1.3.0.md +0 -24
- openfatture-2.2.0/docs/releases/v1.3.1.md +0 -8
- openfatture-2.2.0/docs/releases/v2.0.0.md +0 -113
- openfatture-2.2.0/docs/releases/v2.0.1.md +0 -34
- openfatture-2.2.0/docs/releases/v2.0.2.md +0 -14
- openfatture-2.2.0/docs/releases/v2.1.0.md +0 -25
- openfatture-2.2.0/docs/releases/v2.2.0.md +0 -133
- openfatture-2.2.0/docs/reports/COVERAGE_IMPROVEMENT_PLAN.md +0 -488
- openfatture-2.2.0/docs/reports/COVERAGE_PROGRESS.md +0 -253
- openfatture-2.2.0/docs/reports/TEST_RESULTS_SUMMARY.md +0 -354
- openfatture-2.2.0/docs/reports/VALIDATION_REPORT.md +0 -348
- openfatture-2.2.0/examples/AI_CHAT_ASSISTANT.md +0 -590
- openfatture-2.2.0/examples/AI_INVOICE_ASSISTANT.md +0 -135
- openfatture-2.2.0/examples/AI_TAX_ADVISOR.md +0 -129
- openfatture-2.2.0/examples/ai_invoice_assistant.py +0 -287
- openfatture-2.2.0/examples/ai_tax_advisor.py +0 -308
- openfatture-2.2.0/examples/demo/README.md +0 -28
- openfatture-2.2.0/examples/demo/clients.csv +0 -4
- openfatture-2.2.0/examples/demo/invoices.csv +0 -4
- openfatture-2.2.0/examples/demo/products.csv +0 -4
- openfatture-2.2.0/examples/demo/sdi-notifications/NS_2025-003.xml +0 -13
- openfatture-2.2.0/examples/demo/sdi-notifications/RC_2025-002.xml +0 -21
- openfatture-2.2.0/examples/demo/sdi-notifications/README.md +0 -14
- openfatture-2.2.0/examples/email_templates_example.py +0 -258
- openfatture-2.2.0/examples/hooks/README.md +0 -262
- openfatture-2.2.0/examples/hooks/on-sdi-notification.sh +0 -94
- openfatture-2.2.0/examples/hooks/post-ai-command.py +0 -117
- openfatture-2.2.0/examples/hooks/post-batch-import.sh +0 -52
- openfatture-2.2.0/examples/hooks/post-client-create.py +0 -89
- openfatture-2.2.0/examples/hooks/post-invoice-create-backup.py +0 -82
- openfatture-2.2.0/examples/hooks/post-invoice-send-slack.sh +0 -77
- openfatture-2.2.0/examples/i18n_demo.py +0 -173
- openfatture-2.2.0/examples/payment_examples.py +0 -836
- openfatture-2.2.0/examples/pdf_examples.py +0 -741
- openfatture-2.2.0/landing-page/index.html +0 -434
- openfatture-2.2.0/landing-page/main.js +0 -20
- openfatture-2.2.0/landing-page/package-lock.json +0 -872
- openfatture-2.2.0/landing-page/package.json +0 -14
- openfatture-2.2.0/landing-page/public/.nojekyll +0 -0
- openfatture-2.2.0/landing-page/public/CNAME +0 -1
- openfatture-2.2.0/landing-page/style.css +0 -630
- openfatture-2.2.0/landing-page/vite.config.js +0 -8
- openfatture-2.2.0/makefiles/base.mk +0 -99
- openfatture-2.2.0/makefiles/ci.mk +0 -241
- openfatture-2.2.0/makefiles/dev.mk +0 -197
- openfatture-2.2.0/makefiles/docker.mk +0 -198
- openfatture-2.2.0/makefiles/test.mk +0 -244
- openfatture-2.2.0/media/alerts_config.json +0 -70
- openfatture-2.2.0/media/automation/quickstart.tape +0 -19
- openfatture-2.2.0/media/dashboard.html +0 -533
- openfatture-2.2.0/media/dashboard_api.py +0 -217
- openfatture-2.2.0/media/metrics/costs.json +0 -22
- openfatture-2.2.0/media/metrics/performance.json +0 -18
- openfatture-2.2.0/media/metrics/runs.json +0 -34
- openfatture-2.2.0/media/presets/OBS_OF-1440p60.json +0 -59
- openfatture-2.2.0/media/presets/README.md +0 -10
- openfatture-2.2.0/media/presets/resolve_of_timeline.yaml +0 -38
- openfatture-2.2.0/openfatture/cli/commands/assistant.py +0 -206
- openfatture-2.2.0/openfatture/pdf/templates/base.py +0 -353
- openfatture-2.2.0/reports/coverage/coverage.payment.ini +0 -13
- openfatture-2.2.0/scripts/_cli_introspect.py +0 -60
- openfatture-2.2.0/scripts/_fix_ftl_blank_values.py +0 -76
- openfatture-2.2.0/scripts/_strip_emojis.py +0 -94
- openfatture-2.2.0/scripts/demo.sh +0 -12
- openfatture-2.2.0/scripts/generate_cli_ftl.py +0 -127
- openfatture-2.2.0/scripts/init_vector_store.py +0 -131
- openfatture-2.2.0/scripts/migrate_config.py +0 -35
- openfatture-2.2.0/scripts/notifications.py +0 -300
- openfatture-2.2.0/scripts/save_performance_baseline.sh +0 -55
- openfatture-2.2.0/scripts/test-actions.sh +0 -26
- openfatture-2.2.0/scripts/validate-actions.sh +0 -26
- openfatture-2.2.0/scripts/validate_tool_schemas.py +0 -133
- openfatture-2.2.0/stubs/grpc/__init__.pyi +0 -28
- openfatture-2.2.0/stubs/grpc/aio.pyi +0 -22
- openfatture-2.2.0/stubs/openfatture/__init__.pyi +0 -1
- openfatture-2.2.0/stubs/openfatture/payment/__init__.pyi +0 -1
- openfatture-2.2.0/stubs/openfatture/payment/application/__init__.pyi +0 -1
- openfatture-2.2.0/stubs/openfatture/payment/application/services/__init__.pyi +0 -1
- openfatture-2.2.0/stubs/openfatture/payment/application/services/bank_import_service.pyi +0 -9
- openfatture-2.2.0/stubs/openfatture/payment/infrastructure/__init__.pyi +0 -1
- openfatture-2.2.0/stubs/openfatture/payment/infrastructure/ofx_parser.pyi +0 -9
- openfatture-2.2.0/stubs/plotly/__init__.pyi +0 -10
- openfatture-2.2.0/stubs/plotly/express.pyi +0 -37
- openfatture-2.2.0/stubs/plotly/graph_objects.pyi +0 -23
- openfatture-2.2.0/uv.lock +0 -5120
- {openfatture-2.2.0 → openfatture-2.4.0}/.gitignore +0 -0
- {openfatture-2.2.0 → openfatture-2.4.0}/LICENSE +0 -0
- {openfatture-2.2.0 → openfatture-2.4.0}/openfatture/ai/__init__.py +0 -0
- {openfatture-2.2.0 → openfatture-2.4.0}/openfatture/ai/agents/__init__.py +0 -0
- {openfatture-2.2.0 → openfatture-2.4.0}/openfatture/ai/agents/cash_flow_predictor.py +0 -0
- {openfatture-2.2.0 → openfatture-2.4.0}/openfatture/ai/agents/chat_agent.py +0 -0
- {openfatture-2.2.0 → openfatture-2.4.0}/openfatture/ai/agents/compliance/__init__.py +0 -0
- {openfatture-2.2.0 → openfatture-2.4.0}/openfatture/ai/agents/compliance/checker.py +0 -0
- {openfatture-2.2.0 → openfatture-2.4.0}/openfatture/ai/agents/compliance/heuristics.py +0 -0
- {openfatture-2.2.0 → openfatture-2.4.0}/openfatture/ai/agents/invoice_assistant.py +0 -0
- {openfatture-2.2.0 → openfatture-2.4.0}/openfatture/ai/agents/models.py +0 -0
- {openfatture-2.2.0 → openfatture-2.4.0}/openfatture/ai/agents/payment_insight_agent.py +0 -0
- {openfatture-2.2.0 → openfatture-2.4.0}/openfatture/ai/agents/tax_advisor.py +0 -0
- {openfatture-2.2.0 → openfatture-2.4.0}/openfatture/ai/cache/__init__.py +0 -0
- {openfatture-2.2.0 → openfatture-2.4.0}/openfatture/ai/cache/config.py +0 -0
- {openfatture-2.2.0 → openfatture-2.4.0}/openfatture/ai/cache/memory.py +0 -0
- {openfatture-2.2.0 → openfatture-2.4.0}/openfatture/ai/cache/provider.py +0 -0
- {openfatture-2.2.0 → openfatture-2.4.0}/openfatture/ai/cache/strategy.py +0 -0
- {openfatture-2.2.0 → openfatture-2.4.0}/openfatture/ai/cache/tool_cache.py +0 -0
- {openfatture-2.2.0 → openfatture-2.4.0}/openfatture/ai/config/__init__.py +0 -0
- {openfatture-2.2.0 → openfatture-2.4.0}/openfatture/ai/config/settings.py +0 -0
- {openfatture-2.2.0 → openfatture-2.4.0}/openfatture/ai/context/__init__.py +0 -0
- {openfatture-2.2.0 → openfatture-2.4.0}/openfatture/ai/context/enrichment.py +0 -0
- {openfatture-2.2.0 → openfatture-2.4.0}/openfatture/ai/domain/__init__.py +0 -0
- {openfatture-2.2.0 → openfatture-2.4.0}/openfatture/ai/domain/agent.py +0 -0
- {openfatture-2.2.0 → openfatture-2.4.0}/openfatture/ai/domain/context.py +0 -0
- {openfatture-2.2.0 → openfatture-2.4.0}/openfatture/ai/domain/message.py +0 -0
- {openfatture-2.2.0 → openfatture-2.4.0}/openfatture/ai/feedback/__init__.py +0 -0
- {openfatture-2.2.0 → openfatture-2.4.0}/openfatture/ai/feedback/analytics.py +0 -0
- {openfatture-2.2.0 → openfatture-2.4.0}/openfatture/ai/feedback/models.py +0 -0
- {openfatture-2.2.0 → openfatture-2.4.0}/openfatture/ai/feedback/service.py +0 -0
- {openfatture-2.2.0 → openfatture-2.4.0}/openfatture/ai/ml/__init__.py +0 -0
- {openfatture-2.2.0 → openfatture-2.4.0}/openfatture/ai/ml/config.py +0 -0
- {openfatture-2.2.0 → openfatture-2.4.0}/openfatture/ai/ml/data_loader.py +0 -0
- {openfatture-2.2.0 → openfatture-2.4.0}/openfatture/ai/ml/features.py +0 -0
- {openfatture-2.2.0 → openfatture-2.4.0}/openfatture/ai/ml/models/__init__.py +0 -0
- {openfatture-2.2.0 → openfatture-2.4.0}/openfatture/ai/ml/models/ensemble.py +0 -0
- {openfatture-2.2.0 → openfatture-2.4.0}/openfatture/ai/ml/models/prophet_model.py +0 -0
- {openfatture-2.2.0 → openfatture-2.4.0}/openfatture/ai/ml/models/xgboost_model.py +0 -0
- {openfatture-2.2.0 → openfatture-2.4.0}/openfatture/ai/ml/retraining/__init__.py +0 -0
- {openfatture-2.2.0 → openfatture-2.4.0}/openfatture/ai/ml/retraining/config.py +0 -0
- {openfatture-2.2.0 → openfatture-2.4.0}/openfatture/ai/ml/retraining/evaluator.py +0 -0
- {openfatture-2.2.0 → openfatture-2.4.0}/openfatture/ai/ml/retraining/scheduler.py +0 -0
- {openfatture-2.2.0 → openfatture-2.4.0}/openfatture/ai/ml/retraining/triggers.py +0 -0
- {openfatture-2.2.0 → openfatture-2.4.0}/openfatture/ai/ml/retraining/versioning.py +0 -0
- {openfatture-2.2.0 → openfatture-2.4.0}/openfatture/ai/orchestration/human_loop.py +0 -0
- {openfatture-2.2.0 → openfatture-2.4.0}/openfatture/ai/orchestration/parsers.py +0 -0
- {openfatture-2.2.0 → openfatture-2.4.0}/openfatture/ai/orchestration/resilience.py +0 -0
- {openfatture-2.2.0 → openfatture-2.4.0}/openfatture/ai/orchestration/states.py +0 -0
- {openfatture-2.2.0 → openfatture-2.4.0}/openfatture/ai/orchestration/workflows/cash_flow_analysis.py +0 -0
- {openfatture-2.2.0 → openfatture-2.4.0}/openfatture/ai/orchestration/workflows/compliance_check.py +0 -0
- {openfatture-2.2.0 → openfatture-2.4.0}/openfatture/ai/prompts/__init__.py +0 -0
- {openfatture-2.2.0 → openfatture-2.4.0}/openfatture/ai/prompts/chat_assistant.yaml +0 -0
- {openfatture-2.2.0 → openfatture-2.4.0}/openfatture/ai/prompts/invoice_assistant.yaml +0 -0
- {openfatture-2.2.0 → openfatture-2.4.0}/openfatture/ai/prompts/tax_advisor.yaml +0 -0
- {openfatture-2.2.0 → openfatture-2.4.0}/openfatture/ai/providers/__init__.py +0 -0
- {openfatture-2.2.0 → openfatture-2.4.0}/openfatture/ai/providers/anthropic.py +0 -0
- {openfatture-2.2.0 → openfatture-2.4.0}/openfatture/ai/providers/base.py +0 -0
- {openfatture-2.2.0 → openfatture-2.4.0}/openfatture/ai/providers/ollama.py +0 -0
- {openfatture-2.2.0 → openfatture-2.4.0}/openfatture/ai/rag/__init__.py +0 -0
- {openfatture-2.2.0 → openfatture-2.4.0}/openfatture/ai/rag/auto_update/__init__.py +0 -0
- {openfatture-2.2.0 → openfatture-2.4.0}/openfatture/ai/rag/auto_update/config.py +0 -0
- {openfatture-2.2.0 → openfatture-2.4.0}/openfatture/ai/rag/auto_update/listeners.py +0 -0
- {openfatture-2.2.0 → openfatture-2.4.0}/openfatture/ai/rag/auto_update/queue.py +0 -0
- {openfatture-2.2.0 → openfatture-2.4.0}/openfatture/ai/rag/auto_update/service.py +0 -0
- {openfatture-2.2.0 → openfatture-2.4.0}/openfatture/ai/rag/auto_update/tracker.py +0 -0
- {openfatture-2.2.0 → openfatture-2.4.0}/openfatture/ai/rag/config.py +0 -0
- {openfatture-2.2.0 → openfatture-2.4.0}/openfatture/ai/rag/embeddings.py +0 -0
- {openfatture-2.2.0 → openfatture-2.4.0}/openfatture/ai/rag/indexing.py +0 -0
- {openfatture-2.2.0 → openfatture-2.4.0}/openfatture/ai/rag/knowledge_indexer.py +0 -0
- {openfatture-2.2.0 → openfatture-2.4.0}/openfatture/ai/rag/retrieval.py +0 -0
- {openfatture-2.2.0 → openfatture-2.4.0}/openfatture/ai/rag/sources.json +0 -0
- {openfatture-2.2.0 → openfatture-2.4.0}/openfatture/ai/rag/vector_store.py +0 -0
- {openfatture-2.2.0 → openfatture-2.4.0}/openfatture/ai/runtime/__init__.py +0 -0
- {openfatture-2.2.0 → openfatture-2.4.0}/openfatture/ai/runtime/constants.py +0 -0
- {openfatture-2.2.0 → openfatture-2.4.0}/openfatture/ai/session/__init__.py +0 -0
- {openfatture-2.2.0 → openfatture-2.4.0}/openfatture/ai/session/factory.py +0 -0
- {openfatture-2.2.0 → openfatture-2.4.0}/openfatture/ai/session/file_store.py +0 -0
- {openfatture-2.2.0 → openfatture-2.4.0}/openfatture/ai/session/manager.py +0 -0
- {openfatture-2.2.0 → openfatture-2.4.0}/openfatture/ai/session/models.py +0 -0
- {openfatture-2.2.0 → openfatture-2.4.0}/openfatture/ai/session/store.py +0 -0
- {openfatture-2.2.0 → openfatture-2.4.0}/openfatture/ai/streaming/__init__.py +0 -0
- {openfatture-2.2.0 → openfatture-2.4.0}/openfatture/ai/streaming/accumulator.py +0 -0
- {openfatture-2.2.0 → openfatture-2.4.0}/openfatture/ai/streaming/events.py +0 -0
- {openfatture-2.2.0 → openfatture-2.4.0}/openfatture/ai/tools/__init__.py +0 -0
- {openfatture-2.2.0 → openfatture-2.4.0}/openfatture/ai/tools/batch_tools.py +0 -0
- {openfatture-2.2.0 → openfatture-2.4.0}/openfatture/ai/tools/client_tools.py +0 -0
- {openfatture-2.2.0 → openfatture-2.4.0}/openfatture/ai/tools/invoice_tools/invoices.py +0 -0
- {openfatture-2.2.0 → openfatture-2.4.0}/openfatture/ai/tools/invoice_tools/queries.py +0 -0
- {openfatture-2.2.0 → openfatture-2.4.0}/openfatture/ai/tools/invoice_tools/righe.py +0 -0
- {openfatture-2.2.0 → openfatture-2.4.0}/openfatture/ai/tools/invoice_tools/sdi.py +0 -0
- {openfatture-2.2.0 → openfatture-2.4.0}/openfatture/ai/tools/knowledge_tools.py +0 -0
- {openfatture-2.2.0 → openfatture-2.4.0}/openfatture/ai/tools/metrics.py +0 -0
- {openfatture-2.2.0 → openfatture-2.4.0}/openfatture/ai/tools/payment_tools.py +0 -0
- {openfatture-2.2.0 → openfatture-2.4.0}/openfatture/ai/tools/pdf_tools.py +0 -0
- {openfatture-2.2.0 → openfatture-2.4.0}/openfatture/ai/tools/preventivo_tools.py +0 -0
- {openfatture-2.2.0 → openfatture-2.4.0}/openfatture/ai/tools/prodotto_tools.py +0 -0
- {openfatture-2.2.0 → openfatture-2.4.0}/openfatture/ai/tools/registry/__init__.py +0 -0
- {openfatture-2.2.0 → openfatture-2.4.0}/openfatture/ai/tools/report_tools.py +0 -0
- {openfatture-2.2.0 → openfatture-2.4.0}/openfatture/ai/tools/sdi_tools.py +0 -0
- {openfatture-2.2.0 → openfatture-2.4.0}/openfatture/ai/tools/signature_tools.py +0 -0
- {openfatture-2.2.0 → openfatture-2.4.0}/openfatture/billing/__init__.py +0 -0
- {openfatture-2.2.0 → openfatture-2.4.0}/openfatture/billing/application/__init__.py +0 -0
- {openfatture-2.2.0 → openfatture-2.4.0}/openfatture/billing/application/batch_ops.py +0 -0
- {openfatture-2.2.0 → openfatture-2.4.0}/openfatture/billing/application/client_commands.py +0 -0
- {openfatture-2.2.0 → openfatture-2.4.0}/openfatture/billing/application/client_queries.py +0 -0
- {openfatture-2.2.0 → openfatture-2.4.0}/openfatture/billing/application/invoice_commands.py +0 -0
- {openfatture-2.2.0 → openfatture-2.4.0}/openfatture/billing/application/invoice_queries.py +0 -0
- {openfatture-2.2.0 → openfatture-2.4.0}/openfatture/billing/application/preventivo_ops.py +0 -0
- {openfatture-2.2.0 → openfatture-2.4.0}/openfatture/billing/application/prodotto_ops.py +0 -0
- {openfatture-2.2.0 → openfatture-2.4.0}/openfatture/billing/application/report_queries.py +0 -0
- {openfatture-2.2.0 → openfatture-2.4.0}/openfatture/billing/batch/__init__.py +0 -0
- {openfatture-2.2.0 → openfatture-2.4.0}/openfatture/billing/batch/invoice_processor.py +0 -0
- {openfatture-2.2.0 → openfatture-2.4.0}/openfatture/billing/batch/operations.py +0 -0
- {openfatture-2.2.0 → openfatture-2.4.0}/openfatture/billing/batch/processor.py +0 -0
- {openfatture-2.2.0 → openfatture-2.4.0}/openfatture/billing/clienti/__init__.py +0 -0
- {openfatture-2.2.0 → openfatture-2.4.0}/openfatture/billing/fatture/__init__.py +0 -0
- {openfatture-2.2.0 → openfatture-2.4.0}/openfatture/billing/fiscale/__init__.py +0 -0
- {openfatture-2.2.0 → openfatture-2.4.0}/openfatture/billing/preventivi/__init__.py +0 -0
- {openfatture-2.2.0 → openfatture-2.4.0}/openfatture/billing/preventivi/service.py +0 -0
- {openfatture-2.2.0 → openfatture-2.4.0}/openfatture/billing/prodotti/__init__.py +0 -0
- {openfatture-2.2.0 → openfatture-2.4.0}/openfatture/cli/__init__.py +0 -0
- {openfatture-2.2.0 → openfatture-2.4.0}/openfatture/cli/commands/__init__.py +0 -0
- {openfatture-2.2.0 → openfatture-2.4.0}/openfatture/cli/commands/interactive.py +0 -0
- {openfatture-2.2.0 → openfatture-2.4.0}/openfatture/cli/formatters/__init__.py +0 -0
- {openfatture-2.2.0 → openfatture-2.4.0}/openfatture/cli/formatters/base.py +0 -0
- {openfatture-2.2.0 → openfatture-2.4.0}/openfatture/cli/formatters/factory.py +0 -0
- {openfatture-2.2.0 → openfatture-2.4.0}/openfatture/cli/formatters/json.py +0 -0
- {openfatture-2.2.0 → openfatture-2.4.0}/openfatture/cli/formatters/stream_json.py +0 -0
- {openfatture-2.2.0 → openfatture-2.4.0}/openfatture/cli/lifespan.py +0 -0
- {openfatture-2.2.0 → openfatture-2.4.0}/openfatture/events/__init__.py +0 -0
- {openfatture-2.2.0 → openfatture-2.4.0}/openfatture/events/analytics.py +0 -0
- {openfatture-2.2.0 → openfatture-2.4.0}/openfatture/events/base.py +0 -0
- {openfatture-2.2.0 → openfatture-2.4.0}/openfatture/events/batch_events.py +0 -0
- {openfatture-2.2.0 → openfatture-2.4.0}/openfatture/events/client_events.py +0 -0
- {openfatture-2.2.0 → openfatture-2.4.0}/openfatture/events/invoice_events.py +0 -0
- {openfatture-2.2.0 → openfatture-2.4.0}/openfatture/events/listeners.py +0 -0
- {openfatture-2.2.0 → openfatture-2.4.0}/openfatture/events/repository.py +0 -0
- {openfatture-2.2.0 → openfatture-2.4.0}/openfatture/events/sdi_events.py +0 -0
- {openfatture-2.2.0 → openfatture-2.4.0}/openfatture/exceptions.py +0 -0
- {openfatture-2.2.0 → openfatture-2.4.0}/openfatture/hooks/__init__.py +0 -0
- {openfatture-2.2.0 → openfatture-2.4.0}/openfatture/hooks/listeners.py +0 -0
- {openfatture-2.2.0 → openfatture-2.4.0}/openfatture/hooks/models.py +0 -0
- {openfatture-2.2.0 → openfatture-2.4.0}/openfatture/hooks/registry.py +0 -0
- {openfatture-2.2.0 → openfatture-2.4.0}/openfatture/i18n/README.md +0 -0
- {openfatture-2.2.0 → openfatture-2.4.0}/openfatture/i18n/__init__.py +0 -0
- {openfatture-2.2.0 → openfatture-2.4.0}/openfatture/i18n/context.py +0 -0
- {openfatture-2.2.0 → openfatture-2.4.0}/openfatture/i18n/formatters.py +0 -0
- {openfatture-2.2.0 → openfatture-2.4.0}/openfatture/i18n/loader.py +0 -0
- {openfatture-2.2.0 → openfatture-2.4.0}/openfatture/i18n/locales/de/cli.ftl +0 -0
- {openfatture-2.2.0 → openfatture-2.4.0}/openfatture/i18n/locales/de/common.ftl +0 -0
- {openfatture-2.2.0 → openfatture-2.4.0}/openfatture/i18n/locales/de/email.ftl +0 -0
- {openfatture-2.2.0 → openfatture-2.4.0}/openfatture/i18n/locales/en/common.ftl +0 -0
- {openfatture-2.2.0 → openfatture-2.4.0}/openfatture/i18n/locales/en/email.ftl +0 -0
- {openfatture-2.2.0 → openfatture-2.4.0}/openfatture/i18n/locales/es/cli.ftl +0 -0
- {openfatture-2.2.0 → openfatture-2.4.0}/openfatture/i18n/locales/es/common.ftl +0 -0
- {openfatture-2.2.0 → openfatture-2.4.0}/openfatture/i18n/locales/es/email.ftl +0 -0
- {openfatture-2.2.0 → openfatture-2.4.0}/openfatture/i18n/locales/fr/cli.ftl +0 -0
- {openfatture-2.2.0 → openfatture-2.4.0}/openfatture/i18n/locales/fr/common.ftl +0 -0
- {openfatture-2.2.0 → openfatture-2.4.0}/openfatture/i18n/locales/fr/email.ftl +0 -0
- {openfatture-2.2.0 → openfatture-2.4.0}/openfatture/i18n/locales/it/common.ftl +0 -0
- {openfatture-2.2.0 → openfatture-2.4.0}/openfatture/i18n/locales/it/email.ftl +0 -0
- {openfatture-2.2.0 → openfatture-2.4.0}/openfatture/i18n/translator.py +0 -0
- {openfatture-2.2.0 → openfatture-2.4.0}/openfatture/payment/README.md +0 -0
- {openfatture-2.2.0 → openfatture-2.4.0}/openfatture/payment/__init__.py +0 -0
- {openfatture-2.2.0 → openfatture-2.4.0}/openfatture/payment/application/__init__.py +0 -0
- {openfatture-2.2.0 → openfatture-2.4.0}/openfatture/payment/application/events.py +0 -0
- {openfatture-2.2.0 → openfatture-2.4.0}/openfatture/payment/application/listeners.py +0 -0
- {openfatture-2.2.0 → openfatture-2.4.0}/openfatture/payment/application/notifications/__init__.py +0 -0
- {openfatture-2.2.0 → openfatture-2.4.0}/openfatture/payment/application/payment_queries.py +0 -0
- {openfatture-2.2.0 → openfatture-2.4.0}/openfatture/payment/application/services/__init__.py +0 -0
- {openfatture-2.2.0 → openfatture-2.4.0}/openfatture/payment/application/services/insight_service.py +0 -0
- {openfatture-2.2.0 → openfatture-2.4.0}/openfatture/payment/application/services/matching_service.py +0 -0
- {openfatture-2.2.0 → openfatture-2.4.0}/openfatture/payment/application/services/payment_overview.py +0 -0
- {openfatture-2.2.0 → openfatture-2.4.0}/openfatture/payment/application/services/reconciliation_service.py +0 -0
- {openfatture-2.2.0 → openfatture-2.4.0}/openfatture/payment/application/services/reminder_scheduler.py +0 -0
- {openfatture-2.2.0 → openfatture-2.4.0}/openfatture/payment/application/tool_ops.py +0 -0
- {openfatture-2.2.0 → openfatture-2.4.0}/openfatture/payment/domain/__init__.py +0 -0
- {openfatture-2.2.0 → openfatture-2.4.0}/openfatture/payment/domain/enums.py +0 -0
- {openfatture-2.2.0 → openfatture-2.4.0}/openfatture/payment/domain/models.py +0 -0
- {openfatture-2.2.0 → openfatture-2.4.0}/openfatture/payment/domain/payment_allocation.py +0 -0
- {openfatture-2.2.0 → openfatture-2.4.0}/openfatture/payment/domain/value_objects.py +0 -0
- {openfatture-2.2.0 → openfatture-2.4.0}/openfatture/payment/infrastructure/__init__.py +0 -0
- {openfatture-2.2.0 → openfatture-2.4.0}/openfatture/payment/infrastructure/importers/__init__.py +0 -0
- {openfatture-2.2.0 → openfatture-2.4.0}/openfatture/payment/infrastructure/importers/base.py +0 -0
- {openfatture-2.2.0 → openfatture-2.4.0}/openfatture/payment/infrastructure/importers/csv_importer.py +0 -0
- {openfatture-2.2.0 → openfatture-2.4.0}/openfatture/payment/infrastructure/importers/factory.py +0 -0
- {openfatture-2.2.0 → openfatture-2.4.0}/openfatture/payment/infrastructure/importers/ofx_importer.py +0 -0
- {openfatture-2.2.0 → openfatture-2.4.0}/openfatture/payment/infrastructure/importers/presets.py +0 -0
- {openfatture-2.2.0 → openfatture-2.4.0}/openfatture/payment/infrastructure/importers/qif_importer.py +0 -0
- {openfatture-2.2.0 → openfatture-2.4.0}/openfatture/payment/infrastructure/repository.py +0 -0
- {openfatture-2.2.0 → openfatture-2.4.0}/openfatture/payment/matchers/__init__.py +0 -0
- {openfatture-2.2.0 → openfatture-2.4.0}/openfatture/payment/matchers/base.py +0 -0
- {openfatture-2.2.0 → openfatture-2.4.0}/openfatture/payment/matchers/composite.py +0 -0
- {openfatture-2.2.0 → openfatture-2.4.0}/openfatture/payment/matchers/date_window.py +0 -0
- {openfatture-2.2.0 → openfatture-2.4.0}/openfatture/payment/matchers/exact.py +0 -0
- {openfatture-2.2.0 → openfatture-2.4.0}/openfatture/payment/matchers/fuzzy.py +0 -0
- {openfatture-2.2.0 → openfatture-2.4.0}/openfatture/payment/matchers/iban.py +0 -0
- {openfatture-2.2.0 → openfatture-2.4.0}/openfatture/payment/matchers/iban_formats.py +0 -0
- {openfatture-2.2.0 → openfatture-2.4.0}/openfatture/pdf/__init__.py +0 -0
- {openfatture-2.2.0 → openfatture-2.4.0}/openfatture/pdf/components/__init__.py +0 -0
- {openfatture-2.2.0 → openfatture-2.4.0}/openfatture/pdf/components/footer.py +0 -0
- {openfatture-2.2.0 → openfatture-2.4.0}/openfatture/pdf/components/qrcode.py +0 -0
- {openfatture-2.2.0 → openfatture-2.4.0}/openfatture/pdf/preventivo_generator.py +0 -0
- {openfatture-2.2.0 → openfatture-2.4.0}/openfatture/pdf/templates/__init__.py +0 -0
- {openfatture-2.2.0 → openfatture-2.4.0}/openfatture/pdf/templates/branded.py +0 -0
- {openfatture-2.2.0 → openfatture-2.4.0}/openfatture/pdf/templates/minimalist.py +0 -0
- {openfatture-2.2.0 → openfatture-2.4.0}/openfatture/pdf/templates/professional.py +0 -0
- {openfatture-2.2.0 → openfatture-2.4.0}/openfatture/platform/__init__.py +0 -0
- {openfatture-2.2.0 → openfatture-2.4.0}/openfatture/platform/assistant_backends.py +0 -0
- {openfatture-2.2.0 → openfatture-2.4.0}/openfatture/platform/async_bridge.py +0 -0
- {openfatture-2.2.0 → openfatture-2.4.0}/openfatture/platform/datetime.py +0 -0
- {openfatture-2.2.0 → openfatture-2.4.0}/openfatture/platform/email/__init__.py +0 -0
- {openfatture-2.2.0 → openfatture-2.4.0}/openfatture/platform/email/i18n/en.json +0 -0
- {openfatture-2.2.0 → openfatture-2.4.0}/openfatture/platform/email/i18n/it.json +0 -0
- {openfatture-2.2.0 → openfatture-2.4.0}/openfatture/platform/email/models.py +0 -0
- {openfatture-2.2.0 → openfatture-2.4.0}/openfatture/platform/email/renderer.py +0 -0
- {openfatture-2.2.0 → openfatture-2.4.0}/openfatture/platform/email/sender.py +0 -0
- {openfatture-2.2.0 → openfatture-2.4.0}/openfatture/platform/email/styles.py +0 -0
- {openfatture-2.2.0 → openfatture-2.4.0}/openfatture/platform/email/templates/base.html +0 -0
- {openfatture-2.2.0 → openfatture-2.4.0}/openfatture/platform/email/templates/base.txt +0 -0
- {openfatture-2.2.0 → openfatture-2.4.0}/openfatture/platform/email/templates/batch/riepilogo_batch.html +0 -0
- {openfatture-2.2.0 → openfatture-2.4.0}/openfatture/platform/email/templates/batch/riepilogo_batch.txt +0 -0
- {openfatture-2.2.0 → openfatture-2.4.0}/openfatture/platform/email/templates/sdi/invio_fattura.html +0 -0
- {openfatture-2.2.0 → openfatture-2.4.0}/openfatture/platform/email/templates/sdi/invio_fattura.txt +0 -0
- {openfatture-2.2.0 → openfatture-2.4.0}/openfatture/platform/email/templates/sdi/notifica_attestazione.html +0 -0
- {openfatture-2.2.0 → openfatture-2.4.0}/openfatture/platform/email/templates/sdi/notifica_attestazione.txt +0 -0
- {openfatture-2.2.0 → openfatture-2.4.0}/openfatture/platform/email/templates/sdi/notifica_consegna.html +0 -0
- {openfatture-2.2.0 → openfatture-2.4.0}/openfatture/platform/email/templates/sdi/notifica_consegna.txt +0 -0
- {openfatture-2.2.0 → openfatture-2.4.0}/openfatture/platform/email/templates/sdi/notifica_esito_accettata.html +0 -0
- {openfatture-2.2.0 → openfatture-2.4.0}/openfatture/platform/email/templates/sdi/notifica_esito_accettata.txt +0 -0
- {openfatture-2.2.0 → openfatture-2.4.0}/openfatture/platform/email/templates/sdi/notifica_esito_rifiutata.html +0 -0
- {openfatture-2.2.0 → openfatture-2.4.0}/openfatture/platform/email/templates/sdi/notifica_esito_rifiutata.txt +0 -0
- {openfatture-2.2.0 → openfatture-2.4.0}/openfatture/platform/email/templates/sdi/notifica_mancata_consegna.html +0 -0
- {openfatture-2.2.0 → openfatture-2.4.0}/openfatture/platform/email/templates/sdi/notifica_mancata_consegna.txt +0 -0
- {openfatture-2.2.0 → openfatture-2.4.0}/openfatture/platform/email/templates/sdi/notifica_scarto.html +0 -0
- {openfatture-2.2.0 → openfatture-2.4.0}/openfatture/platform/email/templates/sdi/notifica_scarto.txt +0 -0
- {openfatture-2.2.0 → openfatture-2.4.0}/openfatture/platform/email/templates/test/test_email.html +0 -0
- {openfatture-2.2.0 → openfatture-2.4.0}/openfatture/platform/email/templates/test/test_email.txt +0 -0
- {openfatture-2.2.0 → openfatture-2.4.0}/openfatture/platform/extras.py +0 -0
- {openfatture-2.2.0 → openfatture-2.4.0}/openfatture/platform/metrics.py +0 -0
- {openfatture-2.2.0 → openfatture-2.4.0}/openfatture/platform/rate_limiter.py +0 -0
- {openfatture-2.2.0 → openfatture-2.4.0}/openfatture/platform/retry.py +0 -0
- {openfatture-2.2.0 → openfatture-2.4.0}/openfatture/platform/security.py +0 -0
- {openfatture-2.2.0 → openfatture-2.4.0}/openfatture/py.typed +0 -0
- {openfatture-2.2.0 → openfatture-2.4.0}/openfatture/sdi/__init__.py +0 -0
- {openfatture-2.2.0 → openfatture-2.4.0}/openfatture/sdi/application/__init__.py +0 -0
- {openfatture-2.2.0 → openfatture-2.4.0}/openfatture/sdi/application/signature_ops.py +0 -0
- {openfatture-2.2.0 → openfatture-2.4.0}/openfatture/sdi/application/tool_ops.py +0 -0
- {openfatture-2.2.0 → openfatture-2.4.0}/openfatture/sdi/digital_signature/__init__.py +0 -0
- {openfatture-2.2.0 → openfatture-2.4.0}/openfatture/sdi/digital_signature/certificate_manager.py +0 -0
- {openfatture-2.2.0 → openfatture-2.4.0}/openfatture/sdi/digital_signature/signer.py +0 -0
- {openfatture-2.2.0 → openfatture-2.4.0}/openfatture/sdi/digital_signature/verifier.py +0 -0
- {openfatture-2.2.0 → openfatture-2.4.0}/openfatture/sdi/notifiche/__init__.py +0 -0
- {openfatture-2.2.0 → openfatture-2.4.0}/openfatture/sdi/notifiche/parser.py +0 -0
- {openfatture-2.2.0 → openfatture-2.4.0}/openfatture/sdi/notifiche/processor.py +0 -0
- {openfatture-2.2.0 → openfatture-2.4.0}/openfatture/sdi/pec_sender/__init__.py +0 -0
- {openfatture-2.2.0 → openfatture-2.4.0}/openfatture/sdi/pec_sender/sender.py +0 -0
- {openfatture-2.2.0 → openfatture-2.4.0}/openfatture/sdi/validator/__init__.py +0 -0
- {openfatture-2.2.0 → openfatture-2.4.0}/openfatture/sdi/xml_builder/__init__.py +0 -0
- {openfatture-2.2.0 → openfatture-2.4.0}/openfatture/storage/__init__.py +0 -0
- {openfatture-2.2.0 → openfatture-2.4.0}/openfatture/storage/database/__init__.py +0 -0
- {openfatture-2.2.0 → openfatture-2.4.0}/openfatture/storage/database/base.py +0 -0
- {openfatture-2.2.0 → openfatture-2.4.0}/openfatture/storage/session.py +0 -0
- {openfatture-2.2.0 → openfatture-2.4.0}/tests/__init__.py +0 -0
- {openfatture-2.2.0 → openfatture-2.4.0}/tests/ai/__init__.py +0 -0
- {openfatture-2.2.0 → openfatture-2.4.0}/tests/ai/cache/__init__.py +0 -0
- {openfatture-2.2.0 → openfatture-2.4.0}/tests/ai/cache/test_cached_provider.py +0 -0
- {openfatture-2.2.0 → openfatture-2.4.0}/tests/ai/cache/test_lru_cache.py +0 -0
- {openfatture-2.2.0 → openfatture-2.4.0}/tests/ai/conftest.py +0 -0
- {openfatture-2.2.0 → openfatture-2.4.0}/tests/ai/domain/test_message.py +0 -0
- {openfatture-2.2.0 → openfatture-2.4.0}/tests/ai/feedback/__init__.py +0 -0
- {openfatture-2.2.0 → openfatture-2.4.0}/tests/ai/feedback/test_feedback_service.py +0 -0
- {openfatture-2.2.0 → openfatture-2.4.0}/tests/ai/rag/__init__.py +0 -0
- {openfatture-2.2.0 → openfatture-2.4.0}/tests/ai/rag/performance/__init__.py +0 -0
- {openfatture-2.2.0 → openfatture-2.4.0}/tests/ai/rag/performance/conftest.py +0 -0
- {openfatture-2.2.0 → openfatture-2.4.0}/tests/ai/rag/performance/test_embeddings_performance.py +0 -0
- {openfatture-2.2.0 → openfatture-2.4.0}/tests/ai/rag/performance/test_indexing_performance.py +0 -0
- {openfatture-2.2.0 → openfatture-2.4.0}/tests/ai/rag/performance/test_retrieval_performance.py +0 -0
- {openfatture-2.2.0 → openfatture-2.4.0}/tests/ai/rag/performance/test_vector_store_performance.py +0 -0
- {openfatture-2.2.0 → openfatture-2.4.0}/tests/ai/rag/test_auto_update.py +0 -0
- {openfatture-2.2.0 → openfatture-2.4.0}/tests/ai/rag/test_embeddings.py +0 -0
- {openfatture-2.2.0 → openfatture-2.4.0}/tests/ai/rag/test_reindex_queue_honesty.py +0 -0
- {openfatture-2.2.0 → openfatture-2.4.0}/tests/ai/rag/test_vector_store.py +0 -0
- {openfatture-2.2.0 → openfatture-2.4.0}/tests/ai/session/__init__.py +0 -0
- {openfatture-2.2.0 → openfatture-2.4.0}/tests/ai/session/test_factory.py +0 -0
- {openfatture-2.2.0 → openfatture-2.4.0}/tests/ai/session/test_file_store.py +0 -0
- {openfatture-2.2.0 → openfatture-2.4.0}/tests/ai/streaming/__init__.py +0 -0
- {openfatture-2.2.0 → openfatture-2.4.0}/tests/ai/streaming/test_accumulator.py +0 -0
- {openfatture-2.2.0 → openfatture-2.4.0}/tests/ai/streaming/test_events.py +0 -0
- {openfatture-2.2.0 → openfatture-2.4.0}/tests/ai/test_anthropic_integration.py +0 -0
- {openfatture-2.2.0 → openfatture-2.4.0}/tests/ai/test_assistant_backend_parity.py +0 -0
- {openfatture-2.2.0 → openfatture-2.4.0}/tests/ai/test_cache_config.py +0 -0
- {openfatture-2.2.0 → openfatture-2.4.0}/tests/ai/test_cash_flow_predictor_training.py +0 -0
- {openfatture-2.2.0 → openfatture-2.4.0}/tests/ai/test_invoice_assistant_integration.py +0 -0
- {openfatture-2.2.0 → openfatture-2.4.0}/tests/ai/test_invoice_assistant_unit.py +0 -0
- {openfatture-2.2.0 → openfatture-2.4.0}/tests/ai/test_invoice_creation_workflow.py +0 -0
- {openfatture-2.2.0 → openfatture-2.4.0}/tests/ai/test_invoice_workflows.py +0 -0
- {openfatture-2.2.0 → openfatture-2.4.0}/tests/ai/test_ollama_integration.py +0 -0
- {openfatture-2.2.0 → openfatture-2.4.0}/tests/ai/test_openai_integration.py +0 -0
- {openfatture-2.2.0 → openfatture-2.4.0}/tests/ai/test_orchestration_states.py +0 -0
- {openfatture-2.2.0 → openfatture-2.4.0}/tests/ai/test_property_based.py +0 -0
- {openfatture-2.2.0 → openfatture-2.4.0}/tests/ai/test_react_e2e_ollama.py +0 -0
- {openfatture-2.2.0 → openfatture-2.4.0}/tests/ai/test_react_orchestration.py +0 -0
- {openfatture-2.2.0 → openfatture-2.4.0}/tests/ai/test_streaming.py +0 -0
- {openfatture-2.2.0 → openfatture-2.4.0}/tests/ai/test_tax_advisor_integration.py +0 -0
- {openfatture-2.2.0 → openfatture-2.4.0}/tests/ai/test_token_counter.py +0 -0
- {openfatture-2.2.0 → openfatture-2.4.0}/tests/ai/test_tool_loop_parity.py +0 -0
- {openfatture-2.2.0 → openfatture-2.4.0}/tests/ai/test_tools_circuit_breaker.py +0 -0
- {openfatture-2.2.0 → openfatture-2.4.0}/tests/ai/test_tools_client.py +0 -0
- {openfatture-2.2.0 → openfatture-2.4.0}/tests/ai/test_tools_invoice.py +0 -0
- {openfatture-2.2.0 → openfatture-2.4.0}/tests/ai/test_tools_knowledge.py +0 -0
- {openfatture-2.2.0 → openfatture-2.4.0}/tests/ai/test_tools_models.py +0 -0
- {openfatture-2.2.0 → openfatture-2.4.0}/tests/ai/test_tools_payment_import.py +0 -0
- {openfatture-2.2.0 → openfatture-2.4.0}/tests/ai/test_tools_registry_openai_format.py +0 -0
- {openfatture-2.2.0 → openfatture-2.4.0}/tests/billing/test_preventivo_service.py +0 -0
- {openfatture-2.2.0 → openfatture-2.4.0}/tests/billing/test_preventivo_service_extended.py +0 -0
- {openfatture-2.2.0 → openfatture-2.4.0}/tests/cli/__init__.py +0 -0
- {openfatture-2.2.0 → openfatture-2.4.0}/tests/cli/acceptance/__init__.py +0 -0
- {openfatture-2.2.0 → openfatture-2.4.0}/tests/cli/e2e/__init__.py +0 -0
- {openfatture-2.2.0 → openfatture-2.4.0}/tests/cli/formatters/__init__.py +0 -0
- {openfatture-2.2.0 → openfatture-2.4.0}/tests/cli/formatters/test_formatters.py +0 -0
- {openfatture-2.2.0 → openfatture-2.4.0}/tests/cli/formatters/test_formatters_integration.py +0 -0
- {openfatture-2.2.0 → openfatture-2.4.0}/tests/cli/formatters/test_formatters_performance.py +0 -0
- {openfatture-2.2.0 → openfatture-2.4.0}/tests/cli/performance/__init__.py +0 -0
- {openfatture-2.2.0 → openfatture-2.4.0}/tests/cli/test_cliente_commands.py +0 -0
- {openfatture-2.2.0 → openfatture-2.4.0}/tests/cli/test_config_commands.py +0 -0
- {openfatture-2.2.0 → openfatture-2.4.0}/tests/cli/test_fattura_events.py +0 -0
- {openfatture-2.2.0 → openfatture-2.4.0}/tests/cli/ui/__init__.py +0 -0
- {openfatture-2.2.0 → openfatture-2.4.0}/tests/events/__init__.py +0 -0
- {openfatture-2.2.0 → openfatture-2.4.0}/tests/events/test_analytics.py +0 -0
- {openfatture-2.2.0 → openfatture-2.4.0}/tests/events/test_event_bus.py +0 -0
- {openfatture-2.2.0 → openfatture-2.4.0}/tests/events/test_event_persistence.py +0 -0
- {openfatture-2.2.0 → openfatture-2.4.0}/tests/events/test_repository.py +0 -0
- {openfatture-2.2.0 → openfatture-2.4.0}/tests/hooks/__init__.py +0 -0
- {openfatture-2.2.0 → openfatture-2.4.0}/tests/hooks/test_integration.py +0 -0
- {openfatture-2.2.0 → openfatture-2.4.0}/tests/hooks/test_registry.py +0 -0
- {openfatture-2.2.0 → openfatture-2.4.0}/tests/i18n/__init__.py +0 -0
- {openfatture-2.2.0 → openfatture-2.4.0}/tests/i18n/test_basic.py +0 -0
- {openfatture-2.2.0 → openfatture-2.4.0}/tests/i18n/test_cli_translations.py +0 -0
- {openfatture-2.2.0 → openfatture-2.4.0}/tests/integration/__init__.py +0 -0
- {openfatture-2.2.0 → openfatture-2.4.0}/tests/integration/performance/__init__.py +0 -0
- {openfatture-2.2.0 → openfatture-2.4.0}/tests/integration/performance/conftest.py +0 -0
- {openfatture-2.2.0 → openfatture-2.4.0}/tests/integration/performance/test_e2e_performance.py +0 -0
- {openfatture-2.2.0 → openfatture-2.4.0}/tests/integration/test_preventivo_conversion.py +0 -0
- {openfatture-2.2.0 → openfatture-2.4.0}/tests/payment/__init__.py +0 -0
- {openfatture-2.2.0 → openfatture-2.4.0}/tests/payment/application/__init__.py +0 -0
- {openfatture-2.2.0 → openfatture-2.4.0}/tests/payment/application/fake_listeners.py +0 -0
- {openfatture-2.2.0 → openfatture-2.4.0}/tests/payment/application/notifications/__init__.py +0 -0
- {openfatture-2.2.0 → openfatture-2.4.0}/tests/payment/application/services/__init__.py +0 -0
- {openfatture-2.2.0 → openfatture-2.4.0}/tests/payment/application/services/test_matching_service.py +0 -0
- {openfatture-2.2.0 → openfatture-2.4.0}/tests/payment/application/services/test_payment_overview.py +0 -0
- {openfatture-2.2.0 → openfatture-2.4.0}/tests/payment/application/services/test_reconciliation_service.py +0 -0
- {openfatture-2.2.0 → openfatture-2.4.0}/tests/payment/application/services/test_reminder_scheduler.py +0 -0
- {openfatture-2.2.0 → openfatture-2.4.0}/tests/payment/application/services/test_transaction_insight_service.py +0 -0
- {openfatture-2.2.0 → openfatture-2.4.0}/tests/payment/application/test_event_listeners.py +0 -0
- {openfatture-2.2.0 → openfatture-2.4.0}/tests/payment/conftest.py +0 -0
- {openfatture-2.2.0 → openfatture-2.4.0}/tests/payment/domain/__init__.py +0 -0
- {openfatture-2.2.0 → openfatture-2.4.0}/tests/payment/domain/test_enums.py +0 -0
- {openfatture-2.2.0 → openfatture-2.4.0}/tests/payment/domain/test_models.py +0 -0
- {openfatture-2.2.0 → openfatture-2.4.0}/tests/payment/domain/test_value_objects.py +0 -0
- {openfatture-2.2.0 → openfatture-2.4.0}/tests/payment/fixtures/intesa_sanpaolo_sample.csv +0 -0
- {openfatture-2.2.0 → openfatture-2.4.0}/tests/payment/fixtures/revolut_sample.csv +0 -0
- {openfatture-2.2.0 → openfatture-2.4.0}/tests/payment/fixtures/sample_statement.ofx +0 -0
- {openfatture-2.2.0 → openfatture-2.4.0}/tests/payment/fixtures/sample_statement.qif +0 -0
- {openfatture-2.2.0 → openfatture-2.4.0}/tests/payment/fixtures/unicredit_sample.csv +0 -0
- {openfatture-2.2.0 → openfatture-2.4.0}/tests/payment/infrastructure/__init__.py +0 -0
- {openfatture-2.2.0 → openfatture-2.4.0}/tests/payment/infrastructure/importers/__init__.py +0 -0
- {openfatture-2.2.0 → openfatture-2.4.0}/tests/payment/infrastructure/importers/test_base_importer_unit.py +0 -0
- {openfatture-2.2.0 → openfatture-2.4.0}/tests/payment/infrastructure/importers/test_csv_importer.py +0 -0
- {openfatture-2.2.0 → openfatture-2.4.0}/tests/payment/infrastructure/importers/test_csv_importer_unit.py +0 -0
- {openfatture-2.2.0 → openfatture-2.4.0}/tests/payment/infrastructure/importers/test_importer_factory_unit.py +0 -0
- {openfatture-2.2.0 → openfatture-2.4.0}/tests/payment/infrastructure/importers/test_ofx_importer.py +0 -0
- {openfatture-2.2.0 → openfatture-2.4.0}/tests/payment/infrastructure/importers/test_ofx_importer_unit.py +0 -0
- {openfatture-2.2.0 → openfatture-2.4.0}/tests/payment/infrastructure/importers/test_qif_importer.py +0 -0
- {openfatture-2.2.0 → openfatture-2.4.0}/tests/payment/matchers/__init__.py +0 -0
- {openfatture-2.2.0 → openfatture-2.4.0}/tests/payment/matchers/test_composite_matcher.py +0 -0
- {openfatture-2.2.0 → openfatture-2.4.0}/tests/payment/matchers/test_composite_matcher_benchmark.py +0 -0
- {openfatture-2.2.0 → openfatture-2.4.0}/tests/payment/matchers/test_date_window_matcher.py +0 -0
- {openfatture-2.2.0 → openfatture-2.4.0}/tests/payment/matchers/test_exact_matcher.py +0 -0
- {openfatture-2.2.0 → openfatture-2.4.0}/tests/payment/matchers/test_fuzzy_matcher.py +0 -0
- {openfatture-2.2.0 → openfatture-2.4.0}/tests/payment/matchers/test_fuzzy_matcher_performance.py +0 -0
- {openfatture-2.2.0 → openfatture-2.4.0}/tests/payment/matchers/test_iban_matcher.py +0 -0
- {openfatture-2.2.0 → openfatture-2.4.0}/tests/payment/matchers/test_iban_matcher_sepa.py +0 -0
- {openfatture-2.2.0 → openfatture-2.4.0}/tests/payment/test_integration_workflow.py +0 -0
- {openfatture-2.2.0 → openfatture-2.4.0}/tests/pdf/__init__.py +0 -0
- {openfatture-2.2.0 → openfatture-2.4.0}/tests/pdf/test_pdf_improvements.py +0 -0
- {openfatture-2.2.0 → openfatture-2.4.0}/tests/pdf/test_preventivo_pdf_generator.py +0 -0
- {openfatture-2.2.0 → openfatture-2.4.0}/tests/performance/README.md +0 -0
- {openfatture-2.2.0 → openfatture-2.4.0}/tests/performance/__init__.py +0 -0
- {openfatture-2.2.0 → openfatture-2.4.0}/tests/performance/fixtures.py +0 -0
- {openfatture-2.2.0 → openfatture-2.4.0}/tests/performance/report_generator.py +0 -0
- {openfatture-2.2.0 → openfatture-2.4.0}/tests/performance/utils.py +0 -0
- {openfatture-2.2.0 → openfatture-2.4.0}/tests/platform/__init__.py +0 -0
- {openfatture-2.2.0 → openfatture-2.4.0}/tests/platform/test_async_bridge.py +0 -0
- {openfatture-2.2.0 → openfatture-2.4.0}/tests/platform/test_retry.py +0 -0
- {openfatture-2.2.0 → openfatture-2.4.0}/tests/platform/test_ssot.py +0 -0
- {openfatture-2.2.0 → openfatture-2.4.0}/tests/platform/test_validators.py +0 -0
- {openfatture-2.2.0 → openfatture-2.4.0}/tests/storage/__init__.py +0 -0
- {openfatture-2.2.0 → openfatture-2.4.0}/tests/storage/conftest.py +0 -0
- {openfatture-2.2.0 → openfatture-2.4.0}/tests/storage/performance/__init__.py +0 -0
- {openfatture-2.2.0 → openfatture-2.4.0}/tests/storage/performance/conftest.py +0 -0
- {openfatture-2.2.0 → openfatture-2.4.0}/tests/storage/performance/test_database_performance.py +0 -0
- {openfatture-2.2.0 → openfatture-2.4.0}/tests/storage/test_models.py +0 -0
- {openfatture-2.2.0 → openfatture-2.4.0}/tests/storage/test_session.py +0 -0
- {openfatture-2.2.0 → openfatture-2.4.0}/tests/unit/test_ai_agent_models.py +0 -0
- {openfatture-2.2.0 → openfatture-2.4.0}/tests/unit/test_ai_invoice_assistant.py +0 -0
- {openfatture-2.2.0 → openfatture-2.4.0}/tests/unit/test_ai_tax_advisor.py +0 -0
- {openfatture-2.2.0 → openfatture-2.4.0}/tests/unit/test_batch_operations.py +0 -0
- {openfatture-2.2.0 → openfatture-2.4.0}/tests/unit/test_batch_processor.py +0 -0
- {openfatture-2.2.0 → openfatture-2.4.0}/tests/unit/test_billing_application_queries.py +0 -0
- {openfatture-2.2.0 → openfatture-2.4.0}/tests/unit/test_core_boundaries.py +0 -0
- {openfatture-2.2.0 → openfatture-2.4.0}/tests/unit/test_digital_signature.py +0 -0
- {openfatture-2.2.0 → openfatture-2.4.0}/tests/unit/test_email_templates.py +0 -0
- {openfatture-2.2.0 → openfatture-2.4.0}/tests/unit/test_extras.py +0 -0
- {openfatture-2.2.0 → openfatture-2.4.0}/tests/unit/test_invoice_service.py +0 -0
- {openfatture-2.2.0 → openfatture-2.4.0}/tests/unit/test_logging.py +0 -0
- {openfatture-2.2.0 → openfatture-2.4.0}/tests/unit/test_pec_sender.py +0 -0
- {openfatture-2.2.0 → openfatture-2.4.0}/tests/unit/test_rate_limiter.py +0 -0
- {openfatture-2.2.0 → openfatture-2.4.0}/tests/unit/test_sdi_notifiche.py +0 -0
- {openfatture-2.2.0 → openfatture-2.4.0}/tests/unit/test_security.py +0 -0
- {openfatture-2.2.0 → openfatture-2.4.0}/tests/unit/test_validators_hypothesis.py +0 -0
- {openfatture-2.2.0 → openfatture-2.4.0}/tests/unit/test_xml_builder.py +0 -0
- {openfatture-2.2.0 → openfatture-2.4.0}/tests/unit/test_xml_xsd_validation.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.5
|
|
2
2
|
Name: openfatture
|
|
3
|
-
Version: 2.
|
|
3
|
+
Version: 2.4.0
|
|
4
4
|
Summary: Open-source electronic invoicing for Italian freelancers - CLI-first with AI workflows
|
|
5
5
|
Project-URL: Homepage, https://github.com/gianlucamazza/openfatture
|
|
6
6
|
Project-URL: Repository, https://github.com/gianlucamazza/openfatture
|
|
@@ -21,7 +21,7 @@ Requires-Dist: alembic>=1.13.1
|
|
|
21
21
|
Requires-Dist: asn1crypto>=1.5.1
|
|
22
22
|
Requires-Dist: babel>=2.14.0
|
|
23
23
|
Requires-Dist: click>=8.1.7
|
|
24
|
-
Requires-Dist: cryptography>=
|
|
24
|
+
Requires-Dist: cryptography>=50.0.0
|
|
25
25
|
Requires-Dist: fluent-runtime>=0.4.0
|
|
26
26
|
Requires-Dist: httpx>=0.26.0
|
|
27
27
|
Requires-Dist: jinja2>=3.1.0
|
|
@@ -44,18 +44,20 @@ Requires-Dist: sqlalchemy>=2.0.25
|
|
|
44
44
|
Requires-Dist: structlog>=24.1.0
|
|
45
45
|
Requires-Dist: tomlkit>=0.13.0
|
|
46
46
|
Requires-Dist: typer>=0.12.0
|
|
47
|
-
Requires-Dist: urllib3>=2.
|
|
47
|
+
Requires-Dist: urllib3>=2.8.0
|
|
48
48
|
Requires-Dist: xmlschema>=3.0.1
|
|
49
49
|
Provides-Extra: ai
|
|
50
50
|
Requires-Dist: anthropic>=0.71.0; extra == 'ai'
|
|
51
|
-
Requires-Dist: langgraph>=0.6; extra == 'ai'
|
|
51
|
+
Requires-Dist: langgraph-sdk>=0.4.6; extra == 'ai'
|
|
52
|
+
Requires-Dist: langgraph>=1.2.14; extra == 'ai'
|
|
52
53
|
Requires-Dist: openai>=2.4.0; extra == 'ai'
|
|
53
54
|
Requires-Dist: tiktoken>=0.8.0; extra == 'ai'
|
|
54
55
|
Provides-Extra: all
|
|
55
56
|
Requires-Dist: anthropic>=0.71.0; extra == 'all'
|
|
56
57
|
Requires-Dist: apscheduler>=3.10.4; extra == 'all'
|
|
57
|
-
Requires-Dist: chromadb>=
|
|
58
|
-
Requires-Dist: langgraph>=0.6; extra == 'all'
|
|
58
|
+
Requires-Dist: chromadb>=1.1.1; extra == 'all'
|
|
59
|
+
Requires-Dist: langgraph-sdk>=0.4.6; extra == 'all'
|
|
60
|
+
Requires-Dist: langgraph>=1.2.14; extra == 'all'
|
|
59
61
|
Requires-Dist: numpy>=1.26.0; extra == 'all'
|
|
60
62
|
Requires-Dist: openai>=2.4.0; extra == 'all'
|
|
61
63
|
Requires-Dist: pandas>=2.3.3; extra == 'all'
|
|
@@ -72,12 +74,13 @@ Requires-Dist: lxml-stubs>=0.5.1; extra == 'dev'
|
|
|
72
74
|
Requires-Dist: mypy>=1.8.0; extra == 'dev'
|
|
73
75
|
Requires-Dist: pandas-stubs>=2.0.0; extra == 'dev'
|
|
74
76
|
Requires-Dist: pre-commit>=3.6.0; extra == 'dev'
|
|
77
|
+
Requires-Dist: pypdf>=6.21.4; extra == 'dev'
|
|
75
78
|
Requires-Dist: pytest-asyncio>=0.23.3; extra == 'dev'
|
|
76
79
|
Requires-Dist: pytest-benchmark>=4.0.0; extra == 'dev'
|
|
77
80
|
Requires-Dist: pytest-cov>=4.1.0; extra == 'dev'
|
|
78
81
|
Requires-Dist: pytest-mock>=3.12.0; extra == 'dev'
|
|
79
82
|
Requires-Dist: pytest>=8.0.0; extra == 'dev'
|
|
80
|
-
Requires-Dist: ruff<0.
|
|
83
|
+
Requires-Dist: ruff<0.18,>=0.14.0; extra == 'dev'
|
|
81
84
|
Requires-Dist: types-pyasn1>=0.5.0; extra == 'dev'
|
|
82
85
|
Requires-Dist: types-python-dateutil>=2.9.0; extra == 'dev'
|
|
83
86
|
Requires-Dist: types-pyyaml>=6.0.0; extra == 'dev'
|
|
@@ -92,8 +95,9 @@ Requires-Dist: prophet>=1.1.5; extra == 'ml'
|
|
|
92
95
|
Requires-Dist: xgboost>=2.1.0; extra == 'ml'
|
|
93
96
|
Provides-Extra: rag
|
|
94
97
|
Requires-Dist: anthropic>=0.71.0; extra == 'rag'
|
|
95
|
-
Requires-Dist: chromadb>=
|
|
96
|
-
Requires-Dist: langgraph>=0.6; extra == 'rag'
|
|
98
|
+
Requires-Dist: chromadb>=1.1.1; extra == 'rag'
|
|
99
|
+
Requires-Dist: langgraph-sdk>=0.4.6; extra == 'rag'
|
|
100
|
+
Requires-Dist: langgraph>=1.2.14; extra == 'rag'
|
|
97
101
|
Requires-Dist: openai>=2.4.0; extra == 'rag'
|
|
98
102
|
Requires-Dist: sentence-transformers>=2.6.0; extra == 'rag'
|
|
99
103
|
Requires-Dist: tiktoken>=0.8.0; extra == 'rag'
|
|
@@ -130,6 +134,13 @@ uv run openfatture assistant "Help me prepare an invoice for a software project"
|
|
|
130
134
|
Optional feature extras: `ai`, `rag`, `ml`, `all`.
|
|
131
135
|
See [docs/CONFIGURATION.md](docs/CONFIGURATION.md).
|
|
132
136
|
|
|
137
|
+
AI tools default to a read-only allowlist (`AI_ENABLED_TOOLS`). SDI/PEC send
|
|
138
|
+
stays off unless you add `send_invoice_to_sdi` there, and
|
|
139
|
+
`AI_TOOLS_REQUIRE_CONFIRMATION` (default true) requires an explicit human yes
|
|
140
|
+
before any transmit. The model cannot confirm itself. Interactive TTY
|
|
141
|
+
sessions may prompt; `source="human"` with `confirmed=True` is an API for
|
|
142
|
+
human-facing callers. No built-in UI uses that path yet (there is no TUI).
|
|
143
|
+
|
|
133
144
|
For a terminal conversation:
|
|
134
145
|
|
|
135
146
|
```bash
|
|
@@ -158,10 +169,10 @@ See [docs/CLI_REFERENCE.md](docs/CLI_REFERENCE.md).
|
|
|
158
169
|
|
|
159
170
|
## Status
|
|
160
171
|
|
|
161
|
-
Version **2.
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
[docs/releases/v2.
|
|
172
|
+
Version **2.4.0**, Python 3.12+ and `uv`. Credit notes (TD04), real XML
|
|
173
|
+
generation, professional PDF templates, and natura/DatiCassaPrevidenziale
|
|
174
|
+
support — see [docs/STATUS.md](docs/STATUS.md),
|
|
175
|
+
[docs/releases/v2.4.0.md](docs/releases/v2.4.0.md), and
|
|
165
176
|
[docs/ARCHITECTURE.md](docs/ARCHITECTURE.md).
|
|
166
177
|
|
|
167
178
|
Explicit non-goal: there is no browser frontend or web application surface,
|
|
@@ -28,6 +28,13 @@ uv run openfatture assistant "Help me prepare an invoice for a software project"
|
|
|
28
28
|
Optional feature extras: `ai`, `rag`, `ml`, `all`.
|
|
29
29
|
See [docs/CONFIGURATION.md](docs/CONFIGURATION.md).
|
|
30
30
|
|
|
31
|
+
AI tools default to a read-only allowlist (`AI_ENABLED_TOOLS`). SDI/PEC send
|
|
32
|
+
stays off unless you add `send_invoice_to_sdi` there, and
|
|
33
|
+
`AI_TOOLS_REQUIRE_CONFIRMATION` (default true) requires an explicit human yes
|
|
34
|
+
before any transmit. The model cannot confirm itself. Interactive TTY
|
|
35
|
+
sessions may prompt; `source="human"` with `confirmed=True` is an API for
|
|
36
|
+
human-facing callers. No built-in UI uses that path yet (there is no TUI).
|
|
37
|
+
|
|
31
38
|
For a terminal conversation:
|
|
32
39
|
|
|
33
40
|
```bash
|
|
@@ -56,10 +63,10 @@ See [docs/CLI_REFERENCE.md](docs/CLI_REFERENCE.md).
|
|
|
56
63
|
|
|
57
64
|
## Status
|
|
58
65
|
|
|
59
|
-
Version **2.
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
[docs/releases/v2.
|
|
66
|
+
Version **2.4.0**, Python 3.12+ and `uv`. Credit notes (TD04), real XML
|
|
67
|
+
generation, professional PDF templates, and natura/DatiCassaPrevidenziale
|
|
68
|
+
support — see [docs/STATUS.md](docs/STATUS.md),
|
|
69
|
+
[docs/releases/v2.4.0.md](docs/releases/v2.4.0.md), and
|
|
63
70
|
[docs/ARCHITECTURE.md](docs/ARCHITECTURE.md).
|
|
64
71
|
|
|
65
72
|
Explicit non-goal: there is no browser frontend or web application surface,
|
|
@@ -546,9 +546,13 @@ class ComplianceRulesEngine:
|
|
|
546
546
|
)
|
|
547
547
|
|
|
548
548
|
# FPA042: Total validation
|
|
549
|
-
# Account for ritenuta and bollo
|
|
549
|
+
# Account for ritenuta and bollo (only if not assolto virtuale)
|
|
550
|
+
bollo_charged = Decimal("0")
|
|
551
|
+
if fattura.importo_bollo > 0 and not getattr(fattura, "bollo_assolto_virtuale", False):
|
|
552
|
+
bollo_charged = fattura.importo_bollo
|
|
553
|
+
|
|
550
554
|
expected_total_final = (
|
|
551
|
-
expected_totale - (fattura.ritenuta_acconto or Decimal("0")) +
|
|
555
|
+
expected_totale - (fattura.ritenuta_acconto or Decimal("0")) + bollo_charged
|
|
552
556
|
)
|
|
553
557
|
|
|
554
558
|
if abs(fattura.totale - expected_total_final) > Decimal("0.01"):
|
|
@@ -559,7 +563,7 @@ class ComplianceRulesEngine:
|
|
|
559
563
|
field="totale",
|
|
560
564
|
message=f"Totale fattura errato (atteso: €{expected_total_final:.2f}, "
|
|
561
565
|
f"trovato: €{fattura.totale:.2f})",
|
|
562
|
-
suggestion="Ricalcolare: Imponibile + IVA - Ritenuta + Bollo",
|
|
566
|
+
suggestion="Ricalcolare: Imponibile + IVA - Ritenuta + Bollo (se non assolto virtuale)",
|
|
563
567
|
reference="FatturaPA v1.2.2 - Campo 2.4.2 (ImportoPagamento)",
|
|
564
568
|
)
|
|
565
569
|
)
|
|
@@ -272,7 +272,7 @@ class SDIPatternDatabase:
|
|
|
272
272
|
description="Totale fattura non corrisponde alla somma delle righe",
|
|
273
273
|
field_checks=["totale", "imponibile", "iva"],
|
|
274
274
|
severity="error",
|
|
275
|
-
fix_suggestion="Ricalcolare: Totale = Somma Imponibili + Somma IVA - Ritenuta + Bollo",
|
|
275
|
+
fix_suggestion="Ricalcolare: Totale = Somma Imponibili + Somma IVA - Ritenuta + Bollo (se non assolto virtuale)",
|
|
276
276
|
reference="FatturaPA v1.2.2 - Campo 2.4.2.6",
|
|
277
277
|
),
|
|
278
278
|
SDIRejectionPattern(
|
|
@@ -4,7 +4,7 @@ from pathlib import Path
|
|
|
4
4
|
from typing import Any
|
|
5
5
|
|
|
6
6
|
import yaml
|
|
7
|
-
from jinja2 import
|
|
7
|
+
from jinja2 import Template
|
|
8
8
|
from pydantic import BaseModel, ConfigDict, Field
|
|
9
9
|
|
|
10
10
|
from openfatture.platform.logging import get_logger
|
|
@@ -107,18 +107,26 @@ class PromptManager:
|
|
|
107
107
|
self.templates_dir.mkdir(parents=True, exist_ok=True)
|
|
108
108
|
logger.info("created_prompts_directory", path=str(self.templates_dir))
|
|
109
109
|
|
|
110
|
-
# Initialize Jinja2 environment
|
|
111
|
-
self.env = Environment(
|
|
112
|
-
loader=FileSystemLoader(str(templates_dir)),
|
|
113
|
-
trim_blocks=True,
|
|
114
|
-
lstrip_blocks=True,
|
|
115
|
-
)
|
|
116
|
-
|
|
117
110
|
# Cache for loaded templates
|
|
118
111
|
self._cache: dict[str, PromptTemplate] = {}
|
|
119
112
|
|
|
120
113
|
logger.info("prompt_manager_initialized", templates_dir=str(templates_dir))
|
|
121
114
|
|
|
115
|
+
def _template_yaml_path(self, name: str) -> Path:
|
|
116
|
+
"""Resolve a template name to a YAML path inside ``templates_dir``.
|
|
117
|
+
|
|
118
|
+
Rejects path separators and ``..`` so a caller-controlled name cannot
|
|
119
|
+
read files outside the templates directory.
|
|
120
|
+
"""
|
|
121
|
+
if Path(name).name != name or name in {".", ".."} or not name:
|
|
122
|
+
raise ValueError(f"Invalid template name: {name}")
|
|
123
|
+
|
|
124
|
+
yaml_path = (self.templates_dir / f"{name}.yaml").resolve()
|
|
125
|
+
templates_root = self.templates_dir.resolve()
|
|
126
|
+
if not yaml_path.is_relative_to(templates_root):
|
|
127
|
+
raise ValueError(f"Invalid template name: {name}")
|
|
128
|
+
return yaml_path
|
|
129
|
+
|
|
122
130
|
def load_template(self, name: str) -> PromptTemplate:
|
|
123
131
|
"""
|
|
124
132
|
Load prompt template from YAML file.
|
|
@@ -138,8 +146,8 @@ class PromptManager:
|
|
|
138
146
|
logger.debug("prompt_template_cache_hit", name=name)
|
|
139
147
|
return self._cache[name]
|
|
140
148
|
|
|
141
|
-
# Load from file
|
|
142
|
-
yaml_path = self.
|
|
149
|
+
# Load from file (reject path separators / traversal in the template name)
|
|
150
|
+
yaml_path = self._template_yaml_path(name)
|
|
143
151
|
|
|
144
152
|
if not yaml_path.exists():
|
|
145
153
|
raise FileNotFoundError(
|
|
@@ -34,11 +34,12 @@ class UsageMetrics(BaseModel):
|
|
|
34
34
|
completion_tokens: int = 0
|
|
35
35
|
total_tokens: int = 0
|
|
36
36
|
estimated_cost_usd: float = 0.0
|
|
37
|
+
cost_known: bool = True
|
|
37
38
|
|
|
38
39
|
@property
|
|
39
40
|
def cost_display(self) -> str:
|
|
40
41
|
"""Format cost for display."""
|
|
41
|
-
return f"${self.estimated_cost_usd:.4f}"
|
|
42
|
+
return f"${self.estimated_cost_usd:.4f}" if self.cost_known else "N/A"
|
|
42
43
|
|
|
43
44
|
|
|
44
45
|
class AgentResponse(BaseModel):
|
|
@@ -99,6 +100,8 @@ class AgentResponse(BaseModel):
|
|
|
99
100
|
"provider": self.provider,
|
|
100
101
|
"tokens_used": self.usage.total_tokens,
|
|
101
102
|
"cost_usd": self.usage.estimated_cost_usd,
|
|
103
|
+
"cost_known": self.usage.cost_known,
|
|
104
|
+
"usage_complete": self.metadata.get("usage_complete", True),
|
|
102
105
|
"latency_ms": self.latency_ms,
|
|
103
106
|
"error": self.error,
|
|
104
107
|
"confidence": self.confidence,
|
|
@@ -42,6 +42,8 @@ Key Features:
|
|
|
42
42
|
- **Observability**: Structured logging, metrics, audit trails
|
|
43
43
|
"""
|
|
44
44
|
|
|
45
|
+
from typing import Any
|
|
46
|
+
|
|
45
47
|
from openfatture import __version__
|
|
46
48
|
|
|
47
49
|
# State Management
|
|
@@ -100,15 +102,23 @@ from openfatture.ai.orchestration.states import (
|
|
|
100
102
|
create_invoice_workflow as create_invoice_state,
|
|
101
103
|
)
|
|
102
104
|
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
105
|
+
|
|
106
|
+
# Load optional workflows only when requested.
|
|
107
|
+
def __getattr__(name: str) -> Any:
|
|
108
|
+
workflow_names = {
|
|
109
|
+
"CashFlowAnalysisWorkflow",
|
|
110
|
+
"ComplianceCheckWorkflow",
|
|
111
|
+
"InvoiceCreationWorkflow",
|
|
112
|
+
"create_cash_flow_workflow",
|
|
113
|
+
"create_compliance_workflow",
|
|
114
|
+
"create_invoice_workflow",
|
|
115
|
+
}
|
|
116
|
+
if name in workflow_names:
|
|
117
|
+
from importlib import import_module
|
|
118
|
+
|
|
119
|
+
return getattr(import_module("openfatture.ai.orchestration.workflows"), name)
|
|
120
|
+
raise AttributeError(f"module {__name__!r} has no attribute {name!r}")
|
|
121
|
+
|
|
112
122
|
|
|
113
123
|
__all__ = [
|
|
114
124
|
# ========================================================================
|
|
@@ -123,6 +123,8 @@ class ReActOrchestrator:
|
|
|
123
123
|
|
|
124
124
|
# Get LLM response with temperature=0.0 for deterministic tool calling
|
|
125
125
|
response = await self.provider.generate(messages=messages, temperature=0.0)
|
|
126
|
+
if not response.success:
|
|
127
|
+
raise RuntimeError(response.error or "Provider request failed")
|
|
126
128
|
response_text = response.content
|
|
127
129
|
|
|
128
130
|
# Conditional raw response logging
|
|
@@ -175,7 +177,6 @@ class ReActOrchestrator:
|
|
|
175
177
|
result = await self.tool_registry.execute_tool(
|
|
176
178
|
tool_name=tool_call.tool_name,
|
|
177
179
|
parameters=tool_call.parameters,
|
|
178
|
-
confirm=False,
|
|
179
180
|
)
|
|
180
181
|
|
|
181
182
|
if result.success:
|
|
@@ -350,7 +351,6 @@ class ReActOrchestrator:
|
|
|
350
351
|
result = await self.tool_registry.execute_tool(
|
|
351
352
|
tool_name=tool_call.tool_name,
|
|
352
353
|
parameters=tool_call.parameters,
|
|
353
|
-
confirm=False,
|
|
354
354
|
)
|
|
355
355
|
|
|
356
356
|
if result.success:
|
|
@@ -24,18 +24,24 @@ Example:
|
|
|
24
24
|
>>> print(f"Invoice created: {result.invoice_id}")
|
|
25
25
|
"""
|
|
26
26
|
|
|
27
|
-
from
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
)
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
27
|
+
from typing import Any
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
def __getattr__(name: str) -> Any:
|
|
31
|
+
modules = {
|
|
32
|
+
"CashFlowAnalysisWorkflow": "cash_flow_analysis",
|
|
33
|
+
"create_cash_flow_workflow": "cash_flow_analysis",
|
|
34
|
+
"ComplianceCheckWorkflow": "compliance_check",
|
|
35
|
+
"create_compliance_workflow": "compliance_check",
|
|
36
|
+
"InvoiceCreationWorkflow": "invoice_creation",
|
|
37
|
+
"create_invoice_workflow": "invoice_creation",
|
|
38
|
+
}
|
|
39
|
+
if name in modules:
|
|
40
|
+
from importlib import import_module
|
|
41
|
+
|
|
42
|
+
return getattr(import_module(f"{__name__}.{modules[name]}"), name)
|
|
43
|
+
raise AttributeError(f"module {__name__!r} has no attribute {name!r}")
|
|
44
|
+
|
|
39
45
|
|
|
40
46
|
__all__ = [
|
|
41
47
|
# Invoice Creation
|
{openfatture-2.2.0 → openfatture-2.4.0}/openfatture/ai/orchestration/workflows/invoice_creation.py
RENAMED
|
@@ -579,16 +579,27 @@ class InvoiceCreationWorkflow:
|
|
|
579
579
|
|
|
580
580
|
# Update or create payment schedule
|
|
581
581
|
due_date = state.payment_due_date
|
|
582
|
+
|
|
583
|
+
# Calculate giorni_scadenza based on invoice date
|
|
584
|
+
if due_date == fattura.data_emissione:
|
|
585
|
+
giorni_scadenza = 0 # Immediate payment
|
|
586
|
+
else:
|
|
587
|
+
giorni_scadenza = (due_date - fattura.data_emissione).days
|
|
588
|
+
if giorni_scadenza < 0:
|
|
589
|
+
giorni_scadenza = 30 # Default for edge case
|
|
590
|
+
|
|
582
591
|
if fattura.pagamenti:
|
|
583
592
|
pagamento = fattura.pagamenti[0]
|
|
584
593
|
pagamento.importo = totale
|
|
585
594
|
pagamento.data_scadenza = due_date
|
|
595
|
+
pagamento.giorni_scadenza = giorni_scadenza
|
|
586
596
|
pagamento.stato = StatoPagamento.DA_PAGARE
|
|
587
597
|
else:
|
|
588
598
|
pagamento = Pagamento(
|
|
589
599
|
fattura_id=fattura.id,
|
|
590
600
|
importo=totale,
|
|
591
601
|
data_scadenza=due_date,
|
|
602
|
+
giorni_scadenza=giorni_scadenza,
|
|
592
603
|
stato=StatoPagamento.DA_PAGARE,
|
|
593
604
|
)
|
|
594
605
|
db.add(pagamento)
|
|
@@ -270,7 +270,11 @@ def _create_openai_provider(
|
|
|
270
270
|
temperature = _pop_float_param(params, "temperature", settings.temperature, provider="openai")
|
|
271
271
|
max_tokens = _pop_int_param(params, "max_tokens", settings.max_tokens, provider="openai")
|
|
272
272
|
timeout = _pop_int_param(params, "timeout", settings.request_timeout_seconds, provider="openai")
|
|
273
|
-
|
|
273
|
+
from openfatture.platform.config import get_settings
|
|
274
|
+
|
|
275
|
+
base_url = _pop_optional_str_param(
|
|
276
|
+
params, "base_url", get_settings().ai_base_url, provider="openai"
|
|
277
|
+
)
|
|
274
278
|
|
|
275
279
|
return OpenAIProvider(
|
|
276
280
|
api_key=api_key,
|
|
@@ -163,6 +163,7 @@ class OpenAIProvider(BaseLLMProvider):
|
|
|
163
163
|
total_tokens=total_tokens,
|
|
164
164
|
)
|
|
165
165
|
metrics.estimated_cost_usd = self.estimate_cost(metrics)
|
|
166
|
+
metrics.cost_known = self.model in self.PRICING
|
|
166
167
|
return metrics
|
|
167
168
|
|
|
168
169
|
def _build_message_input(self, role: str, content: str) -> dict[str, Any]:
|
|
@@ -726,7 +727,7 @@ class OpenAIProvider(BaseLLMProvider):
|
|
|
726
727
|
# Get pricing for model (use default if not found)
|
|
727
728
|
pricing = self.PRICING.get(
|
|
728
729
|
self.model,
|
|
729
|
-
{"input":
|
|
730
|
+
{"input": 0.0, "output": 0.0}, # Unknown price: cost_known is false
|
|
730
731
|
)
|
|
731
732
|
|
|
732
733
|
# Calculate cost per million tokens
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
"""Session-scoped interaction and accounting contracts; independent of any UI."""
|
|
2
|
+
|
|
3
|
+
from __future__ import annotations
|
|
4
|
+
|
|
5
|
+
from collections.abc import Awaitable, Callable
|
|
6
|
+
from contextvars import ContextVar
|
|
7
|
+
from dataclasses import dataclass, field
|
|
8
|
+
from typing import Any, Protocol
|
|
9
|
+
|
|
10
|
+
from openfatture.ai.domain.response import AgentResponse, UsageMetrics
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
class AssistantInteraction(Protocol):
|
|
14
|
+
async def confirm(self, name: str, parameters: dict[str, Any]) -> bool: ...
|
|
15
|
+
async def activity(self, name: str) -> None: ...
|
|
16
|
+
async def finished(self, name: str, success: bool) -> None: ...
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
@dataclass
|
|
20
|
+
class TurnAccounting:
|
|
21
|
+
usage: UsageMetrics = field(default_factory=UsageMetrics)
|
|
22
|
+
calls: int = 0
|
|
23
|
+
incomplete: bool = False
|
|
24
|
+
tool_outcomes: list[dict[str, Any]] = field(default_factory=list)
|
|
25
|
+
|
|
26
|
+
def record(self, response: AgentResponse) -> None:
|
|
27
|
+
self.calls += 1
|
|
28
|
+
if not response.success and response.usage.total_tokens == 0:
|
|
29
|
+
self.incomplete = True
|
|
30
|
+
for name in ("prompt_tokens", "completion_tokens", "total_tokens", "estimated_cost_usd"):
|
|
31
|
+
setattr(self.usage, name, getattr(self.usage, name) + getattr(response.usage, name))
|
|
32
|
+
self.usage.cost_known = self.usage.cost_known and response.usage.cost_known
|
|
33
|
+
|
|
34
|
+
|
|
35
|
+
current_accounting: ContextVar[TurnAccounting | None] = ContextVar(
|
|
36
|
+
"assistant_accounting", default=None
|
|
37
|
+
)
|
|
38
|
+
ConfirmCallback = Callable[[str, dict[str, Any]], Awaitable[bool]]
|
|
39
|
+
ActivityCallback = Callable[[str], Awaitable[None]]
|
|
40
|
+
|
|
41
|
+
|
|
42
|
+
class AccountedProvider:
|
|
43
|
+
"""Delegate provider capabilities, recording each completed request exactly once."""
|
|
44
|
+
|
|
45
|
+
def __init__(self, provider: Any):
|
|
46
|
+
self.provider = provider
|
|
47
|
+
from openfatture.platform.logging import register_sensitive_values
|
|
48
|
+
|
|
49
|
+
credential = getattr(provider, "api_key", None)
|
|
50
|
+
if isinstance(credential, str):
|
|
51
|
+
register_sensitive_values(credential)
|
|
52
|
+
|
|
53
|
+
def __getattr__(self, name: str) -> Any:
|
|
54
|
+
return getattr(self.provider, name)
|
|
55
|
+
|
|
56
|
+
async def generate(self, *args: Any, **kwargs: Any) -> AgentResponse:
|
|
57
|
+
accounting = current_accounting.get()
|
|
58
|
+
try:
|
|
59
|
+
response: AgentResponse = await self.provider.generate(*args, **kwargs)
|
|
60
|
+
except BaseException:
|
|
61
|
+
if accounting is not None:
|
|
62
|
+
accounting.incomplete = True
|
|
63
|
+
raise
|
|
64
|
+
if accounting is not None:
|
|
65
|
+
accounting.record(response)
|
|
66
|
+
return response
|
|
@@ -43,6 +43,7 @@ class ToolLoopState(TypedDict, total=False):
|
|
|
43
43
|
status: str
|
|
44
44
|
error: str | None
|
|
45
45
|
tokens: int
|
|
46
|
+
usage: dict[str, Any]
|
|
46
47
|
tool_results: list[dict[str, Any]]
|
|
47
48
|
|
|
48
49
|
|
|
@@ -138,11 +139,23 @@ def build_tool_loop_graph(
|
|
|
138
139
|
new_messages.append(assistant_msg)
|
|
139
140
|
usage_tokens = response.usage.total_tokens if response.usage is not None else 0
|
|
140
141
|
tokens = int(usage_tokens or 0) + int(state.get("tokens") or 0)
|
|
142
|
+
usage = dict(state.get("usage") or {})
|
|
143
|
+
current = response.usage
|
|
144
|
+
for key in ("prompt_tokens", "completion_tokens", "total_tokens", "estimated_cost_usd"):
|
|
145
|
+
usage[key] = usage.get(key, 0) + getattr(current, key, 0)
|
|
146
|
+
usage["cost_known"] = usage.get("cost_known", True) and getattr(
|
|
147
|
+
current, "cost_known", False
|
|
148
|
+
)
|
|
141
149
|
return {
|
|
142
150
|
**state,
|
|
151
|
+
"usage": usage,
|
|
143
152
|
"messages": new_messages,
|
|
144
153
|
"content": response.content or "",
|
|
145
|
-
"status": "
|
|
154
|
+
"status": "error"
|
|
155
|
+
if not response.success
|
|
156
|
+
else "tool_calls"
|
|
157
|
+
if response.has_tool_calls
|
|
158
|
+
else "final",
|
|
146
159
|
"error": response.error,
|
|
147
160
|
"tokens": tokens,
|
|
148
161
|
"iteration": int(state.get("iteration") or 0) + 1,
|
|
@@ -172,7 +185,6 @@ def build_tool_loop_graph(
|
|
|
172
185
|
result = await tool_registry.execute_tool(
|
|
173
186
|
tool_name=name,
|
|
174
187
|
parameters=arguments,
|
|
175
|
-
confirm=False,
|
|
176
188
|
)
|
|
177
189
|
content = (
|
|
178
190
|
json.dumps(result.data, default=str, ensure_ascii=False)
|
|
@@ -184,7 +196,9 @@ def build_tool_loop_graph(
|
|
|
184
196
|
"tool": name,
|
|
185
197
|
"parameters": arguments,
|
|
186
198
|
"success": result.success,
|
|
187
|
-
"result": result.data
|
|
199
|
+
"result": result.data
|
|
200
|
+
if result.success
|
|
201
|
+
else result.error_type or result.error,
|
|
188
202
|
}
|
|
189
203
|
)
|
|
190
204
|
except Exception as exc:
|
|
@@ -107,7 +107,7 @@ class GraphAssistantBackend:
|
|
|
107
107
|
|
|
108
108
|
def _state_to_response(self, state: dict[str, Any]) -> AgentResponse:
|
|
109
109
|
status_raw = state.get("status") or "final"
|
|
110
|
-
if state.get("error"):
|
|
110
|
+
if state.get("error") or status_raw == "error":
|
|
111
111
|
status = ResponseStatus.ERROR
|
|
112
112
|
elif status_raw == "final":
|
|
113
113
|
status = ResponseStatus.SUCCESS
|
|
@@ -116,13 +116,23 @@ class GraphAssistantBackend:
|
|
|
116
116
|
tokens = int(state.get("tokens") or 0)
|
|
117
117
|
tool_results = list(state.get("tool_results") or [])
|
|
118
118
|
error = state.get("error")
|
|
119
|
+
blocked = [
|
|
120
|
+
entry
|
|
121
|
+
for entry in tool_results
|
|
122
|
+
if not entry.get("success") and str(entry.get("result", "")).startswith("confirmation_")
|
|
123
|
+
]
|
|
124
|
+
if blocked:
|
|
125
|
+
status = ResponseStatus.PARTIAL
|
|
126
|
+
error = str(blocked[-1].get("result"))
|
|
119
127
|
return AgentResponse(
|
|
120
128
|
content=str(state.get("content") or ""),
|
|
121
129
|
status=status,
|
|
122
130
|
agent_name="chat_assistant",
|
|
123
131
|
model=self.provider.model,
|
|
124
132
|
provider=self.provider.provider_name,
|
|
125
|
-
usage=UsageMetrics(
|
|
133
|
+
usage=UsageMetrics(**state["usage"])
|
|
134
|
+
if state.get("usage")
|
|
135
|
+
else UsageMetrics(total_tokens=tokens, cost_known=False),
|
|
126
136
|
error=str(error) if error is not None else None,
|
|
127
137
|
metadata={
|
|
128
138
|
"orchestrator": "langgraph_tool_loop",
|
|
@@ -167,6 +177,8 @@ class GraphAssistantBackend:
|
|
|
167
177
|
)
|
|
168
178
|
response.metadata["orchestrator"] = "langgraph_react"
|
|
169
179
|
response.metadata["orchestrator_metrics"] = orchestrator.get_metrics()
|
|
180
|
+
if response.metadata["orchestrator_metrics"].get("max_iterations_reached"):
|
|
181
|
+
response.status = ResponseStatus.PARTIAL
|
|
170
182
|
return response
|
|
171
183
|
|
|
172
184
|
async def _run_tool_graph(self, context: ChatContext) -> AgentResponse:
|
|
@@ -224,28 +236,24 @@ class GraphAssistantBackend:
|
|
|
224
236
|
"""
|
|
225
237
|
context = self.prepare_context(context)
|
|
226
238
|
|
|
239
|
+
if not context.user_input.strip() or len(context.user_input) > 5000:
|
|
240
|
+
response = await self.run(context)
|
|
241
|
+
yield StreamEvent.done(status=response.status.value, error=response.error)
|
|
242
|
+
return
|
|
227
243
|
if self._use_react(context):
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
max_iterations=self.max_iterations,
|
|
234
|
-
debug_config=self.debug_config,
|
|
235
|
-
)
|
|
236
|
-
async for chunk in orchestrator.stream(context):
|
|
237
|
-
if isinstance(chunk, str):
|
|
238
|
-
yield StreamEvent.content(chunk)
|
|
239
|
-
elif isinstance(chunk, StreamEvent):
|
|
240
|
-
yield chunk
|
|
241
|
-
else:
|
|
242
|
-
yield StreamEvent.content(str(chunk))
|
|
244
|
+
response = await self._run_react(context)
|
|
245
|
+
yield StreamEvent.metrics(**response.usage.model_dump())
|
|
246
|
+
if response.content:
|
|
247
|
+
yield StreamEvent.content(response.content)
|
|
248
|
+
yield StreamEvent.done(status=response.status.value, error=response.error)
|
|
243
249
|
return
|
|
244
250
|
|
|
245
251
|
if not self._use_native_tools(context):
|
|
246
252
|
response = await self._run_plain(context)
|
|
253
|
+
yield StreamEvent.metrics(**response.usage.model_dump())
|
|
247
254
|
if response.content:
|
|
248
255
|
yield StreamEvent.content(response.content)
|
|
256
|
+
yield StreamEvent.done(status=response.status.value, error=response.error)
|
|
249
257
|
return
|
|
250
258
|
|
|
251
259
|
graph = self._get_tool_graph()
|
|
@@ -289,6 +297,11 @@ class GraphAssistantBackend:
|
|
|
289
297
|
elif status == "tool_calls":
|
|
290
298
|
yield StreamEvent.status("Calling tools…")
|
|
291
299
|
|
|
300
|
+
from openfatture.ai.streaming.events import StreamEventType
|
|
301
|
+
|
|
302
|
+
yield StreamEvent(type=StreamEventType.METRICS, data=dict(merged.get("usage") or {}))
|
|
303
|
+
final_response = self._state_to_response(merged)
|
|
304
|
+
yield StreamEvent.done(status=final_response.status.value, error=final_response.error)
|
|
292
305
|
if not emitted_final_content:
|
|
293
306
|
content = str(merged.get("content") or "")
|
|
294
307
|
if content:
|
|
@@ -26,6 +26,9 @@ def build_chat_system_prompt(context: ChatContext, *, enable_tools: bool = True)
|
|
|
26
26
|
"- Eseguire azioni tramite tools quando necessario",
|
|
27
27
|
"",
|
|
28
28
|
"Regole:",
|
|
29
|
+
"- Risposte proporzionate alla richiesta: a un saluto rispondi con un saluto breve e una domanda, senza cataloghi di funzionalità.",
|
|
30
|
+
"- Fornisci dettagli quando servono; evita emoji decorative e introduzioni ripetitive.",
|
|
31
|
+
"- Distingui capacità disponibili da configurazione pronta. Conferma il completamento solo dopo un risultato positivo degli strumenti.",
|
|
29
32
|
"- Usa un tono professionale ma friendly",
|
|
30
33
|
"- Rispondi in italiano (salvo richiesta diversa)",
|
|
31
34
|
"- Se non hai informazioni sufficienti, chiedi chiarimenti",
|