nuxt-backend 0.2.1 → 0.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +17 -6
- package/dist/capabilities/detect.js +16 -7
- package/dist/capabilities/gateway-route.js +24 -0
- package/dist/capabilities/registry.js +3 -2
- package/dist/capabilities/status.js +3 -1
- package/dist/chunks/catalog.mjs +1 -1
- package/dist/chunks/doctor.mjs +498 -67
- package/dist/chunks/email-previews.mjs +1 -1
- package/dist/chunks/health.mjs +2 -2
- package/dist/chunks/index.mjs +3 -3
- package/dist/chunks/install.mjs +4 -4
- package/dist/chunks/run.mjs +1 -1
- package/dist/chunks/server.mjs +8 -6
- package/dist/cli.mjs +394 -39
- package/dist/convex/access-tickets.d.ts +20 -1
- package/dist/convex/access-tickets.d.ts.map +1 -1
- package/dist/convex/access-tickets.js +28 -0
- package/dist/convex/access-tickets.js.map +1 -1
- package/dist/convex/account-data.d.ts +25 -3
- package/dist/convex/account-data.d.ts.map +1 -1
- package/dist/convex/account-data.js +26 -3
- package/dist/convex/account-data.js.map +1 -1
- package/dist/convex/app.d.ts +15 -2
- package/dist/convex/app.d.ts.map +1 -1
- package/dist/convex/app.js +16 -2
- package/dist/convex/app.js.map +1 -1
- package/dist/convex/billing-launch.d.ts +36 -0
- package/dist/convex/billing-launch.d.ts.map +1 -0
- package/dist/convex/billing-launch.js +18 -0
- package/dist/convex/billing-launch.js.map +1 -0
- package/dist/convex/catalog.d.ts +16 -2
- package/dist/convex/catalog.d.ts.map +1 -1
- package/dist/convex/catalog.js.map +1 -1
- package/dist/convex/client/code-binding.js +1 -1
- package/dist/convex/client/component.d.ts.map +1 -1
- package/dist/convex/client/guards.js +3 -3
- package/dist/convex/client/guards.js.map +1 -1
- package/dist/convex/client/index.d.ts +94 -40
- package/dist/convex/client/index.d.ts.map +1 -1
- package/dist/convex/client/index.js +4 -3
- package/dist/convex/client/index.js.map +1 -1
- package/dist/convex/client/plugins.d.ts +67 -30
- package/dist/convex/client/plugins.d.ts.map +1 -1
- package/dist/convex/client/plugins.js +43 -19
- package/dist/convex/client/plugins.js.map +1 -1
- package/dist/convex/components/backend/_generated/api.d.ts +2 -0
- package/dist/convex/components/backend/_generated/api.d.ts.map +1 -1
- package/dist/convex/components/backend/_generated/api.js.map +1 -1
- package/dist/convex/components/backend/_generated/component.d.ts +454 -4
- package/dist/convex/components/backend/_generated/component.d.ts.map +1 -1
- package/dist/convex/components/backend/access.d.ts +47 -6
- package/dist/convex/components/backend/access.d.ts.map +1 -1
- package/dist/convex/components/backend/access.js +108 -16
- package/dist/convex/components/backend/access.js.map +1 -1
- package/dist/convex/components/backend/account.d.ts +6 -0
- package/dist/convex/components/backend/account.d.ts.map +1 -1
- package/dist/convex/components/backend/account.js +49 -2
- package/dist/convex/components/backend/account.js.map +1 -1
- package/dist/convex/components/backend/adapter.d.ts +1 -1
- package/dist/convex/components/backend/adapter.d.ts.map +1 -1
- package/dist/convex/components/backend/adapter.js +1 -1
- package/dist/convex/components/backend/adapter.js.map +1 -1
- package/dist/convex/components/backend/billing.d.ts +22 -1
- package/dist/convex/components/backend/billing.d.ts.map +1 -1
- package/dist/convex/components/backend/billing.js +77 -12
- package/dist/convex/components/backend/billing.js.map +1 -1
- package/dist/convex/components/backend/costs.d.ts +1 -1
- package/dist/convex/components/backend/crons.d.ts.map +1 -1
- package/dist/convex/components/backend/crons.js +3 -0
- package/dist/convex/components/backend/crons.js.map +1 -1
- package/dist/convex/components/backend/funnel.d.ts +2 -2
- package/dist/convex/components/backend/gifts.d.ts +2 -2
- package/dist/convex/components/backend/gifts.js +2 -2
- package/dist/convex/components/backend/jobs.d.ts +53 -10
- package/dist/convex/components/backend/jobs.d.ts.map +1 -1
- package/dist/convex/components/backend/jobs.js +58 -13
- package/dist/convex/components/backend/jobs.js.map +1 -1
- package/dist/convex/components/backend/maintenance.d.ts +2 -2
- package/dist/convex/components/backend/maintenance.d.ts.map +1 -1
- package/dist/convex/components/backend/maintenance.js +11 -1
- package/dist/convex/components/backend/maintenance.js.map +1 -1
- package/dist/convex/components/backend/moderation.d.ts +94 -0
- package/dist/convex/components/backend/moderation.d.ts.map +1 -0
- package/dist/convex/components/backend/moderation.js +53 -0
- package/dist/convex/components/backend/moderation.js.map +1 -0
- package/dist/convex/components/backend/schema.d.ts +397 -24
- package/dist/convex/components/backend/schema.d.ts.map +1 -1
- package/dist/convex/components/backend/schema.js +108 -4
- package/dist/convex/components/backend/schema.js.map +1 -1
- package/dist/convex/components/backend/storage.d.ts +19 -0
- package/dist/convex/components/backend/storage.d.ts.map +1 -1
- package/dist/convex/components/backend/storage.js +57 -0
- package/dist/convex/components/backend/storage.js.map +1 -1
- package/dist/convex/components/backend/subscriptions.d.ts +1 -1
- package/dist/convex/components/backend/subscriptions.js +1 -1
- package/dist/convex/components/backend/subscriptions.js.map +1 -1
- package/dist/convex/constants.d.ts +19 -4
- package/dist/convex/constants.d.ts.map +1 -1
- package/dist/convex/constants.js +19 -4
- package/dist/convex/constants.js.map +1 -1
- package/dist/convex/email-templates.d.ts +56 -6
- package/dist/convex/email-templates.d.ts.map +1 -1
- package/dist/convex/email-templates.js +69 -14
- package/dist/convex/email-templates.js.map +1 -1
- package/dist/convex/emails/notification.d.ts +9 -0
- package/dist/convex/emails/notification.d.ts.map +1 -0
- package/dist/convex/emails/notification.js +21 -0
- package/dist/convex/emails/notification.js.map +1 -0
- package/dist/convex/errors.d.ts +8 -3
- package/dist/convex/errors.d.ts.map +1 -1
- package/dist/convex/errors.js +55 -7
- package/dist/convex/errors.js.map +1 -1
- package/dist/convex/events.d.ts +4 -4
- package/dist/convex/events.js +4 -4
- package/dist/convex/events.js.map +1 -1
- package/dist/convex/files.d.ts +30 -4
- package/dist/convex/files.d.ts.map +1 -1
- package/dist/convex/files.js +44 -6
- package/dist/convex/files.js.map +1 -1
- package/dist/convex/integrations/account.d.ts +7 -0
- package/dist/convex/integrations/account.d.ts.map +1 -1
- package/dist/convex/integrations/account.js +2 -0
- package/dist/convex/integrations/account.js.map +1 -1
- package/dist/convex/integrations/ai/chat.js +9 -9
- package/dist/convex/integrations/ai/chat.js.map +1 -1
- package/dist/convex/integrations/ai/config.d.ts +157 -37
- package/dist/convex/integrations/ai/config.d.ts.map +1 -1
- package/dist/convex/integrations/ai/context.d.ts +3 -0
- package/dist/convex/integrations/ai/context.d.ts.map +1 -1
- package/dist/convex/integrations/ai/context.js +4 -3
- package/dist/convex/integrations/ai/context.js.map +1 -1
- package/dist/convex/integrations/ai/costs.d.ts.map +1 -1
- package/dist/convex/integrations/ai/costs.js +49 -2
- package/dist/convex/integrations/ai/costs.js.map +1 -1
- package/dist/convex/integrations/ai/embeddings.d.ts +6 -6
- package/dist/convex/integrations/ai/embeddings.d.ts.map +1 -1
- package/dist/convex/integrations/ai/embeddings.js +17 -30
- package/dist/convex/integrations/ai/embeddings.js.map +1 -1
- package/dist/convex/integrations/ai/images.d.ts +25 -0
- package/dist/convex/integrations/ai/images.d.ts.map +1 -0
- package/dist/convex/integrations/ai/images.js +104 -0
- package/dist/convex/integrations/ai/images.js.map +1 -0
- package/dist/convex/integrations/ai/job-errors.d.ts +12 -0
- package/dist/convex/integrations/ai/job-errors.d.ts.map +1 -1
- package/dist/convex/integrations/ai/job-errors.js +18 -2
- package/dist/convex/integrations/ai/job-errors.js.map +1 -1
- package/dist/convex/integrations/ai/jobs.d.ts +176 -10
- package/dist/convex/integrations/ai/jobs.d.ts.map +1 -1
- package/dist/convex/integrations/ai/jobs.js +336 -70
- package/dist/convex/integrations/ai/jobs.js.map +1 -1
- package/dist/convex/integrations/ai/knowledge.d.ts.map +1 -1
- package/dist/convex/integrations/ai/knowledge.js +10 -11
- package/dist/convex/integrations/ai/knowledge.js.map +1 -1
- package/dist/convex/integrations/ai/metering.d.ts +15 -5
- package/dist/convex/integrations/ai/metering.d.ts.map +1 -1
- package/dist/convex/integrations/ai/metering.js +73 -26
- package/dist/convex/integrations/ai/metering.js.map +1 -1
- package/dist/convex/integrations/ai/model-id.d.ts +14 -1
- package/dist/convex/integrations/ai/model-id.d.ts.map +1 -1
- package/dist/convex/integrations/ai/model-id.js +24 -2
- package/dist/convex/integrations/ai/model-id.js.map +1 -1
- package/dist/convex/integrations/ai/models.d.ts +103 -20
- package/dist/convex/integrations/ai/models.d.ts.map +1 -1
- package/dist/convex/integrations/ai/models.js +220 -45
- package/dist/convex/integrations/ai/models.js.map +1 -1
- package/dist/convex/integrations/ai/moderation-providers.d.ts +136 -0
- package/dist/convex/integrations/ai/moderation-providers.d.ts.map +1 -0
- package/dist/convex/integrations/ai/moderation-providers.js +277 -0
- package/dist/convex/integrations/ai/moderation-providers.js.map +1 -0
- package/dist/convex/integrations/ai/moderation-taxonomy.d.ts +54 -0
- package/dist/convex/integrations/ai/moderation-taxonomy.d.ts.map +1 -0
- package/dist/convex/integrations/ai/moderation-taxonomy.js +141 -0
- package/dist/convex/integrations/ai/moderation-taxonomy.js.map +1 -0
- package/dist/convex/integrations/ai/moderation.d.ts +218 -19
- package/dist/convex/integrations/ai/moderation.d.ts.map +1 -1
- package/dist/convex/integrations/ai/moderation.js +359 -37
- package/dist/convex/integrations/ai/moderation.js.map +1 -1
- package/dist/convex/integrations/ai/provenance.d.ts +6 -0
- package/dist/convex/integrations/ai/provenance.d.ts.map +1 -1
- package/dist/convex/integrations/ai/provenance.js +4 -1
- package/dist/convex/integrations/ai/provenance.js.map +1 -1
- package/dist/convex/integrations/ai/setup.js +5 -5
- package/dist/convex/integrations/ai/setup.js.map +1 -1
- package/dist/convex/integrations/ai/stream.d.ts +1 -1
- package/dist/convex/integrations/ai/stream.d.ts.map +1 -1
- package/dist/convex/integrations/ai/stream.js +4 -2
- package/dist/convex/integrations/ai/stream.js.map +1 -1
- package/dist/convex/integrations/ai.d.ts +15 -8
- package/dist/convex/integrations/ai.d.ts.map +1 -1
- package/dist/convex/integrations/ai.js +4 -1
- package/dist/convex/integrations/ai.js.map +1 -1
- package/dist/convex/integrations/billing/checkout.d.ts +1 -1
- package/dist/convex/integrations/billing/checkout.d.ts.map +1 -1
- package/dist/convex/integrations/billing/checkout.js +4 -4
- package/dist/convex/integrations/billing/checkout.js.map +1 -1
- package/dist/convex/integrations/billing/context.d.ts +8 -0
- package/dist/convex/integrations/billing/context.d.ts.map +1 -1
- package/dist/convex/integrations/billing/context.js +20 -1
- package/dist/convex/integrations/billing/context.js.map +1 -1
- package/dist/convex/integrations/billing/credits.d.ts +6 -0
- package/dist/convex/integrations/billing/credits.d.ts.map +1 -1
- package/dist/convex/integrations/billing/credits.js +21 -6
- package/dist/convex/integrations/billing/credits.js.map +1 -1
- package/dist/convex/integrations/billing/features.d.ts.map +1 -1
- package/dist/convex/integrations/billing/free-plan.d.ts +41 -1
- package/dist/convex/integrations/billing/free-plan.d.ts.map +1 -1
- package/dist/convex/integrations/billing/free-plan.js +92 -29
- package/dist/convex/integrations/billing/free-plan.js.map +1 -1
- package/dist/convex/integrations/billing/functions.d.ts +7 -3
- package/dist/convex/integrations/billing/functions.d.ts.map +1 -1
- package/dist/convex/integrations/billing/functions.js +18 -8
- package/dist/convex/integrations/billing/functions.js.map +1 -1
- package/dist/convex/integrations/billing/gifts.d.ts +4 -0
- package/dist/convex/integrations/billing/gifts.d.ts.map +1 -1
- package/dist/convex/integrations/billing/gifts.js +37 -6
- package/dist/convex/integrations/billing/gifts.js.map +1 -1
- package/dist/convex/integrations/billing/history.d.ts.map +1 -1
- package/dist/convex/integrations/billing/lifecycle.d.ts +9 -3
- package/dist/convex/integrations/billing/lifecycle.d.ts.map +1 -1
- package/dist/convex/integrations/billing/lifecycle.js +15 -6
- package/dist/convex/integrations/billing/lifecycle.js.map +1 -1
- package/dist/convex/integrations/billing/passes.js +2 -2
- package/dist/convex/integrations/billing/pricing.d.ts +9 -2
- package/dist/convex/integrations/billing/pricing.d.ts.map +1 -1
- package/dist/convex/integrations/billing/pricing.js +38 -4
- package/dist/convex/integrations/billing/pricing.js.map +1 -1
- package/dist/convex/integrations/billing/quotas.d.ts.map +1 -1
- package/dist/convex/integrations/billing/rate-limit.d.ts +16 -0
- package/dist/convex/integrations/billing/rate-limit.d.ts.map +1 -0
- package/dist/convex/integrations/billing/rate-limit.js +45 -0
- package/dist/convex/integrations/billing/rate-limit.js.map +1 -0
- package/dist/convex/integrations/billing/referral-orders.d.ts +1 -1
- package/dist/convex/integrations/billing/referral-orders.js +1 -1
- package/dist/convex/integrations/billing/resync.d.ts +28 -0
- package/dist/convex/integrations/billing/resync.d.ts.map +1 -0
- package/dist/convex/integrations/billing/resync.js +139 -0
- package/dist/convex/integrations/billing/resync.js.map +1 -0
- package/dist/convex/integrations/billing/subscriptions.d.ts +1 -1
- package/dist/convex/integrations/billing/subscriptions.d.ts.map +1 -1
- package/dist/convex/integrations/billing/subscriptions.js +6 -2
- package/dist/convex/integrations/billing/subscriptions.js.map +1 -1
- package/dist/convex/integrations/billing/types/lifecycle.d.ts +1 -1
- package/dist/convex/integrations/billing/types/records.d.ts +68 -3
- package/dist/convex/integrations/billing/types/records.d.ts.map +1 -1
- package/dist/convex/integrations/billing/types/setup.d.ts +9 -4
- package/dist/convex/integrations/billing/types/setup.d.ts.map +1 -1
- package/dist/convex/integrations/billing/types/surface.d.ts +38 -5
- package/dist/convex/integrations/billing/types/surface.d.ts.map +1 -1
- package/dist/convex/integrations/billing/webhooks.js +2 -2
- package/dist/convex/integrations/billing/welcome.d.ts +16 -0
- package/dist/convex/integrations/billing/welcome.d.ts.map +1 -0
- package/dist/convex/integrations/billing/welcome.js +93 -0
- package/dist/convex/integrations/billing/welcome.js.map +1 -0
- package/dist/convex/integrations/billing.d.ts +3 -2
- package/dist/convex/integrations/billing.d.ts.map +1 -1
- package/dist/convex/integrations/billing.js +17 -5
- package/dist/convex/integrations/billing.js.map +1 -1
- package/dist/convex/integrations/email.d.ts +17 -3
- package/dist/convex/integrations/email.d.ts.map +1 -1
- package/dist/convex/integrations/email.js.map +1 -1
- package/dist/convex/integrations/functions.d.ts +2 -2
- package/dist/convex/integrations/functions.d.ts.map +1 -1
- package/dist/convex/integrations/functions.js +1 -1
- package/dist/convex/integrations/functions.js.map +1 -1
- package/dist/convex/integrations/launch.d.ts +108 -3
- package/dist/convex/integrations/launch.d.ts.map +1 -1
- package/dist/convex/integrations/launch.js +143 -22
- package/dist/convex/integrations/launch.js.map +1 -1
- package/dist/convex/integrations/notifications.d.ts +6 -2
- package/dist/convex/integrations/notifications.d.ts.map +1 -1
- package/dist/convex/integrations/notifications.js +13 -15
- package/dist/convex/integrations/notifications.js.map +1 -1
- package/dist/convex/integrations/rate-limit.d.ts +18 -0
- package/dist/convex/integrations/rate-limit.d.ts.map +1 -1
- package/dist/convex/integrations/rate-limit.js +18 -3
- package/dist/convex/integrations/rate-limit.js.map +1 -1
- package/dist/convex/integrations/reports.d.ts +4 -1
- package/dist/convex/integrations/reports.d.ts.map +1 -1
- package/dist/convex/integrations/reports.js +14 -3
- package/dist/convex/integrations/reports.js.map +1 -1
- package/dist/convex/integrations/retention.d.ts +42 -4
- package/dist/convex/integrations/retention.d.ts.map +1 -1
- package/dist/convex/integrations/retention.js +62 -4
- package/dist/convex/integrations/retention.js.map +1 -1
- package/dist/convex/integrations/storage.d.ts +71 -3
- package/dist/convex/integrations/storage.d.ts.map +1 -1
- package/dist/convex/integrations/storage.js +22 -4
- package/dist/convex/integrations/storage.js.map +1 -1
- package/dist/convex/label-format.d.ts +2 -2
- package/dist/convex/label-format.d.ts.map +1 -1
- package/dist/convex/label-format.js +2 -2
- package/dist/convex/label-format.js.map +1 -1
- package/dist/convex/label-groups/admin.d.ts +27 -0
- package/dist/convex/label-groups/admin.d.ts.map +1 -1
- package/dist/convex/label-groups/admin.js +28 -0
- package/dist/convex/label-groups/admin.js.map +1 -1
- package/dist/convex/label-groups/cancelFlow.d.ts +1 -1
- package/dist/convex/label-groups/cancelFlow.js +2 -2
- package/dist/convex/label-groups/cancelFlow.js.map +1 -1
- package/dist/convex/label-groups/email.d.ts.map +1 -1
- package/dist/convex/label-groups/email.js +2 -1
- package/dist/convex/label-groups/email.js.map +1 -1
- package/dist/convex/label-groups/errors.d.ts +4 -0
- package/dist/convex/label-groups/errors.d.ts.map +1 -1
- package/dist/convex/label-groups/errors.js +6 -1
- package/dist/convex/label-groups/errors.js.map +1 -1
- package/dist/convex/label-groups/gift.d.ts +2 -0
- package/dist/convex/label-groups/gift.d.ts.map +1 -1
- package/dist/convex/label-groups/gift.js +5 -2
- package/dist/convex/label-groups/gift.js.map +1 -1
- package/dist/convex/label-groups/legal.d.ts +27 -1
- package/dist/convex/label-groups/legal.d.ts.map +1 -1
- package/dist/convex/label-groups/legal.js +31 -0
- package/dist/convex/label-groups/legal.js.map +1 -1
- package/dist/convex/label-groups/notifications.d.ts +3 -1
- package/dist/convex/label-groups/notifications.d.ts.map +1 -1
- package/dist/convex/label-groups/notifications.js +5 -3
- package/dist/convex/label-groups/notifications.js.map +1 -1
- package/dist/convex/label-groups/pastDue.d.ts +1 -1
- package/dist/convex/label-groups/pastDue.d.ts.map +1 -1
- package/dist/convex/label-groups/pastDue.js +1 -1
- package/dist/convex/label-groups/pastDue.js.map +1 -1
- package/dist/convex/label-groups/pricing.d.ts +2 -0
- package/dist/convex/label-groups/pricing.d.ts.map +1 -1
- package/dist/convex/label-groups/pricing.js +4 -0
- package/dist/convex/label-groups/pricing.js.map +1 -1
- package/dist/convex/label-groups/referral.d.ts +2 -2
- package/dist/convex/label-groups/referral.js +2 -2
- package/dist/convex/label-groups/report.d.ts +8 -1
- package/dist/convex/label-groups/report.d.ts.map +1 -1
- package/dist/convex/label-groups/report.js +10 -1
- package/dist/convex/label-groups/report.js.map +1 -1
- package/dist/convex/label-groups/upload.d.ts +1 -0
- package/dist/convex/label-groups/upload.d.ts.map +1 -1
- package/dist/convex/label-groups/upload.js +2 -0
- package/dist/convex/label-groups/upload.js.map +1 -1
- package/dist/convex/label-groups/withdrawal.d.ts +1 -1
- package/dist/convex/label-groups/withdrawal.js +1 -1
- package/dist/convex/label-translations.d.ts.map +1 -1
- package/dist/convex/label-translations.js +94 -34
- package/dist/convex/label-translations.js.map +1 -1
- package/dist/convex/labels.d.ts +100 -1
- package/dist/convex/labels.d.ts.map +1 -1
- package/dist/convex/legal.d.ts +12 -2
- package/dist/convex/legal.d.ts.map +1 -1
- package/dist/convex/legal.js +2 -2
- package/dist/convex/legal.js.map +1 -1
- package/dist/convex/log.js +12 -1
- package/dist/convex/log.js.map +1 -1
- package/dist/convex/monitoring.d.ts +6 -4
- package/dist/convex/monitoring.d.ts.map +1 -1
- package/dist/convex/monitoring.js +6 -4
- package/dist/convex/monitoring.js.map +1 -1
- package/dist/convex/report-rules.d.ts +2 -0
- package/dist/convex/report-rules.d.ts.map +1 -1
- package/dist/convex/report-rules.js +2 -0
- package/dist/convex/report-rules.js.map +1 -1
- package/dist/convex/sensitive-actions.d.ts.map +1 -1
- package/dist/convex/sensitive-actions.js +1 -0
- package/dist/convex/sensitive-actions.js.map +1 -1
- package/dist/convex/test-models.d.ts +7 -0
- package/dist/convex/test-models.d.ts.map +1 -1
- package/dist/convex/test-models.js +25 -2
- package/dist/convex/test-models.js.map +1 -1
- package/dist/convex/test-moderation.d.ts +24 -0
- package/dist/convex/test-moderation.d.ts.map +1 -0
- package/dist/convex/test-moderation.js +114 -0
- package/dist/convex/test-moderation.js.map +1 -0
- package/dist/devtools-client/_nuxt/CiCAOwUc.js +5 -0
- package/dist/devtools-client/index.html +1 -1
- package/dist/env-registry.js +37 -5
- package/dist/module.d.ts +51 -1
- package/dist/module.js +2 -2
- package/dist/module.json +1 -1
- package/dist/runtime/config.d.ts +95 -14
- package/dist/runtime/config.js +13 -1
- package/dist/runtime/locales/de.json +95 -19
- package/dist/runtime/locales/en.json +93 -17
- package/dist/runtime/locales/es.json +93 -17
- package/dist/runtime/locales/fr.json +93 -17
- package/dist/runtime/locales/ru.json +93 -17
- package/dist/runtime/monitoring/sdk/sentry.client.config.js +2 -1
- package/dist/runtime/monitoring/sdk/sentry.server.config.js +6 -1
- package/dist/runtime/server/content-wasm.d.ts +13 -0
- package/dist/runtime/server/content-wasm.js +9 -0
- package/dist/runtime/server/csp.d.ts +17 -0
- package/dist/runtime/server/csp.js +18 -0
- package/dist/runtime/server/monitoring/csp.d.ts +12 -0
- package/dist/runtime/server/monitoring/csp.js +19 -0
- package/dist/runtime/server/protection/csp.d.ts +1 -7
- package/dist/runtime/server/protection/csp.js +4 -17
- package/dist/runtime/test-utils/aliases.d.ts +6 -4
- package/dist/runtime/test-utils/aliases.js +3 -9
- package/dist/runtime/test-utils/base-modules.d.ts +9 -13
- package/dist/runtime/test-utils/install.js +4 -2
- package/dist/runtime/vue/a11y.js +1 -1
- package/dist/runtime/vue/auth-client.d.ts +8 -5
- package/dist/runtime/vue/components/account/AccountData.vue +2 -0
- package/dist/runtime/vue/components/account/AccountDeletion.css +1 -1
- package/dist/runtime/vue/components/account/ActivationChecklist.css +1 -1
- package/dist/runtime/vue/components/account/ActivationChecklist.vue +1 -0
- package/dist/runtime/vue/components/account/ConsentPrompt.css +1 -1
- package/dist/runtime/vue/components/account/ConsentPromptDialog.vue +1 -0
- package/dist/runtime/vue/components/account/ConsentPromptStorage.vue +1 -0
- package/dist/runtime/vue/components/account/EmailUnsubscribe.css +1 -1
- package/dist/runtime/vue/components/account/EmailUnsubscribe.vue +2 -2
- package/dist/runtime/vue/components/account/HowDidYouHear.css +1 -1
- package/dist/runtime/vue/components/account/HowDidYouHear.vue +1 -0
- package/dist/runtime/vue/components/account/KeepAccount.css +1 -1
- package/dist/runtime/vue/components/account/OnboardingFlow.css +1 -1
- package/dist/runtime/vue/components/account/OnboardingFlow.vue +1 -0
- package/dist/runtime/vue/components/account/ProfileIdentity.css +1 -1
- package/dist/runtime/vue/components/account/ProfilePreferencesSection.css +1 -1
- package/dist/runtime/vue/components/account/ProfilePreferencesSection.vue +3 -1
- package/dist/runtime/vue/components/account/ProfileSettings.css +1 -1
- package/dist/runtime/vue/components/account/ProfileSettings.vue +1 -0
- package/dist/runtime/vue/components/account/SecurityAlerts.css +1 -1
- package/dist/runtime/vue/components/account/SecurityAlerts.vue +2 -1
- package/dist/runtime/vue/components/account/SecurityPasskeys.css +1 -1
- package/dist/runtime/vue/components/account/SecuritySettings.css +1 -1
- package/dist/runtime/vue/components/account/SecuritySettings.vue +1 -0
- package/dist/runtime/vue/components/account/security-alerts.d.ts +7 -0
- package/dist/runtime/vue/components/account/security-alerts.js +6 -2
- package/dist/runtime/vue/components/admin/AdminAccess.css +1 -1
- package/dist/runtime/vue/components/admin/AdminAccess.vue +2 -0
- package/dist/runtime/vue/components/admin/AdminAccessMemberTickets.d.vue.ts +7 -0
- package/dist/runtime/vue/components/admin/AdminAccessMemberTickets.vue +42 -0
- package/dist/runtime/vue/components/admin/AdminAccessMemberTickets.vue.d.ts +7 -0
- package/dist/runtime/vue/components/admin/AdminAnnouncements.css +1 -1
- package/dist/runtime/vue/components/admin/AdminBilling.css +1 -1
- package/dist/runtime/vue/components/admin/AdminChart.css +1 -1
- package/dist/runtime/vue/components/admin/AdminConsole.css +1 -1
- package/dist/runtime/vue/components/admin/AdminExperiments.css +1 -1
- package/dist/runtime/vue/components/admin/AdminFlags.css +1 -1
- package/dist/runtime/vue/components/admin/AdminModeration.d.vue.ts +3 -0
- package/dist/runtime/vue/components/admin/AdminModeration.vue +135 -0
- package/dist/runtime/vue/components/admin/AdminModeration.vue.d.ts +3 -0
- package/dist/runtime/vue/components/admin/AdminQueue.css +1 -1
- package/dist/runtime/vue/components/admin/AdminReferrals.css +1 -1
- package/dist/runtime/vue/components/admin/AdminReports.css +1 -1
- package/dist/runtime/vue/components/admin/AdminRevenue.css +1 -1
- package/dist/runtime/vue/components/admin/AdminUsers.d.vue.ts +27 -0
- package/dist/runtime/vue/components/admin/AdminUsers.vue +1 -0
- package/dist/runtime/vue/components/admin/AdminUsers.vue.d.ts +27 -0
- package/dist/runtime/vue/components/admin/AdminWorkspaces.d.vue.ts +27 -0
- package/dist/runtime/vue/components/admin/AdminWorkspaces.vue +1 -0
- package/dist/runtime/vue/components/admin/AdminWorkspaces.vue.d.ts +27 -0
- package/dist/runtime/vue/components/admin/admin-moderation-tab.d.ts +1 -0
- package/dist/runtime/vue/components/admin/admin-moderation-tab.js +34 -0
- package/dist/runtime/vue/components/admin/admin-tabs.js +2 -0
- package/dist/runtime/vue/components/admin/admin.css +1 -1
- package/dist/runtime/vue/components/auth/AuthForm.css +1 -1
- package/dist/runtime/vue/components/auth/AuthForm.vue +3 -2
- package/dist/runtime/vue/components/auth/AuthFormChoose.css +1 -1
- package/dist/runtime/vue/components/auth/AuthFormPasskeyOffer.css +1 -1
- package/dist/runtime/vue/components/auth/InviteRedeem.css +1 -1
- package/dist/runtime/vue/components/auth/ReauthenticateCode.css +1 -1
- package/dist/runtime/vue/components/auth/ReauthenticateDialog.css +1 -1
- package/dist/runtime/vue/components/auth/ReauthenticateDialog.vue +3 -2
- package/dist/runtime/vue/components/auth/WaitlistForm.css +1 -1
- package/dist/runtime/vue/components/auth/WaitlistForm.vue +1 -0
- package/dist/runtime/vue/components/auth/WaitlistPlace.css +1 -1
- package/dist/runtime/vue/components/auth/WaitlistShare.css +1 -1
- package/dist/runtime/vue/components/billing/BillingCheckoutLink.vue +2 -0
- package/dist/runtime/vue/components/billing/BillingHistory.css +1 -1
- package/dist/runtime/vue/components/billing/BillingHistory.vue +1 -0
- package/dist/runtime/vue/components/billing/BillingPortalLink.vue +1 -0
- package/dist/runtime/vue/components/billing/CancelFlow.css +1 -1
- package/dist/runtime/vue/components/billing/CancelFlow.vue +1 -0
- package/dist/runtime/vue/components/billing/CancelFlowEnd.vue +3 -1
- package/dist/runtime/vue/components/billing/GiftList.css +1 -1
- package/dist/runtime/vue/components/billing/PricingPackCard.css +1 -1
- package/dist/runtime/vue/components/billing/PricingPlanCard.css +1 -1
- package/dist/runtime/vue/components/billing/PricingPlanCard.vue +8 -1
- package/dist/runtime/vue/components/billing/PricingTable.css +1 -1
- package/dist/runtime/vue/components/billing/PricingTable.d.vue.ts +2 -0
- package/dist/runtime/vue/components/billing/PricingTable.vue +22 -3
- package/dist/runtime/vue/components/billing/PricingTable.vue.d.ts +2 -0
- package/dist/runtime/vue/components/billing/ReferralCard.css +1 -1
- package/dist/runtime/vue/components/billing/ReferralCard.vue +1 -0
- package/dist/runtime/vue/components/billing/ReferralLanding.css +1 -1
- package/dist/runtime/vue/components/billing/UpgradePrompt.css +1 -1
- package/dist/runtime/vue/components/billing/UpgradePrompt.vue +1 -0
- package/dist/runtime/vue/components/billing/UsageHistory.css +1 -1
- package/dist/runtime/vue/components/billing/UsageHistory.vue +1 -0
- package/dist/runtime/vue/components/billing/WithdrawalButton.css +1 -1
- package/dist/runtime/vue/components/billing/WithdrawalButton.vue +1 -0
- package/dist/runtime/vue/components/billing/pricing-table.d.ts +6 -0
- package/dist/runtime/vue/components/billing/withdrawal-button.d.ts +1 -1
- package/dist/runtime/vue/components/shared.css +1 -1
- package/dist/runtime/vue/components/shell/AccessDenied.css +1 -1
- package/dist/runtime/vue/components/shell/AccessDenied.vue +1 -0
- package/dist/runtime/vue/components/shell/AccountMenu.vue +1 -0
- package/dist/runtime/vue/components/shell/AiLabel.css +1 -1
- package/dist/runtime/vue/components/shell/AiLabel.vue +4 -1
- package/dist/runtime/vue/components/shell/AppShell.css +1 -1
- package/dist/runtime/vue/components/shell/AppShell.vue +3 -0
- package/dist/runtime/vue/components/shell/BackendNotices.vue +1 -0
- package/dist/runtime/vue/components/shell/ConfirmDialog.css +1 -1
- package/dist/runtime/vue/components/shell/ConnectionStatus.css +1 -1
- package/dist/runtime/vue/components/shell/ConnectionStatus.vue +1 -0
- package/dist/runtime/vue/components/shell/ContactForm.css +1 -1
- package/dist/runtime/vue/components/shell/ContactForm.vue +1 -0
- package/dist/runtime/vue/components/shell/FrameMain.vue +2 -0
- package/dist/runtime/vue/components/shell/Gate.css +1 -1
- package/dist/runtime/vue/components/shell/Gate.vue +2 -0
- package/dist/runtime/vue/components/shell/GateQuota.vue +1 -0
- package/dist/runtime/vue/components/shell/LegalCompany.d.vue.ts +3 -0
- package/dist/runtime/vue/components/shell/LegalCompany.vue +23 -0
- package/dist/runtime/vue/components/shell/LegalCompany.vue.d.ts +3 -0
- package/dist/runtime/vue/components/shell/LegalContactPoints.d.vue.ts +10 -0
- package/dist/runtime/vue/components/shell/LegalContactPoints.vue +51 -0
- package/dist/runtime/vue/components/shell/LegalContactPoints.vue.d.ts +10 -0
- package/dist/runtime/vue/components/shell/LegalDetail.d.vue.ts +11 -0
- package/dist/runtime/vue/components/shell/LegalDetail.vue +30 -0
- package/dist/runtime/vue/components/shell/LegalDetail.vue.d.ts +11 -0
- package/dist/runtime/vue/components/shell/LegalDocument.css +1 -1
- package/dist/runtime/vue/components/shell/LegalDocument.vue +49 -13
- package/dist/runtime/vue/components/shell/LegalModeration.d.vue.ts +8 -0
- package/dist/runtime/vue/components/shell/LegalModeration.vue +72 -0
- package/dist/runtime/vue/components/shell/LegalModeration.vue.d.ts +8 -0
- package/dist/runtime/vue/components/shell/LegalProcessors.d.vue.ts +3 -2
- package/dist/runtime/vue/components/shell/LegalProcessors.vue +46 -15
- package/dist/runtime/vue/components/shell/LegalProcessors.vue.d.ts +3 -2
- package/dist/runtime/vue/components/shell/LegalStorage.d.vue.ts +3 -2
- package/dist/runtime/vue/components/shell/LegalStorage.vue +49 -16
- package/dist/runtime/vue/components/shell/LegalStorage.vue.d.ts +3 -2
- package/dist/runtime/vue/components/shell/LegalVersion.d.vue.ts +10 -0
- package/dist/runtime/vue/components/shell/LegalVersion.vue +24 -0
- package/dist/runtime/vue/components/shell/LegalVersion.vue.d.ts +10 -0
- package/dist/runtime/vue/components/shell/NoticeAnnouncement.css +1 -1
- package/dist/runtime/vue/components/shell/NoticeDeletion.css +1 -1
- package/dist/runtime/vue/components/shell/NoticeGift.css +1 -1
- package/dist/runtime/vue/components/shell/NoticeGift.vue +7 -4
- package/dist/runtime/vue/components/shell/NoticeImpersonation.css +1 -1
- package/dist/runtime/vue/components/shell/NoticeLowCredits.css +1 -1
- package/dist/runtime/vue/components/shell/NoticeMaintenance.css +1 -1
- package/dist/runtime/vue/components/shell/NoticePastDue.css +1 -1
- package/dist/runtime/vue/components/shell/NotificationInbox.css +1 -1
- package/dist/runtime/vue/components/shell/NotificationInbox.vue +1 -0
- package/dist/runtime/vue/components/shell/ReportNotice.css +1 -1
- package/dist/runtime/vue/components/shell/UploadField.css +1 -1
- package/dist/runtime/vue/components/shell/UploadField.d.vue.ts +2 -0
- package/dist/runtime/vue/components/shell/UploadField.vue +16 -3
- package/dist/runtime/vue/components/shell/UploadField.vue.d.ts +2 -0
- package/dist/runtime/vue/components/shell/WorkspaceSwitcher.css +1 -1
- package/dist/runtime/vue/components/shell/WorkspaceSwitcher.vue +1 -0
- package/dist/runtime/vue/components/shell/legal.d.ts +35 -4
- package/dist/runtime/vue/components/shell/legal.js +126 -13
- package/dist/runtime/vue/components/shell/upload-field.d.ts +3 -1
- package/dist/runtime/vue/components/tokens.css +1 -1
- package/dist/runtime/vue/components/workspaces/AcceptInvitation.vue +1 -0
- package/dist/runtime/vue/components/workspaces/AuditLog.css +1 -1
- package/dist/runtime/vue/components/workspaces/AuditLog.vue +1 -0
- package/dist/runtime/vue/components/workspaces/WorkspaceBilling.css +1 -1
- package/dist/runtime/vue/components/workspaces/WorkspaceCredits.css +1 -1
- package/dist/runtime/vue/components/workspaces/WorkspaceList.css +1 -1
- package/dist/runtime/vue/components/workspaces/WorkspaceSettings.d.vue.ts +2 -2
- package/dist/runtime/vue/components/workspaces/WorkspaceSettings.vue +1 -0
- package/dist/runtime/vue/components/workspaces/WorkspaceSettings.vue.d.ts +2 -2
- package/dist/runtime/vue/composables/use-access.d.ts +51 -6
- package/dist/runtime/vue/composables/use-access.js +36 -0
- package/dist/runtime/vue/composables/use-billing.d.ts +6 -5
- package/dist/runtime/vue/composables/use-email-link.d.ts +55 -4
- package/dist/runtime/vue/composables/use-email-link.js +9 -9
- package/dist/runtime/vue/composables/use-gift-list.js +3 -1
- package/dist/runtime/vue/composables/use-labels.js +13 -8
- package/dist/runtime/vue/composables/use-login-flow.js +1 -1
- package/dist/runtime/vue/composables/use-notifications.js +3 -0
- package/dist/runtime/vue/composables/use-passkeys.js +2 -2
- package/dist/runtime/vue/composables/use-pricing.d.ts +15 -0
- package/dist/runtime/vue/composables/use-pricing.js +4 -0
- package/dist/runtime/vue/composables/use-referral-invite.d.ts +33 -4
- package/dist/runtime/vue/composables/use-referral-invite.js +20 -9
- package/dist/runtime/vue/composables/use-report-form.d.ts +178 -0
- package/dist/runtime/vue/composables/use-report-form.js +278 -0
- package/dist/runtime/vue/composables/use-sign-in-alerts.d.ts +85 -0
- package/dist/runtime/vue/composables/use-sign-in-alerts.js +70 -0
- package/dist/runtime/vue/composables/use-upload-field.d.ts +32 -6
- package/dist/runtime/vue/composables/use-upload-field.js +75 -36
- package/dist/runtime/vue/composables/use-waitlist.d.ts +8 -1
- package/dist/runtime/vue/composables/use-waitlist.js +14 -1
- package/dist/runtime/vue/pages/gifts.vue +9 -0
- package/dist/runtime/vue/passkey-ceremony.d.ts +42 -0
- package/dist/runtime/vue/passkey-ceremony.js +37 -0
- package/dist/runtime/vue/passkey-client.d.ts +11 -49
- package/dist/runtime/vue/passkey-client.js +2 -34
- package/dist/runtime/vue/plugins/checkout-return.d.ts +5 -4
- package/dist/runtime/vue/plugins/checkout-return.js +1 -1
- package/dist/runtime/vue/plugins/passkey-ceremony.d.ts +3 -1
- package/dist/runtime/vue/plugins/passkey-ceremony.js +1 -1
- package/dist/runtime/vue/protection/state.d.ts +6 -0
- package/dist/runtime/vue/utils/auth-session.js +1 -1
- package/dist/runtime/vue/utils/billing-access.d.ts +1 -1
- package/dist/runtime/vue/utils/checkout-return.d.ts +5 -4
- package/dist/runtime/vue/utils/checkout-return.js +3 -3
- package/dist/runtime/vue/utils/login-bindings.js +1 -1
- package/dist/runtime/vue/utils/page-guard.js +6 -5
- package/dist/runtime/vue/utils/passkey-prompt.d.ts +12 -0
- package/dist/runtime/vue/utils/passkey-prompt.js +8 -0
- package/dist/runtime/vue/utils/renamed-component.js +1 -1
- package/dist/shared/{nuxt-backend.KEzfHO2K.mjs → nuxt-backend.Bq_mhlky.mjs} +578 -60
- package/dist/shared/{nuxt-backend.DXEf0rrv.mjs → nuxt-backend.D9qXcOOI.mjs} +1 -1
- package/dist/shared/{nuxt-backend.ikObmtHs.mjs → nuxt-backend.DmZI-QSO.mjs} +2 -2
- package/dist/shared/{nuxt-backend.Dm1NkY7v.mjs → nuxt-backend.G4JryO1q.mjs} +144 -32
- package/dist/shared/{nuxt-backend.2m535CLS.mjs → nuxt-backend.Lk2MQI2u.mjs} +1 -1
- package/dist/types.d.ts +1 -1
- package/package.json +13 -13
- package/skills/nuxt-backend/SKILL.md +3 -3
- package/skills/nuxt-backend/references/api.md +95 -25
- package/skills/nuxt-backend/references/renames.json +114 -2054
- package/skills/nuxt-backend/references/surface.json +112 -3
- package/skills/nuxt-backend-ai/SKILL.md +13 -6
- package/skills/nuxt-backend-ai/references/api.md +21 -3
- package/skills/nuxt-backend-auth/references/api.md +20 -3
- package/skills/nuxt-backend-billing/references/api.md +20 -5
- package/skills/nuxt-backend-data/SKILL.md +3 -3
- package/skills/nuxt-backend-data/references/api.md +4 -3
- package/skills/nuxt-backend-email/references/api.md +2 -1
- package/skills/nuxt-backend-growth/references/api.md +1 -0
- package/skills/nuxt-backend-ship/SKILL.md +14 -22
- package/skills/nuxt-backend-ship/references/api.md +25 -2
- package/skills/nuxt-backend-ship/references/operate.md +28 -0
- package/skills/nuxt-backend-ui/SKILL.md +6 -2
- package/skills/nuxt-backend-upgrade/SKILL.md +16 -11
- package/skills/nuxt-backend-upgrade/references/api.md +2 -2
- package/skills/nuxt-backend-upgrade/references/upgrade.md +37 -438
- package/src/convex/access-tickets.ts +30 -1
- package/src/convex/account-data.ts +26 -3
- package/src/convex/app.ts +16 -2
- package/src/convex/billing-launch.ts +42 -0
- package/src/convex/catalog.ts +16 -2
- package/src/convex/client/code-binding.ts +1 -1
- package/src/convex/client/guards.ts +3 -3
- package/src/convex/client/index.ts +4 -3
- package/src/convex/client/plugins.ts +43 -19
- package/src/convex/components/backend/_generated/api.ts +2 -0
- package/src/convex/components/backend/_generated/component.ts +1255 -242
- package/src/convex/components/backend/access.ts +109 -16
- package/src/convex/components/backend/account.ts +48 -2
- package/src/convex/components/backend/adapter.ts +4 -0
- package/src/convex/components/backend/billing.ts +75 -12
- package/src/convex/components/backend/crons.ts +4 -0
- package/src/convex/components/backend/gifts.ts +2 -2
- package/src/convex/components/backend/jobs.ts +58 -13
- package/src/convex/components/backend/maintenance.ts +14 -1
- package/src/convex/components/backend/moderation.ts +57 -0
- package/src/convex/components/backend/schema.ts +110 -4
- package/src/convex/components/backend/storage.ts +56 -0
- package/src/convex/components/backend/subscriptions.ts +1 -1
- package/src/convex/constants.ts +20 -4
- package/src/convex/email-templates.ts +124 -21
- package/src/convex/emails/notification.ts +22 -0
- package/src/convex/errors.ts +64 -8
- package/src/convex/events.ts +4 -4
- package/src/convex/files.ts +48 -6
- package/src/convex/integrations/account.ts +4 -0
- package/src/convex/integrations/ai/chat.ts +9 -9
- package/src/convex/integrations/ai/config.ts +147 -37
- package/src/convex/integrations/ai/context.ts +7 -4
- package/src/convex/integrations/ai/costs.ts +45 -2
- package/src/convex/integrations/ai/embeddings.ts +24 -39
- package/src/convex/integrations/ai/images.ts +141 -0
- package/src/convex/integrations/ai/job-errors.ts +19 -2
- package/src/convex/integrations/ai/jobs.ts +466 -72
- package/src/convex/integrations/ai/knowledge.ts +9 -10
- package/src/convex/integrations/ai/metering.ts +83 -28
- package/src/convex/integrations/ai/model-id.ts +24 -2
- package/src/convex/integrations/ai/models.ts +273 -58
- package/src/convex/integrations/ai/moderation-providers.ts +373 -0
- package/src/convex/integrations/ai/moderation-taxonomy.ts +174 -0
- package/src/convex/integrations/ai/moderation.ts +530 -47
- package/src/convex/integrations/ai/provenance.ts +10 -1
- package/src/convex/integrations/ai/setup.ts +5 -5
- package/src/convex/integrations/ai/stream.ts +4 -3
- package/src/convex/integrations/ai.ts +19 -6
- package/src/convex/integrations/billing/checkout.ts +4 -4
- package/src/convex/integrations/billing/context.ts +34 -2
- package/src/convex/integrations/billing/credits.ts +23 -6
- package/src/convex/integrations/billing/free-plan.ts +120 -24
- package/src/convex/integrations/billing/functions.ts +20 -8
- package/src/convex/integrations/billing/gifts.ts +34 -6
- package/src/convex/integrations/billing/lifecycle.ts +14 -6
- package/src/convex/integrations/billing/passes.ts +2 -2
- package/src/convex/integrations/billing/pricing.ts +43 -5
- package/src/convex/integrations/billing/rate-limit.ts +46 -0
- package/src/convex/integrations/billing/referral-orders.ts +1 -1
- package/src/convex/integrations/billing/resync.ts +187 -0
- package/src/convex/integrations/billing/rewards.ts +1 -1
- package/src/convex/integrations/billing/subscriptions.ts +4 -2
- package/src/convex/integrations/billing/types/lifecycle.ts +1 -1
- package/src/convex/integrations/billing/types/records.ts +67 -3
- package/src/convex/integrations/billing/types/setup.ts +6 -5
- package/src/convex/integrations/billing/types/surface.ts +38 -5
- package/src/convex/integrations/billing/webhooks.ts +2 -2
- package/src/convex/integrations/billing/welcome.ts +103 -0
- package/src/convex/integrations/billing.ts +20 -5
- package/src/convex/integrations/email.ts +17 -2
- package/src/convex/integrations/functions.ts +2 -2
- package/src/convex/integrations/launch.ts +247 -28
- package/src/convex/integrations/notifications.ts +16 -17
- package/src/convex/integrations/rate-limit.ts +18 -3
- package/src/convex/integrations/reports.ts +18 -5
- package/src/convex/integrations/retention.ts +73 -5
- package/src/convex/integrations/storage.ts +91 -6
- package/src/convex/label-format.ts +2 -2
- package/src/convex/label-groups/admin.ts +28 -0
- package/src/convex/label-groups/cancelFlow.ts +2 -2
- package/src/convex/label-groups/email.ts +2 -1
- package/src/convex/label-groups/errors.ts +6 -1
- package/src/convex/label-groups/gift.ts +5 -2
- package/src/convex/label-groups/legal.ts +31 -0
- package/src/convex/label-groups/notifications.ts +5 -3
- package/src/convex/label-groups/pastDue.ts +1 -1
- package/src/convex/label-groups/pricing.ts +4 -0
- package/src/convex/label-groups/referral.ts +2 -2
- package/src/convex/label-groups/report.ts +10 -1
- package/src/convex/label-groups/upload.ts +2 -0
- package/src/convex/label-groups/withdrawal.ts +1 -1
- package/src/convex/label-translations.ts +94 -34
- package/src/convex/labels.ts +25 -0
- package/src/convex/legal.ts +12 -2
- package/src/convex/log.ts +12 -1
- package/src/convex/monitoring.ts +6 -4
- package/src/convex/report-rules.ts +3 -0
- package/src/convex/sensitive-actions.ts +1 -0
- package/src/convex/test-models.ts +26 -2
- package/src/convex/test-moderation.ts +122 -0
- package/src/convex/test.ts +405 -8
- package/src/runtime/vue/components/account/AccountData.vue +2 -0
- package/src/runtime/vue/components/account/AccountDeletion.css +2 -1
- package/src/runtime/vue/components/account/ActivationChecklist.css +5 -2
- package/src/runtime/vue/components/account/ActivationChecklist.vue +1 -0
- package/src/runtime/vue/components/account/ConsentPrompt.css +8 -5
- package/src/runtime/vue/components/account/ConsentPromptDialog.vue +1 -0
- package/src/runtime/vue/components/account/ConsentPromptStorage.vue +1 -0
- package/src/runtime/vue/components/account/EmailUnsubscribe.css +6 -2
- package/src/runtime/vue/components/account/EmailUnsubscribe.vue +2 -2
- package/src/runtime/vue/components/account/HowDidYouHear.css +8 -3
- package/src/runtime/vue/components/account/HowDidYouHear.vue +1 -0
- package/src/runtime/vue/components/account/KeepAccount.css +3 -1
- package/src/runtime/vue/components/account/OnboardingFlow.css +6 -3
- package/src/runtime/vue/components/account/OnboardingFlow.vue +1 -0
- package/src/runtime/vue/components/account/ProfileIdentity.css +1 -1
- package/src/runtime/vue/components/account/ProfilePreferencesSection.css +3 -1
- package/src/runtime/vue/components/account/ProfilePreferencesSection.vue +4 -2
- package/src/runtime/vue/components/account/ProfileSettings.css +3 -1
- package/src/runtime/vue/components/account/ProfileSettings.vue +1 -0
- package/src/runtime/vue/components/account/SecurityAlerts.css +2 -1
- package/src/runtime/vue/components/account/SecurityAlerts.vue +2 -2
- package/src/runtime/vue/components/account/SecurityPasskeys.css +5 -3
- package/src/runtime/vue/components/account/SecuritySettings.css +2 -1
- package/src/runtime/vue/components/account/SecuritySettings.vue +1 -0
- package/src/runtime/vue/components/admin/AdminAccess.css +1 -1
- package/src/runtime/vue/components/admin/AdminAccess.vue +3 -1
- package/src/runtime/vue/components/admin/AdminAccessMemberTickets.vue +51 -0
- package/src/runtime/vue/components/admin/AdminAnnouncements.css +4 -2
- package/src/runtime/vue/components/admin/AdminBilling.css +1 -1
- package/src/runtime/vue/components/admin/AdminChart.css +2 -1
- package/src/runtime/vue/components/admin/AdminConsole.css +1 -0
- package/src/runtime/vue/components/admin/AdminExperiments.css +2 -1
- package/src/runtime/vue/components/admin/AdminFlags.css +4 -2
- package/src/runtime/vue/components/admin/AdminModeration.vue +148 -0
- package/src/runtime/vue/components/admin/AdminQueue.css +4 -2
- package/src/runtime/vue/components/admin/AdminReferrals.css +3 -1
- package/src/runtime/vue/components/admin/AdminReports.css +2 -1
- package/src/runtime/vue/components/admin/AdminRevenue.css +2 -1
- package/src/runtime/vue/components/admin/AdminUsers.vue +1 -0
- package/src/runtime/vue/components/admin/AdminWorkspaces.vue +1 -0
- package/src/runtime/vue/components/admin/admin.css +2 -1
- package/src/runtime/vue/components/auth/AuthForm.css +6 -3
- package/src/runtime/vue/components/auth/AuthForm.vue +4 -3
- package/src/runtime/vue/components/auth/AuthFormChoose.css +1 -0
- package/src/runtime/vue/components/auth/AuthFormPasskeyOffer.css +2 -1
- package/src/runtime/vue/components/auth/InviteRedeem.css +2 -0
- package/src/runtime/vue/components/auth/ReauthenticateCode.css +1 -1
- package/src/runtime/vue/components/auth/ReauthenticateDialog.css +6 -2
- package/src/runtime/vue/components/auth/ReauthenticateDialog.vue +3 -2
- package/src/runtime/vue/components/auth/WaitlistForm.css +3 -1
- package/src/runtime/vue/components/auth/WaitlistForm.vue +1 -0
- package/src/runtime/vue/components/auth/WaitlistPlace.css +3 -1
- package/src/runtime/vue/components/auth/WaitlistShare.css +6 -3
- package/src/runtime/vue/components/billing/BillingCheckoutLink.vue +2 -0
- package/src/runtime/vue/components/billing/BillingHistory.css +2 -1
- package/src/runtime/vue/components/billing/BillingHistory.vue +1 -0
- package/src/runtime/vue/components/billing/BillingPortalLink.vue +1 -0
- package/src/runtime/vue/components/billing/CancelFlow.css +8 -4
- package/src/runtime/vue/components/billing/CancelFlow.vue +2 -1
- package/src/runtime/vue/components/billing/CancelFlowEnd.vue +3 -1
- package/src/runtime/vue/components/billing/GiftList.css +5 -2
- package/src/runtime/vue/components/billing/PricingPackCard.css +2 -1
- package/src/runtime/vue/components/billing/PricingPlanCard.css +5 -3
- package/src/runtime/vue/components/billing/PricingPlanCard.vue +8 -1
- package/src/runtime/vue/components/billing/PricingTable.css +1 -1
- package/src/runtime/vue/components/billing/PricingTable.vue +23 -3
- package/src/runtime/vue/components/billing/ReferralCard.css +6 -3
- package/src/runtime/vue/components/billing/ReferralCard.vue +1 -0
- package/src/runtime/vue/components/billing/ReferralLanding.css +5 -2
- package/src/runtime/vue/components/billing/UpgradePrompt.css +6 -3
- package/src/runtime/vue/components/billing/UpgradePrompt.vue +1 -0
- package/src/runtime/vue/components/billing/UsageHistory.css +2 -1
- package/src/runtime/vue/components/billing/UsageHistory.vue +1 -0
- package/src/runtime/vue/components/billing/WithdrawalButton.css +6 -2
- package/src/runtime/vue/components/billing/WithdrawalButton.vue +2 -1
- package/src/runtime/vue/components/shared.css +24 -3
- package/src/runtime/vue/components/shell/AccessDenied.css +4 -1
- package/src/runtime/vue/components/shell/AccessDenied.vue +1 -0
- package/src/runtime/vue/components/shell/AccountMenu.vue +1 -0
- package/src/runtime/vue/components/shell/AiLabel.css +3 -2
- package/src/runtime/vue/components/shell/AiLabel.vue +4 -1
- package/src/runtime/vue/components/shell/AppShell.css +5 -3
- package/src/runtime/vue/components/shell/AppShell.vue +3 -0
- package/src/runtime/vue/components/shell/BackendNotices.vue +3 -2
- package/src/runtime/vue/components/shell/ConfirmDialog.css +5 -2
- package/src/runtime/vue/components/shell/ConnectionStatus.css +1 -1
- package/src/runtime/vue/components/shell/ConnectionStatus.vue +1 -0
- package/src/runtime/vue/components/shell/ContactForm.css +8 -1
- package/src/runtime/vue/components/shell/ContactForm.vue +1 -0
- package/src/runtime/vue/components/shell/FrameMain.vue +2 -0
- package/src/runtime/vue/components/shell/Gate.css +5 -2
- package/src/runtime/vue/components/shell/Gate.vue +2 -0
- package/src/runtime/vue/components/shell/GateQuota.vue +1 -0
- package/src/runtime/vue/components/shell/LegalCompany.vue +38 -0
- package/src/runtime/vue/components/shell/LegalContactPoints.vue +74 -0
- package/src/runtime/vue/components/shell/LegalDetail.vue +54 -0
- package/src/runtime/vue/components/shell/LegalDocument.css +21 -4
- package/src/runtime/vue/components/shell/LegalDocument.vue +54 -15
- package/src/runtime/vue/components/shell/LegalModeration.vue +94 -0
- package/src/runtime/vue/components/shell/LegalProcessors.vue +64 -22
- package/src/runtime/vue/components/shell/LegalStorage.vue +64 -23
- package/src/runtime/vue/components/shell/LegalVersion.vue +44 -0
- package/src/runtime/vue/components/shell/NoticeAnnouncement.css +2 -1
- package/src/runtime/vue/components/shell/NoticeDeletion.css +5 -2
- package/src/runtime/vue/components/shell/NoticeGift.css +2 -1
- package/src/runtime/vue/components/shell/NoticeGift.vue +8 -5
- package/src/runtime/vue/components/shell/NoticeImpersonation.css +2 -1
- package/src/runtime/vue/components/shell/NoticeLowCredits.css +6 -2
- package/src/runtime/vue/components/shell/NoticeMaintenance.css +2 -1
- package/src/runtime/vue/components/shell/NoticePastDue.css +6 -2
- package/src/runtime/vue/components/shell/NoticePastDue.vue +1 -1
- package/src/runtime/vue/components/shell/NotificationInbox.css +6 -4
- package/src/runtime/vue/components/shell/NotificationInbox.vue +1 -0
- package/src/runtime/vue/components/shell/ReportNotice.css +2 -1
- package/src/runtime/vue/components/shell/UploadField.css +4 -2
- package/src/runtime/vue/components/shell/UploadField.vue +21 -5
- package/src/runtime/vue/components/shell/WorkspaceSwitcher.css +4 -1
- package/src/runtime/vue/components/shell/WorkspaceSwitcher.vue +1 -0
- package/src/runtime/vue/components/tokens.css +21 -1
- package/src/runtime/vue/components/workspaces/AcceptInvitation.vue +1 -0
- package/src/runtime/vue/components/workspaces/AuditLog.css +2 -1
- package/src/runtime/vue/components/workspaces/AuditLog.vue +1 -0
- package/src/runtime/vue/components/workspaces/WorkspaceBilling.css +2 -1
- package/src/runtime/vue/components/workspaces/WorkspaceCredits.css +1 -0
- package/src/runtime/vue/components/workspaces/WorkspaceList.css +2 -1
- package/src/runtime/vue/components/workspaces/WorkspaceSettings.vue +1 -0
- package/src/runtime/vue/pages/gifts.vue +13 -2
- package/src/runtime/vue/pages/referral.vue +1 -2
- package/dist/devtools-client/_nuxt/CfQg3BRt.js +0 -5
|
@@ -2,20 +2,136 @@ import { backendError, getBackendError } from '../../errors.js';
|
|
|
2
2
|
import { sniffContentType } from '../../files.js';
|
|
3
3
|
import { logBackend } from '../../log.js';
|
|
4
4
|
import { upstreamErrorOf } from './job-errors.js';
|
|
5
|
-
import {
|
|
5
|
+
import { DEFAULT_MODERATION_MODEL } from './model-id.js';
|
|
6
|
+
import { convexGatewayModel, FALLBACK_NAME, loadSdk, meteredModel, modelIdOf, modelRefusal, noticeConvexGateway, requireModelId, routeModel } from './models.js';
|
|
7
|
+
import { classifierReading, combineReadings, flaggedCategories, inGrayBand, llamaGuardCategory, llamaGuardCode, MODERATION_CATEGORIES, requireThresholds, thresholdsFor } from './moderation-taxonomy.js';
|
|
6
8
|
// Content safety's check (`ai.moderate`, `ai.requireSafe`, `moderate` on a
|
|
7
9
|
// metered action, a stream, a chat or a job): a call to a safety classifier
|
|
8
10
|
// through the same gateway as every model call. Neither gateway has a
|
|
9
11
|
// moderation endpoint of its own, so the check is a chat call to a model
|
|
10
|
-
// trained to classify
|
|
12
|
+
// trained to classify. By default, the one the answering gateway serves:
|
|
13
|
+
// Llama Guard 4 through the Convex AI Gateway, which reads text and images
|
|
11
14
|
// and answers `safe`, or `unsafe` and the hazard codes (`S1` to `S14`) on the
|
|
12
|
-
// next line
|
|
13
|
-
//
|
|
15
|
+
// next line; gpt-oss-safeguard through the Vercel AI Gateway, which serves no
|
|
16
|
+
// Llama Guard, reads text only, and is given the same categories and asked
|
|
17
|
+
// for the same answer. The call is the app's,
|
|
14
18
|
// on its gateway bill: nothing is reserved from the person's credits for it,
|
|
15
19
|
// and its cost is recorded like any run's, so the Costs tab and the
|
|
16
20
|
// `spendLimit` count it.
|
|
17
|
-
/** The classifier `setupAi` checks with unless `moderation.model` names another: Llama Guard 4,
|
|
18
|
-
export
|
|
21
|
+
/** The classifier `setupAi` checks with through the Convex AI Gateway, unless `moderation.model` names another: Llama Guard 4, which reads images too. */
|
|
22
|
+
export { DEFAULT_MODERATION_MODEL };
|
|
23
|
+
/**
|
|
24
|
+
* The classifier `setupAi` checks with through the Vercel AI Gateway, unless
|
|
25
|
+
* `moderation.model` names another: that gateway serves no Llama Guard. It
|
|
26
|
+
* reads text only, so a check with images is refused as unchecked.
|
|
27
|
+
*/
|
|
28
|
+
export const VERCEL_MODERATION_MODEL = 'openai/gpt-oss-safeguard-20b';
|
|
29
|
+
/** How long flags are kept unless `moderation.log` says otherwise, in days: the six months the DSA gives a person to complain about a decision (Art. 20). */
|
|
30
|
+
export const DEFAULT_FLAG_DAYS = 183;
|
|
31
|
+
/** The longest `moderation.log.days` takes: ten years. */
|
|
32
|
+
const MAX_FLAG_DAYS = 3650;
|
|
33
|
+
/** Llama Guard's hazard codes, `S1` to `S14`: a policy names these or the shared categories, and a verdict naming another code is refused. */
|
|
34
|
+
const CODE = /^S(?:[1-9]|1[0-4])$/;
|
|
35
|
+
/** What reads as child sexual exploitation: refused, its flag is kept on legal hold. */
|
|
36
|
+
const CHILD_EXPLOITATION = new Set(['S4', 'minors_sexual', 'csam_match']);
|
|
37
|
+
/** Llama Guard's code shape: `S` and a number. One beyond `S14` is no category the policy weighed. */
|
|
38
|
+
const LLAMA_CODE = /^S\d{1,2}$/;
|
|
39
|
+
/**
|
|
40
|
+
* A policy's entry as the policy compares it: a shared category, in lower
|
|
41
|
+
* case (`sexual`), or a Llama Guard code `S1` to `S14`, in upper case;
|
|
42
|
+
* `null` for anything else, such as `'s04'` or `'csam'`.
|
|
43
|
+
*/
|
|
44
|
+
function policyEntry(entry) {
|
|
45
|
+
if (typeof entry !== 'string')
|
|
46
|
+
return null;
|
|
47
|
+
const word = entry.trim();
|
|
48
|
+
if (MODERATION_CATEGORIES.includes(word.toLowerCase()))
|
|
49
|
+
return word.toLowerCase();
|
|
50
|
+
return CODE.test(word.toUpperCase()) ? word.toUpperCase() : null;
|
|
51
|
+
}
|
|
52
|
+
/** A policy's list, each entry as `policyEntry` reads it, or `null` when one is neither a category nor a code. */
|
|
53
|
+
function entriesOf(list) {
|
|
54
|
+
if (!Array.isArray(list))
|
|
55
|
+
return null;
|
|
56
|
+
const entries = list.map(policyEntry);
|
|
57
|
+
return entries.every(entry => entry !== null) ? entries : null;
|
|
58
|
+
}
|
|
59
|
+
/** Whether `block` covers an escalated entry: by name, or a code by the category it reads as. */
|
|
60
|
+
const covers = (block, entry) => block.includes(entry) || block.some(blocked => llamaGuardCategory(blocked) === entry || llamaGuardCategory(entry) === blocked);
|
|
61
|
+
/** A policy's lists, checked where it is set: `block`'s entries (`null` for 'all') and `escalate`'s, each one `block` covers. */
|
|
62
|
+
function policyLists(config) {
|
|
63
|
+
const block = config?.block ?? 'all';
|
|
64
|
+
const blockEntries = block === 'all' ? null : entriesOf(block);
|
|
65
|
+
if (block !== 'all' && !blockEntries)
|
|
66
|
+
throw new TypeError('[nuxt-backend] setupAi({ moderation }): `block` is \'all\' or a list of categories or Llama Guard\'s codes `S1` to `S14`, such as [\'sexual\', \'S4\'].');
|
|
67
|
+
const escalate = entriesOf(config?.escalate ?? []);
|
|
68
|
+
if (!escalate)
|
|
69
|
+
throw new TypeError('[nuxt-backend] setupAi({ moderation }): `escalate` is a list of categories or Llama Guard\'s codes `S1` to `S14`, such as [\'minors_sexual\', \'S4\'].');
|
|
70
|
+
const unblocked = blockEntries ? escalate.filter(entry => !covers(blockEntries, entry)) : [];
|
|
71
|
+
if (unblocked.length > 0)
|
|
72
|
+
throw new TypeError(`[nuxt-backend] setupAi({ moderation }): \`escalate\` names ${unblocked.join(', ')}, which \`block\` does not: escalated content is held back until an administrator looks at it, so add ${unblocked.join(', ')} to \`block\`.`);
|
|
73
|
+
return { blockEntries, escalate };
|
|
74
|
+
}
|
|
75
|
+
/**
|
|
76
|
+
* Refuse image providers that leave child sexual content unjudged under a
|
|
77
|
+
* policy that lets sexual content through. No image provider the package
|
|
78
|
+
* ships judges `minors_sexual` in an image, and a hash list knows only
|
|
79
|
+
* material seen before: new material is then caught as `sexual`, or by the
|
|
80
|
+
* classifier where it reads images, so `block` must cover `sexual`.
|
|
81
|
+
*/
|
|
82
|
+
function requireMinorsCovered(config, blockEntries) {
|
|
83
|
+
const images = config?.images ?? [];
|
|
84
|
+
if (images.length === 0 || blockEntries === null)
|
|
85
|
+
return;
|
|
86
|
+
if (images.some(provider => provider.imageCategories?.includes('minors_sexual')))
|
|
87
|
+
return;
|
|
88
|
+
if (covers(blockEntries, 'sexual'))
|
|
89
|
+
return;
|
|
90
|
+
throw new TypeError('[nuxt-backend] setupAi({ moderation }): no image provider judges `minors_sexual` in an image, so new child sexual abuse material is caught as `sexual`: add `sexual` (or `S12`) to `block`, or make it \'all\'.');
|
|
91
|
+
}
|
|
92
|
+
/** Refuse a moderation config `setupAi` cannot keep, where it is set: its thresholds, classifier and policy version. */
|
|
93
|
+
function requireModerationConfig(config) {
|
|
94
|
+
requireThresholds(config?.thresholds);
|
|
95
|
+
if (config?.model !== undefined && config.text !== undefined)
|
|
96
|
+
throw new TypeError('[nuxt-backend] setupAi({ moderation }): name the text classifier once, as `text` or as `model`.');
|
|
97
|
+
if (config?.policy !== undefined && (typeof config.policy?.version !== 'string' || !config.policy.version.trim()))
|
|
98
|
+
throw new TypeError('[nuxt-backend] setupAi({ moderation }): `policy.version` names your moderation policy\'s version, such as \'2026-11-08\'.');
|
|
99
|
+
}
|
|
100
|
+
/** How many days flags are kept: `moderation.log`'s, the default, or `false` for none, which takes no escalation. */
|
|
101
|
+
function flagDays(log, escalating) {
|
|
102
|
+
const days = log === false ? false : (log?.days ?? DEFAULT_FLAG_DAYS);
|
|
103
|
+
if (days !== false && !(Number.isInteger(days) && days >= 1 && days <= MAX_FLAG_DAYS))
|
|
104
|
+
throw new TypeError(`[nuxt-backend] setupAi({ moderation }): \`log.days\` is a whole number of days from 1 to ${MAX_FLAG_DAYS}, or \`log: false\` to keep no flags.`);
|
|
105
|
+
if (days === false && escalating)
|
|
106
|
+
throw new TypeError('[nuxt-backend] setupAi({ moderation }): `escalate` needs the flags `log` keeps, so an escalation leaves a record: drop `log: false`, or `escalate`.');
|
|
107
|
+
return days;
|
|
108
|
+
}
|
|
109
|
+
/** The policy `setupAi({ moderation })` sets, checked where it is set. */
|
|
110
|
+
export function moderationPolicy(config) {
|
|
111
|
+
requireModerationConfig(config);
|
|
112
|
+
const { blockEntries, escalate } = policyLists(config);
|
|
113
|
+
const days = flagDays(config?.log, escalate.length > 0);
|
|
114
|
+
requireMinorsCovered(config, blockEntries);
|
|
115
|
+
if (days === false && config?.knownAbuse)
|
|
116
|
+
throw new TypeError('[nuxt-backend] setupAi({ moderation }): `knownAbuse` needs the flags `log` keeps, so a match leaves its hash on record: drop `log: false`, or `knownAbuse`.');
|
|
117
|
+
const blocking = blockEntries ? new Set(blockEntries) : null;
|
|
118
|
+
const escalating = new Set(escalate);
|
|
119
|
+
// A Llama Guard code beyond S14 is refused, whatever the policy names: it was never weighed.
|
|
120
|
+
const refuses = (entry) => (LLAMA_CODE.test(entry) && !CODE.test(entry)) || blocking === null || blocking.has(entry);
|
|
121
|
+
return {
|
|
122
|
+
judge: ({ flagged, categories, codes = [] }) => {
|
|
123
|
+
if (!flagged)
|
|
124
|
+
return { blocked: false, escalate: false, legalHold: false };
|
|
125
|
+
// A list names shared categories (`sexual`) or Llama Guard's codes (`S4`) alike.
|
|
126
|
+
const found = [...categories, ...codes.map(llamaGuardCode)];
|
|
127
|
+
const escalated = found.some(entry => escalating.has(entry));
|
|
128
|
+
const blocked = escalated || found.length === 0 || found.some(refuses);
|
|
129
|
+
return { blocked, escalate: escalated, legalHold: escalated || (blocked && found.some(entry => CHILD_EXPLOITATION.has(entry))) };
|
|
130
|
+
},
|
|
131
|
+
days,
|
|
132
|
+
snapshot: `block ${blockEntries ? blockEntries.join(',') : 'all'}; escalate ${escalate.length > 0 ? escalate.join(',') : 'none'}`,
|
|
133
|
+
};
|
|
134
|
+
}
|
|
19
135
|
/** The most images one check reads. */
|
|
20
136
|
export const MODERATION_IMAGES_MAX = 8;
|
|
21
137
|
/** How long a check waits for its classifier: past it, the content is refused as unchecked, and the caller's action goes on. */
|
|
@@ -65,16 +181,26 @@ const answerBudget = (llamaGuard) => llamaGuard
|
|
|
65
181
|
: { maxOutputTokens: 1024, providerOptions: { openai: { reasoningEffort: 'low' } } };
|
|
66
182
|
/** Whether a classifier reads images: Llama Guard 4, and a model object of the app's own, which is trusted to, unless it is a text-only safeguard. */
|
|
67
183
|
const readsImages = (model) => typeof model === 'string' ? /llama-guard-4/i.test(model) : !/safeguard/i.test(modelIdOf(model));
|
|
68
|
-
/**
|
|
184
|
+
/**
|
|
185
|
+
* Read a classifier's answer: `safe`, or `unsafe` and its codes; `null`
|
|
186
|
+
* for anything else. Every word after `unsafe` is a code (`S` and a number)
|
|
187
|
+
* or the answer is unread. A padded code reads as its number (`S04` is
|
|
188
|
+
* `S4`), so it escalates as `S4` does; a code beyond `S14` is kept, and the
|
|
189
|
+
* policy refuses it; words such as `child abuse` beside the codes are no verdict
|
|
190
|
+
* this reads, so the content is refused as unchecked rather than judged on
|
|
191
|
+
* the codes alone.
|
|
192
|
+
*/
|
|
69
193
|
export function readVerdict(answer) {
|
|
70
194
|
const lines = answer.trim().split(/\r?\n/).map(line => line.trim()).filter(Boolean);
|
|
71
195
|
const head = lines[0]?.toLowerCase().replace(/[^a-z]/g, '');
|
|
72
196
|
if (head === 'safe')
|
|
73
|
-
return { flagged: false, categories: [] };
|
|
197
|
+
return lines.length === 1 ? { flagged: false, categories: [] } : null;
|
|
74
198
|
if (head !== 'unsafe')
|
|
75
199
|
return null;
|
|
76
|
-
const
|
|
77
|
-
|
|
200
|
+
const words = lines.slice(1).join(',').split(/[\s,]+/).filter(Boolean).map(llamaGuardCode);
|
|
201
|
+
if (!words.every(word => LLAMA_CODE.test(word)))
|
|
202
|
+
return null;
|
|
203
|
+
return { flagged: true, categories: [...new Set(words)] };
|
|
78
204
|
}
|
|
79
205
|
let imagesUncheckedNoticed = false;
|
|
80
206
|
/** A classifier call that failed, as the caller reads it: a refusal of the catalog as it is (a model with no route, AI paused), anything else (a timeout, the provider's error) `unavailable` and logged. */
|
|
@@ -86,22 +212,146 @@ function checkFailure(id, error) {
|
|
|
86
212
|
return backendError('unavailable', { service: 'ai', reason: 'provider_refused' }, `[nuxt-backend] The moderation model ${id} did not answer. Try again shortly.`);
|
|
87
213
|
}
|
|
88
214
|
/** Refuse a check with images its classifier cannot read: passing them unread would call them safe. */
|
|
89
|
-
function refuseUnreadImages(id) {
|
|
215
|
+
function refuseUnreadImages(id, defaulted) {
|
|
216
|
+
// The default reads text only where the Vercel AI Gateway answers, which serves no Llama Guard.
|
|
217
|
+
const fix = defaulted
|
|
218
|
+
? `the Vercel AI Gateway answers here, and serves no classifier that reads images: route moderation through the Convex AI Gateway, or name a model that reads images in setupAi({ moderation: { model } })`
|
|
219
|
+
: `name a classifier that reads images, such as ${DEFAULT_MODERATION_MODEL} through the Convex AI Gateway`;
|
|
90
220
|
if (!imagesUncheckedNoticed) {
|
|
91
221
|
imagesUncheckedNoticed = true;
|
|
92
|
-
logBackend('error', 'ai.moderation_images_unchecked', `The moderation model ${id} reads text only: a check with images is refused as unchecked.
|
|
222
|
+
logBackend('error', 'ai.moderation_images_unchecked', `The moderation model ${id} reads text only: a check with images is refused as unchecked. To check images, ${fix}.`);
|
|
93
223
|
}
|
|
94
|
-
throw backendError('unavailable', { service: 'ai', reason: 'not_configured' }, `[nuxt-backend] The moderation model ${id} reads text only, so it cannot check images:
|
|
224
|
+
throw backendError('unavailable', { service: 'ai', reason: 'not_configured' }, `[nuxt-backend] The moderation model ${id} reads text only, so it cannot check images: ${fix}.`);
|
|
225
|
+
}
|
|
226
|
+
/** The Vercel AI Gateway's classifier, under the key a route to it carries. */
|
|
227
|
+
const vercelClassifier = (apiKey) => ({ id: VERCEL_MODERATION_MODEL, route: { route: 'gateway', id: VERCEL_MODERATION_MODEL, apiKey } });
|
|
228
|
+
/**
|
|
229
|
+
* The default classifier, by the gateway that answers: Llama Guard 4
|
|
230
|
+
* through the Convex AI Gateway, gpt-oss-safeguard through the Vercel one.
|
|
231
|
+
* Which answers a `convex` route is known only once its token is asked
|
|
232
|
+
* for, so it is asked here, before the prompt is built for either.
|
|
233
|
+
*/
|
|
234
|
+
async function defaultClassifier(routing) {
|
|
235
|
+
const route = routeModel(DEFAULT_MODERATION_MODEL, undefined, routing);
|
|
236
|
+
if (route.route === 'gateway')
|
|
237
|
+
return vercelClassifier(route.apiKey);
|
|
238
|
+
if (route.route !== 'convex')
|
|
239
|
+
return { id: DEFAULT_MODERATION_MODEL, route };
|
|
240
|
+
const convex = await convexGatewayModel(DEFAULT_MODERATION_MODEL);
|
|
241
|
+
if ('model' in convex)
|
|
242
|
+
return { id: DEFAULT_MODERATION_MODEL, route: { route: 'own', id: DEFAULT_MODERATION_MODEL, model: convex.model } };
|
|
243
|
+
const { fallback } = route;
|
|
244
|
+
noticeConvexGateway(DEFAULT_MODERATION_MODEL, convex.unavailable, FALLBACK_NAME[fallback.route]);
|
|
245
|
+
if (fallback.route === 'gateway')
|
|
246
|
+
return vercelClassifier(fallback.apiKey);
|
|
247
|
+
if (fallback.route === 'missing')
|
|
248
|
+
throw modelRefusal(fallback, convex.unavailable);
|
|
249
|
+
return { id: DEFAULT_MODERATION_MODEL, route: fallback };
|
|
250
|
+
}
|
|
251
|
+
/**
|
|
252
|
+
* Whether a decision's statement of reasons is kept from the person the
|
|
253
|
+
* content came from: a known-abuse match, and a flag on legal hold for
|
|
254
|
+
* suspected child sexual abuse material (`minors_sexual`, `S4`). Telling
|
|
255
|
+
* the uploader can warn them off an investigation; an administrator still
|
|
256
|
+
* reads it.
|
|
257
|
+
*/
|
|
258
|
+
export function withheldFromUploader(flag) {
|
|
259
|
+
if (flag.playbook === 'csam')
|
|
260
|
+
return true;
|
|
261
|
+
return flag.legalHold === true && (flag.categories.includes('minors_sexual') || (flag.codes ?? []).some(code => llamaGuardCode(code) === 'S4'));
|
|
262
|
+
}
|
|
263
|
+
/** A decision as its record keeps it: who and what it was about, what was found, and how it was reached. */
|
|
264
|
+
function flagRecord(verdict, about, decision, policyVersion) {
|
|
265
|
+
const subject = Object.fromEntries(Object.entries({ userId: about.userId, owner: about.owner, subject: about.subject, stage: about.stage }).filter(([, value]) => value));
|
|
266
|
+
return {
|
|
267
|
+
...subject,
|
|
268
|
+
categories: verdict.categories,
|
|
269
|
+
blocked: verdict.blocked,
|
|
270
|
+
escalate: verdict.escalate,
|
|
271
|
+
model: decision.model,
|
|
272
|
+
codes: verdict.codes,
|
|
273
|
+
providers: verdict.providers,
|
|
274
|
+
scores: verdict.scores,
|
|
275
|
+
thresholds: decision.thresholds,
|
|
276
|
+
...(policyVersion ? { policyVersion } : {}),
|
|
277
|
+
automated: true,
|
|
278
|
+
...(decision.hash ? { hash: decision.hash, playbook: 'csam' } : {}),
|
|
279
|
+
};
|
|
280
|
+
}
|
|
281
|
+
const runtimeEnv = () => (typeof process === 'undefined' ? {} : process.env);
|
|
282
|
+
/** An image's SHA-256, as hex: a known-abuse match's evidence. */
|
|
283
|
+
async function sha256(bytes) {
|
|
284
|
+
const digest = new Uint8Array(await crypto.subtle.digest('SHA-256', bytes));
|
|
285
|
+
return [...digest].map(byte => byte.toString(16).padStart(2, '0')).join('');
|
|
286
|
+
}
|
|
287
|
+
/**
|
|
288
|
+
* Match every image against the known-abuse list, before any other provider
|
|
289
|
+
* sees it: the first match decides, and no other image is sent anywhere.
|
|
290
|
+
*/
|
|
291
|
+
async function matchKnownAbuse(provider, images) {
|
|
292
|
+
for (const image of images) {
|
|
293
|
+
const { matched, code } = await provider.match(image, runtimeEnv());
|
|
294
|
+
if (!matched)
|
|
295
|
+
continue;
|
|
296
|
+
return {
|
|
297
|
+
flagged: true,
|
|
298
|
+
categories: ['csam_match'],
|
|
299
|
+
codes: [code ?? 'known_abuse'],
|
|
300
|
+
scores: { csam_match: { score: 1, supported: true } },
|
|
301
|
+
providers: [provider.id],
|
|
302
|
+
knownAbuse: true,
|
|
303
|
+
hash: await sha256(image.bytes),
|
|
304
|
+
};
|
|
305
|
+
}
|
|
306
|
+
return undefined;
|
|
95
307
|
}
|
|
96
308
|
/**
|
|
97
309
|
* The check `setupAi` builds: `moderate` answers the verdict, `requireSafe`
|
|
98
310
|
* throws the refusal a flagged prompt gets.
|
|
99
311
|
*/
|
|
100
|
-
export function createModeration(config, storage, recordCost) {
|
|
101
|
-
const
|
|
102
|
-
|
|
103
|
-
const
|
|
104
|
-
const
|
|
312
|
+
export function createModeration(config, storage, recordCost, flags) {
|
|
313
|
+
const named = config.moderation?.model ?? config.moderation?.text;
|
|
314
|
+
const imageProviders = config.moderation?.images ?? [];
|
|
315
|
+
const { secondOpinion, knownAbuse } = config.moderation ?? {};
|
|
316
|
+
const policyVersion = config.moderation?.policy?.version;
|
|
317
|
+
requireModelId(named, 'setupAi({ moderation })');
|
|
318
|
+
/** The classifier a check calls: the app's own when it names one, else the answering gateway's. */
|
|
319
|
+
const classifier = async () => named === undefined
|
|
320
|
+
? defaultClassifier(config.routing)
|
|
321
|
+
: { id: modelIdOf(named), route: routeModel(named, undefined, config.routing) };
|
|
322
|
+
const policy = moderationPolicy(config.moderation);
|
|
323
|
+
/** Record a flagged check: its id, or `undefined` when none is kept or the record failed, which is logged. */
|
|
324
|
+
async function storeFlag(ctx, verdict, legalHold, about, decision) {
|
|
325
|
+
if (policy.days === false || !flags)
|
|
326
|
+
return undefined;
|
|
327
|
+
try {
|
|
328
|
+
const userId = about.userId ?? (await ctx.auth?.getUserIdentity())?.subject;
|
|
329
|
+
return await ctx.runMutation(flags.record, { ...flagRecord(verdict, { ...about, userId }, decision, policyVersion), policy: policy.snapshot, ...(legalHold ? { legalHold } : {}), days: policy.days });
|
|
330
|
+
}
|
|
331
|
+
catch (error) {
|
|
332
|
+
if (verdict.escalate)
|
|
333
|
+
logBackend('error', 'ai.flag_unrecorded', 'An escalated check could not be recorded for the Moderation tab; its content stays blocked.', error);
|
|
334
|
+
else
|
|
335
|
+
logBackend('warn', 'ai.flag_unrecorded', 'A flagged check could not be recorded for the Moderation tab; its verdict stands.', error);
|
|
336
|
+
return undefined;
|
|
337
|
+
}
|
|
338
|
+
}
|
|
339
|
+
/**
|
|
340
|
+
* Record a flagged check, and say an escalated one in the logs with the
|
|
341
|
+
* flag that holds it. A record that fails is logged and never fails the
|
|
342
|
+
* check: the verdict stands, and an escalated verdict is blocked already,
|
|
343
|
+
* so content an administrator was to see is never let through unrecorded.
|
|
344
|
+
*/
|
|
345
|
+
async function recordFlag(ctx, verdict, legalHold, about, decision) {
|
|
346
|
+
const flagId = await storeFlag(ctx, verdict, legalHold, about, decision);
|
|
347
|
+
if (!verdict.escalate)
|
|
348
|
+
return;
|
|
349
|
+
const where = [about.subject && `subject ${about.subject}`, about.stage && `at ${about.stage}`, flagId ? `flag ${flagId}` : 'no flag recorded'].filter(Boolean).join(', ');
|
|
350
|
+
if (verdict.knownAbuse)
|
|
351
|
+
logBackend('error', 'ai.known_abuse_matched', `An image matched a list of known child sexual abuse material (${where}): it was blocked and sent nowhere else. Follow the CSAM playbook from the Moderation tab.`);
|
|
352
|
+
else
|
|
353
|
+
logBackend('error', 'ai.content_escalated', `The moderation providers flagged content in a category escalated to administrators (${[...verdict.categories, ...verdict.codes].join(', ')}), and it is blocked (${where}): see the Moderation tab.`);
|
|
354
|
+
}
|
|
105
355
|
/** An image's bytes: an upload in the component's storage first, then a file of the app's own. */
|
|
106
356
|
const readerFor = (ctx) => async (storageId) => {
|
|
107
357
|
if (storage) {
|
|
@@ -120,14 +370,13 @@ export function createModeration(config, storage, recordCost) {
|
|
|
120
370
|
return null;
|
|
121
371
|
}
|
|
122
372
|
};
|
|
123
|
-
/** The
|
|
124
|
-
async function
|
|
373
|
+
/** The images of the check, read once, each refused when it is gone or no image. */
|
|
374
|
+
async function readImages(ctx, ids) {
|
|
125
375
|
if (ids.length > MODERATION_IMAGES_MAX) {
|
|
126
376
|
throw backendError('invalid_input', { field: 'images', reason: 'too_many' }, `[nuxt-backend] A check reads at most ${MODERATION_IMAGES_MAX} images.`);
|
|
127
377
|
}
|
|
128
378
|
const read = readerFor(ctx);
|
|
129
|
-
|
|
130
|
-
const parts = [];
|
|
379
|
+
const images = [];
|
|
131
380
|
for (const storageId of ids) {
|
|
132
381
|
const bytes = await read(storageId);
|
|
133
382
|
if (!bytes)
|
|
@@ -136,18 +385,91 @@ export function createModeration(config, storage, recordCost) {
|
|
|
136
385
|
if (!mediaType?.startsWith('image/') || mediaType === 'image/svg+xml') {
|
|
137
386
|
throw backendError('invalid_input', { field: 'images', reason: 'unsupported_type' }, `[nuxt-backend] The file ${storageId} is ${mediaType ?? 'of no known type'}, not an image the classifier reads.`);
|
|
138
387
|
}
|
|
139
|
-
|
|
388
|
+
images.push({ bytes, mediaType });
|
|
140
389
|
}
|
|
141
|
-
return
|
|
390
|
+
return images;
|
|
142
391
|
}
|
|
143
|
-
const moderate = async (ctx, input) => {
|
|
392
|
+
const moderate = async (ctx, input, about = {}) => {
|
|
393
|
+
const { decision, ...read } = await classify(ctx, input, about.stage);
|
|
394
|
+
const { legalHold, ...judged } = policy.judge(read);
|
|
395
|
+
// A known-abuse match is blocked and escalated whatever the policy says, and held.
|
|
396
|
+
const verdict = { ...read, ...(read.knownAbuse ? { blocked: true, escalate: true } : judged) };
|
|
397
|
+
if (verdict.flagged)
|
|
398
|
+
await recordFlag(ctx, verdict, legalHold || verdict.knownAbuse === true, about, decision);
|
|
399
|
+
return verdict;
|
|
400
|
+
};
|
|
401
|
+
/** Every provider's reading of the content, before the policy, and what the record keeps of how it was decided. */
|
|
402
|
+
const classify = async (ctx, input, stage) => {
|
|
144
403
|
const text = typeof input?.text === 'string' ? input.text.trim() : '';
|
|
145
404
|
const imageIds = Array.isArray(input?.images) ? input.images.filter(image => typeof image === 'string' && image) : [];
|
|
146
|
-
|
|
147
|
-
|
|
405
|
+
const thresholds = thresholdsFor(config.moderation?.thresholds, stage);
|
|
406
|
+
const nothing = { flagged: false, categories: [], codes: [], scores: {}, providers: [], decision: { model: modelIdOf(named) ?? DEFAULT_MODERATION_MODEL, thresholds } };
|
|
148
407
|
if (!text && imageIds.length === 0)
|
|
149
|
-
return
|
|
150
|
-
|
|
408
|
+
return nothing;
|
|
409
|
+
// Images the classifier would read, and cannot, are refused before any is read.
|
|
410
|
+
const chosen = imageIds.length > 0 && imageProviders.length === 0 ? await imageReader() : undefined;
|
|
411
|
+
const images = await readImages(ctx, imageIds);
|
|
412
|
+
// 1. A known-abuse match first, before any other provider sees the bytes.
|
|
413
|
+
const match = knownAbuse ? await matchKnownAbuse(knownAbuse, images) : undefined;
|
|
414
|
+
if (match)
|
|
415
|
+
return { ...match, decision: { model: knownAbuse.id, thresholds, hash: match.hash } };
|
|
416
|
+
const { readings, unsafe, model } = await readingsOf(ctx, text, images, thresholds, chosen, stage);
|
|
417
|
+
const scores = combineReadings(readings);
|
|
418
|
+
const categories = flaggedCategories(scores, thresholds);
|
|
419
|
+
const codes = [...new Set(readings.flatMap(reading => reading.codes))];
|
|
420
|
+
return { flagged: categories.length > 0 || unsafe, categories, codes, scores, providers: [...new Set(readings.map(reading => reading.provider))], decision: { model, thresholds } };
|
|
421
|
+
};
|
|
422
|
+
/**
|
|
423
|
+
* Every provider's reading but a known-abuse match's: the text through the
|
|
424
|
+
* classifier; the images through the image providers, or the classifier
|
|
425
|
+
* when the app names none; and a second opinion only where a score sits
|
|
426
|
+
* just under its threshold, which can raise a score, never lower one.
|
|
427
|
+
*/
|
|
428
|
+
const readingsOf = async (ctx, text, images, thresholds, chosen, stage) => {
|
|
429
|
+
const readings = [];
|
|
430
|
+
const classifierImages = imageProviders.length > 0 ? [] : images;
|
|
431
|
+
const read = text || classifierImages.length > 0 ? await askClassifier(ctx, text, classifierImages, chosen) : undefined;
|
|
432
|
+
if (read)
|
|
433
|
+
readings.push(classifierReading(read.model, read.codes));
|
|
434
|
+
if (images.length > 0 && imageProviders.length > 0) {
|
|
435
|
+
for (const provider of imageProviders)
|
|
436
|
+
readings.push(await provider.check({ images, stage }, runtimeEnv()));
|
|
437
|
+
const minors = await minorsReading(ctx, images);
|
|
438
|
+
if (minors)
|
|
439
|
+
readings.push(minors);
|
|
440
|
+
if (secondOpinion && inGrayBand(combineReadings(readings), thresholds))
|
|
441
|
+
readings.push(await secondOpinion.check({ images, stage }, runtimeEnv()));
|
|
442
|
+
}
|
|
443
|
+
return { readings, unsafe: read?.flagged ?? false, model: read?.model ?? modelIdOf(named) ?? DEFAULT_MODERATION_MODEL };
|
|
444
|
+
};
|
|
445
|
+
/**
|
|
446
|
+
* The classifier's reading of the images for `minors_sexual` alone, when
|
|
447
|
+
* no image provider judges it and the classifier reads images (Llama
|
|
448
|
+
* Guard 4 does): so a sexual image of a minor no hash list knows still
|
|
449
|
+
* escalates as `S4`. Its other codes are left to the image providers.
|
|
450
|
+
*/
|
|
451
|
+
const minorsReading = async (ctx, images) => {
|
|
452
|
+
if (imageProviders.some(provider => provider.imageCategories?.includes('minors_sexual')))
|
|
453
|
+
return undefined;
|
|
454
|
+
const chosen = await classifier();
|
|
455
|
+
if (!readsImages(named ?? chosen.id))
|
|
456
|
+
return undefined;
|
|
457
|
+
const read = await askClassifier(ctx, '', images, chosen);
|
|
458
|
+
const reading = classifierReading(read.model, read.codes);
|
|
459
|
+
return { provider: read.model, scores: { minors_sexual: reading.scores.minors_sexual ?? { score: 0, supported: true } }, codes: read.codes.filter(code => llamaGuardCategory(code) === 'minors_sexual') };
|
|
460
|
+
};
|
|
461
|
+
/** The classifier, once it is known to read images: a text-only one is refused, as passing images unread would call them safe. */
|
|
462
|
+
const imageReader = async () => {
|
|
463
|
+
const chosen = await classifier();
|
|
464
|
+
if (!readsImages(named ?? chosen.id))
|
|
465
|
+
refuseUnreadImages(chosen.id, named === undefined);
|
|
466
|
+
return chosen;
|
|
467
|
+
};
|
|
468
|
+
/** The text classifier's verdict on text and images it reads: its codes, and whether it called the content unsafe. */
|
|
469
|
+
const askClassifier = async (ctx, text, images, chosen) => {
|
|
470
|
+
const { id, route } = chosen ?? await classifier();
|
|
471
|
+
// File parts: AI SDK 7 deprecates the image part, and reads an image file the same way.
|
|
472
|
+
const parts = images.map(image => ({ type: 'file', data: image.bytes, mediaType: image.mediaType }));
|
|
151
473
|
const llamaGuard = isLlamaGuard(id);
|
|
152
474
|
const words = text || IMAGES_ALONE;
|
|
153
475
|
const content = [
|
|
@@ -158,14 +480,14 @@ export function createModeration(config, storage, recordCost) {
|
|
|
158
480
|
// The check's own calls: never priced against anyone's credits, but
|
|
159
481
|
// recorded as the app's cost, against who asked when someone is signed in.
|
|
160
482
|
const calls = [];
|
|
161
|
-
const
|
|
483
|
+
const checking = meteredModel(route, calls, config.routing.region);
|
|
162
484
|
let result;
|
|
163
485
|
// A gateway that hangs must not hold the caller's action until it times out.
|
|
164
486
|
const deadline = new AbortController();
|
|
165
487
|
const timer = setTimeout(() => deadline.abort(new Error(`The moderation model ${id} did not answer within ${MODERATION_TIMEOUT_MS / 1000} s.`)), MODERATION_TIMEOUT_MS);
|
|
166
488
|
try {
|
|
167
489
|
result = await sdk.generateText({
|
|
168
|
-
model:
|
|
490
|
+
model: checking,
|
|
169
491
|
...(llamaGuard ? {} : { system: POLICY }),
|
|
170
492
|
messages: [{ role: 'user', content }],
|
|
171
493
|
...answerBudget(llamaGuard),
|
|
@@ -185,15 +507,15 @@ export function createModeration(config, storage, recordCost) {
|
|
|
185
507
|
logBackend('error', 'ai.moderation_unreadable', `The moderation model ${id} answered something other than "safe" or "unsafe": the content is refused as unchecked.`);
|
|
186
508
|
throw backendError('unavailable', { service: 'ai', reason: 'provider_refused' }, `[nuxt-backend] The moderation model ${id} gave no verdict. Try again shortly.`);
|
|
187
509
|
}
|
|
188
|
-
return verdict;
|
|
510
|
+
return { flagged: verdict.flagged, codes: verdict.categories, model: id };
|
|
189
511
|
};
|
|
190
|
-
const requireSafe = async (ctx, input) => {
|
|
191
|
-
const verdict = await moderate(ctx, input);
|
|
192
|
-
if (!verdict.
|
|
512
|
+
const requireSafe = async (ctx, input, about = {}) => {
|
|
513
|
+
const verdict = await moderate(ctx, input, about);
|
|
514
|
+
if (!verdict.blocked)
|
|
193
515
|
return;
|
|
194
516
|
const field = input.text?.trim() ? 'prompt' : 'images';
|
|
195
|
-
throw backendError('invalid_input', { field, reason: 'content_blocked' }, `[nuxt-backend] The moderation
|
|
517
|
+
throw backendError('invalid_input', { field, reason: 'content_blocked' }, `[nuxt-backend] The moderation check flagged this content (${[...verdict.categories, ...verdict.codes].join(', ') || 'no category named'}).`);
|
|
196
518
|
};
|
|
197
|
-
return { moderate, requireSafe, modelId:
|
|
519
|
+
return { moderate, requireSafe, modelId: modelIdOf(named) ?? DEFAULT_MODERATION_MODEL };
|
|
198
520
|
}
|
|
199
521
|
//# sourceMappingURL=moderation.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"moderation.js","sourceRoot":"","sources":["../../../../src/convex/integrations/ai/moderation.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAA;AAC/D,OAAO,EAAE,gBAAgB,EAAE,MAAM,gBAAgB,CAAA;AACjD,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAA;AAGzC,OAAO,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAA;AACjD,OAAO,EAAE,OAAO,EAAE,YAAY,EAAE,SAAS,EAAkB,cAAc,EAAE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ia`) for a photo a model edited in part.
|
|
30
30
|
*/
|
|
31
31
|
sourceType?: 'generated' | 'composite';
|
|
32
|
+
/**
|
|
33
|
+
* The model the manifest names as the image's generator. Default: the
|
|
34
|
+
* image model this run called last (`ctx.image()`), else the last model it
|
|
35
|
+
* called, so a caption or a vision check after the image never signs it.
|
|
36
|
+
*/
|
|
37
|
+
model?: string;
|
|
32
38
|
}
|
|
33
39
|
/** `ctx.storeImage` in a job step or a metered action. */
|
|
34
40
|
export interface ImageStoreContext {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"provenance.d.ts","sourceRoot":"","sources":["../../../../src/convex/integrations/ai/provenance.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,gBAAgB,EAAE,gBAAgB,EAAE,MAAM,eAAe,CAAA;AAC1F,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,eAAe,CAAA;AAC9C,OAAO,EAAE,oBAAoB,EAA+B,MAAM,uBAAuB,CAAA;AAGzF,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,aAAa,CAAA;AAU5C,qGAAqG;AACrG,MAAM,MAAM,gBAAgB,GAAG,OAAO,GAAG;IACvC,2FAA2F;IAC3F,IAAI,CAAC,EAAE,MAAM,CAAA;CACd,CAAA;AAED,qGAAqG;AACrG,MAAM,WAAW,aAAa;IAC5B,MAAM,EAAE,MAAM,EAAE,CAAA;IAChB,UAAU,EAAE,MAAM,CAAA;IAClB,4EAA4E;IAC5E,MAAM,EAAE,MAAM,EAAE,CAAA;CACjB;AAED,4GAA4G;AAC5G,MAAM,MAAM,cAAc,GAAG,IAAI,GAAG,UAAU,GAAG;IAAE,UAAU,EAAE,UAAU,CAAC;IAAC,SAAS,CAAC,EAAE,MAAM,CAAA;CAAE,CAAA;AAE/F,sDAAsD;AACtD,MAAM,WAAW,iBAAiB;IAChC,oFAAoF;IACpF,MAAM,CAAC,EAAE,MAAM,EAAE,CAAA;IACjB;;;;OAIG;IACH,U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CAAC,YAAY,CAAC,CA6B1M;AAOD,sFAAsF;AACtF,wBAAgB,gBAAgB,CAAC,IAAI,EAAE,cAAc,IAC3C,KAAK;IAAE,QAAQ,EAAE,gBAAgB,CAAC,gBAAgB,CAAC,CAAC,UAAU,CAAC,CAAA;CAAE,EAAE,WAAW,MAAM,KAAG,OAAO,CAAC,aAAa,GAAG,IAAI,CAAC,CAE7H"}
|
|
@@ -110,7 +110,10 @@ export function imageStore(ctx, config, rows, scope) {
|
|
|
110
110
|
const { bytes, declared } = await bytesOf(file);
|
|
111
111
|
const called = [...new Set(scope.calls.filter(call => call.state === 'finished').map(call => call.model))];
|
|
112
112
|
const models = called.length > 0 ? called : scope.model ? [scope.model] : [];
|
|
113
|
-
|
|
113
|
+
// The generator: the model the call names, else the last image model called, else the last model called.
|
|
114
|
+
const imageModel = scope.calls.filter(call => call.state === 'finished' && call.kind === 'image').at(-1)?.model;
|
|
115
|
+
const generator = options.model ?? imageModel ?? models.at(-1);
|
|
116
|
+
const stored = await withCredentials(bytes, { generator: generatorName(config), model: generator, sourceType }, declared);
|
|
114
117
|
// The component's action stores the bytes; only the id reaches its owner-record mutation.
|
|
115
118
|
const storageId = await ctx.runAction(rows.storeGeneratedImage, {
|
|
116
119
|
bytes: bufferOf(stored.bytes),
|