better-supabase 0.50.0 → 0.51.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 +14 -0
- package/dist/{activities-C2v_Sq4w.d.ts → activities-CL253DEv.d.ts} +2 -2
- package/dist/{adapter-BzeH7ffo.js → adapter-DBO28HF_.js} +1 -1
- package/dist/{agents-Cekdx8Bz.d.ts → agents-C3l31Csq.d.ts} +33 -2
- package/dist/agents-Cf59iYaF.d.ts +290 -0
- package/dist/agents-lkuM-m6i.js +380 -0
- package/dist/{ai-cache-Pchr6Y4y.js → ai-cache-CnmJIQZG.js} +2 -2
- package/dist/{ai-chat-D2o3jqZ5.d.ts → ai-chat-DwVklsNR.d.ts} +88 -7
- package/dist/{ai-files-B2BWwPoj.js → ai-files-CMDsogDg.js} +3 -2
- package/dist/ai-guardrails-Ckbf-cmW.d.ts +216 -0
- package/dist/{ai-schedules-BOiaFIva.d.ts → ai-schedules-D68hvDoZ.d.ts} +1 -1
- package/dist/ai-sdk/agents/index.d.ts +68 -212
- package/dist/ai-sdk/agents/index.js +103 -300
- package/dist/ai-sdk/batches/index.js +1 -1
- package/dist/ai-sdk/cache/index.js +1 -1
- package/dist/ai-sdk/chat/index.d.ts +2 -2
- package/dist/ai-sdk/chat/index.js +5 -2
- package/dist/ai-sdk/embeddings/index.d.ts +52 -3
- package/dist/ai-sdk/embeddings/index.js +69 -1
- package/dist/ai-sdk/files/index.d.ts +38 -4
- package/dist/ai-sdk/files/index.js +100 -4
- package/dist/ai-sdk/index.d.ts +166 -16
- package/dist/ai-sdk/index.js +394 -21
- package/dist/ai-sdk/mcp/index.d.ts +49 -2
- package/dist/ai-sdk/mcp/index.js +108 -6
- package/dist/ai-sdk/memory/index.d.ts +2 -2
- package/dist/ai-sdk/memory/index.js +7 -2
- package/dist/ai-sdk/react/index.js +2 -2
- package/dist/ai-sdk/react/server.js +1 -1
- package/dist/ai-sdk/workflow/index.d.ts +87 -23
- package/dist/ai-sdk/workflow/index.js +275 -28
- package/dist/ai-sdk/workflow/react/index.d.ts +25 -4
- package/dist/ai-sdk/workflow/react/index.js +71 -16
- package/dist/ai-sdk/workflow/react/server.d.ts +4 -4
- package/dist/{api-CWeCh_j2.d.ts → api-3I8ucZF2.d.ts} +1 -1
- package/dist/{api-DXZh-j0l.js → api-CZGUgEVr.js} +1 -1
- package/dist/{app-tables-ByFny1cL.d.ts → app-tables-qa0wvhw0.d.ts} +1 -1
- package/dist/{approvals-B-WgN6Mf.d.ts → approvals-C7DjllLP.d.ts} +84 -1
- package/dist/{approvals-CMkvP9kT.js → approvals-CfQuk-lJ.js} +84 -8
- package/dist/{assistant-DcxV_seb.js → assistant-BBN9KJPi.js} +108 -26
- package/dist/{assistant-Dy9zwENt.d.ts → assistant-VF3vhPZo.d.ts} +68 -25
- package/dist/astro/index.js +2 -2
- package/dist/{attachments-gjSYzlsQ.js → attachments-Da24yVTB.js} +4 -4
- package/dist/audit-files/index.js +2 -2
- package/dist/{authorization-N4bh4KQS.d.ts → authorization-fXe0XyzB.d.ts} +1 -1
- package/dist/{automations-Ce0jNNIe.js → automations-BKxKPkhr.js} +2 -2
- package/dist/{automations-CCc5RUw-.js → automations-CkwKi84L.js} +2 -1
- package/dist/{bind-ChYzUApb.d.ts → bind-CimlbjXB.d.ts} +3 -3
- package/dist/{block-authors-CjI5VcQz.js → block-authors-Dt82LpCs.js} +1 -1
- package/dist/{block-env-buLS8m9m.d.ts → block-env-D0JCpFzh.d.ts} +4 -4
- package/dist/{block-helpers-CCl3V9ku.js → block-helpers-DApvw3n9.js} +5 -2
- package/dist/{block-hooks-C2_d17_b.js → block-hooks-mazaapv5.js} +1 -1
- package/dist/{block-subjects-ok-uZ1UU.js → block-subjects-CFDmtXvr.js} +1 -1
- package/dist/{block-subjects-rv7V0R6O.js → block-subjects-D3r2SfCb.js} +10 -10
- package/dist/{block-tables-CQHwZ9-v.d.ts → block-tables-CdXRHb2v.d.ts} +1 -1
- package/dist/blocks/access-requests/index.d.ts +1 -1
- package/dist/blocks/access-requests/index.js +2 -2
- package/dist/blocks/accounting/index.d.ts +1 -1
- package/dist/blocks/accounting/index.js +3 -3
- package/dist/blocks/acknowledgements/index.d.ts +1 -1
- package/dist/blocks/acknowledgements/index.js +2 -2
- package/dist/blocks/activities/index.d.ts +5 -13
- package/dist/blocks/activities/index.js +3 -3
- package/dist/blocks/advisories/index.d.ts +1 -1
- package/dist/blocks/advisories/index.js +2 -2
- package/dist/blocks/agent-checkout/index.d.ts +1 -1
- package/dist/blocks/agent-checkout/index.js +2 -2
- package/dist/blocks/agents/index.d.ts +4 -4
- package/dist/blocks/agents/index.js +47 -8
- package/dist/blocks/ai-cache/index.d.ts +1 -1
- package/dist/blocks/ai-cache/index.js +2 -2
- package/dist/blocks/ai-chat/index.d.ts +4 -4
- package/dist/blocks/ai-chat/index.js +76 -8
- package/dist/blocks/ai-evals/index.d.ts +1 -1
- package/dist/blocks/ai-evals/index.js +2 -2
- package/dist/blocks/ai-files/index.d.ts +2 -2
- package/dist/blocks/ai-files/index.js +2 -2
- package/dist/blocks/ai-guardrails/index.d.ts +3 -216
- package/dist/blocks/ai-guardrails/index.js +4 -4
- package/dist/blocks/ai-keys/index.d.ts +1 -1
- package/dist/blocks/ai-keys/index.js +4 -4
- package/dist/blocks/ai-schedules/index.d.ts +2 -2
- package/dist/blocks/ai-schedules/index.js +2 -2
- package/dist/blocks/announcements/index.d.ts +4 -4
- package/dist/blocks/announcements/index.js +2 -2
- package/dist/blocks/api-keys/index.d.ts +1 -1
- package/dist/blocks/api-keys/index.js +2 -2
- package/dist/blocks/appraisals/index.d.ts +1 -1
- package/dist/blocks/appraisals/index.js +2 -2
- package/dist/blocks/approvals/index.d.ts +2 -2
- package/dist/blocks/approvals/index.js +3 -3
- package/dist/blocks/assets/index.d.ts +2 -2
- package/dist/blocks/assets/index.js +3 -3
- package/dist/blocks/assignment/index.d.ts +1 -1
- package/dist/blocks/assignment/index.js +3 -3
- package/dist/blocks/attachments/index.d.ts +5 -5
- package/dist/blocks/attachments/index.js +3 -3
- package/dist/blocks/audit/index.d.ts +2 -2
- package/dist/blocks/audit/index.js +2 -2
- package/dist/blocks/automations/index.d.ts +4 -4
- package/dist/blocks/automations/index.js +3 -3
- package/dist/blocks/banking/index.d.ts +1 -1
- package/dist/blocks/banking/index.js +3 -3
- package/dist/blocks/billable-time/index.d.ts +1 -1
- package/dist/blocks/billable-time/index.js +3 -3
- package/dist/blocks/billing/index.d.ts +2 -2
- package/dist/blocks/billing/index.js +2 -2
- package/dist/blocks/bookings/index.d.ts +2 -2
- package/dist/blocks/bookings/index.js +2 -2
- package/dist/blocks/bulk/index.d.ts +1 -1
- package/dist/blocks/bulk/index.js +2 -2
- package/dist/blocks/calendar/index.d.ts +3 -3
- package/dist/blocks/calendar/index.js +1 -1
- package/dist/blocks/care/index.d.ts +27 -27
- package/dist/blocks/care/index.js +27 -27
- package/dist/blocks/care-plans/index.d.ts +3 -3
- package/dist/blocks/care-plans/index.js +3 -3
- package/dist/blocks/cases/index.d.ts +3 -3
- package/dist/blocks/cases/index.js +3 -3
- package/dist/blocks/catalog/index.d.ts +2 -2
- package/dist/blocks/catalog/index.js +3 -3
- package/dist/blocks/channels/index.d.ts +1 -1
- package/dist/blocks/channels/index.js +2 -2
- package/dist/blocks/clinical-decision-support/index.d.ts +1 -1
- package/dist/blocks/clinical-decision-support/index.js +2 -2
- package/dist/blocks/cms/index.d.ts +5 -5
- package/dist/blocks/cms/index.js +5 -5
- package/dist/blocks/collaboration/index.d.ts +6 -6
- package/dist/blocks/collaboration/index.js +6 -6
- package/dist/blocks/collections/index.d.ts +1 -1
- package/dist/blocks/collections/index.js +2 -2
- package/dist/blocks/comments/index.d.ts +2 -2
- package/dist/blocks/comments/index.js +3 -3
- package/dist/blocks/commerce/index.d.ts +5 -5
- package/dist/blocks/commerce/index.js +5 -5
- package/dist/blocks/commissions/index.d.ts +1 -1
- package/dist/blocks/commissions/index.js +2 -2
- package/dist/blocks/compliance/index.d.ts +1 -1
- package/dist/blocks/compliance/index.js +2 -2
- package/dist/blocks/connectors/index.d.ts +1 -1
- package/dist/blocks/connectors/index.js +3 -3
- package/dist/blocks/consents/index.d.ts +2 -2
- package/dist/blocks/consents/index.js +3 -3
- package/dist/blocks/contacts/index.d.ts +3 -3
- package/dist/blocks/contacts/index.js +4 -4
- package/dist/blocks/content/index.d.ts +2 -2
- package/dist/blocks/content/index.js +3 -3
- package/dist/blocks/contracts/index.d.ts +1 -1
- package/dist/blocks/contracts/index.js +4 -4
- package/dist/blocks/courses/index.d.ts +3 -3
- package/dist/blocks/courses/index.js +3 -3
- package/dist/blocks/created-by/index.d.ts +2 -2
- package/dist/blocks/crm/index.d.ts +16 -16
- package/dist/blocks/crm/index.js +16 -16
- package/dist/blocks/custom-fields/index.d.ts +1 -1
- package/dist/blocks/custom-fields/index.js +2 -2
- package/dist/blocks/dam/index.d.ts +2 -2
- package/dist/blocks/dam/index.js +4 -4
- package/dist/blocks/data-lifecycle/index.d.ts +2 -2
- package/dist/blocks/data-lifecycle/index.js +3 -3
- package/dist/blocks/deals/index.d.ts +1 -1
- package/dist/blocks/deals/index.js +3 -3
- package/dist/blocks/dispatch/index.d.ts +2 -2
- package/dist/blocks/dispatch/index.js +4 -4
- package/dist/blocks/document-templates/index.d.ts +1 -1
- package/dist/blocks/document-templates/index.js +2 -2
- package/dist/blocks/documents/index.d.ts +1 -1
- package/dist/blocks/documents/index.js +2 -2
- package/dist/blocks/domains/index.d.ts +1 -1
- package/dist/blocks/domains/index.js +3 -3
- package/dist/blocks/donations/index.d.ts +1 -1
- package/dist/blocks/donations/index.js +4 -4
- package/dist/blocks/drive/index.d.ts +5 -5
- package/dist/blocks/drive/index.js +5 -5
- package/dist/blocks/e-prescribing/index.d.ts +1 -1
- package/dist/blocks/e-prescribing/index.js +2 -2
- package/dist/blocks/employees/index.d.ts +1 -1
- package/dist/blocks/employees/index.js +3 -3
- package/dist/blocks/enrichment/index.d.ts +1 -1
- package/dist/blocks/enrichment/index.js +3 -3
- package/dist/blocks/enrollments/index.d.ts +2 -2
- package/dist/blocks/enrollments/index.js +3 -3
- package/dist/blocks/entitlements/index.d.ts +3 -3
- package/dist/blocks/entitlements/index.js +3 -3
- package/dist/blocks/events/index.d.ts +3 -3
- package/dist/blocks/events/index.js +3 -3
- package/dist/blocks/expenses/index.d.ts +1 -1
- package/dist/blocks/expenses/index.js +3 -3
- package/dist/blocks/field-history/index.d.ts +1 -1
- package/dist/blocks/field-history/index.js +3 -3
- package/dist/blocks/filespace/index.d.ts +8 -8
- package/dist/blocks/filespace/index.js +7 -7
- package/dist/blocks/finance/index.d.ts +5 -5
- package/dist/blocks/finance/index.js +5 -5
- package/dist/blocks/flags/index.d.ts +1 -1
- package/dist/blocks/flags/index.js +3 -3
- package/dist/blocks/forecasts/index.d.ts +1 -1
- package/dist/blocks/forecasts/index.js +3 -3
- package/dist/blocks/forms/index.d.ts +3 -3
- package/dist/blocks/forms/index.js +2 -2
- package/dist/blocks/funding/index.d.ts +2 -2
- package/dist/blocks/funding/index.js +3 -3
- package/dist/blocks/goals/index.d.ts +1 -1
- package/dist/blocks/goals/index.js +3 -3
- package/dist/blocks/governance/index.d.ts +4 -4
- package/dist/blocks/governance/index.js +4 -4
- package/dist/blocks/guests/index.d.ts +1 -1
- package/dist/blocks/guests/index.js +3 -3
- package/dist/blocks/hiring/index.d.ts +1 -1
- package/dist/blocks/hiring/index.js +3 -3
- package/dist/blocks/identities/index.d.ts +1 -1
- package/dist/blocks/identities/index.js +2 -2
- package/dist/blocks/imports/index.d.ts +2 -2
- package/dist/blocks/imports/index.js +2 -2
- package/dist/blocks/inbox/index.d.ts +8 -8
- package/dist/blocks/inbox/index.js +3 -3
- package/dist/blocks/incidents/index.d.ts +1 -1
- package/dist/blocks/incidents/index.js +2 -2
- package/dist/blocks/index.d.ts +8 -8
- package/dist/blocks/index.js +4 -4
- package/dist/blocks/inspections/index.d.ts +2 -2
- package/dist/blocks/inspections/index.js +2 -2
- package/dist/blocks/inventory/index.d.ts +1 -1
- package/dist/blocks/inventory/index.js +3 -3
- package/dist/blocks/invoices/index.d.ts +1 -1
- package/dist/blocks/invoices/index.js +3 -3
- package/dist/blocks/knowledge/index.d.ts +3 -3
- package/dist/blocks/knowledge/index.js +4 -4
- package/dist/blocks/lead-scoring/index.d.ts +2 -2
- package/dist/blocks/lead-scoring/index.js +3 -3
- package/dist/blocks/learning/index.d.ts +3 -3
- package/dist/blocks/learning/index.js +3 -3
- package/dist/blocks/leases/index.d.ts +1 -1
- package/dist/blocks/leases/index.js +3 -3
- package/dist/blocks/leave/index.d.ts +1 -1
- package/dist/blocks/leave/index.js +3 -3
- package/dist/blocks/ledger/index.d.ts +1 -1
- package/dist/blocks/ledger/index.js +2 -2
- package/dist/blocks/legal-entities/index.d.ts +2 -2
- package/dist/blocks/legal-entities/index.js +2 -2
- package/dist/blocks/lims/index.d.ts +2 -2
- package/dist/blocks/lims/index.js +2 -2
- package/dist/blocks/mail-sync/index.d.ts +3 -3
- package/dist/blocks/mail-sync/index.js +3 -3
- package/dist/blocks/maintenance/index.d.ts +2 -2
- package/dist/blocks/maintenance/index.js +3 -3
- package/dist/blocks/manufacturing/index.d.ts +2 -2
- package/dist/blocks/manufacturing/index.js +3 -3
- package/dist/blocks/medications/index.d.ts +1 -1
- package/dist/blocks/medications/index.js +3 -3
- package/dist/blocks/meetings/index.d.ts +3 -3
- package/dist/blocks/meetings/index.js +3 -3
- package/dist/blocks/memberships/index.d.ts +2 -2
- package/dist/blocks/memory/index.d.ts +3 -3
- package/dist/blocks/memory/index.js +7 -7
- package/dist/blocks/messaging/index.d.ts +5 -5
- package/dist/blocks/messaging/index.js +3 -3
- package/dist/blocks/metrics/index.d.ts +1 -1
- package/dist/blocks/metrics/index.js +2 -2
- package/dist/blocks/mfa/index.d.ts +2 -2
- package/dist/blocks/moderation/index.d.ts +2 -2
- package/dist/blocks/moderation/index.js +2 -2
- package/dist/blocks/notifications/index.d.ts +5 -5
- package/dist/blocks/notifications/index.js +3 -3
- package/dist/blocks/numbering/index.d.ts +1 -1
- package/dist/blocks/numbering/index.js +1 -1
- package/dist/blocks/oauth-server/index.d.ts +1 -1
- package/dist/blocks/oauth-server/index.js +2 -2
- package/dist/blocks/observations/index.d.ts +2 -2
- package/dist/blocks/observations/index.js +3 -3
- package/dist/blocks/onboarding/index.d.ts +2 -2
- package/dist/blocks/onboarding/index.js +2 -2
- package/dist/blocks/orders/index.d.ts +1 -1
- package/dist/blocks/orders/index.js +4 -4
- package/dist/blocks/organizations/index.d.ts +2 -2
- package/dist/blocks/organizations/index.js +3 -3
- package/dist/blocks/outbox/index.d.ts +1 -1
- package/dist/blocks/outbox/index.js +2 -2
- package/dist/blocks/passes/index.d.ts +2 -2
- package/dist/blocks/passes/index.js +3 -3
- package/dist/blocks/payroll-export/index.d.ts +2 -2
- package/dist/blocks/payroll-export/index.js +3 -3
- package/dist/blocks/people/index.d.ts +7 -7
- package/dist/blocks/people/index.js +7 -7
- package/dist/blocks/periods/index.d.ts +1 -1
- package/dist/blocks/periods/index.js +2 -2
- package/dist/blocks/permissions/index.d.ts +3 -3
- package/dist/blocks/permissions/index.js +2 -2
- package/dist/blocks/pipelines/index.d.ts +1 -1
- package/dist/blocks/pipelines/index.js +3 -3
- package/dist/blocks/posts/index.d.ts +2 -2
- package/dist/blocks/posts/index.js +2 -2
- package/dist/blocks/procurement/index.d.ts +5 -5
- package/dist/blocks/procurement/index.js +5 -5
- package/dist/blocks/profiles/index.d.ts +1 -1
- package/dist/blocks/profiles/index.js +3 -3
- package/dist/blocks/projects/index.d.ts +7 -7
- package/dist/blocks/projects/index.js +7 -7
- package/dist/blocks/promotions/index.d.ts +1 -1
- package/dist/blocks/promotions/index.js +4 -4
- package/dist/blocks/prompts/index.d.ts +1 -1
- package/dist/blocks/prompts/index.js +2 -2
- package/dist/blocks/push/index.d.ts +2 -2
- package/dist/blocks/push/index.js +3 -3
- package/dist/blocks/qualifications/index.d.ts +2 -2
- package/dist/blocks/qualifications/index.js +3 -3
- package/dist/blocks/queue/index.d.ts +96 -3
- package/dist/blocks/queue/index.js +149 -7
- package/dist/blocks/quotes/index.d.ts +1 -1
- package/dist/blocks/quotes/index.js +3 -3
- package/dist/blocks/rank/index.d.ts +1 -1
- package/dist/blocks/rank/index.js +2 -2
- package/dist/blocks/reactions/index.d.ts +4 -4
- package/dist/blocks/reactions/index.js +3 -3
- package/dist/blocks/recruiting/index.d.ts +4 -4
- package/dist/blocks/recruiting/index.js +4 -4
- package/dist/blocks/referrals/index.d.ts +1 -1
- package/dist/blocks/referrals/index.js +2 -2
- package/dist/blocks/relations/index.d.ts +1 -1
- package/dist/blocks/relations/index.js +4 -4
- package/dist/blocks/reminders/index.d.ts +1 -1
- package/dist/blocks/reminders/index.js +1 -1
- package/dist/blocks/reviews/index.d.ts +1 -1
- package/dist/blocks/reviews/index.js +2 -2
- package/dist/blocks/rfqs/index.d.ts +2 -2
- package/dist/blocks/rfqs/index.js +3 -3
- package/dist/blocks/risks/index.d.ts +2 -2
- package/dist/blocks/risks/index.js +2 -2
- package/dist/blocks/saas/index.d.ts +12 -12
- package/dist/blocks/saas/index.js +12 -12
- package/dist/blocks/sales/index.d.ts +1 -1
- package/dist/blocks/sales/index.js +1 -1
- package/dist/blocks/saved-views/index.d.ts +2 -2
- package/dist/blocks/saved-views/index.js +2 -2
- package/dist/blocks/scheduling/index.d.ts +4 -4
- package/dist/blocks/scheduling/index.js +4 -4
- package/dist/blocks/scores/index.d.ts +2 -2
- package/dist/blocks/scores/index.js +3 -3
- package/dist/blocks/search/index.d.ts +4 -4
- package/dist/blocks/search/index.js +2 -2
- package/dist/blocks/security-events/index.d.ts +1 -1
- package/dist/blocks/security-events/index.js +2 -2
- package/dist/blocks/segments/index.d.ts +2 -2
- package/dist/blocks/segments/index.js +3 -3
- package/dist/blocks/sequences/index.d.ts +3 -3
- package/dist/blocks/sequences/index.js +3 -3
- package/dist/blocks/service/index.d.ts +7 -7
- package/dist/blocks/service/index.js +7 -7
- package/dist/blocks/service-accounts/index.d.ts +1 -1
- package/dist/blocks/service-accounts/index.js +2 -2
- package/dist/blocks/sessions/index.d.ts +2 -2
- package/dist/blocks/sessions/index.js +2 -2
- package/dist/blocks/settings/index.d.ts +2 -2
- package/dist/blocks/settings/index.js +3 -3
- package/dist/blocks/share-links/index.d.ts +1 -1
- package/dist/blocks/share-links/index.js +1 -1
- package/dist/blocks/shifts/index.d.ts +2 -2
- package/dist/blocks/shifts/index.js +3 -3
- package/dist/blocks/shipments/index.d.ts +2 -2
- package/dist/blocks/shipments/index.js +4 -4
- package/dist/blocks/signatures/index.d.ts +2 -2
- package/dist/blocks/signatures/index.js +2 -2
- package/dist/blocks/signing-keys/index.d.ts +1 -1
- package/dist/blocks/signing-keys/index.js +2 -2
- package/dist/blocks/sla/index.d.ts +1 -1
- package/dist/blocks/sla/index.js +3 -3
- package/dist/blocks/sso/index.d.ts +1 -1
- package/dist/blocks/sso/index.js +2 -2
- package/dist/blocks/state-machine/index.d.ts +1 -1
- package/dist/blocks/state-machine/index.js +1 -1
- package/dist/blocks/subjects/index.d.ts +2 -2
- package/dist/blocks/subjects/index.js +3 -3
- package/dist/blocks/support/index.d.ts +5 -5
- package/dist/blocks/support/index.js +5 -5
- package/dist/blocks/tags/index.d.ts +2 -2
- package/dist/blocks/tags/index.js +1 -1
- package/dist/blocks/tasks/index.d.ts +2 -2
- package/dist/blocks/tasks/index.js +3 -3
- package/dist/blocks/tax/index.d.ts +2 -2
- package/dist/blocks/tax/index.js +3 -3
- package/dist/blocks/teams/index.d.ts +1 -1
- package/dist/blocks/teams/index.js +1 -1
- package/dist/blocks/templates/index.d.ts +3 -3
- package/dist/blocks/templates/index.js +2 -2
- package/dist/blocks/tills/index.d.ts +1 -1
- package/dist/blocks/tills/index.js +3 -3
- package/dist/blocks/time-tracking/index.d.ts +2 -2
- package/dist/blocks/time-tracking/index.js +2 -2
- package/dist/blocks/timeline/index.d.ts +1 -1
- package/dist/blocks/timeline/index.js +2 -2
- package/dist/blocks/trash/index.d.ts +1 -1
- package/dist/blocks/trash/index.js +2 -2
- package/dist/blocks/undo/index.d.ts +2 -2
- package/dist/blocks/undo/index.js +2 -2
- package/dist/blocks/updated-at/index.d.ts +2 -2
- package/dist/blocks/usage/index.d.ts +3 -3
- package/dist/blocks/usage/index.js +15 -3
- package/dist/blocks/vercel-marketplace/index.d.ts +1 -1
- package/dist/blocks/vercel-marketplace/index.js +2 -2
- package/dist/blocks/versions/index.d.ts +1 -1
- package/dist/blocks/versions/index.js +2 -2
- package/dist/blocks/waitlist/index.d.ts +1 -1
- package/dist/blocks/waitlist/index.js +2 -2
- package/dist/blocks/warehouse/index.d.ts +1 -1
- package/dist/blocks/warehouse/index.js +3 -3
- package/dist/blocks/webhooks/index.d.ts +1 -1
- package/dist/blocks/webhooks/index.js +6 -6
- package/dist/blocks/workflow-editor/index.d.ts +7 -7
- package/dist/blocks/workflow-editor/index.js +3 -3
- package/dist/blocks/workflows/index.d.ts +5 -5
- package/dist/blocks/workflows/index.js +51 -12
- package/dist/{blocks-ERs7xZ7E.d.ts → blocks-DbarkJe1.d.ts} +43 -19
- package/dist/{channel-iJrqCvKh.js → channel-HoCqE6Xb.js} +1 -1
- package/dist/chat-sdk/index.d.ts +549 -131
- package/dist/chat-sdk/index.js +881 -245
- package/dist/claims/index.d.ts +3 -3
- package/dist/cli/{account-D7u3LvNN.js → account-CVomaGBV.js} +1 -1
- package/dist/cli/{account-BGMPSKJs.js → account-Co53476L.js} +1 -1
- package/dist/cli/add-CGR3mLgc.js +1 -0
- package/dist/cli/{add-BhQZHdAv.js → add-Cbuj3vBk.js} +2 -2
- package/dist/cli/{add-yTy1CuMe.js → add-ymWkkPNw.js} +13 -13
- package/dist/cli/{app-table-files-CSZU_cFC.js → app-table-files-DoPmytoG.js} +3 -3
- package/dist/cli/{app-tables-CmY2GVb3.js → app-tables-D1rjtFmq.js} +2 -2
- package/dist/cli/{automations-DKKuC8MW.js → automations-DAMWU5je.js} +1 -1
- package/dist/cli/{backfill-BUNIA-Vt.js → backfill-DgHzYvi5.js} +162 -6
- package/dist/cli/bin.js +1 -1
- package/dist/cli/{blocks-BO-v5N1q.js → blocks-CzCYyx9N.js} +2 -2
- package/dist/cli/{blocks-CLaPv7TM.js → blocks-DmIQd43q.js} +1 -1
- package/dist/cli/{cache-VZU4FIOF.js → cache-dmC65uMm.js} +1 -1
- package/dist/cli/{codemod-DgbHI_T7.js → codemod-CzRpopTy.js} +3 -3
- package/dist/cli/{command-bvbsvYpo.js → command-CLlRvLN9.js} +14 -7
- package/dist/cli/{completion-C8zJwfzA.js → completion-4Ta2j6uu.js} +2 -2
- package/dist/cli/{completion-CsGpvIuo.js → completion-BeyJYbyT.js} +2 -2
- package/dist/cli/{completion-GgZmb_t7.js → completion-DwUZqnou.js} +1 -1
- package/dist/cli/{config-C-DXllAX.js → config-DDzGKmmT.js} +32 -1
- package/dist/cli/{config-DyGupd-1.js → config-DPKOp4D5.js} +1 -1
- package/dist/cli/{config-CWQesy6K.js → config-lZB85ksj.js} +1 -1
- package/dist/cli/{content-mapper-5_KpJMOD.js → content-mapper-B6JGZZ-x.js} +2 -2
- package/dist/cli/{db-CVoN3aLl.js → db-XUHrXei6.js} +3 -3
- package/dist/cli/{doctor-BsB5Sg9v.js → doctor-Be-y8dsz.js} +113 -19
- package/dist/cli/{env-Bco8UGR3.js → env-49B92Izr.js} +1 -1
- package/dist/cli/env-BNeYZxBV.js +1 -0
- package/dist/cli/{gen-Dbtv-GLi.js → gen-CMppeGNK.js} +16 -16
- package/dist/cli/index.d.ts +1 -1
- package/dist/cli/index.js +8 -8
- package/dist/cli/{init-DbxcqUL_.js → init-qbw1o0Dd.js} +10 -10
- package/dist/cli/{keys-CRf_wOFs.js → keys-DPHVpbjn.js} +1 -1
- package/dist/cli/{live-B86Xvfaj.js → live-RZhHZRFj.js} +2 -2
- package/dist/cli/{mcp-BjvRPCNn.js → mcp-DudhybBp.js} +3 -3
- package/dist/cli/{metadata-BCKNATUX.js → metadata-O2AJ-PDA.js} +3 -3
- package/dist/cli/{migrate-Ds8H9Vq6.js → migrate-CiGCX8KP.js} +2 -2
- package/dist/cli/{migration-safety-CVtbyZQ4.js → migration-safety-Cn2z7UC-.js} +11 -2
- package/dist/cli/{migrations-Dob5hF6K.js → migrations-6KOIDi_b.js} +2 -2
- package/dist/cli/{module-migration-BSOn1xPx.js → module-migration-XPQbFJib.js} +2 -2
- package/dist/cli/{moved-btVl2MAQ.js → moved-DV_Edueb.js} +1 -1
- package/dist/cli/{parse-ThNFQ1hP.js → parse-CX-x-r5L.js} +1 -1
- package/dist/cli/powersync-BNWYxuB0.js +1 -0
- package/dist/cli/{powersync-aGKsgFN9.js → powersync-CFOmXWSv.js} +4 -4
- package/dist/cli/{print-scQOZbuq.js → print-BgO62egM.js} +2 -2
- package/dist/cli/{providers-Dr7FyvN1.js → providers-Ciss4nHV.js} +1 -1
- package/dist/cli/{prune-workflows-DguQsnDA.js → prune-workflows-eAi-3R9F.js} +4 -4
- package/dist/cli/{remove-BK_muhLi.js → remove-B-vjuw8U.js} +7 -7
- package/dist/cli/{render-D8KGIoSK.js → render-eYxq_mwL.js} +4 -4
- package/dist/cli/{run-1ZTOS-gb.js → run-CLLVkt9B.js} +2 -2
- package/dist/cli/{run-aWo2fn_x.js → run-Cn0Ay_l6.js} +51 -51
- package/dist/cli/{run-BIAan13C.js → run-VHRy6vLi.js} +9 -9
- package/dist/cli/seed-BqsY5MlO.js +1 -0
- package/dist/cli/{seed-C7eiVpBy.js → seed-DNaRUG_M.js} +4 -4
- package/dist/cli/{shared-d7o6xxEZ.js → shared-CL-Gg-tZ.js} +1 -1
- package/dist/cli/{skills-wZ94Fa8G.js → skills-Bfx3HM5e.js} +1 -1
- package/dist/cli/{snapshot-BmBrjk2b.js → snapshot-BDeHrbby.js} +3 -3
- package/dist/cli/{source-CEPki4I3.js → source-BPCSkEGq.js} +1 -1
- package/dist/cli/{source-args-Deg53QHe.js → source-args-DowOyFq5.js} +1 -1
- package/dist/cli/{spec-BKCoD-Ct.js → spec-BN7JlljA.js} +3 -3
- package/dist/cli/{spec-36lt_pPC.js → spec-CEiZkG-g.js} +1 -1
- package/dist/cli/{sql-layout-BevHhOrq.js → sql-layout-oPEsvcMQ.js} +2 -2
- package/dist/cli/{stack-Dr_oEfmw.js → stack-CwBH6-o8.js} +1 -1
- package/dist/cli/{sync-x1M-Ywqf.js → sync-CgpA7QSy.js} +4 -4
- package/dist/cli/{table-DJiZ_PJP.js → table-BEiSh604.js} +1 -1
- package/dist/cli/{upgrade-BUDxM1EG.js → upgrade-CWx1Pdz2.js} +5 -5
- package/dist/cli/{upgrade-Dqze3aEB.js → upgrade-DPDYkDat.js} +3 -3
- package/dist/cli/{version-CvNMxnwv.js → version-XN1WDU-l.js} +1 -1
- package/dist/client/index.d.ts +5 -5
- package/dist/client/native/index.d.ts +4 -4
- package/dist/{codecs-jdyv13IU.js → codecs-BSDJw_Fn.js} +2 -2
- package/dist/commerce/index.js +2 -2
- package/dist/{compose-DUitDAa_.js → compose-Be6lxp05.js} +1 -1
- package/dist/{composite-CQjoTPwv.js → composite-qffn948S.js} +1 -1
- package/dist/config/index.d.ts +5 -5
- package/dist/config/index.js +4 -4
- package/dist/{config-DYtSlwsi.js → config-DVRBLGIK.js} +3 -3
- package/dist/{config-gJ9FX0jc.js → config-DwPO3Dcs.js} +1 -1
- package/dist/{context-BlLvUNCj.d.ts → context-NgBzQFD8.d.ts} +40 -4
- package/dist/contract/index.d.ts +3 -3
- package/dist/{controller-DfgxFNFx.d.ts → controller-XiTA4O2z.d.ts} +1 -1
- package/dist/{conversion-BzVxeYqk.d.ts → conversion-BYSDK6_r.d.ts} +1 -1
- package/dist/create/index.d.ts +4 -4
- package/dist/create/index.js +3 -3
- package/dist/create/lite/index.d.ts +2 -2
- package/dist/create/lite/index.js +3 -3
- package/dist/{create-blocks-DupJA8Lw.js → create-blocks-X59FRi6t.js} +2 -2
- package/dist/credentials/index.js +3 -3
- package/dist/{deal-forecast-CgzuxYtf.js → deal-forecast-DWwQ_ZL6.js} +2 -2
- package/dist/{define-block-DiW9g10_.d.ts → define-block-DLqYhrYF.d.ts} +3 -3
- package/dist/{delivery-events-DUiTctdo.js → delivery-events-BNBvla4y.js} +1 -1
- package/dist/{drive-CvgLTJA9.d.ts → drive-CnOz5P5H.d.ts} +2 -2
- package/dist/e-invoicing/index.js +1 -1
- package/dist/edge/index.js +3 -3
- package/dist/embeddings-CCPghrsU.js +249 -0
- package/dist/{embeddings-Dm-GSHAi.d.ts → embeddings-DoNwEveb.d.ts} +52 -4
- package/dist/{entitlements-5nbdIitJ.d.ts → entitlements-7iVfWIy8.d.ts} +1 -1
- package/dist/{entitlements-BxZpcgcb.js → entitlements-CE-fFbUR.js} +2 -2
- package/dist/{errors-DCJMVeY7.js → errors-B3EJToP_.js} +72 -19
- package/dist/eve/index.d.ts +4 -4
- package/dist/eve/index.js +2 -2
- package/dist/{eve-DRYPT58Y.d.ts → eve-UQ0RZX-K.d.ts} +2 -2
- package/dist/{executor-COn2O4fg.d.ts → executor-mRSXEFIB.d.ts} +1 -1
- package/dist/expo/index.js +2 -2
- package/dist/{extract-DpiLKlbp.d.ts → extract-4SajsgPj.d.ts} +2 -2
- package/dist/fhir/index.js +1 -1
- package/dist/{field-errors-BCX7RCEc.d.ts → field-errors-B6sHzfiG.d.ts} +5 -5
- package/dist/{flags-oS3Mbyfc.js → flags-CtmDvszx.js} +1 -1
- package/dist/flags-sdk/index.js +5 -3
- package/dist/{framework-D8eW-nTX.js → framework-CD0tHWLN.js} +1 -1
- package/dist/{gateway-DjJYyq6h.d.ts → gateway-BsE1qacd.d.ts} +2 -2
- package/dist/{history-6KiVNWdH.js → history-CoX8QoXr.js} +21 -6
- package/dist/hono/index.js +2 -2
- package/dist/{inbox-BnELyPRZ.d.ts → inbox-i3nEfNHG.d.ts} +21 -1
- package/dist/{index-B8Mjb-KA.d.ts → index---6uF_J0.d.ts} +1 -1
- package/dist/{index-CFT7e_HH.d.ts → index-7-mAsoAB.d.ts} +2 -2
- package/dist/{index-CakXRuAZ.d.ts → index-B2HOIiNe.d.ts} +2 -2
- package/dist/{index-DMlTXcWp.d.ts → index-B9sdIEmz.d.ts} +2 -2
- package/dist/{index-ZI4sMVPT.d.ts → index-BEyOO6xN.d.ts} +2 -2
- package/dist/{index-BB5n8R_s.d.ts → index-BHlGYVat.d.ts} +1 -1
- package/dist/{index-D48wVmDj.d.ts → index-BUGFN7Lu.d.ts} +1 -1
- package/dist/{index-DHwPGqLY.d.ts → index-BaI1DFjU.d.ts} +2 -2
- package/dist/{index-BMYIwvDA.d.ts → index-BjMlZ2la.d.ts} +1 -1
- package/dist/{index-DxmiTJJ5.d.ts → index-BpW3Kn-H.d.ts} +2 -2
- package/dist/{index-CurH6bgW.d.ts → index-C35Mxkfj.d.ts} +1 -1
- package/dist/{index-Bn5v6soX.d.ts → index-CA5xzl6j.d.ts} +1 -1
- package/dist/{index-D5LnplxJ.d.ts → index-CBTA4Hus.d.ts} +6 -6
- package/dist/{index-CdtD8fqI.d.ts → index-CFfFev2y.d.ts} +45 -5
- package/dist/{index-BolFrOMw.d.ts → index-CaUkbhw7.d.ts} +2 -2
- package/dist/{index-BGgGwWcn.d.ts → index-Cfft6iUs.d.ts} +1 -1
- package/dist/{index-BW0aDURc.d.ts → index-CsngKWje.d.ts} +1 -1
- package/dist/{index-BNBFiyOR.d.ts → index-D89tUktw.d.ts} +1 -1
- package/dist/{index-BK8zPigx.d.ts → index-DDIZwUK-.d.ts} +1 -1
- package/dist/{index-BZ1Akcrg.d.ts → index-D_JS5FYo.d.ts} +1 -1
- package/dist/{index-BLL45v55.d.ts → index-Dh-CE1YF.d.ts} +1 -1
- package/dist/{index-DkWXofPH.d.ts → index-Dk039ZLg.d.ts} +1 -1
- package/dist/{index-DZTavebO.d.ts → index-Do2iK7pF.d.ts} +1 -1
- package/dist/{index-IKK8zWTN.d.ts → index-DpQ1JuKa.d.ts} +2 -2
- package/dist/{index-S6axmDQL.d.ts → index-Drjrj8Y5.d.ts} +2 -2
- package/dist/{index-7UV0pNYj.d.ts → index-Dvu6MySL.d.ts} +2 -2
- package/dist/{index-B2C1NczA.d.ts → index-LnDm58TV.d.ts} +4 -4
- package/dist/{index-D25Ry5R9.d.ts → index-P5Xhtrzo.d.ts} +1 -1
- package/dist/{index-CRSNN2v9.d.ts → index-PV91A2_J.d.ts} +8 -8
- package/dist/{index-B1NcZsVD.d.ts → index-VaTlShTa.d.ts} +7 -7
- package/dist/{index-iaMOudmP.d.ts → index-aNW_fYBI.d.ts} +1 -1
- package/dist/{index-Bdg6ee4m.d.ts → index-b5FUPI-5.d.ts} +1 -1
- package/dist/{index-1001GtVL.d.ts → index-hkFhFgRv.d.ts} +1 -1
- package/dist/{index-kidoYhB8.d.ts → index-jaxdP0Qe.d.ts} +1 -1
- package/dist/index-nFxtUFQv.d.ts +11 -0
- package/dist/{index-Bopuqb8z.d.ts → index-oR-iOHLT.d.ts} +4 -4
- package/dist/{index-DplKvjCs.d.ts → index-qPP3ja-K.d.ts} +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1 -1
- package/dist/{instances-ukDFg8oN.js → instances-CAzvtvlH.js} +119 -8
- package/dist/json-render/index.d.ts +91 -0
- package/dist/json-render/index.js +233 -0
- package/dist/{knowledge-DL1ZnEe7.d.ts → knowledge-CjrMiSnp.d.ts} +59 -9
- package/dist/{knowledge-CQl9LXaZ.js → knowledge-m3IJobAw.js} +22 -10
- package/dist/{manifest-DKY9HGin.js → manifest-12CvUHma.js} +3 -3
- package/dist/{manifest-DI_Vz152.d.ts → manifest-1CNHDf-P.d.ts} +2 -2
- package/dist/{manifest-D8JpSvuE.js → manifest-1X1rpQ-5.js} +3 -3
- package/dist/{manifest-BSQh5dw2.js → manifest-1qVuPpg1.js} +2 -2
- package/dist/{manifest-Cxz4_mWy.d.ts → manifest-279mgqK2.d.ts} +1 -1
- package/dist/{manifest-Cu_4X5Rm.js → manifest-3mRZEFbA.js} +2 -2
- package/dist/{manifest-ppItbSA5.d.ts → manifest-4-J2cBhl.d.ts} +1 -1
- package/dist/{manifest-BhBqFYV4.d.ts → manifest-4Ei8W6XJ.d.ts} +1 -1
- package/dist/{manifest-BEZ8HltH.js → manifest-638tYNw7.js} +2 -2
- package/dist/{manifest-BXNDl7bx.js → manifest-AFBjJxrJ.js} +2 -2
- package/dist/{manifest-B_3_99xa.js → manifest-AI6u-id7.js} +3 -3
- package/dist/{manifest-C95-cClh.js → manifest-B1Xj7ObD.js} +1 -1
- package/dist/{manifest-_qzN4kUG.js → manifest-B2G5B8ty.js} +2 -2
- package/dist/{manifest-CPYEEX6u.js → manifest-B3Fs0ZeU.js} +8 -3
- package/dist/{manifest-DJRHzb6v.js → manifest-B5c8gqof.js} +2 -2
- package/dist/{manifest-Dagm1cVO.d.ts → manifest-BAEYvNSN.d.ts} +1 -1
- package/dist/{manifest-CJByGKJ_.d.ts → manifest-BBCFaNss.d.ts} +1 -1
- package/dist/{manifest-CRXxYu5L.js → manifest-BEyhZ8sV.js} +3 -3
- package/dist/{manifest-ycsWja2O.d.ts → manifest-BFXftMd7.d.ts} +1 -1
- package/dist/{manifest--eIzr9Tj.js → manifest-BFbZ2mZA.js} +2 -2
- package/dist/{manifest-C0f5YJ7x.d.ts → manifest-BFi8-A1w.d.ts} +1 -1
- package/dist/{manifest-DeCjklgV.js → manifest-BHaR8iYx.js} +2 -2
- package/dist/{manifest-BKD8DbQT.js → manifest-BI65KPyR.js} +4 -4
- package/dist/{manifest-DHYr9yD1.js → manifest-BIOzNAsT.js} +2 -2
- package/dist/{manifest-CKxnGCVY.d.ts → manifest-BJ7XyLlV.d.ts} +1 -1
- package/dist/{manifest-DM2T_dN2.js → manifest-BKvawy3P.js} +3 -3
- package/dist/{manifest-C-_0WkGx.d.ts → manifest-BNR_72jF.d.ts} +4 -3
- package/dist/{manifest-BcdRITPc.d.ts → manifest-BOQOTepZ.d.ts} +1 -1
- package/dist/{manifest-DqwQmPZb.js → manifest-BP7YQERu.js} +3 -3
- package/dist/{manifest-C_hIU5kk.js → manifest-BPeoWfAO.js} +3 -3
- package/dist/{manifest-DHt1h5GN.js → manifest-BPpt2s0a.js} +3 -3
- package/dist/{manifest-6MuVEQnP.js → manifest-BQobHp4x.js} +5 -5
- package/dist/{manifest-BgMjraZw.js → manifest-BRgWZzVn.js} +3 -3
- package/dist/{manifest-CCXaDWdN.d.ts → manifest-BS1QA4mT.d.ts} +1 -1
- package/dist/{manifest-JvgqqKRq.js → manifest-BW6RRJXm.js} +2 -2
- package/dist/{manifest-K_42e50M.d.ts → manifest-BWIcNHVs.d.ts} +1 -1
- package/dist/{manifest-Hx3FBHKX.js → manifest-BXIL-A7I.js} +1 -1
- package/dist/{manifest-C3VB7-hM.d.ts → manifest-BaQ-A5Jy.d.ts} +2 -2
- package/dist/{manifest-D3HTgmR3.d.ts → manifest-BaR4cYwY.d.ts} +1 -1
- package/dist/{manifest-DjVqN_iK.d.ts → manifest-Bc1-GptG.d.ts} +1 -1
- package/dist/{manifest-C8Boo7Ps.js → manifest-Bea2AWYl.js} +4 -4
- package/dist/{manifest-1Xiu6zqs.js → manifest-BgKbxGVp.js} +2 -2
- package/dist/{manifest-Dbq6t-bI.d.ts → manifest-BhhX6xjo.d.ts} +1 -1
- package/dist/{manifest-Dm_5DTyx.js → manifest-BhpXYw_3.js} +2 -2
- package/dist/{manifest-BHNrIQ8X.d.ts → manifest-BieAORBI.d.ts} +1 -1
- package/dist/{manifest-D2qeEjrC.d.ts → manifest-Bk69YFI3.d.ts} +1 -1
- package/dist/{manifest-gCNbUW-X.js → manifest-BnJ_9tgk.js} +2 -2
- package/dist/{manifest-1lzhOO0z.d.ts → manifest-BqCQrbSP.d.ts} +2 -2
- package/dist/{manifest-DnZw4JWP.js → manifest-Brv_Pss2.js} +2 -2
- package/dist/{manifest-D7y9_k5i.d.ts → manifest-BuEIqayB.d.ts} +1 -1
- package/dist/{manifest-OS0pwPRn.d.ts → manifest-BxRL6XuJ.d.ts} +1 -1
- package/dist/{manifest-qb_YXiWK.js → manifest-BydKYd32.js} +2 -2
- package/dist/{manifest-FkY_rpfH.js → manifest-C-ROCYHF.js} +5 -5
- package/dist/{manifest-BfAXsd-X.d.ts → manifest-C1JGYvR-.d.ts} +1 -1
- package/dist/{manifest-gGOpzRmJ.d.ts → manifest-C3d7DJiE.d.ts} +1 -1
- package/dist/{manifest-D84UV5p6.js → manifest-C5NzuW_p.js} +2 -2
- package/dist/{manifest-A_VPz6fq.js → manifest-C75gu7oi.js} +2 -2
- package/dist/{manifest-BdmDmQtx.js → manifest-CBj4zlpo.js} +4 -4
- package/dist/{manifest-BKDSuS3x.d.ts → manifest-CFb---rO.d.ts} +2 -2
- package/dist/{manifest-BHhBqtFw.js → manifest-CFq6WJJO.js} +4 -4
- package/dist/{manifest-Bbtt8mb1.d.ts → manifest-CGJ2xLRu.d.ts} +1 -1
- package/dist/{manifest-DpwaOTir.js → manifest-CHheBZjl.js} +3 -3
- package/dist/{manifest-B83YpMlz.d.ts → manifest-CJzK3H3h.d.ts} +1 -1
- package/dist/{manifest-ClbUuESE.js → manifest-CKT1bZoZ.js} +2 -2
- package/dist/{manifest-Cj5IjsCB.js → manifest-CLFmOMSQ.js} +2 -2
- package/dist/{manifest-B9KmOzmT.d.ts → manifest-CMmfdgAG.d.ts} +1 -1
- package/dist/{manifest-Bx_0qkBP.js → manifest-COnvr04R.js} +2 -2
- package/dist/{manifest-mu_UflgB.d.ts → manifest-CR_RHsHu.d.ts} +1 -1
- package/dist/{manifest-BTC6dWdq.d.ts → manifest-CSLqw5qE.d.ts} +1 -1
- package/dist/{manifest-BDGVge5o.js → manifest-CWkdEugm.js} +2 -2
- package/dist/{manifest-DS2PjAgW.js → manifest-CXTVwg4s.js} +3 -3
- package/dist/{manifest-CX8DVTzn.js → manifest-CY-bInzt.js} +3 -3
- package/dist/{manifest-BZP0wKpE.js → manifest-CaZnTLGe.js} +3 -3
- package/dist/{manifest-B4CVN-Kx.js → manifest-CbdezcLS.js} +2 -2
- package/dist/{manifest-B3QwQDTx.js → manifest-Ccjdt-zG.js} +3 -3
- package/dist/{manifest-BW7wdKXA.js → manifest-CdDdPHbV.js} +4 -4
- package/dist/{manifest-cqfeLW8g.js → manifest-CeN-ohYP.js} +2 -2
- package/dist/{manifest-B7MpuCmz.d.ts → manifest-Cge4urPD.d.ts} +1 -1
- package/dist/{manifest-DsYIWD--.js → manifest-CiAp3lJg.js} +2 -2
- package/dist/{manifest-BFJvys4-.js → manifest-CmtXDmOP.js} +3 -3
- package/dist/{manifest-CJb0PtMj.d.ts → manifest-Cq3zIydP.d.ts} +1 -1
- package/dist/{manifest-DLv_WaSF.d.ts → manifest-Cs5-Vi9X.d.ts} +1 -1
- package/dist/{manifest-DwVl4YC4.d.ts → manifest-CsVTMa-G.d.ts} +1 -1
- package/dist/{manifest-DBsPHetA.js → manifest-Ct3CZB2E.js} +2 -2
- package/dist/{manifest--M7GmEPg.d.ts → manifest-CyKD7Hyx.d.ts} +1 -1
- package/dist/{manifest-DNaSpmZ3.js → manifest-Cytb-iJk.js} +2 -2
- package/dist/{manifest-Cj_ZnW6k.js → manifest-D-sJpAJB.js} +3 -3
- package/dist/{manifest-Bpzxyvxc.js → manifest-D0ceE9Zm.js} +3 -3
- package/dist/{manifest-CIJTIKo3.d.ts → manifest-D1FhVaUw.d.ts} +1 -1
- package/dist/{manifest-CLphqjtj.d.ts → manifest-D2URJ82u.d.ts} +1 -1
- package/dist/{manifest-Czv_oJ77.js → manifest-D2r45JYc.js} +2 -2
- package/dist/{manifest-DBJ5nBG9.d.ts → manifest-D3V8Ngw3.d.ts} +1 -1
- package/dist/{manifest-B709eXLx.js → manifest-D5UYH-l1.js} +2 -2
- package/dist/{manifest-DVnOUxy4.js → manifest-D5gmrL5j.js} +6 -6
- package/dist/{manifest-BQwqV6dQ.js → manifest-D6k-MFrE.js} +4 -4
- package/dist/{manifest-BoSzgLUl.js → manifest-D72opuEP.js} +3 -3
- package/dist/{manifest-DJ5nCW5K.js → manifest-D8ljY6Fz.js} +4 -4
- package/dist/{manifest-DemyeI_z.js → manifest-D96KwsqD.js} +4 -4
- package/dist/{manifest-Bz3xNPJL.d.ts → manifest-D9B8QIWz.d.ts} +1 -1
- package/dist/{manifest-BkS073Py.d.ts → manifest-DA0Q62es.d.ts} +1 -1
- package/dist/{manifest-CYNC6a1d.js → manifest-DAu2qpOy.js} +2 -2
- package/dist/{manifest-0vrTq9Uf.d.ts → manifest-DB6dSXpw.d.ts} +1 -1
- package/dist/{manifest-Db-GUsLH.d.ts → manifest-DKY1mHtE.d.ts} +1 -1
- package/dist/{manifest-CQFlAwfU.d.ts → manifest-DOIRQHB8.d.ts} +2 -2
- package/dist/{manifest-0PDfKdtc.js → manifest-DR8po1OZ.js} +4 -4
- package/dist/{manifest-ITF-BpEi.js → manifest-D_RCNlv9.js} +4 -4
- package/dist/{manifest-CR-6QDLZ.d.ts → manifest-D_gWI_Xp.d.ts} +1 -1
- package/dist/{manifest-BR_uGpTd.js → manifest-DaZ7LEOi.js} +2 -2
- package/dist/{manifest-Dz2IkqqY.d.ts → manifest-DfaKFvmO.d.ts} +1 -1
- package/dist/{manifest-DPFn2x18.d.ts → manifest-Dg4rFnjr.d.ts} +1 -1
- package/dist/{manifest-n9XQtQXA.d.ts → manifest-DhYiWMYQ.d.ts} +1 -1
- package/dist/{manifest-BfOHwSNK.js → manifest-DjIq3ZJf.js} +7 -7
- package/dist/{manifest-D7yeYU0f.d.ts → manifest-DnSrbZuv.d.ts} +1 -1
- package/dist/{manifest-D7slgR5H.d.ts → manifest-Do4TvdNR.d.ts} +1 -1
- package/dist/{manifest-DdFl3BYM.d.ts → manifest-Do7f1k9C.d.ts} +1 -1
- package/dist/{manifest--qnXa2lK.js → manifest-Dr-wuvfR.js} +4 -4
- package/dist/{manifest-yPcrAK5N.d.ts → manifest-Dr5yltSj.d.ts} +10 -3
- package/dist/{manifest-CbxMRPGY.js → manifest-DunhKI5K.js} +4 -4
- package/dist/{manifest-C3RDEoAr.d.ts → manifest-Duq5aCrY.d.ts} +1 -1
- package/dist/{manifest-J6kJX8YL.js → manifest-DuwJ7Ya_.js} +3 -3
- package/dist/{manifest-FJi1pYoB.js → manifest-Dxob7J6V.js} +6 -6
- package/dist/{manifest-Dj9AIgTy.d.ts → manifest-DzNmDhoS.d.ts} +1 -1
- package/dist/{manifest-CHsjS47_.d.ts → manifest-FqJtbN5n.d.ts} +1 -1
- package/dist/{manifest-roKO06Ko.d.ts → manifest-I7nR1vhO.d.ts} +1 -1
- package/dist/{manifest-o-EzlFwZ.js → manifest-N-vJi36T.js} +2 -2
- package/dist/{manifest-FAVN8Bg9.js → manifest-UHMLAfCl.js} +2 -2
- package/dist/{manifest-BKegpJgn.d.ts → manifest-VoN5Ae-i.d.ts} +1 -1
- package/dist/{manifest-DDkncgRB.d.ts → manifest-XRDA_p9P.d.ts} +1 -1
- package/dist/{manifest-Di0UrbTw.d.ts → manifest-ZQvywRBI.d.ts} +1 -1
- package/dist/{manifest-COZUTRxz.js → manifest-aWO0h4lZ.js} +3 -3
- package/dist/{manifest-D7R4sM8L.d.ts → manifest-hpPeciuH.d.ts} +1 -1
- package/dist/{manifest-CkYNs6PX.js → manifest-iNt_0t6h.js} +4 -4
- package/dist/{manifest-BAgqRR7p.js → manifest-j5YiEWqV.js} +2 -2
- package/dist/{manifest-D_iJU__f.d.ts → manifest-jRpt7muB.d.ts} +1 -1
- package/dist/{manifest-xD290bNh.js → manifest-jU8fwfLu.js} +3 -3
- package/dist/{manifest-DCC3phPq.js → manifest-nR_d-Ivi.js} +1 -1
- package/dist/{manifest-BRd1q660.d.ts → manifest-nyksTa_6.d.ts} +1 -1
- package/dist/{manifest-CWaCXYgf.js → manifest-p4Yvamix.js} +2 -2
- package/dist/{manifest-BQJV63RV.js → manifest-pKQ4z-dv.js} +1 -1
- package/dist/{manifest-DbjDYuCE.js → manifest-q62slcP6.js} +2 -2
- package/dist/{manifest-UbBXSkXn.d.ts → manifest-uDAAzAlQ.d.ts} +1 -1
- package/dist/{manifest-CtOwRTvP.js → manifest-upxzRaY-.js} +2 -2
- package/dist/{manifest-DW2_P6AT.js → manifest-vaCUz3Wa.js} +3 -3
- package/dist/{manifest-Dqgqm1Zo.js → manifest-vabt4x2a.js} +3 -3
- package/dist/{manifest-Cfvr-BhF.js → manifest-wSbIcOln.js} +19 -7
- package/dist/mapper/bin.js +7 -7
- package/dist/mcp/index.d.ts +1 -1
- package/dist/mcp/index.js +1 -1
- package/dist/mcp/sdk/index.js +1 -1
- package/dist/{mcp-Bx9wzQw6.js → mcp-D1d_uDNE.js} +2 -2
- package/dist/{message-Cc4bkdNw.d.ts → message-Chvocrom.d.ts} +27 -4
- package/dist/{model-messages-OmbNNuN2.js → model-messages-BgSCTojd.js} +1 -1
- package/dist/{model-messages-CGSUU450.d.ts → model-messages-CK7L1_hV.d.ts} +1 -1
- package/dist/{money-codec-CvUy3_Ep.js → money-codec-lrXaOqi7.js} +1 -1
- package/dist/next/index.d.ts +7 -7
- package/dist/next/index.js +5 -5
- package/dist/{operations-Di203azT.d.ts → operations-BSsNQ81h.d.ts} +1 -1
- package/dist/{options-CyYZvdSy.js → options-BNtLQZrG.js} +2 -1
- package/dist/{options-SOjQVgfS.js → options-BYlcrVVf.js} +1 -0
- package/dist/options-BxOFSs-u.js +4 -0
- package/dist/orpc/index.d.ts +1 -1
- package/dist/orpc/index.js +1 -1
- package/dist/otel/index.d.ts +1 -1
- package/dist/otel/index.js +5 -5
- package/dist/{parse-H3g3kyZa.js → parse-Iz0DTVot.js} +2 -2
- package/dist/{payments-D89SVEgj.js → payments-DjrRAHBY.js} +1 -1
- package/dist/{permissions-C7GgjgTA.d.ts → permissions-CrPkD5Ik.d.ts} +1 -1
- package/dist/{ports-6EMtxwGE.d.ts → ports-Z6S_jGD7.d.ts} +1 -1
- package/dist/powersync/index.d.ts +3 -3
- package/dist/preset/index.d.ts +4 -4
- package/dist/preset/index.js +3 -3
- package/dist/{preset-Be8m6-PH.js → preset-D2dg-EVp.js} +3 -2
- package/dist/{preview-DCndUjk9.js → preview-B7OjoABd.js} +3 -3
- package/dist/{preview-Dlc_7tMK.d.ts → preview-Bgwwuvc9.d.ts} +2 -2
- package/dist/{project-C71Z2pg2.js → project-Dhm0C7OR.js} +5 -5
- package/dist/{provider-DRGTjcBY.js → provider-Bkh8zSHN.js} +1 -1
- package/dist/{push-token-CQnqTZrb.d.ts → push-token-hDDp188w.d.ts} +1 -1
- package/dist/query/index.d.ts +1 -1
- package/dist/rate-limit/index.d.ts +1 -1
- package/dist/rate-limit/index.js +1 -1
- package/dist/{rate-limit-Bl_jNyAg.d.ts → rate-limit-A_ngDsV_.d.ts} +17 -0
- package/dist/{rate-limit-Df913_w3.js → rate-limit-Jl-5e7s8.js} +30 -10
- package/dist/react/index.d.ts +5 -5
- package/dist/react/index.js +1 -1
- package/dist/react/native/index.d.ts +1 -1
- package/dist/react/server.d.ts +5 -5
- package/dist/react/server.js +1 -1
- package/dist/{react-CsgcTKRk.js → react-DIfKgdfV.js} +2 -2
- package/dist/{react-CqOVutZj.js → react-DnOu9xsi.js} +3 -3
- package/dist/react-router/index.js +2 -2
- package/dist/realtime/index.d.ts +3 -3
- package/dist/realtime/index.js +2 -2
- package/dist/{record-form-DqGcUu0C.d.ts → record-form-Bye6v7Sg.d.ts} +1 -1
- package/dist/{recordings-CiYHdFPa.d.ts → recordings-16Flkx9W.d.ts} +1 -1
- package/dist/records/index.d.ts +7 -7
- package/dist/{route-optimizer-DqUyDP78.js → route-optimizer-Ds11cQyM.js} +1 -1
- package/dist/{rows-Ccg381fF.js → rows-DidUYmOx.js} +1 -1
- package/dist/{rows-CTzeKlaI.js → rows-kSV-CDYA.js} +2 -2
- package/dist/runs-CEm5AFQk.js +91 -0
- package/dist/{sales-C8o3E5U3.js → sales-DNuk5v36.js} +7 -7
- package/dist/{sales-lines-COFwijz1.js → sales-lines-mwRnIC9p.js} +3 -3
- package/dist/{sales-shared-DGSptcqA.js → sales-shared-Ca2ZDF6a.js} +1 -1
- package/dist/{sales-variants-D0oxdF-6.js → sales-variants-QTgChYXJ.js} +1 -1
- package/dist/{scores-CQt_G6T-.js → scores-Opsegupn.js} +2 -2
- package/dist/server/index.d.ts +3 -3
- package/dist/server/index.js +4 -4
- package/dist/{settings-B4NApcY7.js → settings-Bf5nmbl-.js} +2 -2
- package/dist/{sign-in-Dd5ljzNG.js → sign-in-BYJboUBW.js} +1 -1
- package/dist/{signing-keys-B2bpJ3eJ.js → signing-keys-sYy92dAx.js} +2 -2
- package/dist/solid/index.d.ts +5 -5
- package/dist/solid-start/index.js +2 -2
- package/dist/spec/index.d.ts +2 -2
- package/dist/spec/index.js +2 -2
- package/dist/{spec-pins-D2Q41RiK.d.ts → spec-pins-Bb6V8nR2.d.ts} +1 -1
- package/dist/{spec-pins-BtVFN8wA.js → spec-pins-Dlz8OVqi.js} +1 -1
- package/dist/sql/index.d.ts +6 -6
- package/dist/sql/index.js +3 -3
- package/dist/{sql-DPDvUadH.js → sql-DrlapNYO.js} +3009 -729
- package/dist/{sso-gMj8CIpe.js → sso-RsAYRs9q.js} +2 -2
- package/dist/ssr/index.d.ts +1 -1
- package/dist/{store-DHoKrWYZ.d.ts → store-CGXNwUwi.d.ts} +6 -1
- package/dist/streams/index.d.ts +59 -2
- package/dist/streams/index.js +111 -22
- package/dist/streams/redis/index.d.ts +8 -1
- package/dist/streams/redis/index.js +12 -4
- package/dist/streams/resumable/index.d.ts +68 -0
- package/dist/streams/resumable/index.js +71 -0
- package/dist/{subject-readers-B5YcD7CO.js → subject-readers-DhXR7Tdk.js} +1 -1
- package/dist/svelte/index.d.ts +5 -5
- package/dist/sveltekit/index.js +2 -2
- package/dist/tanstack-start/index.js +2 -2
- package/dist/{tax-D_M90sFh.js → tax-Deg3udmG.js} +1 -1
- package/dist/{tee-eneLXtYJ.js → tee-CHLXLuvg.js} +2 -1
- package/dist/{tenant-DHLx2ZkL.d.ts → tenant-DYOUVE8r.d.ts} +1 -1
- package/dist/testing/index.d.ts +13 -12
- package/dist/testing/index.js +60 -15
- package/dist/{timeline-9mP3m30L.d.ts → timeline-DTE4-6Hq.d.ts} +2 -2
- package/dist/{topic-DVr01uhB.js → topic-CLEQ3t6o.js} +25 -2
- package/dist/{topic-BKsRT4gu.d.ts → topic-DrN4Af8U.d.ts} +16 -1
- package/dist/{transport-CS4cVH4S.js → transport-CZBRg-9e.js} +7 -3
- package/dist/{types-Y1Oa950J.d.ts → types-BKtpHTHc.d.ts} +8 -0
- package/dist/{types-B2y4HmKY.d.ts → types-C941lZYk.d.ts} +1 -1
- package/dist/{types-Dp1r6bih.d.ts → types-DTNDqdyT.d.ts} +2 -2
- package/dist/{types-zYtQ5JDy.d.ts → types-D_o60OcA.d.ts} +1 -1
- package/dist/{types-DlG6Uj4P.d.ts → types-DeKSApwU.d.ts} +2 -2
- package/dist/{undo-DNRfstwk.js → undo-BXeYO6gy.js} +2 -2
- package/dist/{usage-CFVOHbUu.d.ts → usage-D7CYIk1m.d.ts} +22 -0
- package/dist/vue/index.d.ts +5 -5
- package/dist/{watch-topic-M1yL9NiW.d.ts → watch-topic-ClQWiVZ1.d.ts} +1 -1
- package/dist/{webhook-inbox-BamK2_Vw.js → webhook-inbox-B36XJ2eY.js} +25 -2
- package/dist/webmcp/index.d.ts +1 -1
- package/dist/webmcp/index.js +1 -1
- package/dist/workflow-sdk/builder/index.d.ts +3 -3
- package/dist/workflow-sdk/builder/index.js +1 -1
- package/dist/workflow-sdk/index.d.ts +7 -3
- package/dist/workflow-sdk/index.js +16 -74
- package/dist/workflow-sdk/world/index.d.ts +48 -3
- package/dist/workflow-sdk/world/index.js +326 -31
- package/dist/{workflow-sdk-BCNusk7Y.d.ts → workflow-sdk-Bdp_VQ3Q.d.ts} +37 -3
- package/dist/{workflow-sdk-cHlpMyLV.js → workflow-sdk-ID8eoPMe.js} +108 -7
- package/dist/{workflow-sdk-CcoFSLFn.js → workflow-sdk-j7xorOLf.js} +230 -60
- package/dist/{workflows-DjVrHu22.d.ts → workflows-C6fR7YGm.d.ts} +56 -15
- package/dist/yjs/index.d.ts +1 -1
- package/dist/yjs/index.js +1 -1
- package/package.json +41 -11
- package/schemas/ai-message-v2.json +290 -0
- package/schemas/config-v1.json +29 -1
- package/schemas/design-v1.json +45 -0
- package/schemas/doctor-report-v1.json +4 -0
- package/skills/better-supabase/references/ui-recipes.md +77 -0
- package/skills/better-supabase-api/SKILL.md +2 -2
- package/skills/better-supabase-api/references/ai.md +56 -0
- package/skills/better-supabase-api/references/streams-credentials.md +5 -0
- package/dist/cli/add-C8CZuuRW.js +0 -1
- package/dist/cli/env-C9HRYvnX.js +0 -1
- package/dist/cli/powersync-6wkF5mUR.js +0 -1
- package/dist/cli/seed-Ki7TgmY1.js +0 -1
- package/dist/embeddings-bZWDJ5yx.js +0 -129
|
@@ -968,12 +968,14 @@ const PRESET_CATALOG = {
|
|
|
968
968
|
"ai-keys",
|
|
969
969
|
"approvals",
|
|
970
970
|
"data-lifecycle",
|
|
971
|
+
"teams",
|
|
971
972
|
"usage",
|
|
972
973
|
"share-links"
|
|
973
974
|
],
|
|
974
975
|
"manifest": "ai-chat",
|
|
975
976
|
"scopes": ["tenant"],
|
|
976
977
|
"contributes": ["share-links", "approvals"],
|
|
978
|
+
"tenantNameClashes": ["team"],
|
|
977
979
|
"extraColumns": "chats",
|
|
978
980
|
"entities": {
|
|
979
981
|
"specs": {
|
|
@@ -999,6 +1001,7 @@ const PRESET_CATALOG = {
|
|
|
999
1001
|
"title": "title",
|
|
1000
1002
|
"model": "model",
|
|
1001
1003
|
"visibility": "visibility",
|
|
1004
|
+
"mode": "mode",
|
|
1002
1005
|
"pinned": "pinned",
|
|
1003
1006
|
"archivedAt": "archived_at",
|
|
1004
1007
|
"temporary": "is_temporary",
|
|
@@ -11674,6 +11677,8 @@ const PRESET_CATALOG = {
|
|
|
11674
11677
|
},
|
|
11675
11678
|
{ "name": "AgentsEvents" },
|
|
11676
11679
|
{ "name": "AgentSkill" },
|
|
11680
|
+
{ "name": "AgentSkillFile" },
|
|
11681
|
+
{ "name": "AgentSkillProviderRef" },
|
|
11677
11682
|
{ "name": "AgentsOptions" },
|
|
11678
11683
|
{ "name": "AgentVisibility" },
|
|
11679
11684
|
{ "name": "NewAgent" }
|
|
@@ -11718,11 +11723,16 @@ const PRESET_CATALOG = {
|
|
|
11718
11723
|
},
|
|
11719
11724
|
{ "name": "AiChatEvents" },
|
|
11720
11725
|
{ "name": "AiChatInput" },
|
|
11726
|
+
{ "name": "AiChatLink" },
|
|
11721
11727
|
{ "name": "AiChatOptions" },
|
|
11722
11728
|
{
|
|
11723
11729
|
"name": "AiChatPage",
|
|
11724
11730
|
"fields": true
|
|
11725
11731
|
},
|
|
11732
|
+
{ "name": "AiChatParticipant" },
|
|
11733
|
+
{ "name": "AiChatParticipantKind" },
|
|
11734
|
+
{ "name": "AiChatParticipantRole" },
|
|
11735
|
+
{ "name": "AiChatParty" },
|
|
11726
11736
|
{ "name": "AiChatPatch" },
|
|
11727
11737
|
{ "name": "AiChatQuery" },
|
|
11728
11738
|
{ "name": "AiChatRecord" },
|
|
@@ -11730,6 +11740,7 @@ const PRESET_CATALOG = {
|
|
|
11730
11740
|
{ "name": "AiChatsController" },
|
|
11731
11741
|
{ "name": "AiChatsControllerOptions" },
|
|
11732
11742
|
{ "name": "AiChatShare" },
|
|
11743
|
+
{ "name": "AiChatShareSummary" },
|
|
11733
11744
|
{ "name": "AiChatsSnapshot" },
|
|
11734
11745
|
{ "name": "AiChatTreeActions" },
|
|
11735
11746
|
{ "name": "AiChatTreeController" },
|
|
@@ -28136,6 +28147,49 @@ function checkColumnAccess(tables) {
|
|
|
28136
28147
|
}
|
|
28137
28148
|
}
|
|
28138
28149
|
}
|
|
28150
|
+
// src/config/app-column-groups.ts
|
|
28151
|
+
const GROUP_NAME = /^[a-z][a-z0-9_]{0,62}$/u;
|
|
28152
|
+
const PERMISSION_KEY = /^[a-z][a-z0-9_:.-]{0,127}$/iu;
|
|
28153
|
+
const MAX_GROUPS = 20;
|
|
28154
|
+
function isObject$3(value) {
|
|
28155
|
+
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
28156
|
+
}
|
|
28157
|
+
/**
|
|
28158
|
+
* `tables.<t>.columnGroups` checked (ADR 0216): each group lists own columns
|
|
28159
|
+
* (never the id, the scope column or a timestamp) and one permission key that
|
|
28160
|
+
* may change them. A column belongs to one group at most, so a changed column
|
|
28161
|
+
* asks for one permission.
|
|
28162
|
+
*/
|
|
28163
|
+
function columnGroupsOf(where, value, columns) {
|
|
28164
|
+
if (value === void 0) return;
|
|
28165
|
+
const at = `${where}.columnGroups`;
|
|
28166
|
+
if (!isObject$3(value)) throw new TypeError(`${at} must be an object keyed by group name`);
|
|
28167
|
+
const entries = Object.entries(value);
|
|
28168
|
+
if (entries.length === 0 || entries.length > MAX_GROUPS) throw new TypeError(`${at} must hold 1 to ${String(MAX_GROUPS)} groups; remove it for none`);
|
|
28169
|
+
const owner = /* @__PURE__ */ new Map();
|
|
28170
|
+
const groups = entries.map(([name, group]) => {
|
|
28171
|
+
const here = `${at}.${name}`;
|
|
28172
|
+
if (!GROUP_NAME.test(name)) throw new TypeError(`${here}: "${name}" is not a group name (lower snake, at most 63 characters)`);
|
|
28173
|
+
if (!isObject$3(group)) throw new TypeError(`${here} must be an object with columns and update`);
|
|
28174
|
+
for (const key of Object.keys(group)) if (key !== "columns" && key !== "update") throw new TypeError(`${here}: unknown key "${key}" (use columns, update)`);
|
|
28175
|
+
const listed = group["columns"];
|
|
28176
|
+
if (!Array.isArray(listed) || listed.length === 0 || listed.some((column) => typeof column !== "string")) throw new TypeError(`${here}.columns must be a list of column names`);
|
|
28177
|
+
const names = [...new Set(listed.map(String))];
|
|
28178
|
+
for (const column of names) {
|
|
28179
|
+
if (columns[column] === void 0) throw new TypeError(`${here}.columns names "${column}", which is not an own column of the table (${Object.keys(columns).join(", ")})`);
|
|
28180
|
+
const other = owner.get(column);
|
|
28181
|
+
if (other !== void 0) throw new TypeError(`${here}.columns: "${column}" is also in ${at}.${other}; a column belongs to one group, so it asks for one permission`);
|
|
28182
|
+
owner.set(column, name);
|
|
28183
|
+
}
|
|
28184
|
+
const update = group["update"];
|
|
28185
|
+
if (typeof update !== "string" || !PERMISSION_KEY.test(update)) throw new TypeError(`${here}.update must be a permission key such as "orders.price.update"`);
|
|
28186
|
+
return [name, {
|
|
28187
|
+
columns: names,
|
|
28188
|
+
update
|
|
28189
|
+
}];
|
|
28190
|
+
});
|
|
28191
|
+
return Object.fromEntries(groups);
|
|
28192
|
+
}
|
|
28139
28193
|
// src/config/app-computed.ts
|
|
28140
28194
|
const IDENT$1 = /^[a-z][a-z0-9_]{0,62}$/;
|
|
28141
28195
|
/** Rollups and lookups together, per table. */
|
|
@@ -28161,7 +28215,7 @@ const ORDERED = /* @__PURE__ */ new Set([
|
|
|
28161
28215
|
"timestamptz",
|
|
28162
28216
|
"text"
|
|
28163
28217
|
]);
|
|
28164
|
-
function isObject$
|
|
28218
|
+
function isObject$2(value) {
|
|
28165
28219
|
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
28166
28220
|
}
|
|
28167
28221
|
function isAggregate(value) {
|
|
@@ -28184,7 +28238,7 @@ function referencesTo(child, parent) {
|
|
|
28184
28238
|
}
|
|
28185
28239
|
function whereOf(where, value, child, table) {
|
|
28186
28240
|
if (value === void 0) return;
|
|
28187
|
-
if (!isObject$
|
|
28241
|
+
if (!isObject$2(value)) throw new TypeError(`${where} must be { column, equals }`);
|
|
28188
28242
|
checkKeys$1(where, value, WHERE_KEYS);
|
|
28189
28243
|
const { column, equals } = value;
|
|
28190
28244
|
const selects = Object.entries(table.columns ?? {}).filter(([, each]) => each.type === "text" && each.options !== void 0);
|
|
@@ -28197,7 +28251,7 @@ function whereOf(where, value, child, table) {
|
|
|
28197
28251
|
};
|
|
28198
28252
|
}
|
|
28199
28253
|
function rollupOf(where, value, parent, tables) {
|
|
28200
|
-
if (!isObject$
|
|
28254
|
+
if (!isObject$2(value)) throw new TypeError(`${where} must be an object`);
|
|
28201
28255
|
checkKeys$1(where, value, ROLLUP_KEYS);
|
|
28202
28256
|
const { table, via, aggregate, column } = value;
|
|
28203
28257
|
const child = typeof table === "string" ? tables[table] : void 0;
|
|
@@ -28225,7 +28279,7 @@ function rollupOf(where, value, parent, tables) {
|
|
|
28225
28279
|
};
|
|
28226
28280
|
}
|
|
28227
28281
|
function lookupOf$1(where, value, name, tables) {
|
|
28228
|
-
if (!isObject$
|
|
28282
|
+
if (!isObject$2(value)) throw new TypeError(`${where} must be an object`);
|
|
28229
28283
|
checkKeys$1(where, value, LOOKUP_KEYS);
|
|
28230
28284
|
const { via, column } = value;
|
|
28231
28285
|
const own = tables[name]?.columns ?? {};
|
|
@@ -28242,7 +28296,7 @@ function lookupOf$1(where, value, name, tables) {
|
|
|
28242
28296
|
}
|
|
28243
28297
|
function entriesOf(where, value) {
|
|
28244
28298
|
if (value === void 0) return [];
|
|
28245
|
-
if (!isObject$
|
|
28299
|
+
if (!isObject$2(value)) throw new TypeError(`${where} must be an object keyed by column name`);
|
|
28246
28300
|
return Object.entries(value);
|
|
28247
28301
|
}
|
|
28248
28302
|
/**
|
|
@@ -28251,7 +28305,7 @@ function entriesOf(where, value) {
|
|
|
28251
28305
|
* computed column may not reuse.
|
|
28252
28306
|
*/
|
|
28253
28307
|
function computedOf(where, value, name, tables, taken) {
|
|
28254
|
-
if (!isObject$
|
|
28308
|
+
if (!isObject$2(value)) return {};
|
|
28255
28309
|
const rollups = entriesOf(`${where}.rollups`, value["rollups"]);
|
|
28256
28310
|
const lookups = entriesOf(`${where}.lookups`, value["lookups"]);
|
|
28257
28311
|
if (rollups.length + lookups.length > MAX_COMPUTED) throw new TypeError(`${where}: at most ${String(MAX_COMPUTED)} rollups and lookups together`);
|
|
@@ -28326,6 +28380,57 @@ function isAppDefault(type, value) {
|
|
|
28326
28380
|
if (NUMBER.test(value)) return type === "numeric";
|
|
28327
28381
|
return value.length <= MAX_LITERAL && TEXT_LITERAL.test(value) && (type === "text" || type === "uuid" || type === "date" || type === "timestamptz");
|
|
28328
28382
|
}
|
|
28383
|
+
// src/config/app-embedding.ts
|
|
28384
|
+
const SCHEDULE = /^(\d{1,2} seconds?|[0-9*/, -]+( [0-9*/, -]+){4})$/u;
|
|
28385
|
+
const MAX_DIMENSIONS = {
|
|
28386
|
+
vector: 2e3,
|
|
28387
|
+
halfvec: 4e3
|
|
28388
|
+
};
|
|
28389
|
+
/** The column the vector lives in. */
|
|
28390
|
+
const APP_EMBEDDING_COLUMN = "embedding";
|
|
28391
|
+
function isObject$1(value) {
|
|
28392
|
+
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
28393
|
+
}
|
|
28394
|
+
/**
|
|
28395
|
+
* `tables.<t>.embedding` checked (ADR 0229): the embedded columns are own plain
|
|
28396
|
+
* `text` columns (not encrypted), the table has no column of its own named
|
|
28397
|
+
* `embedding`, and the size fits the index of the vector type.
|
|
28398
|
+
*/
|
|
28399
|
+
function embeddingOf(where, value, columns) {
|
|
28400
|
+
if (value === void 0) return;
|
|
28401
|
+
const at = `${where}.embedding`;
|
|
28402
|
+
if (!isObject$1(value)) throw new TypeError(`${at} must be an object with content and dimensions`);
|
|
28403
|
+
for (const key of Object.keys(value)) if (![
|
|
28404
|
+
"content",
|
|
28405
|
+
"dimensions",
|
|
28406
|
+
"type",
|
|
28407
|
+
"schedule",
|
|
28408
|
+
"batch"
|
|
28409
|
+
].includes(key)) throw new TypeError(`${at}.${key} is not an option; use content, dimensions, type, schedule or batch`);
|
|
28410
|
+
const { content, dimensions, type, schedule, batch } = value;
|
|
28411
|
+
if (!Array.isArray(content) || content.length === 0 || content.length > 20 || content.some((name) => typeof name !== "string")) throw new TypeError(`${at}.content must list 1 to 20 text columns`);
|
|
28412
|
+
const names = content;
|
|
28413
|
+
if (new Set(names).size !== names.length) throw new TypeError(`${at}.content lists a column twice`);
|
|
28414
|
+
for (const name of names) {
|
|
28415
|
+
const column = columns[name];
|
|
28416
|
+
if (column === void 0) throw new TypeError(`${at}.content names "${name}", which is not a column of the table`);
|
|
28417
|
+
if (column.type !== "text" || column.encrypted === true) throw new TypeError(`${at}.content column "${name}" must be a plain text column (not encrypted)`);
|
|
28418
|
+
}
|
|
28419
|
+
if (columns[APP_EMBEDDING_COLUMN] !== void 0) throw new TypeError(`${at} adds a column named "${APP_EMBEDDING_COLUMN}"; rename your column of that name`);
|
|
28420
|
+
if (type !== void 0 && type !== "vector" && type !== "halfvec") throw new TypeError(`${at}.type must be "vector" or "halfvec"`);
|
|
28421
|
+
const kind = type ?? "halfvec";
|
|
28422
|
+
const max = MAX_DIMENSIONS[kind];
|
|
28423
|
+
if (typeof dimensions !== "number" || !Number.isInteger(dimensions) || dimensions < 1 || dimensions > max) throw new TypeError(`${at}.dimensions must be a whole number from 1 to ${String(max)} for ${kind}`);
|
|
28424
|
+
if (schedule !== void 0 && (typeof schedule !== "string" || !SCHEDULE.test(schedule))) throw new TypeError(`${at}.schedule must be "N seconds" or a five-field cron expression`);
|
|
28425
|
+
if (batch !== void 0 && (typeof batch !== "number" || !Number.isInteger(batch) || batch < 1 || batch > 200)) throw new TypeError(`${at}.batch must be a whole number from 1 to 200`);
|
|
28426
|
+
return {
|
|
28427
|
+
content: names,
|
|
28428
|
+
dimensions,
|
|
28429
|
+
...type === void 0 ? {} : { type },
|
|
28430
|
+
...schedule === void 0 ? {} : { schedule },
|
|
28431
|
+
...batch === void 0 ? {} : { batch }
|
|
28432
|
+
};
|
|
28433
|
+
}
|
|
28329
28434
|
// src/config/app-encryption.ts
|
|
28330
28435
|
function booleanOf(where, value) {
|
|
28331
28436
|
if (value !== void 0 && typeof value !== "boolean") throw new TypeError(`${where} must be true or false`);
|
|
@@ -28400,7 +28505,9 @@ const TABLE_KEYS = /* @__PURE__ */ new Set([
|
|
|
28400
28505
|
"rollups",
|
|
28401
28506
|
"lookups",
|
|
28402
28507
|
"events",
|
|
28403
|
-
"auditReads"
|
|
28508
|
+
"auditReads",
|
|
28509
|
+
"columnGroups",
|
|
28510
|
+
"embedding"
|
|
28404
28511
|
]);
|
|
28405
28512
|
const SUBJECT_KEYS = /* @__PURE__ */ new Set([
|
|
28406
28513
|
"type",
|
|
@@ -28826,6 +28933,8 @@ function tableOf(where, value, tables, reserved) {
|
|
|
28826
28933
|
});
|
|
28827
28934
|
checkLookupColumns(where, own);
|
|
28828
28935
|
const auditReads = auditReadsOf(where, value["auditReads"], own);
|
|
28936
|
+
const columnGroups = columnGroupsOf(where, value["columnGroups"], own);
|
|
28937
|
+
const embedding = embeddingOf(where, value["embedding"], own);
|
|
28829
28938
|
return {
|
|
28830
28939
|
...columns === void 0 ? {} : { columns: Object.fromEntries(resolved) },
|
|
28831
28940
|
...scope === void 0 ? {} : { scope },
|
|
@@ -28836,7 +28945,9 @@ function tableOf(where, value, tables, reserved) {
|
|
|
28836
28945
|
...comment === void 0 ? {} : { comment },
|
|
28837
28946
|
...subject === void 0 ? {} : { subject },
|
|
28838
28947
|
...events === void 0 ? {} : { events },
|
|
28839
|
-
...auditReads === void 0 ? {} : { auditReads }
|
|
28948
|
+
...auditReads === void 0 ? {} : { auditReads },
|
|
28949
|
+
...columnGroups === void 0 ? {} : { columnGroups },
|
|
28950
|
+
...embedding === void 0 ? {} : { embedding }
|
|
28840
28951
|
};
|
|
28841
28952
|
}
|
|
28842
28953
|
/**
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
import { StandardSchemaV1 } from "@standard-schema/spec";
|
|
2
|
+
/**
|
|
3
|
+
* The shapes of json-render's flat spec and its `data-spec` stream part, typed
|
|
4
|
+
* structurally so `@json-render/core` stays an optional peer. The types accept
|
|
5
|
+
* every spec `@json-render/core` produces.
|
|
6
|
+
*/
|
|
7
|
+
export interface JsonRenderElement {
|
|
8
|
+
readonly type: string;
|
|
9
|
+
readonly props?: Readonly<Record<string, unknown>>;
|
|
10
|
+
readonly children?: readonly string[];
|
|
11
|
+
}
|
|
12
|
+
export interface JsonRenderSpec {
|
|
13
|
+
readonly root: string;
|
|
14
|
+
readonly elements: Readonly<Record<string, JsonRenderElement>>;
|
|
15
|
+
readonly state?: Readonly<Record<string, unknown>>;
|
|
16
|
+
}
|
|
17
|
+
export interface JsonRenderPatch {
|
|
18
|
+
readonly op: "add" | "remove" | "replace" | "move" | "copy" | "test";
|
|
19
|
+
readonly path: string;
|
|
20
|
+
readonly value?: unknown;
|
|
21
|
+
readonly from?: string;
|
|
22
|
+
}
|
|
23
|
+
export type JsonRenderSpecPart = {
|
|
24
|
+
readonly type: "patch";
|
|
25
|
+
readonly patch: JsonRenderPatch;
|
|
26
|
+
} | {
|
|
27
|
+
readonly type: "flat";
|
|
28
|
+
readonly spec: JsonRenderSpec;
|
|
29
|
+
} | {
|
|
30
|
+
readonly type: "nested";
|
|
31
|
+
readonly spec: Readonly<Record<string, unknown>>;
|
|
32
|
+
};
|
|
33
|
+
/** A message part of a streamed spec. */
|
|
34
|
+
export interface JsonRenderPart {
|
|
35
|
+
readonly type: "data-spec";
|
|
36
|
+
readonly id?: string;
|
|
37
|
+
readonly data: JsonRenderSpecPart;
|
|
38
|
+
}
|
|
39
|
+
/** The part of a `defineCatalog` result `validateSpec` calls. */
|
|
40
|
+
export interface JsonRenderCatalog {
|
|
41
|
+
validate(spec: unknown): {
|
|
42
|
+
readonly success: boolean;
|
|
43
|
+
readonly error?: unknown;
|
|
44
|
+
};
|
|
45
|
+
}
|
|
46
|
+
export type SpecIssue = {
|
|
47
|
+
readonly code: string;
|
|
48
|
+
readonly message: string;
|
|
49
|
+
readonly path?: string;
|
|
50
|
+
};
|
|
51
|
+
export type SpecValidation = {
|
|
52
|
+
readonly ok: true;
|
|
53
|
+
readonly spec: JsonRenderSpec;
|
|
54
|
+
} | {
|
|
55
|
+
readonly ok: false;
|
|
56
|
+
readonly issues: readonly SpecIssue[];
|
|
57
|
+
};
|
|
58
|
+
type MessageLike = {
|
|
59
|
+
readonly parts: readonly unknown[];
|
|
60
|
+
};
|
|
61
|
+
export declare function isSpec(value: unknown): value is JsonRenderSpec;
|
|
62
|
+
/**
|
|
63
|
+
* The `dataSchemas` entry for `validateUIMessages`, so a stored message with a
|
|
64
|
+
* `data-spec` part is checked on the way back in: `validateUIMessages({
|
|
65
|
+
* messages, dataSchemas: specDataSchemas })`.
|
|
66
|
+
*/
|
|
67
|
+
export declare const specDataSchemas: {
|
|
68
|
+
readonly spec: StandardSchemaV1<unknown, JsonRenderSpecPart>;
|
|
69
|
+
};
|
|
70
|
+
/** Applies one RFC 6902 operation to a copy of the spec. */
|
|
71
|
+
export declare function applySpecPatch(spec: Readonly<Record<string, unknown>>, patch: JsonRenderPatch): Record<string, unknown>;
|
|
72
|
+
/**
|
|
73
|
+
* Folds the `data-spec` patch parts of a message into one `flat` part at the
|
|
74
|
+
* place of the first, so the stored message holds the finished spec instead of
|
|
75
|
+
* hundreds of patches. Other parts keep their order. Call it from the
|
|
76
|
+
* assistant's `parts.compact`. A message with no spec parts is returned as is.
|
|
77
|
+
*/
|
|
78
|
+
export declare function collapseSpecParts<M extends MessageLike>(message: M): M;
|
|
79
|
+
/** The current spec of a message: the result of its spec parts, or undefined. */
|
|
80
|
+
export declare function specOfMessage(message: MessageLike): JsonRenderSpec | undefined;
|
|
81
|
+
/**
|
|
82
|
+
* Checks a spec before it is saved: the structure (a root that exists, children
|
|
83
|
+
* that exist, no orphans) and, with a catalog, its components and props. The
|
|
84
|
+
* catalog is the result of `defineCatalog` from `@json-render/core`.
|
|
85
|
+
*/
|
|
86
|
+
export declare function validateSpec(catalog: JsonRenderCatalog | undefined, spec: unknown): SpecValidation;
|
|
87
|
+
/** The content of an ai-files document of kind `spec`: the spec as JSON text. */
|
|
88
|
+
export declare function specDocumentContent(spec: JsonRenderSpec): string;
|
|
89
|
+
/** Reads a `spec` document's content, or `undefined` when it isn't a spec. */
|
|
90
|
+
export declare function parseSpecDocument(content: string): JsonRenderSpec | undefined;
|
|
91
|
+
export {};
|
|
@@ -0,0 +1,233 @@
|
|
|
1
|
+
// src/json-render/index.ts
|
|
2
|
+
const PART_TYPE = "data-spec";
|
|
3
|
+
const isRecord = (value) => typeof value === "object" && value !== null && !Array.isArray(value);
|
|
4
|
+
const OPS = /* @__PURE__ */ new Set([
|
|
5
|
+
"add",
|
|
6
|
+
"remove",
|
|
7
|
+
"replace",
|
|
8
|
+
"move",
|
|
9
|
+
"copy",
|
|
10
|
+
"test"
|
|
11
|
+
]);
|
|
12
|
+
function isPatch(value) {
|
|
13
|
+
return isRecord(value) && typeof value["op"] === "string" && OPS.has(value["op"]) && typeof value["path"] === "string";
|
|
14
|
+
}
|
|
15
|
+
function isSpec(value) {
|
|
16
|
+
return isRecord(value) && typeof value["root"] === "string" && isRecord(value["elements"]);
|
|
17
|
+
}
|
|
18
|
+
function specPartIssues(value) {
|
|
19
|
+
if (!isRecord(value)) return [{ message: "a spec part must be an object" }];
|
|
20
|
+
switch (value["type"]) {
|
|
21
|
+
case "patch": return isPatch(value["patch"]) ? [] : [{
|
|
22
|
+
message: "a patch part needs an RFC 6902 operation",
|
|
23
|
+
path: ["patch"]
|
|
24
|
+
}];
|
|
25
|
+
case "flat": return isSpec(value["spec"]) ? [] : [{
|
|
26
|
+
message: "a flat part needs a spec with root and elements",
|
|
27
|
+
path: ["spec"]
|
|
28
|
+
}];
|
|
29
|
+
case "nested": return isRecord(value["spec"]) ? [] : [{
|
|
30
|
+
message: "a nested part needs a spec object",
|
|
31
|
+
path: ["spec"]
|
|
32
|
+
}];
|
|
33
|
+
default: return [{
|
|
34
|
+
message: "the type must be patch, flat or nested",
|
|
35
|
+
path: ["type"]
|
|
36
|
+
}];
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
/**
|
|
40
|
+
* The `dataSchemas` entry for `validateUIMessages`, so a stored message with a
|
|
41
|
+
* `data-spec` part is checked on the way back in: `validateUIMessages({
|
|
42
|
+
* messages, dataSchemas: specDataSchemas })`.
|
|
43
|
+
*/
|
|
44
|
+
const specDataSchemas = { spec: { "~standard": {
|
|
45
|
+
version: 1,
|
|
46
|
+
vendor: "better-supabase",
|
|
47
|
+
validate: (value) => {
|
|
48
|
+
const issues = specPartIssues(value);
|
|
49
|
+
return issues.length > 0 ? { issues } : { value };
|
|
50
|
+
}
|
|
51
|
+
} } };
|
|
52
|
+
function segments(pointer) {
|
|
53
|
+
if (pointer === "") return [];
|
|
54
|
+
return pointer.slice(1).split("/").map((part) => part.replaceAll("~1", "/").replaceAll("~0", "~"));
|
|
55
|
+
}
|
|
56
|
+
const FORBIDDEN = /* @__PURE__ */ new Set([
|
|
57
|
+
"__proto__",
|
|
58
|
+
"constructor",
|
|
59
|
+
"prototype"
|
|
60
|
+
]);
|
|
61
|
+
function clone(value) {
|
|
62
|
+
return structuredClone(value);
|
|
63
|
+
}
|
|
64
|
+
function read(target, path) {
|
|
65
|
+
let current = target;
|
|
66
|
+
for (const key of path) if (Array.isArray(current)) current = current[Number(key)];
|
|
67
|
+
else if (isRecord(current)) current = current[key];
|
|
68
|
+
else return;
|
|
69
|
+
return current;
|
|
70
|
+
}
|
|
71
|
+
function write(root, path, op, value) {
|
|
72
|
+
if (path.length === 0 || path.some((part) => FORBIDDEN.has(part))) throw new TypeError("a patch path must name a key of the spec");
|
|
73
|
+
const parent = read(root, path.slice(0, -1));
|
|
74
|
+
const key = path.at(-1);
|
|
75
|
+
if (Array.isArray(parent)) {
|
|
76
|
+
const at = key === "-" ? parent.length : Number(key);
|
|
77
|
+
if (op === "remove") parent.splice(at, 1);
|
|
78
|
+
else if (op === "add") parent.splice(at, 0, value);
|
|
79
|
+
else parent[at] = value;
|
|
80
|
+
return;
|
|
81
|
+
}
|
|
82
|
+
if (!isRecord(parent)) throw new TypeError(`no object at ${path.slice(0, -1).join("/")}`);
|
|
83
|
+
if (op === "remove") delete parent[key];
|
|
84
|
+
else parent[key] = value;
|
|
85
|
+
}
|
|
86
|
+
/** Applies one RFC 6902 operation to a copy of the spec. */
|
|
87
|
+
function applySpecPatch(spec, patch) {
|
|
88
|
+
const next = clone(spec);
|
|
89
|
+
const path = segments(patch.path);
|
|
90
|
+
switch (patch.op) {
|
|
91
|
+
case "add":
|
|
92
|
+
case "replace":
|
|
93
|
+
write(next, path, patch.op, clone(patch.value));
|
|
94
|
+
break;
|
|
95
|
+
case "remove":
|
|
96
|
+
write(next, path, "remove", void 0);
|
|
97
|
+
break;
|
|
98
|
+
case "move":
|
|
99
|
+
case "copy": {
|
|
100
|
+
const from = segments(patch.from ?? "");
|
|
101
|
+
const moved = clone(read(next, from));
|
|
102
|
+
if (patch.op === "move") write(next, from, "remove", void 0);
|
|
103
|
+
write(next, path, "add", moved);
|
|
104
|
+
break;
|
|
105
|
+
}
|
|
106
|
+
case "test": break;
|
|
107
|
+
default: {
|
|
108
|
+
const never = patch.op;
|
|
109
|
+
throw new TypeError(`unknown patch operation ${String(never)}`);
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
return next;
|
|
113
|
+
}
|
|
114
|
+
const specOf = (part) => {
|
|
115
|
+
if (!isRecord(part) || part["type"] !== PART_TYPE) return;
|
|
116
|
+
return specPartIssues(part["data"]).length === 0 ? part["data"] : void 0;
|
|
117
|
+
};
|
|
118
|
+
/**
|
|
119
|
+
* Folds the `data-spec` patch parts of a message into one `flat` part at the
|
|
120
|
+
* place of the first, so the stored message holds the finished spec instead of
|
|
121
|
+
* hundreds of patches. Other parts keep their order. Call it from the
|
|
122
|
+
* assistant's `parts.compact`. A message with no spec parts is returned as is.
|
|
123
|
+
*/
|
|
124
|
+
function collapseSpecParts(message) {
|
|
125
|
+
let spec;
|
|
126
|
+
let first = -1;
|
|
127
|
+
const kept = [];
|
|
128
|
+
for (const part of message.parts) {
|
|
129
|
+
const data = specOf(part);
|
|
130
|
+
if (!data) {
|
|
131
|
+
kept.push(part);
|
|
132
|
+
continue;
|
|
133
|
+
}
|
|
134
|
+
if (first === -1) {
|
|
135
|
+
first = kept.length;
|
|
136
|
+
kept.push(void 0);
|
|
137
|
+
}
|
|
138
|
+
if (data.type === "patch") spec = applySpecPatch(spec ?? {
|
|
139
|
+
root: "",
|
|
140
|
+
elements: {}
|
|
141
|
+
}, data.patch);
|
|
142
|
+
else spec = clone(data.spec);
|
|
143
|
+
}
|
|
144
|
+
if (first === -1 || spec === void 0 || typeof spec["root"] !== "string" || !isRecord(spec["elements"])) return message;
|
|
145
|
+
const flat = {
|
|
146
|
+
root: spec["root"],
|
|
147
|
+
elements: spec["elements"]
|
|
148
|
+
};
|
|
149
|
+
kept[first] = {
|
|
150
|
+
type: PART_TYPE,
|
|
151
|
+
data: {
|
|
152
|
+
type: "flat",
|
|
153
|
+
spec: flat
|
|
154
|
+
}
|
|
155
|
+
};
|
|
156
|
+
return {
|
|
157
|
+
...message,
|
|
158
|
+
parts: kept
|
|
159
|
+
};
|
|
160
|
+
}
|
|
161
|
+
/** The current spec of a message: the result of its spec parts, or undefined. */
|
|
162
|
+
function specOfMessage(message) {
|
|
163
|
+
const collapsed = collapseSpecParts(message);
|
|
164
|
+
for (const part of collapsed.parts) {
|
|
165
|
+
const data = specOf(part);
|
|
166
|
+
if (data?.type === "flat") return data.spec;
|
|
167
|
+
}
|
|
168
|
+
}
|
|
169
|
+
/**
|
|
170
|
+
* Checks a spec before it is saved: the structure (a root that exists, children
|
|
171
|
+
* that exist, no orphans) and, with a catalog, its components and props. The
|
|
172
|
+
* catalog is the result of `defineCatalog` from `@json-render/core`.
|
|
173
|
+
*/
|
|
174
|
+
function validateSpec(catalog, spec) {
|
|
175
|
+
if (!isSpec(spec)) return {
|
|
176
|
+
ok: false,
|
|
177
|
+
issues: [{
|
|
178
|
+
code: "invalid_spec",
|
|
179
|
+
message: "a spec needs a root and elements"
|
|
180
|
+
}]
|
|
181
|
+
};
|
|
182
|
+
const issues = [];
|
|
183
|
+
if (spec.elements[spec.root] === void 0) issues.push({
|
|
184
|
+
code: "root_not_found",
|
|
185
|
+
message: `the root element ${spec.root} does not exist`,
|
|
186
|
+
path: "/root"
|
|
187
|
+
});
|
|
188
|
+
const reached = /* @__PURE__ */ new Set();
|
|
189
|
+
const visit = (id) => {
|
|
190
|
+
if (reached.has(id)) return;
|
|
191
|
+
reached.add(id);
|
|
192
|
+
for (const child of spec.elements[id]?.children ?? []) if (spec.elements[child] === void 0) issues.push({
|
|
193
|
+
code: "missing_child",
|
|
194
|
+
message: `element ${id} lists the child ${child}, which does not exist`,
|
|
195
|
+
path: `/elements/${id}/children`
|
|
196
|
+
});
|
|
197
|
+
else visit(child);
|
|
198
|
+
};
|
|
199
|
+
visit(spec.root);
|
|
200
|
+
for (const id of Object.keys(spec.elements)) if (!reached.has(id)) issues.push({
|
|
201
|
+
code: "orphaned_element",
|
|
202
|
+
message: `element ${id} is not reachable from the root`,
|
|
203
|
+
path: `/elements/${id}`
|
|
204
|
+
});
|
|
205
|
+
if (catalog) {
|
|
206
|
+
const checked = catalog.validate(spec);
|
|
207
|
+
if (!checked.success) issues.push({
|
|
208
|
+
code: "catalog",
|
|
209
|
+
message: checked.error instanceof Error ? checked.error.message : "the spec does not match the catalog"
|
|
210
|
+
});
|
|
211
|
+
}
|
|
212
|
+
return issues.length > 0 ? {
|
|
213
|
+
ok: false,
|
|
214
|
+
issues
|
|
215
|
+
} : {
|
|
216
|
+
ok: true,
|
|
217
|
+
spec
|
|
218
|
+
};
|
|
219
|
+
}
|
|
220
|
+
/** The content of an ai-files document of kind `spec`: the spec as JSON text. */
|
|
221
|
+
function specDocumentContent(spec) {
|
|
222
|
+
return JSON.stringify(spec);
|
|
223
|
+
}
|
|
224
|
+
/** Reads a `spec` document's content, or `undefined` when it isn't a spec. */
|
|
225
|
+
function parseSpecDocument(content) {
|
|
226
|
+
try {
|
|
227
|
+
const parsed = JSON.parse(content);
|
|
228
|
+
return isSpec(parsed) ? parsed : void 0;
|
|
229
|
+
} catch {
|
|
230
|
+
return;
|
|
231
|
+
}
|
|
232
|
+
}
|
|
233
|
+
export { applySpecPatch, collapseSpecParts, isSpec, parseSpecDocument, specDataSchemas, specDocumentContent, specOfMessage, validateSpec };
|
|
@@ -4,7 +4,7 @@ import { n as Logger } from "./logger-0LfhvwE4.js";
|
|
|
4
4
|
import { r as BlockTemporalOptions } from "./block-helpers-gyK33E0Z.js";
|
|
5
5
|
import { t as BlockTransport } from "./block-transport-BO7p8KHh.js";
|
|
6
6
|
import { n as BlockHooks } from "./block-hooks-DOK9DyaZ.js";
|
|
7
|
-
import { f as AiFiles, o as AiFile } from "./types-
|
|
7
|
+
import { f as AiFiles, o as AiFile } from "./types-DeKSApwU.js";
|
|
8
8
|
import { _ as JobHandler } from "./types-Dwzaxp9p.js";
|
|
9
9
|
/**
|
|
10
10
|
* `automatic` collections show up in every search of their tenant, `restricted`
|
|
@@ -70,18 +70,44 @@ interface KnowledgeCollections {
|
|
|
70
70
|
}): AsyncResult<boolean>;
|
|
71
71
|
grants(collectionId: string): AsyncResult<readonly KnowledgeCollectionGrant[]>;
|
|
72
72
|
}
|
|
73
|
-
/**
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
*/
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
73
|
+
/** What a version 2 embedder returns: the vectors and what they cost. */
|
|
74
|
+
interface EmbedResult {
|
|
75
|
+
readonly embeddings: readonly (readonly number[])[];
|
|
76
|
+
/** The tokens the provider counted, when it reports them. */
|
|
77
|
+
readonly usage?: {
|
|
78
|
+
readonly tokens: number;
|
|
79
|
+
};
|
|
80
|
+
}
|
|
81
|
+
interface EmbedderBase {
|
|
82
|
+
/** The name stored with each document and embedding. */
|
|
80
83
|
readonly model: string;
|
|
84
|
+
}
|
|
85
|
+
/** The first embedder contract: `embed` returns the vectors. */
|
|
86
|
+
interface EmbedderV1 extends EmbedderBase {
|
|
87
|
+
/** Omitted means 1. */
|
|
88
|
+
readonly apiVersion?: 1;
|
|
81
89
|
embed(values: readonly string[], options?: {
|
|
82
90
|
readonly signal?: AbortSignal;
|
|
83
91
|
}): Promise<readonly (readonly number[])[]>;
|
|
84
92
|
}
|
|
93
|
+
/** The second embedder contract: `embed` returns the vectors and the usage. */
|
|
94
|
+
interface EmbedderV2 extends EmbedderBase {
|
|
95
|
+
readonly apiVersion: 2;
|
|
96
|
+
embed(values: readonly string[], options?: {
|
|
97
|
+
readonly signal?: AbortSignal;
|
|
98
|
+
}): Promise<EmbedResult>;
|
|
99
|
+
}
|
|
100
|
+
/**
|
|
101
|
+
* Turns texts into vectors. `model` is stored with each document, so a document
|
|
102
|
+
* embedded by another model can be found and embedded again. Version 1 returns
|
|
103
|
+
* the vectors; version 2 returns `{ embeddings, usage }`, and the blocks accept
|
|
104
|
+
* both.
|
|
105
|
+
*/
|
|
106
|
+
type Embedder = EmbedderV1 | EmbedderV2;
|
|
107
|
+
/** Embeds `values` with either embedder version and returns the version 2 shape. */
|
|
108
|
+
declare function embedVectors(embedder: Embedder, values: readonly string[], options?: {
|
|
109
|
+
readonly signal?: AbortSignal;
|
|
110
|
+
}): Promise<EmbedResult>;
|
|
85
111
|
type KnowledgeScope = "organization" | "agent" | "project" | "chat" | "user" | "subject";
|
|
86
112
|
/** The record subject knowledge is about: a `config.subjects` type and its id. */
|
|
87
113
|
interface KnowledgeSubject {
|
|
@@ -148,6 +174,13 @@ interface KnowledgeHit {
|
|
|
148
174
|
readonly title: string;
|
|
149
175
|
/** The fused reciprocal rank score; higher is better. */
|
|
150
176
|
readonly score: number;
|
|
177
|
+
/** The chunk's id: `documentId#index` unless the database returns one. */
|
|
178
|
+
readonly chunkId: string;
|
|
179
|
+
/**
|
|
180
|
+
* The document's tenant; none for a system document or when the database
|
|
181
|
+
* omits it.
|
|
182
|
+
*/
|
|
183
|
+
readonly organizationId: string | undefined;
|
|
151
184
|
}
|
|
152
185
|
interface KnowledgeQuery {
|
|
153
186
|
/** Searched as full text, and embedded when the block has an embedder. */
|
|
@@ -171,6 +204,12 @@ interface KnowledgeSearchOptions {
|
|
|
171
204
|
readonly collections?: readonly string[];
|
|
172
205
|
/** Matches documents whose metadata contains this object. */
|
|
173
206
|
readonly filter?: Readonly<Record<string, unknown>>;
|
|
207
|
+
/**
|
|
208
|
+
* `false` ranks the hits by score alone instead of by collection priority
|
|
209
|
+
* first, in the database. Overrides the block's `priorityOrder` for this
|
|
210
|
+
* search.
|
|
211
|
+
*/
|
|
212
|
+
readonly priorityOrder?: boolean;
|
|
174
213
|
readonly signal?: AbortSignal;
|
|
175
214
|
}
|
|
176
215
|
interface ChunkOptions {
|
|
@@ -195,6 +234,17 @@ interface KnowledgeOptions extends BlockTemporalOptions {
|
|
|
195
234
|
readonly mappers?: readonly ErrorMapper[];
|
|
196
235
|
/** Embeds chunks and queries; without one, search is full text only. */
|
|
197
236
|
readonly embedder?: Embedder;
|
|
237
|
+
/**
|
|
238
|
+
* The vector size of the embeddings column (the module's `dimensions`). An
|
|
239
|
+
* embedder that returns another size fails with
|
|
240
|
+
* `KNOWLEDGE_DIMENSION_MISMATCH` before anything is written.
|
|
241
|
+
*/
|
|
242
|
+
readonly dimensions?: number;
|
|
243
|
+
/**
|
|
244
|
+
* Orders search hits by collection priority first (default `true`), or by
|
|
245
|
+
* score alone when `false`. A search can override it.
|
|
246
|
+
*/
|
|
247
|
+
readonly priorityOrder?: boolean;
|
|
198
248
|
/** The ai-files block, for `ingest.file`. */
|
|
199
249
|
readonly files?: AiFiles;
|
|
200
250
|
/**
|
|
@@ -338,4 +388,4 @@ interface Knowledge {
|
|
|
338
388
|
declare function chunk(text: string, options?: ChunkOptions): readonly KnowledgeChunk[];
|
|
339
389
|
/** Documents, chunks and hybrid search for retrieval. */
|
|
340
390
|
declare function createKnowledge(options: KnowledgeOptions): Knowledge;
|
|
341
|
-
export { NewKnowledgeCollection as S,
|
|
391
|
+
export { KnowledgeCollections as C, NewKnowledgeCollection as E, KnowledgeCollectionGrant as S, KnowledgeVisibility as T, NewKnowledgeDocument as _, EmbedderV2 as a, embedVectors as b, KnowledgeDocument as c, KnowledgeOptions as d, KnowledgeQuery as f, KnowledgeSubject as g, KnowledgeStatus as h, EmbedderV1 as i, KnowledgeHit as l, KnowledgeSearchOptions as m, EmbedResult as n, Knowledge as o, KnowledgeScope as p, Embedder as r, KnowledgeChunk as s, ChunkOptions as t, KnowledgeHooks as u, chunk as v, KnowledgeGrantee as w, KnowledgeCollection as x, createKnowledge as y };
|