@rfc0/patty 0.0.0-stage → 1.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +201 -0
- package/README.md +214 -2
- package/dist/adapters/access-tokens.js +7 -0
- package/dist/adapters/accounts.js +37 -0
- package/dist/adapters/auth.js +11 -0
- package/dist/adapters/bills.js +32 -0
- package/dist/adapters/budgets.js +29 -0
- package/dist/adapters/categories.js +32 -0
- package/dist/adapters/client-grants.js +7 -0
- package/dist/adapters/credit-cards.js +33 -0
- package/dist/adapters/currencies.js +2 -0
- package/dist/adapters/currency-rates.js +18 -0
- package/dist/adapters/dashboards.js +43 -0
- package/dist/adapters/demo.js +13 -0
- package/dist/adapters/instance-settings.js +7 -0
- package/dist/adapters/invites.js +7 -0
- package/dist/adapters/recurring.js +55 -0
- package/dist/adapters/sessions.js +7 -0
- package/dist/adapters/settings.js +4 -0
- package/dist/adapters/setup-codes.js +7 -0
- package/dist/adapters/tags.js +9 -0
- package/dist/adapters/transactions.js +95 -0
- package/dist/adapters/users.js +7 -0
- package/dist/common/build-version.js +5 -0
- package/dist/common/errors.js +118 -0
- package/dist/common/net.js +71 -0
- package/dist/common/result.js +7 -0
- package/dist/composition/auth.js +106 -0
- package/dist/composition/boot.js +27 -0
- package/dist/composition/cli.js +86 -0
- package/dist/composition/demo/seed.js +92 -0
- package/dist/composition/demo/shell.js +107 -0
- package/dist/composition/export.js +89 -0
- package/dist/composition/http.js +110 -0
- package/dist/composition/import.js +55 -0
- package/dist/composition/lazy-modules.js +2 -0
- package/dist/composition/runtime.js +115 -0
- package/dist/composition/sign-in/interpreter.js +154 -0
- package/dist/composition/sign-in/server.js +36 -0
- package/dist/composition/sign-in/wiring.js +23 -0
- package/dist/composition/stdio.js +69 -0
- package/dist/config.js +136 -0
- package/dist/controllers/account/account.js +88 -0
- package/dist/controllers/account/transaction.js +119 -0
- package/dist/controllers/account/transfer.js +34 -0
- package/dist/controllers/aggregate.js +40 -0
- package/dist/controllers/auth/access-tokens.js +61 -0
- package/dist/controllers/auth/grants.js +136 -0
- package/dist/controllers/auth/key-export.js +20 -0
- package/dist/controllers/auth/owner.js +80 -0
- package/dist/controllers/auth/password.js +35 -0
- package/dist/controllers/auth/session.js +50 -0
- package/dist/controllers/auth/step-up.js +8 -0
- package/dist/controllers/auth/users.js +183 -0
- package/dist/controllers/budgets.js +87 -0
- package/dist/controllers/categories.js +67 -0
- package/dist/controllers/correlations.js +112 -0
- package/dist/controllers/credit-card/bill.js +105 -0
- package/dist/controllers/credit-card/credit-card.js +129 -0
- package/dist/controllers/credit-card/transaction.js +181 -0
- package/dist/controllers/currencies.js +1 -0
- package/dist/controllers/currency-rates.js +40 -0
- package/dist/controllers/dashboards.js +68 -0
- package/dist/controllers/demo/seed.js +31 -0
- package/dist/controllers/demo/tour.js +12 -0
- package/dist/controllers/deps.js +6 -0
- package/dist/controllers/instance.js +6 -0
- package/dist/controllers/merchants.js +12 -0
- package/dist/controllers/recurring.js +70 -0
- package/dist/controllers/resolve.js +37 -0
- package/dist/controllers/settings.js +47 -0
- package/dist/controllers/status.js +19 -0
- package/dist/controllers/summary.js +21 -0
- package/dist/controllers/tags.js +19 -0
- package/dist/controllers/transaction/bulk.js +6 -0
- package/dist/controllers/transaction/core.js +49 -0
- package/dist/controllers/transaction/read.js +28 -0
- package/dist/diplomat/auth/credentials.js +58 -0
- package/dist/diplomat/auth/sign-in-store.js +18 -0
- package/dist/diplomat/cli/commands/auth.js +100 -0
- package/dist/diplomat/cli/commands/db.js +72 -0
- package/dist/diplomat/cli/commands/demo.js +68 -0
- package/dist/diplomat/cli/commands/key.js +119 -0
- package/dist/diplomat/cli/commands/login.js +151 -0
- package/dist/diplomat/cli/commands/setup.js +132 -0
- package/dist/diplomat/cli/commands/users.js +123 -0
- package/dist/diplomat/cli/commands.js +61 -0
- package/dist/diplomat/cli/export-file.js +37 -0
- package/dist/diplomat/cli/import-file.js +44 -0
- package/dist/diplomat/cli/io.js +61 -0
- package/dist/diplomat/cli/key-export-approval.js +37 -0
- package/dist/diplomat/cli/messages.js +96 -0
- package/dist/diplomat/cli/prompt.js +74 -0
- package/dist/diplomat/cli/terminal.js +81 -0
- package/dist/diplomat/client-config/clients.js +150 -0
- package/dist/diplomat/client-config/merge.js +41 -0
- package/dist/diplomat/db/bootstrap.js +98 -0
- package/dist/diplomat/db/database-files.js +147 -0
- package/dist/diplomat/db/driver.js +167 -0
- package/dist/diplomat/db/effects.js +101 -0
- package/dist/diplomat/db/engine.js +9 -0
- package/dist/diplomat/db/export.js +22 -0
- package/dist/diplomat/db/file-lock.js +82 -0
- package/dist/diplomat/db/key-lock.js +14 -0
- package/dist/diplomat/db/locale-cache.js +23 -0
- package/dist/diplomat/db/migration-barrier.js +57 -0
- package/dist/diplomat/db/migration-journal.js +18 -0
- package/dist/diplomat/db/migration-lock.js +15 -0
- package/dist/diplomat/db/migrations.js +11 -0
- package/dist/diplomat/db/present.js +17 -0
- package/dist/diplomat/db/queries/aggregate-whitelist.js +35 -0
- package/dist/diplomat/db/queries/filters.js +59 -0
- package/dist/diplomat/db/queries/fts.js +18 -0
- package/dist/diplomat/db/queries/scope.js +8 -0
- package/dist/diplomat/db/queries/transaction-select.js +26 -0
- package/dist/diplomat/db/queries/tx-predicates.js +13 -0
- package/dist/diplomat/db/repos/access-tokens.js +27 -0
- package/dist/diplomat/db/repos/accounts.js +91 -0
- package/dist/diplomat/db/repos/bills.js +93 -0
- package/dist/diplomat/db/repos/budgets.js +72 -0
- package/dist/diplomat/db/repos/categories.js +53 -0
- package/dist/diplomat/db/repos/client-grants.js +67 -0
- package/dist/diplomat/db/repos/correlations.js +66 -0
- package/dist/diplomat/db/repos/credit-cards.js +67 -0
- package/dist/diplomat/db/repos/currencies.js +8 -0
- package/dist/diplomat/db/repos/currency-rates.js +40 -0
- package/dist/diplomat/db/repos/dashboards.js +123 -0
- package/dist/diplomat/db/repos/health.js +12 -0
- package/dist/diplomat/db/repos/instance-settings.js +14 -0
- package/dist/diplomat/db/repos/instance.js +58 -0
- package/dist/diplomat/db/repos/invites.js +43 -0
- package/dist/diplomat/db/repos/merchants.js +121 -0
- package/dist/diplomat/db/repos/recurring.js +29 -0
- package/dist/diplomat/db/repos/sessions.js +19 -0
- package/dist/diplomat/db/repos/settings.js +41 -0
- package/dist/diplomat/db/repos/setup-codes.js +28 -0
- package/dist/diplomat/db/repos/sub-categories.js +67 -0
- package/dist/diplomat/db/repos/tags.js +51 -0
- package/dist/diplomat/db/repos/transaction-tags.js +57 -0
- package/dist/diplomat/db/repos/transactions.js +163 -0
- package/dist/diplomat/db/repos/users.js +47 -0
- package/dist/diplomat/db/safety-copy.js +87 -0
- package/dist/diplomat/db/schema.js +348 -0
- package/dist/diplomat/db/seed/categories.js +112 -0
- package/dist/diplomat/db/seed/currencies.js +9 -0
- package/dist/diplomat/db/seed/demo/br.js +98 -0
- package/dist/diplomat/db/seed/demo/co.js +89 -0
- package/dist/diplomat/db/seed/demo/index.js +12 -0
- package/dist/diplomat/db/seed/demo/mx.js +90 -0
- package/dist/diplomat/db/seed/demo/shared.js +39 -0
- package/dist/diplomat/db/seed/demo/us.js +90 -0
- package/dist/diplomat/db/seed/merchant-rules.js +188 -0
- package/dist/diplomat/db/sqlite-errors.js +40 -0
- package/dist/diplomat/db/tenancy-integrity.js +45 -0
- package/dist/diplomat/db/version-guard.js +16 -0
- package/dist/diplomat/http/auth-pages.js +41 -0
- package/dist/diplomat/http/auth-paths.js +46 -0
- package/dist/diplomat/http/bearer.js +15 -0
- package/dist/diplomat/http/connect-pages.js +51 -0
- package/dist/diplomat/http/context.js +17 -0
- package/dist/diplomat/http/cookies.js +27 -0
- package/dist/diplomat/http/form-pages.js +38 -0
- package/dist/diplomat/http/hooks/auth.js +106 -0
- package/dist/diplomat/http/hooks/demo-marker.js +59 -0
- package/dist/diplomat/http/openapi.js +73 -0
- package/dist/diplomat/http/principal.js +1 -0
- package/dist/diplomat/http/rate-limiter.js +78 -0
- package/dist/diplomat/http/remedy.js +26 -0
- package/dist/diplomat/http/respond.js +50 -0
- package/dist/diplomat/http/routes/account.js +226 -0
- package/dist/diplomat/http/routes/aggregate.js +28 -0
- package/dist/diplomat/http/routes/auth.js +105 -0
- package/dist/diplomat/http/routes/budget.js +34 -0
- package/dist/diplomat/http/routes/category.js +109 -0
- package/dist/diplomat/http/routes/connect.js +124 -0
- package/dist/diplomat/http/routes/credit-card.js +263 -0
- package/dist/diplomat/http/routes/currency-rates.js +60 -0
- package/dist/diplomat/http/routes/currency.js +16 -0
- package/dist/diplomat/http/routes/dashboard.js +93 -0
- package/dist/diplomat/http/routes/invite.js +63 -0
- package/dist/diplomat/http/routes/recurring.js +65 -0
- package/dist/diplomat/http/routes/settings.js +38 -0
- package/dist/diplomat/http/routes/summary.js +23 -0
- package/dist/diplomat/http/routes/system.js +29 -0
- package/dist/diplomat/http/routes/tag.js +51 -0
- package/dist/diplomat/http/routes/tokens.js +72 -0
- package/dist/diplomat/http/routes/transaction.js +55 -0
- package/dist/diplomat/http/routes/transfer.js +35 -0
- package/dist/diplomat/http/routes/ui.js +110 -0
- package/dist/diplomat/http/routes/users.js +156 -0
- package/dist/diplomat/http/routes/well-known.js +26 -0
- package/dist/diplomat/http/routes.js +85 -0
- package/dist/diplomat/http/session.js +34 -0
- package/dist/diplomat/http/token-pages.js +75 -0
- package/dist/diplomat/http/ui-files.js +21 -0
- package/dist/diplomat/http/user-pages.js +93 -0
- package/dist/diplomat/mcp/annotations.js +8 -0
- package/dist/diplomat/mcp/auth-info.js +20 -0
- package/dist/diplomat/mcp/context.js +14 -0
- package/dist/diplomat/mcp/definition.js +3 -0
- package/dist/diplomat/mcp/gate.js +15 -0
- package/dist/diplomat/mcp/instructions.js +19 -0
- package/dist/diplomat/mcp/prompts.js +125 -0
- package/dist/diplomat/mcp/register.js +12 -0
- package/dist/diplomat/mcp/remedy.js +17 -0
- package/dist/diplomat/mcp/resources.js +93 -0
- package/dist/diplomat/mcp/respond.js +20 -0
- package/dist/diplomat/mcp/route.js +62 -0
- package/dist/diplomat/mcp/scopes.js +53 -0
- package/dist/diplomat/mcp/server.js +26 -0
- package/dist/diplomat/mcp/shared.js +5 -0
- package/dist/diplomat/mcp/stdio-session.js +94 -0
- package/dist/diplomat/mcp/stdio.js +23 -0
- package/dist/diplomat/mcp/tool-name.js +59 -0
- package/dist/diplomat/mcp/tools/account.js +218 -0
- package/dist/diplomat/mcp/tools/aggregate.js +32 -0
- package/dist/diplomat/mcp/tools/budget.js +99 -0
- package/dist/diplomat/mcp/tools/category.js +103 -0
- package/dist/diplomat/mcp/tools/correlations.js +70 -0
- package/dist/diplomat/mcp/tools/credit-card.js +239 -0
- package/dist/diplomat/mcp/tools/currency-rates.js +62 -0
- package/dist/diplomat/mcp/tools/dashboard.js +75 -0
- package/dist/diplomat/mcp/tools/index.js +31 -0
- package/dist/diplomat/mcp/tools/recurring.js +62 -0
- package/dist/diplomat/mcp/tools/summary.js +30 -0
- package/dist/diplomat/mcp/tools/system.js +83 -0
- package/dist/diplomat/mcp/tools/tag.js +48 -0
- package/dist/diplomat/mcp/tools/transaction.js +53 -0
- package/dist/diplomat/mcp/tools/transfer.js +28 -0
- package/dist/diplomat/mcp/tour.js +87 -0
- package/dist/logic/account.js +79 -0
- package/dist/logic/aggregate.js +37 -0
- package/dist/logic/auth/bearer.js +35 -0
- package/dist/logic/auth/grant.js +126 -0
- package/dist/logic/auth/key-export.js +10 -0
- package/dist/logic/auth/keychain.js +3 -0
- package/dist/logic/auth/message.js +22 -0
- package/dist/logic/auth/origin.js +57 -0
- package/dist/logic/auth/owner.js +22 -0
- package/dist/logic/auth/password.js +3 -0
- package/dist/logic/auth/redact.js +25 -0
- package/dist/logic/auth/revoke.js +28 -0
- package/dist/logic/auth/scope.js +17 -0
- package/dist/logic/auth/session.js +30 -0
- package/dist/logic/auth/sign-in-flow.js +305 -0
- package/dist/logic/auth/time.js +2 -0
- package/dist/logic/auth/token.js +74 -0
- package/dist/logic/auth/user-plans.js +84 -0
- package/dist/logic/auth/users.js +78 -0
- package/dist/logic/balance.js +2 -0
- package/dist/logic/bill.js +74 -0
- package/dist/logic/budget.js +78 -0
- package/dist/logic/category.js +37 -0
- package/dist/logic/classify.js +21 -0
- package/dist/logic/correlations.js +147 -0
- package/dist/logic/credit-card.js +2 -0
- package/dist/logic/currency-rate.js +69 -0
- package/dist/logic/dashboard.js +40 -0
- package/dist/logic/demo/database.js +30 -0
- package/dist/logic/demo/plan.js +308 -0
- package/dist/logic/demo/tour.js +33 -0
- package/dist/logic/export-destination.js +12 -0
- package/dist/logic/key-import.js +15 -0
- package/dist/logic/locale.js +5 -0
- package/dist/logic/localize.js +12 -0
- package/dist/logic/merchant.js +31 -0
- package/dist/logic/migration.js +1 -0
- package/dist/logic/money.js +12 -0
- package/dist/logic/period.js +45 -0
- package/dist/logic/persistence.js +48 -0
- package/dist/logic/recurring.js +51 -0
- package/dist/logic/resolve.js +44 -0
- package/dist/logic/summary.js +29 -0
- package/dist/logic/tag.js +13 -0
- package/dist/logic/transaction.js +197 -0
- package/dist/main.js +42 -0
- package/dist/models/account.js +197 -0
- package/dist/models/aggregate.js +61 -0
- package/dist/models/auth/bearer.js +11 -0
- package/dist/models/auth/entity.js +17 -0
- package/dist/models/auth/errors.js +42 -0
- package/dist/models/auth/grant.js +58 -0
- package/dist/models/auth/key-export.js +11 -0
- package/dist/models/auth/message.js +50 -0
- package/dist/models/auth/mode.js +7 -0
- package/dist/models/auth/origin.js +16 -0
- package/dist/models/auth/owner.js +36 -0
- package/dist/models/auth/password.js +24 -0
- package/dist/models/auth/principal.js +26 -0
- package/dist/models/auth/redact.js +4 -0
- package/dist/models/auth/scope.js +9 -0
- package/dist/models/auth/session.js +19 -0
- package/dist/models/auth/sign-in-flow.js +102 -0
- package/dist/models/auth/sign-in.js +41 -0
- package/dist/models/auth/time.js +5 -0
- package/dist/models/auth/token.js +50 -0
- package/dist/models/auth/users.js +52 -0
- package/dist/models/bill.js +55 -0
- package/dist/models/budget.js +106 -0
- package/dist/models/category.js +52 -0
- package/dist/models/client-config.js +18 -0
- package/dist/models/correlations.js +215 -0
- package/dist/models/credit-card.js +156 -0
- package/dist/models/currency-rate.js +83 -0
- package/dist/models/dashboard.js +54 -0
- package/dist/models/database.js +16 -0
- package/dist/models/date.js +8 -0
- package/dist/models/demo/core.js +58 -0
- package/dist/models/demo/tour.js +41 -0
- package/dist/models/encryption-key.js +2 -0
- package/dist/models/error.js +13 -0
- package/dist/models/export.js +9 -0
- package/dist/models/id.js +2 -0
- package/dist/models/instance.js +7 -0
- package/dist/models/key-import.js +6 -0
- package/dist/models/locale.js +25 -0
- package/dist/models/merchant.js +12 -0
- package/dist/models/money.js +14 -0
- package/dist/models/package.js +12 -0
- package/dist/models/page.js +56 -0
- package/dist/models/persistence.js +1 -0
- package/dist/models/prompts.js +5 -0
- package/dist/models/recurring.js +54 -0
- package/dist/models/remedy.js +17 -0
- package/dist/models/resolution.js +1 -0
- package/dist/models/startup.js +7 -0
- package/dist/models/summary.js +24 -0
- package/dist/models/tag.js +14 -0
- package/dist/models/tenancy.js +10 -0
- package/dist/models/transaction-tag.js +6 -0
- package/dist/models/transaction.js +275 -0
- package/dist/wire/db/access-tokens.js +1 -0
- package/dist/wire/db/accounts.js +7 -0
- package/dist/wire/db/aggregate.js +16 -0
- package/dist/wire/db/bills.js +14 -0
- package/dist/wire/db/budgets.js +33 -0
- package/dist/wire/db/categories.js +14 -0
- package/dist/wire/db/client-grants.js +1 -0
- package/dist/wire/db/correlations.js +49 -0
- package/dist/wire/db/credit-cards.js +1 -0
- package/dist/wire/db/currencies.js +1 -0
- package/dist/wire/db/currency-rates.js +1 -0
- package/dist/wire/db/dashboards.js +1 -0
- package/dist/wire/db/instance-settings.js +1 -0
- package/dist/wire/db/invites.js +1 -0
- package/dist/wire/db/merchants.js +18 -0
- package/dist/wire/db/recurring.js +19 -0
- package/dist/wire/db/sessions.js +1 -0
- package/dist/wire/db/settings.js +1 -0
- package/dist/wire/db/setup-codes.js +1 -0
- package/dist/wire/db/tags.js +1 -0
- package/dist/wire/db/tenancy.js +1 -0
- package/dist/wire/db/transactions.js +89 -0
- package/dist/wire/db/users.js +1 -0
- package/dist/wire/in/accounts.js +26 -0
- package/dist/wire/in/aggregate.js +10 -0
- package/dist/wire/in/auth.js +107 -0
- package/dist/wire/in/bills.js +11 -0
- package/dist/wire/in/budgets.js +11 -0
- package/dist/wire/in/categories.js +9 -0
- package/dist/wire/in/cli.js +106 -0
- package/dist/wire/in/coerce.js +6 -0
- package/dist/wire/in/common.js +17 -0
- package/dist/wire/in/credit-cards.js +16 -0
- package/dist/wire/in/currency-rates.js +8 -0
- package/dist/wire/in/period.js +7 -0
- package/dist/wire/in/recurring.js +6 -0
- package/dist/wire/in/settings.js +5 -0
- package/dist/wire/in/summary.js +5 -0
- package/dist/wire/in/tags.js +2 -0
- package/dist/wire/in/transactions.js +31 -0
- package/dist/wire/out/bills.js +9 -0
- package/dist/wire/out/budgets.js +10 -0
- package/dist/wire/out/client-config.js +2 -0
- package/dist/wire/out/common.js +4 -0
- package/dist/wire/out/credit-cards.js +15 -0
- package/dist/wire/out/currency-rates.js +11 -0
- package/dist/wire/out/errors.js +58 -0
- package/dist/wire/out/recurring.js +6 -0
- package/dist/wire/out/status.js +10 -0
- package/dist/wire/out/summary.js +9 -0
- package/dist/wire/out/transactions.js +52 -0
- package/drizzle/0000_futuristic_umar.sql +124 -0
- package/drizzle/0001_fts5_search.sql +23 -0
- package/drizzle/0002_rename_graph_to_history.sql +7 -0
- package/drizzle/0003_lyrical_hairball.sql +2 -0
- package/drizzle/0004_misty_ikaris.sql +7 -0
- package/drizzle/0005_credit-liability-accounts.sql +14 -0
- package/drizzle/0006_smart_aqueduct.sql +1 -0
- package/drizzle/0007_add_dashboards.sql +5 -0
- package/drizzle/0008_yummy_madripoor.sql +1 -0
- package/drizzle/0009_version_groundwork.sql +9 -0
- package/drizzle/0010_category_merchant_association_cascade.sql +16 -0
- package/drizzle/0011_dashboard_id_normalization.sql +16 -0
- package/drizzle/0012_hot_the_spike.sql +12 -0
- package/drizzle/0013_recurring_rules_merchant.sql +1 -0
- package/drizzle/0014_dashboard_source_discriminator.sql +17 -0
- package/drizzle/0015_currencies_decimals.sql +1 -0
- package/drizzle/0016_unusual_zaran.sql +13 -0
- package/drizzle/0017_premium_blur.sql +1 -0
- package/drizzle/0018_auth_identity.sql +39 -0
- package/drizzle/0019_access_tokens.sql +16 -0
- package/drizzle/0020_stdio_sign_in.sql +27 -0
- package/drizzle/0021_tenancy_data.sql +289 -0
- package/drizzle/0022_user_management.sql +17 -0
- package/drizzle/0023_instance_settings_row.sql +2 -0
- package/drizzle/0024_credentials_changed_at.sql +2 -0
- package/drizzle/0025_instance_kind.sql +2 -0
- package/drizzle/0026_demo_seeded_at.sql +2 -0
- package/drizzle/0027_demo_country.sql +2 -0
- package/drizzle/0028_reset_sign_ins.sql +2 -0
- package/drizzle/meta/0000_snapshot.json +894 -0
- package/drizzle/meta/0003_snapshot.json +910 -0
- package/drizzle/meta/0004_snapshot.json +951 -0
- package/drizzle/meta/0005_snapshot.json +991 -0
- package/drizzle/meta/0006_snapshot.json +998 -0
- package/drizzle/meta/0007_snapshot.json +1029 -0
- package/drizzle/meta/0008_snapshot.json +1049 -0
- package/drizzle/meta/0009_snapshot.json +1121 -0
- package/drizzle/meta/0010_snapshot.json +1121 -0
- package/drizzle/meta/0011_snapshot.json +1136 -0
- package/drizzle/meta/0012_snapshot.json +1227 -0
- package/drizzle/meta/0013_snapshot.json +1247 -0
- package/drizzle/meta/0014_snapshot.json +1267 -0
- package/drizzle/meta/0015_snapshot.json +1275 -0
- package/drizzle/meta/0016_snapshot.json +1371 -0
- package/drizzle/meta/0017_snapshot.json +1392 -0
- package/drizzle/meta/0018_snapshot.json +1603 -0
- package/drizzle/meta/0019_snapshot.json +1713 -0
- package/drizzle/meta/0020_snapshot.json +1904 -0
- package/drizzle/meta/0021_snapshot.json +2186 -0
- package/drizzle/meta/0022_snapshot.json +2311 -0
- package/drizzle/meta/0023_snapshot.json +2311 -0
- package/drizzle/meta/0024_snapshot.json +2318 -0
- package/drizzle/meta/0025_snapshot.json +2326 -0
- package/drizzle/meta/0026_snapshot.json +2333 -0
- package/drizzle/meta/0027_snapshot.json +2340 -0
- package/drizzle/meta/0028_snapshot.json +2340 -0
- package/drizzle/meta/_journal.json +209 -0
- package/package.json +106 -4
- package/skills/dashboard-building/SKILL.md +201 -0
- package/skills/patty-tour/SKILL.md +34 -0
- package/ui/app.css +758 -0
- package/ui/app.js +543 -0
- package/ui/connect-result.html +16 -0
- package/ui/connect.html +53 -0
- package/ui/dashboards/accounts.html +3189 -0
- package/ui/dashboards/budget.html +1734 -0
- package/ui/dashboards/cards.html +4032 -0
- package/ui/dashboards/categories.html +4694 -0
- package/ui/dashboards/comparative.html +2475 -0
- package/ui/dashboards/dashboards.html +839 -0
- package/ui/dashboards/overview.html +2405 -0
- package/ui/dashboards/pending.html +2973 -0
- package/ui/dashboards/projections.html +2528 -0
- package/ui/dashboards/tags.html +1365 -0
- package/ui/invite.html +44 -0
- package/ui/login.html +26 -0
- package/ui/money.js +175 -0
- package/ui/setup.html +29 -0
- package/ui/shell.html +96 -0
- package/ui/token-created.html +24 -0
- package/ui/tokens.html +58 -0
- package/ui/user-invited.html +27 -0
- package/ui/users.html +60 -0
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
import { ToolName } from '../tool-name.js';
|
|
2
|
+
import { z } from 'zod';
|
|
3
|
+
import { createCategory, createSubCategory, deleteCategory, deleteSubCategory, listCategories, listSubCategories, } from '../../../controllers/categories.js';
|
|
4
|
+
import { CreateCategorySchema, CreateSubCategorySchema } from '../../../wire/in/categories.js';
|
|
5
|
+
import * as categoryAdapters from '../../../adapters/categories.js';
|
|
6
|
+
import { defineTool } from '../definition.js';
|
|
7
|
+
import { fromResult, json } from '../respond.js';
|
|
8
|
+
import { MUTATING, READ_ONLY } from '../annotations.js';
|
|
9
|
+
const createCategoryTool = defineTool({
|
|
10
|
+
name: ToolName.enum.create_category,
|
|
11
|
+
config: {
|
|
12
|
+
annotations: MUTATING,
|
|
13
|
+
title: 'Create category',
|
|
14
|
+
description: 'Create a category. Prefer existing categories (list_categories) before creating new ones.',
|
|
15
|
+
inputSchema: CreateCategorySchema.shape,
|
|
16
|
+
},
|
|
17
|
+
handle: async (args, { deps, runEffects }) => {
|
|
18
|
+
const flow = () => createCategory(deps, args).map(categoryAdapters.outcomeToDb);
|
|
19
|
+
return fromResult(await runEffects(flow));
|
|
20
|
+
},
|
|
21
|
+
});
|
|
22
|
+
const listCategoriesTool = defineTool({
|
|
23
|
+
name: ToolName.enum.list_categories,
|
|
24
|
+
config: {
|
|
25
|
+
annotations: READ_ONLY,
|
|
26
|
+
title: 'List categories',
|
|
27
|
+
description: 'List all categories. Names are resolved to the active locale for default categories.',
|
|
28
|
+
inputSchema: {},
|
|
29
|
+
},
|
|
30
|
+
handle: async (_args, { deps }) => {
|
|
31
|
+
return json(await listCategories(deps));
|
|
32
|
+
},
|
|
33
|
+
});
|
|
34
|
+
const createSubCategoryDescription = 'Create a sub-category under an existing category. Sub-categories inherit the kind (expense/income/both) ' +
|
|
35
|
+
'of their parent. Use list_categories to find the parent id. Names must be unique within the same parent.';
|
|
36
|
+
const createSubCategoryTool = defineTool({
|
|
37
|
+
name: ToolName.enum.create_sub_category,
|
|
38
|
+
config: {
|
|
39
|
+
annotations: MUTATING,
|
|
40
|
+
title: 'Create sub-category',
|
|
41
|
+
description: createSubCategoryDescription,
|
|
42
|
+
inputSchema: CreateSubCategorySchema.shape,
|
|
43
|
+
},
|
|
44
|
+
handle: async (args, { deps, runEffects }) => {
|
|
45
|
+
const flow = () => createSubCategory(deps, args).map(categoryAdapters.outcomeToDb);
|
|
46
|
+
return fromResult(await runEffects(flow));
|
|
47
|
+
},
|
|
48
|
+
});
|
|
49
|
+
const listSubCategoriesTool = defineTool({
|
|
50
|
+
name: ToolName.enum.list_sub_categories,
|
|
51
|
+
config: {
|
|
52
|
+
annotations: READ_ONLY,
|
|
53
|
+
title: 'List sub-categories',
|
|
54
|
+
description: 'List all sub-categories, optionally filtered by parent category id.',
|
|
55
|
+
inputSchema: {
|
|
56
|
+
parentId: z.string().optional().describe('Filter to sub-categories of this parent category id'),
|
|
57
|
+
},
|
|
58
|
+
},
|
|
59
|
+
handle: async (args, { deps }) => {
|
|
60
|
+
return json(await listSubCategories(deps, args.parentId));
|
|
61
|
+
},
|
|
62
|
+
});
|
|
63
|
+
const deleteCategoryDescription = 'Delete a category by name. Blocked if any transactions, recurring rules, or sub-categories reference it — ' +
|
|
64
|
+
'returns an in_use error with reference counts so you can guide the user to clear them first. ' +
|
|
65
|
+
"On success, also removes the category's learned merchant classification rules (re-learnable).";
|
|
66
|
+
const deleteCategoryTool = defineTool({
|
|
67
|
+
name: ToolName.enum.delete_category,
|
|
68
|
+
config: {
|
|
69
|
+
annotations: MUTATING,
|
|
70
|
+
title: 'Delete category',
|
|
71
|
+
description: deleteCategoryDescription,
|
|
72
|
+
inputSchema: { name: z.string().min(1).describe('Category name') },
|
|
73
|
+
},
|
|
74
|
+
handle: async (args, { deps, runEffects }) => {
|
|
75
|
+
const flow = () => deleteCategory(deps, args.name).map(categoryAdapters.outcomeToDb);
|
|
76
|
+
return fromResult(await runEffects(flow));
|
|
77
|
+
},
|
|
78
|
+
});
|
|
79
|
+
const deleteSubCategoryDescription = 'Delete a sub-category by name. Blocked if any transactions, recurring rules, ' +
|
|
80
|
+
'or child sub-categories reference it — ' +
|
|
81
|
+
'returns an in_use error with reference counts. ' +
|
|
82
|
+
'On success, also removes learned merchant classification rules for this sub-category.';
|
|
83
|
+
const deleteSubCategoryTool = defineTool({
|
|
84
|
+
name: ToolName.enum.delete_sub_category,
|
|
85
|
+
config: {
|
|
86
|
+
annotations: MUTATING,
|
|
87
|
+
title: 'Delete sub-category',
|
|
88
|
+
description: deleteSubCategoryDescription,
|
|
89
|
+
inputSchema: { name: z.string().min(1).describe('Sub-category name') },
|
|
90
|
+
},
|
|
91
|
+
handle: async (args, { deps, runEffects }) => {
|
|
92
|
+
const flow = () => deleteSubCategory(deps, args.name).map(categoryAdapters.outcomeToDb);
|
|
93
|
+
return fromResult(await runEffects(flow));
|
|
94
|
+
},
|
|
95
|
+
});
|
|
96
|
+
export const categoryTools = [
|
|
97
|
+
createCategoryTool,
|
|
98
|
+
listCategoriesTool,
|
|
99
|
+
createSubCategoryTool,
|
|
100
|
+
listSubCategoriesTool,
|
|
101
|
+
deleteCategoryTool,
|
|
102
|
+
deleteSubCategoryTool,
|
|
103
|
+
];
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
import { ToolName } from '../tool-name.js';
|
|
2
|
+
import { findCorrelations } from '../../../controllers/correlations.js';
|
|
3
|
+
import { DEFAULT_BASELINE_MONTHS, DEFAULT_LOOKBACK_MONTHS, DEFAULT_MIN_DELTA_PCT, DEFAULT_MIN_OCCURRENCES, DEFAULT_OVER_PCT, DEFAULT_SLACK_PCT, DEFAULT_TOP_N, FindCorrelationsSchema, NEW_CATEGORY_ALWAYS_SURFACED_NOTE, } from '../../../models/correlations.js';
|
|
4
|
+
import { defineTool } from '../definition.js';
|
|
5
|
+
import { fromResult } from '../respond.js';
|
|
6
|
+
import { READ_ONLY } from '../annotations.js';
|
|
7
|
+
const findCorrelationsDescription = 'Analysis tool over spending patterns, discriminated by `analysis` (Feature Design 016). ' +
|
|
8
|
+
'`spending_shifts`, `budget_fit`, and `merchant_concentration` take a reference `month`/`year`; ' +
|
|
9
|
+
'`recurring_candidates` does not — it scans a rolling `lookbackMonths` window ending today instead. ' +
|
|
10
|
+
'`spending_shifts`: what is up or down vs a trailing baseline, per (category, ' +
|
|
11
|
+
'currency) — "what\'s driving the change" this month. `current` is the reference month\'s effective, ' +
|
|
12
|
+
'expense-only total; `baseline` is the average monthly total over the preceding `baselineMonths`; ' +
|
|
13
|
+
'`deltaPct` is the percentage change, `null` for a brand-new category with no baseline spend at all ' +
|
|
14
|
+
'(reported with `direction: "up"`, not a divide-by-zero). Only categories at or above `minDeltaPct` ' +
|
|
15
|
+
`are returned; ${NEW_CATEGORY_ALWAYS_SURFACED_NOTE}. Results are sorted by ` +
|
|
16
|
+
'|deltaPct| descending. Sub-category spend rolls up into its parent category, same as ' +
|
|
17
|
+
'aggregate_spending/budgets. Per-currency — BRL and USD are never mixed. ' +
|
|
18
|
+
'`budget_fit`: closes the loop between insights and budgets — read-only, apply a suggestion yourself ' +
|
|
19
|
+
'via create_budget/update_budget. `budgeted` has one line per existing budget: `baseline` (same ' +
|
|
20
|
+
"trailing-average definition as spending_shifts) compared to the budget's own `limit` yields a " +
|
|
21
|
+
'`verdict` — "realistic" (baseline within tolerance of limit), "unrealistic" (baseline materially ' +
|
|
22
|
+
'over limit — consistently over-budget, use `overPct`), or "generous" (baseline well under limit, ' +
|
|
23
|
+
'use `slackPct`) — plus a `suggestedLimit` (baseline plus a small margin) you can pass straight to ' +
|
|
24
|
+
'update_budget. `unbudgeted` lists categories with an established (nonzero baseline) spend pattern ' +
|
|
25
|
+
'but no budget at all, each with a `suggestedLimit` ready for create_budget. ' +
|
|
26
|
+
'`merchant_concentration`: within each category (or just one, via `category`), the top `topN` ' +
|
|
27
|
+
'merchants by effective expense, each `share` (spent / categoryTotal, a 0-1 fraction) and ' +
|
|
28
|
+
'`cumulativeShare` (running total in descending-spend order) — "where within Food is my money ' +
|
|
29
|
+
'actually going?" `othersSpent` is categoryTotal minus the returned merchants, the long tail beyond ' +
|
|
30
|
+
'`topN`. A transaction with no classified merchant groups under a localized "Unknown". ' +
|
|
31
|
+
'`recurring_candidates`: merchants with a regular ~monthly cadence over the trailing `lookbackMonths` ' +
|
|
32
|
+
'(default ' +
|
|
33
|
+
`${DEFAULT_LOOKBACK_MONTHS}) that are not already backing a recurring rule (exact ` +
|
|
34
|
+
'`merchant_key` match, Feature Design 017) — each candidate is a ready-to-confirm create_recurring ' +
|
|
35
|
+
`shape: pass its \`merchant\`, \`typicalAmount\`, \`currency\`, \`category\`, and \`suggestedNextDue\` ` +
|
|
36
|
+
'straight through as `merchant`/`amount`/`currency`/`category`/`startDate`. Requires at least ' +
|
|
37
|
+
'`minOccurrences` (default ' +
|
|
38
|
+
`${DEFAULT_MIN_OCCURRENCES}) qualifying transactions at a consistent ~30-day gap and a stable amount ` +
|
|
39
|
+
'— irregular gaps or amount drift disqualify a merchant. ' +
|
|
40
|
+
'Optional `displayCurrency` adds a top-level `converted` block — `{ displayCurrency, total, stale, ' +
|
|
41
|
+
'asOf, excluded }` — a read-time grand total converted against currency_rates (as_of-stamped, ' +
|
|
42
|
+
'stale-flagged; a currency with no rate to `displayCurrency` is listed in `converted.excluded` and ' +
|
|
43
|
+
"left out of the total, never fabricated). Applies to `spending_shifts` (the reference month's " +
|
|
44
|
+
'effective expense spend per currency), `budget_fit` (committed — effective + pending — spend matched ' +
|
|
45
|
+
'to a budget, the same measure get_budget_status converts, so the two surfaces agree), and ' +
|
|
46
|
+
"`merchant_concentration` (each currency's categoryTotal, summed once — not each merchant line). " +
|
|
47
|
+
'`recurring_candidates` is unaffected — its candidates are proposed rules, not per-currency spend ' +
|
|
48
|
+
'totals. Per-currency/per-line results are unaffected either way.';
|
|
49
|
+
const findCorrelationsTool = defineTool({
|
|
50
|
+
name: ToolName.enum.find_correlations,
|
|
51
|
+
config: {
|
|
52
|
+
annotations: READ_ONLY,
|
|
53
|
+
title: 'Find correlations',
|
|
54
|
+
description: findCorrelationsDescription,
|
|
55
|
+
inputSchema: {
|
|
56
|
+
...FindCorrelationsSchema.shape,
|
|
57
|
+
baselineMonths: FindCorrelationsSchema.shape.baselineMonths.default(DEFAULT_BASELINE_MONTHS),
|
|
58
|
+
minDeltaPct: FindCorrelationsSchema.shape.minDeltaPct.default(DEFAULT_MIN_DELTA_PCT),
|
|
59
|
+
slackPct: FindCorrelationsSchema.shape.slackPct.default(DEFAULT_SLACK_PCT),
|
|
60
|
+
overPct: FindCorrelationsSchema.shape.overPct.default(DEFAULT_OVER_PCT),
|
|
61
|
+
topN: FindCorrelationsSchema.shape.topN.default(DEFAULT_TOP_N),
|
|
62
|
+
lookbackMonths: FindCorrelationsSchema.shape.lookbackMonths.default(DEFAULT_LOOKBACK_MONTHS),
|
|
63
|
+
minOccurrences: FindCorrelationsSchema.shape.minOccurrences.default(DEFAULT_MIN_OCCURRENCES),
|
|
64
|
+
},
|
|
65
|
+
},
|
|
66
|
+
handle: async (args, { deps }) => {
|
|
67
|
+
return fromResult(await findCorrelations(deps, args));
|
|
68
|
+
},
|
|
69
|
+
});
|
|
70
|
+
export const correlationsTools = [findCorrelationsTool];
|
|
@@ -0,0 +1,239 @@
|
|
|
1
|
+
import { ToolName } from '../tool-name.js';
|
|
2
|
+
import { z } from 'zod';
|
|
3
|
+
import { getBill, payBill, revertBillPayment } from '../../../controllers/credit-card/bill.js';
|
|
4
|
+
import { createCreditCard, deleteCreditCard, listCreditCards, updateCreditCard, } from '../../../controllers/credit-card/credit-card.js';
|
|
5
|
+
import { addCardPurchase, deleteCardTransaction, importCardStatement, updateCardTransaction, } from '../../../controllers/credit-card/transaction.js';
|
|
6
|
+
import { BillQuerySchema, PayBillSchema } from '../../../models/bill.js';
|
|
7
|
+
import { DeleteTransactionSchema, TransactionSource } from '../../../models/transaction.js';
|
|
8
|
+
import { AddCardPurchaseSchema, CreateCreditCardSchema, ImportCardStatementSchema, UpdateCardTransactionSchema, UpdateCreditCardSchema, } from '../../../wire/in/credit-cards.js';
|
|
9
|
+
import * as accountAdapters from '../../../adapters/accounts.js';
|
|
10
|
+
import * as billAdapters from '../../../adapters/bills.js';
|
|
11
|
+
import * as creditCardAdapters from '../../../adapters/credit-cards.js';
|
|
12
|
+
import { addCardPurchaseWireInToModel, importCardStatementWireInToModel, updateCardTransactionWireInToModel, } from '../../../adapters/credit-cards.js';
|
|
13
|
+
import { bulkResultToWireOut, createResultToWireOut, deleteResultToWireOut, outcomeToDb, } from '../../../adapters/transactions.js';
|
|
14
|
+
import { buildBulkResult } from '../../../controllers/transaction/bulk.js';
|
|
15
|
+
import { defineTool } from '../definition.js';
|
|
16
|
+
import { fromResult, json } from '../respond.js';
|
|
17
|
+
import { STATEMENT_IMPORT_RESULT_DESCRIPTION } from '../shared.js';
|
|
18
|
+
import { MUTATING, READ_ONLY } from '../annotations.js';
|
|
19
|
+
const importCardStatementDescription = 'Import a credit-card statement (pasted text, CSV lines) — every item is a purchase on the ONE ' +
|
|
20
|
+
"card named at the top level, joining each item's cycle bill (fatura). Single-source: the " +
|
|
21
|
+
"credit-card aggregate's bulk entry point (ADR-017) — use import_account_statement instead for a " +
|
|
22
|
+
`bank/wallet statement. ${STATEMENT_IMPORT_RESULT_DESCRIPTION}`;
|
|
23
|
+
const importCardStatementTool = defineTool({
|
|
24
|
+
name: ToolName.enum.import_card_statement,
|
|
25
|
+
config: {
|
|
26
|
+
annotations: MUTATING,
|
|
27
|
+
title: 'Import a credit-card statement',
|
|
28
|
+
description: importCardStatementDescription,
|
|
29
|
+
inputSchema: ImportCardStatementSchema.shape,
|
|
30
|
+
},
|
|
31
|
+
// Orchestration (plan → run each item → bulk result) that belongs in a controller; kept as one named step here.
|
|
32
|
+
handle: async (args, { deps, runEffectsSequence }) => {
|
|
33
|
+
const plan = await importCardStatement(deps, importCardStatementWireInToModel(args), TransactionSource.enum.import);
|
|
34
|
+
const outcomes = await runEffectsSequence(plan.lines, (line) => () => plan.flowFor(line)().map(billAdapters.outcomeToDb).map(outcomeToDb));
|
|
35
|
+
return json(bulkResultToWireOut(buildBulkResult(outcomes, plan.lines)));
|
|
36
|
+
},
|
|
37
|
+
});
|
|
38
|
+
const addCardPurchaseDescription = "Record a credit-card purchase, joining the cycle bill (fatura) — the credit-card aggregate's " +
|
|
39
|
+
'purchase entry point (ADR-016). Resolves the card and category by ' +
|
|
40
|
+
'name; when category is omitted, classifies via learned merchant→category associations and returns ' +
|
|
41
|
+
'method + confidence (confirm with the user when confidence < 0.6). Idempotent automatically — a ' +
|
|
42
|
+
'repeat call with the same card/description/date/amount is deduped; pass discriminator to record a ' +
|
|
43
|
+
'genuinely separate transaction that would otherwise look identical. Currency always comes from the ' +
|
|
44
|
+
"card (a card's currency is fixed at creation) — the currency field is accepted for schema symmetry " +
|
|
45
|
+
'with add_account_expense/add_account_income but has no effect here.';
|
|
46
|
+
const addCardPurchaseTool = defineTool({
|
|
47
|
+
name: ToolName.enum.add_card_purchase,
|
|
48
|
+
config: {
|
|
49
|
+
annotations: MUTATING,
|
|
50
|
+
title: 'Add credit-card purchase',
|
|
51
|
+
description: addCardPurchaseDescription,
|
|
52
|
+
inputSchema: AddCardPurchaseSchema.shape,
|
|
53
|
+
},
|
|
54
|
+
handle: async (args, { deps, runEffects }) => {
|
|
55
|
+
const model = addCardPurchaseWireInToModel(args);
|
|
56
|
+
const flow = () => addCardPurchase(deps, model, TransactionSource.enum.mcp).map(billAdapters.outcomeToDb).map(outcomeToDb);
|
|
57
|
+
return fromResult((await runEffects(flow)).map(createResultToWireOut));
|
|
58
|
+
},
|
|
59
|
+
});
|
|
60
|
+
const createCreditCardDescription = 'Create a credit card with its internal liability account (ADR-010). closingDay: day the fatura ' +
|
|
61
|
+
"closes (transactions after it go to next month's bill). dueDay: payment due day. Currency " +
|
|
62
|
+
'defaults to USD. The card auto-creates an internal credit account that tracks outstanding debt.';
|
|
63
|
+
const createCreditCardTool = defineTool({
|
|
64
|
+
name: ToolName.enum.create_credit_card,
|
|
65
|
+
config: {
|
|
66
|
+
annotations: MUTATING,
|
|
67
|
+
title: 'Create credit card',
|
|
68
|
+
description: createCreditCardDescription,
|
|
69
|
+
inputSchema: CreateCreditCardSchema.shape,
|
|
70
|
+
},
|
|
71
|
+
handle: async (args, { deps, runEffects }) => {
|
|
72
|
+
const flow = () => createCreditCard(deps, args).map(accountAdapters.outcomeToDb).map(creditCardAdapters.outcomeToDb);
|
|
73
|
+
return fromResult(await runEffects(flow));
|
|
74
|
+
},
|
|
75
|
+
});
|
|
76
|
+
const listCreditCardsTool = defineTool({
|
|
77
|
+
name: ToolName.enum.list_credit_cards,
|
|
78
|
+
config: {
|
|
79
|
+
annotations: READ_ONLY,
|
|
80
|
+
title: 'List credit cards',
|
|
81
|
+
description: 'List all credit cards.',
|
|
82
|
+
inputSchema: {},
|
|
83
|
+
},
|
|
84
|
+
handle: async (_args, { deps }) => {
|
|
85
|
+
return json(await listCreditCards(deps));
|
|
86
|
+
},
|
|
87
|
+
});
|
|
88
|
+
const updateCreditCardDescription = "Update a credit card. name identifies the card; newName renames it — the card's internal account " +
|
|
89
|
+
'(named "Card: {name}", ADR-010) is renamed in the same atomic write. limit/closingDay/dueDay are plain ' +
|
|
90
|
+
'field updates (a closingDay/dueDay change only applies to future bill cycles; existing bills keep their ' +
|
|
91
|
+
'own computed dates). paymentAccount is resolved and validated exactly like create_credit_card/pay_bill: ' +
|
|
92
|
+
'rejected if it is a credit account or its currency does not match the card.';
|
|
93
|
+
const updateCreditCardTool = defineTool({
|
|
94
|
+
name: ToolName.enum.update_credit_card,
|
|
95
|
+
config: {
|
|
96
|
+
annotations: MUTATING,
|
|
97
|
+
title: 'Update credit card',
|
|
98
|
+
description: updateCreditCardDescription,
|
|
99
|
+
inputSchema: UpdateCreditCardSchema.shape,
|
|
100
|
+
},
|
|
101
|
+
handle: async (args, { deps, runEffects }) => {
|
|
102
|
+
const flow = () => updateCreditCard(deps, creditCardAdapters.updateWireInToModel(args))
|
|
103
|
+
.map(accountAdapters.outcomeToDb)
|
|
104
|
+
.map(creditCardAdapters.outcomeToDb);
|
|
105
|
+
return fromResult(await runEffects(flow));
|
|
106
|
+
},
|
|
107
|
+
});
|
|
108
|
+
const deleteCreditCardDescription = 'Hard delete a credit card and everything associated: internal credit account, all purchases, ' +
|
|
109
|
+
'bill payments, and bills. Without confirm:true it is a DRY RUN returning what would be deleted — ' +
|
|
110
|
+
'show it to the user and call again with confirm: true. Irreversible.';
|
|
111
|
+
const deleteCreditCardTool = defineTool({
|
|
112
|
+
name: ToolName.enum.delete_credit_card,
|
|
113
|
+
config: {
|
|
114
|
+
annotations: MUTATING,
|
|
115
|
+
title: 'Delete credit card',
|
|
116
|
+
description: deleteCreditCardDescription,
|
|
117
|
+
inputSchema: {
|
|
118
|
+
card: z.string().min(1).describe('Card name'),
|
|
119
|
+
confirm: z.boolean().default(false).describe('Must be true to actually delete'),
|
|
120
|
+
},
|
|
121
|
+
},
|
|
122
|
+
handle: async (args, { deps, runEffects }) => {
|
|
123
|
+
const flow = () => deleteCreditCard(deps, args)
|
|
124
|
+
.map(creditCardAdapters.outcomeToDb)
|
|
125
|
+
.map(accountAdapters.outcomeToDb)
|
|
126
|
+
.map(billAdapters.outcomeToDb)
|
|
127
|
+
.map(outcomeToDb);
|
|
128
|
+
return fromResult(await runEffects(flow));
|
|
129
|
+
},
|
|
130
|
+
});
|
|
131
|
+
const getBillTool = defineTool({
|
|
132
|
+
name: ToolName.enum.get_bill,
|
|
133
|
+
config: {
|
|
134
|
+
annotations: READ_ONLY,
|
|
135
|
+
title: 'Get credit card bill (fatura)',
|
|
136
|
+
description: 'Get a card bill for a month: status (open/closed/paid), close/due dates, total, and its transactions.',
|
|
137
|
+
inputSchema: BillQuerySchema.shape,
|
|
138
|
+
},
|
|
139
|
+
handle: async (args, { deps }) => {
|
|
140
|
+
return fromResult(await getBill(deps, args));
|
|
141
|
+
},
|
|
142
|
+
});
|
|
143
|
+
const payBillDescription = 'Pay a credit card bill. Creates a canonical transfer (payer account → card internal account) ' +
|
|
144
|
+
'for the full bill total, then marks the bill paid. Idempotent — re-calling on a paid bill is a no-op. ' +
|
|
145
|
+
'Paying account resolution: explicit `account` → card default `paymentAccount` → error. ' +
|
|
146
|
+
'Optional `paymentDate` (defaults to today) records when the payment occurred; it must not be in the ' +
|
|
147
|
+
'future — the payment transfer is always effective and dated on/before today.';
|
|
148
|
+
const payBillTool = defineTool({
|
|
149
|
+
name: ToolName.enum.pay_bill,
|
|
150
|
+
config: {
|
|
151
|
+
annotations: MUTATING,
|
|
152
|
+
title: 'Pay credit card bill',
|
|
153
|
+
description: payBillDescription,
|
|
154
|
+
inputSchema: PayBillSchema.shape,
|
|
155
|
+
},
|
|
156
|
+
handle: async (args, { deps, runEffects }) => {
|
|
157
|
+
const flow = () => payBill(deps, { ...args, source: TransactionSource.enum.mcp })
|
|
158
|
+
.map(billAdapters.outcomeToDb)
|
|
159
|
+
.map(outcomeToDb);
|
|
160
|
+
return fromResult(await runEffects(flow));
|
|
161
|
+
},
|
|
162
|
+
});
|
|
163
|
+
const revertBillPaymentDescription = 'Undo a bill payment: deletes the payment transfer and flips the bill back from paid to closed. ' +
|
|
164
|
+
'Idempotent — calling on a bill that is not paid is a no-op that returns it unchanged.';
|
|
165
|
+
const revertBillPaymentTool = defineTool({
|
|
166
|
+
name: ToolName.enum.revert_bill_payment,
|
|
167
|
+
config: {
|
|
168
|
+
annotations: MUTATING,
|
|
169
|
+
title: 'Revert credit card bill payment',
|
|
170
|
+
description: revertBillPaymentDescription,
|
|
171
|
+
inputSchema: BillQuerySchema.shape,
|
|
172
|
+
},
|
|
173
|
+
handle: async (args, { deps, runEffects }) => {
|
|
174
|
+
const flow = () => revertBillPayment(deps, args).map(billAdapters.outcomeToDb).map(outcomeToDb);
|
|
175
|
+
return fromResult(await runEffects(flow));
|
|
176
|
+
},
|
|
177
|
+
});
|
|
178
|
+
const updateCardTransactionDescription = "Update a credit-card transaction by id (from search_transactions) — the credit-card aggregate's " +
|
|
179
|
+
'update entry point (ADR-017/ADR-020). Owns transactions that involve a credit account: card ' +
|
|
180
|
+
'purchases and the bill-payment transfer. cardId/billId (returned by search_transactions/ ' +
|
|
181
|
+
'TransactionView) are reliable proxies for picking this tool — only these two cases ever have a ' +
|
|
182
|
+
'credit-account leg — but TransactionView does not expose account types, and the authoritative ' +
|
|
183
|
+
"check is the leg account type; if unsure (e.g. a transfer's toAccountId), call the tool and " +
|
|
184
|
+
'follow the wrong-tool redirect. Calling this on a transaction with no credit-account leg is ' +
|
|
185
|
+
`rejected with a validation error redirecting to ${ToolName.enum.update_account_transaction}. Only ` +
|
|
186
|
+
'provided fields change. Setting category is a user correction (confidence 1, strengthens the ' +
|
|
187
|
+
'merchant→category association). account cannot be changed — a card purchase is always funded by ' +
|
|
188
|
+
"the card's own internal liability account (ADR-010). billMonth+billYear reassigns to a different " +
|
|
189
|
+
'bill cycle (both required together); rejected with a validation error pointing at ' +
|
|
190
|
+
'revert_bill_payment if the current or target bill is paid. The bill-payment transfer itself ' +
|
|
191
|
+
'(billId set, no cardId) cannot be edited at all — it is owned exclusively by pay_bill/' +
|
|
192
|
+
'revert_bill_payment.';
|
|
193
|
+
const updateCardTransactionTool = defineTool({
|
|
194
|
+
name: ToolName.enum.update_card_transaction,
|
|
195
|
+
config: {
|
|
196
|
+
annotations: MUTATING,
|
|
197
|
+
title: 'Update credit-card transaction',
|
|
198
|
+
description: updateCardTransactionDescription,
|
|
199
|
+
inputSchema: UpdateCardTransactionSchema.shape,
|
|
200
|
+
},
|
|
201
|
+
handle: async (args, { deps, runEffects }) => {
|
|
202
|
+
const model = updateCardTransactionWireInToModel(args);
|
|
203
|
+
const flow = () => updateCardTransaction(deps, model).map(billAdapters.outcomeToDb).map(outcomeToDb);
|
|
204
|
+
return fromResult(await runEffects(flow));
|
|
205
|
+
},
|
|
206
|
+
});
|
|
207
|
+
const deleteCardTransactionDescription = "Delete a credit-card transaction by id — the credit-card aggregate's delete entry point " +
|
|
208
|
+
'(ADR-017/ADR-020). Owns transactions that involve a credit account (card purchases and the ' +
|
|
209
|
+
'bill-payment transfer); calling this on a transaction with no credit-account leg is rejected with ' +
|
|
210
|
+
`a validation error redirecting to ${ToolName.enum.delete_account_transaction}. Without confirm:true ` +
|
|
211
|
+
'it is a DRY RUN returning what would be deleted — show it to the user and call again with ' +
|
|
212
|
+
'confirm: true. Any transaction on a paid bill (including the bill-payment transfer itself) cannot ' +
|
|
213
|
+
'be deleted this way — rejected with a validation error pointing at revert_bill_payment.';
|
|
214
|
+
const deleteCardTransactionTool = defineTool({
|
|
215
|
+
name: ToolName.enum.delete_card_transaction,
|
|
216
|
+
config: {
|
|
217
|
+
annotations: MUTATING,
|
|
218
|
+
title: 'Delete credit-card transaction',
|
|
219
|
+
description: deleteCardTransactionDescription,
|
|
220
|
+
inputSchema: DeleteTransactionSchema.shape,
|
|
221
|
+
},
|
|
222
|
+
handle: async (args, { deps, runEffects }) => {
|
|
223
|
+
const flow = () => deleteCardTransaction(deps, args).map(billAdapters.outcomeToDb).map(outcomeToDb);
|
|
224
|
+
return fromResult((await runEffects(flow)).map(deleteResultToWireOut));
|
|
225
|
+
},
|
|
226
|
+
});
|
|
227
|
+
export const creditCardTools = [
|
|
228
|
+
importCardStatementTool,
|
|
229
|
+
addCardPurchaseTool,
|
|
230
|
+
createCreditCardTool,
|
|
231
|
+
listCreditCardsTool,
|
|
232
|
+
updateCreditCardTool,
|
|
233
|
+
deleteCreditCardTool,
|
|
234
|
+
getBillTool,
|
|
235
|
+
payBillTool,
|
|
236
|
+
revertBillPaymentTool,
|
|
237
|
+
updateCardTransactionTool,
|
|
238
|
+
deleteCardTransactionTool,
|
|
239
|
+
];
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
import { ToolName } from '../tool-name.js';
|
|
2
|
+
import { listExchangeRates, setExchangeRate } from '../../../controllers/currency-rates.js';
|
|
3
|
+
import { buildBulkResult } from '../../../logic/currency-rate.js';
|
|
4
|
+
import { SetExchangeRateSchema } from '../../../models/currency-rate.js';
|
|
5
|
+
import { SetExchangeRatesSchema } from '../../../wire/in/currency-rates.js';
|
|
6
|
+
import * as currencyRateAdapters from '../../../adapters/currency-rates.js';
|
|
7
|
+
import { defineTool } from '../definition.js';
|
|
8
|
+
import { fromResult, json } from '../respond.js';
|
|
9
|
+
import { MUTATING, READ_ONLY } from '../annotations.js';
|
|
10
|
+
import { PRODUCT_NAME } from '../../../models/package.js';
|
|
11
|
+
const RATE_TOOL_DESCRIPTION_PREFIX = `${PRODUCT_NAME} never fetches exchange rates itself (local-first, zero external calls — ADR-026). ` +
|
|
12
|
+
'The AI agent is responsible for sourcing current rates (e.g. PTAX for fiat, a crypto price API) ' +
|
|
13
|
+
'and upserting them here so read-time valuation has data to work with. ';
|
|
14
|
+
const setExchangeRateDescription = RATE_TOOL_DESCRIPTION_PREFIX +
|
|
15
|
+
'Upserts one (from, to) rate: 1 unit of `from` = `rate` units of `to`, as of `asOf`. ' +
|
|
16
|
+
'A pair that already has a stored rate is overwritten (latest wins) — this is not a history log.';
|
|
17
|
+
const setExchangeRateTool = defineTool({
|
|
18
|
+
name: ToolName.enum.set_exchange_rate,
|
|
19
|
+
config: {
|
|
20
|
+
annotations: MUTATING,
|
|
21
|
+
title: 'Set exchange rate',
|
|
22
|
+
description: setExchangeRateDescription,
|
|
23
|
+
inputSchema: SetExchangeRateSchema.shape,
|
|
24
|
+
},
|
|
25
|
+
handle: async (args, { deps, runEffects }) => {
|
|
26
|
+
const flow = () => setExchangeRate(deps, args).map(currencyRateAdapters.outcomeToDb);
|
|
27
|
+
return fromResult(await runEffects(flow));
|
|
28
|
+
},
|
|
29
|
+
});
|
|
30
|
+
const setExchangeRatesDescription = RATE_TOOL_DESCRIPTION_PREFIX +
|
|
31
|
+
'Upserts several (from, to) rates in one call, same semantics as set_exchange_rate per item. ' +
|
|
32
|
+
"Partial success: one pair's failure (e.g. from === to) does not block the others — check each " +
|
|
33
|
+
"item's status in the response.";
|
|
34
|
+
const setExchangeRatesTool = defineTool({
|
|
35
|
+
name: ToolName.enum.set_exchange_rates,
|
|
36
|
+
config: {
|
|
37
|
+
annotations: MUTATING,
|
|
38
|
+
title: 'Set exchange rates (bulk)',
|
|
39
|
+
description: setExchangeRatesDescription,
|
|
40
|
+
inputSchema: SetExchangeRatesSchema.shape,
|
|
41
|
+
},
|
|
42
|
+
// Orchestration (plan → run each item → bulk result) that belongs in a controller; kept as one named step here.
|
|
43
|
+
handle: async (args, { deps, runEffectsSequence }) => {
|
|
44
|
+
const outcomes = await runEffectsSequence(args.rates, (item) => () => setExchangeRate(deps, item).map(currencyRateAdapters.outcomeToDb));
|
|
45
|
+
return json(currencyRateAdapters.bulkResultToWireOut(buildBulkResult(args.rates, outcomes)));
|
|
46
|
+
},
|
|
47
|
+
});
|
|
48
|
+
const listExchangeRatesDescription = 'All stored exchange rates, each with its own `asOf`. Staleness is not evaluated here — this ' +
|
|
49
|
+
'is the raw cached table (ADR-026); use it to decide which pairs need refreshing.';
|
|
50
|
+
const listExchangeRatesTool = defineTool({
|
|
51
|
+
name: ToolName.enum.list_exchange_rates,
|
|
52
|
+
config: {
|
|
53
|
+
annotations: READ_ONLY,
|
|
54
|
+
title: 'List exchange rates',
|
|
55
|
+
description: listExchangeRatesDescription,
|
|
56
|
+
inputSchema: {},
|
|
57
|
+
},
|
|
58
|
+
handle: async (_args, { deps }) => {
|
|
59
|
+
return json(await listExchangeRates(deps));
|
|
60
|
+
},
|
|
61
|
+
});
|
|
62
|
+
export const currencyRateTools = [setExchangeRateTool, setExchangeRatesTool, listExchangeRatesTool];
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
import { ToolName } from '../tool-name.js';
|
|
2
|
+
import { z } from 'zod';
|
|
3
|
+
import { deleteDashboard, listDashboards, renameDashboard, saveDashboard } from '../../../controllers/dashboards.js';
|
|
4
|
+
import { RenameDashboardSchema, SaveDashboardSchema } from '../../../models/dashboard.js';
|
|
5
|
+
import * as dashboardAdapters from '../../../adapters/dashboards.js';
|
|
6
|
+
import { defineTool } from '../definition.js';
|
|
7
|
+
import { fromResult, json } from '../respond.js';
|
|
8
|
+
import { MUTATING, READ_ONLY } from '../annotations.js';
|
|
9
|
+
const saveDashboardDescription = 'Create or override a named dashboard: a content FRAGMENT you author (sections + an inline ' +
|
|
10
|
+
'<script>, no <!doctype>/<html>/<head>/<style> root — the app shell at GET /ui already provides ' +
|
|
11
|
+
'those and is what actually renders it, at GET /ui/:name) (ADR-013, fragment model ADR-027). ' +
|
|
12
|
+
'Upsert semantics — saving to an existing name replaces it immediately, no rebuild or restart ' +
|
|
13
|
+
'needed. CRITICAL: the fragment must NEVER embed financial data, secrets, or tokens inline — ' +
|
|
14
|
+
'render layout/styling only and fetch data client-side from the documented /api endpoints (read ' +
|
|
15
|
+
'the patty://openapi resource for the contract) on load, so the dashboard is always live and ' +
|
|
16
|
+
'safe to share. Rejected (validation error) if the content is empty, still carries a full ' +
|
|
17
|
+
'<!doctype>/<html> document root, an external <script src> reference (the shell already loads ' +
|
|
18
|
+
'Chart.js once — a fragment carries zero external references of its own), or an inline <script> ' +
|
|
19
|
+
'has a syntax error — fix the reported issue and save again.';
|
|
20
|
+
const saveDashboardTool = defineTool({
|
|
21
|
+
name: ToolName.enum.save_dashboard,
|
|
22
|
+
config: {
|
|
23
|
+
annotations: MUTATING,
|
|
24
|
+
title: 'Save dashboard',
|
|
25
|
+
description: saveDashboardDescription,
|
|
26
|
+
inputSchema: SaveDashboardSchema.shape,
|
|
27
|
+
},
|
|
28
|
+
handle: async (args, { deps, runEffects }) => {
|
|
29
|
+
const flow = () => saveDashboard(deps, args.name, args.html).map(dashboardAdapters.outcomeToDb);
|
|
30
|
+
return fromResult(await runEffects(flow));
|
|
31
|
+
},
|
|
32
|
+
});
|
|
33
|
+
const listDashboardsTool = defineTool({
|
|
34
|
+
name: ToolName.enum.list_dashboards,
|
|
35
|
+
config: {
|
|
36
|
+
annotations: READ_ONLY,
|
|
37
|
+
title: 'List dashboards',
|
|
38
|
+
description: 'List saved dashboards by name and last-updated time (HTML content omitted).',
|
|
39
|
+
inputSchema: {},
|
|
40
|
+
},
|
|
41
|
+
handle: async (_args, { deps }) => {
|
|
42
|
+
return json(await listDashboards(deps));
|
|
43
|
+
},
|
|
44
|
+
});
|
|
45
|
+
const deleteDashboardTool = defineTool({
|
|
46
|
+
name: ToolName.enum.delete_dashboard,
|
|
47
|
+
config: {
|
|
48
|
+
annotations: MUTATING,
|
|
49
|
+
title: 'Delete dashboard',
|
|
50
|
+
description: 'Delete a dashboard by name. Idempotent — deleting an already-absent name is not an error.',
|
|
51
|
+
inputSchema: { name: z.string().min(1).describe('Dashboard name') },
|
|
52
|
+
},
|
|
53
|
+
handle: async (args, { deps, runEffects }) => {
|
|
54
|
+
const flow = () => deleteDashboard(deps, args.name).map(dashboardAdapters.outcomeToDb);
|
|
55
|
+
return fromResult(await runEffects(flow));
|
|
56
|
+
},
|
|
57
|
+
});
|
|
58
|
+
const renameDashboardDescription = 'Rename a dashboard, preserving its content and identity. GET /api/dashboards/:newName serves it ' +
|
|
59
|
+
'afterward; GET /api/dashboards/:name (the old name) 404s. GET /ui/:name always serves the app ' +
|
|
60
|
+
'shell regardless of name, so it does not reflect this — the shell resolves the dashboard ' +
|
|
61
|
+
'client-side.';
|
|
62
|
+
const renameDashboardTool = defineTool({
|
|
63
|
+
name: ToolName.enum.rename_dashboard,
|
|
64
|
+
config: {
|
|
65
|
+
annotations: MUTATING,
|
|
66
|
+
title: 'Rename dashboard',
|
|
67
|
+
description: renameDashboardDescription,
|
|
68
|
+
inputSchema: RenameDashboardSchema.shape,
|
|
69
|
+
},
|
|
70
|
+
handle: async (args, { deps, runEffects }) => {
|
|
71
|
+
const flow = () => renameDashboard(deps, args.name, args.newName).map(dashboardAdapters.outcomeToDb);
|
|
72
|
+
return fromResult(await runEffects(flow));
|
|
73
|
+
},
|
|
74
|
+
});
|
|
75
|
+
export const dashboardTools = [saveDashboardTool, listDashboardsTool, deleteDashboardTool, renameDashboardTool];
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { accountTools } from './account.js';
|
|
2
|
+
import { aggregateTools } from './aggregate.js';
|
|
3
|
+
import { budgetTools } from './budget.js';
|
|
4
|
+
import { categoryTools } from './category.js';
|
|
5
|
+
import { correlationsTools } from './correlations.js';
|
|
6
|
+
import { creditCardTools } from './credit-card.js';
|
|
7
|
+
import { currencyRateTools } from './currency-rates.js';
|
|
8
|
+
import { dashboardTools } from './dashboard.js';
|
|
9
|
+
import { recurringTools } from './recurring.js';
|
|
10
|
+
import { summaryTools } from './summary.js';
|
|
11
|
+
import { systemTools } from './system.js';
|
|
12
|
+
import { tagTools } from './tag.js';
|
|
13
|
+
import { transactionTools } from './transaction.js';
|
|
14
|
+
import { transferTools } from './transfer.js';
|
|
15
|
+
/** Every tool, in registration (and `tools/list`) order — a new domain module's list is added here and nowhere else. */
|
|
16
|
+
export const toolDefinitions = [
|
|
17
|
+
...accountTools,
|
|
18
|
+
...creditCardTools,
|
|
19
|
+
...currencyRateTools,
|
|
20
|
+
...transactionTools,
|
|
21
|
+
...transferTools,
|
|
22
|
+
...budgetTools,
|
|
23
|
+
...recurringTools,
|
|
24
|
+
...categoryTools,
|
|
25
|
+
...tagTools,
|
|
26
|
+
...dashboardTools,
|
|
27
|
+
...correlationsTools,
|
|
28
|
+
...aggregateTools,
|
|
29
|
+
...summaryTools,
|
|
30
|
+
...systemTools,
|
|
31
|
+
];
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
import { ToolName } from '../tool-name.js';
|
|
2
|
+
import { z } from 'zod';
|
|
3
|
+
import { applyDueRecurring, createRecurring, listRecurring } from '../../../controllers/recurring.js';
|
|
4
|
+
import { CreateRecurringSchema } from '../../../wire/in/recurring.js';
|
|
5
|
+
import * as recurringAdapters from '../../../adapters/recurring.js';
|
|
6
|
+
import { outcomeToDb } from '../../../adapters/transactions.js';
|
|
7
|
+
import { defineTool } from '../definition.js';
|
|
8
|
+
import { fromResult, json } from '../respond.js';
|
|
9
|
+
import { MUTATING, READ_ONLY } from '../annotations.js';
|
|
10
|
+
const createRecurringDescription = 'Create a recurring transaction rule (salary, rent, subscription). Materialized by apply_due_recurring, ' +
|
|
11
|
+
'each occurrence carrying the rule\'s merchant. `merchant` names it explicitly (e.g. "Netflix"); omit to ' +
|
|
12
|
+
"derive it from `description` — either way it's normalized the same way a transaction's merchant is, " +
|
|
13
|
+
'so recurring spend shows up in merchant_concentration and reinforces classification like any other spend.';
|
|
14
|
+
const createRecurringTool = defineTool({
|
|
15
|
+
name: ToolName.enum.create_recurring,
|
|
16
|
+
config: {
|
|
17
|
+
annotations: MUTATING,
|
|
18
|
+
title: 'Create recurring rule',
|
|
19
|
+
description: createRecurringDescription,
|
|
20
|
+
inputSchema: CreateRecurringSchema.shape,
|
|
21
|
+
},
|
|
22
|
+
handle: async (args, { deps, runEffects }) => {
|
|
23
|
+
const flow = () => createRecurring(deps, args).map(recurringAdapters.outcomeToDb);
|
|
24
|
+
return fromResult(await runEffects(flow));
|
|
25
|
+
},
|
|
26
|
+
});
|
|
27
|
+
const listRecurringTool = defineTool({
|
|
28
|
+
name: ToolName.enum.list_recurring,
|
|
29
|
+
config: {
|
|
30
|
+
annotations: READ_ONLY,
|
|
31
|
+
title: 'List recurring rules',
|
|
32
|
+
description: 'List all recurring rules with next due dates.',
|
|
33
|
+
inputSchema: {},
|
|
34
|
+
},
|
|
35
|
+
handle: async (_args, { deps }) => {
|
|
36
|
+
return json(await listRecurring(deps));
|
|
37
|
+
},
|
|
38
|
+
});
|
|
39
|
+
const applyDueRecurringDescription = 'Materialize transactions for every rule due on/before `through` (default: today). ' +
|
|
40
|
+
'Past/present occurrences are created as effective; future occurrences are created as pending — ' +
|
|
41
|
+
'so passing a future date pre-creates upcoming salary, rent, and subscriptions as pending, ' +
|
|
42
|
+
'feeding projections without extra monthly effort. Idempotent — safe to call any time.';
|
|
43
|
+
const applyDueRecurringTool = defineTool({
|
|
44
|
+
name: ToolName.enum.apply_due_recurring,
|
|
45
|
+
config: {
|
|
46
|
+
annotations: MUTATING,
|
|
47
|
+
title: 'Apply due recurring rules',
|
|
48
|
+
description: applyDueRecurringDescription,
|
|
49
|
+
inputSchema: {
|
|
50
|
+
through: z
|
|
51
|
+
.string()
|
|
52
|
+
.regex(/^\d{4}-\d{2}-\d{2}$/)
|
|
53
|
+
.optional()
|
|
54
|
+
.describe('YYYY-MM-DD horizon (default: today). Pass a future date to pre-create upcoming occurrences as pending.'),
|
|
55
|
+
},
|
|
56
|
+
},
|
|
57
|
+
handle: async (args, { deps, runEffects }) => {
|
|
58
|
+
const flow = () => applyDueRecurring(deps, args).map(recurringAdapters.outcomeToDb).map(outcomeToDb);
|
|
59
|
+
return fromResult(await runEffects(flow));
|
|
60
|
+
},
|
|
61
|
+
});
|
|
62
|
+
export const recurringTools = [createRecurringTool, listRecurringTool, applyDueRecurringTool];
|